My Oracle Support Banner

OLVM: engine-setup Fails: Failed to execute stage 'Environment setup': Cannot connect to Engine database using existing credentials: engine@localhost:5432 (Doc ID 2662783.1)

Last updated on MAY 05, 2020

Applies to:

Linux OS - Version Oracle Linux 7.6 with Unbreakable Enterprise Kernel [4.14.35] and later
Linux x86-64

Symptoms

The engine-setup command fails with below error:

# engine-setup
[ INFO ] Stage: Initializing
[ INFO ] Stage: Environment setup
Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf']
Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20200422121157-0422gv.log
Version: otopi-1.8.3 (otopi-1.8.3-1.el7)
[ ERROR ] Failed to execute stage 'Environment setup': Cannot connect to Engine database using existing credentials: engine@localhost:5432
[ INFO ] Stage: Clean up
Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20200422121157-0422gv.log
[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20200422121202-setup.conf'
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ ERROR ] Execution of setup failed

# cat /var/log/ovirt-engine/setup/ovirt-engine-setup-20200422121157-0422gv.log
(snip)
2020-04-22 12:12:02,925+1200 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:248 Creating own connection
2020-04-22 12:12:02,926+1200 DEBUG otopi.ovirt_engine_setup.engine_common.database database.tryDatabaseConnect:403 Connection failed
Traceback (most recent call last):
File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/database.py", line 399, in tryDatabaseConnect
transaction=False,
File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/database.py", line 257, in execute
database=database,
File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/database.py", line 190, in connect
sslmode=sslmode,
File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

2020-04-22 12:12:02,926+1200 DEBUG otopi.plugins.ovirt_engine_common.ovirt_engine.db.connection connection._setup:149 Existing credential use failed
Traceback (most recent call last):
File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-common/ovirt-engine/db/connection.py", line 136, in _setup
dbovirtutils.tryDatabaseConnect(dbenv)
File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine_common/database.py", line 406, in tryDatabaseConnect
error=e,
RuntimeError: Cannot connect to database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

2020-04-22 12:12:02,927+1200 DEBUG otopi.context context._executeMethod:145 method exception
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod
method['method']()
File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-common/ovirt-engine/db/connection.py", line 165, in _setup
raise RuntimeError(msg)
RuntimeError: Cannot connect to Engine database using existing credentials: engine@localhost:5432
2020-04-22 12:12:02,927+1200 ERROR otopi.context context._executeMethod:154 Failed to execute stage 'Environment setup': Cannot connect to Engine database using existing credentials: engine@localhost:5432

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.