问题描述:
[root@localhost apache-tomcat-9.0.16]# firewall-cmd --add-port=80/tcp --permanent
ERROR:dbus.proxies:Introspect error on :1.65:/org/fedoraproject/FirewallD1: dbus.exceptions.DBusException: org.fedoraproject.FirewallD1.Exception: 'FirewallD' object has no attribute 'path'
Error: 'FirewallD' object has no attribute 'fw'
[root@localhost apache-tomcat-9.0.16]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
Error: Method "getZoneByName" with signature "s" on interface "org.fedoraproject.FirewallD1.config" doesn't exist
[root@localhost apache-tomcat-9.0.16]# firewall-cmd --zone=public --list-ports
ERROR:dbus.proxies:Introspect error on :1.65:/org/fedoraproject/FirewallD1: dbus.exceptions.DBusException: org.fedoraproject.FirewallD1.Exception: 'FirewallD' object has no attribute 'path'
Error: Action org.fedoraproject.FirewallD1.config.info is not registered
解决方案
执行针对firewalld软件包的升级命令
yum update firewalld
再次运行
[root@localhost apache-tomcat-9.0.16]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[root@localhost apache-tomcat-9.0.16]# firewall-cmd --zone=public --add-port=80/tcp --permanent
success
[root@localhost apache-tomcat-9.0.16]#