#817 new
lsinger

WS.url for HTTPS / SSL servers broken

Reported by lsinger | May 9th, 2011 @ 07:22 PM

SOMEWHAT RESOLVED: Probably was an error with my network settings. Changed something, changed it back, applied "changes" -- suddenly it worked. Still: strange behaviour. Also, Play! shouldn't keep running in the background after an exception (and it doesn't for other exceptions).

==================================================

Framework version: at least since 1.1
Platform you're using: Mac OS X

Reproduction steps: Create a new Play! application. In the generated Application.index, add "WS.url("https://twitter.com/").get();" (any https URL seems to work). Open the application in your browser and wait for the timeout. This is roughly the same for framework versions 1.1, 1.2, and master from github as of May 9th 2011.

Details:

Using WS.url calls for talking to HTTPS sites fails with an exception. Under the most recent versions of the framework, this also causes the application to keep running in the background when killing the "play run" process with Command+C. Of the framework versions I have installed, a request to an HTTPS site only worked with 1.0.3.2.

Exception:

21:01:22,155 ERROR ~ java.util.concurrent.ExecutionException: java.io.IOException: Remotely Closed [id: 0x35a3f178, /127.0.0.1:53037 :> /127.0.0.1:8228]
21:01:23,711 ERROR ~

@66c91338a Internal Server Error (500) for request GET /

Execution exception (In /app/controllers/Application.java around line 14)
RuntimeException occured : java.util.concurrent.ExecutionException: java.io.IOException: Remotely Closed [id: 0x35a3f178, /127.0.0.1:53037 :> /127.0.0.1:8228]

play.exceptions.JavaExecutionException: java.util.concurrent.ExecutionException: java.io.IOException: Remotely Closed [id: 0x35a3f178, /127.0.0.1:53037 :> /127.0.0.1:8228]

at play.mvc.ActionInvoker.invoke(ActionInvoker.java:231)
at Invocation.HTTP Request(Play!)

Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.io.IOException: Remotely Closed [id: 0x35a3f178, /127.0.0.1:53037 :> /127.0.0.1:8228]

at play.libs.ws.WSAsync$WSAsyncRequest.get(WSAsync.java:123)
at controllers.Application.index(Application.java:14)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:545)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
... 1 more

Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Remotely Closed [id: 0x35a3f178, /127.0.0.1:53037 :> /127.0.0.1:8228]

at com.ning.http.client.providers.netty.NettyResponseFuture.abort(NettyResponseFuture.java:284)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.abort(NettyAsyncHttpProvider.java:1301)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.channelClosed(NettyAsyncHttpProvider.java:1361)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:98)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:148)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.cleanup(ReplayingDecoder.java:554)
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.channelClosed(ReplayingDecoder.java:455)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:98)
at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:77)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754)
at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:344)
at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:232)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:98)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540)
at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:404)
at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:593)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:355)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
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:680)

Caused by: java.io.IOException: Remotely Closed [id: 0x35a3f178, /127.0.0.1:53037 :> /127.0.0.1:8228]

... 28 more

Comments and changes to this ticket

  • lsinger

    lsinger May 9th, 2011 @ 08:27 PM

    Update: it now consistently works when GlimmerBlocker is deactivated. Still, better error handling would be nice.

  • hansi raber

    hansi raber October 21st, 2011 @ 01:33 AM

    just tested ssl support, worked perfectly fine on my computer.
    (glimmerblocker not installed here).

    imho it's not really play's fault when another app closes the connection.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Play framework

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the http://www.playframework.org website.

Source code is hosted on github

Check out our repository at http://github.com/playframework/play

Contributing, creating a patch

Please read the contributor guide

Reporting Security Vulnerabilities

Since all bug reports are public, please report any security vulnerability directly to guillaume dot bort at gmail dot com.

Creating a bug report

Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Shared Ticket Bins

People watching this ticket

Tags

Pages