Instalei o Postgres-11 em um host do RedHat Linux 7, e ele foi inicializado e iniciado OK.
Então eu adicionei listen_addresses = '*'
no arquivo de configuração em /var/lib/pgsql/11/data/pg_hba.conf
, esperando deixar o Postgres escutar em uma interface não local. No entanto, ao tentar reiniciar o Postgres pelo comando systemctl restart postgresql-11
, ele sempre recebe o erro abaixo sobre "Agente de autenticação não registrado".
Tentei remover listen_addresses = '*'
e tudo voltou ao normal novamente.
Não tenho certeza do que está errado aqui, e quaisquer dicas serão muito apreciadas.
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
pg_hba.conf
é o arquivo errado.listen_addresses
deve ser especificado empostgresql.conf
.