Description of problem: Looks like there is a race between /run/nginx.pid being written during startup and systemd reading it. Version-Release number of selected component (if applicable): nginx-1.18.0-1.fc32.x86_64 How reproducible: always, might depend on fast storage Steps to Reproduce: 1. install nginx/setup some basic config, e.g. one without any server blocks 2. systemctl restart nginx 3. systemctl status nginx Actual results: ● nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2020-08-15 15:13:50 UTC; 20s ago Process: 73329 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS) Process: 73330 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS) Process: 73331 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS) Main PID: 73332 (nginx) Tasks: 2 (limit: 2344) Memory: 2.6M CPU: 30ms CGroup: /system.slice/nginx.service ├─73332 nginx: master process /usr/sbin/nginx └─73333 nginx: worker process Aug 15 15:13:50 example.org systemd[1]: Starting The nginx HTTP and reverse proxy server... Aug 15 15:13:50 example.org nginx[73330]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok Aug 15 15:13:50 example.org nginx[73330]: nginx: configuration file /etc/nginx/nginx.conf test is successful Aug 15 15:13:50 example.org systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument Aug 15 15:13:50 example.org systemd[1]: Started The nginx HTTP and reverse proxy server Expected results: Similar status output but without this error: Aug 15 15:13:50 example.org systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument Additional info: Googling for this yields quite a few reports from nginx Ubuntu users and some seem to work around this with a service override that adds a small sleep to the startup ...
PS: The PID file is there and looks plausible - after another restart: cat /run/nginx.pid 73368 ps -e | grep $(cat /run/nginx.pid) 73368 ? 00:00:00 nginx Can also reproduce this with a `systemctl stop` `stystemctl start` sequence.
FEDORA-2021-c0243589ee has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-c0243589ee
FEDORA-2021-0d3d0559f7 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-0d3d0559f7
FEDORA-2021-2cf5ad411d has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-2cf5ad411d
FEDORA-2021-c0243589ee has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-c0243589ee` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-c0243589ee See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-10c1cd4cba has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-10c1cd4cba
FEDORA-2021-1556d440ba has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-1556d440ba
FEDORA-2021-3aa9ac7fd1 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3aa9ac7fd1
FEDORA-2021-1556d440ba has been pushed to the Fedora 32 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-1556d440ba` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-1556d440ba See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-10c1cd4cba has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-10c1cd4cba` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-10c1cd4cba See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-3aa9ac7fd1 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3aa9ac7fd1` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3aa9ac7fd1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-10c1cd4cba has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-1556d440ba has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-3aa9ac7fd1 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.