EDR: CbShellException on Postgres When Running cbupgrade
search cancel

EDR: CbShellException on Postgres When Running cbupgrade


Article ID: 287898


Updated On:


Carbon Black EDR (formerly Cb Response)


Error message similar to the below is displayed when running /usr/share/cb/cbupgrade on the master
'sudo -u cb /usr/pgsql-10/bin/pg_ctl start -w -l /var/log/cb/pgsql/setup.log -D /apps/cb/data/pgsql -o "-p 5002"' execution failed(2)
Traceback (most recent call last):
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/utils/exceptions.py", line 79, in decorator
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/main.py", line 241, in main
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/main.py", line 75, in run
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/main.py", line 138, in __execute_actions
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/main.py", line 132, in run_actions
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/base_action.py", line 94, in do_execute
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/utils/cb_shell.py", line 92, in decorator
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/common_actions/pgsql_runner.py", line 26, in execute
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/maintenance/cbupgrade/base_action.py", line 109, in run_shell
File "/usr/share/cb/virtualenv/lib/python3.7/site-packages/cb/utils/cb_shell.py", line 56, in run
cb.utils.cb_shell.CbShellException: 'sudo -u cb /usr/pgsql-10/bin/pg_ctl start -w -l /var/log/cb/pgsql/setup.log -D /apps/cb/data/pgsql -o "-p 5002"' execution failed(2)



  • EDR ( Formerly Carbon Black Response) Server: All Supported Versions


Root user does not have correct permissions


  1. Confirm the root user has the path variable /usr/bin
    echo $PATH
  2. Set the PATH variable
To set the PATH variable temporarily:
export PATH=/usr/bin:$PATH
To set the PATH variable permanently:
  • In terminal run "sudo visudo"
  • Find this line the line "Defaults". By default, RHEL/CentOS will have this line as:
    Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
  • Edit with by adding the /usr/bin permissions

Additional Information

  • Please confirm with your system administrator before performing the permanent fix
  • Check the /var/log/cb/pgsql/setup.log for more information on the causes of this error
  • This can also occur if there isn't enough space on the disk