Bug#821111: nginx: Failure to remove socket due to Debian's method of stopping

2021-03-19 Thread 吳宇萱/土撥鼠(Lisbeth Wu)
According to the nginx changelog, it's been fixed in 1.19.1

part of changelog http://nginx.org/en/CHANGES

Changes with nginx 1.19.107 Jul 2020

*) Change: the "lingering_close", "lingering_time", and
   "lingering_timeout" directives now work when using HTTP/2.

*) Change: now extra data sent by a backend are always discarded.

*) Change: now after receiving a too short response from a FastCGI
   server nginx tries to send the available part of the response to the
   client, and then closes the client connection.

*) Change: now after receiving a response with incorrect length from a
   gRPC backend nginx stops response processing with an error.

*) Feature: the "min_free" parameter of the "proxy_cache_path",
   "fastcgi_cache_path", "scgi_cache_path", and "uwsgi_cache_path"
   directives.
   Thanks to Adam Bambuch.
**) Bugfix: nginx did not delete unix domain listen sockets during
graceful shutdown on the SIGQUIT signal. *The last one which is indicate to the 
bug related
**

-- 

吳宇萱 / Lisbeth Wu (土撥鼠)
m...@liswu.me
https://liswu.me



Bug#821111: nginx: Failure to remove socket due to Debian's method of stopping

2019-07-04 Thread Andreas Kirbach
On Sat, 15 Dec 2018 23:03:27 -0600 James Renken 
wrote:
> This bug is still present for me in version 1.14.1-1~bpo9+1.
I can confirm this as well; nginx 1.14.1-1~bpo9+1 does not restart
properly as sockets are not removed upon stop and nginx complains that
the address is already in use when restarting.
-- 
Andreas Kirbach
Technischer Leiter

forumhome GmbH & Co. KG
Bruchstr. 54a
67098 Bad Dürkheim
Tel.: +49-6322-91 995-15
Fax:  +49-6322-91 995-19

akirb...@forumhome.com
www.forumhome.com

Sitz der Gesellschaft: Bad Dürkheim
Handelsregister: Ludwigshafen/ Rhein HRA 60968
USt-Id: DE 285 908 418
Persönlich haftende Gesellschafterin: OSV OnlineService Verwaltungs GmbH

OSV OnlineService-Verwaltungs GmbH
Sitz der Gesellschaft: Bad Dürkheim
Handelsregister: Ludwigshafen/ Rhein HRB 63178
Geschäftsführer: Carsten Grentrup

--
--
Forumhome sucht Praktikanten im Bereich Online-Marketing, Webdesign und
Webbasierte Softwareentwicklung!
Interesse? Informieren Sie sich unter
http://de.forumhome.com/content/10-jobs und schicken Sie uns Ihre
Bewerbungsunterlagen an j...@forumhome.com
Wir freuen uns auf Sie!
--
--

Diese E-Mail enthält vertrauliche oder rechtlich geschützte Informationen.
Wenn Sie nicht der beabsichtigte Empfänger oder dessen Vertreter sind,
informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail.
Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der
enthaltenen Informationen ist nicht gestattet.

The information contained in this message is confidential or protected
by law. If you are not the intended recipient, please contact the sender
and delete this message.
Any unauthorised copying of this message or unauthorised distribution of
the information contained herein is prohibited.

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus



Bug#821111: nginx: Failure to remove socket due to Debian's method of stopping

2018-12-15 Thread James Renken
This bug is still present for me in version 1.14.1-1~bpo9+1.



Bug#821111: nginx: Failure to remove socket due to Debian's method of stopping

2018-02-01 Thread James Renken
SIGQUITs are still being sent, and sockets are not being cleaned up, as of 
1.10.3-1+deb9u1 and 1.13.3-1~bpo9+1.


Bug#821111: nginx: Failure to remove socket due to Debian's method of stopping

2016-04-15 Thread micah anderson
Package: nginx
Version: 1.9.10-1
Severity: normal
Tags: patch

Hello,

It turns out that the way that Debian implements stopping nginx is by
sending it, through the start-stop-daemon's --retry option a SIGQUIT to
nginx, which is interpreted by nginx as a "gradeful shutdown", but it
turns out is not very clean way to shutdown, and nginx developers think
that nobody should be doing this[0]. The other stop method is the
SIGTERM, which is what they are expecting people to send to shutdown
nginx and it properly cleans up the sockets.


If you configure nginx to use a unix socket for a listener, then when
you restart, or stop and then start, nginx, it will fail to start
because it will not clean up the listening socket because it was stopped
with the 'SIGQUIT' method[1][2].

Additionally, in version 1.6.2-3 of the package upload this changelog
entry appears:

 * debian/nginx-common.nginx.init:  
  
+ Gracefully stop nginx by default, we are switcing to a configurable   
   
  STOP/5/TERM/5/KILL/5 schedule. We are now in sync with the systemd
   
  service file. (Closes: #762708)

However, the initscript and the systemd service file are *not* in
sync. The systemd service file has just '--retry QUIT/5' and the
initscript has 'QUIT/5/TERM/5/KILL/5', so these are most definitely not
in sync.

I've attached patches that syncs these up, and has them do a SIGTERM
instead of a SIGQUIT because it appears to be more "graceful" and will
properly clean up sockets.

micah

0. https://trac.nginx.org/nginx/ticket/753#comment:5
1. https://trac.nginx.org/nginx/ticket/753 and
2. https://trac.nginx.org/nginx/ticket/952).

--- /tmp/nginx	2016-04-15 12:07:29.634756281 -0400
+++ /etc/init.d/nginx	2016-01-26 13:12:14.0 -0500
@@ -20,7 +20,7 @@
 	. /etc/default/nginx
 fi
 
-STOP_SCHEDULE="${STOP_SCHEDULE:-TERM/5/QUIT/5/KILL/5}"
+STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/5/KILL/5}"
 
 test -x $DAEMON || exit 0
 
--- /tmp/nginx.service	2016-04-15 12:07:12.135245311 -0400
+++ /lib/systemd/system/nginx.service	2016-01-26 13:12:14.0 -0500
@@ -20,7 +20,7 @@
 ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
 ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
 ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
-ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry TERM/5/QUIT/5/KILL/5 --pidfile /run/nginx.pid
+ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid
 TimeoutStopSec=5
 KillMode=mixed
 

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


signature.asc
Description: PGP signature