• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • kubernetes-plugin
    • None
    • Jenkins 2.32.2

      I tried to narrow this bug down, but there isn't much information. We just upgraded to all newest plugins, but unfortunately we upgraded a lot at once, so no idea which one.

      This is spamming out logs every few seconds:

      00:19:42.695 Cannot contact kubernetes-ef39fe82c8a541be84bd780e4d7c1ddb-ce4d47fc96bfc: java.io.IOException: corrupted content in /home/jenkins/workspace/Robusta_robusta_develop-6EPNQBJK5BYEXOJV6L45MMZZGUIP7WO4Y6EGRUYNFFMRC7B2GL3A@tmp/durable-96fa79b7/pid: java.lang.NumberFormatException: For input string: ""
      00:19:57.758 Cannot contact kubernetes-ef39fe82c8a541be84bd780e4d7c1ddb-ce4d47fc96bfc: java.io.IOException: corrupted content in /home/jenkins/workspace/Robusta_robusta_develop-6EPNQBJK5BYEXOJV6L45MMZZGUIP7WO4Y6EGRUYNFFMRC7B2GL3A@tmp/durable-96fa79b7/pid: java.lang.NumberFormatException: For input string: ""
      00:20:12.769 Cannot contact kubernetes-ef39fe82c8a541be84bd780e4d7c1ddb-ce4d47fc96bfc: java.io.IOException: corrupted content in /home/jenkins/workspace/Robusta_robusta_develop-6EPNQBJK5BYEXOJV6L45MMZZGUIP7WO4Y6EGRUYNFFMRC7B2GL3A@tmp/durable-96fa79b7/pid: java.lang.NumberFormatException: For input string: ""
      

      Add information from comments:

      The same kind of problem has occurred in my Jenkins running on GKE. This problem occurred by upgrading Pipeline Nodes and Processes Plugin from 2.8 to 2.9. I am confirming that this problem temporarily resolves by downgrading that plugin from 2.9 to 2.8.

      BTW workflow-durable-task-step 2.9 does add this log message but it is just exposing a problem that was already there, and simply being suppressed unless you were running a sufficiently fine logger. The problem is that this code is seeing a file which is supposed to contain a number once created, whereas it is being created as empty for some reason.

      Again the bug probably exists in all versions, it is only printed to the build log as of 2.9. You can add a FINE logger to org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep to verify.

          [JENKINS-42048] Cannot Connect, PID NumberFormatException

          Joan Goyeau added a comment -

          Same here

          Joan Goyeau added a comment - Same here

          Jesse Glick added a comment -

          Needs to be fixed in the Kubernetes plugin.

          Jesse Glick added a comment - Needs to be fixed in the Kubernetes plugin.

           

          I don't know why, but when this was initially implemented, the ContainerExecDecorator was receiving double the amount of `$` symbols. For example instead of `echo $$` it was getting `echo $$$$` and so on.

          So as a workaround, the decorator itself removed the excess $ sumbols. 

          Could the problem be related to that?

           

          Ioannis Canellos added a comment -   I don't know why, but when this was initially implemented, the ContainerExecDecorator was receiving double the amount of `$` symbols. For example instead of `echo $$` it was getting `echo $$$$` and so on. So as a workaround, the decorator itself removed the excess $ sumbols.  Could the problem be related to that?  

          Jon Whitcraft added a comment -

          iocanel,

          I just tested your theory with this pipeline job and this is what it output in the log

          podTemplate(
              label: 'test',
              containers: [
                  containerTemplate(
                      name: 'nodejs',
                      image: 'node:alpine',
                      ttyEnabled: true,
                      command: 'cat',
                      args: ''
                  )
              ]
          ) {
              stage('test') {
                  node('test') {
                      env.MYTOOL_VERSION = '1.33'
                      container('nodejs') {
                        sh 'printenv'
                      }
                      echo env.MYTOOL_VERSION
                  }
              }
          }
          
           

          Results

          [Pipeline] podTemplate
          [Pipeline] {
          [Pipeline] stage
          [Pipeline] { (test)
          [Pipeline] node
          Running on jenkins-slave-4qzr4-jqq83 in /home/jenkins/workspace/test
          [Pipeline] {
          [Pipeline] container
          [Pipeline] {
          [Pipeline] sh
          [test] Running shell script
          Executing shell script inside container [nodejs] of pod [jenkins-slave-4qzr4-jqq83]
          Executing command: 
          /home/jenkins # cd "/home/jenkins/workspace/test"
          /home/jenkins/workspace/test # 
          /home/jenkins/workspace/test # exit
          [Pipeline] }
          [Pipeline] // container
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // podTemplate
          [Pipeline] End of Pipeline
          ERROR: script returned exit code -2

          Jon Whitcraft added a comment - iocanel , I just tested your theory with this pipeline job and this is what it output in the log podTemplate( label: 'test' , containers: [ containerTemplate( name: 'nodejs' , image: 'node:alpine' , ttyEnabled: true , command: 'cat' , args: '' ) ] ) { stage( 'test' ) { node( 'test' ) { env.MYTOOL_VERSION = '1.33' container( 'nodejs' ) { sh 'printenv' } echo env.MYTOOL_VERSION } } }   Results [Pipeline] podTemplate [Pipeline] { [Pipeline] stage [Pipeline] { (test) [Pipeline] node Running on jenkins-slave-4qzr4-jqq83 in /home/jenkins/workspace/test [Pipeline] { [Pipeline] container [Pipeline] { [Pipeline] sh [test] Running shell script Executing shell script inside container [nodejs] of pod [jenkins-slave-4qzr4-jqq83] Executing command: /home/jenkins # cd "/home/jenkins/workspace/test" /home/jenkins/workspace/test # /home/jenkins/workspace/test # exit [Pipeline] } [Pipeline] // container [Pipeline] } [Pipeline] // node [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // podTemplate [Pipeline] End of Pipeline ERROR: script returned exit code -2

          Any update on this? Super annoying message. Floods the console output.

          Michael Andrews added a comment - Any update on this? Super annoying message. Floods the console output.

          Jesse Redl added a comment -

          This is not be a solution for everyone, however this log noise seems to only happen when you have a pod template with more than one container running. I was working around another issue (https://issues.jenkins-ci.org/browse/JENKINS-40825) and by only having one container running (named jnlp) the log noise was also gone.

           

          Jesse Redl added a comment - This is not be a solution for everyone, however this log noise seems to only happen when you have a pod template with more than one container running. I was working around another issue ( https://issues.jenkins-ci.org/browse/JENKINS-40825 ) and by only having one container running (named jnlp) the log noise was also gone.  

          Jesse Glick added a comment -

          workflow-durable-task-step PR 37 will reduce noise without addressing the underlying bug, probably somewhere in the Kubernetes plugin.

          Jesse Glick added a comment - workflow-durable-task-step PR 37 will reduce noise without addressing the underlying bug, probably somewhere in the Kubernetes plugin.

          jredl Definitely not a solution for us. But good to know. Hopefully this will help csanchez or iocanel implement a fix. In the mean time, we did pull the workflow-durable-task-step PR 37 and merged it into a local build. It did lessen the number of time the message is logged. Hoping this issue is addressed soon.

          Michael Andrews added a comment - jredl Definitely not a solution for us. But good to know. Hopefully this will help csanchez or iocanel implement a fix. In the mean time, we did pull the workflow-durable-task-step PR 37 and merged it into a local build. It did lessen the number of time the message is logged. Hoping this issue is addressed soon.

          Jesse Glick added a comment -

          we did pull the workflow-durable-task-step PR 37 and merged it into a local build

          Just update to 2.11.

          Jesse Glick added a comment - we did pull the workflow-durable-task-step PR 37 and merged it into a local build Just update to 2.11.

          Carlos Sanchez added a comment - PR at  https://github.com/jenkinsci/kubernetes-plugin/pull/157  

            csanchez Carlos Sanchez
            larslawoko Lars Lawoko
            Votes:
            19 Vote for this issue
            Watchers:
            37 Start watching this issue

              Created:
              Updated:
              Resolved: