Why does Odoo show: OSError: [Errno 98] Address already in use?

Installing and running takes many steps and sometimes we will encounter many errors that will slow us down in our task. One of the major errors is the following:

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

The error means that a Odoo instance/service is already running. It will be fixed easily by killing the instance/service that is running. You can see it by typing the command:

ps aux | grep odoo
sudo kill <process id> 

On the other hand, there is an easier way if there is no programs or applications running. You can just restart your machine to restart also the Odoo instance/service that is running. After the reboot, you can now start your odoo service and will be expected to run smoothly.

Leave a Comment

Your email address will not be published. Required fields are marked *