question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sslv3 alert handshake failure

See original GitHub issue

I’m with this error on Linux. Works fine with curl

Was installed with apt-get install httpie.

Command:

http --debug --ssl=ssl2.3 --verify=no GET https://... \                                                                                                       
  Cache-Control:no-cache \
  token:... \
  x-requested-with:XMLHttpRequest 

Result:

HTTPie 0.9.8
Requests 2.18.1
Pygments 2.2.0
Python 3.6.3 (default, Oct  3 2017, 21:45:48) 
[GCC 7.2.0]
/usr/bin/python3
Linux 4.13.0-25-generic

<Environment {
    "colors": 256,
    "config": {
        "__meta__": {
            "about": "HTTPie configuration file",
            "help": "https://httpie.org/docs#config",
            "httpie": "0.9.8"
        },
        "default_options": "[]"
    },
    "config_dir": "/home/besser/.httpie",
    "is_windows": false,
    "stderr": "<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>",
    "stderr_isatty": true,
    "stdin": "<_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'>",
    "stdin_encoding": "UTF-8",
    "stdin_isatty": true,
    "stdout": "<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>",
    "stdout_encoding": "UTF-8",
    "stdout_isatty": true
}>

>>> requests.request(**{
    "allow_redirects": false,
    "auth": "None",
    "cert": "None",
    "data": {},
    "files": {},
    "headers": {
        "Cache-Control": "no-cache",
        "User-Agent": "HTTPie/0.9.8",
        "token": "...",
        "x-requested-with": "XMLHttpRequest"
    },
    "method": "get",
    "params": {},
    "proxies": {},
    "stream": true,
    "timeout": 30,
    "url": "https://...",
    "verify": false
})


http: error: SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:777) while doing GET request to URL: https://...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 846, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 325, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:777)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 630, in urlopen
    raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:777)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/http", line 11, in <module>
    load_entry_point('httpie==0.9.8', 'console_scripts', 'http')()
  File "/usr/lib/python3/dist-packages/httpie/__main__.py", line 11, in main
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/httpie/core.py", line 227, in main
    log_error=log_error,
  File "/usr/lib/python3/dist-packages/httpie/core.py", line 99, in program
    final_response = get_response(args, config_dir=env.config.directory)
  File "/usr/lib/python3/dist-packages/httpie/client.py", line 70, in get_response
    response = requests_session.request(**kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:777)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
jassi-bhullarcommented, Jan 25, 2018

HTTPie is awesome! ❤️

1reaction
hjalvescommented, Jan 19, 2018

I’m having the same problem…

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL3_READ_BYTES:sslv3 alert handshake failure - How to fix?
SSLV3 alert handshake failure occurs when a client and server cannot establish communication using the TLS/SSL protocol.
Read more >
ssl - Solving sslv3 alert handshake failure when trying to use a ...
It works when I try with a received a test certificate including a private key from the service (self signed certificate). But when...
Read more >
HTTP sslv3 alert handshake failure - IBM
HTTP sslv3 alert handshake failure · 1- Cipher Strength setting in the HTTP Server Adapter is incorrect · 2- If you are using...
Read more >
Troubleshooting sslv3 alert handshake failure and tlsv1 alert ...
Your server is attempting a secure connection to using the outdated SSL protocol. As this is no longer secure, most providers now require ......
Read more >
How to Fix “SSL Handshake Failed” & "Cloudflare 525" Error
How to Fix the SSL Handshake Failed Error (5 Methods) · Update Your System Date and Time · Check to See If Your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found