Install fails on rocky 8

Problem: i’m doing a new install on a fresh rocky 8.7 host and i get this :
[root@HOST02 tmp]# foreman-installer --scenario katello --foreman-initial-organization MyOrg
2023-03-01 15:31:42 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-03-01 15:31:46 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-03-01 15:31:46 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-03-01 15:36:33 [NOTICE] [configure] Starting system configuration.
2023-03-01 15:40:34 [NOTICE] [configure] 250 configuration steps out of 1383 steps complete.
2023-03-01 15:41:16 [NOTICE] [configure] 500 configuration steps out of 1385 steps complete.
2023-03-01 15:42:32 [NOTICE] [configure] 750 configuration steps out of 1390 steps complete.
2023-03-01 15:42:39 [NOTICE] [configure] 1000 configuration steps out of 1413 steps complete.
2023-03-01 15:42:51 [ERROR ] [configure] Execution of ‘/usr/share/candlepin/cpdb --create --schema-only --dbhost=localhost --dbport=5432 --database=candlepin --user=candlepin --password=REDACTED’ returned 1: ########## ERROR ############
2023-03-01 15:42:51 [ERROR ] [configure] Error running command: /usr/share/candlepin/liquibase.sh --driver=org.postgresql.Driver --classpath=/var/lib/tomcat/webapps/candlepin/WEB-INF/lib/postgresql-42.5.1.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changelog-file=db/changelog/changelog-create.xml --url=“jdbc:postgresql://localhost:5432/candlepin” --username=$DBUSERNAME --headless=true --hub-mode=OFF --password=$DBPASSWORD --log-level=severe update -Dcommunity=False
2023-03-01 15:42:51 [ERROR ] [configure] Status code: 1
2023-03-01 15:42:51 [ERROR ] [configure] Command output: ####################################################
2023-03-01 15:42:51 [ERROR ] [configure] ## _ _ _ _ ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | () () | ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | _ __ _ _ _ | |_ __ _ ___ ___ ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | | |/ | | | | | '_ \ / _ / |/ _ \ ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | |
| | (| | || | | |) | (| __ \ / ##
2023-03-01 15:42:51 [ERROR ] [configure] ## _/|_, |_,||.
/ _,|/_| ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | ##
2023-03-01 15:42:51 [ERROR ] [configure] ## |
| ##
2023-03-01 15:42:51 [ERROR ] [configure] ## ##
2023-03-01 15:42:51 [ERROR ] [configure] ## Get documentation at docs.liquibase.com ##
2023-03-01 15:42:51 [ERROR ] [configure] ## Get certified courses at learn.liquibase.com ##
2023-03-01 15:42:51 [ERROR ] [configure] ## Free schema change activity reports at ##
2023-03-01 15:42:51 [ERROR ] [configure] ## https://hub.liquibase.com ##
2023-03-01 15:42:51 [ERROR ] [configure] ## ##
2023-03-01 15:42:51 [ERROR ] [configure] ####################################################
2023-03-01 15:42:51 [ERROR ] [configure] Starting Liquibase at 15:42:41 (version 4.15.0 #4001 built at 2022-08-05 16:17+0000)
2023-03-01 15:42:51 [ERROR ] [configure] Liquibase Version: 4.15.0
2023-03-01 15:42:51 [ERROR ] [configure] /Stage[main]/Candlepin::Database::Postgresql/Cpdb_create[candlepin]/ensure: change from ‘absent’ to ‘present’ failed: Execution of ‘/usr/share/candlepin/cpdb --create --schema-only --dbhost=localhost --dbport=5432 --database=candlepin --user=candlepin --password=REDACTED’ returned 1: ########## ERROR ############
2023-03-01 15:42:51 [ERROR ] [configure] Error running command: /usr/share/candlepin/liquibase.sh --driver=org.postgresql.Driver --classpath=/var/lib/tomcat/webapps/candlepin/WEB-INF/lib/postgresql-42.5.1.jar:/var/lib/tomcat/webapps/candlepin/WEB-INF/classes/ --changelog-file=db/changelog/changelog-create.xml --url=“jdbc:postgresql://localhost:5432/candlepin” --username=$DBUSERNAME --headless=true --hub-mode=OFF --password=$DBPASSWORD --log-level=severe update -Dcommunity=False
2023-03-01 15:42:51 [ERROR ] [configure] Status code: 1
2023-03-01 15:42:51 [ERROR ] [configure] Command output: ####################################################
2023-03-01 15:42:51 [ERROR ] [configure] ## _ _ _ _ ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | () () | ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | _ __ _ _ _ | |_ __ _ ___ ___ ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | | |/ | | | | | '_ \ / _ / |/ _ \ ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | |
| | (| | || | | |) | (| __ \ / ##
2023-03-01 15:42:51 [ERROR ] [configure] ## _/|_, |_,||.
/ _,|/_| ##
2023-03-01 15:42:51 [ERROR ] [configure] ## | | ##
2023-03-01 15:42:51 [ERROR ] [configure] ## |
| ##
2023-03-01 15:42:51 [ERROR ] [configure] ## ##

2023-03-01 15:42:51 [ERROR ] [configure] ## ##
2023-03-01 15:42:51 [ERROR ] [configure] ####################################################
2023-03-01 15:42:51 [ERROR ] [configure] Starting Liquibase at 15:42:41 (version 4.15.0 #4001 built at 2022-08-05 16:17+0000)
2023-03-01 15:42:51 [ERROR ] [configure] Liquibase Version: 4.15.0
2023-03-01 15:43:13 [NOTICE] [configure] 1250 configuration steps out of 1413 steps complete.
2023-03-01 15:45:12 [NOTICE] [configure] System configuration has finished.

There were errors detected during install.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

I checked and there is a daemon listening on 5432
/usr/share/candlepin/cpdb --create --schema-only --dbhost=localhost --dbport=5432 --database=candlepin --user=candlepin --password=REDACTED
resulted in this : Unexpected error running Liquibase: Connection could not be created to jdbc:postgresql://localhost:5432/candlepin with driver org.postgresql.Driver. The connection attempt failed.

  • Caused by: connect timed out

liquibase.exception.CommandExecutionException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:postgresql://localhost:5432/candlepin with driver org.postgresql.Driver. The connection attempt failed
Expected outcome: I’d like to complete a basic install

Foreman and Proxy versions: foreman 3.5.1-1.el8 foreman-proxy-3.5.1-1.el8.noarch foreman-installer-3.5.1-1.el8.noarch

Foreman and Proxy plugin versions:

Distribution and version: Rocky 8.7

Other relevant data:

I have completed some installs on Rocky 8, but it was before 8.7. Maybe 8.5 or 8.6 when I did it.

From your logs it looks like postgresql didn’t start correctly, can you see something in your system log about Postgres? if it runs it would listen on port 5432. Postgresql should get installed automatically by Foreman.

Thanks for the tip. I had noticed that Postgresql wasnt installed or running. I rolled back to the OS only snapshot and saw i had a typo in /etc/hosts “localhost” … Im trying this again after correcting the typo ,. will report back

yep… the malformed localhost entry was the issue …

good catch!