为什么 Odoo 显示:OSError:[Errno 98] 地址已在使用中?

为什么 Odoo 显示:OSError:[Errno 98] 地址已在使用中?

如何找到阻碍odoo正常启动的原因?

nicholas@mordor:~$ 
nicholas@mordor:~$ odoo
2021-05-01 00:30:04,854 44082 INFO ? odoo: Odoo version 14.0-20210430 
2021-05-01 00:30:04,854 44082 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/home/nicholas/.local/share/Odoo/addons/14.0'] 
2021-05-01 00:30:04,854 44082 INFO ? odoo: database: default@default:default 
2021-05-01 00:30:04,983 44082 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports. 
2021-05-01 00:30:05,041 44082 WARNING ? odoo.addons.base.models.res_currency: The num2words python library is not installed, amount-to-text features won't be fully available. 
Exception in thread odoo.service.httpd:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 441, in http_thread
    self.httpd = ThreadedWSGIServerReloadable(self.interface, self.port, app)
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 149, in __init__
    super(ThreadedWSGIServerReloadable, self).__init__(host, port, app,
  File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 740, in __init__
    HTTPServer.__init__(self, server_address, handler)
  File "/usr/lib/python3.8/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 165, in server_bind
    super(ThreadedWSGIServerReloadable, self).server_bind()
  File "/usr/lib/python3.8/http/server.py", line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
^C2021-05-01 00:30:13,195 44082 INFO ? odoo.service.server: Initiating shutdown 
2021-05-01 00:30:13,195 44082 INFO ? odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown. 
nicholas@mordor:~$ 
nicholas@mordor:~$ lsof -i :80
nicholas@mordor:~$ 
nicholas@mordor:~$ lsof -i :8080
nicholas@mordor:~$ 
nicholas@mordor:~$ lsof -i :8000
nicholas@mordor:~$ 
nicholas@mordor:~$ sudo apt install odoo
[sudo] password for nicholas: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
odoo is already the newest version (14.0.20210430).
0 upgraded, 0 newly installed, 0 to remove and 158 not upgraded.
nicholas@mordor:~$ 

我似乎看不到任何正在运行的东西localhost。这只是在本地运行。

答案1

这通常发生在openerp-service已运行时。您应该能够使用以下命令找到任何正在运行的实例:

ps aux | grep openerp

如果有一个正在运行的实例,您将看到它的 PID,然后您可以终止该进程。

如果 Odoo 继续报告Errno 98,那么您将需要将服务运行的默认端口更改为类似的7654

相关内容