SOLVED Stopping failtoban takes ages

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
I occasionally have to restart PIAF.

Virtually always, stopping failtoban, either explicitly or as part of a controlled shutdown, typically takes 2 to 4 minutes, while the rest of the shutdown completes in maybe 10 seconds.

PIAF is running in a VM so I could just kill it but I understand that is not a good idea.

Is there anything that can be done to kill off failtoban promptly so that I can take down and restart a PIAF VM with minimal interruption?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
All Fail2Ban does is read logs. You shouldn't have to shut it down at all. If it's hanging as part of a normal shutdown, then shut down iptables instead: /etc/init.d/iptables stop
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
I don't chose to shut down F2B. When a trigger a shutdown of the VM it triggers some script to bring down CentOs in an orderly manner. The 3rd line (I think) of the script shuts down F2B and sits there for about 4 minutes.

I tried your </etc/init.d/iptables stop> and that was instantaneous.

I then followed it with a <service fail2ban stop> and that still took 3 minutes 35 seconds.

Is there some other way I could do a shutdown? I mean, what is the minimum I need to do to ensure that PIAF/Asterisk shuts down cleanly? After that I could just kill the VM - unless that is also deemed to be dangerous with a risk to damaging CentOS.

Is it just me who is seeing this long delay shutting down the system? I have suffered from this as far back as I can remember on many different versions of PIAF.
 

BeerCan

Guru
Joined
Nov 25, 2008
Messages
175
Reaction score
30
I was seeing the delay with a new install of piaf-green. I found that if I disable webmin the issue goes away. Because I rarely use webmin, I just start it when I need it.
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
What do you mean by 'disable webmin'?
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
I just had to shut down a VM to do a backup and remembered to close the Webmin web page first.

Indeed there was very little delay.

So it seems that having Webmin open is the cause and closing it first is sufficient.
 

Members online

Forum statistics

Threads
25,782
Messages
167,509
Members
19,202
Latest member
pbxnewguy
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top