Ticket #25 (closed defect: fixed)
Opened 3 years ago
Last modified 3 years ago
Problem with dbus service
Reported by: | Robert Piasek <robert@piasek.co.uk> | Owned by: | roy |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | init.d scripts | Version: | |
Keywords: | Cc: |
Description
I don't know how openrc or baselayout related it is, but I've encountered the following problem since I start using openrc-0.1
It might have completely nothing do with it - might be dbus problem.
- Starting D-BUS system messagebus ...
Failed to start message bus: The pid file "/var/run/dbus.pid" exists, if the message bus is not running, remove this file
- start-stop-daemon: failed to start `/usr/bin/dbus-daemon' [!!] * ERROR: dbus failed to start
- ERROR: cannot start dhcdbd as dbus would not start
I don't have the same problem with any other service. They simply removed dead pid file and start the service. Don't know how much it's related to start-stop-deamon, and why only dbus is affected. Of course none of the dbus-depended services start as well.
Change History
comment:109 Changed 3 years ago by roy
comment:111 Changed 3 years ago by Robert Piasek <robert@piasek.co.uk>
(In reply to comment #1)
I've just pushed a slightly related fix to openrc. If you re-emerge it and
delete the referenced dbus pid file, can you now restart the dbus service
without any init related errors?
IF i remove the file I can (re)start the service even without reemerging it. The problem was that during the boot it cried about pid existence and didn't start up.
I reemerged openrc-9999 and it seems I can not replicate this error ON BOOT any more. But if I deliberately kill dbus I still experience it.
# killall -9 /usr/bin/dbus-daemon
# /etc/init.d/dbus restart
- Stopping Hardware Abstraction Layer daemon ...[ok]
- Stopping D-BUS system messagebus ...
- start-stop-daemon: no matching processes found [ok]
- Starting D-BUS system messagebus ...
Failed to start message bus: The pid file "/var/run/dbus.pid" exists, if the
message bus is not running, remove this file
- start-stop-daemon: failed to start `/usr/bin/dbus-daemon' [!!]
- ERROR: dbus failed to start
The interesting line is * start-stop-daemon: no matching processes found [ok]. If it succeeded why didn't it remove pid file?
I was wondering if changing /etc/init.d/dbus start function wouldn't solve the problem. Just adding:
start {
if [ -e /var/run/dbus.pid ]; then
rm -f /var/run/dbus.pid
fi
..... # the usual stuff
}
Rob
comment:113 Changed 3 years ago by roy
- Status changed from new to resolved
- Resolution set to fixed
(In reply to comment #2)
I reemerged openrc-9999 and it seems I can not replicate this error ON BOOT any
more. But if I deliberately kill dbus I still experience it.
# killall -9 /usr/bin/dbus-daemon
# /etc/init.d/dbus restart
- Stopping Hardware Abstraction Layer daemon ...[ok]
- Stopping D-BUS system messagebus ...
- start-stop-daemon: no matching processes found [ok]
- Starting D-BUS system messagebus ...
Failed to start message bus: The pid file "/var/run/dbus.pid" exists, if the
message bus is not running, remove this file
- start-stop-daemon: failed to start `/usr/bin/dbus-daemon' [!!]
- ERROR: dbus failed to start
The interesting line is * start-stop-daemon: no matching processes found [ok].
If it succeeded why didn't it remove pid file?
That's a good point, and I've pushed a fix for this. re-emerge openrc to get it.
comment:119 Changed 3 years ago by Robert Piasek <robert@piasek.co.uk>
(In reply to comment #3)
That's a good point, and I've pushed a fix for this. re-emerge openrc to get
it.
works like a charm now! thank you
Rob
I've just pushed a slightly related fix to openrc. If you re-emerge it and delete the referenced dbus pid file, can you now restart the dbus service without any init related errors?