跳至内容
Odoo 菜单
  • 登录
  • 免费试用
  • 应用程序
    财务
    • 会计
    • 发票
    • 费用
    • 电子表格 (BI)
    • 文档
    • 电子签名
    销售
    • 客户关系管理
    • 销售
    • POS 销售点管理-零售
    • POS 销售点管理 - 餐厅
    • 订阅
    • 租赁
    网站
    • 网站设计
    • 电子商务
    • 博客
    • 论坛
    • 在线客服
    • 在线学习
    供应链
    • 库存
    • 制造
    • 产品生命周期
    • 采购
    • 维护保养
    • 品控
    人力资源
    • 员工
    • 招聘
    • 休假
    • 评价
    • 内部推荐
    • 车队
    营销
    • 社媒营销
    • 电邮营销
    • 短信营销
    • 近期活动
    • 营销自动化
    • 网上调查
    服务
    • 项目管理
    • 工时单
    • 现场服务
    • 服务台
    • 排期
    • 预约
    生产力
    • 讨论
    • 批核
    • IoT物联网
    • VoIP
    • 知识库
    • WhatsApp
    第三方应用软件 Odoo 定制 Odoo云端平台
  • 行业
    零售
    • 书店
    • 服装店
    • 家具店
    • 食品杂货店
    • 五金店
    • 玩具店
    餐饮与酒店服务
    • 酒吧及酒馆
    • 餐厅
    • 快餐
    • 民宿
    • 饮品分销商
    • 酒店
    房地产
    • 房地产代理
    • 建筑师事务所
    • 建造业
    • 地产管理
    • 园艺
    • 业主协会
    咨询
    • 会计师事务所
    • Odoo合作伙伴
    • 市场推广公司
    • 律师事务所
    • 人才招聘
    • 审核 & 认证
    制造
    • 纺织
    • 金属
    • 家具
    • 食品
    • 啤酒厂
    • 企业礼品
    保健与健身
    • 体育俱乐部
    • 眼镜店
    • 健身中心
    • 健康从业者
    • 药房
    • 发型屋
    商贸服务
    • 维修人员
    • IT 硬件及支持
    • 太阳能系统
    • 鞋匠
    • 清洁服务
    • 暖通空调服务
    其他
    • 非营利组织
    • 环境机构
    • 广告牌租赁
    • 摄影服务
    • 自行车租赁
    • 软件经销商
    浏览所有行业
  • 社区
    学习
    • 教学视频
    • 文档
    • 认证
    • 培训
    • 博客
    • 播客
    赋能教育
    • 教育计划
    • Scale Up! 商业游戏
    • 参观Odoo
    获取软件
    • 下载
    • 版本对比
    • 发布
    合作
    • Github
    • 论坛
    • 近期活动
    • 翻译
    • 成为合作伙伴
    • 合作伙伴服务
    • 注册您的会计事务所
    获取服务
    • 寻找合作伙伴
    • 查找会计服务
    • 预约顾问咨询
    • 安装及推行服务
    • 客户参考
    • 支持
    • 升级
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    获取演示
  • 定价
  • 技术支持

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

  • 客户关系管理
  • e-Commerce
  • 会计
  • 库存
  • PoS
  • 项目
  • MRP
All apps
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
帮助

Error (Real-time connection lost) Odoo 18 Community

订阅

此帖文有活动时,接收通知

此问题已终结
V18Odoo 18
12 回复
32913 查看
形象
Colin Harleman

My Odoo is showing a Yellow Box around the screen and the message "Real-time connection lost" when I login using my website address. Is there a fix to this? I am missing a port that needs to be open?

0
形象
丢弃
Waleed Ali Mohsen

This is a new feature added by Odoo lately to help you if there is a disconnection to the Odoo server so you need to check you Odoo and (nginx or apache) configuration

Colin Harleman
编写者

Setting workers in the Odoo.conf to my (CPU*2)+1 has not helped with the error message. The Error does not show up if I connect directly from the Windows Machine that is running Odoo (localhost:8069). It only appears when connecting through the IIS setup.

Lê Anh Tuấn

Same Error, anyone know fix it?

形象
Linescripts Softwares
最佳答案

Make sure you are adding 
proxy_mode = True

gevent_port = 8072

workers = 3

max_cron_threads = 1

longpolling_port = False



in your ngnix conf add /websocket block


location /websocket {

    proxy_pass http://odoochat;

    proxy_set_header Upgrade $http_upgrade;

    proxy_set_header Connection $connection_upgrade;

    proxy_set_header X-Forwarded-Host $http_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_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

#    proxy_cookie_flags session_id samesite=lax secure;  # requires nginx 1.19.8

  }

please do not forget to define these above your server block in ngninx

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

}



this solved my problem

5
形象
丢弃
Cabezalbus SL

This solved my problem too.

Many thanks.

Lê Anh Tuấn

Tks

Boussehal Abdelaziz

this solve my problem too in odoo 18 with docker-compose.
NB : not forget to bind port in docker-compose by default 8072.

形象
Fabio
最佳答案

Found this post, after a git pull update, Odoo 18.0 branch. Reverted changes to previous commit and the error is gone. I'm sure this is a recent bug to be identified yet.

1
形象
丢弃
Budi Hartono

Thanks for sharing this. Which commit ID did you revert to? I’d like to try using that commit as well.

Fabio

https://github.com/odoo/odoo/commit/958fbe0d3a52eac8c15e2a7e15d93cc9f8fc6f1a

Budi Hartono

I went back to that commit and it works! The ‘Real-time connection lost’ message is gone. I hope they fix this bug soon. Thanks, Fabio!

形象
Budi Hartono
最佳答案

I’m setting up a Digital Ocean VPS with 2GB RAM and 1 vCPU to run Odoo 18 Community. The server displays an error message “Real-time connection lost…” constantly on the bottom-right corner of the screen. I’ve changed the worker number in the Odoo Server configuration file and restarted the server, but the error persists. Interacting with the server indicates no issues. I can install the Odoo module or change settings. However, the message remains, suggesting a potential server connection problem which makes it impossible to know if there is a connection problem. Is this a bug?

PS: BTW, I have followed the tutorial video on this link: https://www.youtube.com/watch?v=Q1c5XpG85OE

1
形象
丢弃
形象
pratak rattanawila
最佳答案

I has same problem on odoo+nginx proxy mode configuration. any one can fix this?

1
形象
丢弃
形象
Eisentraut Theatres
最佳答案

I just fought with this exact issue for 2 straight days before I finally found the solution to my specific use case, so maybe this will help someone else.

I am running Odoo 18 Community, and its Postgres database, inside docker containers on Ubuntu. Both are created by a docker-compose.yml file. I am using Nginx as a reverse proxy installed on the main Ubuntu os, and Cloudflare for DNS and domain hosting.

The "accepted answer" for what to include in the Nginx config and the Odoo config are both a large part of what I needed, but the final needle in the haystack for my setup was that my docker-compose needed to also include port 8072 in it. I've also seen port 8071 indicated in places for something, so I added that too just in case. So my docker-compose is now:

version: '3'
services:
​odoo:
​ ​image: odoo:18.0
​ ​env_file: .env
​ ​depends_on:
​ ​ ​- postgres
​ ​ports:
​ ​ ​- "127.0.0.1:8069:8069"
​ ​ ​- "127.0.0.1:8072:8072"
​ ​ ​- "127.0.0.1:8071:8071"
​ ​volumes:
​ ​ ​- data:/var/lib/odoo
​ ​ ​- ./addons:/mnt/extra-addons
​ ​ ​- ./config:/etc/odoo
​ ​restart: unless-stopped
​postgres:
​ ​image: postgres:16
​ ​env_file: .env
​ ​volumes:
​ ​ ​- db:/var/lib/postgresql/data/pgdata
​ ​restart: unless-stopped

volumes:
​data:
​db:


Now that yellow box and message is gone :)

0
形象
丢弃
形象
Nicolas Sopizet
最佳答案

for all those struggling with nginx, just follow official documentation and posted solution
don't forget following block to enable connection upgrade in /websocket location

}
map $http_upgrade $connection_upgrade {
  default upgrade;
  ''      close;
}
0
形象
丢弃
形象
Colin Harleman
编写者 最佳答案

in your ngnix conf add /websocket block


location /websocket {

    proxy_pass http://odoochat;

    proxy_set_header Upgrade $http_upgrade;

    proxy_set_header Connection $connection_upgrade;

    proxy_set_header X-Forwarded-Host $http_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_header Strict-Transport-Security "max-age=31536000; includeSubDomains";

#    proxy_cookie_flags session_id samesite=lax secure;  # requires nginx 1.19.8

  }

please do not forget to define these above your server block in ngninx

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

}

How would I do with with IIS on Windows?

0
形象
丢弃
形象
Hector Medina
最佳答案

I'm having the same issue. It is driving me crazy. I'm using Bitnami's Odoo package bitnami com/stack/odoo/virtual-machine on a VM Google Cloud instance. This package uses Apache as proxy. I thought it had to do with the SSL certificates, so I generated SSL for the subdomain I'm using but that didn't work either. The "Real-time error" is still there and the chat does not work in real time, neither calls & video calls. Not sure what else might be affected with this "Real-time error".


Below the 400 error related to the websocket not working:


2025-01-27 05:54:34,051 77881 INFO bitnami_odoo werkzeug: 201.152.145.175 - - [27/Jan/2025 05:54:34] "GET /websocket?version=18.0-3 HTTP/1.1" 400 - 1 0.001 0.002


2025-01-27 05:54:37,942 77879 INFO bitnami_odoo werkzeug: 201.152.145.175 - - [27/Jan/2025 05:54:37] "GET /websocket?version=18.0-3 HTTP/1.1" 400 - 1 0.001 0.003


2025-01-27 05:54:39,253 77879 INFO bitnami_odoo werkzeug: 201.152.145.175 - - [27/Jan/2025 05:54:39] "GET /websocket?version=18.0-3 HTTP/1.1" 400 - 1 0.001 0.002


2025-01-27 05:54:40,693 77879 INFO bitnami_odoo werkzeug: 201.152.145.175 - - [27/Jan/2025 05:54:40] "GET /websocket?version=18.0-3 HTTP/1.1" 400 - 1 0.001 0.002


I tried troubleshooting with ChatGPT and Gemini with no luck. Would be great to know if this is a bug, so I could stop trying to figure a workaround. Any advice or update would be greatly appreciated!

0
形象
丢弃
形象
Rb Chang
最佳答案

I using nginx as a reverse proxy with HTTPS for my Odoo18 setup.


In the odoo.conf file:

  • When I set workers = (CPU*2)+1, the Nginx domain works fine, but accessing Odoo directly via http://{odoo_ip}:8069 throws a "Real-time connection lost" error.
  • On the other hand, if I do not set the workers parameter, the Nginx domain throws an error, but accessing Odoo directly via http://{odoo_ip}:8069 works without issues.

0
形象
丢弃
Rb Chang

Here is my nginx setting, exctually i am not really know using "websocket" or "longpolling" for odoo18 live -chat.
"""
upstream odoo_chat {
server {odoo_ip}:8072;
}

location /websocket {
proxy_pass http://odoo_chat;
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;

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
proxy_cookie_flags session_id samesite=lax secure;

proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
}

location /longpolling/ {
proxy_pass http://odoo_chat;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_read_timeout 3600s;
}
"""

形象
Onur
最佳答案

Hi,
I think this is about longpolling port is set and gevent port is not set.

I am fixed it with.
In odoo.conf .

longpolling_port = False
gevent_port = 8072

you can also look at ( I cant share Link because of karma. )
deprecationwarning-the-longpolling-port-is-a-deprecated-alias-to-the-gevent-port-option-please-use-the-latter-214918

0
形象
丢弃
Nano Dev

I tried fixed it, it still happens. But if I access it through port 8069 not show "Real-time connect lost...".

形象
Aleksey Anisimov
最佳答案

thanks Niyas ! but this is slightly different case in the YouTube video (man funny how people make it a 5 minutes videos these days! it's like one change in conf for number of worker processes :) 

What Fabio posted might be it, but kind of weird how would it be related

Colin were you able to find a fix for this? What does it mean anyways, is this connection to real-time chat, or something like this? 

PS tried Onur's suggestion but that didn't work for me..

0
形象
丢弃
形象
Niyas Raphy (Walnut Software Solutions)
最佳答案

Hi,
Can you check and see if this helps: Fix Connection Lost and Connection Restored Error Odoo

Thanks

-2
形象
丢弃
Lê Anh Tuấn

Not working!

喜欢讨论吗?不要只阅读,加入进来!

立即创建账户,享受专属功能,与我们的精彩社区互动!

注册
相关帖文 回复 查看 活动
How to Delete a Stale Project Folder?
Odoo 18
形象
形象
2
10月 25
671
Custom code: Value is empty in the list view when it is equal to 0
Odoo 18
形象
形象
1
6月 25
1790
Help using Cloudflare as CDN for Odoo SaaS 已解决
Odoo 18
形象
形象
1
6月 25
3579
Hide 'Apps' module from the HOME screen for users not set as 'Administrators'. 已解决
V18
形象
形象
1
6月 25
2194
Truenas Official docker odoo self hosted image no persistancy
V18
形象
1
5月 25
2502
社区
  • 教学视频
  • 文档
  • 论坛
开源
  • 下载
  • Github
  • Runbot
  • 翻译
服务
  • Odoo.sh 托管
  • 支持
  • 升级
  • 自定义开发服务
  • 教育
  • 查找会计服务
  • 寻找合作伙伴
  • 成为合作伙伴
关于我们
  • 我们的公司
  • 品牌资产
  • 联系我们
  • 招聘
  • 近期活动
  • 播客
  • 博客
  • 客户
  • 法律 • 隐私
  • 安全
الْعَرَبيّة 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致力于为企业管理提供高效智能的开源解决方案,是全球业内高速成长的软件服务商之一,逾七百五十万用户选择Odoo进行数字化升级。通过一系列全业务链覆盖、高度集成、简单易用的商业应用,助力企业实现信息化改革、降本增效并释放公司增长潜力。

Odoo独特的价值在于是一款非常容易使用又完全集成的应用。

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