Skip to content

Ning AHC: Secured Grizzly Websocket is not connecting through squid proxy #53

Description

@manikandar

With Grizzly provider, I could able to connect websocket through proxy.
But when I try to set SSLContext to the client, it starting throwing exception:

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at org.glassfish.grizzly.ssl.SSLUtils.getSSLPacketSize(SSLUtils.java:172)
at org.glassfish.grizzly.ssl.SSLUtils.handshakeUnwrap(SSLUtils.java:203)
at org.glassfish.grizzly.ssl.SSLFilter.doHandshakeStep(SSLFilter.java:327)
at org.glassfish.grizzly.ssl.SSLFilter.handleRead(SSLFilter.java:177)
at com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider$SwitchingSSLFilter.handleRead(GrizzlyAsyncHttpProvider.java:2532)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:770)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

The Squid Proxy access log is showing the following request log line:
1356520015.018 0 192.168.125.1 NONE/400 3501 �e - NONE/- text/html
Note the binary data in the request line.

Notes:

  1. Websocket connection through Proxy is working fine.
  2. Secured Websocket connection with the same SSLContext with out any proxy is working fine.
  3. Secured Websocket connection with the same SSLContext through proxy is not working.

Posted this issue in the forum and was asked to create issue for the same:
https://groups.google.com/d/msg/asynchttpclient/-/FvoakS5P3OwJ.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions