1

I am getting handshake failure problem with getPage() with twisted.

I am using Amazon Linux AMI release 2015.03. It ships with Python 2.6.9 and twisted version I am using is:

python26-twisted-web-8.2.0-3.2.3.amzn1.x86_64
python26-twisted-core-8.2.0-4.7.amzn1.x86_64
python26-twisted-words-8.2.0-3.2.3.amzn1.x86_64

The code is here:

from twisted.web import client 
from twisted.internet import reactor

if __name__ == "__main__":
    def do( ):
        df = client.getPage(
            url = "https://ui2web1.apps.uillinois.edu/BANPROD1/bwskfcls.P_GetCrse",
            followRedirect = True,
        )
        def printOnError( error ):
            print 'E', error
        def printOnSuccess( page ):
            print 'S', page
        df.addErrback( printOnError )
        df.addCallback( printOnSuccess )
        return df
    reactor.callWhenRunning( do )
    reactor.run()

The error I am getting is:

E [Failure instance: Traceback (failure with no frames): <class 'OpenSSL.SSL.Error'>: [('SSL routines', 'SSL3_READ_BYTES', 'sslv3 alert handshake failure'), ('SSL routines', 'SSL3_READ_BYTES', 'ssl handshake failure')]
]
S

Any help will be highly appreciated.

Arindam Choudhury
  • 2,816
  • 2
  • 18
  • 22

0 Answers0