IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

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:
2154
Contributors