[JIRA] (JENKINS-38487) Jenkins fails to startup if the EnvInject global system properties file is missing

0 views
Skip to first unread message

o.v.nenashev@gmail.com (JIRA)

unread,
Sep 25, 2016, 4:21:01 PM9/25/16
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
 
Jenkins / Bug JENKINS-38487
Jenkins fails to startup if the EnvInject global system properties file is missing
Change By: Oleg Nenashev
Summary: Jenkins fails to startup if the EnvInject global system properties file is missing
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Sep 25, 2016, 4:22:01 PM9/25/16
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-38487
 
Re: Jenkins fails to startup if the EnvInject global system properties file is missing

Actually it's rather a Jenkins core issue, because it does not catch IOExceptions coming from listeners

dbeck@cloudbees.com (JIRA)

unread,
Sep 29, 2016, 1:29:01 AM9/29/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Nov 5, 2016, 1:43:02 PM11/5/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-38487
 
Re: Jenkins fails to startup if the EnvInject global system properties file is missing

Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/slaves/ComputerListener.java
core/src/main/java/jenkins/model/Jenkins.java
test/src/test/java/jenkins/model/JenkinsTest.java
http://jenkins-ci.org/commit/jenkins/58e1228c99fd3d5063b0967d7780dc536bc2c463
Log:
[FIXED JENKINS-38487] - Jenkins startup must not fail in the case of ComputerListener failure (#2610)

Without this code Jenkinbs startup fails if EnvInject fails to find global property file on startup.

Javadoc says "Exceptions will be recorded to the listener. Note that throwing an exception doesn't put the computer offline." regarding the listener method exception, hence we should not block Jenkins startup

scm_issue_link@java.net (JIRA)

unread,
Nov 5, 2016, 1:43:04 PM11/5/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 5, 2016, 5:18:01 PM11/5/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 8, 2016, 7:34:03 AM11/8/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 8, 2016, 7:34:05 AM11/8/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 8, 2016, 7:34:09 AM11/8/16
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Original description:

>

{noformat}
hudson.util.HudsonFailedToLoad: java.io.IOException: org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: The given properties file path '/Users/nenashev/Documents/jenkins/plugins/envinject-plugin/foo.prop' doesn't exist.
at hudson.WebAppMain$3.run(WebAppMain.java:237)
Caused by: java.io.IOException: org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: The given properties file path '/Users/nenashev/Documents/jenkins/plugins/envinject-plugin/foo.prop' doesn't exist.
at org.jenkinsci.plugins.envinject.EnvInjectComputerListener.onOnline(EnvInjectComputerListener.java:171)
at jenkins.model.Jenkins.<init>(Jenkins.java:857)
at hudson.model.Hudson.<init>(Hudson.java:83)
at hudson.model.Hudson.<init>(Hudson.java:79)
at hudson.WebAppMain$3.run(WebAppMain.java:225)
Caused by: org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: The given properties file path '/Users/nenashev/Documents/jenkins/plugins/envinject-plugin/foo.prop' doesn't exist.
at org.jenkinsci.plugins.envinject.service.EnvInjectEnvVars.getEnvVarsFileProperty(EnvInjectEnvVars.java:76)
at org.jenkinsci.plugins.envinject.EnvInjectComputerListener.getNewMasterEnvironmentVariables(EnvInjectComputerListener.java:69)
at org.jenkinsci.plugins.envinject.EnvInjectComputerListener.onOnline(EnvInjectComputerListener.java:168)
... 4 more
Caused by: java.io.IOException: The given properties file path '/Users/nenashev/Documents/jenkins/plugins/envinject-plugin/foo.prop' doesn't exist.
at org.jenkinsci.plugins.envinject.service.PropertiesVariablesRetriever.invoke(PropertiesVariablesRetriever.java:91)
at org.jenkinsci.plugins.envinject.service.PropertiesVariablesRetriever.invoke(PropertiesVariablesRetriever.java:20)
at hudson.FilePath.act(FilePath.java:989)
at hudson.FilePath.act(FilePath.java:967)
at org.jenkinsci.plugins.envinject.service.EnvInjectEnvVars.getEnvVarsFileProperty(EnvInjectEnvVars.java:74)
... 6 more

{noformat}

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 8, 2016, 7:34:12 AM11/8/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 8, 2016, 7:35:01 AM11/8/16
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Nov 8, 2016, 7:35:01 AM11/8/16
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Original description:

>

Jenkins fails to startup if the EnvInject global system properties file is missing

Reply all
Reply to author
Forward
0 new messages