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

Xvfb does not work when wrap([$class: 'Xvfb']) is defined inside timestamps

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins: 2.150.1
      Xvfb: 1.1.3
      timestamper: 1.8.10

      See more in Jenkins Master.html and Jenkins Slave.html files
    • Similar Issues:

      Description

      Xvfb cannot connect to a machine when it is enclosed inside timestamps step or option. The pipeline throws an exception:

      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from XX.YY.ZZ.WW/XX.YY.ZZ.WW:47130
      [...]
      java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
      [...]
      Caused: java.io.IOException: Remote call on JNLP4-connect connection from XX.YY.ZZ.WW/XX.YY.ZZ.WW:47130 failed
      

      I checked and the following pipelines throw exceptions:

      pipeline {
          agent {
              label 'swarm'
          }
          options {
              timestamps()
          }
          stages {
              stage('Main') {
                  steps {
                      wrap([$class: 'Xvfb']) {
                          echo 'never reached'
                      }
                  }
              }
          }
      }
      
      pipeline {
          agent {
              label 'swarm'
          }
          stages {
              stage('Main') {
                  steps {
                      timestamps {
                          wrap([$class: 'Xvfb']) {
                              echo 'never reached'
                          }
                      }
                  }
              }
          }
      }
      

      and this works correctly:

      pipeline {
          agent {
              label 'swarm'
          }
          stages {
              stage('Main') {
                  steps {
                      wrap([$class: 'Xvfb']) {
                          timestamps {
                              echo 'reached'
                          }
                      }
                  }
              }
          }
      }
      

        Attachments

        1. Jenkins Master.html
          20 kB
        2. Jenkins Slave.html
          9 kB
        3. stacktrace.txt
          12 kB

          Activity

          agabrys Adam Gabryś created issue -
          agabrys Adam Gabryś made changes -
          Field Original Value New Value
          Description Xvfb cannot connect to a machine when it is enclosed inside {{timestamps}} step or option. The pipeline throws an exception:
          {noformat}
          Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from XX.YY.ZZ.WW/XX.YY.ZZ.WW:47130
          [...]
          java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
          [...]Caused: java.io.IOException: Remote call on JNLP4-connect connection from XX.YY.ZZ.WW/XX.YY.ZZ.WW:47130 failed
          {noformat}
          I checked and the following pipelines throw exceptions:
          {noformat}
          pipeline {
              agent {
                  label 'swarm'
              }
              options {
                  timestamps()
              }
              stages {
                  stage('Main') {
                      steps {
                          wrap([$class: 'Xvfb']) {
                              echo 'never reached'
                          }
                      }
                  }
              }
          }
          {noformat}
          {noformat}
          pipeline {
              agent {
                  label 'swarm'
              }
              stages {
                  stage('Main') {
                      steps {
                          timestamps {
                              wrap([$class: 'Xvfb']) {
                                  echo 'never reached'
                              }
                          }
                      }
                  }
              }
          }
          {noformat}
          and this works correctly:
          {noformat}
          pipeline {
              agent {
                  label 'swarm'
              }
              stages {
                  stage('Main') {
                      steps {
                          wrap([$class: 'Xvfb']) {
                              timestamps {
                                  echo 'reached'
                              }
                          }
                      }
                  }
              }
          }
          {noformat}
          Xvfb cannot connect to a machine when it is enclosed inside {{timestamps}} step or option. The pipeline throws an exception:
          {noformat}
          Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from XX.YY.ZZ.WW/XX.YY.ZZ.WW:47130
          [...]
          java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
          [...]
          Caused: java.io.IOException: Remote call on JNLP4-connect connection from XX.YY.ZZ.WW/XX.YY.ZZ.WW:47130 failed
          {noformat}
          I checked and the following pipelines throw exceptions:
          {noformat}
          pipeline {
              agent {
                  label 'swarm'
              }
              options {
                  timestamps()
              }
              stages {
                  stage('Main') {
                      steps {
                          wrap([$class: 'Xvfb']) {
                              echo 'never reached'
                          }
                      }
                  }
              }
          }
          {noformat}
          {noformat}
          pipeline {
              agent {
                  label 'swarm'
              }
              stages {
                  stage('Main') {
                      steps {
                          timestamps {
                              wrap([$class: 'Xvfb']) {
                                  echo 'never reached'
                              }
                          }
                      }
                  }
              }
          }
          {noformat}
          and this works correctly:
          {noformat}
          pipeline {
              agent {
                  label 'swarm'
              }
              stages {
                  stage('Main') {
                      steps {
                          wrap([$class: 'Xvfb']) {
                              timestamps {
                                  echo 'reached'
                              }
                          }
                      }
                  }
              }
          }
          {noformat}
          basil Basil Crow made changes -
          Assignee Steven G Brown [ stevengbrown ]

            People

            • Assignee:
              Unassigned
              Reporter:
              agabrys Adam Gabryś
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: