[solved] Change ip 6 address

Discussion in 'Installation/Configuration' started by AxelssonDesign, Sep 1, 2019.

  1. Hello,
    After upgrade to HFC my nginx server don't start up:

    Last login: Sun Sep 1 17:38:08 2019 from 185.103.211.34
    root@web:~# systemctl restart nginx
    Job for nginx.service failed because the control process exited with error code.
    See "systemctl status nginx.service" and "journalctl -xe" for details.
    root@web:~# systemctl status nginx.service
    ● nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sun 2019-09-01 17:42:58 UTC; 18s ago
    Docs: man:nginx(8)
    Process: 1091 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

    Sep 01 17:42:58 web.zix.is systemd[1]: Starting A high performance web server and a reverse proxy server...
    Sep 01 17:42:58 web.zix.is nginx[1091]: nginx: [emerg] bind() to [2001:19f0:6c01:413:5400:ff:fe6a:a0e5]:443 failed (99: Cannot assign
    Sep 01 17:42:58 web.zix.is nginx[1091]: nginx: configuration file /etc/nginx/nginx.conf test failed
    Sep 01 17:42:58 web.zix.is systemd[1]: nginx.service: Control process exited, code=exited status=1
    Sep 01 17:42:58 web.zix.is systemd[1]: Failed to start A high performance web server and a reverse proxy server.
    Sep 01 17:42:58 web.zix.is systemd[1]: nginx.service: Unit entered failed state.
    Sep 01 17:42:58 web.zix.is systemd[1]: nginx.service: Failed with result 'exit-code'.
    How can I fix ?
     
  2. Steini86

    Steini86 Active Member

    Looks like nginx cannot bind to the desired IPv6 address. The case could be that the system does not know, which interface has this address. My computer thinks, the IP of web.zix.is is "2001:19f0:6c01:16d0:5400:2ff:fe3e:94cf", which is a different one.
    What is the output of "ip -6 addr"?
    Does some of your interface actually has the IP "2001:19f0:6c01:413:5400:ff:fe6a:a0e5"?

    You can set the option "net.ipv6.ip_nonlocal_bind = 1" in file /etc/sysctl.conf to allow software to bind to non-existing IPv6 interfaces (activate with "sysctl -p /etc/sysctl.conf"). But I would call that a workaround. The solution should be to assign the correct IP addresses. (Probably you have to change the ispconfig config to the right address)
     
    Last edited: Sep 2, 2019

Share This Page