OSError: [Errno 98] Address already in use

What is the problem?

I am a total Noob - first time installing OctoPrint on my LInux PC (currently using Windows laptop). I am getting "OSError: [Errno 98] Address already in use" following guide from this site for Linux installation. I just know i missed something simple :frowning:

What did you already try to solve it?

Reinstalled, updated, upgraded

Have you tried running in safe mode?

Safe mode runs after relaunching

Did running in safe mode solve the problem?


Systeminfo Bundle

(venv) graeme@graemeDELL:~/OctoPrint$ octoprint serve
2022-03-27 06:32:37,593 - octoprint.startup - INFO - ******************************************************************************
2022-03-27 06:32:37,607 - octoprint.startup - INFO - Starting OctoPrint 1.7.3
2022-03-27 06:32:37,607 - octoprint.startup - INFO - Starting in SAFE MODE. Third party plugins will be disabled!
2022-03-27 06:32:37,607 - octoprint.startup - INFO - Reason for safe mode: problem during last startup
2022-03-27 06:32:37,607 - octoprint.startup - INFO - ******************************************************************************
2022-03-27 06:32:37,695 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2022-03-27 06:32:37,695 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to is working
2022-03-27 06:32:37,695 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2022-03-27 06:32:37,705 - octoprint.plugin.core - INFO - Loading plugins from /home/graeme/OctoPrint/venv/lib/python3.6/site-packages/octoprint/plugins, /home/graeme/.octoprint/plugins and installed plugin packages...
2022-03-27 06:32:38,044 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin (2022.3.1) did not pass check, not loading.
2022-03-27 06:32:38,071 - octoprint.plugin.core - INFO - Found 17 plugin(s) providing 17 mixin implementations, 34 hook handlers
2022-03-27 06:32:38,098 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2022-03-27 06:32:38,102 - octoprint.cli.server - ERROR - Uncaught exception
Traceback (most recent call last):
File "/home/graeme/OctoPrint/venv/bin/octoprint", line 8, in
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/octoprint/init.py", line 965, in main
octo(args=args, prog_name="octoprint", auto_envvar_prefix="OCTOPRINT")
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/octoprint/cli/server.py", line 329, in serve_command
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/octoprint/cli/server.py", line 164, in run_server
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/octoprint/server/init.py", line 371, in run
File "/home/graeme/OctoPrint/venv/lib/python3.6/site-packages/octoprint/server/init.py", line 2486, in _start_intermediary_server
File "/usr/lib/python3.6/http/server.py", line 136, in server_bind
File "/usr/lib/python3.6/socketserver.py", line 470, in server_bind
OSError: [Errno 98] Address already in use

(venv) graeme@graemeDELL:~/OctoPrint$ ps -fA | grep python
root 893 1 0 06:18 ? 00:00:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
root 988 1 0 06:18 ? 00:00:08 /snap/octoprint-pfs/58/usr/bin/python3 /snap/octoprint-pfs/58/bin/octoprint serve --iknowwhatimdoing --basedir /etc/octoprint
graeme 2053 1198 0 06:19 ? 00:00:00 /usr/bin/python3 /usr/share/system-config-printer/applet.py
graeme 8926 6206 0 07:30 pts/0 00:00:00 grep --color=auto python

(venv) graeme@graemeDELL:~/OctoPrint$ python -m SimpleHTTPServer
Serving HTTP on port 8000 ...

Additional information about your setup

Linux Mint 19.3 vs 4.4.8, kernel 5.4.0-105-generic; Intel© Core™ i5-3470 CPU @ 3.20GHz × 4
System: Host: graemeDELL Kernel: 5.4.0-105-generic i686 bits: 32 compiler: gcc v: 7.5.0
Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia
base: Ubuntu 18.04 bionic
Machine: Type: Desktop System: LENOVO product: 33874GG v: ThinkCentre Edge92 serial:
Mobo: LENOVO model: MAHOBAY v: Win8 Pro DPK TPG serial: BIOS: LENOVO
v: 9SKT56AUS date: 11/14/2012
CPU: Topology: Quad Core model: Intel Core i5-3470 bits: 64 type: MCP arch: Ivy Bridge
rev: 9 L2 cache: 6144 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 25540
Speed: 1596 MHz min/max: 1600/3600 MHz Core speeds (MHz): 1: 1596 2: 1596 3: 1596
4: 1596
Graphics: Device-1: Intel Xeon E3-1200 v2/3rd Gen Core processor Graphics vendor: Lenovo
driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:0152
Display: x11 server: X.Org 1.19.6 driver: modesetting unloaded: fbdev,vesa
resolution: 1680x1050~60Hz
OpenGL: renderer: Mesa DRI Intel HD Graphics 2500 (IVB GT1) v: 4.2 Mesa 20.0.8
compat-v: 3.0 direct render: Yes
Audio: Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo
driver: snd_hda_intel v: kernel bus ID: 00:1b.0 chip ID: 8086:1e20
Sound Server: ALSA v: k5.4.0-105-generic
Network: Device-1: Intel 82579LM Gigabit Network vendor: Lenovo driver: e1000e v: 3.2.6-k
port: f080 bus ID: 00:19.0 chip ID: 8086:1502
IF: eno1 state: down mac:
Device-2: Realtek RTL8192CU 802.11n WLAN Adapter type: USB driver: rtl8192cu
bus ID: 3-4:2 chip ID: 0bda:8178
IF: wlx0810780dbceb state: up mac:
Drives: Local Storage: total: 1.36 TiB used: 21.43 GiB (1.5%)
ID-1: /dev/sda vendor: Seagate model: ST500DM002-1BD142 size: 465.76 GiB
speed: 6.0 Gb/s serial:
ID-2: /dev/sdb vendor: Western Digital model: WD10EZEX-00BN5A0 size: 931.51 GiB
speed: 3.0 Gb/s serial:
Partition: ID-1: / size: 457.45 GiB used: 21.43 GiB (4.7%) fs: ext4 dev: /dev/sda1
Sensors: System Temperatures: cpu: 33.0 C mobo: N/A
Fan Speeds (RPM): N/A
Repos: No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/deadsnakes-ppa-bionic.list
1: deb http: //ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic main
2: deb-src http: //ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic main
Active apt repos in: /etc/apt/sources.list.d/official-dbgsym-repositories.list
1: deb http: //ddebs.ubuntu.com bionic main restricted universe multiverse
2: deb http: //ddebs.ubuntu.com bionic-updates main restricted universe multiverse
Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
1: deb http: //mirror.is.co.za/mirrors/linuxmint.com/packages tricia main upstream import backport
2: deb http: //mirror.hostafrica.co.za/ubuntu bionic main restricted universe multiverse
3: deb http: //mirror.hostafrica.co.za/ubuntu bionic-updates main restricted universe multiverse
4: deb http: //mirror.hostafrica.co.za/ubuntu bionic-backports main restricted universe multiverse
5: deb http: //security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
6: deb http: //archive.canonical.com/ubuntu/ bionic partner
Info: Processes: 241 Uptime: 33m Memory: 3.69 GiB used: 1.00 GiB (27.2%) Init: systemd v: 237
runlevel: 5 Compilers: gcc: 7.5.0 alt: 7 Client: Unknown python3.6 client inxi: 3.0.32

It looks like you may have installed a snap distribution of OctoPrint. This is not a supported method of installing it with known issues, and it is very outdated now because it was a 3rd party we don't know. That's still running in the background, and more than one server can't use the same port at once. So I would recommend uninstalling it completely, and then you can continue with the rest of the guide for official installation.

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