Otázka:
Zobrazila se mi chyba „Nepodařilo se spustit databázový server PostgreSQL – Neregistrovaný autentizační agent pro unixový proces “ při spouštění serveru PostgreSQL na počítači CentOS. Chyba označuje, že služba selhala kvůli neregistrovanému ověřovacímu agentovi pro unixový proces a je hlášena polkitd servis. Chápu, že polkitd je systémový démon a jeho autentizační agent ověřuje identitu uživatele před provedením akce. Příkaz ‚ journalctl -xe‘ a /var/log/secure odhaluje totéž.
Zde je úplná chybová zpráva:
# service postgresql start ::::::::::::::::::::::::::::::::::::: test.in systemd[1]: Unit postgresql.service entered failed state. test.in systemd[1]: postgresql.service failed. test.in polkitd[18278]: Unregistered Authentication Agent for unix-process:22928:182581476 (system bus name :1.1038, object path test.in chronyd[513]: Source 45.125.255.54 replaced with 123.108.200.124 test.in polkitd[18278]: Registered Authentication Agent for unix-process:22988:182656818 (system bus name :1.1039 [/usr/bin/pktty test.in systemd[1]: Starting PostgreSQL database server...
Jak problém vyřešit?
Řešení:
Setkal jsem se s podobnou chybou a níže uvedené kroky ji opravily.
Krok 1 :Přepnout na postgres uživatel
# su - postgres
Krok 2: Inicializujte databázový server
$ initdb The files belonging to this database system will be owned by user "postgres". This user must also own the server process. ::::::::::::::::::::::::::::::::::::::::::: WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: postgres -D /var/lib/pgsql/data or pg_ctl -D /var/lib/pgsql/data -l logfile start
Krok 3:
$ exit
Krok 4: Spusťte PostgreSQL server
# service postgresql start Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor Active: active (running) since Wed 2016-08-31 17:43:58 IST; 10s ago Process: 23144 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT Process: 23138 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code= Main PID: 23147 (postgres)
A podle tohoto odkazu můžete polkitd ignorovat chybová zpráva.