[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2022-05-24 Thread Bryce Harrington
** 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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2022-04-06 Thread Simon Déziel
@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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2022-04-06 Thread Christian Ehrhardt 
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2021-12-16 Thread Miriam España Acebal
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2021-12-16 Thread Miriam España Acebal
** 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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2021-04-19 Thread Bryce Harrington
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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2020-07-02 Thread Steve Langasek
** 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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2020-05-29 Thread Alex
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2020-04-09 Thread Erik Quaeghebeur
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-29 Thread Launchpad Bug Tracker
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-21 Thread Thomas Ward
** 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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-21 Thread Thomas Ward
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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-06 Thread Thomas Ward
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-04 Thread Simon Déziel
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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-04 Thread Simon Déziel
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.

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-04 Thread Simon Déziel
@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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-03 Thread Andreas Hasenack
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.

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-06-03 Thread Andreas Hasenack
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.

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread TJ
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"

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread TJ
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 =

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Thomas Ward
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Simon Déziel
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 ●

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Ubuntu Foundations Team Bug Bot
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Thomas Ward
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Thomas Ward
** 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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread TJ
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread James
>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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Thomas Ward
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread Simon Déziel
** 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;

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-31 Thread James
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-06 Thread Andreas Hasenack
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-06 Thread Andreas Hasenack
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-06 Thread Andreas Hasenack
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.

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2019-05-06 Thread Andreas Hasenack
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2018-11-04 Thread Karl König
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2018-07-24 Thread Julian
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" >

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-12-15 Thread Bug Watch Updater
** 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 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-12-15 Thread Laurent Bigonville
** 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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-06-26 Thread John Navratil
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-06-26 Thread John Navratil
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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-06-15 Thread Thomas Ward
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-06-15 Thread Alex Badics
** 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:

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2017-06-15 Thread Alex Badics
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2016-10-16 Thread Simon Déziel
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.

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2016-10-16 Thread Hristian
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2016-06-03 Thread Thomas Ward
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2016-05-14 Thread Simon Déziel
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

[Bug 1581864] Re: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument

2016-05-14 Thread Simon Déziel
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