Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Odoo 16 websocket problem with Nginx

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
nginxodoo16features
9 Răspunsuri
31664 Vizualizări
Imagine profil
GT Apps

Hello everyone,

I'm trying to deploy Odoo 16 on my server but I cannot make the chat works, the new messages are not displayed until I restart the web page.

I enabled multi workers mode and proxy_mode in my odoo.conf, and here is my nginx.conf (the same as Odoo documentation):

#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

# http -> https
server {
listen 80;
server_name odoo.gp;
rewrite ^(.*) https://$host$1 permanent;
}

server {
listen 443 ssl;
server_name odoo.gp;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;

# SSL parameters
ssl_certificate /etc/nginx/ssl/cert.pem;
ssl_certificate_key /etc/nginx/ssl/key.pem;
ssl_session_timeout 30m;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;

# log
access_log /var/log/nginx/access_odoo.gp.log;
error_log /var/log/nginx/error_odoo.gp.log;

# Redirect websocket requests to odoo gevent port
location /websocket {
proxy_pass http://odoochat;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
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;
}

# Redirect requests to odoo backend server
location / {
# 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;
proxy_redirect off;
proxy_pass http://odoo;
}

# common gzip
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;
}

Please help! Thanks!

0
Imagine profil
Abandonează
GT Apps
Autor

Is there anyone? :(

Imagine profil
GT Apps
Autor Cel mai bun răspuns

After many times digging, I found out where my problem is and fixed it. The problem is Google Chrome (and other chromium-based browsers) rejects the websocket connection due to my self-signed SSL certificate. On Firefox, it works fine. So I have to create my own CA certificate and add it to the trusted list of Google Chrome (as the instruction here https://dgu2000.medium.com/working-with-self-signed-certificates-in-chrome-walkthrough-edition-a238486e6858).

Hope it helps someone who facing the same problem when trying to deploy on local machine.

0
Imagine profil
Abandonează
Imagine profil
Abdul Halim
Cel mai bun răspuns

@Bojan Nišević adding in odoo-server.conf file.

xmlrpc_interface = 127.0.0.1

 solved my issue!

1
Imagine profil
Abandonează
Imagine profil
Abdul Kadhar
Cel mai bun răspuns

In Odoo18, I Got The Below Error From Terminal while Refreshing The Page. Also I Cant See Any Error From UI. (Like PopUp.)

RuntimeError: Couldn't bind the websocket. Is the connection opened on the evented port (8072)?




After Commanded Some Line Conf, It Working Correctly.

#workers = 4

#limit_memory_soft = 471974428

#limit_memory_hard = 3299788800

#limit_request = 1200

#limit_time_cpu = 1200

#limit_time_real = 2400

#max_cron_threads = 1


Thanks,
Abdul Kather S

0
Imagine profil
Abandonează
Imagine profil
deva
Cel mai bun răspuns

Here the error was also occurring because of the settings:


limit_memory_hard = 20132659200

limit_memory_soft = 1677721600

limit_request = 8192

limit_time_cpu = 3600

limt_time_real = 7200

limit_time_real_cron = -1

max_cron_threads = 1

workers = 25


Remove all of these settings from your conf file. 
It will work !

0
Imagine profil
Abandonează
Imagine profil
Byron Guerrero
Cel mai bun răspuns

I am also having the same issue I am on odoo17 and cant get it to work please help!

0
Imagine profil
Abandonează
Imagine profil
Nomazy
Cel mai bun răspuns

Same issue in Discuss, Inbound

With nginx no answer, even with refresh the browser (firefox or chrome) and in odoo log : POST /longpolling/poll HTTP/1.1" 404.

Without nginx, direct with http://localhost:8069, no answer and in odoo log : RuntimeError: Couldn't bind the websocket. Is the connection opened on the evented port (8072)?

nginx conf :

    server 127.0.0.1:8069;
}

upstream odoochat {
    server 127.0.0.1:8072 weight=1 fail_timeout=0;
}

server {
listen 80;
listen [::]:80;
        server_name localodoo.erp;
       
        # log
access_log /var/log/nginx16/accesslocalodoo.log;
error_log /var/log/nginx16/errorlocalodoo.log;

# Set headers for 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;

        # Set timeouts
        proxy_connect_timeout   3600;
        proxy_send_timeout      3600;
        proxy_read_timeout      3600;
       
        # Gzip
        send_timeout            3600;
        client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 500M;
sendfile on;

    location /websocket {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://odoochat;
proxy_redirect off;
}

           
    location / {
proxy_redirect off;
proxy_pass http://odoo;
add_header Access-Control-Allow-Origin *;
}

    # common gzip
    gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
    gzip on;
       
}>
In odoo conf :
xmlrpc_port = 8069
#xmlrpc_interface = 127.0.0.1
gevent_port = 8072
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
max_cron_threads = 1
workers = 4>

Please help
0
Imagine profil
Abandonează
Imagine profil
Mimacro
Cel mai bun răspuns

Greetings, 


I have this same error only with odoo version 16, I would like to know some solution if someone could solve it.


Thank you.

0
Imagine profil
Abandonează
Imagine profil
Bojan Nišević
Cel mai bun răspuns

I have the same issue, tried everything, /websocket configuration in nginx, proxy mode is True. Nothing helps. I am getting 

Websocket(request.httprequest.environ['socket'], request.session),

KeyError: 'socket'

0
Imagine profil
Abandonează
Imagine profil
CandidRoot Solutions Private Limited
Cel mai bun răspuns

Hello

Need to change in nginx.conf and odoo.conf as follow

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

# Redirect websocket requests to odoo gevent port
location /websocket {
proxy_pass http://odoochat;
proxy_set_header X-Real-IP $remote_addr;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
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;
}

Also add worker and max_cron_threads as per server configuration in /etc/odoo-server.conf

max_cron_threads = 1
workers = 4
db_name=DatabaseName
dbfilter=
proxy_mode=True

Thanks & Regards,

​

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat

0
Imagine profil
Abandonează
GT Apps
Autor

I don't see any difference in your suggestion. Anyway, I copied your config and still no luck :(

CandidRoot Solutions Private Limited

Hello Giang Pham,

Thank you for your feedback.

have you updated odoo.conf file as per my answer?

if you have still issue then i want to check your odoo log file and other configuration.

feel free to connect with me

CandidRoot Solutions Pvt. Ltd.
Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat

GT Apps
Autor

Yes, here is my odoo.conf:

[options]
addons_path = /opt/odoo/16.0/addons
admin_passwd = xxx
csv_internal_sep = ,
data_dir = /home/admin/.local/share/OpenERP
dbfilter =
db_host = 127.0.0.1
db_maxconn = 64
db_name = odoo16-demo
db_password = odoo
db_port = 5433
db_sslmode = prefer
db_template = template0
db_user = odoo
demo = {}
email_from = False
geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
gevent_port = 8072
http_enable = True
http_interface =
http_port = 8069
import_partial =
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 60
limit_time_real = 120
limit_time_real_cron = -1
list_db = False
log_db = False
log_db_level = warning
logfile = /home/admin/odoolog/odoo.log
log_handler = :INFO
log_level = info
max_cron_threads = 2
osv_memory_count_limit = False
pg_path =
pidfile =
proxy_mode = True
reportgz = False
screencasts =
screenshots = /tmp/odoo_tests
server_wide_modules = base,web
smtp_password = False
smtp_port = 25
smtp_server = localhost
smtp_ssl = False
smtp_user = False
syslog = False
test_enable = False
test_file =
test_tags = None
transient_age_limit = 1.0
translate_modules = ['all']
unaccent = True
upgrade_path =
without_demo = False
workers = 3

I don't know if this is a problem or not, but my nginx hosts multiple config files for multiple odoo instances, in both v15 and v16. The v15 instance work fine, only the v16 has this problem.

Bilal Chehab

Have the Same issue for multiple version of Odoo on the same server. Did you find any solution ?

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
v16 --x-sendfile cli option
nginx odoo16features x-sendfile
Imagine profil
Imagine profil
1
feb. 23
3995
Odoo 16 Multi Worker Configuration
nginx proxy odoo16features
Imagine profil
0
oct. 22
5066
DeprecationWarning: The longpolling-port is a deprecated alias to the gevent-port option, please use the latter Rezolvat
odoo16features
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
sept. 25
24882
How to Add wizard under print button inside the form view.
odoo16features
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
aug. 25
3795
How to add @api.onchange in _get_view() method odoo 16
odoo16features
Imagine profil
Imagine profil
1
mai 25
3703
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now