Cluster restart csf -crs not working after 10.0.x

Post Reply
websavers
Junior Member
Posts: 17
Joined: 04 Sep 2013, 13:46

Cluster restart csf -crs not working after 10.0.x

Post by websavers »

Hey,

Since the update to v10 cluster restarts fail for every member. I run csf -crs or csf --crestart and get:

Code: Select all

Sent request to <ip0>, no reply
Sent request to <ip1>, no reply
Sent request to <ip2>, no reply
Sent request to <ip3>, no reply
Sent request to <ip4>, no reply
Sent request to <ip5>, no reply
{...}
All other cluster methods that we use regularly work, like --cping, --cfile, and individual bans with -cd
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: Cluster restart csf -crs not working after 10.0.x

Post by ForumAdmin »

We're unable to recreate any issues with the cluster restart command. and nothing has changed in that code since v9.30. I'd suggest checking the master and slave lfd.log files when issuing the command and looking for relevant messages.
websavers
Junior Member
Posts: 17
Joined: 04 Sep 2013, 13:46

Re: Cluster restart csf -crs not working after 10.0.x

Post by websavers »

It appears this is caused by having a large number of rules on each of the cluster members. This causes the restart command on each box to take some time -- longer than the time provided to read the socket of just 5 seconds. To fix this, I changed the socket read time in /usr/bin/csf:702 as follows:

Code: Select all

if ($select->can_read(5)) {
to

Code: Select all

if ($select->can_read(30)) {
Which, alongside changing line 691's timeout value to 30 seconds now gives the server 30 seconds to respond.

If not a change for everyone, perhaps the timeout value could be configurable within csf.conf so those with larger rulesets don't run into this issue.

Note that most servers required about 15-20 seconds to process. I set it to 30 in case the server is under any amount of load.

-Jordan
websavers
Junior Member
Posts: 17
Joined: 04 Sep 2013, 13:46

Re: Cluster restart csf -crs not working after 10.0.x

Post by websavers »

Except of course, now after auto-updates to CSF these changes are overwritten and now we're back to this problem of connections timing out.

Any word on whether we'll be able to configure the timeout value in a future release?
Sergio
Junior Member
Posts: 1714
Joined: 12 Dec 2006, 14:56

Re: Cluster restart csf -crs not working after 10.0.x

Post by Sergio »

May be this could help while this is being fixed by ConfigServer,
create a CSF pre script with a line like this::

sed -i 's/if ($select->can_read(5)) {/if ($select->can_read(30)) {/'

you get the idea.
Write the sed line as necessary and escape the characters if needed.
Post Reply