如何解决Odoo 14 Longpolling Bus.bus 错误 - Apache2
我在 apache2 服务器后面的 Ubuntu 20 上运行 odoo 14。在每一分钟内,odoo 都会抛出 bus.bus is not available 错误。 Longpolling端口和proxy_mode已经在odoo配置文件中设置。
我还在apache2配置文件中添加了longpolling proxy和reverse_proxy参数。
odoo 配置
[options]
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = addons_path
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
proxy_mode = True
limit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
max_cron_threads = 1
workers = 4
list_db = True
longpolling_port = 8072
Apache 2 配置
<VirtualHost my_ip:80>
SuexecUserGroup "#1016" "#1014"
ServerName dental.codeworkaf.com
DocumentRoot /home/dental/public_html
ErrorLog erro_log_path
CustomLog access_log_path combined
ScriptAlias /cgi-bin/ /home/dental/cgi-bin/
DirectoryIndex index.PHP index.PHP4 index.PHP5 index.htm index.html
<Directory /home/dental/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-PHP .PHP
AddHandler fcgid-script .PHP
AddHandler fcgid-script .PHP7.4
FCGIWrapper /home/odoo/fcgi-bin/PHP7.4.fcgi .PHP
FCGIWrapper /home/odoo/fcgi-bin/PHP7.4.fcgi .PHP7.4
</Directory>
<Directory /home/odoo/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,SymLinksIfOwnerMatch
Require all granted
</Directory>
FcgidMaxRequestLen 1073741824
ProxyPass / http://127.0.0.1:8069/
ProxyPassReverse / http://127.0.0.1:8069/
ProxyPass /longpolling http://127.0.0.1:8072/
ProxyPassReverse /longpolling http://127.0.0.1:8072/
ProxyPass /longpolling/poll http://127.0.0.1:8072/
ProxyPassReverse /longpolling/poll http://127.0.0.1:8072/
<Proxy *>
allow from all
</Proxy>
</VirtualHost>
Traceback (most recent call last):
File "/opt/odoo14/odoo/odoo/http.py",line 639,in _handle_exception
return super(JsonRequest,self)._handle_exception(exception)
File "/opt/odoo14/odoo/odoo/http.py",line 315,in _handle_exception
raise exception.with_traceback(None) from new_cause
Exception: bus.Bus unavailable
2021-04-23 11:18:15,516 118841 INFO labkhand_sapid werkzeug: 149.54.9.252 - - [23/Apr/2021 11:18:15] "POST /longpolling/poll HTTP/1.1" 200 - 1 0.000 0.003
2021-04-23 11:18:33,124 118852 ERROR labkhand_sapid odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/opt/odoo14/odoo/odoo/addons/base/models/ir_http.py",line 237,in _dispatch
result = request.dispatch()
File "/opt/odoo14/odoo/odoo/http.py",line 683,in dispatch
result = self._call_function(**self.params)
File "/opt/odoo14/odoo/odoo/http.py",line 359,in _call_function
return checked_call(self.db,*args,**kwargs)
File "/opt/odoo14/odoo/odoo/service/model.py",line 94,in wrapper
return f(dbname,**kwargs)
File "/opt/odoo14/odoo/odoo/http.py",line 347,in checked_call
result = self.endpoint(*a,**kw)
File "/opt/odoo14/odoo/odoo/http.py",line 912,in __call__
return self.method(*args,line 531,in response_wrap
response = f(*args,**kw)
File "/opt/odoo14/odoo/addons/bus/controllers/main.py",line 35,in poll
raise Exception("bus.Bus unavailable")
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo14/odoo/odoo/http.py",in _handle_exception
raise exception.with_traceback(None) from new_cause
Exception: bus.Bus unavailable
2021-04-23 11:18:33,127 118852 INFO labkhand_sapid werkzeug: 149.54.9.252 - - [23/Apr/2021 11:18:33] "POST /longpolling/poll HTTP/1.1" 200 - 1 0.000 0.005
Nmap 结果
root@wizard:/opt/odoo14/odoo# nmap -A 127.0.0.1 -p 8072
Starting Nmap 7.80 ( https://nmap.org ) at 2021-04-23 11:35 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00010s latency).
PORT STATE SERVICE VERSION
8072/tcp open http Ajenti http control panel
| http-title: odoo
|_Requested resource was http://localhost:8072/web/database/selector
Warning: OSScan results may be unreliable because we Could not find at least 1 open and 1 closed port
Device type: general purpose
Running: Linux 3.X|4.X
OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4
OS details: Linux 3.7 - 3.10,Linux 3.8 - 4.14
Network distance: 0 hops
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 9.56 seconds
root@wizard:/opt/odoo14/odoo# sudo netstat -tulpn | grep 8072
tcp 0 0 127.0.0.1:8072 0.0.0.0:* LISTEN 124434/python3
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。