Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works in debug, but systemd service fails to start #20

Open
ThatOneCalculator opened this issue Aug 8, 2024 · 5 comments
Open

Works in debug, but systemd service fails to start #20

ThatOneCalculator opened this issue Aug 8, 2024 · 5 comments

Comments

@ThatOneCalculator
Copy link

Works when running RUST_LOG=debug /usr/local/sbin/illuminanced -d, but the systemd service shows this:

Aug 08 15:56:43 cayucos systemd[1]: Dependency failed for Ambient light monitoring Service.
░░ Subject: A start job for unit illuminanced.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit illuminanced.service has finished with a failure.
░░
░░ The job identifier is 5830 and the job result is dependency.
Aug 08 15:56:43 cayucos systemd[1]: illuminanced.service: Job illuminanced.service/start failed with result 'dependency'.
~
@willem640
Copy link
Contributor

willem640 commented Aug 12, 2024

Is your syslog daemon running properly? You can check with systemctl status syslog.socket. Removing Requires=syslog.socket from the service file fixed this for me, though configuring syslog.socket is probably a better solution. For me rsyslog wasn't aliased correctly so aliasing it to syslog.service allowed syslog.socket to start.

@kelna
Copy link

kelna commented Dec 23, 2024

Could you please elaborate on this, willem640? I'm using Arch on Framework 13 and systemctl shows syslog.socket to be "inactive (dead)". What can I do to make things work?

@willem640
Copy link
Contributor

willem640 commented Dec 24, 2024

Hi @kelna,
I was using Fedora, which uses rsyslog for logging. For some reason (probably my fault) rsyslog.service wasn't symlinked to syslog.service. I'm not sure what syslogging service Arch has by default. Do you know whether you have either rsyslog or syslog-ng installed? If yes, try starting the correct service. If it still doesn't work look at the comment at the bottom of this file: https://github.com/systemd/systemd/blob/main/units/syslog.socket and follow the steps there (systemctl edit <name of syslogger>.service)

In case you don't have any syslogging service, just remove Requires=syslog.socket from the top of the service file (either illuminanced.service in the project root before installing, or /etc/systemd/system/illuminanced.service after installing). Not the "best" or "most recommended" solution, but it worked for me.

@mikhail-m1
Copy link
Owner

I think syslog is a good way to write logs by default. But if you have any suggestions how to make the default config more robust, please let me know

@willem640
Copy link
Contributor

willem640 commented Dec 27, 2024

Hi Mikhail,
Maybe Requires=syslog.socket could be changed to Wants=syslog.socket? In case syslog is configured weirdly or isn't installed the service can just start without it. If the user needs logging they can fix it but don't think most users will need to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants