Message from fail2ban
Just saw this in my inbox and don't know how to resolve this. Can someone help me out?
Subject: Cron
/etc/cron.daily/logrotate:
ERROR Unable to contact server. Is it running?
error: error running non-shared postrotate script for /var/log/fail2ban.log of '/var/log/fail2ban.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
4 Replies
sudo service fail2ban status
If it isn't running, try starting it:
sudo service fail2ban start
Then check the logs to see if there are entries suggesting why it stopped.
I will try that.
I restarted fail2ban and below is the status output:
root@domain:~# service fail2ban status
● fail2ban.service - LSB: Start/stop fail2ban
Loaded: loaded (/etc/init.d/fail2ban)
Active: active (exited) since Sat 2016-11-05 15:51:30 GMT; 3 days ago
Nov 05 15:51:30 domain fail2ban[3339]: Starting authentication failure monitor: fail2ba...cal
Nov 05 15:51:30 domain fail2ban[3339]: [line 482]: ' iptables-multiport[name=...\n'
Nov 05 15:51:30 domain fail2ban[3339]: [line 523]: ' sendmail-whois-lines[nam...\n'
Nov 05 15:51:30 domain fail2ban[3339]: [line 538]: ' sendmail-whois[name=SSH,...\n'
Nov 05 15:51:30 domain fail2ban[3339]: [line 539]: ' blocklist_de[email="%(se...\n'
Nov 05 15:51:30 domain fail2ban[3339]: [line 550]: ' sendmail-whois[name=Nagi...\n'
Nov 05 15:51:30 domain fail2ban[3339]: failed!
Nov 05 15:51:30 domain systemd[1]: Started LSB: Start/stop fail2ban.
Nov 08 22:35:07 domain systemd[1]: Started LSB: Start/stop fail2ban.
Hint: Some lines were ellipsized, use -l to show in full.
@BritWeb:
Hi
I restarted fail2ban and below is the status output:
root@domain:~# service fail2ban status ● fail2ban.service - LSB: Start/stop fail2ban Loaded: loaded (/etc/init.d/fail2ban) Active: active (exited) since Sat 2016-11-05 15:51:30 GMT; 3 days ago Nov 05 15:51:30 domain fail2ban[3339]: Starting authentication failure monitor: fail2ba...cal Nov 05 15:51:30 domain fail2ban[3339]: [line 482]: ' iptables-multiport[name=...\n' Nov 05 15:51:30 domain fail2ban[3339]: [line 523]: ' sendmail-whois-lines[nam...\n' Nov 05 15:51:30 domain fail2ban[3339]: [line 538]: ' sendmail-whois[name=SSH,...\n' Nov 05 15:51:30 domain fail2ban[3339]: [line 539]: ' blocklist_de[email="%(se...\n' Nov 05 15:51:30 domain fail2ban[3339]: [line 550]: ' sendmail-whois[name=Nagi...\n' Nov 05 15:51:30 domain fail2ban[3339]: failed! Nov 05 15:51:30 domain systemd[1]: Started LSB: Start/stop fail2ban. Nov 08 22:35:07 domain systemd[1]: Started LSB: Start/stop fail2ban. Hint: Some lines were ellipsized, use -l to show in full.
Check the fail2ban logs.