ssl.SSLError: [Errno 1] _ssl.c:503: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol >>>

811 views
Skip to first unread message

Ashwini Kumar

unread,
Nov 15, 2012, 10:47:54 AM11/15/12
to pysp...@googlegroups.com
I am using Pysphere module to connect with VMware esx server. I am using Centos 5.7 and python 2.7 for connecting with ESX server. While connecting I am getting following error message :

##########################################################
>>> server.connect("ESX SERVWE", "<username>", "<password>")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pysphere/vi_server.py", line 85, in connect
    request)._returnval
  File "pysphere/resources/VimService_services.py", line 2173, in RetrieveServiceContent
    self.binding.Send(None, None, request, soapaction="urn:vim25/5.0", **kw)
  File "pysphere/ZSI/client.py", line 296, in Send
    self.local.h.connect()
  File "/home/toolguy/ts_qa_automation/python/lib/python2.7/httplib.py", line 1158, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/home/toolguy/ts_qa_automation/python/lib/python2.7/ssl.py", line 372, in wrap_socket
    ciphers=ciphers)
  File "/home/toolguy/ts_qa_automation/python/lib/python2.7/ssl.py", line 134, in __init__
    self.do_handshake()
  File "/home/toolguy/ts_qa_automation/python/lib/python2.7/ssl.py", line 296, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [Errno 1] _ssl.c:503: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
##############################################################

Please let me know what changes I need to make.

The same code is working properly in WINDOWS.

Thanks Everyone for your help!!

Seba

unread,
Nov 20, 2012, 8:20:08 AM11/20/12
to pysp...@googlegroups.com
Hi!

  A few questions that may help me reproduce the issue:

  Which is exactly the host parameter you're using when you do: server.connect( HOST, <user>, <pass>) ?
 
  Is the ESX service listening on the default location? ie. https://[HOST]:443/sdk

  I'll see if I can find a Centos 5.7 over here and try to reproduce it.

Thanks!


Seba.
Reply all
Reply to author
Forward
0 new messages