1

I'm having a service (Sonatype's Nexus) which failed to init since it PID folder (/var/run/nexus) was deleted.

Any idea how that folder can be deleted? The nexus service, when gracefully stopped, does not remove the folder but only the pid file.

I'm using Ubuntu.

2 Answers 2

1

If you type:

$ df -hT | grep /var/run
none         tmpfs    3.9G   84K  3.9G   1% /var/run

you can see it is a tmpfs (temporary file system). This means all its contents will be removed after reboot.

To solve you problem, you can create the needed directory in the startup script, or create the pid file directly under /var/run.

1

Let me guess, this is the first reboot after you installed the service? If so, the PID directory didn't get deleted, per se -- rather, the directory that the PID directory lives in is a RAM disk, which gets unceremoniously wiped at each boot.

An Ubuntu-compliant init script is required to create any directory under /var/run that it needs in order to operate. Since, presumably, the init script for the service you want to run isn't doing that, you'll need to modify it yourself. It's (usually) as simple as adding mkdir /var/run/nexus to the top of the init script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .