You are not logged in.
At some point systemd decided to discard newly created custom services, systemd just answers "Unit foo.service could not be found.".
Enabling it or doing a daemon-reload makes it visible to systemd again; however since this happens at every reboot, I have no way to make any new service start automatically.
This started happening out of nowhere, I know for sure it used to work, and it even still works with any service created before the bug started happening, but any new service will be subject to this.
Here's an example of a service subject to this
[Unit]
Description=Fan curve daemon for AMD gpus
ConditionPathExists=/etc/zoc/zfanc
[Service]
Type=simple
ExecStart=/etc/zoc/zfanc start
KillSignal=SIGINT
[Install]
WantedBy=multi-user.targetI don't know much about systemd so I have absolutely no clue if this is a misconfig or something. I've tried to search for this but only ended up more confused
Last edited by zawz (2019-06-07 15:39:19)
Offline
Welcome to the arch linux forums zawz. Where is the service file located.
systemd just answers "Unit foo.service could not be found.".
What command produces this output?
What is the journal contents for a boot with the issue? Also the output of pacman -Q systemd.
Offline
Files are in /etc/systemd/system
Any command regarding the service in question will cause the unit not found error ("systemctl start/status/stop/restart foo")
Output of "pacman -Q systemd":
systemd 242.29-1As for the journal, I didn't find any single mention of any of the subject services
Last edited by zawz (2019-06-07 16:05:17)
Offline
What about if you boot with the option systemd.log_level=debug ?
Offline
Jun 07 18:16:33 WCG systemd[1]: zfanc.service: Collecting.Nothing else
Offline
Dumb question just cause I'm curious, where is zfanc putting what it's collecting?
Offline
Is there a link in /etc/systemd/system/multi-user.target.wants/ for zfanc.service
What is the output of systemd enable zfanc.service ? (is a link present after executing the command?)
Offline
Dumb question just cause I'm curious, where is zfanc putting what it's collecting?
This is a systemd operation, zfanc hasn't done anything here
Last edited by zawz (2019-06-07 17:00:33)
Offline
And yes there is a link, enabling the service doesn't provide any output because the link is already present; if i delete the link and re-enable it, it will say it creates the link as it should
Created symlink /etc/systemd/system/multi-user.target.wants/zfanc.service → /home/zawz/code/sh/zoc/zfanc.service.But this doesn't yield any different result, the service is still ignored at boot until either daemons are reloaded or the service is manually enabled.
Last edited by zawz (2019-06-07 17:01:20)
Offline
Is /home/zawz/code/sh/zoc/zfanc.service available at boot?
If you move the service file to /etc/systemd/system then update the symlink does that work?
Offline
Is /home/zawz/code/sh/zoc/zfanc.service available at boot?
If you move the service file to /etc/systemd/system then update the symlink does that work?
I have tested and no this doesn't give any different outcome
Last edited by zawz (2019-06-07 17:36:14)
Offline
Please post the output of journalctl -b from a boot with the option systemd.log_level=debug.
Offline
Where can i put it? I can't find any site that will accept this 2MB log
Offline
I forgot how verbose debug level is reducing the log level by one should greatly reduce the size,
journalctl -p6 -b -# (where # is the number of the boot of interest (the one systemd.log_level=debug) 0 for the current boot, -1 for the last boot e.t.c)
Offline
Offline
cat /etc/systemd/system/trivial.service
[Unit]
Description=A test service
[Service]
Type=simple
ExecStart=/usr/bin/true
RemainAfterExit=true
[Install]
WantedBy=multi-user.targetstat /etc/systemd/system/trivial.service
File: /etc/systemd/system/trivial.service
Size: 162 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 9568836 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)Does the above service file work on your system?
Offline
I managed to solve the problem. Turns out it was that it really was that the service file was not available at boot, but when I tested copying putting the file instead of linking, I didn't realize that when enabling the service the link in multi-user.target.wants was still linking to the old file and was not refreshed to the new file.
So deleting and recreating this link making sure it linked to the local file solved the issue
Thanks for the help
Offline