Bug 20286 - nm won't start, claims dbus slot already taken
Summary: nm won't start, claims dbus slot already taken
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-14 15:51 CET by Frank Griffin
Modified: 2020-01-18 04:52 CET (History)
3 users (show)

See Also:
Source RPM: connman
CVE:
Status comment:


Attachments

Description Frank Griffin 2017-02-14 15:51:58 CET
In a fresh cauldron install, NM fails to start with the message:

"bus manager: could not acquire the NetworkManager service as it is already taken"
"failed to start the dbus service"
Marja Van Waes 2017-02-14 23:03:34 CET

Assignee: bugsquad => gnome
CC: (none) => marja11

Comment 1 Frank Griffin 2017-02-19 18:02:09 CET
This has been fixed in the last day or two.  Both NM and dbus were updated.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 2 Frank Griffin 2017-02-19 18:18:14 CET
My mistake.  I got it to start manually, but upon reboot the error reoccurred:

Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0466] NetworkManager (version 1.6.2) is starting...
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0466] Read config: /etc/NetworkManager/NetworkManager.conf
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0486] manager[0x2484080]: monitoring kernel firmware directory '/lib/firmware'.
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0495] dns-mgr[0x2478180]: init: dns=default, rc-manager=resolvconf
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0504] rfkill1: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.6/0000:02:00.0/ieee80211/phy0/rfkill1) (driver iwlwifi)
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0505] rfkill2: found WiFi radio killswitch (at /sys/devices/platform/asus-nb-wmi/rfkill/rfkill2) (platform driver asus-nb-wmi)
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0509] manager[0x2484080]: WiFi hardware radio set enabled
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.0509] manager[0x2484080]: WWAN hardware radio set enabled
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <error> [1487524318.0514] bus-manager: could not acquire the NetworkManager service as it is already taken
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <error> [1487524318.0514] failed to start the dbus service.
Feb 19 12:11:58 localhost.localdomain NetworkManager[2945]: <info>  [1487524318.1485] exiting (error)
Feb 19 12:11:58 localhost.localdomain systemd[1]: NetworkManager.service: Main process exited, code=exited, status=1/FAILURE
Feb 19 12:11:58 localhost.localdomain systemd[1]: Failed to start Network Manager.
Feb 19 12:11:58 localhost.localdomain systemd[1]: NetworkManager.service: Unit entered failed state.

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 3 Frank Griffin 2017-02-19 22:25:07 CET
ARGGH.  The problem here is that someone slipped in a new package called connmgr which uses the same dbus assignments as NM and installs it by default.

Install and enable them both, and it's a race to see who gets there first.

I've no idea what whoever's responsible for this wants to do about it.

Source RPM: networkmanager => connmgr

Comment 4 Olav Vitters 2017-02-19 23:38:00 CET
The following is for sure problematic. Not sure if there's more:
/etc/dbus-1/system.d/connman-nmcompat.conf

I've made NM conflict with connman. Noticed Fedora doesn't ship above file.

CC: (none) => olav

Olav Vitters 2017-02-19 23:38:44 CET

Assignee: gnome => shlomif

Olav Vitters 2017-02-19 23:38:53 CET

Source RPM: connmgr => connman

Comment 5 Olav Vitters 2017-02-19 23:40:18 CET
$ mgarepo maintdb get connman
shlomif

Reassigning to connman maintainer. Feel free to change anything including NM (should be needless to say but rather be clear).
Comment 6 Jani Välimaa 2017-02-23 18:50:29 CET
connman isn't enabled anymore by default after install. I also added README.urpmi to connman to explain that no more than one network manager should be enabled at the same time.

I also removed connman conflicts from networkmanager to able to install/test both pkgs without first removing other.

CC: (none) => jani.valimaa

Comment 7 Jani Välimaa 2017-02-23 19:08:54 CET
Maybe we could add conflicts to systemd unit files.

From https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Conflicts=
A space-separated list of unit names. Configures negative requirement dependencies. If a unit has a Conflicts= setting on another unit, starting the former will stop the latter and vice versa. Note that this setting is independent of and orthogonal to the After= and Before= ordering dependencies.

If a unit A that conflicts with a unit B is scheduled to be started at the same time as B, the transaction will either fail (in case both are required part of the transaction) or be modified to be fixed (in case one or both jobs are not a required part of the transaction). In the latter case, the job that is not the required will be removed, or in case both are not required, the unit that conflicts will be started and the unit that is conflicted is stopped.
Comment 8 Frank Griffin 2017-02-23 19:19:02 CET
That shows promise, but is the stopped service stopped quietly or does it enter an error state ?  If both A and B somehow get enabled, and the user expects B but A wins the toss, the user is going to be very confused to find simply that B is stopped with no indication of why.
Comment 9 Jani Välimaa 2017-02-23 19:37:10 CET
It's something that someone should check.
Comment 10 Frank Griffin 2017-02-23 19:43:39 CET
Put in your change, and I'll try it.
Comment 11 Jani Välimaa 2017-02-24 18:39:50 CET
Just edit /usr/lib/systemd/system/connman.service and add 'networkmanager.service' (without quotes) to Conflicts= line. Use space as separator between entries.
Comment 12 Frank Griffin 2020-01-18 04:52:58 CET
Closing.  I've done several fresh installs since, and not had a problem.

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED


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