Bug 387301 - anacron complaints on startup
anacron complaints on startup
Product: Fedora
Classification: Fedora
Component: anacron (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-16 12:21 EST by Michal Jaegermann
Modified: 2007-12-20 14:53 EST (History)
0 users

See Also:
Fixed In Version: 2.3-57.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-20 14:53:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2007-11-16 12:21:39 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
to run.

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
first place?

Version-Release number of selected component (if applicable):
Comment 1 Marcela Mašláňová 2007-11-19 11:29:25 EST
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
anacron starts.

The battery saving this way isn't the best solution, because is dependent on
hal, but now I don't have any better.
Comment 2 Michal Jaegermann 2007-11-19 13:13:52 EST
> 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?
Comment 3 Marcela Mašláňová 2007-12-11 03:07:38 EST
I moved check of hal and '/usr/bin/on_ac_power' into 0anacron.* scripts. It
looks fine.
Comment 4 Fedora Update System 2007-12-12 14:57:53 EST
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'
Comment 5 Fedora Update System 2007-12-20 14:53:52 EST
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.

Note You need to log in before you can comment on or make changes to this bug.