gpt4 book ai didi

nginx - Odoo(在 Debian 上)- longpolling 端口从未使用/打开

转载 作者:行者123 更新时间:2023-12-01 13:55:00 25 4
gpt4 key购买 nike

使用 Odoo 进行长轮询端口的 Debian 发行版(针对 Wheezy 和 Squeeze 进行了测试)似乎存在问题。从未使用长轮询端口。它应该用于 wen workers参数设置为大于 0 ,但无论如何它都没有使用。但是在 Ubuntu 上测试同样的东西,longpolling 端口是正常使用的。

有一个原始问题(该问题的最后一条评论)https://github.com/odoo/odoo/issues/3793

检查 nginx 日志我看到了这个(每次它尝试通过反向代理访问 longpolling 时):

2015/05/08 07:54:09 [error] 32494#0: *8 connect() failed (111: Connection refused) while connecting to upstream, client: IP address, server: _, request: "POST /longpolling/poll HTTP/1.1", upstream: "http://127.0.0.1:8072/longpolling/poll", host: "db.host.eu", referrer: "http://db.host.eu/web"

当我尝试连接到 8072 时通过telnet端口:
$ telnet 127.0.0.1 8072
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

但是尝试例如:
$ telnet 127.0.0.1 8069
Trying 127.0.0.1...
Connected to 127.0.0.1.

所以好像没有使用8072端口?
在我的 odoo 配置中,它被设置成这样:
longpolling_port = 8072
xmlrpc_port = 8069
workers = 2
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1

最佳答案

问题很简单,但又是伪装的。缺少 python 包 psycogreen .但是在安装 im_chat 时没有提到它作为依赖项它不需要这样的包。因此,如果您使用 --workers=0 运行 Odoo ,然后安装 im_chat后来切换到例如 --workers=2 , Odoo 不会抛出任何错误并且永远不会打开长轮询端口。

安装这个解决了它:

pip install psycogreen==1.0

关于nginx - Odoo(在 Debian 上)- longpolling 端口从未使用/打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30161575/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com