sonatype / docker-nexus

Docker image for Sonatype Nexus
Other
383 stars 201 forks source link

"can't connect to nexus" / stale lockfile #44

Open rmoriz opened 7 years ago

rmoriz commented 7 years ago

When the container is stopped, the lockfile sometimes seems not to get removed and causes nexus to not start again properly. Someone has to delete the nexus.lock file manually each time. IMHO nexus needs to remove the logfile on a docker stop and (even better) ignore/remove stale lock files on startup.

BruceZu commented 7 years ago

I run into this issue too. I provide NFS persistent storage for Nexus OSS 2 running in Kubernetes. It works fine. But when I test it by kill the pod, its deployment recreate the container again and failed. from the log it say:

2017-01-18 19:04:03,003+0000 WARN  [jetty-main-1] *SYSTEM org.sonatype.nexus.util.LockFile - Failed to write lock file
java.io.FileNotFoundException: /sonatype-work/nexus.lock (Permission denied)
....
java.lang.IllegalStateException: Nexus work directory already in use: /sonatype-work

I find that nexus.lock file and delete it, then delete the pod and let nexus deployment recreate it but the issue is still there.

liuggio commented 7 years ago

Same problem here.

zikphil commented 6 years ago

Same issue

Eugenio-Liso commented 6 years ago

I'm here for the same reason

Ivan-Igorevich commented 4 years ago

is there a solution for removing lockfile in the container?