重新启动pgSQL时,我得到以下日志条目:
2010-02-10 16:08:05 EST LOG: received smart shutdown request 2010-02-10 16:08:05 EST LOG: autovacuum launcher shutting down 2010-02-10 16:08:05 EST LOG: shutting down 2010-02-10 16:08:05 EST LOG: database system is shut down 2010-02-10 16:08:07 EST LOG: database system was shut down at 2010-02-10 16:08:05 EST 2010-02-10 16:08:07 EST LOG: autovacuum launcher started 2010-02-10 16:08:07 EST LOG: database system is ready to accept connections 2010-02-10 16:08:07 EST LOG: connection received: host=[local] 2010-02-10 16:08:07 EST LOG: incomplete startup packet 2010-02-10 16:08:07 EST LOG: connection received: host=[local] 2010-02-10 16:08:07 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:08 EST LOG: connection received: host=[local] 2010-02-10 16:08:08 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:08 EST LOG: connection received: host=[local] 2010-02-10 16:08:08 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:09 EST LOG: connection received: host=[local] 2010-02-10 16:08:09 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:09 EST LOG: connection received: host=[local] 2010-02-10 16:08:09 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:10 EST LOG: connection received: host=[local] 2010-02-10 16:08:10 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:10 EST LOG: connection received: host=[local] 2010-02-10 16:08:10 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:11 EST LOG: connection received: host=[local] 2010-02-10 16:08:11 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:11 EST LOG: connection received: host=[local] 2010-02-10 16:08:11 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:12 EST LOG: connection received: host=[local] 2010-02-10 16:08:12 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:12 EST LOG: connection received: host=[local] 2010-02-10 16:08:12 EST FATAL: password authentication failed for user "postgres" 2010-02-10 16:08:12 EST LOG: connection received: host=[local] 2010-02-10 16:08:12 EST LOG: incomplete startup packet
我关于这个潜在的后果的问题是张贴在这里: https : //stackoverflow.com/questions/2238954/mdb2-says-connection-failed-db-logs-say-otherwise ,但我没有意识到这是发生在我问了这个问题,我认为这个问题的一部分是针对SF的。
编辑:我可以连接到数据库,并通常使用psql CLI和postgres用户操作东西。
你有什么问题?
你的服务器启动完全正常 – “数据库系统准备好接受连接”
只要准备就绪,就会尝试使用“postgres”帐户连接无效的密码,这似乎是来自本地服务器。
如果你问这些条目,而不是你,看起来有人正在对PostgreSQL进行字典攻击。 奇怪的是,看起来连接来自本地主机,所以他们可能会欺骗他们的源地址。
我build议放置一个防火墙,以限制只有需要它的IP访问。
如果你正在寻找任何其他的答案,你需要更具体一些。
这看起来非常像两件事情的组合:
– 您的pg_hba.conf不允许本地用户“postgres” – 您的rc.d脚本尝试通过以用户“postgres”连接本地数据库来获取数据库状态以确认启动
我build议检查rc脚本。 如果您看到实际情况如此,请修改脚本以提供密码或修改pg_hba.conf以信任该用户。 重新启动,看看错误消失了
有人也回答了这个在stackoverflow: https : //stackoverflow.com/questions/7038342/password-authentication-failed-for-user-postgres
Berry Langerak的第一个答案为我解决了这个问题。