• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • ec2-plugin

      When trying to create a Windows based EC2 agent using GUI I get an error in logs like this with the red-faced devilish Jenkins:

      Nov 13, 2023 11:46:18 AM WARNING hudson.init.impl.InstallUncaughtExceptionHandler handleExceptionCaught unhandled exception with ID 587af7ad-7f38-4b85-bac5-6d156cb4b35c
      java.lang.NullPointerException: Cannot invoke "hudson.model.Descriptor.newInstance(org.kohsuke.stapler.StaplerRequest, net.sf.json.JSONObject)" because the return value of "hudson.DescriptorExtensionList.find(String)" is null
      	at jenkins.agents.CloudSet.doDoCreate(CloudSet.java:243)
      	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
      	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:409)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:207)
      	at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:36)
      	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:140)
      	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:558)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      Caused: javax.servlet.ServletException
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:818)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
      	at org.kohsuke.stapler.MetaClass$2.doDispatch(MetaClass.java:224)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:59)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:698)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:248)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
      	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:163)
      	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
      	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
      	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:60)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
      	at 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 org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:154)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at 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 org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:569)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.Server.handle(Server.java:563)
      	at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
      	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
      	at java.base/java.lang.Thread.run(Thread.java:833) 

      I use the latest Jenkins LTS Docker image and latest EC2 plugin versions.

      Can you please provide a solution?

      Thanks!
      Darko

       

       

       

          [JENKINS-72316] EC2 plugin fails to create Windows node

          Mark Waite added a comment -

          Please provide the list of all plugins installed and their versions. You mentioned EC2 plugin 1648.vf3d852e00486, which is the most recent release but then also mentioned Amazon Web Services SDK :: IAM Version 1.12.529-406.vdeff15e5817d which is not the most recent release of that plugin. The EC2 plugin 1648.vf3d852e00486 depends on EC2 SDK 1.12.529-406.vdeff15e5817d but there may be unexpected results when an older version of other AWS SDK plugins like the IAM plugin are loaded.

          A system groovy script is provided in "How to report an issue" that makes it easy to generate the list of plugins and their versions in a format that can be used by others.

          Mark Waite added a comment - Please provide the list of all plugins installed and their versions. You mentioned EC2 plugin 1648.vf3d852e00486, which is the most recent release but then also mentioned Amazon Web Services SDK :: IAM Version 1.12.529-406.vdeff15e5817d which is not the most recent release of that plugin. The EC2 plugin 1648.vf3d852e00486 depends on EC2 SDK 1.12.529-406.vdeff15e5817d but there may be unexpected results when an older version of other AWS SDK plugins like the IAM plugin are loaded. A system groovy script is provided in "How to report an issue" that makes it easy to generate the list of plugins and their versions in a format that can be used by others.

          Darko added a comment - - edited

          Hi Mark,

          thanks for getting back!

          I've updated the used versions list as proposed and yes, indeed that IAM plugin is not at the latest, despite me updating the EC2 plugin itself.

          I'll update IAM too and see if hopefully gets better.

          Darko added a comment - - edited Hi Mark, thanks for getting back! I've updated the used versions list as proposed and yes, indeed that IAM plugin is not at the latest, despite me updating the EC2 plugin itself. I'll update IAM too and see if hopefully gets better.

          Darko added a comment -

          I've updated SDK IAM plugin to the latest, and alas, I still have the same issue.

          The version in the list above is updated.

          Darko added a comment - I've updated SDK IAM plugin to the latest, and alas, I still have the same issue. The version in the list above is updated.

          Mark Waite added a comment -

          Does the problem resolve itself if you downgrade the EC2 plugin from 1648.vf3d852e00486 to 1628.v6d7b_fc58b_a_1d ?

          I'd like to understand if this is a long-standing problem or if it is specific to the upgrade from 1628.v6d7b_fc58b_a_1d to 1648.vf3d852e00486

          Mark Waite added a comment - Does the problem resolve itself if you downgrade the EC2 plugin from 1648.vf3d852e00486 to 1628.v6d7b_fc58b_a_1d ? I'd like to understand if this is a long-standing problem or if it is specific to the upgrade from 1628.v6d7b_fc58b_a_1d to 1648.vf3d852e00486

          Darko added a comment -

          I'll try downgrading to various versions and report back.

          Seems there's no issues when creating a Linux cloud agent, but crashes for Windows one....

          Darko added a comment - I'll try downgrading to various versions and report back. Seems there's no issues when creating a Linux cloud agent, but crashes for Windows one....

          Darko added a comment - - edited

          I've tried on another LTS 2.414.3 instance with these plugin versions:

          Amazon EC2
          Version1609.v53b_02a_b_9e52d
          Amazon Web Services SDK :: EC2
          Version1.12.586-413.v6a_6c3a_420126
          
          AWS Credentials Plugin
          Version218.v1b_e9466ec5da_
          
          Amazon Web Services SDK :: EC2
          Version1.12.586-413.v6a_6c3a_420126
          
          Amazon Web Services SDK :: Minimal
          Version1.12.586-413.v6a_6c3a_420126
          

          As if there's some parameter from the cloud form not being passed to a constructor...
          I presume it would not allow me to save if a required param was not set

           

          Darko added a comment - - edited I've tried on another LTS 2.414.3 instance with these plugin versions: Amazon EC2 Version1609.v53b_02a_b_9e52d Amazon Web Services SDK :: EC2 Version1.12.586-413.v6a_6c3a_420126 AWS Credentials Plugin Version218.v1b_e9466ec5da_ Amazon Web Services SDK :: EC2 Version1.12.586-413.v6a_6c3a_420126 Amazon Web Services SDK :: Minimal Version1.12.586-413.v6a_6c3a_420126 As if there's some parameter from the cloud form not being passed to a constructor... I presume it would not allow me to save if a required param was not set  

          Mark Waite added a comment -

          Thanks for checking version 1609.v53b_02a_b_9e52d of the EC2 plugin teekwan. I assume that it failed in the same way as the 1628.v6d7b_fc58b_a_1d version. If that is correct, then the problem is not newly introduced in 1628.v6d7b_fc58b_a_1d.

          I would be very grateful if you could try another experiment, reverting the EC2 plugin to 1609.v53b_02a_b_9e52d and the AWS SDK plugin versions from 1.12.586-413.v6a_6c3a_420126 to 1.12.529-406.vdeff15e5817d. That SDK upgrade was needed in order to support new Amazon machine types, but may also have introduced an undetected incompatibility.

          Mark Waite added a comment - Thanks for checking version 1609.v53b_02a_b_9e52d of the EC2 plugin teekwan . I assume that it failed in the same way as the 1628.v6d7b_fc58b_a_1d version. If that is correct, then the problem is not newly introduced in 1628.v6d7b_fc58b_a_1d. I would be very grateful if you could try another experiment, reverting the EC2 plugin to 1609.v53b_02a_b_9e52d and the AWS SDK plugin versions from 1.12.586-413.v6a_6c3a_420126 to 1.12.529-406.vdeff15e5817d. That SDK upgrade was needed in order to support new Amazon machine types, but may also have introduced an undetected incompatibility.

          Darko added a comment -

          Hi Mark!

          Sorry to have kept you waiting, I don't recall getting a notification for your reply

          I'll check this a little later and get back to you!

          Thanks!

          Darko added a comment - Hi Mark! Sorry to have kept you waiting, I don't recall getting a notification for your reply I'll check this a little later and get back to you! Thanks!

          Darko added a comment -

          Hi markewaite ,

          I've tried using the versions you suggested:

          EC2 plugin 1609.v53b_02a_b_9e52d
          AWS SDK plugin versions 1.12.529-406.vdeff15e5817d (both)

          But it's the same

          BR
          Darko

          Darko added a comment - Hi markewaite , I've tried using the versions you suggested: EC2 plugin 1609.v53b_02a_b_9e52d AWS SDK plugin versions 1.12.529-406.vdeff15e5817d (both) But it's the same BR Darko

          Mark Waite added a comment -

          Thanks teekwan. That means that I did not introduce the issue with the changes that I made to update the version of AWS Java SDK that was included in the plugin. I'll leave it to the maintainers of the plugin to decide how to handle it.

          Mark Waite added a comment - Thanks teekwan . That means that I did not introduce the issue with the changes that I made to update the version of AWS Java SDK that was included in the plugin. I'll leave it to the maintainers of the plugin to decide how to handle it.

            Unassigned Unassigned
            teekwan Darko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: