Bug 1405003 - dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.fedoraproject.Setroubleshootd': no such name
Summary: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Cou...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 25
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-15 11:12 UTC by Martin Krajnak
Modified: 2017-06-23 01:56 UTC (History)
6 users (show)

Fixed In Version: setroubleshoot-3.3.12-1.fc25
Clone Of:
Environment:
Last Closed: 2017-06-23 01:56:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Krajnak 2016-12-15 11:12:43 UTC
Description of problem:

I repeatedly run into this issue, now sure where the problem is, looks like problem is only in virtual beaker machines environment because I canost reproduce on my  locally installed F25 VM

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/behave/model.py", line 1456, in run
    match.run(runner.context)
  File "/usr/lib/python2.7/site-packages/behave/model.py", line 1903, in run
    self.func(context, *args, **kwargs)
  File "features/steps/steps.py", line 40, in no_selinux_alerts
    assert output == ''
AssertionError

Captured stdout:
Running 'sealert -l '*''
Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.fedoraproject.Setroubleshootd': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/sealert", line 677, in <module>
    proxy_obj = bus.get_object(dbus_system_bus_name, dbus_system_object_path)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib64/python3.5/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ConfigInvalid: Invalid configuration (missing or empty <user>?)


Version-Release number of selected component (if applicable):
setroubleshoot-3.3.11-1.fc25.x86_64

Comment 1 Petr Lautrbach 2016-12-15 12:32:43 UTC
Please provide more information about  your tests, how setroubleshoot is run, what packages are installed and so on.

Comment 2 Martin Krajnak 2016-12-16 14:34:02 UTC
Well results of my investigation is strange. Our tests simply execute sealert -l '*' and then make an assertion on its output.

Executing sealert -l '*' crashes in beaker machine with same result no matter if it is executed from test or from terminal via ssh:

[test@qe-dell-ovs5-vm-17 features]$ sealert -l '*'
Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.fedoraproject.Setroubleshootd': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/sealert", line 677, in <module>
    proxy_obj = bus.get_object(dbus_system_bus_name, dbus_system_object_path)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib64/python3.5/site-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ConfigInvalid: Invalid configuration (missing or empty <user>?)

Meanwhile running same command on my local Fedora 25 is running perfectly fine. Package versions are the same. Both machines are updated, so apparently I am missing something here, 
I am no sure which packages versions I should provide so please let me know if you need more. 
dbus-1.11.8-1.fc25.x86_64

I can also provide you ssh access to affected machine.

Comment 3 Petr Lautrbach 2016-12-16 14:44:33 UTC
Dec 16 09:40:47 xx setroubleshoot[2858]: SELinux not enabled, setroubleshootd exiting...
Dec 16 09:40:47 xx dbus-daemon[574]: [system] Activated service 'org.fedoraproject.Setroubleshootd' failed: Invalid configuration (missing or empty <user>?)
Dec 16 09:40:47 xx /usr/bin/sealert[2856]: exception DBusException: org.freedesktop.DBus.Error.Spawn.ConfigInvalid: Invalid configuration (missing or empty <user>?)
^C


So the problem seems to be that setroubleshootd doesn't run with SELinux disabled. sealert should probably print some kind of warning/error message instead of the backtrace.

Comment 4 Vit Mojzis 2016-12-21 14:11:24 UTC
This patch should fix the crash. However sealert still won't work with disabled SELinux (at least it will point you in the right direction).

https://github.com/fedora-selinux/setroubleshoot/pull/47

Comment 5 Fedora Update System 2017-06-13 15:34:53 UTC
setroubleshoot-plugins-3.3.7-1.fc26 setroubleshoot-3.3.12-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d44051d130

Comment 6 Fedora Update System 2017-06-13 15:37:33 UTC
setroubleshoot-plugins-3.3.7-1.fc25 setroubleshoot-3.3.12-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5be70ca974

Comment 7 Fedora Update System 2017-06-15 10:57:26 UTC
setroubleshoot-3.3.12-1.fc25, setroubleshoot-plugins-3.3.7-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5be70ca974

Comment 8 Fedora Update System 2017-06-15 13:57:12 UTC
setroubleshoot-3.3.12-1.fc26, setroubleshoot-plugins-3.3.7-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d44051d130

Comment 9 Fedora Update System 2017-06-16 13:19:58 UTC
setroubleshoot-3.3.12-1.fc26, setroubleshoot-plugins-3.3.7-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-06-23 01:56:10 UTC
setroubleshoot-3.3.12-1.fc25, setroubleshoot-plugins-3.3.7-1.fc25 has been pushed to the Fedora 25 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.