I’m trying to run a Sonatype Nexus under the custom nexus user, because they recommend not running it not under the root user. I’m on an Amazon Linux 2 EC2 machine and it ran previously successfully under the root user.
I’ve added the nexus user and changed directory rights:
$ systemctl daemon-reload
$ systemctl enable nexus
$ systemctl start nexus
$ systemctl status nexus
...
nexus[5838]: Starting nexus
systemd[1]: Started nexus service.
systemd[1]: nexus.service: main process exited, code=exited, status=255/n/a
nexus[6030]: Shutting down nexus
nexus[6030]: nexus is not running.
systemd[1]: Unit nexus.service entered failed state.
systemd[1]: nexus.service failed.
Nothing is happening. Same thing If switch to the nexus user and try to start it in that account. In the logs of the nexus service (tail -f /opt/sonatype-work/nexus3/log/nexus.log )nothing is happening. The systemd logs do not give a clue.
Where can I look what is actually happening and preventing my Sonatype Nexus to start?
I was able to fix it The problem was that the root folder containing the folders which the nexus program needed to work also need to have the nexus user as owner. This is my working install script:
Thank you so much for this @mles !! I couldn’t figure out why my service wasn’t starting after upgrade and this fixed it - changing permissions under my nexus and sonatype-work directories to the nexus user. Worked like a charm!