CSF Cluster Issue

Post Reply
boog_nish
Junior Member
Posts: 1
Joined: 09 Dec 2013, 18:00

CSF Cluster Issue

Post by boog_nish »

Hello,

I was looking for a little assistance with my CSF cluster. There appears to be a strange issue that I can't seem to resolve. I currently have 1 Master server and 8 Slave servers connecting to it. I have properly configured each server, and ensured that they can all speak to each other. I have checked each server to make sure they are all listening on the correct port. When I attempt to send out a cluster ping test from the Master server, I am able to only ping the first IP that is in the server list. This happens no matter which IP is set to be the first one, so I know it isn't an issue of the servers not allowing communication. It is very strange and I was hoping someone else has resolved this issue before. My Master server will always send out the ping or command to the Slave server I have listed first and fail the rest. Please help!

Port Listening Check. Same result for all servers:
------------------------
# netstat -tunap |grep 7777
tcp 0 0 0.0.0.0:7777 0.0.0.0:* LISTEN 847792/lfd Cluster
------------------------

CSF Rule sent to Master from Slave with success:
------------------------
# csf -cd XXX.XXX.XXX.XXX PHP Hack
Sent to <MASTER_IP>
------------------------

CSF Rule sent from Master to all Slaves with failures:
------------------------
# csf -cd XXX.XXX.XXX.XXX PHP Hack
Sent to XXX.XXX.XXX.1
Failed to connect to XXX.XXX.XXX.2
Failed to connect to XXX.XXX.XXX.3
Failed to connect to XXX.XXX.XXX.4
Failed to connect to XXX.XXX.XXX.5
Failed to connect to XXX.XXX.XXX.6
Failed to connect to XXX.XXX.XXX.7
Failed to connect to XXX.XXX.XXX.8
------------------------
ForumAdmin
Moderator
Posts: 1524
Joined: 01 Oct 2008, 09:24

Re: CSF Cluster Issue

Post by ForumAdmin »

That suggests an issue with IO::Socket::INET on the servers. I was unable to recreate a problem. Try changing this line in /etc/csf/csf.pl from:

Code: Select all

		eval {$sock = IO::Socket::INET->new(PeerAddr => $cip, PeerPort => $config{CLUSTER_PORT}, LocalAddr => $localaddr, Timeout => '10');};
to:

Code: Select all

		eval {$sock = IO::Socket::INET->new(PeerAddr => $cip, PeerPort => $config{CLUSTER_PORT}, LocalAddr => $localaddr, Timeout => '10') or print "Cluster error connecting to $cip: $!\n";};
Then restart csf and then restart lfd. You should now get more detailed information about what is happening in IO::Socket::INET.
ohioshawn
Junior Member
Posts: 5
Joined: 05 Apr 2016, 18:42

Re: CSF Cluster Issue

Post by ohioshawn »

Try removing your spaces between the server IP's in csf.conf
Post Reply