Description
I noticed that nginx reports random Connection refuseds. Took a while to figure out:
My server is bound to ipv6 ([::1]), and the nginx config uses localhost for proxy_pass, which by default resolves to ::1, but sometimes (this may be related to server not responding fast enough up to about anything, I haven't debugged that part) it resolved to 127.0.0.1, which failed to connect.
I have defined $local_host set to '[::1]`, replaced all "localhost" refreences and the problems went away. You may or may not want to do the same.
Steps to reproduce
- bind server to ::1 only
- let
localhost resolve preferece to ipv6
- occasionally you may see connection fail to 127.0.0.1
Relevant logs
Expected behavior
No connection refused is nice. 😁
(sidenote, 2026.5 is not selectable version in this bug template!)
Which operating system are you using?
Linux/BSD/UNIX
What browsers are you seeing the problem on?
Mozilla Firefox
Extensions
NA
Version
Other
Description
I noticed that nginx reports random
Connection refuseds. Took a while to figure out:My server is bound to ipv6 ([::1]), and the nginx config uses
localhostforproxy_pass, which by default resolves to ::1, but sometimes (this may be related to server not responding fast enough up to about anything, I haven't debugged that part) it resolved to 127.0.0.1, which failed to connect.I have defined
$local_hostset to '[::1]`, replaced all "localhost" refreences and the problems went away. You may or may not want to do the same.Steps to reproduce
localhostresolve preferece to ipv6Relevant logs
Expected behavior
No connection refused is nice. 😁
(sidenote, 2026.5 is not selectable version in this bug template!)
Which operating system are you using?
Linux/BSD/UNIX
What browsers are you seeing the problem on?
Mozilla Firefox
Extensions
NA
Version
Other