Re: duplicate listen options for backlog directive for ip:80 and ip:443 pairs ?

2019-06-01 Thread George
I see. Thanks Maxim for the clarification. Much appreciated :)

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,284368,284402#msg-284402

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: duplicate listen options for backlog directive for ip:80 and ip:443 pairs ?

2019-06-01 Thread Maxim Dounin
Hello!

On Fri, May 31, 2019 at 03:15:18AM -0400, George wrote:

> I am trying to troubleshoot a duplicate listen options error that only
> happens on one server and not the other.
> 
> From docs at http://nginx.org/en/docs/http/ngx_http_core_module.html backlog
> listen directive works for each ip:port pair so I should be able to set
> backlog directive on listen directive once on port 80 and once on port 443.
> But on one server I am not able to and can't see where the problem is coming
> from ? How shall I debug this ?

[...]

> --- not working ---
> Now on another Nginx 1.17.0 server I have 3 nginx vhosts but nginx restarts
> complain of duplicate listen options once I add vhost 3 and the error is
> related for vhost 2's listen directive
> 
> nginx: [emerg] duplicate listen options for 0.0.0.0:443 in
> /path/to/vhost2/vhost
> 
> vhost 1
> listen 80 default_server backlog=4095 reuseport fastopen=256;
> 
> vhost 2
> listen 443 ssl http2 reuseport;
> 
> vhost 3
> listen 443 ssl http2 backlog=4095;
> 
> if i remove vhost 3 backlog=4095 directive there's no error though ?

Both

   listen 443 ssl http2 reuseport;

and

   listen 443 ssl http2 backlog=4095;

specify listening socket options, "reuseport" and "backlog=4095".  
Socket options are only allowed to be specified once for a given 
listening socket, and nginx complains as you try to specify time 
twice.  You have to specify both on a single "listen" directive.

> Now if I reverse it so backlog=4095 is set in vhost 2 and not vhost 3, then
> it works and nginx doesn't complain of errors ? No idea why that is the case
> or if it's a bug ?
> 
> vhost 2
> listen 443 ssl http2 reuseport backlog=4095;
> 
> vhost 3
> listen 443 ssl http2;

That's exactly how it is expected to work.

-- 
Maxim Dounin
http://mdounin.ru/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


duplicate listen options for backlog directive for ip:80 and ip:443 pairs ?

2019-05-31 Thread George
I am trying to troubleshoot a duplicate listen options error that only
happens on one server and not the other.

>From docs at http://nginx.org/en/docs/http/ngx_http_core_module.html backlog
listen directive works for each ip:port pair so I should be able to set
backlog directive on listen directive once on port 80 and once on port 443.
But on one server I am not able to and can't see where the problem is coming
from ? How shall I debug this ?

--- working ---
On working Nginx 1.17.0 server I have 2 nginx vhosts that set backlog
properly and have not problems

vhost 1
listen 80 default_server backlog=2048 reuseport fastopen=256;

vhost 2
listen 443 ssl http2 reuseport backlog=2048;

--- not working ---
Now on another Nginx 1.17.0 server I have 3 nginx vhosts but nginx restarts
complain of duplicate listen options once I add vhost 3 and the error is
related for vhost 2's listen directive

nginx: [emerg] duplicate listen options for 0.0.0.0:443 in
/path/to/vhost2/vhost

vhost 1
listen 80 default_server backlog=4095 reuseport fastopen=256;

vhost 2
listen 443 ssl http2 reuseport;

vhost 3
listen 443 ssl http2 backlog=4095;

if i remove vhost 3 backlog=4095 directive there's no error though ?

--- working ---

Now if I reverse it so backlog=4095 is set in vhost 2 and not vhost 3, then
it works and nginx doesn't complain of errors ? No idea why that is the case
or if it's a bug ?

vhost 2
listen 443 ssl http2 reuseport backlog=4095;

vhost 3
listen 443 ssl http2;

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,284368,284368#msg-284368

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx