2

我正在本地服务器上安装 openerp,我已经安装了它及其依赖项,但是在完成安装后,当我运行服务器'openerp-server'并使用0.0.0.0:8069/访问它时。我收到以下错误

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/controllers/main.py", line 709, in get_list
    return db_list(req)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/controllers/main.py", line 88, in db_list
    dbs = proxy.list()
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/netsvc.py", line 295, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/service/web_services.py", line 122, in dispatch
    return fn(*params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/service/web_services.py", line 351, in exp_list
    cr = db.cursor()
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 477, in cursor
    return Cursor(self._pool, self.dbname, serialized=serialized)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 183, in __init__
    self._cnx = pool.borrow(dsn(dbname))
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 378, in _locked
    return fun(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20130211_002141-py2.7.egg/openerp/sql_db.py", line 433, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
  File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
OperationalError: FATAL:  role "ghrix" does not exist

我没有认识到这个错误。还有一件事,我还没有编辑OpenERP 服务器配置文件。如果我必须编辑这个文件,那么这些变化是什么。

谢谢。

4

3 回答 3

5

此错误表明 OpenERP 正在尝试使用不存在的“ghrix”用户连接到 PostgreSQL 数据库服务器。这可能是您在其下启动服务器的用户。如果您已经为 OpenERP 创建了一个特殊的数据库用户,您需要在命令行中使用--db_user=DB_USER(在这种情况下您可能还需要--db_host=localhostand --db-password=YOUR_PASSWORD)指定它。
如果您还没有创建任何数据库用户,最简单的解决方案可能是创建一个名为的用户ghrix,例如:

$ sudo su - postgres
$ createuser -s ghrix  # -s to make a super-user that can create DBs

注意:用于./openerp-server --help查看 OpenERP 服务器所有可能的启动参数。您还可以将命令行选项放在配置文件中:只需执行

$ ./openerp-server -s

然后编辑在中创建的示例配置文件$HOME/.openerp_serverrc

于 2013-02-11T10:10:35.243 回答
0

尽管问题已经得到解答,以下是关于安装生产级 OpenERP 服务器的简明教程,其中还解释了如何设置数据库、管理访问权限和配置 OpenERP 安装:

http://www.theopensourcerer.com/2012/02/how-to-install-openerp-6-1-on-ubuntu-10-04-lts/

于 2013-02-12T13:41:09.723 回答
0

你应该检查两个案例

第一种情况:

$ sudo su - postgres $ createuser -s ghrix

第二种情况填写数据库用户和数据库密码

/odoo/debian/odoo.conf

使用此参数运行 odoo

./odoo-bin -c /opt/odoo/debian/odoo.conf

如果没有解决下面的评论,我会尝试解决它

于 2017-12-28T15:24:49.107 回答