jenkinsci / stapler

Stapler web framework
BSD 2-Clause "Simplified" License
163 stars 104 forks source link

Empty key in json when updating agent config #573

Closed badger451 closed 2 months ago

badger451 commented 2 months ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins/Controller is on Amazon Linux 2023. Agent/Slave is on Amazon Linux 2.

Reproduction steps

Agent is created via the "Amazon EC2 Plugin". After the agent is up and running, navigate to the node: https://XXX/computer/YYY/configure And enter a new "Description". Save.

Expected Results

New description is save.

Actual Results

UI shows the "Opps. A problem occurred while processing the request" error. Note, in the JSON that is being sent, the "Uptime" parameter key is an empty string. i.e. this bit:

"": [ "3 days 0 hr", "0" ],

Full log ...

2024-08-19 13:46:04.831+0000 [id=645501] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving https://XXX/computer/YYY/configSubmit org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class java.lang.Boolean at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:291) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:950) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:841) Caused: java.lang.IllegalArgumentException: Failed to instantiate class java.lang.Boolean from {"metadataEndpointEnabled":true,"metadataTokensRequired":true,"metadataHopsLimit":"3"} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:845) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:604) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:963) Caused: java.lang.IllegalArgumentException: Failed to convert the metadataSupported parameter of the constructor public hudson.plugins.ec2.EC2OndemandSlave(java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.util.List,java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String,java.lang.String,java.lang.String,java.util.List,java.lang.String,int,hudson.plugins.ec2.AMITypeData,hudson.plugins.ec2.ConnectionStrategy,int,hudson.plugins.ec2.Tenancy,java.lang.Boolean,java.lang.Boolean,java.lang.Integer,java.lang.Boolean) throws hudson.model.Descriptor$FormException,java.io.IOException at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:965) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:841) Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.EC2OndemandSlave from {"name":"EC2 (vdm.qa.auto-node-static) - vdm.qa.auto-node-static (i-00ae1b2c81dbc5637)","spotInstanceRequestId":"","cloudName":"vdm.qa.auto-node-static","templateDescription":"vdm.qa.auto-node-static","instanceId":"i-00ae1b2c81dbc5637","ec2Type":"On Demand","":["3 days 0 hr","0"],"publicDNS":"ZZZ.us-west-2.compute.amazonaws.com","privateDNS":"172.19.106.55","nodeDescription":"hello","numExecutors":"1","labelString":"vdm.qa.auto-node-static","mode":"EXCLUSIVE","initScript":"#!/bin/sh\n#get public ip\npublic_ip=$(curl https://ipinfo.io/ip)\n#change hostname\nhost_name=a$(echo ${public_ip} | sed 's/\.//g')\necho \"${host_name}.vdmdev.com\" > /etc/hostname\nhostname -F /etc/hostname\n#modify /etc/hosts\necho \"127.0.0.1 ${host_name}.vdmdev.com\" >> /etc/hosts\necho \"172.19.106.45 XXX\" >> /etc/hosts\nsudo yum -y install java-17-amazon-corretto\nunlink /etc/alternatives/java\nln -vs /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /etc/alternatives/java","remoteFS":"/home/jenkins","remoteAdmin":"jenkins","stopOnTerminate":false,"idleTerminationMinutes":"60","tags":[{"name":"jenkins_server_url","value":"https://XXX/"},{"name":"Name","value":"VDM_QA_AUTO_NODE"},{"name":"jenkins_slave_type","value":"demand_vdm.qa.auto-node-static"}],"usePrivateDnsName":false,"tenancy":"Default","amiType":{"rootCommandPrefix":"sudo","slaveCommandPrefix":"","slaveCommandSuffix":"","sshPort":"22","bootDelay":"","stapler-class":"hudson.plugins.ec2.UnixData","$class":"hudson.plugins.ec2.UnixData"},"maxTotalUses":"-1","nodeProperties":{"stapler-class-bag":"true"},"metadataSupported":{"metadataEndpointEnabled":true,"metadataTokensRequired":true,"metadataHopsLimit":"3"},"Submit":"","Jenkins-Crumb":"f254e1a74f30fe7089e4c82edbeb46d323353c106feddafe6b91a3fe48c36e5f"} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:845) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:604) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:599) at hudson.model.Descriptor.bindJSON(Descriptor.java:624) at hudson.model.Descriptor.newInstance(Descriptor.java:594) Caused: java.lang.LinkageError: Failed to instantiate class hudson.plugins.ec2.EC2OndemandSlave from {"name":"EC2 (vdm.qa.auto-node-static) - vdm.qa.auto-node-static (i-00ae1b2c81dbc5637)","spotInstanceRequestId":"","cloudName":"vdm.qa.auto-node-static","templateDescription":"vdm.qa.auto-node-static","instanceId":"i-00ae1b2c81dbc5637","ec2Type":"On Demand","":["3 days 0 hr","0"],"publicDNS":"ZZZ.us-west-2.compute.amazonaws.com","privateDNS":"172.19.106.55","nodeDescription":"hello","numExecutors":"1","labelString":"vdm.qa.auto-node-static","mode":"EXCLUSIVE","initScript":"#!/bin/sh\n#get public ip\npublic_ip=$(curl https://ipinfo.io/ip)\n#change hostname\nhost_name=a$(echo ${public_ip} | sed 's/\.//g')\necho \"${host_name}.vdmdev.com\" > /etc/hostname\nhostname -F /etc/hostname\n#modify /etc/hosts\necho \"127.0.0.1 ${host_name}.vdmdev.com\" >> /etc/hosts\necho \"172.19.106.45 XXX\" >> /etc/hosts\nsudo yum -y install java-17-amazon-corretto\nunlink /etc/alternatives/java\nln -vs /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /etc/alternatives/java","remoteFS":"/home/jenkins","remoteAdmin":"jenkins","stopOnTerminate":false,"idleTerminationMinutes":"60","tags":[{"name":"jenkins_server_url","value":"https://XXX/"},{"name":"Name","value":"VDM_QA_AUTO_NODE"},{"name":"jenkins_slave_type","value":"demand_vdm.qa.auto-node-static"}],"usePrivateDnsName":false,"tenancy":"Default","amiType":{"rootCommandPrefix":"sudo","slaveCommandPrefix":"","slaveCommandSuffix":"","sshPort":"22","bootDelay":"","stapler-class":"hudson.plugins.ec2.UnixData","$class":"hudson.plugins.ec2.UnixData"},"maxTotalUses":"-1","nodeProperties":{"stapler-class-bag":"true"},"metadataSupported":{"metadataEndpointEnabled":true,"metadataTokensRequired":true,"metadataHopsLimit":"3"},"Submit":"","Jenkins-Crumb":"f254e1a74f30fe7089e4c82edbeb46d323353c106feddafe6b91a3fe48c36e5f"} at hudson.model.Descriptor.newInstance(Descriptor.java:597) at hudson.model.Node.reconfigure(Node.java:587) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2AbstractSlave.reconfigure(EC2AbstractSlave.java:508) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2OndemandSlave.reconfigure(EC2OndemandSlave.java:143) at hudson.model.Computer.doConfigSubmit(Computer.java:1531) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:434) Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:438) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:447) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:37) at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48) at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:139) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:644) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:804) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:942) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:548) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:804) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:942) at org.kohsuke.stapler.MetaClass$2.doDispatch(MetaClass.java:244) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:804) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:942) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:725) at org.kohsuke.stapler.Stapler.service(Stapler.java:253) at Jenkins Main ClassLoader//javax.servlet.http.HttpServlet.service(HttpServlet.java:590) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:163) at PluginClassLoader for metrics//jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160) at jenkins.util.HttpServletFilter$1.doFilter(HttpServletFilter.java:76) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:166) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at jenkins.ErrorAttributeFilter.doFilter(ErrorAttributeFilter.java:29) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94) at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:110) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.UncaughtExceptionFilter.doFilter(UncaughtExceptionFilter.java:27) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:31) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) at Jenkins Main ClassLoader//org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:569) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) at Jenkins Main ClassLoader//org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) at Jenkins Main ClassLoader//org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at Jenkins Main ClassLoader//org.eclipse.jetty.server.Server.handle(Server.java:563) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287) at Jenkins Main ClassLoader//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at Jenkins Main ClassLoader//org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:558) at Jenkins Main ClassLoader//org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:379) at Jenkins Main ClassLoader//org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:146) at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at Jenkins Main ClassLoader//org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149) at java.base/java.lang.Thread.run(Thread.java:840) 2024-08-19 13:46:04.831+0000 [id=645501] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 6b5e835f-a37a-4d2d-8776-dc20d4be6a15 org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class java.lang.Boolean at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:291) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:950) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:841) Caused: java.lang.IllegalArgumentException: Failed to instantiate class java.lang.Boolean from {"metadataEndpointEnabled":true,"metadataTokensRequired":true,"metadataHopsLimit":"3"} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:845) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:604) at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:963) Caused: java.lang.IllegalArgumentException: Failed to convert the metadataSupported parameter of the constructor public hudson.plugins.ec2.EC2OndemandSlave(java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,hudson.model.Node$Mode,java.lang.String,java.lang.String,java.util.List,java.lang.String,java.lang.String,java.lang.String,boolean,java.lang.String,java.lang.String,java.lang.String,java.util.List,java.lang.String,int,hudson.plugins.ec2.AMITypeData,hudson.plugins.ec2.ConnectionStrategy,int,hudson.plugins.ec2.Tenancy,java.lang.Boolean,java.lang.Boolean,java.lang.Integer,java.lang.Boolean) throws hudson.model.Descriptor$FormException,java.io.IOException at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:965) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:841) Caused: java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.ec2.EC2OndemandSlave from {"name":"EC2 (vdm.qa.auto-node-static) - vdm.qa.auto-node-static (i-00ae1b2c81dbc5637)","spotInstanceRequestId":"","cloudName":"vdm.qa.auto-node-static","templateDescription":"vdm.qa.auto-node-static","instanceId":"i-00ae1b2c81dbc5637","ec2Type":"On Demand","":["3 days 0 hr","0"],"publicDNS":"ZZZ.us-west-2.compute.amazonaws.com","privateDNS":"172.19.106.55","nodeDescription":"hello","numExecutors":"1","labelString":"vdm.qa.auto-node-static","mode":"EXCLUSIVE","initScript":"#!/bin/sh\n#get public ip\npublic_ip=$(curl https://ipinfo.io/ip)\n#change hostname\nhost_name=a$(echo ${public_ip} | sed 's/\.//g')\necho \"${host_name}.vdmdev.com\" > /etc/hostname\nhostname -F /etc/hostname\n#modify /etc/hosts\necho \"127.0.0.1 ${host_name}.vdmdev.com\" >> /etc/hosts\necho \"172.19.106.45 XXX\" >> /etc/hosts\nsudo yum -y install java-17-amazon-corretto\nunlink /etc/alternatives/java\nln -vs /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /etc/alternatives/java","remoteFS":"/home/jenkins","remoteAdmin":"jenkins","stopOnTerminate":false,"idleTerminationMinutes":"60","tags":[{"name":"jenkins_server_url","value":"https://XXX/"},{"name":"Name","value":"VDM_QA_AUTO_NODE"},{"name":"jenkins_slave_type","value":"demand_vdm.qa.auto-node-static"}],"usePrivateDnsName":false,"tenancy":"Default","amiType":{"rootCommandPrefix":"sudo","slaveCommandPrefix":"","slaveCommandSuffix":"","sshPort":"22","bootDelay":"","stapler-class":"hudson.plugins.ec2.UnixData","$class":"hudson.plugins.ec2.UnixData"},"maxTotalUses":"-1","nodeProperties":{"stapler-class-bag":"true"},"metadataSupported":{"metadataEndpointEnabled":true,"metadataTokensRequired":true,"metadataHopsLimit":"3"},"Submit":"","Jenkins-Crumb":"f254e1a74f30fe7089e4c82edbeb46d323353c106feddafe6b91a3fe48c36e5f"} at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:845) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:604) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:599) at hudson.model.Descriptor.bindJSON(Descriptor.java:624) at hudson.model.Descriptor.newInstance(Descriptor.java:594) Caused: java.lang.LinkageError: Failed to instantiate class hudson.plugins.ec2.EC2OndemandSlave from {"name":"EC2 (vdm.qa.auto-node-static) - vdm.qa.auto-node-static (i-00ae1b2c81dbc5637)","spotInstanceRequestId":"","cloudName":"vdm.qa.auto-node-static","templateDescription":"vdm.qa.auto-node-static","instanceId":"i-00ae1b2c81dbc5637","ec2Type":"On Demand","":["3 days 0 hr","0"],"publicDNS":"ZZZ.us-west-2.compute.amazonaws.com","privateDNS":"172.19.106.55","nodeDescription":"hello","numExecutors":"1","labelString":"vdm.qa.auto-node-static","mode":"EXCLUSIVE","initScript":"#!/bin/sh\n#get public ip\npublic_ip=$(curl https://ipinfo.io/ip)\n#change hostname\nhost_name=a$(echo ${public_ip} | sed 's/\.//g')\necho \"${host_name}.vdmdev.com\" > /etc/hostname\nhostname -F /etc/hostname\n#modify /etc/hosts\necho \"127.0.0.1 ${host_name}.vdmdev.com\" >> /etc/hosts\necho \"172.19.106.45 XXX\" >> /etc/hosts\nsudo yum -y install java-17-amazon-corretto\nunlink /etc/alternatives/java\nln -vs /usr/lib/jvm/java-1.8.0-amazon-corretto/bin/java /etc/alternatives/java","remoteFS":"/home/jenkins","remoteAdmin":"jenkins","stopOnTerminate":false,"idleTerminationMinutes":"60","tags":[{"name":"jenkins_server_url","value":"https://XXX/"},{"name":"Name","value":"VDM_QA_AUTO_NODE"},{"name":"jenkins_slave_type","value":"demand_vdm.qa.auto-node-static"}],"usePrivateDnsName":false,"tenancy":"Default","amiType":{"rootCommandPrefix":"sudo","slaveCommandPrefix":"","slaveCommandSuffix":"","sshPort":"22","bootDelay":"","stapler-class":"hudson.plugins.ec2.UnixData","$class":"hudson.plugins.ec2.UnixData"},"maxTotalUses":"-1","nodeProperties":{"stapler-class-bag":"true"},"metadataSupported":{"metadataEndpointEnabled":true,"metadataTokensRequired":true,"metadataHopsLimit":"3"},"Submit":"","Jenkins-Crumb":"f254e1a74f30fe7089e4c82edbeb46d323353c106feddafe6b91a3fe48c36e5f"} at hudson.model.Descriptor.newInstance(Descriptor.java:597) at hudson.model.Node.reconfigure(Node.java:587) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2AbstractSlave.reconfigure(EC2AbstractSlave.java:508) at PluginClassLoader for ec2//hudson.plugins.ec2.EC2OndemandSlave.reconfigure(EC2OndemandSlave.java:143) at hudson.model.Computer.doConfigSubmit(Computer.java:1531) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:434) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:447) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:37) at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48) at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:139) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:644) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:804) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:855) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:942) at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:548) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:804) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:942) at org.kohsuke.stapler.MetaClass$2.doDispatch(MetaClass.java:244) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:804) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:942) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:725) at org.kohsuke.stapler.Stapler.service(Stapler.java:253) at Jenkins Main ClassLoader//javax.servlet.http.HttpServlet.service(HttpServlet.java:590) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:163) at PluginClassLoader for metrics//jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160) at jenkins.util.HttpServletFilter$1.doFilter(HttpServletFilter.java:76) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:166) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at jenkins.ErrorAttributeFilter.doFilter(ErrorAttributeFilter.java:29) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94) at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:110) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.UncaughtExceptionFilter.doFilter(UncaughtExceptionFilter.java:27) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:31) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131) at Jenkins Main ClassLoader//org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:569) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223) at Jenkins Main ClassLoader//org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) at Jenkins Main ClassLoader//org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) at Jenkins Main ClassLoader//org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822) at Jenkins Main ClassLoader//org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at Jenkins Main ClassLoader//org.eclipse.jetty.server.Server.handle(Server.java:563) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501) at Jenkins Main ClassLoader//org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287) at Jenkins Main ClassLoader//org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at Jenkins Main ClassLoader//org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:558) at Jenkins Main ClassLoader//org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:379) at Jenkins Main ClassLoader//org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:146) at Jenkins Main ClassLoader//org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at Jenkins Main ClassLoader//org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194) at Jenkins Main ClassLoader//org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149) at java.base/java.lang.Thread.run(Thread.java:840)

Note also that we are able to update the description via groovy without issue. snippet:

def aSlave = hudson.model.Hudson.instance.getNode(nodename) aSlave.setNodeDescription('hello');

Anything else?

Logging this issue under the Stapler section because that appears to be where the issue is from the stack trace but I am not sure if this is where the issue actually is.

Are you interested in contributing a fix?

No response

MarkEWaite commented 2 months ago

Thanks for reporting the issue @badger451 . I think that you'll be more likely to encourage a fix for the issue if you submit the issue report to the EC2 plugin issue tracker. This issue tracker is used for the web framework that Jenkins uses, while your report seems like it is specific to the EC2 plugin