Reputation: 691
Is there a way to use odoo longpolling without having reverse proxy and domain name ?
I'm using <IP_Address>:<port_no>
format for my instance. Longpolling is set to 8072
, multi processing is enabled (worker not equal to 0), proxy_mode = True
but I'm getting bus error as below:
2021-02-15 16:17:56,874 20 INFO PMS werkzeug: 156.222.82.1 - - [15/Feb/2021 16:17:56] "POST /longpolling/poll HTTP/1.1" 200 -
2021-02-15 16:18:14,852 20 DEBUG PMS odoo.modules.registry: Multiprocess signaling check: [Registry - 333 -> 333] [Cache - 7299 -> 7299]
2021-02-15 16:18:14,854 20 ERROR PMS odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 642, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 334, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/service/model.py", line 101, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 327, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 942, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 507, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/odoo/addons/bus/controllers/main.py", line 35, in poll
raise Exception("bus.Bus unavailable")
Exception: bus.Bus unavailable
Thanks !
Upvotes: 1
Views: 2145
Reputation: 404
You can't. If you are in production environment its better if you have a domain with ssl and a server like apache & nginx to work with the long-polling feature (multi threading) witch enable more people to access odoo at the same time and its more secure. But if you are in a test environment or few users ~6 you don't need a reverse proxy and long-polling feature just deactivate it.
Read more here
To achieve such a thing, you’ll need to deploy a reverse proxy in front of Odoo, like nginx or apache. When doing so, you’ll need to forward some more http Headers to Odoo, and activate the proxy_mode in Odoo configuration to have Odoo read those headers. link
Odoo transmits authentication information in cleartext. This means a secure deployment of Odoo must use HTTPS. SSL termination can be implemented via just about any SSL termination proxy. link
Upvotes: 1