We are coming further:
Installed moonraker as suggest and it runs with one hint: "No access to communication socket."
pi@VoronGold:~/printer_data/config $ systemctl status moonraker.service
● moonraker.service - API Server for Klipper SV1
Loaded: loaded (/etc/systemd/system/moonraker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-01-30 09:25:59 CET; 15s ago
Main PID: 22380 (python)
Tasks: 20 (limit: 3596)
CGroup: /system.slice/moonraker.service
└─22380 /home/pi/moonraker-env/bin/python -m moonraker
Jan 30 09:26:01 VoronGold python[22380]: **User=pi
Jan 30 09:26:01 VoronGold python[22380]: [server.py:
initialize_component()] - Performing Component Post Init: [proc_stats]
Jan 30 09:26:01 VoronGold python[22380]: [server.py:initialize_component()] - Performing Component Post Init: [announcements]
Jan 30 09:26:01 VoronGold python[22380]: [server.py:
initialize_component()] - Performing Component Post Init: [webcam]
Jan 30 09:26:01 VoronGold python[22380]: [webcam.py:set_default_host_ip()] - Default public webcam address set:
http://192.168.1.64
Jan 30 09:26:01 VoronGold python[22380]: [server.py:
initialize_component()] - Performing Component Post Init: [klippy_connection]
Jan 30 09:26:01 VoronGold python[22380]: [extensions.py:start_unix_server()] - Creating Unix Domain Socket at '/home/pi/printer_data/comms/moonraker.sock'
Jan 30 09:26:01 VoronGold python[22380]: [server.py:start_server()] - Starting Moonraker on (0.0.0.0, 7125), Hostname: VoronGold
Jan 30 09:26:01 VoronGold python[22380]: [application.py:listen()] - SSL Certificate/Key not configured, aborting HTTPS Server startup
Jan 30 09:26:01 VoronGold python[22380]: [klippy_connection.py:do_connect()] - Cannot connect to Klippy, Linux user 'pi' lacks permission to open Unix Domain Socket: /var/lib/klipper/s
ockets/VoronGold.api
Connection to klippy stops due to missing permissions. So I changed the Systemd service file to start as user repetierserver (former it was pi):
# systemd service file for moonraker
[Unit]
Description=API Server for Klipper SV1
Requires=network-online.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Type=simple
User=repetierserver
SupplementaryGroups=moonraker-admin
RemainAfterExit=yes
EnvironmentFile=/home/pi/printer_data/systemd/moonraker.env
ExecStart=/home/pi/moonraker-env/bin/python $MOONRAKER_ARGS
Restart=always
RestartSec=10
After restarting the service:
pi@VoronGold:/etc/init.d $ sudo systemctl status moonraker.service
● moonraker.service - API Server for Klipper SV1
Loaded: loaded (/etc/systemd/system/moonraker.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2024-01-30 09:38:50 CET; 2s ago
Process: 5753 ExecStart=/home/pi/moonraker-env/bin/python $MOONRAKER_ARGS (code=exited, status=1/FAILURE)
Main PID: 5753 (code=exited, status=1/FAILURE)
Jan 30 09:38:50 VoronGold systemd[1]: moonraker.service: Main process exited, code=exited, status=1/FAILURE
Jan 30 09:38:50 VoronGold systemd[1]: moonraker.service: Failed with result 'exit-code'.
Now the service does not start. I assume it is because the moonraker files are in pi´s home directory on which the user repetierserver has no access to.
Any ideas? How did you solve that? The user repetierserver has no home directory...
<blockquote class="Quote">
Repetier said:
Fortunately moonraker is quite independent, just needing the communication socket and access. If you run it as use repetierserver you might also just make the klipper config folder a link to server folder for klipper configs and both would see them.
And howto do that?