Recently I migrated from Nexus 2 to Nexus 3.44.0-01, running directly on a Ubuntu 22.04 VM, not in a docker container.
Everything went fine for 2 days, yesterday I tried to fix a warning about maximum file descriptors by adding
nexus - nofile 65536
to /etc/security/limits.conf
and restarting the nexus service.
Now it doesn't start anymore, startup log ends with:
2022-12-29 16:39:01,301+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - Found ORIENTDB_ROOT_PASSWORD variable, using this value as root's password
2022-12-29 16:39:01,409+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.handler.OJMXPlugin - JMX plugin installed and active: profilerManaged=true
2022-12-29 16:39:01,412+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - OrientDB Studio available at $ANSI{blue http://localhost:2480/studio/index.html}
2022-12-29 16:39:01,413+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - $ANSI{green:italic OrientDB Server is active} v2.2.37 (build a7541e7ceeabf592dd9a7b2928b6c023cbc73193, branch 2.2.x).
2022-12-29 16:39:01,413+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl - OrientDB Studio has been deprecated and it's no longer available
2022-12-29 16:39:01,414+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl - Activated
2022-12-29 16:39:01,524+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Start RESTORE
2022-12-29 16:39:01,809+0100 INFO [ForkJoinPool.commonPool-worker-1] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - Storage 'plocal:/opt/nexus3/sonatype-work/nexus3/db/config' is opened under OrientDB distribution : 2.2.37 (build a7541e7ceeabf592dd9a7b2928b6c023cbc73193, branch 2.2.x)
2022-12-29 16:39:01,812+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - Storage 'plocal:/opt/nexus3/sonatype-work/nexus3/db/component' is opened under OrientDB distribution : 2.2.37 (build a7541e7ceeabf592dd9a7b2928b6c023cbc73193, branch 2.2.x)
2022-12-29 16:39:02,368+0100 INFO [ForkJoinPool.commonPool-worker-2] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - Storage 'plocal:/opt/nexus3/sonatype-work/nexus3/db/security' is opened under OrientDB distribution : 2.2.37 (build a7541e7ceeabf592dd9a7b2928b6c023cbc73193, branch 2.2.x)
2022-12-29 16:39:02,509+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Start UPGRADE
2022-12-29 16:39:02,866+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Start SCHEMAS
2022-12-29 16:39:02,867+0100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.orient.internal.status.OrientStatusHealthCheckStore - Failed transition: NEW -> STARTED
java.lang.NullPointerException: null
at org.sonatype.nexus.orient.internal.status.OrientStatusHealthCheckStore.doStart(OrientStatusHealthCheckStore.java:71)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:69)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:319)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:216)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1597)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:823)
2022-12-29 16:39:02,869+0100 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
java.lang.NullPointerException: null
at org.sonatype.nexus.orient.internal.status.OrientStatusHealthCheckStore.doStart(OrientStatusHealthCheckStore.java:71)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:69)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:319)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:216)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1597)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:823)
2022-12-29 16:39:02,871+0100 ERROR [FelixStartLevel] *SYSTEM Felix - Framework listener delivery error.
java.lang.NullPointerException: null
at org.sonatype.nexus.orient.internal.status.OrientStatusHealthCheckStore.doStart(OrientStatusHealthCheckStore.java:71)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:69)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:199)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:111)
at org.sonatype.nexus.extender.NexusContextListener.moveToPhase(NexusContextListener.java:319)
at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:216)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1597)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:823)
2022-12-29 16:39:02,892+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Uptime: 15 seconds and 66 milliseconds (nexus-oss-edition/3.44.0.01)
2022-12-29 16:39:02,892+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Shutting down
2022-12-29 16:39:02,893+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop UPGRADE
2022-12-29 16:39:02,894+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop RESTORE
2022-12-29 16:39:02,894+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop STORAGE
2022-12-29 16:39:02,896+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - OrientDB Server is shutting down...
2022-12-29 16:39:02,896+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - Shutting down protocols
2022-12-29 16:39:02,897+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.plugin.OServerPluginManager - Shutting down plugins:
2022-12-29 16:39:02,898+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.server.plugin.OServerPluginManager - - jmx
2022-12-29 16:39:02,898+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl$1 - OrientDB Server shutdown complete
2022-12-29 16:39:02,899+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - Orient Engine is shutting down...
2022-12-29 16:39:02,900+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: component...
2022-12-29 16:39:02,971+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: security...
2022-12-29 16:39:02,997+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: config...
2022-12-29 16:39:03,062+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - - shutdown storage: OSystem...
2022-12-29 16:39:03,200+0100 INFO [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.Orient - OrientDB Engine shutdown complete
2022-12-29 16:39:03,203+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.orient.DatabaseServerImpl - Shutdown
2022-12-29 16:39:03,204+0100 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop KERNEL
First i thought it was a database problem and followed the steps mentionend https://stackoverflow.com/questions/51776568/sonotype-nexus-repository-orientdb-cant-connect-to-database?noredirect=1&lq=1 here, but it didn't change anything.
I also noticed some maven-related exceptions like these:
2022-12-29 16:38:51,466+0100 ERROR [FelixStartLevel] *SYSTEM org.apache.karaf.features.internal.service.BootFeaturesInstaller - Error installing boot feature repository mvn:com.sonatype.nexus.assemblies/nexus-flags-feature/3.44.0-01/xml/features
java.lang.RuntimeException: Error resolving artifact com.sonatype.nexus.assemblies:nexus-flags-feature:xml:features:3.44.0-01: [Could not find artifact com.sonatype.nexus.assemblies:nexus-flags-feature:xml:features:3.44.0-01 in central (https://repo1.maven.org/maven2/)] : mvn:com.sonatype.nexus.assemblies/nexus-flags-feature/3.44.0-01/xml/features
at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:121)
at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51)
at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:386)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.addRepository(FeaturesServiceImpl.java:381)
at org.apache.karaf.features.internal.service.BootFeaturesInstaller.addRepositories(BootFeaturesInstaller.java:118)
at org.apache.karaf.features.internal.service.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:87)
at org.apache.karaf.features.internal.service.BootFeaturesInstaller.start(BootFeaturesInstaller.java:81)
at org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:214)
at org.apache.karaf.util.tracker.BaseActivator.start(BaseActivator.java:92)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:823)
Caused by: java.io.IOException: Error resolving artifact com.sonatype.nexus.assemblies:nexus-flags-feature:xml:features:3.44.0-01: [Could not find artifact com.sonatype.nexus.assemblies:nexus-flags-feature:xml:features:3.44.0-01 in central (https://repo1.maven.org/maven2/)]
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.configureIOException(AetherBasedResolver.java:803)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:774)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555)
at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123)
at java.net.URL.openStream(URL.java:1068)
at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114)
... 15 common frames omitted
Suppressed: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact com.sonatype.nexus.assemblies:nexus-flags-feature:xml:features:3.44.0-01 in central (https://repo1.maven.org/maven2/)
at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:48)
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:368)
at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:642)
at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:262)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:489)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:390)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192)
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767)
... 22 common frames omitted
Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact com.sonatype.nexus.assemblies:nexus-flags-feature:xml:features:3.44.0-01
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:413)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:215)
at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:192)
at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:247)
at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767)
... 22 common frames omitted
2022-12-29 16:38:51,494+0100 WARN [FelixStartLevel] *SYSTEM org.ops4j.pax.url.mvn.internal.AetherBasedResolver - Error resolving artifact com.sonatype.nexus:nexus-pro-edition:xml:features:3.44.0-01: [Could not find artifact com.sonatype.nexus:nexus-pro-edition:xml:features:3.44.0-01 in central (https://repo1.maven.org/maven2/)]
earlier in the log, but I don't suspect they have something to do with nexus not starting?
I just downloaded nexus-3.45.0-01 and somehow it starts up again, so it seems the old installation was somehow corrupted.