Closed connection to HTTPs

63 views
Skip to first unread message

Pedro Santos

unread,
Aug 10, 2016, 10:53:48 AM8/10/16
to alep...@googlegroups.com
Hello,

I'm having an issue with a request to an HTTP endpoint (without HTTPs works fine).

Example:

-> ExceptionInfo connection was closed  clojure.core/ex-info (core.clj:4617)

However, I can curl to it:

-> {"success":false,"error":"Invalid supplier. "}

How can I troubleshoot this? Am I missing something? This actually works with other HTTPS endpoints, it's just this one that fails.

Thanks

Zach Tellman

unread,
Aug 10, 2016, 11:48:16 AM8/10/16
to alep...@googlegroups.com
When i run this, I get the same behavior as you, and I also see this in the logs:

Aug 10, 2016 8:43:16 AM clojure.tools.logging$eval422$fn__426 invoke
WARNING: error in HTTP client
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:437)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:243)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:335)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:327)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1336)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:335)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:544)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:145)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
at sun.security.ssl.ClientHandshaker.handshakeAlert(ClientHandshaker.java:1441)
at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1791)
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1083)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1098)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:970)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:904)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:406)
... 16 more

Searching for that error led me to http://stackoverflow.com/a/14884941, which suggested that running 

(System/setProperty "jsse.enableSNIExtension" "false")

Before making any requests would fix the problem.  I've verified this is the case.

--
You received this message because you are subscribed to the Google Groups "Aleph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aleph-lib+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pedro Santos

unread,
Aug 10, 2016, 11:56:11 AM8/10/16
to alep...@googlegroups.com
Indeed that worked.
Thanks a lot Zack!
Reply all
Reply to author
Forward
0 new messages