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

NullPointerException due to non-backwards compatibility in hudson.plugins.EC2.SlaveTemplate.

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.172, ec2-plugin master (likely as of 2f348aa519338aac64dd19954b0b41a62a8ea6fc)
    • Similar Issues:

      Description

      Upon upgrading the ec2-plugin to master and restarting Jenkins, the EC2 nodes begin to fail connecting with the following exception

       

       

      This is likely due to the recent change that allows configuring the strategy for determining the hostname/IP address of the node https://github.com/jenkinsci/ec2-plugin/pull/329.

      https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility suggests that it is necessary to define a readResolve() method when deprecating fields (in this case the boolean fields usePrivateDnsName connectUsingPublicIp) because when objects are loaded from XML their constructors are not invoked.

      What likely happened here, is that the newly defined connectionStrategy was null when loaded from XML, causing the hostname/IP address determination to fail at instance startup time.

       

      Matt Sicker
      Daniel Garzon

        Attachments

          Activity

          katsuya94 Adrien Tateno created issue -
          katsuya94 Adrien Tateno made changes -
          Field Original Value New Value
          Attachment Screen Shot 2019-05-07 at 9.23.19 AM.png [ 46980 ]
          katsuya94 Adrien Tateno made changes -
          Description Upon upgrading the ec2-plugin to master and restarting Jenkins, the EC2 nodes begin to fail connecting with the following exception

          {{!image-2019-05-07-10-52-22-920.png!}}

           

          This is likely due to the recent change that allows configuring the strategy for determining the hostname/IP address of the node [https://github.com/jenkinsci/ec2-plugin/pull/329].

          [https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility] suggests that it is necessary to define a {{readResolve()}} method when deprecating fields (in this case the boolean fields {{usePrivateDnsName connectUsingPublicIp}}) because when objects are loaded from XML their constructors are not invoked.

          What likely happened here, is that the newly defined {{connectionStrategy}} was null when loaded from XML, causing the hostname/IP address determination to fail at instance startup time.

           

          [~jvz]
          [~dgarzon]
          Upon upgrading the ec2-plugin to master and restarting Jenkins, the EC2 nodes begin to fail connecting with the following exception

           

          !Screen Shot 2019-05-07 at 9.23.19 AM.png|thumbnail!

           

          This is likely due to the recent change that allows configuring the strategy for determining the hostname/IP address of the node [https://github.com/jenkinsci/ec2-plugin/pull/329].

          [https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility] suggests that it is necessary to define a {{readResolve()}} method when deprecating fields (in this case the boolean fields {{usePrivateDnsName connectUsingPublicIp}}) because when objects are loaded from XML their constructors are not invoked.

          What likely happened here, is that the newly defined {{connectionStrategy}} was null when loaded from XML, causing the hostname/IP address determination to fail at instance startup time.

           

          [~jvz]
           [~dgarzon]
          katsuya94 Adrien Tateno made changes -
          Attachment image-2019-05-07-10-52-22-920.png [ 46979 ]
          katsuya94 Adrien Tateno made changes -
          Summary NullPointerException due to non-backwars compatibility in hudson.plugins.EC2.SlaveTemplate. NullPointerException due to non-backwards compatibility in hudson.plugins.EC2.SlaveTemplate.
          thoulen FABRIZIO MANFREDI made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          thoulen FABRIZIO MANFREDI added a comment -

          s one of the reason why the 1.43 wasn't released.

          Fix is ongoing with the pull request :

          https://github.com/jenkinsci/ec2-plugin/pull/347

          Show
          thoulen FABRIZIO MANFREDI added a comment - s one of the reason why the 1.43 wasn't released. Fix is ongoing with the pull request : https://github.com/jenkinsci/ec2-plugin/pull/347
          Hide
          thoulen FABRIZIO MANFREDI added a comment -

          Fix Released in 1.43

          Show
          thoulen FABRIZIO MANFREDI added a comment - Fix Released in 1.43
          thoulen FABRIZIO MANFREDI made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              thoulen FABRIZIO MANFREDI
              Reporter:
              katsuya94 Adrien Tateno
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: