Silos added during auto-scale fail to ping other live silos
This issue appears to be new for me since 1.5.0 or 1.5.1 and repros consistently across multiple environments. Initial deployments seem to work fine for any number of silos, but auto-scale always fails with the following error
Logger="Runtime" Caller="MembershipOracle" Message="-Failed to get ping responses from all 2 silos that are currently listed as Active in the Membership table. Newly joining silos validate connectivity with all pre-existing silos that are listed as Active in the table and have written I Am Alive in the table in the last 00:10:00 period, before they are allowed to join the cluster. Active silos are: [[SiloAddress=S10.0.0.6:11111:243536521 SiloName=ModelEngine.Silo.GraphBuilder_IN_0 Status=Active HostName=RD0003FFB6E926 ProxyPort=30000 RoleName=ModelEngine.Silo.GraphBuilder UpdateZone=0 FaultZone=0 StartTime = 2017-09-19 17:02:01.627 GMT IAmAliveTime = 2017-09-25 01:07:42.972 GMT Suspecters = [S10.0.0.29:11111:243740312] SuspectTimes = [2017-09-22 01:53:34.111 GMT]], [SiloAddress=S10.0.0.7:11111:243659366 SiloName=ModelEngine.Silo.GraphBuilder_IN_1 Status=Active HostName=RD0003FFB6D99D ProxyPort=30000 RoleName=ModelEngine.Silo.GraphBuilder UpdateZone=1 FaultZone=1 StartTime = 2017-09-21 03:09:26.867 GMT IAmAliveTime = 2017-09-25 01:05:06.972 GMT ]]" IP="10.0.0.11:11111" Exception="" EventCode="100661"
The set of live silos that are being pinged here appears to be accurate and I am able to log into the new instance and verify connectivity with the live instances via ping. Log file attached for a failing silo.
We suspect this was an infrastructure network issue, correct? If so, can we close the issue?
Yes, please close. By the time the scale out happens, this cluster is already overloaded and has trouble responding.
From: Sergey Bykov [email protected] Sent: Friday, October 6, 2017 5:22:40 PM To: dotnet/orleans Cc: jafletch; Author Subject: Re: [dotnet/orleans] Silos added during auto-scale fail to ping other live silos (#3437)
We suspect this was an infrastructure network issue, correct? If so, can we close the issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/orleans/issues/3437#issuecomment-334897394, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADvtyXf3OOzAXbfNtGSY1FAF1R86_9ntks5spsRQgaJpZM4PjMMV.
Well, on second thought maybe I'm not ready to close this out quite yet. I just saw that this is happening again across our environments but with different circumstances. When I investigated before, what I saw was that scale out at times when the cluster was already quite loaded seemed to fail because the messages to contact the live silos were timing out. Since I was also seeing other exceptions related to timeouts, I just assumed that the silo liveliness messages were just getting caught up in the mix with other timeouts and causing the problem.
I changed the way the cluster scales out to be time based to make sure that the scale was ready before the big peaks we have and that seemed to fix things for a few days but now I am seeing issues with our last scale operation.
Now I am seeing a lot of the following exceptions and in this scenario, the load on the cluster seems pretty normal.
Logger="Runtime" Caller="MembershipOracle" Message="-Did not get ping response for ping #20 from S10.0.0.6:11111:244944440. Reason = Original Exc Type: Orleans.Runtime.OrleansMessageRejectionException Message:Silo S10.0.0.10:11111:245216484 is rejecting message: Request S10.0.0.10:11111:245216484MembershipOracle@S0000000f->S10.0.0.6:11111:244944440MembershipOracle@S0000000f #22: global::Orleans.Runtime.IMembershipService:Ping(). Reason = Exception getting a sending socket to endpoint S10.0.0.6:11111:244944440" IP="10.0.0.10:11111" Exception="" EventCode="100613"
Logger="Runtime" Caller="Runtime.Messaging.SiloMessageSender/PingSender" Message="Exception getting a sending socket to endpoint S10.0.0.6:11111:244944440" IP="10.0.0.10:11111" Exception="System.TimeoutException: Connection to 10.0.0.6:11111 could not be established in 00:00:05 at Orleans.Runtime.SocketManager.Connect(Socket s, IPEndPoint endPoint, TimeSpan connectionTimeout) at Orleans.Runtime.SocketManager.SendingSocketCreator(IPEndPoint target) at Orleans.Runtime.LRU`2.Get(TKey key) at Orleans.Runtime.Messaging.SiloMessageSender.GetSendingSocket(Message msg, Socket& socket, SiloAddress& targetSilo, String& error)" EventCode="101021"
This also continues repeating like this for hours, regardless of the load on the silos.
I can bump the timeout on establishing the socket connection by changing the OpenConnectionTimeout value, correct? I am planning to try that, but I wonder why this just recently started happening.
This is with a Cloud Service (worker role), right? Are you starting the silo from within OnStart or Run method of the worker role code? We've seen in the past that when OnStart is called, firewalls between role instances may or may not be fully open yet.
The silo is being started from within Run (RunAsync). I bumped the OpenConnectionTimeout value as of yesterday and the scale out last night did not show this issue after hitting it for 3-4 days in a row.
Hmm, that's strange. The default is 5 seconds. Why wouldn't that be enough, especially so consistently? I don't think we've ever heard of socket connection attempts timing out.
This same issue happened again last night so the increased timeout was not the fix. Attaching a log file which shows the window around the scale operation. It would be extremely helpful if someone can help me find anything odd in this log. 44755804-7f73-4a8b-ac4c-a5d9c4e17d06.zip
Did you scale out the worker role from 2 to 3 instances?
Yes
I suspect this may be exacerbated by the fact that you configured the request timeout value to 3 minutes while MaxJoinAttemptTime has the default value of 5 minutes. I see _IN2 silo trying to validate its connectivity with the 2 running silos, and getting a single timeout from _IN0 after 3 minutes. But the remaining 2 minutes aren't enough to see is it is getting the timeout consistently.
Is it still possible that for some reason IN2 cannot communicate with IN0. I see no indication that it is unable to talk with IN1.
Can you either increase MaxJoinAttemptTime or reduce the request timeout, so that we can see if the inability to communicate is indeed persistent? If that's the case, can you check that the ports are open in the respective firewalls? They should be. But I can't think of another reason why IN2 is getting a ping timeout from IN0.
I will try changing this setting and let you know. To confirm, the ports to check are the standard 11111 and 30000?
I bumped the MaxJoinAttemptTime to 10mins and still saw numerous failures on scale out. I also was able to log into one of the failing boxes and confirm that I could connect to ports 11111 and 30000 for one of the hosts that appeared to be unreachable. Strangely this never seems to repro on initial deployment, only when scaling out.
Actually I believe I see a connection problem. The newly added machines can see the existing silo machines at port 30000 but the existing silos are not able to see the newly added machines at that port. This may be some kind of Azure infrastructure issue.
To confirm, the ports to check are the standard 11111 and 30000?
The silo-to-silo port (11111) is the concern here. 30000 is the client gateway port to which frontends connect. It's not a concern in this case because it does not participate in the cluster membership protocol.
The newly added machines can see the existing silo machines at port 30000 but the existing silos are not able to see the newly added machines at that port. This may be some kind of Azure infrastructure issue.
What about 11111? I suspect a firewall issue when I asked you above:
We've seen in the past that when OnStart is called, firewalls between role instances may or may not be fully open yet.
When Run is invoked, all requested ports are supposed to be open in the firewall. I wonder if there's some different behavior in the scale-out scenario. But that would be very strange.
This has been resolved offline.
May I know how this issue is resolved? We met the same issue during scale out
@DaweiCai could you open a new issue with details?