oddo v11 的问题 = 错误? werkzeug:请求错误:
Problem with oddo v11 = ERROR ? werkzeug: Error on request:
我刚开始使用 oddo v11,尝试 运行 odoo
时遇到下一个错误
这是输出:
(Leyendo la base de datos ... 167764 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar wkhtmltox-0.12.1_linux-trusty-amd64.deb ...
Desempaquetando wkhtmltox (0.12.1) sobre (0.12.1) ...
Configurando wkhtmltox (0.12.1) ...
Procesando disparadores para man-db (2.8.3-2ubuntu0.1) ...
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo$ sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo$ sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo$ cd /opt/odoo/odoo
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo/odoo$ ./odoo-bin
2020-02-15 04:34:46,420 18404 INFO ? odoo: Odoo version 11.0
2020-02-15 04:34:46,421 18404 INFO ? odoo: addons paths: ['/home/jose/.local/share/Odoo/addons/11.0', '/opt/odoo/odoo/odoo/addons', '/opt/odoo/odoo/addons']
2020-02-15 04:34:46,421 18404 INFO ? odoo: database: default@default:default
2020-02-15 04:34:46,460 18404 INFO ? odoo.service.server: HTTP service (werkzeug) running on jose-Lenovo-ideapad-330-15AST:8069
2020-02-15 04:34:46,621 18404 INFO ? odoo.addons.base.ir.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2020-02-15 04:35:33,745 18404 INFO ? odoo.addons.sms.wizard.send_sms: The `phonenumbers` Python module is not available. Phone number validation will be skipped. Try `pip3 install phonenumbers` to install it.
2020-02-15 04:35:34,213 18404 INFO ? odoo.http: HTTP Configuring static files
2020-02-15 04:35:34,218 18404 INFO ? odoo.sql_db: Connection to the database failed
2020-02-15 04:35:34,221 18404 INFO ? werkzeug: 127.0.0.1 - - [15/Feb/2020 04:35:34] "GET / HTTP/1.1" 500 -
2020-02-15 04:35:34,226 18404 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/opt/odoo/odoo/odoo/service/server.py", line 348, in app
return self.app(e, s)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 166, in application
return application_unproxied(environ, start_response)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 154, in application_unproxied
result = handler(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1321, in __call__
return self.dispatch(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1295, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1458, in dispatch
self.setup_db(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1390, in setup_db
httprequest.session.db = db_monodb(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1542, in db_monodb
dbs = db_list(True, httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1509, in db_list
dbs = odoo.service.db.list_dbs(force)
File "/opt/odoo/odoo/odoo/service/db.py", line 369, in list_dbs
with closing(db.cursor()) as cr:
File "/opt/odoo/odoo/odoo/sql_db.py", line 637, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/opt/odoo/odoo/odoo/sql_db.py", line 178, in __init__
self._cnx = pool.borrow(dsn)
File "/opt/odoo/odoo/odoo/sql_db.py", line 520, in _locked
return fun(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/sql_db.py", line 588, in borrow
**connection_info)
File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: no existe el rol «jose»
2020-02-15 04:45:23,773 18404 INFO ? odoo.sql_db: Connection to the database failed
2020-02-15 04:45:23,775 18404 INFO ? werkzeug: 127.0.0.1 - - [15/Feb/2020 04:45:23] "GET / HTTP/1.1" 500 -
2020-02-15 04:45:23,785 18404 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/opt/odoo/odoo/odoo/service/server.py", line 348, in app
return self.app(e, s)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 166, in application
return application_unproxied(environ, start_response)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 154, in application_unproxied
result = handler(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1321, in __call__
return self.dispatch(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1295, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1458, in dispatch
self.setup_db(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1390, in setup_db
httprequest.session.db = db_monodb(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1542, in db_monodb
dbs = db_list(True, httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1509, in db_list
dbs = odoo.service.db.list_dbs(force)
File "/opt/odoo/odoo/odoo/service/db.py", line 369, in list_dbs
with closing(db.cursor()) as cr:
File "/opt/odoo/odoo/odoo/sql_db.py", line 637, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/opt/odoo/odoo/odoo/sql_db.py", line 178, in __init__
self._cnx = pool.borrow(dsn)
File "/opt/odoo/odoo/odoo/sql_db.py", line 520, in _locked
return fun(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/sql_db.py", line 588, in borrow
**connection_info)
File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: no existe el rol «jose»
如果有人能帮我解决这个问题,我会非常感谢你。我已经使用这些命令配置了 Oddo。
https://github.com/mtsoftware2016/odoo11/blob/master/commands.txt#L32
感谢阅读。
no existe el rol «jose»
此错误意味着您正在尝试使用不存在的 db_user
jose
连接 Postgresql 数据库。
为 Odoo 创建数据库用户并在 Odoo 配置文件中相应地提供 db_user
和 db_password
:
sudo su postgres
createuser -s odoo
createuser -s your_user_name
exit
并尝试通过将目录更改为 cd /odoo/odoo-server
再次连接
然后输入 运行 ./odoo-bin
我刚开始使用 oddo v11,尝试 运行 odoo
时遇到下一个错误这是输出:
(Leyendo la base de datos ... 167764 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar wkhtmltox-0.12.1_linux-trusty-amd64.deb ...
Desempaquetando wkhtmltox (0.12.1) sobre (0.12.1) ...
Configurando wkhtmltox (0.12.1) ...
Procesando disparadores para man-db (2.8.3-2ubuntu0.1) ...
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo$ sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo$ sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo$ cd /opt/odoo/odoo
jose@jose-Lenovo-ideapad-330-15AST:/opt/odoo/odoo$ ./odoo-bin
2020-02-15 04:34:46,420 18404 INFO ? odoo: Odoo version 11.0
2020-02-15 04:34:46,421 18404 INFO ? odoo: addons paths: ['/home/jose/.local/share/Odoo/addons/11.0', '/opt/odoo/odoo/odoo/addons', '/opt/odoo/odoo/addons']
2020-02-15 04:34:46,421 18404 INFO ? odoo: database: default@default:default
2020-02-15 04:34:46,460 18404 INFO ? odoo.service.server: HTTP service (werkzeug) running on jose-Lenovo-ideapad-330-15AST:8069
2020-02-15 04:34:46,621 18404 INFO ? odoo.addons.base.ir.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2020-02-15 04:35:33,745 18404 INFO ? odoo.addons.sms.wizard.send_sms: The `phonenumbers` Python module is not available. Phone number validation will be skipped. Try `pip3 install phonenumbers` to install it.
2020-02-15 04:35:34,213 18404 INFO ? odoo.http: HTTP Configuring static files
2020-02-15 04:35:34,218 18404 INFO ? odoo.sql_db: Connection to the database failed
2020-02-15 04:35:34,221 18404 INFO ? werkzeug: 127.0.0.1 - - [15/Feb/2020 04:35:34] "GET / HTTP/1.1" 500 -
2020-02-15 04:35:34,226 18404 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/opt/odoo/odoo/odoo/service/server.py", line 348, in app
return self.app(e, s)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 166, in application
return application_unproxied(environ, start_response)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 154, in application_unproxied
result = handler(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1321, in __call__
return self.dispatch(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1295, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1458, in dispatch
self.setup_db(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1390, in setup_db
httprequest.session.db = db_monodb(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1542, in db_monodb
dbs = db_list(True, httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1509, in db_list
dbs = odoo.service.db.list_dbs(force)
File "/opt/odoo/odoo/odoo/service/db.py", line 369, in list_dbs
with closing(db.cursor()) as cr:
File "/opt/odoo/odoo/odoo/sql_db.py", line 637, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/opt/odoo/odoo/odoo/sql_db.py", line 178, in __init__
self._cnx = pool.borrow(dsn)
File "/opt/odoo/odoo/odoo/sql_db.py", line 520, in _locked
return fun(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/sql_db.py", line 588, in borrow
**connection_info)
File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: no existe el rol «jose»
2020-02-15 04:45:23,773 18404 INFO ? odoo.sql_db: Connection to the database failed
2020-02-15 04:45:23,775 18404 INFO ? werkzeug: 127.0.0.1 - - [15/Feb/2020 04:45:23] "GET / HTTP/1.1" 500 -
2020-02-15 04:45:23,785 18404 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/serving.py", line 193, in execute
application_iter = app(environ, start_response)
File "/opt/odoo/odoo/odoo/service/server.py", line 348, in app
return self.app(e, s)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 166, in application
return application_unproxied(environ, start_response)
File "/opt/odoo/odoo/odoo/service/wsgi_server.py", line 154, in application_unproxied
result = handler(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1321, in __call__
return self.dispatch(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1295, in __call__
return self.app(environ, start_wrapped)
File "/usr/local/lib/python3.6/dist-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/opt/odoo/odoo/odoo/http.py", line 1458, in dispatch
self.setup_db(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1390, in setup_db
httprequest.session.db = db_monodb(httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1542, in db_monodb
dbs = db_list(True, httprequest)
File "/opt/odoo/odoo/odoo/http.py", line 1509, in db_list
dbs = odoo.service.db.list_dbs(force)
File "/opt/odoo/odoo/odoo/service/db.py", line 369, in list_dbs
with closing(db.cursor()) as cr:
File "/opt/odoo/odoo/odoo/sql_db.py", line 637, in cursor
return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
File "/opt/odoo/odoo/odoo/sql_db.py", line 178, in __init__
self._cnx = pool.borrow(dsn)
File "/opt/odoo/odoo/odoo/sql_db.py", line 520, in _locked
return fun(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/sql_db.py", line 588, in borrow
**connection_info)
File "/usr/local/lib/python3.6/dist-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: no existe el rol «jose»
如果有人能帮我解决这个问题,我会非常感谢你。我已经使用这些命令配置了 Oddo。
https://github.com/mtsoftware2016/odoo11/blob/master/commands.txt#L32
感谢阅读。
no existe el rol «jose»
此错误意味着您正在尝试使用不存在的 db_user
jose
连接 Postgresql 数据库。
为 Odoo 创建数据库用户并在 Odoo 配置文件中相应地提供 db_user
和 db_password
:
sudo su postgres
createuser -s odoo
createuser -s your_user_name
exit
并尝试通过将目录更改为 cd /odoo/odoo-server
再次连接
然后输入 运行 ./odoo-bin