Can't open PID file (yet?) after start: Operation not permitted
Unsolved
Technical Support
-
I am trying to set the service using the following file
[Unit] Description=NodeBB Documentation=https://docs.nodebb.org After=system.slice multi-user.target postgresql.service [Service] Type=forking User=nodebb StandardOutput=syslog StandardError=syslog SyslogIdentifier=nodebb Environment=NODE_ENV=production WorkingDirectory=/var/www/html/nodebb PIDFile=/var/www/html/nodebb/pidfile ExecStart=/usr/bin/env node loader.js Restart=always [Install] WantedBy=multi-user.target
Nodebb starts alright but I keep seeing this error in the service status.
nodebb.service: Can't open PID file /var/www/html/nodebb/pidfile (yet?) after start: Operation not permitted
The permissions of the pidfile are as follows.
-rw-r--r-- 1 nodebb nodebb 5 Sep 11 13:12 /var/www/html/nodebb/pidfile
I am trying to run on Ubuntu 22.04 server. Can you guide me on how to go about fixing this?
-
@navjotjsingh does the account you are running the service under have permissions to access the PID file location?
-
@navjotjsingh Are you able to successfully start and stop NodeBB via
systemctl
?If so, then you can safely ignore that error. It usually means systemd didn't wait long enough before checking if the pidfile was created. Systemd usually checks again in a short while (but won't report it as it's not an error once it finds the file)
Copyright © 2024 NodeBB | Contributors