Page 1 of 2

Twitter socket error?

Posted: Tue 10 Aug 2010 10:50 am
by nzben
What a fantastic piece of software. Just gorgeous. Everything is working perfectly, and results are showing up at http://ben.geek.nz/weather
Thanks!

One niggle, I can't get Twitter updates to work (v1.9.0). Here's what ends up in my diags file:

10/08/2010 22:43:38.440 : Starting Twitter thread
10/08/2010 22:43:38.441 : Requesting Twitter tokens
10/08/2010 22:43:41.367 : Socket Error # 0
10/08/2010 22:43:41.367 : Access token response:
10/08/2010 22:43:41.367 : HTTP response code: 0

Any ideas?

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 12:22 pm
by steve
I tried deleting my access tokens, so it would have to fetch them again (which is where yours is failing) and it worked fine, so it's not a problem at the Twitter end. For some reason your PC is unable to contact the server. The URL it uses is https://api.twitter.com/oauth/access_token - do you get an error if you try to access that in a browser? Perhaps the problem is because it is using SSL - do you go through a proxy or something which might be preventing access? Or perhaps a firewall?

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 5:58 pm
by nzben
If it can't contact Twitter then that is truly bizarre, because I use twitter many, many times per day.
Definitely not behind a proxy or anything. I am running 64bit Windows 7 if that makes any difference?

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 6:03 pm
by nzben
What should I see if I try to access that oauth page in a browser? I get a blank page after several seconds of waiting. No 404s or anything.

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 6:13 pm
by steve
nzben wrote:What should I see if I try to access that oauth page in a browser?
Just a blank page, I guess. That's what I get.

I don't know how many people are using the new Twitter authentication yet, but no-one else has reported a problem. Most internet-related problems that people report with Cumulus end up being the fault of misconfigured firewalls. Are you using a firewall?

When you say you are using Twitter many times a day, is that via the API using an SSL connection (as with Cumulus), or directly via the web site?

Have you tried restarting Cumulus since you first got the error?

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 7:26 pm
by nzben
steve wrote:I don't know how many people are using the new Twitter authentication yet, but no-one else has reported a problem. Most internet-related problems that people report with Cumulus end up being the fault of misconfigured firewalls. Are you using a firewall?
Nothing more than standard Windows Firewall. I've tried turning that off, no change.
steve wrote:When you say you are using Twitter many times a day, is that via the API using an SSL connection (as with Cumulus), or directly via the web site?
Yep via the API, using MetroTwit, TweetDeck, and via iPhone Wifi to the same network that Cumulus is running on.
steve wrote:Have you tried restarting Cumulus since you first got the error?
Yep. Also tried dropping and increasing the twitter update rate, and leaving it at 60 mins overnight. Same errors in diag.

All very strange. I code .NET for a living, so I'm totally happy to try any and all debugs and backflips if it would be useful?

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 7:49 pm
by steve
nzben wrote:All very strange.
Indeed. I had a quick look through the known Twitter users list in the Wiki (but I'm sure there are many more) and lots of them are using the new authentication method. As an aside, a worrying number are still using the old one.

I'll see if i can think of anything.

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 8:16 pm
by steve
Could you unzip the attached files into a folder somewhere, and run the Twittertest.exe. Put your user and password into the boxes, and click 'Go'.

In theory, it won't work, because it uses exactly the same code as Cumulus. If it gives a useful error message, post it here. Be careful what you post, though, as some of the stuff it may return is private to you - effectively a password.

If somehow it does happen to work and you get some long strings in the 'Tokens' boxes, then you may as well use those in Cumulus and see if it will then tweet OK. With Cumulus stopped, copy the two strings starting 'OauthToken=' and 'OauthTokenSecret=' into your cumulus.ini file (overwriting any existing lines that start with those strings) into the [Twitter] section. Then start Cumulus and see what happens.

Re: Twitter socket error?

Posted: Tue 10 Aug 2010 11:57 pm
by nzben
Brilliant thanks. I'll give it a crack when I get home in a few hours.

Re: Twitter socket error?

Posted: Wed 11 Aug 2010 2:01 am
by nzben
OK running that app I get a messagebox after hitting "go". Tried two different accounts.

"---------------------------
Twittertest
---------------------------
Socket Error # 10060

Connection timed out.
---------------------------
OK
---------------------------

Could it be that the socket timeout is too short? The poor little bits and bytes have to travel a long way from New Zealand :)

Re: Twitter socket error?

Posted: Wed 11 Aug 2010 7:38 am
by steve
nzben wrote:Could it be that the socket timeout is too short? The poor little bits and bytes have to travel a long way from New Zealand :)
The connect timeout in the component used by the test app (and Cumulus) is 2 minutes by default, I believe. That message is coming from Winsock, so Windows is timing out before the application.

It looks very much like something is blocking the connect attempt.

Re: Twitter socket error?

Posted: Wed 11 Aug 2010 8:02 am
by nzben
Ok wow that's freaky. When I use my 3G datacard from my laptop it works fine.
Time to go debug my router. Thanks for the time, and apologies for any wasted.

Re: Twitter socket error?

Posted: Wed 11 Aug 2010 8:26 am
by nzben
After manually copying the oAuth strings I got when using the data card, Twitter updates work from the main PC.
Very, very weird. Other https sites work fine.

Re: Twitter socket error?

Posted: Fri 20 Aug 2010 7:22 pm
by Jonsey
I have the same problem, just will not tweet anything, I have tried redoing the tokens as stated in a prev post, have re booted router, pc. But it just will not tweet. Mine stopped working on the 27/07 the day before I went on holiday I am on v1.9.0.

Anyone got any ideas??

Re: Twitter socket error?

Posted: Fri 20 Aug 2010 7:40 pm
by steve
Are you getting exactly the same error as in the first post in this thread?