Bug 1123919

Summary: system-config-firewall-tui won't start (ImportError: No module named fw_nm)
Product: Red Hat Enterprise Linux 6 Reporter: Viktor Ashirov <vashirov>
Component: system-config-firewallAssignee: Thomas Woerner <twoerner>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Dolezal <todoleza>
Severity: high Docs Contact:
Priority: high    
Version: 6.6CC: bberberov+redhat, bgilbert, bkorren, glennjohnson57, jkurik, jmonk86, jorge.gonzalez, massi.ergosum, matthew.l, psklenar, rfreire, tkopecek, todoleza, twoerner, vogt
Target Milestone: rcKeywords: Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1164223 (view as bug list) Environment:
Last Closed: 2015-06-24 13:09:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1164223    

Description Viktor Ashirov 2014-07-28 15:50:20 UTC
Description of problem:
system-config-firewall-tui won't start complaining about missing python module

Version-Release number of selected component (if applicable):
system-config-firewall-tui-1.2.27-7.1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
Run system-config-firewall-tui 

Actual results:
# system-config-firewall-tui 
Traceback (most recent call last):
  File "/usr/bin/system-config-firewall-tui", line 29, in <module>
    import fw_tui
  File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
    import fw_nm
ImportError: No module named fw_nm


Expected results:
system-config-firewall-tui should start successfully 

Additional info:
system-config-firewall-tui-1.2.27-6.el6.noarch is also affected
system-config-firewall-tui-1.2.27-5.el6.noarch works fine for me.

Comment 1 Viktor Ashirov 2014-07-28 15:58:28 UTC
Additional info:
/usr/share/system-config-firewall/fw_nm.py is in system-config-firewall. After installing it system-config-firewall-tui starts successfully.

Comment 3 Thomas Woerner 2014-08-06 09:37:25 UTC
This has been introduced by the patch for #720831.

Comment 7 Tomas Kopecek 2014-08-12 12:43:08 UTC
I'm adding exception request, as it is affecting base functionality of program and fix is quite simple here.

Comment 16 Adam Williamson 2014-10-29 07:48:19 UTC
confirming I see this in 6.6 final.

Comment 17 Glenn Johnson 2014-11-01 10:15:45 UTC
I have a CentOS 6 minimal installation and installing system-config-firewall didn't help in my case. It seems to have made things worse. Neither system-config-firewall or system-config-firewall-tui will run.

Traceback (most recent call last):
  File "/usr/bin/system-config-firewall-tui", line 29, in <module>
    import fw_tui
  File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
    import fw_nm
  File "/usr/share/system-config-firewall/fw_nm.py", line 30, in <module>
    bus = dbus.SystemBus()
  File "/usr/lib/python2.6/site-packages/dbus/_dbus.py", line 202, in __new__
    private=private)
  File "/usr/lib/python2.6/site-packages/dbus/_dbus.py", line 108, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 125, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Comment 18 Glenn Johnson 2014-11-01 10:55:55 UTC
For what it's worth I've downgraded to 1.2.27-5.el6.noarch with success on 2 machines.

Removed system-config-firewall-base, system-config-firewall-tui and system-config-firewall. Then I used yum to localinstall system-config-firewall-1.2.27-5.el6.noarch.rpm and system-config-firewall-tui-1.2.27-5.el6.noarch.rpm.

Comment 19 Adam Williamson 2014-11-01 15:24:22 UTC
"I have a CentOS 6 minimal installation and installing system-config-firewall didn't help in my case. It seems to have made things worse."

No, it made them better, you're just hitting the next bug down the line. Do 'service messagebus start'.

Comment 20 Thomas Woerner 2014-11-13 15:57:22 UTC
*** Bug 1153640 has been marked as a duplicate of this bug. ***

Comment 21 Thomas Woerner 2014-11-13 15:57:25 UTC
*** Bug 1133463 has been marked as a duplicate of this bug. ***

Comment 23 Denis Gamidov 2014-11-13 20:56:16 UTC
Hello!

I have found workaround of this issue:

yum install system-config-firewall

[root@viper sbin]# system-config-firewall-tui 
Traceback (most recent call last):
  File "/usr/bin/system-config-firewall-tui", line 29, in <module>
    import fw_tui
  File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
    import fw_nm
  File "/usr/share/system-config-firewall/fw_nm.py", line 30, in <module>
    bus = dbus.SystemBus()
  File "/usr/lib/python2.6/site-packages/dbus/_dbus.py", line 202, in __new__
    private=private)
  File "/usr/lib/python2.6/site-packages/dbus/_dbus.py", line 108, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 125, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

shutdown -r now

system-config-firewall-tui

Comment 25 Justin Monk 2014-11-15 02:32:40 UTC
Easy Fix for
[root@redhat ~]# system-config-firewall-tui
Traceback (most recent call last):
  File "/usr/bin/system-config-firewall-tui", line 29, in <module>
    import fw_tui
  File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
    import fw_nm
ImportError: No module named fw_nm

Fix

yum -y install system-config-firewall
cp /usr/share/system-config-firewall/fw_n* ~
yum -y remove system-config-firewall
mv fw_n* /usr/share/system-config-firewall/
system-config-firewall-tui

Sucess

Looks like the Package 
system-config-firewall-tui-1.2.27-7.1.el6.noarch and 
system-config-firewall-tui-1.2.27-5.el6.noarch
system-config-firewall-base-1.2.27-7.1.el6.noarch
system-config-firewall-base-1.2.27-5.el6.noarch.
 
DID NOT INCLUDE 
fw_nm.py
fw_nm.pyc
fw_nm.pyo

Comment 26 Justin Monk 2014-11-15 02:34:51 UTC
(In reply to Viktor Ashirov from comment #0)
> Description of problem:
> system-config-firewall-tui won't start complaining about missing python
> module
> 
> Version-Release number of selected component (if applicable):
> system-config-firewall-tui-1.2.27-7.1.el6.noarch
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> Run system-config-firewall-tui 
> 
> Actual results:
> # system-config-firewall-tui 
> Traceback (most recent call last):
>   File "/usr/bin/system-config-firewall-tui", line 29, in <module>
>     import fw_tui
>   File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
>     import fw_nm
> ImportError: No module named fw_nm
> 
> 
> Expected results:
> system-config-firewall-tui should start successfully 
> 
> Additional info:
> system-config-firewall-tui-1.2.27-6.el6.noarch is also affected
> system-config-firewall-tui-1.2.27-5.el6.noarch works fine for me.

Easy Fix for
[root@redhat ~]# system-config-firewall-tui
Traceback (most recent call last):
  File "/usr/bin/system-config-firewall-tui", line 29, in <module>
    import fw_tui
  File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
    import fw_nm
ImportError: No module named fw_nm

Fix

yum -y install system-config-firewall
cp /usr/share/system-config-firewall/fw_n* ~
yum -y remove system-config-firewall
mv fw_n* /usr/share/system-config-firewall/
system-config-firewall-tui

Success

Looks like the Package 
system-config-firewall-tui-1.2.27-7.1.el6.noarch and 
system-config-firewall-tui-1.2.27-5.el6.noarch
system-config-firewall-base-1.2.27-7.1.el6.noarch
system-config-firewall-base-1.2.27-5.el6.noarch.
 
DID NOT INCLUDE 
fw_nm.py
fw_nm.pyc
fw_nm.pyo

Comment 27 Gerald Vogt 2014-11-25 18:05:25 UTC
Installing system-config-firewall is not really a "fix" for this. On a minimal installation with no GUI/X11 it will install more than 45 dependencies.

Thus a better workaround would be to download the RPM and install it with nodeps.

Comment 28 Justin Monk 2014-11-25 18:31:25 UTC
If you download the tui rpm and search the files in the archive that are needed they are not included. If you really want to get technical the problem is not dependencies it's the package. 

Minimalist Fix
If you want to avoid any other dependencies installed you can extract the three files out of the rpm can copy them instead of installing the rpm. 

or

Follow the above guide and use yum autoremove to erase orphan dependencies after completion.

or

Follow the above guide and use yum erase instead of remove during the removal process.

Comment 29 Gerald Vogt 2014-11-25 19:09:31 UTC
That's still not a fix for this, but a workaround at best. Orphaned files won't get updates thus any future update may break it.

It really needs a proper fix so that system-config-firewall-tui works if installed and it doesn't depend on packages absolutely not required for the TUI nor manually copied or otherwise orphaned files...

Comment 30 Boian Berberov 2014-12-12 00:03:51 UTC
Just ran into this on a fresh CentOS 6.6 install.

I did:

yum install dbus
service messagebus start

It starts now.  I think the package system-config-firewall-tui (or base) just needs to depend on dbus, but I am pretty new to CentOS/RHEL.

Comment 31 Massimiliano 2014-12-22 17:37:45 UTC
I need to install both dbus and dbus-python to get the system-config-firewall-tui working in my CentOS 6 minimal.

# cat /etc/redhat-release 
CentOS release 6.6 (Final)

Comment 32 jorge.gonzalez 2015-03-11 15:40:25 UTC
yum -y install dbud dbus-python
service messagebus start

did it for me.

Comment 33 Matt Lewandowsky 2015-06-22 18:18:44 UTC
For what it's worth, with dbus and dbus-python installed, and after running service messagebus start, system-config-firewall-tui fails to start.

As I have zero interest in dragging in X11 for a TUI configuration tool, are there any alternate (supportable) suggestions? Manually copying around files is not supportable.

Or should I be opening a support case rather than commenting on this Bugzilla entry?

Comment 34 Petr Sklenar 2015-06-23 11:54:49 UTC
Hello,

it seems it works with the latest system-config-firewall-1.2.27-7.2.el6_6.noarch

[0 root@xxx-35 test]# service messagebus status
messagebus (pid  1294) is running...
[0 root@xxx-35 test]# rpm -q system-config-firewall dbus dbus-python
system-config-firewall-1.2.27-7.2.el6_6.noarch
dbus-1.2.24-8.el6_6.x86_64
dbus-python-0.83.0-6.1.el6.x86_64
[0 root@xxx-35 test]# system-config-firewall-tui
[0 root@xxx-35 test]# echo $?
0

Comment 35 Thomas Woerner 2015-06-24 13:09:23 UTC
This has been fixed in https://rhn.redhat.com/errata/RHBA-2014-1961.html