This question has been flagged
7 Replies
12071 Views

Hello,

We have problems with 'Discuss' module in Odoo v10CE on SSL connection. When connected vie SSL chat frame is not refreshing automatically. When user is typing a message after sending it the message is not visible in the chat. It shows up only after manual page refresh. 


We have tried different Apache configuration without success. Seems Java code used in this module is not supporting https connections. Any ideas how to solve this?


Avatar
Discard
Author Best Answer

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 ;)

Avatar
Discard
Best Answer

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. 


Avatar
Discard
Best Answer

Hello everyone, who can help me, the same trouble with messages, I can show the files, I have already tried different configurations but nothing helps

Odoo 16, Ubuntu 22.04

Avatar
Discard
Best Answer

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;

}

Avatar
Discard
Best Answer

Hadron has the answer!

Tested his solution on five different servers, works perfectly.

Just disable the longpolling proxy pass and everything works.

Thanks

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

Hi Piotr,

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

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

Best Answer

Same problem in the version 8

Avatar
Discard