Bug #26034
closedInstallation of RHEL 9 flavors (alma, oraclelinux) fails with postgresql.service: Failed with result 'exit-code'
Description
Install of rudder-server has an error on postgresql which doesn't start
Running scriptlet: java-17-openjdk-headless-1:17.0.13.0.11-4.0.1.el9.x86_64 57/58 Running scriptlet: rudder-server-8.2.3-1.EL.9.x86_64 58/58 Installing : rudder-server-8.2.3-1.EL.9.x86_64 58/58 Running scriptlet: rudder-server-8.2.3-1.EL.9.x86_64 58/58 Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xeu postgresql.service" for details. ************************************************************************************** ERROR: rudder-server postinstall script failed ! Trying to recover the problem, you should check that your instance is properly working You should also try to manually execute: /opt/rudder/bin/rudder-upgrade Such errors should not happen, please open an issue for this problem on https://issues.rudder.io/projects/rudder/issues/new ************************************************************************************** chmod: cannot access '/var/rudder/configuration-repository/.git': No such file or directory
journalctl says
Dec 06 12:54:56 server systemd[1]: Starting PostgreSQL database server... ░░ Subject: A start job for unit postgresql.service has begun execution ░░ Defined-By: systemd ░░ Support: https://support.oracle.com ░░ ░░ A start job for unit postgresql.service has begun execution. ░░ ░░ The job identifier is 2026. Dec 06 12:54:56 server postmaster[6228]: 2024-12-06 12:54:56.327 UTC [6228] LOG: redirecting log output to logging collector process Dec 06 12:54:56 server postmaster[6228]: 2024-12-06 12:54:56.327 UTC [6228] HINT: Future log output will appear in directory "log". Dec 06 12:54:56 server systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By: systemd ░░ Support: https://support.oracle.com ░░ ░░ An ExecStart= process belonging to unit postgresql.service has exited. ░░ ░░ The process' exit code is 'exited' and its exit status is 1. Dec 06 12:54:56 server systemd[1]: postgresql.service: Failed with result 'exit-code'.
the postgresql log file is more useful
2024-12-06 12:54:56.328 UTC [6228] LOG: starting PostgreSQL 13.16 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3.0.1), 64-bit 2024-12-06 12:54:56.328 UTC [6228] LOG: listening on IPv4 address "127.0.0.1", port 5432 2024-12-06 12:54:56.328 UTC [6228] LOG: could not bind IPv6 address "::1": Cannot assign requested address 2024-12-06 12:54:56.328 UTC [6228] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 2024-12-06 12:54:56.329 UTC [6228] FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": No such file or directory 2024-12-06 12:54:56.331 UTC [6228] LOG: database system is shut down
So it cannot use ::1, and cannot start
running at a later stage
systemctl start postgresql
does work though
WORKAROUND:
- restart postgres
- do /opt/rudder/share/package-scripts/rudder-server-postinst true httpd true
Updated by François ARMAND 20 days ago
- Subject changed from Installation of server on OracleLinux 9 fails to Installation of server on OracleLinux 9 fails with postgresql.service: Failed with result 'exit-code'
- Description updated (diff)
- Assignee set to Benoît PECCATTE
- Priority changed from To review to 2
Updated by François ARMAND 20 days ago
- Priority changed from 2 to 1 (highest)
Upgrading to P1, since it's also happening on alma 9.5, and likely all RedHat flavors for version 9.5
Updated by François ARMAND 20 days ago
Also, on a previous version of Alma, I got a
Jan 02 16:26:38 server systemd[1]: rudder-jetty.service: Job rudder-jetty.service/start failed with result 'dependency'. [root@server vagrant]# systemctl status rudder-slapd × rudder-slapd.service - Rudder OpenLDAP Server Daemon Loaded: loaded (/usr/lib/systemd/system/rudder-slapd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2025-01-02 16:26:38 UTC; 46s ago Process: 19354 ExecStart=/opt/rudder/libexec/slapd -n rudder-slapd -u rudder-slapd -f /opt/rudder/etc/openldap/slapd.conf -h ldap://127.0.0.1:389/ (code=exited, status=1/FAILURE) CPU: 7ms Jan 02 16:26:38 server systemd[1]: Starting Rudder OpenLDAP Server Daemon... Jan 02 16:26:38 server rudder-slapd[19354]: @(#) $OpenLDAP: slapd 2.6.6 (Nov 22 2017 00:00:00) $ openldap Jan 02 16:26:38 server rudder-slapd[19354]: No passwd entry for user rudder-slapd Jan 02 16:26:38 server systemd[1]: rudder-slapd.service: Control process exited, code=exited, status=1/FAILURE Jan 02 16:26:38 server systemd[1]: rudder-slapd.service: Failed with result 'exit-code'. Jan 02 16:26:38 server systemd[1]: Failed to start Rudder OpenLDAP Server Daemon. [root@server vagrant]# /opt/rudder/libexec/slapd -d-1 -n rudder-slapd -u rudder-slapd -f /opt/rudder/etc/openldap/slapd.conf -h ldap://127.0.0.1:389/ 6776beab.0aa8a570 0x7f70ce3697c0 @(#) $OpenLDAP: slapd 2.6.6 (Nov 22 2017 00:00:00) $ openldap 6776beab.0ab393d1 0x7f70ce3697c0 daemon_init: ldap://127.0.0.1:389/ 6776beab.0ab5b1b7 0x7f70ce3697c0 daemon_init: listen on ldap://127.0.0.1:389/ 6776beab.0ab7828d 0x7f70ce3697c0 daemon_init: 1 listeners to open... 6776beab.0ab90c79 0x7f70ce3697c0 ldap_url_parse_ext(ldap://127.0.0.1:389/) 6776beab.0abce858 0x7f70ce3697c0 daemon: listener initialized ldap://127.0.0.1:389/ 6776beab.0abe9f64 0x7f70ce3697c0 daemon_init: 1 listeners opened 6776beab.0ace6abd 0x7f70ce3697c0 No passwd entry for user rudder-slapd
Perhaps also linked, if the root cause is some selinux thing.
Updated by François ARMAND 20 days ago
- Target version changed from 8.2.4 to 8.1.11
Also happen in 8.1.
Updated by François ARMAND 20 days ago
- Subject changed from Installation of server on OracleLinux 9 fails with postgresql.service: Failed with result 'exit-code' to Installation of RHEL 9 flavors (alma, oraclelinux) fails with postgresql.service: Failed with result 'exit-code'
Updated by François ARMAND 20 days ago · Edited
On alma 9, postgresql logs are a bit different:
2025-01-02 16:36:09.939 UTC [9407] LOG: starting PostgreSQL 13.18 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2), 64-bit 2025-01-02 16:36:09.939 UTC [9407] LOG: listening on IPv6 address "::1", port 5432 2025-01-02 16:36:09.939 UTC [9407] LOG: listening on IPv4 address "127.0.0.1", port 5432 2025-01-02 16:36:09.940 UTC [9407] FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": No such file or directory 2025-01-02 16:36:09.942 UTC [9407] LOG: database system is shut down 2025-01-02 16:36:19.178 UTC [11250] LOG: starting PostgreSQL 13.18 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2), 64-bit 2025-01-02 16:36:19.178 UTC [11250] LOG: listening on IPv6 address "::1", port 5432 2025-01-02 16:36:19.178 UTC [11250] LOG: listening on IPv4 address "127.0.0.1", port 5432 2025-01-02 16:36:19.181 UTC [11250] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-01-02 16:36:19.182 UTC [11250] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2025-01-02 16:36:19.185 UTC [11296] LOG: database system was shut down at 2025-01-02 16:36:09 UTC 2025-01-02 16:36:19.190 UTC [11250] LOG: database system is ready to accept connections 2025-01-02 16:45:52.293 UTC [17481] ERROR: role "rudder" does not exist 2025-01-02 16:45:52.293 UTC [17481] STATEMENT: ALTER USER rudder WITH PASSWORD 'Normation' 2025-01-02 16:47:23.680 UTC [11250] LOG: received SIGHUP, reloading configuration files 2025-01-02 16:48:03.647 UTC [18895] LOG: unexpected EOF on client connection with an open transaction
The culprit seems to be: 2025-01-02 16:36:09.940 UTC [9407] FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": No such file or directory
Updated by Vincent MEMBRÉ 19 days ago
- Status changed from New to In progress
- Assignee changed from Benoît PECCATTE to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ 19 days ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Félix DALLIDET
- Pull Request set to https://github.com/Normation/rudder-packages/pull/2941
Updated by Anonymous 19 days ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|d20c34907d12a09875a4d2ba93bff311e2b0429e.
Updated by Nicolas CHARLES 16 days ago
- Has duplicate Bug #26141: error during install on Oracle Linux with script setup-rudder. added
Updated by Vincent MEMBRÉ 9 days ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.1.11 and 8.2.4 which were released today.