Welcome! Log In Create A New Profile

Advanced

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

May 31, 2019 03:15AM
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;
Subject Author Posted

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

George May 31, 2019 03:15AM

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

Maxim Dounin June 01, 2019 10:50AM

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

George June 01, 2019 03:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 207
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready