Version
Cb Response 4.x, 5.x, 6.x
Issue
After performing an upgrade, the Nginx web server service (cb-nginx) fails to start.
Symptoms
The following error message is written to /var/log/cb/nginx/startup.log when starting the services:
Starting cb-nginx: nginx: [emerg] duplicate listen options for [::]:80 in /etc/cb/nginx/conf.d/cb.conf:29
[FAILED]Error during cb-enterprise start on localhost
Cause
The issue occurs because there are multiple .conf files in the below directory, such as:
/etc/cb/nginx/conf.d/cb.conf
/etc/cb/nginx/conf.d/cb-multihome.conf
The above conflict occurs because only one .conf file should exist - either cb.conf or cb-multhome.conf. This is because the Nginx web server requires only one listen directive, which determines the IP and ports to listen on.
Note: The upgrade will ignore files that do not have a .conf extension. For example, cb.conf.bak
Solution
- Rename second .conf file - Pre 5.2, only one .conf file should exist in the /etc/cb/nginx/conf.d directory. Determine which file should exist, either cb.conf for a shared UI and Sensor port (default of 443) or cb-multihome.conf for separate UI and Sensor ports.
- Keep cb.conf for a shared UI and Sensor port (default of 443):
mv /etc/cb/nginx/conf.d/cb-multihome.conf /etc/cb/nginx/conf.d/cb-multihome.conf.bakDATE |
Note: For 5.2 follow this guide instead: Post Upgrade - Nginx won't start due to duplicate includes in cb.conf and http.conf
- Keep cb-multihome.conf for separate UI (8443) and Sensor (443) ports:
mv /etc/cb/nginx/conf.d/cb.conf /etc/cb/nginx/conf.d/cb.conf.bakDATE |
Note: For 5.2 follow this guide instead: Migrating to a 5.2 Multihome Configuration File
- Rename any .rpmnew files. For more information, check here: Upgrading to a new Cb Response Version - rpmnew files
- Restart services