8000 Piglet service fails to start reliably at boot on Raspberry Pi (systemd) · Issue #999 · andrewdavidmackenzie/pigg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Piglet service fails to start reliably at boot on Raspberry Pi (systemd) #999
Open
@timyig

Description

@timyig

Problem Description:

The piglet service, when installed using piglet --install on a Raspberry Pi fails to start correctly after a system reboot. However, the service can typically be started manually without issues once the system is fully booted.

Observed Behavior:

When the service fails at boot, systemctl status mackenzie-serres-pigg.piglet.service (or the actual service name) shows the service in a failed state. The journal logs (journalctl -u mackenzie-serres-pigg.piglet.service -b) reveal errors such as piglet attempting to bind network sockets before the network interfaces are fully available:

May 26 08:45:14 pi7 systemd[1]: Started mackenzie-serres-pigg.piglet.service - mackenzie-serres-pigg.piglet.
May 26 08:45:15 pi7 piglet[442]: Config loaded from file: /root/.cargo/bin/.piglet_config.json
May 26 08:45:15 pi7 piglet[442]: Error: Socket cannot bind to ipv4 or ipv6
May 26 08:45:15 pi7 systemd[1]: mackenzie-serres-pigg.piglet.service: Main process exited, code=exited, status=1/FAILURE
May 26 08:45:15 pi7 systemd[1]: mackenzie-serres-pigg.piglet.service: Failed with result 'exit-code'.
May 26 08:45:15 pi7 systemd[1]: mackenzie-serres-pigg.piglet.service: Scheduled restart job, restart counter is at 1.

Suggestion

Adding these lines solved the problem for me.

[Unit]
Description=net.mackenzie-serres.pigg.piglet
After=network-online.target pigpiod.service
Wants=network-online.target pigpiod.service

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0