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

Slave agent run with javaws breaks with "Unable to launch the application" when master is stopped

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • core
    • Jenkins 1.580.1 on Ubuntu 14.04 with slaves connected via JLNP.

      Since the former major LTS release I experience a kinda problematic problem with our Jenkins instance. Whenever the master is stopped (shutdown) with active connections to slaves, the JLNP client on the slaves stops working with the message: "Unable to launch the application". This was not the case before, so the client application was still running and reconnected once the master was back online.

      With the current behavior I have to step through all the >60 slave nodes, and start the JLNP client manually.

      Steps:
      1. Download Jenkins 1.580.1 and run it
      2. Setup a dumb slave via Java Web Start
      3. Connect the slave via the same machine
      4. Stop the master

      After step 4 the JLNP client should stay open, waiting for the master being online again. But it fails with the above message and the following stack:

      Exception:
      
      CouldNotLoadArgumentException[ Could not load file/URL specified: /tmp/javawJ3YZLo]
      	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:744)
      
      Wrapped Exception:
      
      java.io.FileNotFoundException: /tmp/javawJ3YZLo (No such file or directory)
      	at java.io.FileInputStream.open(Native Method)
      	at java.io.FileInputStream.<init>(FileInputStream.java:146)
      	at java.io.FileInputStream.<init>(FileInputStream.java:101)
      	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:744)
      

          [JENKINS-25490] Slave agent run with javaws breaks with "Unable to launch the application" when master is stopped

          Henrik Skupin created issue -

          Henrik Skupin added a comment -

          A quick regression check has been shown that this regression started between 1.554.3 and 1.565.1.

          Henrik Skupin added a comment - A quick regression check has been shown that this regression started between 1.554.3 and 1.565.1.

          Henrik Skupin added a comment -

          This is a regression in v1.559 (https://jenkins-ci.org/changelog#v1.559) and totally smells like an unwanted behavior caused by https://issues.jenkins-ci.org/browse/JENKINS-19055

          May this only be a problem if the JLNP client it's not installed as a service?

          Henrik Skupin added a comment - This is a regression in v1.559 ( https://jenkins-ci.org/changelog#v1.559 ) and totally smells like an unwanted behavior caused by https://issues.jenkins-ci.org/browse/JENKINS-19055 May this only be a problem if the JLNP client it's not installed as a service?

          Henrik Skupin added a comment -

          May be a dupe of #24272?

          Henrik Skupin added a comment - May be a dupe of #24272 ?
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-24272 [ JENKINS-24272 ]

          Daniel Beck added a comment -

          To clarify, the Linux slave has a UI and you're launching it using the Start button on the slave's index page on the Jenkins UI?

          Daniel Beck added a comment - To clarify, the Linux slave has a UI and you're launching it using the Start button on the slave's index page on the Jenkins UI?

          Henrik Skupin added a comment -

          That is correct, yes. We don't have it running as service via upstart.

          Henrik Skupin added a comment - That is correct, yes. We don't have it running as service via upstart.

          Daniel Beck added a comment -

          Please try the workaround of using the java ... command line call in a terminal on the slave instead.

          Daniel Beck added a comment - Please try the workaround of using the java ... command line call in a terminal on the slave instead.

          Henrik Skupin added a comment -

          But isn't that the headless mode? The tests we are running require a GUI. That's why we used the JLNP method so far. Would that not be necessary? Means we could write our own little daemon (script) to ensure that slave.jar is the current version and (re-)starts the slave if it is not running?

          I tested it with the `java` command and it works at least on Ubuntu. I will also have to test on Windows, but would like to know more about my above question first. Thanks!

          Henrik Skupin added a comment - But isn't that the headless mode ? The tests we are running require a GUI. That's why we used the JLNP method so far. Would that not be necessary? Means we could write our own little daemon (script) to ensure that slave.jar is the current version and (re-)starts the slave if it is not running? I tested it with the `java` command and it works at least on Ubuntu. I will also have to test on Windows, but would like to know more about my above question first. Thanks!

          Daniel Beck added a comment -

          Not sure. All my Linux slaves are headless, but on Windows, the java started from cmd gets UI access. It's just the launch method not requiring a UI.

          but would like to know more about my above question first.

          How long can it possibly take to try and see what happens when a slave is launched this way? Please remember that there are many more users with questions than developers or users with the time to answer others' questions.

          I'd make sure to start it from a terminal in an interactive session though, so the process inherits the UI environment.

          Daniel Beck added a comment - Not sure. All my Linux slaves are headless, but on Windows, the java started from cmd gets UI access. It's just the launch method not requiring a UI. but would like to know more about my above question first. How long can it possibly take to try and see what happens when a slave is launched this way? Please remember that there are many more users with questions than developers or users with the time to answer others' questions. I'd make sure to start it from a terminal in an interactive session though, so the process inherits the UI environment.

            Unassigned Unassigned
            whimboo Henrik Skupin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: