1panel无法启动fail2ban解决方案
编辑
46
2024-06-09
在1panel中安装启用fail2ban时发现根本无法启动!毫无道理的启动后没反应,查看日志如下:
Jun 09 20:48:33 server.example.com systemd[1]: Starting fail2ban.service - Fail2Ban Service...
Jun 09 20:48:33 server.example.com systemd[1]: Started fail2ban.service - Fail2Ban Service.
Jun 09 20:48:33 server.example.com fail2ban-server[28319]: 2024-06-09 20:48:33,412 fail2ban.configreader [28319]: WARNING 'allowipv6' not defined in 'Definition'.
Jun 09 20:48:33 server.example.com fail2ban-server[28319]: 2024-06-09 20:48:33,449 fail2ban [28319]: ERROR No module named 'asynchat'
Jun 09 20:48:33 server.example.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Jun 09 20:48:33 server.example.com systemd[1]: fail2ban.service: Failed with result 'exit-code'.
原来是日前我千辛万苦升级ubuntu24.04的锅!!!
在这里要感谢万能的搜索引擎以及Edge的翻译功能!该问题已在24年2月份就存在了。因为与新版的python3.12不兼容导致。
问题出处:Bug #2055114 “fail2ban is broken in 24.04 Noble” : Bugs : fail2ban package : Ubuntu (launchpad.net)
解决方法:
安装pip
sudo apt install python3-pip
安装pyasynchat
sudo python3 -m pip install pyasynchat --break-system-packages
启动fail2ban
systemctl start fail2ban
- 0
- 0
-
分享