[NEXUS-5108] Task creation not possible after upgrade from 1.9.2 to 2.0.5 Created: 06/22/12  Updated: 06/25/12  Resolved: 06/25/12

Status: Closed
Project: Dev - Nexus Repo
Component/s: Scheduled Tasks
Affects Version/s: 2.0.5
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Beat Strasser Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu Server Linux, 64bit, Java(TM) SE Runtime Environment (build 1.6.0_26-b03), Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode), Nexus 2.0.5


Attachments: XML File jetty-dual-ports-with-ssl.xml     File plexus-jetty7-1.2.1.jar    
Issue Links:
Relates
is related to NEXUS-4983 Redirect jetty.xml example under "con... Closed
Last Updated By: Rich Seddon
Date of First Response:

 Description   

I've upgraded my nexus from version 1.9.2 to 2.0.5. Now I can't add anymore scheduled tasks. I always get a 500 server error as admin user (see below).

Currently, I've 6 remove snapshots tasks and one empty trash task (added in nexus 1.9.2).

2012-06-22 09:26:06 INFO [tp2015322662-75] - org.sonatype.nexus.error.reporting.DefaultErrorReportingManager - Detected Error in Nexus: Could not create task of typeOptimizeIndexTask. Skipping problem report generation because reporting is not enabled
2012-06-22 09:26:06 ERROR [tp2015322662-75] - org.sonatype.nexus.rest.NexusApplication - Unhandled exception or error intercepted
java.lang.IllegalArgumentException: Could not create task of typeOptimizeIndexTask
at org.sonatype.scheduling.DefaultTaskConfigManager.createTaskInstance(DefaultTaskConfigManager.java:272) ~[nexus-app-2.0.5.jar:na]
at org.sonatype.scheduling.DefaultScheduler.createTaskInstance(DefaultScheduler.java:139) ~[plexus-task-scheduler-1.6.0.jar:na]
at org.sonatype.nexus.scheduling.DefaultNexusScheduler.createTaskInstance(DefaultNexusScheduler.java:126) ~[nexus-app-2.0.5.jar:na]
at org.sonatype.nexus.rest.schedules.AbstractScheduledServicePlexusResource.getModelNexusTask(AbstractScheduledServicePlexusResource.java:304) ~[nexus-rest-api-2.0.5.jar:na]
at org.sonatype.nexus.rest.schedules.ScheduledServiceListPlexusResource.post(ScheduledServiceListPlexusResource.java:211) ~[nexus-rest-api-2.0.5.jar:na]
at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:294) ~[plexus-restlet-bridge-1.20.jar:na]
at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:71) ~[nexus-rest-api-2.0.5.jar:na]
at org.restlet.resource.Resource.post(Resource.java:688) ~[org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.resource.Resource.handlePost(Resource.java:537) ~[org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Finder.handle(Finder.java:357) ~[org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Router.handle(Router.java:504) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Router.handle(Router.java:504) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:39) ~[plexus-restlet-bridge-1.20.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) ~[com.noelios.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) [com.noelios.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) [com.noelios.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Application.handle(Application.java:341) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Router.handle(Router.java:504) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Router.handle(Router.java:504) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.doHandle(Filter.java:150) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Filter.handle(Filter.java:195) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) [com.noelios.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Component.handle(Component.java:673) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at org.restlet.Server.handle(Server.java:331) [org.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) [com.noelios.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) [com.noelios.restlet-1.1.6-SONATYPE-5348-V4.jar:na]
at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) [com.noelios.restlet.ext.servlet-1.1.6-SONATYPE-5348-V4.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [servlet-api-2.5.jar:2.5]
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:278) [guice-servlet-3.1.1.jar:na]
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:268) [guice-servlet-3.1.1.jar:na]
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180) [guice-servlet-3.1.1.jar:na]
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93) [guice-servlet-3.1.1.jar:na]
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:84) [guice-servlet-3.1.1.jar:na]
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) [guice-servlet-3.1.1.jar:na]
at org.sonatype.nexus.web.NexusGuiceFilter$MultiFilterChain.doFilter(NexusGuiceFilter.java:88) [nexus-web-utils-2.0.5.jar:na]
at org.sonatype.nexus.web.NexusGuiceFilter$MultiFilterPipeline.dispatch(NexusGuiceFilter.java:58) [nexus-web-utils-2.0.5.jar:na]
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:126) [guice-servlet-3.1.1.jar:na]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331) [jetty-servlet-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.1.0.jar:1.1.0]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.1.0.jar:1.1.0]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344) [shiro-core-1.1.0.jar:1.1.0]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272) [shiro-web-1.1.0.jar:na]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) [shiro-web-1.1.0.jar:na]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331) [jetty-servlet-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477) [jetty-servlet-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524) [jetty-security-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) [jetty-servlet-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:312) [jetty-rewrite-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.Server.handle(Server.java:349) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857) [jetty-http-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) [jetty-http-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77) [jetty-server-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:191) [jetty-io-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609) [jetty-io-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45) [jetty-io-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599) [jetty-util-7.6.2.v20120308.jar:7.6.2.v20120308]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534) [jetty-util-7.6.2.v20120308.jar:7.6.2.v20120308]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_26]
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.sonatype.nexus.scheduling.NexusTask
roleHint: OptimizeIndexTask
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:257) ~[sisu-inject-plexus-2.3.0.jar:na]
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245) ~[sisu-inject-plexus-2.3.0.jar:na]
at org.sonatype.scheduling.DefaultTaskConfigManager.createTaskInstance(DefaultTaskConfigManager.java:266) ~[nexus-app-2.0.5.jar:na]
... 101 common frames omitted
Caused by: java.util.NoSuchElementException: null
at org.sonatype.guice.bean.locators.LocatedBeans$Itr.next(LocatedBeans.java:142) ~[sisu-inject-bean-2.3.0.jar:na]
at org.sonatype.guice.bean.locators.LocatedBeans$Itr.next(LocatedBeans.java:77) ~[sisu-inject-bean-2.3.0.jar:na]
at org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:60) ~[sisu-inject-plexus-2.3.0.jar:na]
at org.sonatype.guice.plexus.locators.DefaultPlexusBeans$Itr.next(DefaultPlexusBeans.java:48) ~[sisu-inject-plexus-2.3.0.jar:na]
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253) ~[sisu-inject-plexus-2.3.0.jar:na]
... 103 common frames omitted



 Comments   
Comment by Rich Seddon [ 06/22/12 ]

The nexus installation looks corrupt. How did you perform the upgrade?

Comment by Beat Strasser [ 06/22/12 ]
  • Stopped the Nexus 1.9.2 in /opt/nexus-1.9.2
  • Unpacked Nexus 2.5.2 to /opt/nexus-2.0.5.
  • Added the needed configuration stuff to wrapper.conf, jetty.xml and wrapper-nexus-script in /opt/nexus-2.0.5. (Config points to the existing sonatype-work folder).
  • Removed the entire sonatype-work/nexus/timeline folder (as recommended in upgrade notes).
  • Relinked init-script to /opt/nexus-2.0.5/bin/nexus.
  • Started Nexus.
  • Timeline hasn't been created, so I've created an empty timeline folder. But although users are deploying artifacts to nexus, no files are getting written in the timeline folder. Note that I get a 404 when I'd like to see the system feeds in the UI (see also nexus-user mailing list).

I've upgraded my Nexus many times for a lot of versions (since 1.0.1?).

Comment by Rich Seddon [ 06/22/12 ]

What does your jetty.xml look like? We moved to version 7.0, and a lot of things changed.

Also, what changes did you make to the wrapper.conf?

Comment by Beat Strasser [ 06/22/12 ]

I use a config from the examples: jetty-dual-ports-with-ssl.xml (except ssl passwords).

nexus/bin/nexus script addition
JAVA_HOME="/usr/lib/jvm/java-6-sun"
NEXUS_HOME="/opt/nexus"
RUN_AS_USER="nexus"
PIDDIR="/var/run/nexus"
mkdir -p $PIDDIR
chown nexus:nexus $PIDDIR
nexus.properties
application-port=8080
application-port-ssl=8443
application-port-ssl-redirect=443
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/
nexus-work=/home/nexus/sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
pr.encryptor.publicKeyPath=/apr/public-key.txt
Comment by Rich Seddon [ 06/22/12 ]

If you could also file a problem report (under help/report problem) that would be helpful.

Comment by Beat Strasser [ 06/22/12 ]

Thanks a lot for your help! See PR-3814.

Comment by Rich Seddon [ 06/22/12 ]

Thanks for filing the problem report, from that I was able to see that no plugins are being loaded in your Nexus instance.

This is similar to NEXUS-4983, this is another file that got neglected during the Jetty 7 upgrade.

I'm attaching a version of jetty-dual-ports-with-ssl.xml that works with Nexus 2.

You'll also need to drop the attached plexus-jetty7-1.2.1.jar file in "$

{nexus_root}

/lib" for this to work.

Sorry about all the trouble on this, we'll get the docs and examples fixed in the soon to be released 2.1 version of Nexus.

Comment by Beat Strasser [ 06/23/12 ]

Whooaa, this looks a lot different now! Thanks a lot!

I only had to use your jetty file. The plexus-jetty jar you provided had no difference to the installed one.

Comment by Rich Seddon [ 06/25/12 ]

Thanks for the update, glad to hear it's working. It was getting late on Friday when I wrote this up, for some reason I thought the plexus-jetty jar wasn't there.

Generated at Fri Aug 17 15:11:20 UTC 2018 using JIRA 7.3.3#73014-sha1:d5be8da522213be2ca9ad7b043c51da6e4cc9754.