Page 1 of 1
Cluster restart csf -crs not working after 10.0.x
Posted: 06 Mar 2017, 19:50
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
Re: Cluster restart csf -crs not working after 10.0.x
Posted: 07 Mar 2017, 17:05
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.
Re: Cluster restart csf -crs not working after 10.0.x
Posted: 10 Mar 2017, 01:43
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:
to
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
Re: Cluster restart csf -crs not working after 10.0.x
Posted: 17 Apr 2017, 22:28
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?
Re: Cluster restart csf -crs not working after 10.0.x
Posted: 23 Apr 2017, 04:55
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.