Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1358380

Summary: firewall-cmd crashes if /run/dbus/system_bus_socket does not exist
Product: [Fedora] Fedora Reporter: Yu Watanabe <watanabe.yu>
Component: firewalldAssignee: Thomas Woerner <twoerner>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: twoerner, watanabe.yu
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: firewalld-0.4.3.3-1.fc24 firewalld-0.4.3.3-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1367038 (view as bug list) Environment:
Last Closed: 2017-08-08 15:44:19 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: 1367038    

Description Yu Watanabe 2016-07-20 15:07:54 UTC
Description of problem:

If /run/dbus/system_bus_socket does not exist (e.g. chrooting environment), firewall-cmd crashes as follows.
=====================
[root@localhost ~]# firewall-cmd --reload
Not using slip
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/firewall/client.py", line 2200, in __init__
    self.bus = slip.dbus.SystemBus()
  File "<string>", line 2, in SystemBus
  File "/usr/lib64/python3.5/site-packages/dbus/_dbus.py", line 194, in __new__
    private=private)
  File "/usr/lib64/python3.5/site-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 122, 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 /run/dbus/system_bus_socket: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/firewall-cmd", line 913, in <module>
    fw = FirewallClient()
  File "<decorator-gen-615>", line 2, in __init__
  File "/usr/lib/python3.5/site-packages/firewall/client.py", line 53, in handle_exceptions
    return func(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/firewall/client.py", line 2204, in __init__
    self.bus = dbus.SystemBus()
  File "/usr/lib64/python3.5/site-packages/dbus/_dbus.py", line 194, in __new__
    private=private)
  File "/usr/lib64/python3.5/site-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 122, 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 /run/dbus/system_bus_socket: No such file or directory
=====================

This affects, e.g. when we run the following command:
# dnf --releasever=24 --installroot=/tmp/newsysimage install systemd-journal-remote

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

firewalld-0.4.3.2-1.fc24.noarch
firewalld-0.4.3.2-1.fc25.noarch

How reproducible:

always

Steps to Reproduce:
1. dnf --releasever=24 --installroot=/tmp/newsysimage install systemd-journal-remote

Actual results:

crash with the above report.

Expected results:

firewall-cmd safely fails, that is, just output error message and exit.

Additional info:

firewall-cmd --reload is used in %firewalld_reload rpm macro.
So, when we install software which use the macro in their post scripts to chrooting environment, the above crash always occurs.
Fortunately, the crash does not cause any actual problem as we do not need to reload in such cases.

Comment 2 Fedora Update System 2016-08-16 21:08:20 UTC
firewalld-0.4.3.3-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-47dc2b203f

Comment 3 Fedora Update System 2016-08-16 21:08:40 UTC
firewalld-0.4.3.3-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4dedc6ec3d

Comment 4 Fedora Update System 2016-08-16 21:08:51 UTC
firewalld-0.4.3.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-de55d2c2c9

Comment 5 Fedora Update System 2016-08-17 19:53:55 UTC
firewalld-0.4.3.3-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-2016-4dedc6ec3d

Comment 6 Fedora Update System 2016-08-18 01:51:28 UTC
firewalld-0.4.3.3-1.fc23 has been pushed to the Fedora 23 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-2016-47dc2b203f

Comment 7 Fedora Update System 2016-08-18 01:52:14 UTC
firewalld-0.4.3.3-1.fc24 has been pushed to the Fedora 24 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-2016-de55d2c2c9

Comment 8 Fedora Update System 2016-08-19 19:52:53 UTC
firewalld-0.4.3.3-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-09-03 17:39:24 UTC
firewalld-0.4.3.3-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-11-10 17:42:59 UTC
firewalld-0.4.4.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d2828a4793

Comment 11 Fedora Update System 2016-11-11 04:23:52 UTC
firewalld-0.4.4.1-1.fc23 has been pushed to the Fedora 23 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-2016-d2828a4793

Comment 12 Fedora Update System 2016-12-01 14:54:34 UTC
firewalld-0.4.4.2-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b566ecf579

Comment 13 Fedora Update System 2016-12-03 04:29:06 UTC
firewalld-0.4.4.2-1.fc23 has been pushed to the Fedora 23 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-2016-b566ecf579

Comment 14 Fedora Update System 2016-12-05 17:38:09 UTC
firewalld-0.4.4.2-2.fc23 selinux-policy-3.13.1-158.25.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8a0533d057

Comment 15 Fedora Update System 2016-12-13 05:25:24 UTC
firewalld-0.4.4.2-2.fc23, selinux-policy-3.13.1-158.25.fc23 has been pushed to the Fedora 23 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-2016-8a0533d057

Comment 16 Fedora End Of Life 2017-07-25 21:55:44 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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 17 Fedora End Of Life 2017-08-08 15:44:19 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.