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 1.1.1.1:53 is working
2022-09-12 21:30:32,323 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org 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>
    sys.exit(main())
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/__init__.py", 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/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/cli/server.py", line 317, in serve_command
    run_server(
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/cli/server.py", line 163, in run_server
    octoprint_server.run()
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/server/__init__.py", line 369, in run
    self._start_intermediary_server()
  File "/home/pi/OctoPrint/venv/lib/python3.8/site-packages/octoprint/server/__init__.py", line 2500, in _start_intermediary_server
    self._intermediary_server.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
(venv) pi@Leppy3D:~/OctoPrint$ 

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

WRITE HERE

Additional information about your setup

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

WRITE HERE

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 127.0.0.1:5000     0.0.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.