老大,谢了,又明白了一点点。
不过又出现了一些问题,
指定用户登陆,用的却是别的数据库:[code]
wen@wen-d:~$ openerp-server -r openerp
[2009-08-31 21:48:23,963] INFO:server:version - 5.0.0
[2009-08-31 21:48:23,963] INFO:server:addons_path -
/usr/lib/openerp-server/addons
[2009-08-31 21:48:23,963] INFO:server:database hostname - localhost
[2009-08-31 21:48:23,964] INFO:server:database port - 5432
[2009-08-31 21:48:23,964] INFO:server:database user - openerp
[2009-08-31 21:48:23,964] INFObjects:initialising distributed objects
services
[2009-08-31 21:48:24,199] INFO:web-services:starting XML-RPC services,
port 8069
[2009-08-31 21:48:24,199] INFO:web-services:starting NET-RPC service,
port 8070
[2009-08-31 21:48:24,200] INFO:web-services:the server is running,
waiting for connections...
[2009-08-31 21:48:32,287] INFO:dbpool:Connecting to template1
[2009-08-31 21:48:32,300] INFO:dbpool:Closing all connections to template1
Closing connection <connection object at 0x152cc80; dsn: 'user=openerp
dbname=template1', closed: 0>
[/code]指定数据库用户名和数据库,我也不知道是什么错误了:[code]
wen@wen-d:~$ openerp-server -r openerp
[2009-08-31 21:48:23,963] INFO:server:version - 5.0.0
[2009-08-31 21:48:23,963] INFO:server:addons_path -
/usr/lib/openerp-server/addons
[2009-08-31 21:48:23,963] INFO:server:database hostname - localhost
[2009-08-31 21:48:23,964] INFO:server:database port - 5432
[2009-08-31 21:48:23,964] INFO:server:database user - openerp
[2009-08-31 21:48:23,964] INFObjects:initialising distributed objects
services
[2009-08-31 21:48:24,199] INFO:web-services:starting XML-RPC services,
port 8069
[2009-08-31 21:48:24,199] INFO:web-services:starting NET-RPC service,
port 8070
[2009-08-31 21:48:24,200] INFO:web-services:the server is running,
waiting for connections...
[2009-08-31 21:48:32,287] INFO:dbpool:Connecting to template1
[2009-08-31 21:48:32,300] INFO:dbpool:Closing all connections to template1
Closing connection <connection object at 0x152cc80; dsn: 'user=openerp
dbname=template1', closed: 0>
[/code]指定数据库,它却用系统里的用户登陆:[code]
wen@wen-d:~$ openerp-server -d openerp
[2009-08-31 21:52:16,328] INFO:server:version - 5.0.0
[2009-08-31 21:52:16,328] INFO:server:addons_path -
/usr/lib/openerp-server/addons
[2009-08-31 21:52:16,329] INFO:server:database hostname - localhost
[2009-08-31 21:52:16,329] INFO:server:database port - 5432
[2009-08-31 21:52:16,329] INFO:server:database user - wen
[2009-08-31 21:52:16,329] INFObjects:initialising distributed objects
services
[2009-08-31 21:52:16,563] INFO:dbpool:Connecting to openerp
[2009-08-31 21:52:16,578] ERROR:dbpool:Unable to connect to openerp: 致
命错误: role "wen" does not exist
Traceback (most recent call last):
File "./openerp-server.py", line 108, in <module>
pooler.get_db_and_pool(db, update_module=tools.config['init'] or
tools.config['update'])
File "/usr/lib/openerp-server/pooler.py", line 29, in get_db_and_pool
db = get_db_only(db_name)
File "/usr/lib/openerp-server/pooler.py", line 71, in get_db_only
db = sql_db.db_connect(db_name)
File "/usr/lib/openerp-server/sql_db.py", line 239, in db_connect
return PoolManager.get(db_name)
File "/usr/lib/openerp-server/sql_db.py", line 223, in get
cls._pools[db_name] = ConnectionPool(ThreadedConnectionPool(1,
cls.maxconn, cls.dsn(db_name)), db_name)
File "/usr/lib/python2.5/site-packages/psycopg2/pool.py", line 161, in
init
self, minconn, maxconn, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/psycopg2/pool.py", line 76, in
init
self._connect()
File "/usr/lib/python2.5/site-packages/psycopg2/pool.py", line 80, in
_connect
conn = psycopg2.connect(*self._args, **self._kwargs)
psycopg2.OperationalError: 致命错误: role "wen" does not exist
[/code]我想可能要指定配置文件才能解决问题,顺便问一下
openerp-server.py --config=/PATH/TO/openerp-server.conf
/PATH/TO/openerp-server.conf是指哪里的地址?
如果我直接用openerp-server.py --config=/etc/openerp-server.conf,是不是就指定了/etc/openerp-server.conf为openerp的配置文件了呢?
[[i] 本帖最后由 paridis 于 2009-9-1 16:02 编辑 [/i]]