Bỏ qua để đến Nội dung
Odoo Menu
  • Đăng nhập
  • Dùng thử miễn phí
  • Ứng dụng
    Tài chính
    • Kế toán
    • Hóa đơn
    • Chi phí
    • Bảng tính (BI)
    • Tài liệu
    • Ký tên
    Bán hàng
    • CRM
    • Bán hàng
    • POS Cửa hàng
    • POS Nhà hàng
    • Đăng ký
    • Cho thuê
    Trang web
    • Trình tạo trang web
    • Thương mại điện tử
    • Blog
    • Diễn đàn
    • Trò chuyện trực tiếp
    • Học trực tuyến
    Chuỗi cung ứng
    • Tồn kho
    • Sản xuất
    • PLM
    • Mua hàng
    • Bảo dưỡng
    • Chất lượng
    Nhân sự
    • Nhân viên
    • Tuyển dụng
    • Ngày nghỉ
    • Đánh giá
    • Giới thiệu
    • Đội xe
    Marketing
    • Marketing trên MXH
    • Marketing qua email
    • Marketing qua SMS
    • Sự kiện
    • Tự động hóa Marketing
    • Khảo sát
    Dịch vụ
    • Dự án
    • Bảng chấm công
    • Dịch vụ hiện trường
    • Hỗ trợ
    • Kế hoạch
    • Lịch hẹn
    Năng suất
    • Thảo luận
    • Phê duyệt
    • IoT
    • VoIP
    • Kiến thức
    • WhatsApp
    Ứng dụng của bên thứ ba Studio Odoo Nền tảng Đám mây Odoo
  • Ngành
    Bán lẻ
    • Nhà sách
    • Cửa hàng quần áo
    • Cửa hàng nội thất
    • Cửa hàng tạp hóa
    • Cửa hàng đồ kim khí
    • Cửa hàng đồ chơi
    Ẩm thực & Dịch vụ lưu trú
    • Bar và quán rượu
    • Nhà hàng
    • Đồ ăn nhanh
    • Guest house
    • Nhà phân phối đồ uống
    • Khách sạn
    Bất động sản
    • Công ty môi giới bất động sản
    • Công ty kiến trúc
    • Xây dựng
    • Quản lý bất động sản
    • Làm vườn
    • Hiệp hội chủ sở hữu bất động sản
    Tư vấn
    • Công ty kế toán
    • Đối tác Odoo
    • Công ty marketing
    • Công ty luật
    • Tuyển dụng
    • Thanh tra & chứng nhận
    Sản xuất
    • Dệt may
    • Kim loại
    • Nội thất
    • Ẩm thực
    • Nhà máy bia
    • Quà tặng doanh nghiệp
    Sức khoẻ & fitness
    • CLB thể thao
    • Cửa hàng kính mắt
    • Trung tâm fitness
    • Chuyên gia chăm sóc sức khỏe
    • Hiệu thuốc
    • Tiệm làm tóc
    Thương mại
    • Dịch vụ sửa chữa
    • Phần cứng CNTT & Hỗ trợ
    • Hệ thống năng lượng mặt trời
    • Công ty sản xuất giày
    • Dịch vụ vệ sinh
    • Dịch vụ HVAC
    Khác
    • Tổ chức phi lợi nhuận
    • Cơ quan môi trường
    • Cho thuê biển quảng cáo
    • Nhiếp ảnh
    • Cho thuê xe đạp
    • Đại lý phần mềm
    Xem tất cả ngành
  • Cộng đồng
    Học tập
    • Khóa học
    • Tài liệu
    • Chứng chỉ
    • Đào tạo
    • Blog
    • Podcast
    Thúc đẩy đào tạo
    • Chương trình đào tạo
    • Trò chơi kinh doanh Scale Up!
    • Tham quan Odoo
    Nhận phần mềm
    • Tải xuống
    • So sánh các phiên bản
    • Phiên bản
    Hợp tác
    • Github
    • Diễn đàn
    • Sự kiện
    • Dịch thuật
    • Trở thành đối tác
    • Dịch vụ dành cho Đối tác
    • Đăng ký công ty kế toán của bạn
    Nhận dịch vụ
    • Tìm đối tác
    • Tìm kế toán
    • Gặp chuyên gia hỗ trợ
    • Dịch vụ Triển khai
    • Khách hàng tham khảo
    • Hỗ trợ
    • Nâng cấp
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Nhận một buổi demo
  • Bảng giá
  • Trợ giúp

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

  • CRM
  • e-Commerce
  • Kế toán
  • Tồn kho
  • PoS
  • Dự án
  • MRP
All apps
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Hỗ trợ

Odoo 16 websocket problem with Nginx

Đăng ký nhận tin

Nhận thông báo khi có hoạt động trên bài viết này

Câu hỏi này đã bị gắn cờ
nginxodoo16features
9 Trả lời
31790 Lượt xem
Ảnh đại diện
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
Ảnh đại diện
Huỷ bỏ
GT Apps
Tác giả

Is there anyone? :(

Ảnh đại diện
GT Apps
Tác giả Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Abdul Halim
Câu trả lời hay nhất

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

xmlrpc_interface = 127.0.0.1

 solved my issue!

1
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Abdul Kadhar
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
deva
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Byron Guerrero
Câu trả lời hay nhất

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

0
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Nomazy
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Mimacro
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
Bojan Nišević
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
Ảnh đại diện
CandidRoot Solutions Private Limited
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
GT Apps
Tác giả

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
Tác giả

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 ?

Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!

Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!

Đăng ký
Bài viết liên quan Trả lời Lượt xem Hoạt động
v16 --x-sendfile cli option
nginx odoo16features x-sendfile
Ảnh đại diện
Ảnh đại diện
1
thg 2 23
4004
Odoo 16 Multi Worker Configuration
nginx proxy odoo16features
Ảnh đại diện
0
thg 10 22
5070
DeprecationWarning: The longpolling-port is a deprecated alias to the gevent-port option, please use the latter Đã xử lý
odoo16features
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
5
thg 9 25
24983
How to Add wizard under print button inside the form view.
odoo16features
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
3
thg 8 25
3814
How to add @api.onchange in _get_view() method odoo 16
odoo16features
Ảnh đại diện
Ảnh đại diện
1
thg 5 25
3722
Cộng đồng
  • Khóa học
  • Tài liệu
  • Diễn đàn
Open source
  • Tải xuống
  • Github
  • Runbot
  • Dịch thuật
Dịch vụ
  • Lưu trữ Odoo.sh
  • Hỗ trợ
  • Nâng cấp
  • Phát triển tùy chỉnh
  • Đào tạo
  • Tìm kế toán
  • Tìm đối tác
  • Trở thành đối tác
Giới thiệu công ty
  • Công ty của chúng tôi
  • Tài sản thương hiệu
  • Liên hệ
  • Việc làm
  • Sự kiện
  • Podcast
  • Blog
  • Khách hàng
  • Pháp lý • Riêng tư
  • Bảo mật
الْعَرَبيّة 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 là bộ ứng dụng kinh doanh có open source đáp ứng tất cả các nhu cầu của công ty bạn: CRM, thương mại điện tử, kế toán, tồn kho, POS, quản lý dự án, v.v.

Định hướng giá trị riêng biệt của Odoo là tích hợp hoàn toàn và dễ dàng sử dụng.

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