What is the problem?
I have installed Octoprint using this guide
My pi does various things that aren't octoprint, so I set it up to run in a python venv
I can see the web interface fine if I run:
~/OctoPrint/venv/bin/octoprint serve
However when I try to start the service I get:
Job for octoprint.service failed because the control process exited with error code.
journalctl says
Dec 11 20:28:00 raspberrypi systemd[1]: Starting The snappy web interface for your 3D printer...
ββ Subject: A start job for unit octoprint.service has begun execution
ββ Defined-By: systemd
ββ Support: https://www.debian.org/support
ββ
ββ A start job for unit octoprint.service has begun execution.
ββ
ββ The job identifier is 1458.
Dec 11 20:28:00 raspberrypi systemd[1334]: octoprint.service: Failed to determine user credentials: No such process
Dec 11 20:28:00 raspberrypi systemd[1334]: octoprint.service: Failed at step USER spawning /home/steve/OctoPrint/venv/bin/octoprint: No such process
ββ Subject: Process /home/steve/OctoPrint/venv/bin/octoprint could not be executed
ββ Defined-By: systemd
ββ Support: https://www.debian.org/support
ββ
ββ The process /home/steve/OctoPrint/venv/bin/octoprint could not be executed and failed.
ββ
ββ The error number returned by this process is ERRNO.
My /etc/systemd/system/octoprint.service
[Unit]
Description=The snappy web interface for your 3D print>
After=network-online.target
Wants=network-online.target
[Service]
Environment="LC_ALL=C.UTF-8"
Environment="LANG=C.UTF-8"
Type=exec
User=pi
ExecStart=/home/steve/OctoPrint/venv/bin/octoprint
[Install]
WantedBy=multi-user.target
What did you already try to solve it?
I've googled the error message, which has led me to this community.
Have you tried running in safe mode?
What's that?
Did running in safe mode solve the problem?
No idea - this is a systemd issue
Systeminfo Bundle
You can download this in OctoPrint's System Information dialog ... no bundle, no support!)
browser.user_agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0
connectivity.connection_check: 1.1.1.1:53
connectivity.connection_ok: true
connectivity.enabled: true
connectivity.online: true
connectivity.resolution_check: octoprint.org
connectivity.resolution_ok: true
env.hardware.cores: 4
env.hardware.freq: 1800
env.hardware.ram: 8190787584
env.os.bits: 64
env.os.id: linux
env.os.platform: linux
env.plugins.pi_support.model: Raspberry Pi 4 Model B Rev 1.4
env.plugins.pi_support.throttle_check_enabled: true
env.plugins.pi_support.throttle_check_functional: true
env.plugins.pi_support.throttle_state: 0x0
env.python.pip: 22.3.1
env.python.version: 3.9.2
env.python.virtualenv: true
octoprint.last_safe_mode.date: unknown
octoprint.last_safe_mode.reason: unknown
octoprint.safe_mode: false
octoprint.version: 1.8.6
systeminfo.generated: 2022-12-11T20:32:43Z
systeminfo.generator: systemapi
Additional information about your setup
OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
Seemingly working installation, without ability to autostart via systemd