** Tags added: packaging
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
argument
To manage notifications about
@paelzer, you made me revisit this and I can confirm that Focal+ is
fixed, only Bionic is still affected.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read
Planning to have a look as part of next cycles merge.
** Tags removed: server-todo
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file
Hi,
I'm closing the Xenial task because it reached EOSS (End of Standard
Support) so I'm afraid it can't be fixed (and this is not a security
bug).
The bug is still present in Bionic because it is the only supported
series without the patch (nginx-fix-pidfile.patch).
I found a discussion here
** Changed in: nginx (Ubuntu Xenial)
Status: Confirmed => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid:
Cosmic is out of support, closing the task.
** Changed in: nginx (Ubuntu Cosmic)
Status: Confirmed => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service:
** Changed in: nginx (Ubuntu Disco)
Status: Confirmed => Won't Fix
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid:
I've just encountered the same issue in CentOS 8 and nginx/1.19.0. The
workaround helped, though it's a placebo.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed
Has the patch been proposed upstream? If so, do you have a link to the
report? If not, is that still the plan?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to
This bug was fixed in the package nginx - 1.16.0-0ubuntu2
---
nginx (1.16.0-0ubuntu2) eoan; urgency=medium
* d/patches/nginx-fix-pidfile.patch: Fix NGINX PIDfile handling to avoid
SystemD race condition - thanks to Tj for the patch. (LP: #1581864)
-- Thomas Ward Tue, 04
** Changed in: nginx (Ubuntu Eoan)
Status: Confirmed => Fix Committed
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid:
I've uploaded this as a distro-patch for Eoan currently, because I
haven't heard any complaints from those who've been testing this.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
Everyone affected: Please test the PPA builds, they contain fixes for
Xenial, Bionic, Cosmic, Disco, and Eoan.
If this works for all of the releases, I can consider SRU this specific
patch as a distro-specific patch for NGINX here.
--
You received this bug notification because you are a member
I tested the PPA build for Eoan (1.16.0-0ubuntu2p1) and it works as
well.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid:
I tested the PPA build for Bionic (1.14.0-0ubuntu1.3p1) and it works!
systemd never looses track of the main daemon even through 'service
nginx upgrade' cycles.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
@ahasenack, yes the only problem is the error message due to the bad
ordering in PID handling. I think the plan is to test TJ's patch via PPA
build to get the green light for upstream submission.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed
If this is just about the error message in the logs, such an intrusive
patch sounds overkill unless included upstream. Can you perhaps propose
it there?
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
If this is just about the error message in the logs, such an intrusive
patch sounds overkill unless included upstream. Can you perhaps propose
it there?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
The previous patch (v2) had a problem when the server reloaded. Because
fork() wasn't done the tell-tale child_pid (-3) got passed to the PID
file! This version should avoid that.
** Patch added: "Bring PID creation into parent process v3"
I've developed and tested a different approach. More invasive and
probably not something upstream will like the look of!
The approach is to have ngx_daemon() not do the parent process exit()
after fork() but to return the child PID. The parent process detects
that (a value > 0), sets ngx_pid =
Due to failure, the patch has been removed from the bug, but remains in
the PPA.
** Patch removed: "Bring PID creation into parent process"
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864/+attachment/5268127/+files/nginx-pid-race.patch
** Tags removed: patch
--
You received
I tested the PPA build for Bionic (1.14.0-0ubuntu1.3) and it does not
work:
# start nginx in background (as it hangs):
$ sudo systemctl start nginx &
# the parent PID is written to the PIDFile:
$ cat /run/nginx.pid
807
# eventually systemctl start fails and status:
$ systemctl status nginx
●
The attachment "Bring PID creation into parent process" seems to be a
patch. If it isn't, please remove the "patch" flag from the attachment,
remove the "patch" tag, and if you are a member of the ~ubuntu-
reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad
Thanks for the patch, TJ.
Builds including the patch are currently being run in a testing PPA,
located here:
https://launchpad.net/~teward/+archive/ubuntu/nginx-lp1581864
I do not have an ETA on build completion at this time, but feel free to
check that PPA for builds. Once builds are complete
** Also affects: nginx (Ubuntu Disco)
Importance: Undecided
Status: New
** Also affects: nginx (Ubuntu Xenial)
Importance: Undecided
Status: New
** Also affects: nginx (Ubuntu Eoan)
Importance: Low
Assignee: Thomas Ward (teward)
Status: Confirmed
** Also
This may be a viable workaround.
For a systemd Type=fork unit 'success' is determined when the parent
process exits. At this time systemd expects the PIDFile to exist. nginx
actually creates the PID file in the forked process.
Presumably on single CPU systems there is a sufficient delay in
>From a replicate perspective:
This was on a EC2 t2.micro with AWS 21.2 Ubuntu Deep Learning AMI that is
16.04, then installing nginx. The error only occurred when running a
python+flask+uwsgi service. e.g. a simple https/http server
server {
listen 443 ssl http2;
listen
Can anyone confirm this affects the other LTSes and releases as well?
It's in my list of things to 'triage' currently and address but I need
confirmations on which releases it works in (and I have not been able to
replicate as-is even in containers or VMs).
--
You received this bug notification
** Description changed:
+ [Description]
+
Nginx logs an error when started on a machine with a single CPU:
systemctl start nginx
systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
-Loaded: loaded (/lib/systemd/system/nginx.service;
Because sudo can be different in some systems, this worked best for me:
# Fix for Nginx PID problem in Ubuntu 16.04 in an EC2 instance
sudo systemctl stop nginx
sudo mkdir /etc/systemd/system/nginx.service.d
# build the file in root where no sudo is needed
printf
and same in eoan, just confirmed.
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
argument
To manage
and same in eoan, just confirmed.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
argument
To manage
I checked and this is still happening across the board: xenial, bionic,
disco. Didn't check eoan yet, which has a new major version (1.16.0), my
eoan cloud image is still downloading.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
I checked and this is still happening across the board: xenial, bionic,
disco. Didn't check eoan yet, which has a new major version (1.16.0), my
eoan cloud image is still downloading.
--
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to the bug
Thank you, Simon! The workaround worked for me as well.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
argument
Thank you!!! Simon Déziel (sdeziel) wrote on 2016-05-14:#3
"In the above workaround, I forgot the first step (mkdir) so here it is
again:
Workaround:
mkdir /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" >
** Changed in: nginx (Debian)
Status: Unknown => New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
** Bug watch added: Debian Bug tracker #876365
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876365
** Changed in: nginx (Debian)
Importance: Undecided => Unknown
** Changed in: nginx (Debian)
Status: New => Unknown
** Changed in: nginx (Debian)
Remote watch: None => Debian
Edit to previous comment. It's an R-Pi 2 B+
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid: Invalid
argument
To manage
I'm seeing this on a Raspberry Pi Model 3 running Raspbian
uname -a:Linux www 4.9.24+ #993 Wed Apr 26 17:56:54 BST 2017 armv6l
GNU/Linux
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
FYI: If we don't have this being a confirmed issue in Debian, and we
don't have a bug report up in Debian, ***please do not add a Debian task
for this***. I just checked the Debian bug tracker and this is not
reported up in Debian.
Has anyone confirmed this is also an issue in Debian?
--
You
** Also affects: nginx (Debian)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1581864
Title:
nginx.service: Failed to read PID from file /run/nginx.pid:
Hi,
We are also affected, and I've looked into the source. In main(), the
ngx_create_pidfile() gets called right after the ngx_daemon() function.
ngx_daemon of course forks, and the parent process exits immediately
with exit(0). This is a pure race condition between nginx and systemd.
This is
Hi Hristian, the string after the ">" char should be on a single line so
that printf's output is directed to the file
/etc/systemd/system/nginx.service.d/override.conf.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
Oct 16 12:11:48 xxx systemd[1]: Starting A high performance web server and a
reverse proxy server...
Oct 16 12:11:48 xxx systemd[1]: nginx.service: Failed to read PID from file
/run/nginx.pid: Invalid argument
Oct 16 12:11:48 xxx systemd[1]: Started A high performance web server and a
reverse
Confirmed on Xenial, with 1-CPU systems, that there may be such a race
condition.
Given that the process still starts, I'm marking this as Low.
** Changed in: nginx (Ubuntu)
Importance: Undecided => Low
** Changed in: nginx (Ubuntu)
Status: New => Confirmed
** Changed in: nginx
In the above workaround, I forgot the first step (mkdir) so here it is
again:
Workaround:
mkdir /etc/systemd/system/nginx.service.d
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" >
/etc/systemd/system/nginx.service.d/override.conf
systemctl daemon-reload
--
You received this bug
It seems to be a race between systemd and nginx. As if systemd was
expecting the PID file to be populated before nginx had the time to
create it.
Workaround:
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" >
/etc/systemd/system/nginx.service.d/override.conf
systemctl daemon-reload
--
You
48 matches
Mail list logo