我有一个关于 Openerp 的问题,你能帮我吗?
ERROR ? openerp.sql_db: Connection to the database failed
Traceback (most recent call last):
File "/opt/openerp/server/openerp/sql_db.py", line 440, in borrow
result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
OperationalError: fe_sendauth: no password supplied
最佳答案
检查您的/etc/openerp/openerp-server.conf 并确保您至少设置了以下选项:
db_host = (usually localhost)
db_port = (usually 5432)
db_user =
db_password =
尝试通过运行手动连接到您的数据库:
psql -d postgres -U <YOUR DATABASE USERNAME> -W
如果这有效(你应该得到类似“postgres=>”的提示,按 ctrl+d 退出它)但错误仍然存在于 OpenERP 中,这可能是因为你运行 Ubuntu/Debian 并且你刚刚安装了你的 OpenERP包裹。出现该错误是因为 init 脚本无法在软件包安装后自动终止 dpkg 自动启动的第一个 openerp Python 进程。要解决此问题,请运行:
# ps aux|grep openerp
你会看到一行看起来像这样:
openerp 14438 0.3 0.8 235096 69060 ? Sl 03:23 0:00 /usr/bin/python /usr/bin/openerp-server --config=/etc/openerp/openerp-server.conf --logfile=/var/log/openerp/openerp-server.log
第一个数字是 Python 进程的 pid。通过运行终止进程:
kill -9 14438
然后通过运行再次重启你的 openerp 服务器:
/etc/init.d/openerp restart
您的 openerp-server.conf
现在应该被 OpenERP 重新读取并且错误应该消失。
关于postgresql - Openerp 7.0 错误数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15669404/