Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Openrc cannot add ddclient deamon automatically [Probably a Bug] (Read 158 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Openrc cannot add ddclient deamon automatically [Probably a Bug]

Hi Artix folk,

This my second post in a Linux forum, so I apologize in advance for any ambiguity or mistake.

I'm running the LXQT - Openrc version of Artix. A few days ago I wanted to set up and run ddclient daemon. But I faced many problems.

First, I didn't know that there is a ddclient-openrc script that should be installed along with ddclient. I think this should be added as a dependency because ddclient will not run without it.

When I issued the command:
Code: [Select]
$ sudo rc-service ddclient start
It gave me an error message that I don't exactly remember, but it was something like "ddclient is not a known service".
I thought it was a configuration problem, so I spent a lot of time playing with the "/etc/ddclient/ddclient.conf" file without any success. Then; I discovered by chance that there is an openrc script on the repositories, so I installed it; but another problem arose.

When I tried to start ddclient service again, I got this:
Code: [Select]
* checkpath: owner `ddclient:ddclient' not found
* ERROR: ddclient failed to start

While waiting for my account at the Artix forums to be activated by admin, I searched online for a similar problem, and I ironically found a bug report related to systemd at this RedHat site

I followed the solution there and issued the commands:
Code: [Select]
$ sudo mkdir /var/run/ddclient
$ sudo chown ddclient:ddclient /var/run/ddclient
But again, I received this output, as the ddclient user and group were not created automatically:
Code: [Select]
chown: invalid user: ‘ddclient:ddclient’

After creating them manually, everything ran ok:
Code: [Select]
$ sudo useradd ddclient
$ sudo usermod -a -G ddclient ddclient
$ sudo chown ddclient:ddclient /var/run/ddclient

Finally;
Code: [Select]
$ sudo rc-service ddclient start
 * /etc/ddclient/ddclient.conf: correcting owner
 * /run/ddclient: correcting mode
 * /var/cache/ddclient: correcting mode
 * /var/cache/ddclient: correcting owner
 * Starting ddclient ...                                                               [ ok ]

Was there something I did wrong from the beginning? Or is it a kind of bug?

Sorry if I elaborated a bit, and thanks for your patience.

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #1
Thanks for the report. This has been fixed in ddclient-3.9.0-3.1 so you don't have to manually create user and group.
Make sure you have opentmpfiles installed and its services running before updating the package
If I can hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate!

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #2
Thanks for your reply, thefallenrat.

I've installed  opentmpfiles, along with its openrc script, but I cannot find its service:
Code: [Select]
$ sudo rc-service tmpfiles start
* rc-service: service `tmpfiles' does not exist

$ sudo rc-service opentmpfiles start
* rc-service: service `opentmpfiles' does not exist

Also, I cannot find ddclient-3.9.0-3.1. Is it in a testing repository?

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #3
It's called opentmpfiles-dev and opentmpfiles-setup but they already added to boot and sysvinit by the package anyway if you installed the openrc package

To check its services, use rc-status --all command

See below for guide on how to use OpenRC:
https://wiki.gentoo.org/wiki/OpenRC#Usage

 
Also, I cannot find ddclient-3.9.0-3.1. Is it in a testing repository?


It's in galaxy repository (extra). Wait for mirrors to sync
If I can hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate!

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #4
Thanks again, and thank you for the openrc usage link.

I've updated ddclient successfully, and ddclient seems like working properly and updating my ip. However, when I check its status:
Code: [Select]
$ sudo rc-service ddclient status
 * status: crashed

I looked at /var/log/daemon.log file (I'm not sure if this is the right place to look at for errors), but it says:
Code: [Select]
Aug 28 15:27:27 anoki-pc /etc/init.d/ddclient[4048]: start-stop-daemon: no matching processes found
Aug 28 15:27:27 anoki-pc ddclient[4085]: WARNING:  file /var/cache/ddclient/ddclient.cache: Cannot open file '/var/cache/ddclient/ddclient.cache'. (Permission denied)
Aug 28 15:27:28 anoki-pc ddclient[4092]: WARNING:  found neither ipv4 nor ipv6 address
Aug 28 15:27:28 anoki-pc ddclient[4093]: FATAL:    Cannot create file '/var/cache/ddclient/ddclient.cache'. (Permission denied)

Checked permissions for that file  /var/cache/ddclient/ddclient.cache
Code: [Select]
-rw------- 1 root root 262 أغس 28 15:27 /var/cache/ddclient/ddclient.cache

Should I change the ownership of ddclient.cache to ddclient user/group?

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #5
Code: [Select]
-rw------- 1 root root 262 أغس 28 15:27 /var/cache/ddclient/ddclient.cache
Hmm that's weird. Pretty sure opentmpfiles would already set that directory and its files to be owned by ddclient:ddclient and not root (see ddclient tmpfiles)

I suggest reverting any modification you have made prior to updating the package, and try rebooting

If I can hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate!

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #6
I suggest reverting any modification you have made prior to updating the package, and try rebooting
I've just totally removed ddclient and ddclient-openrc from the system, then deleted ddclient user and rebooted.
After booting, I've tried reinstalling ddclient with ddclient-openrc, but got this error:
Code: [Select]
(6/7) installing ddclient                              [############################] 100%
warning: directory permissions differ on /var/cache/ddclient/
filesystem: 700  package: 755
Optional dependencies for ddclient
    smtp-forwarder: email support requires sendmail binary
(7/7) installing ddclient-openrc                       [############################] 100%
:: Running post-transaction hooks...
(1/3) Warn about old perl modules
(2/3) Displaying openrc service help ...
        ==> Add a service to runlevel:
        rc-update add <service> <runlevel>
        ==> Start/stop/restart a service:
        rc-service <service> <start/stop/restart>
(3/3) Creating temporary files...
chown: invalid user: ‘ddclient’
chgrp: invalid group: ‘ddclient’
chown: invalid user: ‘ddclient’
chgrp: invalid group: ‘ddclient’
chown: invalid user: ‘ddclient’
chgrp: invalid group: ‘ddclient’
error: command failed to execute correctly

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #7
I just wanted to let you know that I've recreated ddclient user and group again, then reinstalled ddclient without problems.
After a reboot, I've checked the ddclietnt daemon status, and it's running properly till now.

Thx thefallenrat for your help.

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #8
As I checked now, the same problem persists

Code: [Select]
$ sudo rc-service ddclient status
 * status: crashed

/var/log/daemon.log file:
Code: [Select]
 FATAL:    Cannot create file '/var/cache/ddclient/ddclient.cache'. (Permission denied)

Code: [Select]
$ sudo ls -l /var/cache/ddclient/ddclient.cache
-rw------- 1 root root 262 أغس 28 15:27 /var/cache/ddclient/ddclient.cache

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #9
The commands failed because those folders are already exist and they're created by you

As I said before, revert any modification you have made prior to updating the package
If I can hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate!

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #10
I think ddclient needs its own sysusers file to create user:group.

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #11
.

Re: Openrc cannot add ddclient deamon automatically [Probably a Bug]

Reply #12
The commands failed because those folders are already exist and they're created by you

I don't remember creating  the folder /var/cache/ddclient
I solved the issue by modifying the ownership of that file.
ddclient is running without any issue from yesterday.
Anyway, thanks for your time.