Fix Linux system-config-firewall-tui Exception

Linux Fix

There is a simple solution to an issue in CentOS 6.6 that I have experienced at least a dozen times. When the firewall setup program system-config-firewall-tui is called, the user gets the following error message:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

I run my own local CentOS mirror for installation of and updates to numerous servers. I typically install new servers using a network installation such as CentOS-6.6-x86_64-netinstall.iso and install from a local mirror. I typically choose the type of installation as either Minimal or Basic Server, so many packages are left off of the new server. Then, I only install want I want or need for the application. Although this makes for a more secure server with a smaller footprint, it is also the root of the problem discussed in this article.

The system-config-firewall-tui Problem

To use the command line firewall configuration app you would execute:

yum -y install system-config-firewall

Once installed, you will run the utility but receive an error:

[[email protected] ~]# system-config-firewall-tui
Traceback (most recent call last):
File "/usr/bin/system-config-firewall-tui", line 29, in
import fw_tui
File "/usr/share/system-config-firewall/fw_tui.py", line 34, in
import fw_nm
File "/usr/share/system-config-firewall/fw_nm.py", line 30, in
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

The system-config-firewall-tui Solution

The solution was elusive but very simple!

[[email protected] ~]# reboot

A simple restart of the server fixes this issue. I have not investigated how it fixes the error. It is a simple fix, so now the restart is just part of the setup for my CentOS 6 servers.

system-config-firewall-tui

Now system-config-firewall-tui works just like it should.