Nginx will not start with IPv6 Error - "Address family not supported by protocol"
book
Article ID: 292185
calendar_today
Updated On:
Products
Carbon Black EDR (formerly Cb Response)
Issue/Introduction
Nginx fails to start after install
/var/log/cb/nginx/startup.log contains the following messages
Starting cb-nginx: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol) [FAILED]
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
<err> gunicorn.error - Can't connect to ('::', 5600)
Startup logs for other services may have the following error
Can't connect to ('::', 5600)
Environment
EDR Server: 5.x and Above
Cause
IPv6 is disabled on the server
Resolution
#%$ If running a clustered environment, changes must be made on both primary and minions #%$
In EDR 6.4.0 the ability to have multiple server certificates in the product was introduced. As a result new configuration files for nginx can be found in /var/cb/nginx/vhosts/*.conf where lines like "listen [::]:443 ssl; " try to bind to an IPV6 address. If IPV6 has been disabled, this will prevent NGINX service from starting.
Adding NginxVhostsAddress=0.0.0.0 to cb.conf will force CB server to create an IPV4 formatted vhosts/*.conf format required when IPV6 has been disabled on the machine.