EDR: Nginx Not Starting With Invalid Number of Arguments
book
Article ID: 287918
calendar_today
Updated On:
Products
Carbon Black EDR (formerly Cb Response)
Issue/Introduction
Implementing new CA WebUI certificate
cb-nginx failed to start
/var/log/cb/nginx/startup.log error message
nginx: [emerg] invalid number of arguments in "ssl_certificate" directive in /etc/cb/nginx/conf.d/cb-multihome.conf:66
nginx: [emerg] invalid number of arguments in "ssl_certificate" directive in /etc/cb/nginx/conf.d/cb-multihome.conf:66
nginx: [emerg] invalid number of arguments in "ssl_certificate" directive in /etc/cb/nginx/conf.d/cb-multihome.conf:66
nginx: [emerg] invalid number of arguments in "ssl_certificate" directive in /etc/cb/nginx/conf.d/cb-multihome.conf:66
Environment
EDR Server: All Versions
EDR Sensors: All Versions
Cause
Incorrect Syntax
Pasted from pdf with hidden character
Missing semicolon ; from an end of a line
Resolution
Open /etc/cb/nginx/conf.d/cb.conf (renamed from cb.multihome.conf.example)
Delete and manually retype the following two lines using your path and file name
ssl_certificate /etc/cb/certs/mycert.crt;
ssl_certificate_key /etc/cb/certs/mycert.key;
Start cb-nginx service
service cb-nginx start
Additional Information
This can also happen if the crt and key have more than one period using a key with _ instead of multiple .'s can prevent this error