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

GUI-mode JNLP slave does not reconnect after Jenkins restart (UnixSlaveRestarter broken)

    Details

    • Similar Issues:

      Description

      I run jenkins.war and create a JNLP slave. I click Launch and download the slave-agent.jnlp file. From a shell, I run javaws slave-agent.jnlp. (Starting it from the browser does not work in my case, perhaps due to the browser not finding the right version of javaws.) The slave agent starts up fine and is connected.

      Now I restart Jenkins. Suddenly the regular slave window closed, to be replaced by a Web Start dialog

      Unable to launch the application.

      The (wrapped) exception is as follows:

      java.io.FileNotFoundException: /tmp/javawogPqsh (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:138)
      	at java.io.FileInputStream.<init>(FileInputStream.java:93)
      	at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
      	at com.sun.javaws.Main.launchApp(Unknown Source)
      	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
      	at com.sun.javaws.Main.access$000(Unknown Source)
      	at com.sun.javaws.Main$1.run(Unknown Source)
      	at java.lang.Thread.run(Thread.java:745)
      

      I am not sure what this means; the JNLP process was already launched before, so it should not be trying to launch it again, just make a new connection. Perhaps the slave agent (this is Remoting 2.47) is attempting to restart the entire JVM? Via UnixSlaveRestarter?

      The same problem occurs if I use

      javaws http://localhost:8080/jenkins/computer/someslave/slave-agent.jnlp
      

      without using the browser, so it is not simply a problem of the browser discarding a temporary file. But

      java -jar slave.jar -jnlpUrl http://localhost:8080/jenkins/computer/someslave/slave-agent.jnlp
      

      works fine: the agent retries the connection after ten seconds as expected.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Despite the apparent similarity, I do not think this is a duplicate of JENKINS-24272. That bug seems to be reported against the command-line mode (java -jar slave.jar), which for me works fine; what does not work for me is the GUI mode (using javaws).

            Show
            jglick Jesse Glick added a comment - Despite the apparent similarity, I do not think this is a duplicate of JENKINS-24272 . That bug seems to be reported against the command-line mode ( java -jar slave.jar ), which for me works fine; what does not work for me is the GUI mode (using javaws ).
            Hide
            jglick Jesse Glick added a comment -

            This is definitely a regression. Confirmed that the GUI mode (using Java 8 javaws) works fine in 1.554.3, but breaks in 1.565.3, though now I am seeing a somewhat different wrapped exception:

            java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8080/jenkins/computer/someslave/slave-agent.jnlp
            	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1838)
            	at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90)
            	at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1431)
            	at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1429)
            	at java.security.AccessController.doPrivileged(Native Method)
            	at java.security.AccessController.doPrivileged(AccessController.java:713)
            	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1428)
            	at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
            	at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
            	at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
            	at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
            	at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
            	at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
            	at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
            	at com.sun.javaws.Main.launchApp(Unknown Source)
            	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
            	at com.sun.javaws.Main.access$000(Unknown Source)
            	at com.sun.javaws.Main$1.run(Unknown Source)
            	at java.lang.Thread.run(Thread.java:745)
            

            The behavior is a little different in Java 7 javaws, though it still fails. After Jenkins restarts, a message about retrying is printed momentarily in the GUI window, then this closes and javaws again prompts whether you want to trust the program—again it is wrong that javaws itself is being rerun.

            Show
            jglick Jesse Glick added a comment - This is definitely a regression. Confirmed that the GUI mode (using Java 8 javaws ) works fine in 1.554.3, but breaks in 1.565.3, though now I am seeing a somewhat different wrapped exception: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8080/jenkins/computer/someslave/slave-agent.jnlp at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1838) at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90) at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1431) at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1429) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessController.doPrivileged(AccessController.java:713) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1428) at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source) at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source) at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source) at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source) at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source) at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source) at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source) at com.sun.javaws.Main.launchApp(Unknown Source) at com.sun.javaws.Main.continueInSecureThread(Unknown Source) at com.sun.javaws.Main.access$000(Unknown Source) at com.sun.javaws.Main$1.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) The behavior is a little different in Java 7 javaws , though it still fails. After Jenkins restarts, a message about retrying is printed momentarily in the GUI window, then this closes and javaws again prompts whether you want to trust the program—again it is wrong that javaws itself is being rerun.
            Hide
            jglick Jesse Glick added a comment -

            Will recheck this against just-merged #1479 fix of JENKINS-24272.

            Show
            jglick Jesse Glick added a comment - Will recheck this against just-merged #1479 fix of JENKINS-24272 .
            Hide
            jglick Jesse Glick added a comment -

            Found an earlier bug report.

            Show
            jglick Jesse Glick added a comment - Found an earlier bug report.

              People

              • Assignee:
                Unassigned
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: