Bug 1651235 - problems with sealerts that he doesn't want to start!
Summary: problems with sealerts that he doesn't want to start!
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 29
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1651780 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-19 13:53 UTC by xzj8b3
Modified: 2019-11-27 22:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 22:15:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description xzj8b3 2018-11-19 13:53:57 UTC
sealert
/usr/bin/sealert:32: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
Instead, use this sequence:

    from dbus.mainloop.glib import DBusGMainLoop

    DBusGMainLoop(set_as_default=True)

  import dbus.glib
could not attach to desktop process


Please comment for a possible resolution 

the tool is in "permissive" mode because it blocks access to the network Tor and other various tools are more commonly used and not being very familiar with selinux I think is more appropriate to a less experienced user mode

Comment 1 Petr Lautrbach 2018-11-19 14:05:54 UTC
The message is just a warning and most likely is not related to the problem. I believe that when you check journal, you will find a message related to org.fedoraproject dbus interface. In this case please reinstall dbus-* packages and try it again. Please see https://bugzilla.redhat.com/show_bug.cgi?id=1641109#c13 and https://bugzilla.redhat.com/show_bug.cgi?id=1641456

Comment 2 xzj8b3 2018-11-19 14:13:24 UTC
The problem is that graphic tool just does not start(In reply to Petr Lautrbach from comment #1)
> Il messaggio è solo un avvertimento e molto probabilmente non è correlato al
> problema. Credo che quando controlli la rivista, troverai un messaggio
> relativo all'interfaccia dbus org.fedoraproject. In questo caso,
> reinstallare i pacchetti dbus- * e riprovare. Si prega di consultare
> https://bugzilla.redhat.com/show_bug.cgi?id=1641109#c13 e
> https://bugzilla.redhat.com/show_bug.cgi?id=1641456

Comment 3 xzj8b3 2018-11-19 14:19:19 UTC
(In reply to Petr Lautrbach from comment #1)
> Il messaggio è solo un avvertimento e molto probabilmente non è correlato al
> problema. Credo che quando controlli la rivista, troverai un messaggio
> relativo all'interfaccia dbus org.fedoraproject. In questo caso,
> reinstallare i pacchetti dbus- * e riprovare. Si prega di consultare
> https://bugzilla.redhat.com/show_bug.cgi?id=1641109#c13 e
> https://bugzilla.redhat.com/show_bug.cgi?id=1641456

welcome suggestions per fornire maggiori dettagli

Comment 4 Petr Lautrbach 2018-11-19 14:36:32 UTC
Have you tried to reinstall dbus dbus-common and dbus-daemon packages?

# dnf reinstall dbus dbus-common dbus-daemon

Comment 5 Mike 2018-11-20 20:30:24 UTC
*** Bug 1651780 has been marked as a duplicate of this bug. ***

Comment 6 Doug Maxey 2018-11-21 10:18:27 UTC
(In reply to Petr Lautrbach from comment #4)
> Have you tried to reinstall dbus dbus-common and dbus-daemon packages?
> 
> # dnf reinstall dbus dbus-common dbus-daemon

yes, no change

...
Reinstalled:
  dbus-1:1.12.10-1.fc29.x86_64           dbus-common-1:1.12.10-1.fc29.noarch   
  dbus-daemon-1:1.12.10-1.fc29.x86_64
...
# sealert
/usr/bin/sealert:32: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
Instead, use this sequence:

    from dbus.mainloop.glib import DBusGMainLoop

    DBusGMainLoop(set_as_default=True)

  import dbus.glib
ERROR:dbus.proxies:Introspect error on :1.6:/org/fedoraproject/Setroubleshootd: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
could not attach to desktop process
---

should be noted this system does not have a desktop, the connection is from an ssh session where other graphic tools are run ok.

Comment 7 Petr Lautrbach 2018-11-22 10:20:34 UTC
sealert tool without any option expects to be run from a local desktop session. It starts sealert browser using DBUS api. In order to avoid this, -S option can be used. But it doesn't works as well:

$ sealert -S
...
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
/usr/bin/sealert:352: PyGIDeprecationWarning: GObject.idle_add is deprecated; use GLib.idle_add instead
  GObject.idle_add(self.show_browser_at_startup)
Opps, sealert hit an error!

Traceback (most recent call last):
  File "/usr/bin/sealert", line 690, in <module>
    run_app(username)
  File "/usr/bin/sealert", line 101, in run_app
    app = SEAlert(user)
  File "/usr/bin/sealert", line 368, in __init__
    self.browser = BrowserApplet(self.username, self.alert_client, domain=domain)
  File "/usr/lib/python3.7/site-packages/setroubleshoot/browser.py", line 189, in __init__
    size = Gdk.Screen().get_default().get_monitor_geometry(0)
AttributeError: 'NoneType' object has no attribute 'get_monitor_geometry'


I guess this could be fixed in the code using some default geometry when it's not available via Gdk.Screen().get_default()


In the mean time, you can use sealert as a command line tool, e.g.

^&^ sealert -l '*' | grep 'Local ID'
...
Local ID                      053f0936-7434-46fe-90f3-16fa808d1595
Local ID                      1c2d1ee2-051c-4565-9464-42331086d6ac


^&^ sealert -l '1c2d1ee2-051c-4565-9464-42331086d6ac'
SELinux is preventing /usr/bin/bash from read access on the file client.conf.

*****  Plugin restorecon (92.2 confidence) suggests   ************************

If you want to fix the label. 
client.conf default label should be shell_exec_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v client.conf
....

Comment 8 xzj8b3 2018-11-22 14:29:12 UTC
Now it seems to work.

Comment 9 Steve 2019-01-17 14:37:20 UTC
I installed a new copy of Fedora 29 today and 'sealert' from a local desktop session gives me the same error.

/usr/bin/sealert:32: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
Instead, use this sequence:

    from dbus.mainloop.glib import DBusGMainLoop

    DBusGMainLoop(set_as_default=True)

  import dbus.glib
could not attach to desktop process


I ran
# dnf reinstall dbus dbus-common dbus-daemon
but the problem remains.

Comment 10 Ben Cotton 2019-10-31 19:30:21 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2019-11-27 22:15:08 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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