User:Woozle/toot.cat/2018/05/20

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search
  • symptom: Main page came up, but with no toots. Some other pages would not respond at all.
  • cause:
    • Nginx wasn't starting, and the status returned by systemctl status nginx.service included the message bind() to [::]:443 failed (98: Address already in use).
    • This was in turn because of a small problem in /etc/nginx/sites-available/tootcat2.hypertwins.net.conf.

The lines of interest are:

server {
  listen 443 ssl;
  listen [::]:443 ssl ipv6only=on;

The last line was set to ipv6only=off. What that apparently means is that this line will try to listen on IPv4 as well – but the previous line already has nginx trying to listen on IPv4, so nginx fails when it tries to listen again on the same port. Specifying ipv6only=on tells it "this line means you're supposed to only listen on IPv6, so don't try anything else here.", resulting in nginx listening on both IPv4 and IPv6, which is what we want.

I don't know why it was even working before; maybe the behavior of nginx changed between versions.