Environment
- Cb Response: All Versions
- Linux: Supported Server Versions
Symptoms
- You see the 'cb-datagrid' service fail to startup after restarting the cb-enterprise services
- You see the following error in the var/log/cb/pgsql/pqsql.log:
2018-06-19 15:42:18 EDT [[unknown](11829) @ *.*.*.*(15786)] FATAL: password authentication failed for user "cb" |
- You see the following error in the /var/log/cb/datagrid/startup.out file:
Exception in thread "main" java.lang.RuntimeException: Could not get SQL connection. Aborting. at com.carbonblack.datagrid.server.StartServer.main(StartServer.java:46) Path to Java : /usr/lib/jvm/jre-1.8.0-openjdk.x86_64//bin/java |
Cause
Password authentication failed for the user "cb", because someone has manually gone into users table in Postgres and changed the password for the "cb" user.
Resolution
- Login to the Carbon Black Master server as the root
- Run the following to retrieve the Postgres database password:
# grep DatabaseURL /etc/cb/cb.conf | awk -F: '{print $3}' | sed 's/@.*//' |
- Copy the password printed from the above command, and run the following to connect to Postgres using the above password when prompted:
# psql -U cb -h localhost -p 5002 |
ALTER USER 'user_name' WITH PASSWORD 'new_password'; |
Additional Notes
In the ALTER USER command, replace 'user_name' with the name of the account that was changed (example: cb). Then in the 'new_password' field, put in the original password that you got from the cb.conf command in step 2.
Related Content
Cb Response: cb-datagrid not starting (Fatal: password authentication failed for user "cb")
Internal reference: EA-12542