I have installed Postgres-11 on a host of RedHat Linux 7, and it had been initialized and started OK.
Then I added listen_addresses = '*'
into the configuration file at /var/lib/pgsql/11/data/pg_hba.conf
, hoping to let Postgres listen on a non-local interface. However, when trying to restart Postgres by command systemctl restart postgresql-11
, it always gets the below error about "Unregistered Authentication Agent".
I tried to remove listen_addresses = '*'
and everything went back to normal again.
Not sure what is wrong here, and any hints will be highly appreciated.
Aug 10 17:45:50 payv.local.example.com polkitd[697]: Registered Authentication Agent for unix-process:20400:1691804 (system bus name :1.49 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object
Aug 10 17:45:50 payv.local.example.com systemd[1]: Starting PostgreSQL 11 database server...
-- Subject: Unit postgresql-11.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-11.service has begun starting up.
Aug 10 17:45:50 payv.local.example.com postmaster[20413]: 2021-08-10 17:45:50.584 MDT [20413] LOG: listening on IPv4 address "127.0.0.1", port 5432
Aug 10 17:45:50 payv.local.example.com postmaster[20413]: 2021-08-10 17:45:50.588 MDT [20413] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Aug 10 17:45:50 payv.local.example.com postmaster[20413]: 2021-08-10 17:45:50.593 MDT [20413] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
Aug 10 17:45:50 payv.local.example.com postmaster[20413]: 2021-08-10 17:45:50.600 MDT [20413] LOG: redirecting log output to logging collector process
Aug 10 17:45:50 payv.local.example.com postmaster[20413]: 2021-08-10 17:45:50.600 MDT [20413] HINT: Future log output will appear in directory "log".
Aug 10 17:45:50 payv.local.example.com systemd[1]: postgresql-11.service: main process exited, code=exited, status=1/FAILURE
Aug 10 17:45:50 payv.local.example.com systemd[1]: Failed to start PostgreSQL 11 database server.
-- Subject: Unit postgresql-11.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-11.service has failed.
--
-- The result is failed.
Aug 10 17:45:50 payv.local.example.com systemd[1]: Unit postgresql-11.service entered failed state.
Aug 10 17:45:50 payv.local.example.com systemd[1]: postgresql-11.service failed.
Aug 10 17:45:50 payv.local.example.com polkitd[697]: Unregistered Authentication Agent for unix-process:20400:1691804 (system bus name :1.49, object path /org/freedesktop/PolicyKit1/Authenticat