There seems to be a problem with Debian distributions (tested for both Wheezy and Squeeze) using Odoo for longpolling port. longpolling port is never used. It supposed to be used wen workers
parameter is set to be greater than 0
, but it is not used anyway. But testing same thing on Ubuntu, longpolling port is used normally.
There is an original Question (last comment of the issue) https://github.com/odoo/odoo/issues/3793
checking nginx log I see this (everytime it tries to access longpolling through reverse proxy):
2015/05/08 07:54:09 [error] 32494#0: *8 connect() failed (111: Connection refused) while connecting to upstream, client: IP address, server: _, request: "POST /longpolling/poll HTTP/1.1", upstream: "http://127.0.0.1:8072/longpolling/poll", host: "db.host.eu", referrer: "http://db.host.eu/web"
And when I try to connect to 8072
port via telnet:
$ telnet 127.0.0.1 8072
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
But trying for example:
$ telnet 127.0.0.1 8069
Trying 127.0.0.1...
Connected to 127.0.0.1.
So it seems that 8072 port is not used? In my odoo config it is set to be like this:
longpolling_port = 8072
xmlrpc_port = 8069
workers = 2
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
The problem was quite simple, but yet disguised. It was missing python package psycogreen
. But it was not mentioned as dependency and when installing im_chat
it didn't require such package. So if you were running Odoo with --workers=0
, then installed im_chat
and later switched to for example --workers=2
, Odoo would not throw any error and longpolling port would never be opened.
Installing this solved it:
pip install psycogreen==1.0
Maybe you fixed it already, but seeing i have been looking for an answer and found a fix i'll post it. This made my Odoo 10 Enterprise installation work again:
(Credits: https://www.getopenerp.com/install-odoo-10-on-ubuntu-16-04/ ).
Make sure in your config you have workers = x X should be a number > 0
If you are running behind a reverse proxy (apache / nginx), make sure your config file has the following line: proxy_mode = True
Hope this helps others who are having a similar issue
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.