Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-60902

firewall-cmd without arguments throws an error if service is not running

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-10.0.beta
    • firewalld
    • None
    • No
    • Low
    • rhel-sst-networking-core
    • ssg_networking
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      firewall-cmd ends up with traceback when used without parameters and the dbus listening firewalld service is not up

      Please provide the package NVR for which the bug is seen:

      firewalld-1.3.4

      firewalld-2.1.3

      firewalld-2.2.1


      rhel9,rhel10,fedora40

      How reproducible is this bug?:

      Steps to reproduce

      systemctl stop firewalld

      firewall-cmd

      Expected results

      firewall-cmd # this is output when service is running
      State: running # should be different when it's stopped

      No options specified
      usage: 'firewall-cmd --help' for usage information or see firewall-cmd(1) man page

      Actual results

      $ firewall-cmd --state

      not running

      $ firewall-cmd
      Error: Traceback (most recent call last):
       File "/usr/lib/python3.12/site-packages/firewall/client.py", line 46, in _impl
         return func(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^
       File "/usr/lib/python3.12/site-packages/firewall/client.py", line 3527, in get_property
         return dbus_to_python(self.fw_properties.Get(config.dbus.DBUS_INTERFACE, prop))
                               ^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: 'NoneType' object has no attribute 'Get'

              egarver Eric Garver
              todoleza@redhat.com Tomas Dolezal
              Eric Garver Eric Garver
              qe-baseos-daemons qe-baseos-daemons
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: