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. handshake alert: unrecognized_name

See original GitHub issue

Hi !

I got an SSLProtocolException when I try to access or through browsermob-proxy. handshake alert:  unrecognized_name
    at Source)
    at Source)
    at Source)
    at Source)
    at Source)
    at Source)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(
    at net.lightbody.bmp.proxy.http.TrustingSSLSocketFactory.createLayeredSocket(
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(
    at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(
    at org.apache.http.impl.execchain.MainClientExec.execute(
    at org.apache.http.impl.execchain.ProtocolExec.execute(
    at org.apache.http.impl.execchain.RetryExec.execute(
    at org.apache.http.impl.client.InternalHttpClient.doExecute(
    at org.apache.http.impl.client.CloseableHttpClient.execute(
    at net.lightbody.bmp.proxy.http.BrowserMobHttpClient.execute(
    at net.lightbody.bmp.proxy.http.BrowserMobHttpClient.execute(
    at net.lightbody.bmp.proxy.http.BrowserMobHttpRequest.execute(
    at net.lightbody.bmp.proxy.BrowserMobProxyHandler.proxyPlainTextRequest(
    at net.lightbody.bmp.proxy.selenium.SeleniumProxyHandler.handle(
    at net.lightbody.bmp.proxy.jetty.http.HttpContext.handle(
    at net.lightbody.bmp.proxy.jetty.http.HttpContext.handle(
    at net.lightbody.bmp.proxy.jetty.http.HttpServer.service(
    at net.lightbody.bmp.proxy.jetty.http.HttpConnection.service(
    at net.lightbody.bmp.proxy.jetty.http.HttpConnection.handleNext(
    at net.lightbody.bmp.proxy.jetty.http.HttpConnection.handle(
    at net.lightbody.bmp.proxy.jetty.http.SocketListener.handleConnection(
    at net.lightbody.bmp.proxy.jetty.util.ThreadedServer.handle(
    at net.lightbody.bmp.proxy.jetty.util.ThreadPool$

It seems to be due to the Server Name Indication ( : page 8) which is enabled by default in Java 7.

The simpliest way to resolve the issue would be to add a flag to disabled SNI : java -Djsse.enableSNIExtension=false

But it will disabled the SNI for all the JVM, so it may cause trouble to access other website which required SNI.

A solution to enable SNI and still support misconfigured server is suggest here:

But I’m not sure it’s the best way to do it. Any opinion ?


Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

jpereira06commented, Aug 18, 2015 also fires this error

jekhcommented, Apr 23, 2016

This is fixed with the latest release, so I’ll go ahead and close.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL handshake alert: unrecognized_name error since ...
When you have received the unrecognized_name warning (fatal in Java), retry opening a SSLSocket , but this time without a host name. This...
Read more > handshake alert - IBM
How to fix this SSL error handshake alert: unrecognized_name in Websphere Application Server?
Read more >
SSL handshake alert unrecognized name - CloudBees Support
When I try to connect to an SSL server I see this error. handshake alert: unrecognized_name ...
Read more >
ERROR: " handshake alert
This issue occurs if the endpoint server is configured with more than one hostname. Because of this, the Secure agents fail to establish...
Read more > handshake alert
SSLProtocolException : handshake alert: unrecognized_name at at ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found