rhevm-dwh-setup-3.3.4 failed with "RuntimeError: Error: postgresql service couldn't be started. Stopping" error message.
Environment
- Red Hat Enterprise Virtualization 3.3
- rhevm-3.3.4-0.53.el6ev.noarch
- rhevm-dwh-3.3.4-1.el6ev.noarch
Issue
- rhevm-dwh-setup failed with the following error:
2014-07-10 12:28:15::DEBUG::common_utils::971::root:: stderr = Password for user postgres:
psql: fe_sendauth: no password supplied
2014-07-10 12:28:15::DEBUG::common_utils::972::root:: retcode = 2
2014-07-10 12:28:17::ERROR::rhevm-dwh-setup::703::root:: Exception caught!
2014-07-10 12:28:17::ERROR::rhevm-dwh-setup::704::root:: Traceback (most recent call last):
File "/usr/bin/rhevm-dwh-setup", line 461, in main
pg_updated = utils.configHbaIdent()
File "/usr/share/ovirt-engine-dwh/common_utils.py", line 1448, in configHbaIdent
restartPostgres(newval=='md5')
File "/usr/share/ovirt-engine-dwh/common_utils.py", line 890, in restartPostgres
startPostgres()
File "/usr/share/ovirt-engine-dwh/common_utils.py", line 559, in startPostgres
'Error: postgresql service couldn\'t be started. Stopping.'
RuntimeError: Error: postgresql service couldn't be started. Stopping.
Resolution
Workaround
- Replace the authentication method to ident in the following lines of the file to resolve this issue:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident <----
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
- Upgrade the rhevm-dwh package to rhevm-dwh-3.3.4-2.el6 version for permanent fix.
Root Cause
- Check the file
/var/lib/pgsql/data/pg_hba.conf
has md5 as method for all users using type local:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5 <----
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
- There is an issue with rhevm-dwh-setup, tracked by https://bugzilla.redhat.com/show_bug.cgi?id=1119436
Diagnostic Steps
- From the rhevm-dwh-setup logs:
2014-07-10 12:28:05::DEBUG::common_utils::971::root:: stderr =
2014-07-10 12:28:05::DEBUG::common_utils::972::root:: retcode = 3
2014-07-10 12:28:05::DEBUG::common_utils::571::root:: starting postgresql
2014-07-10 12:28:05::DEBUG::common_utils::220::root:: starting postgresql
2014-07-10 12:28:05::DEBUG::common_utils::274::root:: executing action postgresql on service start
2014-07-10 12:28:05::DEBUG::common_utils::915::root:: Executing command --> '/sbin/service postgresql start' in working directory '/root'
2014-07-10 12:28:07::DEBUG::common_utils::970::root:: output = Starting postgresql service: [ OK ]
2014-07-10 12:28:07::DEBUG::common_utils::971::root:: stderr =
2014-07-10 12:28:07::DEBUG::common_utils::972::root:: retcode = 0
2014-07-10 12:28:07::DEBUG::common_utils::1477::root:: starting runPostgresSuQuery database: template1 query: "select 1;"
2014-07-10 12:28:07::DEBUG::common_utils::915::root:: Executing command --> '/bin/su -l postgres -c /usr/bin/psql -U postgres -d template1 -tA -c "select 1;"' in working directory '/root'
2014-07-10 12:28:07::DEBUG::common_utils::970::root:: output =
2014-07-10 12:28:07::DEBUG::common_utils::971::root:: stderr = Password for user postgres:
psql: fe_sendauth: no password supplied
2014-07-10 12:28:13::DEBUG::common_utils::972::root:: retcode = 2
2014-07-10 12:28:15::DEBUG::common_utils::1477::root:: starting runPostgresSuQuery database: template1 query: "select 1;"
2014-07-10 12:28:15::DEBUG::common_utils::915::root:: Executing command --> '/bin/su -l postgres -c /usr/bin/psql -U postgres -d template1 -tA -c "select 1;"' in working directory '/root'
2014-07-10 12:28:15::DEBUG::common_utils::970::root:: output =
2014-07-10 12:28:15::DEBUG::common_utils::971::root:: stderr = Password for user postgres:
psql: fe_sendauth: no password supplied
2014-07-10 12:28:15::DEBUG::common_utils::972::root:: retcode = 2
2014-07-10 12:28:17::ERROR::rhevm-dwh-setup::703::root:: Exception caught!
2014-07-10 12:28:17::ERROR::rhevm-dwh-setup::704::root:: Traceback (most recent call last):
File "/usr/bin/rhevm-dwh-setup", line 461, in main
pg_updated = utils.configHbaIdent()
File "/usr/share/ovirt-engine-dwh/common_utils.py", line 1448, in configHbaIdent
restartPostgres(newval=='md5')
File "/usr/share/ovirt-engine-dwh/common_utils.py", line 890, in restartPostgres
startPostgres()
File "/usr/share/ovirt-engine-dwh/common_utils.py", line 559, in startPostgres
'Error: postgresql service couldn\'t be started. Stopping.'
RuntimeError: Error: postgresql service couldn't be started. Stopping.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments