odoo worker 异常Exception("bus.Bus unavailable")
2015-11-24 23:01
1526 查看
odoo 在配置workers后会有如下错误
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 300, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 796, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/bus/bus.py", line 188, in poll
raise Exception("bus.Bus unavailable")
原因:
工人> 0会有很多线程在端口8069上。
你也会有几个cron线程8069(max-cron-threads)。
一个gevent线程在端口8072上(longpolling-port)。
这里的问题就在8072上,web会用8069请求longpolling。所以http出错。
解决方法:
安装返向代理,用http://host:80代理 http://localhost:8069/ 和 http://localhost:8072/longpolling即可
如nginx配置
Conf代码
location / {
proxy_pass http://localhost:8069/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /longpolling/ {
proxy_pass http://localhost:8072/longpolling/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 300, in checked_call
return self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 796, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/bus/bus.py", line 188, in poll
raise Exception("bus.Bus unavailable")
原因:
工人> 0会有很多线程在端口8069上。
你也会有几个cron线程8069(max-cron-threads)。
一个gevent线程在端口8072上(longpolling-port)。
这里的问题就在8072上,web会用8069请求longpolling。所以http出错。
解决方法:
安装返向代理,用http://host:80代理 http://localhost:8069/ 和 http://localhost:8072/longpolling即可
如nginx配置
Conf代码
location / {
proxy_pass http://localhost:8069/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /longpolling/ {
proxy_pass http://localhost:8072/longpolling/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
相关文章推荐
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- install and upgrade scrapy
- Scrapy的架构介绍
- Centos6 编译安装Python
- 使用Python生成Excel格式的图片
- 让Python文件也可以当bat文件运行
- [Python]推算数独
- Python中zip()函数用法举例
- Python中map()函数浅析
- Python将excel导入到mysql中
- Python在CAM软件Genesis2000中的应用
- 使用Shiboken为C++和Qt库创建Python绑定
- FREEBASIC 编译可被python调用的dll函数示例
- Python 七步捉虫法