4

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
Andrius
  • 19,658
  • 37
  • 143
  • 243

2 Answers2

3

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
Andrius
  • 19,658
  • 37
  • 143
  • 243
  • 1
    What about here? I already had that thing installed but longpolling not working :( – user568021 Mar 23 '16 at 08:37
  • 1
    same as @user568021 – m3asmi May 26 '17 at 10:11
  • If you are on Ubuntu 16.04, `sudo apt install python-psycogreen` will do it. Rather strange though, that pkg in official repository is not listing it as dependency... – ruuter Jun 21 '17 at 19:49
  • I'm on Ubuntu Xenial and tried with pip install and apt install. Neither worked. The weird thing is that the listener DOES start on the longpolling_port (8072) however Odoo (10) still spits out the `bus.Bus unavailable` error. – Michael M Nov 22 '17 at 22:17
  • You have to do a reverse proxy for longpolling port if you are enanling workers. Here is a good guide. It is made for odoo 8, but works for newer versions too http://www.schenkels.nl/2014/12/reverse-proxy-with-odoo-8-nginx-ubuntu-14-04-lts/ – Andrius Nov 24 '17 at 06:51
1

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:

  1. Install the Python dependencies with the following command: sudo apt-get install python-dateutil python-docutils python-feedparser python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi poppler-utils python-pip python-pypdf python-passlib python-decorator gcc python-dev mc bzr python-setuptools python-markupsafe python-reportlab-accel python-zsi python-yaml python-argparse python-openssl python-egenix-mxdatetime python-usb python-serial lptools make python-pydot python-psutil python-paramiko poppler-utils python-pdftools antiword python-requests python-xlsxwriter python-suds python-psycogreen python-ofxparse python-gevent .

(Credits: https://www.getopenerp.com/install-odoo-10-on-ubuntu-16-04/ ).

  1. Make sure in your config you have workers = x X should be a number > 0

  2. 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