检查/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的重新阅读和错误应该消失。