无法在centos 7上启动防火墙

j8ag8udp  于 2022-11-07  发布在  其他
关注(0)|答案(4)|浏览(248)

我在我的Centos服务器上安装了Firewalld,但当我试图启动它时,我得到了这个:

$ sudo systemctl start firewalld
Job for firewalld.service failed. See 'systemctl status firewalld.service' and 'journalctl -xn' for details.

以下是systemctl状态:

sudo systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)
   Active: failed (Result: exit-code) since پنجشنبه 2016-04-07 05:36:17 UTC; 9s ago
  Process: 929 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=1/FAILURE)
 Main PID: 929 (code=exited, status=1/FAILURE)

آوریل 07 05:36:17 server1.hamed1soleimani.ir systemd[1]: firewalld.service: main process exited, code=exited, status=1/FAILURE
آوریل 07 05:36:17 server1.hamed1soleimani.ir systemd[1]: Failed to start firewalld - dynamic firewall daemon.
آوریل 07 05:36:17 server1.hamed1soleimani.ir systemd[1]: Unit firewalld.service entered failed state.

和firewall-cmd状态:

sudo firewall-cmd --stat
Traceback (most recent call last):
  File "/bin/firewall-cmd", line 24, in <module>
    from gi.repository import GObject
  File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 37, in <module>
    from . import _gi
ImportError: /usr/lib64/python2.7/site-packages/gi/_gi.so: undefined symbol: g_type_check_instance_is_fundamentally_a

我不能意识到防火墙和一些gtk Python扩展之间的关系!

6qfn3psc

6qfn3psc1#

这对我很有效:

systemctl stop firewalld
pkill -f firewalld
systemctl start firewalld
qc6wkl3g

qc6wkl3g2#

我知道这是一个老线程,但我正面临着这个问题,我只是修复它,认为它将有助于某人在不久的将来.
我认为问题出在我的代码中,或者我放错了文件。
很遗憾,此文件已损坏(可能放错了位置)
/usr/lib/python2.7/site-packages/gi/_gi.so或者我认为它编译得很糟糕。
您需要的是更新Glib 2,因为它将覆盖并修复它,您可以使用yum完成此操作
尝试yum update glib2
我使用**CentOS Linux版本7.1.1503(核心)**测试了上述内容
干杯

ryevplcw

ryevplcw3#

问题是你的包/usr/lib/python2.7/site-packages/gi/_gi.so

Debian (python2) -> sudo apt install python-gi
Debian (python3) -> sudo apt install python3-gi

基于RedHat的系统-〉yum install gilb2
注意:对于覆盖和修复,您可以用途:- 〉yum update glib2

vsaztqbk

vsaztqbk4#

您应该尝试重新启动dbus服务:

$ sudo systemctl restart dbus
$ sudo systemctl restart firewalld

相关问题