Bug 1213327 - nmcli hangs when NetworkManager stopped
Summary: nmcli hangs when NetworkManager stopped
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: NetworkManager
Version: 6.6
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Jirka Klimes
QA Contact: Desktop QE
Depends On:
TreeView+ depends on / blocked
Reported: 2015-04-20 10:47 UTC by Pavel Moravec
Modified: 2016-01-04 06:04 UTC (History)
8 users (show)

Fixed In Version: NetworkManager-0.8.1-97.el6
Doc Type: Bug Fix
Doc Text:
The nmcli tool could become unresponsive if both NetworkManager and nm-applet were stopped and the "nmcli con" command was issued.
Clone Of:
Last Closed: 2015-07-22 05:58:57 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1257 normal SHIPPED_LIVE NetworkManager bug fix and enhancement update 2015-07-20 17:49:57 UTC
Red Hat Bugzilla 1206661 None None None Never

Internal Links: 1206661

Description Pavel Moravec 2015-04-20 10:47:53 UTC
Description of problem:
When NetworkManager service is stopped, nmcli hangs in multiple situations after raising an exception to stdout.

Such a hang is very unpleasant for tools or scripts running nmcli command and expecting (prompt) output.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. service NetworkManager stop
2. nmcli con status
3. nmcli con show
4. nmcli con --help
5. nmcli con whateverWrong

Actual results:
commands 2. to 5. hung after raising:

** (process:18982): WARNING **: get_all_cb: couldn't retrieve system settings properties: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.

** (process:18982): WARNING **: fetch_connections_done: error fetching system connections: (2) The name org.freedesktop.NetworkManagerSystemSettings was not provided by any .service files.

Expected results:
Commands should not hung.

Additional info:

Comment 1 Jirka Klimes 2015-04-21 08:47:55 UTC
nmcli only hangs when neither NetworkManager nor nm-applet is running. NetworkManager 0.8 (in RHEL 6) has two setting services supplying connections: one is NetworkManager itself handling system connections, and the other is a user service handling user connections - usually nm-applet. From NetworkManager 0.9 upwards all connections are managed by NetworkManager itself.

Also note that nmcli commands in RHEL6 differ from RHEL7. For example:
List all connections:
nmcli con [show]                - RHEL7
nmcli con list [user | system]  - RHEL6

Active connections:
nmcli con show -a               - RHEL7
nmcli con status                - RHEL6 

But, of course, the nmcli freeze is a bug and I will post a patch to fix it.

Comment 9 errata-xmlrpc 2015-07-22 05:58:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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