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

No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ec2-plugin
    • Labels:
      None
    • Environment:
      Jenkins v2.204.6
      ec2-plugin: v1.50.3
    • Similar Issues:

      Description

      After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

      java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
      at java.base/java.lang.Enum.valueOf(Enum.java:240)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
      at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
      Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
      at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
      at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
      Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

      ...

      "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":{"stapler-class-bag":"true"}}
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

       

      If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.

       

      what's happening:

      on first submit it's sending the value "PRIVATE_IP", but when it loads the configuration page after the initial save it picks up the value "Private IP" which it can't translate back to PRIVATE_IP.

       

      same thing happens with https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/HostKeyVerificationStrategyEnum.java

       

      looking at https://github.com/jenkinsci/ec2-plugin/blob/da14631cc9406d8d5dae5dd25ecfe5d642b86679/src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly#L192 it looks like it needs to be updated to match something more like https://github.com/svanoort/workflow-multibranch-plugin/blob/66d5b9be3bec7fac6daed71e90217a8da868ba5a/src/main/resources/org/jenkinsci/plugins/workflow/multibranch/DurabilityHintBranchProperty/config.jelly

        Attachments

          Activity

          randomvoids Kyle L created issue -
          randomvoids Kyle L made changes -
          Field Original Value New Value
          Description After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

          java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
           at java.base/java.lang.Enum.valueOf(Enum.java:240)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
           at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
          Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
           at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
          Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

          ...

          "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":\{"stapler-class-bag":"true"}}
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

           

          If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.
          After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

          java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
           at java.base/java.lang.Enum.valueOf(Enum.java:240)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
           at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
           Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
           at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
           Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

          ...

          "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":\{"stapler-class-bag":"true"}}
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

           

          If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.

           

          what's happening:

          on first submit it's sending the value "PRIVATE_IP", but when it loads the configuration page after the initial save it picks up the value "Private IP" which it can't translate back to PRIVATE_IP.
          randomvoids Kyle L made changes -
          Description After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

          java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
           at java.base/java.lang.Enum.valueOf(Enum.java:240)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
           at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
           Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
           at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
           Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

          ...

          "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":\{"stapler-class-bag":"true"}}
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

           

          If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.

           

          what's happening:

          on first submit it's sending the value "PRIVATE_IP", but when it loads the configuration page after the initial save it picks up the value "Private IP" which it can't translate back to PRIVATE_IP.
          After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

          java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
           at java.base/java.lang.Enum.valueOf(Enum.java:240)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
           at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
           Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
           at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
           Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

          ...

          "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":\{"stapler-class-bag":"true"}}
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

           

          If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.

           

          what's happening:

          on first submit it's sending the value "PRIVATE_IP", but when it loads the configuration page after the initial save it picks up the value "Private IP" which it can't translate back to PRIVATE_IP.

           

          same thing happens with https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/HostKeyVerificationStrategyEnum.java
          randomvoids Kyle L made changes -
          Description After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

          java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
           at java.base/java.lang.Enum.valueOf(Enum.java:240)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
           at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
           Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
           at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
           Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

          ...

          "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":\{"stapler-class-bag":"true"}}
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

           

          If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.

           

          what's happening:

          on first submit it's sending the value "PRIVATE_IP", but when it loads the configuration page after the initial save it picks up the value "Private IP" which it can't translate back to PRIVATE_IP.

           

          same thing happens with https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/HostKeyVerificationStrategyEnum.java
          After saving a config with ec2 cloud instances configured, if I close the configuration page, go back, and try to make changes I get

          java.lang.IllegalArgumentException: No enum constant hudson.plugins.ec2.ConnectionStrategy.Private IP
           at java.base/java.lang.Enum.valueOf(Enum.java:240)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:733)
           at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:778)
           Caused: java.lang.IllegalArgumentException: Failed to convert the connectionStrategy parameter of the constructor public hudson.plugins.ec2.SlaveTemplate(java.lang.String,java.lang.String,hudson.plugins.ec2.SpotConfiguration,java.lang.String,java.lang.String,com.amazonaws.services.ec2.model.InstanceType,boolean,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,hudson.plugins.ec2.AMITypeData,java.lang.String,boolean,java.lang.String,java.util.List,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,boolean,hudson.plugins.ec2.ConnectionStrategy,int,java.util.List,hudson.plugins.ec2.HostKeyVerificationStrategyEnum)
           at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:780)
           at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
           Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.SlaveTemplate from {"description"

          ...

          "associatePublicIp":false,"connectionStrategy":"Private IP","connectBySSHProcess":false,"hostKeyVerificationStrategy":"CHECK_NEW_SOFT","maxTotalUses":"100","nodeProperties":\{"stapler-class-bag":"true"}}
           at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:681)

           

          If I delete all of the configs I can recreate them, but I can't edit them once I close out of the configuration page.

           

          what's happening:

          on first submit it's sending the value "PRIVATE_IP", but when it loads the configuration page after the initial save it picks up the value "Private IP" which it can't translate back to PRIVATE_IP.

           

          same thing happens with [https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/HostKeyVerificationStrategyEnum.java]

           

          looking at [https://github.com/jenkinsci/ec2-plugin/blob/da14631cc9406d8d5dae5dd25ecfe5d642b86679/src/main/resources/hudson/plugins/ec2/SlaveTemplate/config.jelly#L192] it looks like it needs to be updated to match something more like [https://github.com/svanoort/workflow-multibranch-plugin/blob/66d5b9be3bec7fac6daed71e90217a8da868ba5a/src/main/resources/org/jenkinsci/plugins/workflow/multibranch/DurabilityHintBranchProperty/config.jelly]
          raihaan Raihaan Shouhell made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]

            People

            Assignee:
            thoulen FABRIZIO MANFREDI
            Reporter:
            randomvoids Kyle L
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: