postgresql Odoo (OpenERP8) 与 Postgre 的连接失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25228019/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 01:34:44  来源:igfitidea点击:

Odoo (OpenERP8) connection failed with Postgre

postgresqlconnectionodoo

提问by OdooMint

I just installed Odoo in Linux Mint. The installation process was correct. I have lost the database data when I installed Postgre and when I start openerp-server and load localhost:8069, the webpage displays: "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

我刚刚在 Linux Mint 中安装了 Odoo。安装过程是正确的。我在安装 Postgre 时丢失了数据库数据,当我启动 openerp-server 并加载 localhost:8069 时,网页显示:“服务器遇到内部错误,无法完成您的请求。服务器过载或有应用程序中的错误。”

And in Odoo log the error is:

在 Odoo 日志中,错误是:

2014-08-10 11:02:55,941 4924 ERROR ? openerp.addons.bus.bus: Bus.loop error, sleep and retry
Traceback (most recent call last):
  File "/home/xxxx/odoo/openerp/addons/bus/bus.py", line 136, in run
    self.loop()
  File "/home/xxxx/odoo/openerp/addons/bus/bus.py", line 114, in loop
    with openerp.sql_db.db_connect('postgres').cursor() as cr:
  File "/home/xxxx/odoo/openerp/sql_db.py", line 565, in cursor
    return Cursor(self.__pool, self.dbname, serialized=serialized)
  File "/home/xxxx/odoo/openerp/sql_db.py", line 176, in __init__
    self._cnx = pool.borrow(dsn(dbname))
  File "/home/xxxx/odoo/openerp/sql_db.py", line 458, in _locked
    return fun(self, *args, **kwargs)
  File "/home/xxxx/odoo/openerp/sql_db.py", line 521, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
  File "/usr/local/lib/python2.7/dist-packages/psycopg2-2.5.3-py2.7-linux-i686.egg/psycopg2/__init__.py", line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
OperationalError: fe_sendauth: no password supplied

how can I correct it and configure correctly the data connection between Odoo and Postgre? I'm new with these programs and thank a detailed step by step help to solve :)

如何更正它并正确配置 Odoo 和 Postgre 之间的数据连接?我是这些程序的新手,感谢详细的分步帮助解决:)

Thanks in advance!

提前致谢!

回答by moylop260

You can execute a --help command for known db parameters.

您可以为已知的数据库参数执行 --help 命令。

Database related options: -d DB_NAME, --database=DB_NAME specify the database name -r DB_USER, --db_user=DB_USER specify the database user name -w DB_PASSWORD, --db_password=DB_PASSWORD specify the database password --db_port=DB_PORT specify the database port

数据库相关选项: -d DB_NAME, --database=DB_NAME 指定数据库名 -r DB_USER, --db_user=DB_USER 指定数据库用户名 -w DB_PASSWORD, --db_password=DB_PASSWORD 指定数据库密码 --db_port=DB_PORT 指定数据库端口

example: openerp-server -d DB -r openerp -w 1234 --db_port=5432

示例: openerp-server -d DB -r openerp -w 1234 --db_port=5432