Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
5348 Переглядів

I have built custom modules in Odoo 16 community edition. 
Recently I noticed an error when I checked my log files. When I run my logs this error appears all the time: 

ERROR Production odoo.addons.bus.websocket: 400 Bad Request: Empty or missing header(s): upgrade

It doesn't disrupt any of the running processes and doesn't break any of my modules. I can't seem to find an origin for it. 

I'm trying to figure out where it's coming from and if anybody dealt with similar one before.

Thank you.

Аватар
Відмінити
Найкраща відповідь

You need to add in your nginx config :




upstream odoo {
    server 127.0.0.1:8070;
}

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

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




And in your odoo.conf :
proxy_mode = True
xmlrpc_port = 8070
xmlrpc_interface = 127.0.0.1
gevent_port = 8072 (default in odoo16)
workers = 2 or more
Аватар
Відмінити
Автор

I've tried something like this. That's what my nginx.conf looks like now:
location /websocket {
proxy_read_timeout 600s;
proxy_pass http://127.0.0.1:8069;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_pass http://odoochat;

But unfortunately the error is still there.

Related Posts Відповіді Переглядів Дія
1
бер. 24
2050
3
квіт. 22
14012
3
груд. 24
1956
3
бер. 15
7566
0
вер. 25
659