VPS侦探论坛

 找回密码
 注册
查看: 1421|回复: 4

debian11.7 lnmp2.0 新装fail2ban发现状态不对

[复制链接]
发表于 2023-8-13 01:39:43 | 显示全部楼层 |阅读模式

fail2ban-client status
Traceback (most recent call last):
  File "/usr/bin/fail2ban-client", line 34, in <module>
    from fail2ban.client.fail2banclient import exec_command_line, sys
ImportError: No module named fail2ban.client.fail2banclient


美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-8-13 01:52:12 | 显示全部楼层


先删除了
/etc/init.d/fail2ban stop
rm -rf /usr/local/bin/fail2ban*
rm -f /etc/init.d/fail2ban
rm -rf /etc/fail2ban/
rm -rf /var/run/fail2ban

原先在centos steam8上是正常的 直接安装就能用的 不知道在debian11.7下是什么情况了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2023-8-13 09:43:19 | 显示全部楼层

安装过程的日志信息发一下
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2023-8-16 05:42:35 | 显示全部楼层



systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/etc/systemd/system/fail2ban.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:fail2ban(1)
root@debian:~/lnmp2.0/tools# systemctl start fail2ban
root@debian:~/lnmp2.0/tools# systemctl status fail2ban
● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/etc/systemd/system/fail2ban.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-08-16 05:40:44 CST; 1s ago
       Docs: man:fail2ban(1)
    Process: 595220 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
    Process: 595221 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=1/FAILURE)
   Main PID: 595221 (code=exited, status=1/FAILURE)
        CPU: 14ms

Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Scheduled restart job, restart counter is at 5.
Aug 16 05:40:44 debian systemd[1]: Stopped Fail2Ban Service.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Start request repeated too quickly.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 16 05:40:44 debian systemd[1]: Failed to start Fail2Ban Service.
root@debian:~/lnmp2.0/tools# fail2ban-client -d
Traceback (most recent call last):
  File "/usr/bin/fail2ban-client", line 34, in <module>
    from fail2ban.client.fail2banclient import exec_command_line, sys
ImportError: No module named fail2ban.client.fail2banclient
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2023-8-16 05:48:37 | 显示全部楼层

这是日志
Aug 16 05:40:43 debian fail2ban-server[595214]:     from fail2ban.client.fail2banserver import exec_command_line, sys
Aug 16 05:40:43 debian fail2ban-server[595214]: ImportError: No module named fail2ban.client.fail2banserver
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Main process exited, code=exited, status=1/FAILURE
░░ An ExecStart= process belonging to unit fail2ban.service has exited.
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Failed with result 'exit-code'.
░░ The unit fail2ban.service has entered the 'failed' state with result 'exit-code'.
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Scheduled restart job, restart counter is at 2.
░░ Automatic restarting of the unit fail2ban.service has been scheduled, as the result for
░░ Subject: A stop job for unit fail2ban.service has finished
░░ A stop job for unit fail2ban.service has finished.
░░ Subject: A start job for unit fail2ban.service has begun execution
░░ A start job for unit fail2ban.service has begun execution.
░░ Subject: A start job for unit fail2ban.service has finished successfully
░░ A start job for unit fail2ban.service has finished successfully.
Aug 16 05:40:43 debian fail2ban-server[595216]: Traceback (most recent call last):
Aug 16 05:40:43 debian fail2ban-server[595216]:   File "/usr/bin/fail2ban-server", line 34, in <module>
Aug 16 05:40:43 debian fail2ban-server[595216]:     from fail2ban.client.fail2banserver import exec_command_line, sys
Aug 16 05:40:43 debian fail2ban-server[595216]: ImportError: No module named fail2ban.client.fail2banserver
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Main process exited, code=exited, status=1/FAILURE
░░ An ExecStart= process belonging to unit fail2ban.service has exited.
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Failed with result 'exit-code'.
░░ The unit fail2ban.service has entered the 'failed' state with result 'exit-code'.
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Scheduled restart job, restart counter is at 3.
░░ Automatic restarting of the unit fail2ban.service has been scheduled, as the result for
░░ Subject: A stop job for unit fail2ban.service has finished
░░ A stop job for unit fail2ban.service has finished.
░░ Subject: A start job for unit fail2ban.service has begun execution
░░ A start job for unit fail2ban.service has begun execution.
░░ Subject: A start job for unit fail2ban.service has finished successfully
░░ A start job for unit fail2ban.service has finished successfully.
Aug 16 05:40:43 debian fail2ban-server[595219]: Traceback (most recent call last):
Aug 16 05:40:43 debian fail2ban-server[595219]:   File "/usr/bin/fail2ban-server", line 34, in <module>
Aug 16 05:40:43 debian fail2ban-server[595219]:     from fail2ban.client.fail2banserver import exec_command_line, sys
Aug 16 05:40:43 debian fail2ban-server[595219]: ImportError: No module named fail2ban.client.fail2banserver
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Main process exited, code=exited, status=1/FAILURE
░░ An ExecStart= process belonging to unit fail2ban.service has exited.
Aug 16 05:40:43 debian systemd[1]: fail2ban.service: Failed with result 'exit-code'.
░░ The unit fail2ban.service has entered the 'failed' state with result 'exit-code'.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Scheduled restart job, restart counter is at 4.
░░ Automatic restarting of the unit fail2ban.service has been scheduled, as the result for
░░ Subject: A stop job for unit fail2ban.service has finished
░░ A stop job for unit fail2ban.service has finished.
░░ Subject: A start job for unit fail2ban.service has begun execution
░░ A start job for unit fail2ban.service has begun execution.
░░ Subject: A start job for unit fail2ban.service has finished successfully
░░ A start job for unit fail2ban.service has finished successfully.
Aug 16 05:40:44 debian fail2ban-server[595221]: Traceback (most recent call last):
Aug 16 05:40:44 debian fail2ban-server[595221]:   File "/usr/bin/fail2ban-server", line 34, in <module>
Aug 16 05:40:44 debian fail2ban-server[595221]:     from fail2ban.client.fail2banserver import exec_command_line, sys
Aug 16 05:40:44 debian fail2ban-server[595221]: ImportError: No module named fail2ban.client.fail2banserver
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Main process exited, code=exited, status=1/FAILURE
░░ An ExecStart= process belonging to unit fail2ban.service has exited.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Failed with result 'exit-code'.
░░ The unit fail2ban.service has entered the 'failed' state with result 'exit-code'.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Scheduled restart job, restart counter is at 5.
░░ Automatic restarting of the unit fail2ban.service has been scheduled, as the result for
░░ Subject: A stop job for unit fail2ban.service has finished
░░ A stop job for unit fail2ban.service has finished.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Start request repeated too quickly.
Aug 16 05:40:44 debian systemd[1]: fail2ban.service: Failed with result 'exit-code'.
░░ The unit fail2ban.service has entered the 'failed' state with result 'exit-code'.
░░ Subject: A start job for unit fail2ban.service has failed
░░ A start job for unit fail2ban.service has finished with a failure.

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-24 15:02 , Processed in 0.027075 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表