You are not logged in.
Pages: 1
Topic closed
Hello everyone,
I installed updates on my server today and decided it was time for a reboot. After the server came back up, I noticed fail2ban never started and attempted to start it manually. It fails to start via /etc/rc.d/fail2ban start every single time. I tried to start via /usr/bin/fail2ban-client start but that also fails and returns the error
$ sudo fail2ban-client start
WARNING 'action' not defined in 'php-url-fopen'. Using default value
WARNING 'action' not defined in 'lighttpd-fastcgi'. Using default value
2011-12-19 09:35:35,993 fail2ban.server : INFO Starting Fail2ban v0.8.4
2011-12-19 09:35:35,993 fail2ban.server : INFO Starting in daemon mode
ERROR Could not start server. Maybe an old socket file is still present. Try to remove /var/run/fail2ban/fail2ban.sock. If you used fail2ban-client to start the server, adding the -x option will do it
$ rm /var/run/fail2ban/fail2ban.sock
rm: cannot remove `/var/run/fail2ban/fail2ban.sock': No such file or directory
$ ls /var/run
crond.pid daemons dhcpcd dhcpcd-eth0.pid lighttpd lock mount mysqld ntpd openvpn sshd.pid syslog-ng.ctl syslog-ng.pid udev utmp
$ ls /var/run/daemons/
crond iptables lighttpd mysqld netfs network ntpd openvpn sshd syslog-ng
$ sudo fail2ban-client -x start
WARNING 'action' not defined in 'php-url-fopen'. Using default value
WARNING 'action' not defined in 'lighttpd-fastcgi'. Using default value
2011-12-19 09:37:36,542 fail2ban.server : INFO Starting Fail2ban v0.8.4
2011-12-19 09:37:36,542 fail2ban.server : INFO Starting in daemon mode
ERROR Could not start server. Maybe an old socket file is still present. Try to remove /var/run/fail2ban/fail2ban.sock. If you used fail2ban-client to start the server, adding the -x option will do it
As you can see, the sock file does not exist, yet it still fails to start with no indication as to why. Using the -x option to force start, also fails. Does anyone have any ideas as to why f2b is failing to start.
Thanks
Alec
Offline
I have the same problem. Fail2ban won't start in any way.
[ztjuh@ztjuh rc.d]$ ./fail2ban start
:: Starting fail2ban [FAIL]
[ztjuh@ztjuh rc.d]$ sudo fail2ban-client start
2011-12-20 07:08:17,596 fail2ban.server : INFO Starting Fail2ban v0.8.4
2011-12-20 07:08:17,597 fail2ban.server : INFO Starting in daemon mode
ERROR Could not start server. Maybe an old socket file is still present. Try to remove /var/run/fail2ban/fail2ban.sock. If you used fail2ban-client to start the server, adding the -x option will do it
[ztjuh@ztjuh rc.d]$ sudo fail2ban-client -x start
2011-12-20 07:10:58,311 fail2ban.server : INFO Starting Fail2ban v0.8.4
2011-12-20 07:10:58,312 fail2ban.server : INFO Starting in daemon mode
ERROR Could not start server. Maybe an old socket file is still present. Try to remove /var/run/fail2ban/fail2ban.sock. If you used fail2ban-client to start the server, adding the -x option will do it
Also there is no directory /var/run/fail2ban/ for me, or a fail2ban.sock in /var/run/. Should I make the fail2ban directory as root?
Thanks,
Alex
Last edited by Ztjuh (2011-12-20 04:20:22)
Offline
Ok lol, fixed, I made the fail2ban directory as root, and it starts
Offline
After a reboot, fail2ban didn't start again.
/var/run/fail2ban/ wasn't there again, after creating the directory as root, it succeeds to start.
Offline
After a reboot, fail2ban didn't start again.
/var/run/fail2ban/ wasn't there again, after creating the directory as root, it succeeds to start.
Hmm interesting. Well I don't know about you but I think its time to file a bug report, no?
[Edit]
Perhaps a temporary fix would be to add 'mkdir -p /var/run/fail2ban' to your /etc/rc.local file?
Last edited by maddog39 (2011-12-20 18:24:13)
Offline
It seems to me that this is related to the latest initscripts update. Initscripts seems to be doing some cleanup of /var/run, while fail2ban thinks that, once it has setup /var/run/fail2ban during installation, the directory will always be there. The "proper" fix for this is to create a file fail2ban.conf (name not important) in /etc/tmpfiles.d with contents:
D /run/fail2ban 0755 root root -
This creates the directory /run/fail2ban with permissions 0755, user root, and group root at startup. Since /var/run is only a symlink to /run, this fixes the problem.
[EDIT]
I think a bug report against fail2ban is in order. Its package should simply create the above file to ensure /var/run/fail2ban is recreated upon every restart.
Last edited by nzeh (2011-12-21 00:32:42)
Offline
Seems bug has already been filed and an updated pacakge is already in testing.
https://bugs.archlinux.org/task/22926?p … g=fail2ban
[edit]
This bug was filed in Feb '11 and is still open?? But it was working until recently, lol.
Last edited by maddog39 (2011-12-21 18:44:30)
Offline
The package is in [community] already. Please test it to see if the bug is fixed.
Offline
It seems the package in community didn't fix the problem
Offline
liuexp, please start a new thread if you are serious about getting a solution. Please do not necro-bump. Closing.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Pages: 1
Topic closed