Connection reset by peer

Issue No. 187





Reported By

morgan ma








25/Oct/14 11:50 PM EDT


29/Oct/2014 6:46 PM EDT


From last night, when I run the sample event python script, I got this error from urlopen funtion. Previously, it is fine. Any idea? I have udpated my token and user agent, still doesn't work. Please help. Thanks.

Closing Comment

The Python example ( has been updated to use the TLSv1 protocol when connecting to the xmlstats API service.


1. Erik Berg 26/Oct/2014 at 12:05 AM EDT

The xmlstats service is operating normally. However, you may be experiencing a problem because SSLv3 was disabled. SSLv3 was disabled because of the so-called POODLE vulnerability. More information about this vulnerability can be read about at You must use TLS to connect to the xmlstats service.

2. morgan ma 26/Oct/2014 at 9:47 AM EDT

Thanks for the tip. But could you update your samples? I am still learning python now.

3. Erik Berg 26/Oct/2014 at 8:08 PM EDT

I see the same problem running the python example on an OS X system. It looks like python uses SSLv3 by default and fails to negotiate TLS properly. The fix is to explicitly tell python to use TLS. You can get this working by following the instructions at I will update the python example listing in the next update.

4. morgan ma 26/Oct/2014 at 9:43 PM EDT

Thank you very much! I will try it as well. If I can get this done before your updating. I will post the code here. :)

5. morgan ma 27/Oct/2014 at 1:55 AM EDT

Hi, man. I got it work. I am using python 2.6.6. Just add that piece of code in the front of the main function. Need to remove "self.source_address" from the code as it is optional parameter anyway otherwise it will give some error like "AttributeError: TLS1Connection instance has no attribute 'source_address'" And at last import required lib: import httplib import socket import ssl Cheers!