Odoo Help

1
8 Answers
1

Hi All,

We have found solution for this problem. There is misleading information in official documentation regarding proxy configuration for chat feature. The port should not be '8072' instead it should be port used by Odoo (by default '8069').  Or just remove following lines form your proxy configuration:


# Needed for real time message / chat feature (longpolling)

    ProxyPass /longpolling/poll http://127.0.0.1:8072/longpolling/poll/ timeout=900

    ProxyPass /longpolling/poll/ http://127.0.0.1:8072/longpolling/poll/ timeout=900

    ProxyPassReverse /longpolling/poll/ http://127.0.0.1:8072/longpolling/poll/


Works well for us, tested on two separate projects ;)

1
Laps Solutions Limited
17-5-22 下午8:26

i am using Nginx on 10E. We get the same situation - IM is not working. Browser refresh/reload in order to post the message to the chatbox.  I try the same database in a local vm without proxy server (ngnix) it works. No idea how to solve it. 


0
mstephenson@werokllc.com
18-4-30 上午1:47

The post on 6/29/17, 2:19 AM by Hadron for business sp. z o.o. is what worked for me. After hours of scratching my head trying to figure this out, I found this post. 

My conf file now looks like this:


upstream odoo {

     server 127.0.0.1:8069;

}

upstream odoochat {

     server 127.0.0.1:8069;

}

...

location /longpolling {

     proxy_connect_timeout 600;

     proxy_send_timeout 600;

     proxy_read_timeout 600;

     send_timeout 600;

     proxy_pass http://odoochat;

}

0

Hadron has the answer!

Tested his solution on five different servers, works perfectly.

Just disable the longpolling proxy pass and everything works.

Thanks

0
Piotr Cierkosz
18-3-6 上午3:17

Same at v9. Used couple templates, changed longpolling settings but it does not work;/ Hadron solution worked for v10

2 Comments
Hadron for business sp. z o.o.
18-3-6 上午4:26

Hi Piotr,

Please share more config details, we can check on v9 as well.

Piotr Cierkosz, Piotr Cierkosz
18-3-6 上午5:32

Config:

limit_memory_hard = 13690208256

limit_memory_soft = 11408506880

limit_request = 8192

limit_time_cpu = 600

limit_time_real = 1200

list_db = True

log_db = False

log_db_level = warning

log_handler = :INFO

log_level = info

logfile = /var/log/odoo/odoo-server.log

logrotate = True

longpolling_port = 8072

max_cron_threads = 2

osv_memory_age_limit = 1.0

osv_memory_count_limit = False

pg_path = None

pidfile = False

proxy_mode = True

reportgz = False

server_wide_modules = web,web_kanban

smtp_password = False

smtp_port = 25

smtp_server = localhost

smtp_ssl = False

smtp_user = False

syslog = False

test_commit = False

test_enable = False

test_file = False

test_report_directory = False

translate_modules = ['all']

unaccent = False

without_demo = False

workers = 17

xmlrpc = True

xmlrpc_interface =

xmlrpc_port = 8069

Nginx:

#odoo server

upstream odoo {

server localhost:8069;

}

upstream odoochat {

server 127.0.0.1:8072;

}

# http -> https

server {

listen 80;

server_name xxxx.com;

rewrite ^(.*) https://$host$1 permanent;

}

server {

listen 443;

server_name xxxx.com;

proxy_read_timeout 720s;

proxy_connect_timeout 720s;

proxy_send_timeout 720s;

# Add Headers for odoo proxy mode

proxy_set_header X-Forwarded-Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

# Add Headers for odoo proxy mode

proxy_set_header X-Forwarded-Host $host;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto $scheme;

proxy_set_header X-Real-IP $remote_addr;

# SSL parameters

ssl on;

ssl_certificate /etc/xxx;

ssl_certificate_key /etc/xxx;

ssl_session_timeout 30m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:$

ssl_prefer_server_ciphers on;

# log

access_log /var/xxxx;

error_log /var/xxxx;

# Redirect requests to odoo backend server

location / {

proxy_redirect off;

proxy_pass http://odoo;

}

location /longpolling {

proxy_pass http://127.0.0.1:8072;

}

# common gzip

gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;

gzip on;

}

It is quite generic config (followed Odoo docs and some tips from the Odoo Dev Cookbook). Also according the docs there could be an issue with db_maxcon http://odoo-development.readthedocs.io/en/latest/admin/db_maxconn.html as it is surely greater than 100.

BTW: I am also from Poland ;)Dzieki

0
Rachid
17-5-26 上午6:06

Same problem in the version 8

Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now