engine-setup failes at “Environment setup”

Rahul Agarwal
Apr 4, 2022

Issue: engine-setup fails with below error:

Failed to execute stage 'Environment setup': Cannot connect to Engine database using existing credentials: engine@localhost:5432

Resolution:

The Postgresql database is not initialized. Run below to fix:

~]# postgresql-setup --initdb
* Initializing database in '/var/lib/pgsql/data'
* Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log
~]# systemctl start postgresql~]# systemctl enable postgresql
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/systemd/system/postgresql.service.
~]# systemctl status postgresql
● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-04-04 11:06:06 EDT; 18s ago
Main PID: 101846 (postmaster)
Tasks: 8 (limit: 48456)
Memory: 16.9M
CGroup: /system.slice/postgresql.service
├─101846 /usr/bin/postmaster -D /var/lib/pgsql/data
├─101847 postgres: logger
├─101849 postgres: checkpointer
├─101850 postgres: background writer
├─101851 postgres: walwriter
├─101852 postgres: autovacuum launcher
├─101853 postgres: stats collector
└─101854 postgres: logical replication launcher

--

--