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

NullPointerException for HTTPS swarm client connection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: swarm-plugin
    • Labels:
      None
    • Environment:
      swarm-plugin 3.4
      java 1.8.0_111
    • Similar Issues:

      Description

      When running swarm-client version 3.4 and trying to connect to a Jenkins master using HTTPS the client will crash with NullPointerException if not using either of options -disableSslVerification or -sslFingerprints

       

      > java -jar swarm-client-3.4.jar
      Apr 19, 2017 10:48:29 AM hudson.plugins.swarm.Client main
      INFO: Client.main invoked with: []
      Apr 19, 2017 10:48:29 AM hudson.plugins.swarm.Client run
      INFO: Discovering Jenkins master
      Apr 19, 2017 10:48:29 AM hudson.plugins.swarm.Client run
      INFO: No Jenkins master supplied on command line, performing auto-discovery
      Apr 19, 2017 10:48:35 AM hudson.plugins.swarm.Client run

      INFO: Attempting to connect to https://URL 7a...6b with ID 7d...ca
      Exception in thread "main" java.lang.NullPointerException
      {{ at hudson.plugins.swarm.SwarmClient.createHttpClient(SwarmClient.java:333)}}
      at hudson.plugins.swarm.SwarmClient.createSwarmSlave(SwarmClient.java:398)
      {{ at hudson.plugins.swarm.Client.run(Client.java:134)}}
      {{ at hudson.plugins.swarm.Client.main(Client.java:87)}}

        Attachments

          Issue Links

            Activity

            Show
            winotu Chris Z added a comment - https://github.com/jenkinsci/swarm-plugin/pull/52/commits
            Hide
            jekeller Jacob Keller added a comment -

            I also had this problem, and had to downgrade the client to 3.3 to work around the issue for now.

            Show
            jekeller Jacob Keller added a comment - I also had this problem, and had to downgrade the client to 3.3 to work around the issue for now.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The PR has been integrated, but it has not been released by the maintainer

            Show
            oleg_nenashev Oleg Nenashev added a comment - The PR has been integrated, but it has not been released by the maintainer
            Hide
            jhoblitt Joshua Hoblitt added a comment -

            I've got the same error with 3.4:

            [root@jenkins-master jenkins-slave]# /usr/bin/java -jar /home/jenkins-slave/swarm-client-3.4.jar -mode exclusive -executors 8 -username jhoblitt -passwordEnvVariable JENKINS_PASSWORD -name jenkins-master -master http://jenkins-master:8080 -labels jenkins-master -fsroot /home/jenkins-slave -disableClientsUniqueId -deleteExistingClients
            Aug 15, 2017 7:11:55 PM hudson.plugins.swarm.Client main
            INFO: Client.main invoked with: [-mode exclusive -executors 8 -username jhoblitt -passwordEnvVariable JENKINS_PASSWORD -name jenkins-master -master http://jenkins-master:8080 -labels jenkins-master -fsroot /home/jenkins-slave -disableClientsUniqueId -deleteExistingClients]
            Aug 15, 2017 7:11:55 PM hudson.plugins.swarm.Client run
            INFO: Discovering Jenkins master
            Exception in thread "main" java.lang.NullPointerException
            	at hudson.plugins.swarm.SwarmClient.createHttpClient(SwarmClient.java:333)
            	at hudson.plugins.swarm.SwarmClient.discoverFromMasterUrl(SwarmClient.java:213)
            	at hudson.plugins.swarm.Client.run(Client.java:114)
            	at hudson.plugins.swarm.Client.main(Client.java:87)
            
            
            Show
            jhoblitt Joshua Hoblitt added a comment - I've got the same error with 3.4: [root@jenkins-master jenkins-slave]# /usr/bin/java -jar /home/jenkins-slave/swarm-client-3.4.jar -mode exclusive -executors 8 -username jhoblitt -passwordEnvVariable JENKINS_PASSWORD -name jenkins-master -master http: //jenkins-master:8080 -labels jenkins-master -fsroot /home/jenkins-slave -disableClientsUniqueId -deleteExistingClients Aug 15, 2017 7:11:55 PM hudson.plugins.swarm.Client main INFO: Client.main invoked with: [-mode exclusive -executors 8 -username jhoblitt -passwordEnvVariable JENKINS_PASSWORD -name jenkins-master -master http: //jenkins-master:8080 -labels jenkins-master -fsroot /home/jenkins-slave -disableClientsUniqueId -deleteExistingClients] Aug 15, 2017 7:11:55 PM hudson.plugins.swarm.Client run INFO: Discovering Jenkins master Exception in thread "main" java.lang.NullPointerException at hudson.plugins.swarm.SwarmClient.createHttpClient(SwarmClient.java:333) at hudson.plugins.swarm.SwarmClient.discoverFromMasterUrl(SwarmClient.java:213) at hudson.plugins.swarm.Client.run(Client.java:114) at hudson.plugins.swarm.Client.main(Client.java:87)
            Hide
            winotu Chris Z added a comment -

            https://github.com/jenkinsci/swarm-plugin/commit/e4ba66fe9f5ea6f7a917fad3963a9aeefb9b4f24

            Fix is already merged. But no new plugin release was done since that time.

            Show
            winotu Chris Z added a comment - https://github.com/jenkinsci/swarm-plugin/commit/e4ba66fe9f5ea6f7a917fad3963a9aeefb9b4f24 Fix is already merged. But no new plugin release was done since that time.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been released in Swarm Plugin/Client 3.6. Please reopen if you still see any issue.

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix has been released in Swarm Plugin/Client 3.6. Please reopen if you still see any issue.

              People

              • Assignee:
                winotu Chris Z
                Reporter:
                jlehtnie Jukka Lehtniemi
              • Votes:
                6 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: