Closed SatIPwithRPi closed 7 months ago
Which version of Raspbian OS are you running? You can obtain this info using the following command:
cat /etc/os-release
Hi, thanks for the reply; both installations were on Raspbian 11 bullseye; one worked, the other didn't - although it could be iirc that the one where it failed was manually upgraded from an older version; maybe something went wrong there?
update: maybe that helps? when stopped, status yields:
Feb 10 16:58:24 openpihole systemd[1]: Failed to start Hetzner Dynamic DNS.
Feb 10 16:58:35 openpihole systemd[1]: hetzner_ddns.service: Scheduled restart job, restart counter is at 3.
Feb 10 16:58:35 openpihole systemd[1]: Stopped Hetzner Dynamic DNS.
Feb 10 16:58:35 openpihole systemd[1]: Starting Hetzner Dynamic DNS...
Feb 10 16:58:35 openpihole systemd[929]: hetzner_ddns.service: Failed to locate executable /usr/bin/chown: No such file or directory
Feb 10 16:58:35 openpihole systemd[929]: hetzner_ddns.service: Failed at step EXEC spawning /usr/bin/chown: No such file or directory
Feb 10 16:58:35 openpihole systemd[1]: hetzner_ddns.service: Control process exited, code=exited, status=203/EXEC
Feb 10 16:58:35 openpihole systemd[1]: hetzner_ddns.service: Failed with result 'exit-code'.
Feb 10 16:58:35 openpihole systemd[1]: Failed to start Hetzner Dynamic DNS.
Feb 10 16:58:41 openpihole systemd[1]: Stopped Hetzner Dynamic DNS.
so what's the problem with /usr/bin/chown ?
Yeah, it looks that way. I'm not sure why it would be missing or located in another directory, but you can get its path by running one of the following commands:
command -v chown
which chown
If it's located in another directory you can link it to /usr/bin, or modify hetzner_ddns's service file to point to the correct path on your system.
wow, I'm sorry if that is very low key support but at least I'm learning a lot. So I successfully created a softlink to chown. (to /bin/chown, thats the path on my system) That seems to have worked, but now I still have an issue with permissions, I guess:
Feb 10 18:34:55 openpihole systemd[1]: hetzner_ddns.service: Scheduled restart job, restart counter is at 27.
Feb 10 18:34:55 openpihole systemd[1]: Stopped Hetzner Dynamic DNS.
Feb 10 18:34:55 openpihole systemd[1]: Starting Hetzner Dynamic DNS...
Feb 10 18:34:55 openpihole systemd[1]: Started Hetzner Dynamic DNS.
Feb 10 18:34:55 openpihole hetzner_ddns[4711]: [2024-02-10 18:34:55] Started Hetzner DDNS daemon
Feb 10 18:34:55 openpihole hetzner_ddns[4714]: [2024-02-10 18:34:55] Error: unable to read configuration file /usr/local/etc/hetzner_ddns.conf
Feb 10 18:34:55 openpihole hetzner_ddns[4707]: Error: unable to read configuration file /usr/local/etc/hetzner_ddns.conf
Feb 10 18:34:55 openpihole systemd[1]: hetzner_ddns.service: Main process exited, code=exited, status=78/CONFIG
Feb 10 18:34:55 openpihole systemd[1]: hetzner_ddns.service: Failed with result 'exit-code'.
Feb 10 18:34:57 openpihole systemd[1]: Stopped Hetzner Dynamic DNS.
The configuration file is there and contains the correct information; but what should the permissions be?
-rw-r----- 1 root staff 300 Feb 10 18:31 hetzner_ddns.conf
thanks!
It expects daemon:root
file owner, but it can be any other as long as it is readable by that user. I strongly suggest avoiding 777 permission, even though it will fix your problem. Also, check the permissions of the parent directory tree - all of them should allow listing and reading files by that user.
I am not sure whether daemon
user exists on PiHole, but you can also modify the systemd service file to suit your needs.
yes! so I changed the conf file to daemon:root, now everything works. I have no clue why on the other system none of that was necessary, as I tought they'd be basically almost the same. Thanks a lot for the quick support and your patience with me!
Hello, thanks for the code, that's exactly what I'm looking for! Sorry, I'm kind of a n00b here. I sucessfully installed it on one Raspberry Pi, but on the other one I get the following error:
where status yields:
Do you have any idea on how to solve this? Thanks!