Score:0

Nginx is working but : nginx.service: Can't open PID file on debian 10

de flag

I'm using nginx 1.20.1 on Debian 10, it's working but on command systemctl status nginx this is shown:

systemd[1]: Starting nginx - high performance web server...
systemd[1]: nginx.service: Can't open PID file /run/nginx.pid (yet?) after start: No such file or d
systemd[1]: Started nginx - high performance web server.

I googled alot and checked permission of related folders of address /var/usr/nginx.pid and checked the address to be the same in both /etc/nginx/nginx.conf and /usr/lib/systemd/system/nginx.service , and good to say that nginx.pid is created when nginx is running and it is deleted when I stop nginx. I tried using /usr/nginx.pid in .conf and .service but the same problem exists. In my error.log, no error or warning is logged. Also should mention that it's a fresh VM machine|debian and a fresh nginx! With no extra modification to default nginx.conf !

Question: should I have notice Can't open PID file /run/nginx.pid (yet?) after start: No such file or d ? If it is important how could I resolve it?

Michael Hampton avatar
cz flag
Why did you change the PID file location?
djdomi avatar
za flag
ehm, /run exists on debian, have you deleted it? however, don't change things that you don't understand
ehsan_kabiri_33 avatar
de flag
I encountered the message `Can't open PID file` on fresh nginx, with no config and default settings, so I started to modify things ..
Score:0
de flag

When I changed Number of CPUs of my virtual machine form 1 to more than 1, the problem solved (more than 2 days engaging). It was not a problem !! it was just a message on the screen 'Can't open PID file` and nothing in the log file and nginx working truely! But this message maybe is a bug according to this refrence : bugs.launchpad.ne

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.