Threat Report: Exposing Malware in Linux-Based Multi-Cloud Environments | Download Now

Post Upgrade - Nginx won't start due to duplicate includes in cb-multihome.conf and cb.conf

Post Upgrade - Nginx won't start due to duplicate includes in cb-multihome.conf and cb.conf

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

  1. 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.
    1. 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
    2. 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
  2. Rename any .rpmnew files. For more information, check here: Upgrading to a new Cb Response Version - rpmnew files
  3. Restart services
Labels (1)
Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎04-02-2015
Views:
2043
Contributors