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

Xvnc startup failure because of Xauthority file is not handled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xvnc-plugin
    • None

      I'am using the Xvnc plugin to run UI testing jobs.
      I have many jobs that can run at the same time and I use 2 slave with several executors on each.

      Sometimes I can see the following in teh job console:

      15:20:31 Starting xvnc
      15:20:31 [] $ vncserver :11 -geometry 5120x1600
      15:20:31 xauth: error in locking authority file /users/###/.Xauthority
      15:20:34
      15:20:34 New 'slave1:11 (###)' desktop is slave1:11
      15:20:34
      15:20:34 Starting applications specified in /users/###/.vnc/xstartup
      15:20:34 Log file is /users/###/.vnc/slave1:11.log

      Except the "error" message everything seems ok, but when the test starts I have the following:

      15:20:53 [java] [WRAPPER] FileInputStream Xlib: connection to ":11.0" refused by server
      15:20:53 [java] [WRAPPER] FileInputStream
      15:20:53 [java] -[WRAPPER] FileInputStream Xlib: No protocol specified
      15:20:53 [java] [WRAPPER] FileInputStream -
      15:20:53 [java] [WRAPPER] FileInputStream
      15:20:53 [java] -[WRAPPER] FileInputStream java.lang.InternalError: Can't connect to X11 window server using ':11' as the value of the DISPLAY variable.

      My guess is that the Xauthority things gone bad because there are several attemps to use it a the very same time.
      (This file is in my $HOME directory which is network shared, that means that all the executors from any slave are using the same Xauthority file)

      If it's the issue, maybe that Xvnc plugin should detect that and try to restart a vncserver a few seconds later...

      PS:
      I did not manage to get a vncserver.log for now as is it overwritten by next job before I can copy it.
      And I can't start less jobs because it seems to happen only if there are several xvncsever startup at the very same time

            Unassigned Unassigned
            ebann ebann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: