[JIRA] [amazon-ecs-plugin] (JENKINS-35392) ec2 plugin throws NoClassDefFoundError - HttpContext

2 views
Skip to first unread message

tonylixu@gmail.com (JIRA)

unread,
Jun 6, 2016, 3:14:01 PM6/6/16
to jenkinsc...@googlegroups.com
Tony Xu created an issue
 
Jenkins / Bug JENKINS-35392
ec2 plugin throws NoClassDefFoundError - HttpContext
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: amazon-ecs-plugin
Created: 2016/Jun/06 7:13 PM
Environment: Amazon instance type: c4.xlarge
OS: Amazon Linux AMI release 2016.03
Jenkins version: Jenkins ver. 2.7
Labels: plugin
Priority: Major Major
Reporter: Tony Xu

Installed a brand new Jekins ver. 2.7 on a AWS c4.xlarge instance. Installed Amazon EC2 plugin 1.33. EC2 plugin started throwing errors when try to add "Amazon EC2 Crendentials".

Add "Access Key ID" is fine, but as soon as I input something into "Secret Access Key" field, errors show up.

I double checked the "/var/lib/jenkins/plugins/ec2/WEB-INF/lib/", httpclient-4.4.jar and httpcore-4.4.jar do exist.

Please suggest how to fix this error.

Stack trace:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/apache/http/protocol/HttpContext
	at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:136)
	at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:120)
	at com.amazonaws.services.ec2.AmazonEC2Client.<init>(AmazonEC2Client.java:135)
	at com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl$DescriptorImpl.doCheckSecretKey(AWSCredentialsImpl.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	... 60 more
Caused by: java.lang.ClassNotFoundException: org.apache.http.protocol.HttpContext
	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 74 more
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

tonylixu@gmail.com (JIRA)

unread,
Jun 22, 2016, 10:41:02 AM6/22/16
to jenkinsc...@googlegroups.com
Tony Xu resolved as Fixed
 

After a jenkins process restart, the issue magically gone away.

Change By: Tony Xu
Status: Open Resolved
Resolution: Fixed
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

philip.shapiro@claritasgenomics.com (JIRA)

unread,
Dec 16, 2016, 1:49:02 PM12/16/16
to jenkinsc...@googlegroups.com
Phil Shapiro reopened an issue
 

We are seeing this exact stack crawl trying to use the EC2 plugin in our Jenkins install. We had previously used the plugin without error, but are now seeing the problem. In our case we have an existing Jenkins install (1.654) that we are replacing with 2.35. We are using EC2 plugin 1.36.

Our process is:

  • copy current jenkins install and home directory to test server
  • overwrite jenkins install and settings files to update plugins, jenkins .war, and job config.xml files
  • start up jenkins
  • everything works fine, we can launch AMIs, etc
  • restart jenkins
  • can no longer start AMIs, instead get NoClassDefFoundError

We've tried restarting as suggested in this ticket but it doesn't help. The problem seems to be related to some jenkins configuration file but many have been changed so we don't know where to start.

Change By: Phil Shapiro
Resolution: Fixed
Status: Resolved Reopened

philip.shapiro@claritasgenomics.com (JIRA)

unread,
Dec 16, 2016, 1:50:02 PM12/16/16
to jenkinsc...@googlegroups.com
We are seeing this exact stack crawl trying to use the EC2 plugin in our Jenkins install. We had previously used the plugin without error, but are now seeing the problem. In our case we have an existing Jenkins install (1.654) that we are replacing with 2.35. We are using EC2 plugin 1.36.

Our process is:
- copy current jenkins install and home directory to test server
- overwrite jenkins install and settings files to update plugins, jenkins .war, and job config.xml files
- start up jenkins
- everything works fine, we can launch AMIs, etc
- restart jenkins
-
ERROR => we can no longer start AMIs, instead get NoClassDefFoundError


We've tried restarting as suggested in this ticket but it doesn't help. The problem seems to be related to some jenkins configuration file but many have been changed so we don't know where to start.

philip.shapiro@claritasgenomics.com (JIRA)

unread,
Dec 16, 2016, 1:57:03 PM12/16/16
to jenkinsc...@googlegroups.com
Phil Shapiro resolved as Fixed
 
Change By: Phil Shapiro
Status: Reopened Resolved
Resolution: Fixed

philip.shapiro@claritasgenomics.com (JIRA)

unread,
Dec 16, 2016, 1:57:03 PM12/16/16
to jenkinsc...@googlegroups.com
Phil Shapiro commented on Bug JENKINS-35392
 
Re: ec2 plugin throws NoClassDefFoundError - HttpContext

We noticed that many plugins were out of date, so I updated all the plugins and the error went away, even after restarting.

Reply all
Reply to author
Forward
0 new messages