Intermittent error setting up SSL connection


#1

POSTing to https://api.twitter.com/1.1/statuses/update.json

99% of the time this is successful. During our nightly build + unit test run, this call fails with an SSL error. The only thing we can pinpoint is that this failure occurs at 2AM PST.

On the calling side, we get this exception in C#: The request was aborted: Could not create SSL/TLS secure channel…

In the logs, we see that during the SSL handshake, we process the ContinueNeeded part of the handshake, then we get an IllegalMessage and throw the exception.

In cases where the call succeeds, we see OK (where we used to see IllegalMessage), then we get the SSL cert, then we negotiate the cipher, etc.

Are we hitting a different set of servers at this time of night?


#2

If it helps, this is the dump of the packet we get during the SSL handshake…

00000000 : 04 00 00 B6 00 00 00 00-00 B0 6C 69 80 B7 84 D9 : ..........li.... 00000010 : 93 3A 7C C0 5B 14 76 BC-CA ED 6A CC FE F3 A2 B6 : .:|.[.v...j..... 00000020 : BF 63 BD A1 AA 83 84 70-FA A5 17 01 A0 63 68 0C : .c.....p.....ch. 00000030 : 30 FB 74 44 53 86 46 78-90 C9 B1 E9 B0 3E 29 69 : 0.tDS.Fx.....>)i 00000040 : C5 99 24 18 E1 A9 3F 76-5E BB F9 72 0A DD D7 77 : ..$...?v^..r...w 00000050 : 13 DA E1 63 A1 6E 8E BE-35 B7 9C 82 0C D2 31 D0 : ...c.n..5.....1. 00000060 : A6 A5 47 7C AE AB 0E 09-8A 77 A1 C8 B8 6B 92 F4 : ..G|.....w...k.. 00000070 : 27 6E 27 49 94 CD 12 AD-C1 04 1E 18 0C 70 7E 3C : 'n'I.........p~< 00000080 : 34 C7 B0 73 19 D6 BE CF-94 A5 68 FB 91 FA F7 3C : 4..s......h....< 00000090 : C5 16 25 48 05 7C 5F A5-C6 E0 29 93 F2 8A 4C 0F : ..%H.|_...)...L. 000000A0 : 27 C9 36 DE D8 D5 F3 AB-1E F9 9B 88 80 17 06 2F : '.6............/ 000000B0 : 58 48 58 79 46 29 47 82-A3 18 : XHXyF)G...

#3

We’ve been experiencing the same problem for about two weeks now, ever since Twitter switched to SSL-only for their API.


#4

That’s exactly when this problem starting happening with us as well.


#5

Can you send me a tcp dump and a traceroute by email, it will helps us better understand what your issue might be. froginthevalley at twitter dot com.


#6

We’ve been experiencing the same error. We post tweets with the API and the first tweet in the morning is ok. The 2nd or third tweet at the day occurs in an error message Could not create SSL/TLS secure channel

Next tweets are posted without any problem. It is always the 2nd or 3rd Tweet of a day.


#7

I would love to, but unfortunately, this is low priority for my company…they just had me reschedule our nightly build. :frowning:

Perhaps someone else on this thread could provide the data.


#8

Hi there. I faced with it issue too. My app throw exception every 12 hours. This is about 2am and 2pm for +4 timezone.
I was able to get rid of this error by adding in my С# code

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl;

But exception “The request was aborted: Could not create SSL/TLS secure channel” afain occured after change security protocol on last week.
Hey, guys from Twitter, please check, maybe janitor each day accidentally stammers on the wire?