[FEATURE] ubuntu24.04安装fail2ban启动报错可能的解决方案 #5051
VincentLiu1999
started this conversation in
Show and tell
Replies: 3 comments
-
经过验证确实有效,建议1Panel官方在fail2ban的栏目里给出关于这个的提示,fail2ban仓库的issure全英文讨论实在看到我一脸懵。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
1Panel 版本
v1.10.7-lts
请描述您的需求或者改进建议
官方文档中给出的ubuntu安装fail2ban的过时了(我是用的24.04版本的ubuntu),我找到了可能的解决方案,请验证后更新文档,谢谢!
请描述你建议的实现方案
ubuntu24.04按照官方文档安装fail2ban后运行报错:
May 17 15:32:25 server.example.com systemd[1]: Starting fail2ban.service - Fail2Ban Service... May 17 15:32:25 server.example.com systemd[1]: Started fail2ban.service - Fail2Ban Service. May 17 15:32:25 server.example.com fail2ban-server[128927]: 2024-05-17 15:32:25,412 fail2ban.configreader [128927]: WARNING 'allowipv6' not defined in 'Definition'. May 17 15:32:25 server.example.com fail2ban-server[128927]: 2024-05-17 15:32:25,449 fail2ban [128927]: ERROR No module named 'asynchat' May 17 15:32:25 server.example.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION May 17 15:32:25 server.example.com systemd[1]: fail2ban.service: Failed with result 'exit-code'.
我查到的原因是:Fail2Ban 与 Python 3.12 不兼容,参考:https://bugs.launchpad.net/ubuntu/+source/fail2ban/+bug/2055114
解决方法(我已验证有效):
① 安装 PIP:apt install python3-pip
② 安装 pyasynchat 包:python3 -m pip install pyasynchat --break-system-packages
③ 启动fail2ban:systemctl start fail2ban
附加信息
No response
Beta Was this translation helpful? Give feedback.
All reactions