0

无法从目标服务器获取信息 原因:在本地服务器上执行命令失败,退出代码为非零。

  command: /usr/local/psa/bin/ipmanage --xml-info
exit code: 255
stdout: <ipinfo>
<ip name="193.160.214.57">
<state>0</state>
<type>shared</type>
<ip_address>193.160.214.57</ip_address>
<mask>255.255.255.255</mask>
<iface>venet0</iface>
<clients>0</clients>
<hostings>0</hostings>
<ftps>false</ftps>
<publicIp></publicIp>
</ip>
</ipinfo>

stderr: [2019-10-20 21:21:51.133] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/f2bmng' '--reload'] with exit code [1]
PHP Fatal error: Uncaught PleskUtilException: f2bmng failed: 2019-10-20 21:21:51,115 fail2ban.jailreader [17670]: ERROR No file(s) found for glob /var/log/secure
2019-10-20 21:21:51,115 fail2ban [17670]: ERROR Failed during configuration: Have not found any log file for ssh jail
ERROR:__main__:Command '['/usr/bin/fail2ban-client', 'reload']' returned non-zero exit status 255 in /usr/local/psa/admin/plib/Service/Agent.php:210
Stack trace:
#0 /usr/local/psa/admin/plib/Ip/Ban/Manager.php(490): Service_Agent->execAndGetResponse('f2bmng', Array, '')
#1 /usr/local/psa/admin/plib/Ip/Ban/Manager.php(458): Ip_Ban_Manager->_callUtility('--reload')
#2 /usr/local/psa/admin/plib/Fail2Ban/EventListener.php(123): Ip_Ban_Manager->reload()
#3 [internal function]: Plesk\Fail2Ban\EventListener->applyChanges()
#4 {main}
thrown in /usr/local/psa/admin/plib/Service/Agent.php on line 210

That is a critical error, migration was stopped.
4

1 回答 1

0

我不知道您的 plesk 有什么“错误”(不太熟悉),但 fail2ban 错误非常简单:

ERROR No file(s) found for glob /var/log/secure 2019-10-20 21:21:51,115 fail2ban [17670]: ERROR Failed during configuration: Have not found any log file for ssh jail

您的ssh监狱似乎被配置为监控/var/log/secure哪个不存在。您必须指定正确的logpath/var/log/auth.log?) ssh 记录身份验证错误的位置;或者如果它是您系统上的 systemd 日志,您必须为此指定backend = systemd

相关的 fail2ban jail.local 将是:

[ssh]
# backend = systemd
logpath = /var/log/auth.log

但是您当然也可以在 plesk 设置中进行配置。

另请注意,您的监狱被称为ssh,通常原始默认监狱的 fail2ban 是sshd(但它确实可以从您的维护者那里配置此名称)。

于 2019-10-21T08:17:22.363 回答