klo2k / nexus3-docker

ARM Docker image of Sonatype Nexus Repository Manager (NXRM) (Raspberry Pis - armv7l, aarch64)
GNU General Public License v3.0
109 stars 39 forks source link

klo2k/nexus3 could not run on an AWS ARM EC2 instance #24

Closed thehenrylam closed 9 months ago

thehenrylam commented 9 months ago

Hello, I would like to ask for a bit of assistance on setting up the nexus3 docker on AWS EC2 (aarch64)

This is what I have done:

  1. Set up an AWS EC2 instance (Ubuntu 22.04.3 LTS, t4g.micro, access to port 80/443/8081, otherwise its all standard settings)
  2. In EC2 instance: Install Docker
  3. In EC2 instance: sudo docker run -d -p 8081:8081 --name nexus klo2k/nexus3

These are the symptoms: This is what happened when I executed sudo docker ps -a after around a minute:

CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS                        PORTS     NAMES
1d2f53f17d9a   klo2k/nexus3   "/opt/sonatype/nexus…"   54 seconds ago   Exited (137) 34 seconds ago             nexus

I have also included the execution of the docker logs retrieval below: sudo docker logs nexus klo2k-nexus.log

I have tried looking into the logs myself, and I find that its very sparse when it comes to ERROR messages. These are the closest things that I see could indicate an issue:

...
2023-11-02 03:14:43,341+0000 INFO  [FelixStartLevel] *SYSTEM org.sonatype.nexus.pax.logging.NexusLogActivator - start
2023-11-02 03:14:43,575+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.log)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.log.cfg
2023-11-02 03:14:43,581+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=jmx.acl)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/jmx.acl.cfg
2023-11-02 03:14:43,591+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.pax.url.mvn)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.ops4j.pax.url.mvn.cfg
2023-11-02 03:14:43,602+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.features)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.features.cfg
2023-11-02 03:14:43,610+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.felix.fileinstall~deploy)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.felix.fileinstall-deploy.cfg
2023-11-02 03:14:43,616+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=profile)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/profile.cfg
2023-11-02 03:14:43,621+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.kar)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.kar.cfg
2023-11-02 03:14:43,627+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.shell)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.shell.cfg
2023-11-02 03:14:43,633+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.service.acl.command)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.service.acl.command.cfg
2023-11-02 03:14:43,638+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.management)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.management.cfg
2023-11-02 03:14:43,644+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.ops4j.pax.logging)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.ops4j.pax.logging.cfg
2023-11-02 03:14:43,649+0000 WARN  [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.karaf.jaas)] *SYSTEM org.apache.felix.fileinstall - File is not writeable: file:/opt/sonatype/nexus/etc/karaf/org.apache.karaf.jaas.cfg
2023-11-02 03:14:43,991+0000 INFO  [FelixStartLevel] *SYSTEM org.sonatype.nexus.features.internal.FeaturesWrapper - Fast FeaturesService starting
...
2023-11-02 03:14:45,962+0000 WARN  [FelixStartLevel] *SYSTEM uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4JInitialiser - Your logging framework class org.ops4j.pax.logging.slf4j.Slf4jLogger is not known - if it needs access to the standard println methods on the console you will need to register it by calling registerLoggingSystemPackage
...

Other than that, I don't really have anything else to go off of.

Please let me know if you have any questions.

Thanks in advance, Henry

klo2k commented 9 months ago

Thanks for the log - perhaps wait another 2 minutes? - On my Pi it takes another 2 minutes to fully start-up from your last point in log.

You'll (eventually) see this message when it's ready:

2023-11-05 10:46:36,245+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@4c5b14a6{Sonatype Nexus,/,file:///opt/sonatype/nexus/public/,AVAILABLE}
2023-11-05 10:46:36,727+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@309f3497{HTTP/1.1, (http/1.1)}{0.0.0.0:8081}
2023-11-05 10:46:36,730+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - Started @152685ms
2023-11-05 10:46:36,732+0000 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - 
-------------------------------------------------

Started Sonatype Nexus OSS 3.61.0-02

-------------------------------------------------
2023-11-05 10:46:36,762+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@45b9d86a{HTTP/1.1, (http/1.1)}{0.0.0.0:5001}
2023-11-05 10:46:36,781+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@15b04527{HTTP/1.1, (http/1.1)}{0.0.0.0:5000}

A full start on Pi 4 takes about 2-2.5 minutes - not sure how t4g.micro compares in terms of performance.