语义确认我的主机在允许模式下运行。
当我不使用这样的密码时,我可以作为用户puppetdb登录postgresql:
[msk@puppet ~]$ su - postgres Password: Last login: Fri Jun 21 14:19:01 EDT 2019 on pts/1 bash-4.2$ psql -d puppetdb -U puppetdb psql: FATAL: Peer authentication failed for user "puppetdb"
netstat -tlpn \grep邮递员显示tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 22948/postmaster
我在/var/log/puppetlabs/puppetdb/puoppedb.log中看到的百位错误是:
Pool - Connection is not available, request timed out after 3012ms.
2019-06-21T13:36:50.267-04:00 ERROR [p.p.c.services] Will retry database connection after temporary failure: java.sql.SQLTransientConnectionException: PDBMigrationsPool - Connection is not available, request timed out after 3000ms./var/lib/pgsql/11/data/pg_hba.conf包含:
local all all peer
host all all 127.0.0.1/32 ident
host puppetdb puppetdb 127.0.0.1/32 peerfull中充满了
FATAL: remaining connection slots are reserved for non-replication superuser connections,谢谢你提供的任何线索。
发布于 2020-02-05 10:49:26
PuppetDB无法连接到数据库。首先检查database.ini文件,可能在:/etc/puppetlabs/puppetdb/conf.d/database.ini中。它应该包含这样的内容:
classname = org.postgresql.Driver
subprotocol = postgresql
subname = //localhost:5432/puppetdb
username = puppetdb
conn-max-age = 60
conn-keep-alive = 45
conn-lifetime = 0确保在PostgreSQL实例中设置适当数量的连接,即postgresql.conf:
max_connections = 64重新启动PostgreSQL。
现在,以puppetdb用户身份验证连接是否实际工作:
su - puppetdb -s /bin/sh -c "psql -h localhost puppetdb"如果您正在使用SSL,请确保检查PostgreSQL SSL指南。
当调试DB问题时,状态端点可能很有用:
curl -X GET http://localhost:8080/status/v1/services | jq .发布于 2020-02-07 23:49:53
/var/lib/pgsql/11/data/pg_hba.conf希望将这一行添加到它的顶部。
host木偶数据库::1/24信任
我忘了贴这个问题了。(谢谢你的帮助:)
https://serverfault.com/questions/972448
复制相似问题