odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
38.2k stars 24.81k forks source link

[14.0]bus.Bus unavailable #103221

Open filwu8 opened 2 years ago

filwu8 commented 2 years ago

Impacted versions: doo 14.0 20221005

Steps to reproduce: when i set odoo.conf workers>0 proxy_mode = True

Current behavior:

2022-10-14 16:36:27,652 37 INFO ErpV2 werkzeug: 227.167.141.124 - - [14/Oct/2022 16:36:27] "POST /longpolling/poll HTTP/1.1" 200 - 2 0.001 0.007 2022-10-14 16:36:47,669 50 ERROR ErpV2 odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch result = self._call_function(self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 347, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in call return self.method(*args, *kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap response = f(args, kw) File "/usr/lib/python3/dist-packages/odoo/addons/hr_presence/controllers/bus_controller.py", line 24, in poll return super(BusController, self).poll(channels, last, options=options) File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap response = f(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/addons/bus/controllers/main.py", line 35, in poll raise Exception("bus.Bus unavailable") Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception raise exception.with_traceback(None) from new_cause Exception: bus.Bus unavailable 2022-10-14 16:36:47,672 50 INFO ErpV2 werkzeug: 227.167.141.124 - - [14/Oct/2022 16:36:47] "POST /longpolling/poll HTTP/1.1" 200 - 5 0.002 0.007 2022-10-14 16:37:01,666 30 ERROR ErpV2 odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch result = self._call_function(self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 347, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in call return self.method(*args, *kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap response = f(args, kw) File "/usr/lib/python3/dist-packages/odoo/addons/hr_presence/controllers/bus_controller.py", line 24, in poll return super(BusController, self).poll(channels, last, options=options) File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap response = f(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/addons/bus/controllers/main.py", line 35, in poll raise Exception("bus.Bus unavailable") Exception

The above exception was the direct cause of the following exception: must be discovered to send Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception raise exception.with_traceback(None) from new_cause Exception: bus.Bus unavailable

Expected behavior:

Or must be discovered to send, received messages

my apache ini

<VirtualHost *:443>

ServerName erptest.example.com
SSLEngine on
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4
SSLCertificateFile C:/wamp64/bin/apache/apache2.4.39/cert/erpv2/public.crt
SSLCertificateKeyFile C:/wamp64/bin/apache/apache2.4.39/cert/erpv2/erpv2.key
SSLCertificateChainFile C:/wamp64/bin/apache/apache2.4.39/cert/erpv2/chain.crt

<IfModule mod_rewrite.c>
  RewriteEngine On

  # Permanent redirect (301 HTTP) if no canonical domain name
  RewriteCond %{HTTP_HOST} !^erptest.example.com
  RewriteRule ^/(.*)$ https://erptest.example.com/$1 [R=301,NE,L]
</IfModule>

<Location "/" >
  Order deny,allow
  Deny from all
  Allow from all
</Location>

<Location "/web/database/manager" >
  Order deny,allow
  Deny from all
  Allow from 192.168.0.0/24 127.0.0.0/255.0.0.0 ::1/128
</Location>

<Location "/website/info" >
  Order deny,allow
  Deny from all
  Allow from 192.168.0.0/24 127.0.0.0/255.0.0.0 ::1/128
</Location> 

RemoteIPHeader x-forwarded-for
RemoteIPInternalProxy 127.0.0.1

ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8069/ retry=0
ProxyPassReverse / http://127.0.0.1:8069/  retry=0

ProxyPass /longpolling/ http://127.0.0.1:8072/longpolling/ retry=0
ProxyPassReverse /longpolling/ http://127.0.0.1:8072/longpolling/  retry=0

filwu8 commented 2 years ago

2022-10-16 06:58:22,575 33 INFO erp werkzeug: 192.168.0.1 - - [16/Oct/2022 06:58:22] "POST /longpolling/im_status HTTP/1.1" 200 - 5 0.002 0.010 2022-10-16 06:58:26,565 30 ERROR erp odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/odoo/http.py", line 683, in dispatch result = self._call_function(self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 359, in _call_function return checked_call(self.db, *args, *kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper return f(dbname, args, kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 347, in checked_call result = self.endpoint(*a, kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 912, in call return self.method(*args, *kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap response = f(args, kw) File "/usr/lib/python3/dist-packages/odoo/addons/hr_presence/controllers/bus_controller.py", line 24, in poll return super(BusController, self).poll(channels, last, options=options) File "/usr/lib/python3/dist-packages/odoo/http.py", line 531, in response_wrap response = f(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/addons/bus/controllers/main.py", line 35, in poll raise Exception("bus.Bus unavailable") Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 639, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception raise exception.with_traceback(None) from new_cause Exception: bus.Bus unavailable

Sn0w3y commented 1 year ago

Hello,

i have the same Problem. What did you do to solve the issue ?

filwu8 commented 1 year ago

hello, i just change port

http_port = 8072 longpolling_port = 8069

and apache httpd example :

RewriteEngine on
ProxyPreserveHost On
ProxyRequests Off   
ProxyPass / http://127.0.0.1:8069/ retry=0
ProxyPassReverse / http://127.0.0.1:8069/
filwu8 commented 1 year ago

现在已经不出错了,我用 不用http service (werkzeug) 改成全部跑在 evented service (longpolling) 模式下,这个问题好像只有在容器环境会发生,在别的环境不会发生。