Error 98 on start of OctoPirnt on Ubuntu

I try to install OctoPrint on my laptop with Ubuntu 20.04 sticking to this guide:

What is the problem?

Right after starting OctoPrint with octoprint serve, it ends immediately with an error message

What did you already try to solve it?

Informed my about that error message, but even don't know what address is already in use...

Have you tried running in safe mode?

Did not get that far

Did running in safe mode solve the problem?

See above

Systeminfo Bundle

Either not, but this:

(venv) pi@Leppy3D:~/OctoPrint$ octoprint serve
2022-09-12 21:30:32,319 - octoprint.startup - INFO - ******************************************************************************
2022-09-12 21:30:32,320 - octoprint.startup - INFO - Starting OctoPrint 1.8.2
2022-09-12 21:30:32,320 - octoprint.startup - INFO - ******************************************************************************
2022-09-12 21:30:32,323 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2022-09-12 21:30:32,323 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to is working
2022-09-12 21:30:32,323 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving is working
2022-09-12 21:30:32,325 - octoprint.plugin.core - INFO - Loading plugins from /home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugins, /home/pi/.octoprint/plugins and installed plugin packages...
2022-09-12 21:30:32,657 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin (2022.6.13) did not pass check, not loading.
2022-09-12 21:30:32,681 - octoprint.plugin.core - INFO - Found 17 plugin(s) providing 17 mixin implementations, 34 hook handlers
2022-09-12 21:30:32,692 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2022-09-12 21:30:32,696 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/home/pi/OctoPrint/venv/bin/octoprint", line 8, in <module>
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/", line 936, in main
    octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/cli/", line 317, in serve_command
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/cli/", line 163, in run_server
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/server/", line 369, in run
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/server/", line 2500, in _start_intermediary_server
  File "/usr/lib/python3.8/http/", line 138, in server_bind
  File "/usr/lib/python3.8/", line 466, in server_bind
OSError: [Errno 98] Address already in use
(venv) pi@Leppy3D:~/OctoPrint$ 

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)


Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible


That suggests you either already have OctoPrint running somewhere on port 5000, or some other process using it.

The command I have in my head for finding the process is sudo netstat -tulpen. It should give some lines, and somewhere you can find the relevant one:

Proto Recv-Q Send-Q Local Address      Foreign Address    State    User   Inode      PID/Program name
tcp        0      0*          LISTEN   1000   49746955   13342/python3

That might help to figure it out if you aren't sure.

1 Like

Thanks a lot Charlie. That gave me the hint where to look for.
I killed a faulty process, and now it runs.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.