我想在Ubuntu的12.04裏面安裝一個lxc容器的openerp 7。數據庫服務器位於主機上。一切工作正常,但當我第一次嘗試訪問Web客戶端時,我在瀏覽器中(在終端中)出現錯誤,說明openerp無法連接到數據庫服務器。 這裏是我的OpenERP-server.conf文件:在不同的機器上安裝openerp 7和db服務器
2013-01-08 22:46:39,688 654 INFO ? openerp: OpenERP version 7.0-20130106-001538
2013-01-08 22:46:39,688 654 INFO ? openerp: addons paths: /opt/openerp/server/openerp/addons
2013-01-08 22:46:39,688 654 INFO ? openerp: database hostname: localhost
2013-01-08 22:46:39,688 654 INFO ? openerp: database port: 5432
2013-01-08 22:46:39,688 654 INFO ? openerp: database user: openerp
2013-01-08 22:46:40,106 654 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
2013-01-08 22:46:40,106 654 INFO ? openerp: OpenERP server is running, waiting for connections...
日誌:
[options]
; This is the password that allows database operations:
; admin_passwd = admin
debug_mode = True
db_host = '10.0.3.1'
db_port = 5432
db_user = openerp
db_password = openerp
db_name = openerp
logfile = /var/log/openerp/openerp-server.log
我也試圖與
db_host = 10.0.3.1
當我開始我得到這個信息的郵件服務器文件具有777個權限並且爲空。 這是錯誤的一部分,當我嘗試從瀏覽器訪問的OpenERP:
ERROR postgres openerp.sql_db: Connection to the database failed
Traceback (most recent call last):
File "/opt/openerp/server/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: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
2013-01-08 22:48:21,553 654 ERROR postgres openerp.netsvc: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Traceback (most recent call last):
File "/opt/openerp/server/openerp/netsvc.py", line 289, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp/server/openerp/service/web_services.py", line 122, in dispatch
return fn(*params)
的數據庫服務器接受來自LXC容器連接,我創建了一個小的Python腳本測試這和它的工作。
謝謝
可能的原因是服務器沒有使用該配置文件。 –