I thought that there were some options that you should also specify in the
setsockopt.
int Optval = 1;
rc = setsockopt( Sock, SOL_SOCKET, SO_REUSEADDR,
(char*)&Optval, sizeof(Optval));
I do not see this actually being set in gmetad.c. I think that it should be.
Otherwise the connect timeout period as described in
http://stackoverflow.com/questions/2597608/c-socket-connection-timeout
-----Original Message-----
From: Nicholas Satterly [mailto:[email protected]]
Sent: Friday, January 25, 2013 7:45 AM
To: [email protected]
Subject: [Ganglia-developers] Ganglia gmetad thread stuck at TCP SYN SENT
Hi,
We have a situation here where developers deploy a new version of their app in
EC2 by spinning up instances running the new version, adding them to the
auto-scaling group and once all looks good just terminating the instances with
the old app version.
Works great for them, however the ganglia gmetad's polling that cluster seem to
hang during the socket connect to the old instances in SYN SENT status if they
are in the middle of establishing the TCP connection just as the instance is
being terminated.
Does anyone have any ideas of how the connection could at least be timed out?
Keep in mind that the gmetad is multi-threaded so I'm pretty sure that rules
out the use of SIGALRM.
I think the relevant code block is in the g_tcp_socket_new() function in
lib/tcp.c here...
/* Connect */
rv = connect(sockfd, &s->sa, sizeof(s->sa));
if (rv != 0)
{
close (sockfd);
free (s);
return NULL;
}
How could a 2 second timeout be enforced on this connect()?
Thanks in advance.
--Nick.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC,
Windows 8 Apps, JavaScript and much more. Keep your skills current with
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts.
ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers