我正在我的本地服务器上安装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服务器配置文件。如果我必须编辑此文件,那么这些更改是什么。
感谢。
答案 0 :(得分:5)
此错误表示OpenERP正在尝试使用“ghrix”用户连接到PostgreSQL数据库服务器,该用户不存在。这可能是您启动服务器的用户。
如果您为OpenERP创建了一个特殊的数据库用户,则需要使用--db_user=DB_USER
在命令行中指定它(在这种情况下,您可能还需要--db_host=localhost
和--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
答案 1 :(得分:0)
即使问题已经得到解答,以下是有关安装生产级OpenERP服务器的简明教程,该教程还介绍了如何设置数据库,管理访问权限以及配置OpenERP安装:
http://www.theopensourcerer.com/2012/02/how-to-install-openerp-6-1-on-ubuntu-10-04-lts/
答案 2 :(得分:0)
你应该检查两个案例
第一种情况:
$ sudo su - postgres $ createuser -s ghrix
第二种情况 填写
中的db用户和db密码/odoo/debian/odoo.conf
使用此参数运行odoo
./ odoo-bin -c /opt/odoo/debian/odoo.conf
如果未解决以下评论我尝试解决它