After upgrading my CentOS 7 to CentOS 8, when tried to start the firewalld service, encountered the error: Exception DBusException: org.freedesktop.DBus.Error.AccessDenied
, however works perfectly normal with a fresh install of CentOS 8!. Below is the complete error:
[root@upgrade-centos ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: inactive (dead) since Wed 2022-02-16 15:14:18 IST; 2s ago Docs: man:firewalld(1) Process: 27773 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS) Main PID: 27773 (code=exited, status=0/SUCCESS) Feb 16 15:14:18 upgrade-centos systemd[1]: Starting firewalld - dynamic firewall daemon... Feb 16 15:14:18 upgrade-centos firewalld[27773]: ERROR: Exception DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.129" is not allowed to own the service "org.fedoraproject.FirewallD1" due to security policies in t> Feb 16 15:14:18 upgrade-centos systemd[1]: firewalld.service: Succeeded. Feb 16 15:14:18 upgrade-centos systemd[1]: Started firewalld - dynamic firewall daemon.
How to fix Firewalld fails to start
With the help of a bug report, able to find a solution. Restart the dbus service and then start the firewalld service.
# systemctl restart dbus
# systemctl restart firewalld
However, encountered another error: firewalld.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
[root@upgrade-centos ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-02-16 15:16:42 IST; 3s ago Docs: man:firewalld(1) Process: 27835 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=3) Main PID: 27835 (code=exited, status=3) Feb 16 15:16:42 upgrade-centos systemd[1]: Starting firewalld - dynamic firewall daemon... Feb 16 15:16:42 upgrade-centos systemd[1]: Started firewalld - dynamic firewall daemon. Feb 16 15:16:42 upgrade-centos systemd[1]: firewalld.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Feb 16 15:16:42 upgrade-centos systemd[1]: firewalld.service: Failed with result 'exit-code'.
Since the system wasn’t rebooted after the upgrade, the above error. After rebooting the system, I was successfully able to start the firewalld service on CentOS 8.