Red Hat Bugzilla – Bug 387301
anacron complaints on startup
Last modified: 2007-12-20 14:53:53 EST
Description of problem:
On level 2 an attempt to start anacron results in
Starting anacron: error: libhal_ctx_set_dbus_connection:
org.freedesktop.DBus.Error.NoServer: Failed to connect to socket
/var/run/dbus/system_bus_socket: Connection refused
Eh? Anacron requires dbus running?
The issue is that in /etc/rc.d/init.d/anacron there is
# chkconfig: 2345 99 05
while similar line for 'messagebus', and 'haldaemon' needed by
the later, are respectively
# chkconfig: 345 22 85
# chkconfig: 345 98 02
and services run accordingly.
I bumped into that on another machine where messagebus and
haldaemon were, for some unknown to me reasons, configured to
run only on level 5 an I was trying to start anacron on level 3.
This resulted in "OK" from anacron after the above error message
was printed and "is dead" on a status check afterwards.
Starting these two other services and restarting anacron made it
On my test box doing the above on level two still prints the
above but anacron appears to be running regardless. I am not sure
what is the difference but why this socket is required in the
Version-Release number of selected component (if applicable):
There were problems with running huge anacron jobs, when the laptop was on the
battery. I use check of '/usr/bin/on_ac_power', which needs hal running before
The battery saving this way isn't the best solution, because is dependent on
hal, but now I don't have any better.
> The battery saving this way isn't the best solution,
One thing which comes to mind is to check '/usr/bin/on_ac_power'
not on an anacron startup, with a failure to start if absent, but
before running a particular job (and most likely with missing
hald defaulting to OK and possibly a configuration option to change
such behaviour). You have to do such checking anyway as a power
status on boot does not have stay the same when you are trying
to run some delayed job. The same goes for a presence or absence
of the socket in question and besides hald could have been restarted
in the meantime and a file handle from a boot time is no longer valid.
I would imagine that something which does not start hald would
not in general bother with anacron either but who knows?
I moved check of hal and '/usr/bin/on_ac_power' into 0anacron.* scripts. It
anacron-2.3-57.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update anacron'
anacron-2.3-57.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.