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

Xvnc plugin fails if the job has a space in the name

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: xvnc-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      We have quite a lot of jobs with spaces in the name since upgrading to the 1.14 version from the 1.11 version we encounter the following error:

      Fetching upstream changes from origin
      Commencing build of Revision ae0dcf48e628395417055fe2fc2a6434bf02565d (origin/master)
      Checking out Revision ae0dcf48e628395417055fe2fc2a6434bf02565d (origin/master)
      Starting xvnc
      [Deployit Core] $ vncserver :65 -localhost -nolisten tcp
      xauth:  file /var/lib/jenkins/workspace/Deployit does not exist
      xauth: (argv):1:  unknown command "Core/.Xauthority-2561200615964975228"
      xauth:  file /var/lib/jenkins/workspace/Deployit does not exist
      xauth: (argv):1:  unknown command "Core/.Xauthority-2561200615964975228"
      Couldn't start Xtightvnc; trying default font path.
      Please set correct fontPath in the vncserver script.
      Couldn't start Xtightvnc process.
      
      
      Unrecognized option: Core/.Xauthority-2561200615964975228
      use: X [:<display>] [option]
      -a #                   mouse acceleration (pixels)
      -ac                    disable access control restrictions
      -audit int             set audit trail level
      -auth file             select authorization file
      bc                     enable bug compatibility
      -bs                    disable any backing store support
      -c                     turns off key-click
      c #                    key-click volume (0-100)
      -cc int                default color visual class
      ....
      -version               report Xvnc version on stderr
      FATAL: Failed to run 'vncserver :37 -localhost -nolisten tcp' (exit code 255), blacklisting display #37; consider checking the "Clean up before start" option
      java.io.IOException: Failed to run 'vncserver :37 -localhost -nolisten tcp' (exit code 255), blacklisting display #37; consider checking the "Clean up before start" option
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:107)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.doSetUp(Xvnc.java:104)
      	at hudson.plugins.xvnc.Xvnc.setUp(Xvnc.java:74)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:154)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:584)
      	at hudson.model.Run.execute(Run.java:1575)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:237)
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/hudson/plugins/xvnc/Xvnc.java
          src/main/resources/hudson/plugins/xvnc/Xvnc/global.jelly
          src/main/resources/hudson/plugins/xvnc/Xvnc/help-xauthorityInFsRoot.html
          src/test/java/hudson/plugins/xvnc/XvncTest.java
          http://jenkins-ci.org/commit/xvnc-plugin/1ce66992dbc518d460943b31a640055d4ff9543a
          Log:
          Configuration for placing the xauthority file in node fs root

          Added a configuration option to place the temporary xauthority file
          on the fs root of the node instead of the in the build's workspace.
          This can be used as a workaround for JENKINS-19139 if the path to
          the fs root doesn't contain any spaces but for example the folder
          to the job does.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/hudson/plugins/xvnc/Xvnc.java src/main/resources/hudson/plugins/xvnc/Xvnc/global.jelly src/main/resources/hudson/plugins/xvnc/Xvnc/help-xauthorityInFsRoot.html src/test/java/hudson/plugins/xvnc/XvncTest.java http://jenkins-ci.org/commit/xvnc-plugin/1ce66992dbc518d460943b31a640055d4ff9543a Log: Configuration for placing the xauthority file in node fs root Added a configuration option to place the temporary xauthority file on the fs root of the node instead of the in the build's workspace. This can be used as a workaround for JENKINS-19139 if the path to the fs root doesn't contain any spaces but for example the folder to the job does.
          Hide
          jglick Jesse Glick added a comment -

          Fix/report that bug in vncserver

          …and did anyone ever actually do that? If so, is there a link? Status of fix in various distributions?

          Should this be assigned to rsandell who is apparently working on a fix in https://github.com/jenkinsci/xvnc-plugin/pull/8 ?

          Show
          jglick Jesse Glick added a comment - Fix/report that bug in vncserver …and did anyone ever actually do that? If so, is there a link? Status of fix in various distributions? Should this be assigned to rsandell who is apparently working on a fix in https://github.com/jenkinsci/xvnc-plugin/pull/8 ?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/hudson/plugins/xvnc/Xvnc.java
          src/test/java/hudson/plugins/xvnc/XvncTest.java
          http://jenkins-ci.org/commit/xvnc-plugin/a599340782a46eedc7fa87ee9ced8aeec472a1cb
          Log:
          Alternate placing of the xauthority file

          A workaround for JENKINS-19139.
          If the workspace path contains spaces it will try to put the file
          in the slave fs root, and if that path also contains spaces it will
          try to put it in java.io.tmpdir.

          Compare: https://github.com/jenkinsci/xvnc-plugin/compare/1ce66992dbc5...a599340782a4

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/hudson/plugins/xvnc/Xvnc.java src/test/java/hudson/plugins/xvnc/XvncTest.java http://jenkins-ci.org/commit/xvnc-plugin/a599340782a46eedc7fa87ee9ced8aeec472a1cb Log: Alternate placing of the xauthority file A workaround for JENKINS-19139 . If the workspace path contains spaces it will try to put the file in the slave fs root, and if that path also contains spaces it will try to put it in java.io.tmpdir. Compare: https://github.com/jenkinsci/xvnc-plugin/compare/1ce66992dbc5...a599340782a4
          Hide
          rsandell rsandell added a comment -

          Maybe my search foo is a bit off but I haven't manage to find the project page or the issue tracker for that package when I researched the issue.

          Show
          rsandell rsandell added a comment - Maybe my search foo is a bit off but I haven't manage to find the project page or the issue tracker for that package when I researched the issue.
          Hide
          integer Kanstantsin Shautsou added a comment -

          > …and did anyone ever actually do that? If so, is there a link? Status of fix in various distributions?

          Not lazy people do this always. Also i don't see what linux distro was used because vncserver has different implementations.

          for hacks on jenkins side instead upstream fixes.

          Show
          integer Kanstantsin Shautsou added a comment - > …and did anyone ever actually do that? If so, is there a link? Status of fix in various distributions? Not lazy people do this always. Also i don't see what linux distro was used because vncserver has different implementations. for hacks on jenkins side instead upstream fixes.

            People

            • Assignee:
              levsa Levon Saldamli
              Reporter:
              rklaren Ric Klaren
            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated: