0

I recently upgraded rhnsd package from 5.0.37 to 5.0.44 when it is in 0.37 version it used to be running as one process rhnsd.service but from 0.44 it split into two services one is rhnsd.timer and other rhnsd.service. Only rhnsd.timer process is in the active state and rhnsd.service is always dead. I can't see any logs in /var/log/messages. Is there any solution to write logs out and see the activity of rhnsd processes.

Machine : centos 7.6 , x86_64

Output from 5.0.37 rhnsd.service - LSB: Starts the Spacewalk Daemon Loaded: loaded (/etc/rc.d/init.d/rhnsd; bad; vendor preset: disabled) Active: active (running) since Thu 2019-05-30 14:36:22 CDT; 2 weeks 0 days ago Docs: man:systemd-sysv-generator(8) Main PID: 5551 (rhnsd) Tasks: 1 Memory: 10.0M CGroup: /system.slice/rhnsd.service └─5551 rhnsd

Output from 5.0.44 process output via systemctl ● rhnsd.service - Spacewalk Server daemon Loaded: loaded (/usr/lib/systemd/system/rhnsd.service; static; vendor preset: disabled) Active: inactive (dead) since Fri 2019-06-14 17:20:26 UTC; 46min ago Process: 13792 ExecStart=/usr/sbin/rhn_check (code=exited, status=0/SUCCESS) Main PID: 13792 (code=exited, status=0/SUCCESS)

Jun 14 17:20:26 XXXXXXX systemd[1]: Started Spacewalk Server daemon.

rhnsd.timer - Spacewalk periodic check timer Loaded: loaded (/usr/lib/systemd/system/rhnsd.timer; disabled; vendor preset: disabled) Active: active (waiting) since Tue 2019-06-11 20:47:40 UTC; 2 days ago

Jun 11 20:47:40 systemd[1]: Started Spacewalk periodic check timer.

1 Answer 1

1

I've been searching for an answer to this for several days now. I came across this question during my search and decided to come back and post an answer here when I finally found it.

Explanation

The rhnsd 5.0.44 package is part of the client for Spacewalk 2.9. Part of the update from the client for 2.8 to the client for 2.9 involved moving from an always-running service daemon (rhnsd.service) to a systemd timer (rhnsd.timer). If enabled and started, rhnsd.timer will periodically start rhnsd.service (really it just runs the rhn_check binary) to check for updates from the Spacewalk server.

To Fix Clients not Checking in or Performing Scheduled Tasks

systemctl enable rhnsd.timer
systemctl start rhnsd.timer

Modifying Client Check-In Times

The configuration for rhnsd.timer is in /usr/lib/systemd/system/rhnsd.timer. The default for version 5.0.44 is OnCalendar=00/4:00, which means that the timer will start rhnsd.service every day, every 4 hours on the hour, starting at midnight. If you wanted to make it run every 4 hours at half past the hour, you would change it to OnCalendar=00/4:30. Likewise, to make it run every 2 hours on the hour, you would use OnCalendar=00/2:00.

References

A Spacewalk mailing list thread on the topic

An explanation of systemd timers

A more succinct description of systemd timer values

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .