Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-19251

After upgrade from 1.519 to 1.526 -> NumberFormatException occurs during maven 3 build

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Fixed
    • maven-plugin

    Description

      Builds of type Maven2/3 Build.

      Started by timer
      [EnvInject] - Loading node environment variables.
      Building remotely on KO.LINUX.05 in workspace XXXx
      
      Cleaning up /var/lib/jenkins/workspace/fb_g3his.tea.wma-root_deploy/.
      
      Updating XXXXXX/wma.3.1.x-fb/wma-root at revision '2013-08-18T22:00:13.715 +0200'
      At revision 134474
      
      no change for http://XXXXXX/wma.3.1.x-fb/wma-root since the previous build
      
      Parsing POMs
      
      Downloaded artifacts..... 
      
      [wma-root_deploy] $ /var/lib/jenkins/tools/jdk/jdk1.6.0_45/bin/java -Xmx580M -cp /var/lib/jenkins/maven3-agent.jar:/var/lib/jenkins/tools/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /var/lib/jenkins/tools/maven/apache-maven-3.0.4 /var/lib/jenkins/slave.jar /var/lib/jenkins/maven3-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 48798
      Exception in thread "main" java.lang.NumberFormatException: For input string: "/var/lib/jenkins/maven3-interceptor-commons.jar"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      	at java.lang.Integer.parseInt(Integer.java:449)
      	at java.lang.Integer.parseInt(Integer.java:499)
      	at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:65)
      
      ERROR: Failed to launch Maven. Exit code = 1
      An attempt to send an e-mail to empty list of recipients, ignored.
      Notifying upstream projects of job completion
      Finished: FAILURE
      
      

      Other info:

      • What is funny that upgrade was done on Friday -> builds were working throught weekend without any biggers problems, on Monday this bug appears.
      • it affects about 50% of builds of most projects - undeterministic ...
        When builds passed corresponding maven line has the different numbers or arguments - without "/var/lib/jenkins/maven3-interceptor-commons.jar"
      [wma-root_deploy] $ /var/lib/jenkins/tools/jdk/jdk1.6.0_45/bin/java -Xmx580M -cp /var/lib/jenkins/maven3-agent.jar:/var/lib/jenkins/tools/maven/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /var/lib/jenkins/tools/maven/apache-maven-3.0.4 /var/lib/jenkins/slave.jar /var/lib/jenkins/maven3-interceptor.jar 46450
      
      • when I rollback to 1.519 its gone
      • after week once again upgraded but to 1.527 and the same bug shown
      • rollback to 1.519 helped..

      I can deliver more info just need to know what...

      Attachments

        Issue Links

          Activity

            jlin jlin added a comment - - edited

            We are getting the same intermittent problem as well after we upgraded to Jenkins 1.526 from 1.496.

            Seems like maven3-interceptor-commons was introduced by https://github.com/jenkinsci/jenkins/commit/c50a7cc6893e7107a460f1de31da5154840df3dc, which means it started appearing in 1.526.

            In our case even when the build passes, maven3-interceptor-commons is still used:

            Pass

            Parsing POMs
            Downloaded artifact <SOME_DEPENDENCY>.pom
            [Main-Build] $ java -XX:MaxPermSize=256m -Xmx1536m -cp /home/<SOME_USER>/jenkins_home/maven3-agent.jar:/home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4 /home/<SOME_USER>/jenkins_home/slave.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor-commons.jar 46350
            <===[JENKINS REMOTING CAPACITY]===>channel started
            log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
            log4j:WARN Please initialize the log4j system properly.
            Executing Maven:  ...
            

            Fail

            Parsing POMs
            Downloaded artifact <SOME_DEPENDENCY>.pom
            [Main-Build] $ java -XX:MaxPermSize=256m -Xmx1536m -cp /home/<SOME_USER>/jenkins_home/maven3-agent.jar:/home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4 /home/<SOME_USER>/jenkins_home/slave.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor-commons.jar 35515
            Exception in thread "main" java.lang.NumberFormatException: For input string: "/home/<SOME_USER>/jenkins_home/maven3-interceptor-commons.jar"
            	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
            	at java.lang.Integer.parseInt(Integer.java:449)
            	at java.lang.Integer.parseInt(Integer.java:499)
            	at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:65)
            
            jlin jlin added a comment - - edited We are getting the same intermittent problem as well after we upgraded to Jenkins 1.526 from 1.496. Seems like maven3-interceptor-commons was introduced by https://github.com/jenkinsci/jenkins/commit/c50a7cc6893e7107a460f1de31da5154840df3dc , which means it started appearing in 1.526. In our case even when the build passes, maven3-interceptor-commons is still used: Pass Parsing POMs Downloaded artifact <SOME_DEPENDENCY>.pom [Main-Build] $ java -XX:MaxPermSize=256m -Xmx1536m -cp /home/<SOME_USER>/jenkins_home/maven3-agent.jar:/home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4 /home/<SOME_USER>/jenkins_home/slave.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor-commons.jar 46350 <===[JENKINS REMOTING CAPACITY]===>channel started log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. Executing Maven: ... Fail Parsing POMs Downloaded artifact <SOME_DEPENDENCY>.pom [Main-Build] $ java -XX:MaxPermSize=256m -Xmx1536m -cp /home/<SOME_USER>/jenkins_home/maven3-agent.jar:/home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/<SOME_USER>/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/maven-3.0.4 /home/<SOME_USER>/jenkins_home/slave.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor.jar /home/<SOME_USER>/jenkins_home/maven3-interceptor-commons.jar 35515 Exception in thread "main" java.lang.NumberFormatException: For input string: "/home/<SOME_USER>/jenkins_home/maven3-interceptor-commons.jar" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang. Integer .parseInt( Integer .java:449) at java.lang. Integer .parseInt( Integer .java:499) at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:65)

            Got the same problem with 1.530. Resolved by downgrading to 1.525.

            jonbe242 Jonas Bergvall added a comment - Got the same problem with 1.530. Resolved by downgrading to 1.525.
            kaniapm Piotr Kania added a comment -

            I have found workaround - https://groups.google.com/forum/#!msg/jenkinsci-users/WZMl_zLBH5Y/YphIW_Eu9uYJ
            Just disconnected slave node from Jenkins master, removed all maven*.jar files and slave.jar in jenkins home directory on slave machine. Then connected slave node.
            The root cause of the problem is too many arguments passed to instance of org.jvnet.hudson.maven3.agent.Maven3Main. It expects a number as fourth argument:

            public static void main(String[] args) throws Exception {
            		main(new File(args[0]), new File(args[1]),new File(args[2]),
            				Integer.parseInt(args[3]));		
            }
            

            It seems the command line to execute on slave is constructed incorrectly.

            kaniapm Piotr Kania added a comment - I have found workaround - https://groups.google.com/forum/#!msg/jenkinsci-users/WZMl_zLBH5Y/YphIW_Eu9uYJ Just disconnected slave node from Jenkins master, removed all maven*.jar files and slave.jar in jenkins home directory on slave machine. Then connected slave node. The root cause of the problem is too many arguments passed to instance of org.jvnet.hudson.maven3.agent.Maven3Main. It expects a number as fourth argument: public static void main( String [] args) throws Exception { main( new File(args[0]), new File(args[1]), new File(args[2]), Integer .parseInt(args[3])); } It seems the command line to execute on slave is constructed incorrectly.
            jglick Jesse Glick added a comment -

            I presume this is a regression from JENKINS-16261 though I am not yet sure how to reproduce or what the real issue is.

            jglick Jesse Glick added a comment - I presume this is a regression from JENKINS-16261 though I am not yet sure how to reproduce or what the real issue is.
            jglick Jesse Glick added a comment -

            Correction, JENKINS-16261 was in 1.530, whereas this was reported in 1.526, so related to the Maven 3.1.0 support.

            jglick Jesse Glick added a comment - Correction, JENKINS-16261 was in 1.530, whereas this was reported in 1.526, so related to the Maven 3.1.0 support.
            olamy Olivier Lamy added a comment - - edited

            Does it mean jars are NOT correctly copied to slaves on startup?

            olamy Olivier Lamy added a comment - - edited Does it mean jars are NOT correctly copied to slaves on startup?
            jglick Jesse Glick added a comment -

            That is what I have not figured out. It appears that the problem is that an old version of maven3-agent.jar is being run with the new list of arguments, but the question is why the JAR was not refreshed. I immediately suspected my own JENKINS-16261 but then realized that the bug was originally reported several releases before that change.

            Even if the root cause cannot be determined, if we assume the proximate cause is correct—that an old maven3-agent.jar is being used—a simple fix would be to change the name of the JAR.

            jglick Jesse Glick added a comment - That is what I have not figured out. It appears that the problem is that an old version of maven3-agent.jar is being run with the new list of arguments, but the question is why the JAR was not refreshed. I immediately suspected my own JENKINS-16261 but then realized that the bug was originally reported several releases before that change. Even if the root cause cannot be determined, if we assume the proximate cause is correct—that an old maven3-agent.jar is being used—a simple fix would be to change the name of the JAR.

            We run into the same problem. After deleting the maven3-*.jar's and restarting the node all runs fine.

            kreyssel Conny Kreyßel added a comment - We run into the same problem. After deleting the maven3-*.jar's and restarting the node all runs fine.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
            maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
            http://jenkins-ci.org/commit/jenkins/6b6a69ec0d63986d82616794d5a7fcf93df14b0e
            Log:
            [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/6b6a69ec0d63986d82616794d5a7fcf93df14b0e Log: [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2907
            [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. (Revision 6b6a69ec0d63986d82616794d5a7fcf93df14b0e)

            Result = SUCCESS
            Jesse Glick : 6b6a69ec0d63986d82616794d5a7fcf93df14b0e
            Files :

            • changelog.html
            • maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
            • maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2907 [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. (Revision 6b6a69ec0d63986d82616794d5a7fcf93df14b0e) Result = SUCCESS Jesse Glick : 6b6a69ec0d63986d82616794d5a7fcf93df14b0e Files : changelog.html maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/maven/AbstractMavenProcessFactory.java
            src/main/java/hudson/maven/MavenProcessFactory.java
            http://jenkins-ci.org/commit/maven-plugin/92e23770a12e0815e81d72aa63ead9c04c1a8cc2
            Log:
            [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

            Originally-Committed-As: 6b6a69ec0d63986d82616794d5a7fcf93df14b0e

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProcessFactory.java src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/maven-plugin/92e23770a12e0815e81d72aa63ead9c04c1a8cc2 Log: [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. Originally-Committed-As: 6b6a69ec0d63986d82616794d5a7fcf93df14b0e

            Code changed in jenkins
            User: Jesse Glick
            Path:
            maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
            maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
            http://jenkins-ci.org/commit/jenkins/022a98b8d3b6bcb8b0ff150ec194ee103de6fef6
            Log:
            [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date.

            (cherry picked from commit 6b6a69ec0d63986d82616794d5a7fcf93df14b0e)

            Conflicts:
            changelog.html

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/022a98b8d3b6bcb8b0ff150ec194ee103de6fef6 Log: [FIXED JENKINS-19251] Use hashes rather than modification time to determine if Maven agent JARs are up to date. (cherry picked from commit 6b6a69ec0d63986d82616794d5a7fcf93df14b0e) Conflicts: changelog.html

            People

              jglick Jesse Glick
              marecki Marek Marzec
              Votes:
              4 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: