Ned
unread,Jan 5, 2012, 3:12:45 PM1/5/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to play-framework
My Play! application opens up a websocket as follows:
WS /activationServer ActivationServer.serve()
I have a websocket client written in Java using Jetty-7.6.0.RC2. When
the client tries to connect to "ws://localhost:9000/activationServer",
my client gets "Bad response status 426 Upgrade Required".
So, I setup sftp on port 9443 in my Play! application (got certs and
everything). Not sure why I was getting the upgrade request, since
I'm connecting to "ws" and not "wss", but whatever, I wanted to move
to "wss" eventually anyway.
Now, I try to connect to wss, "wss://localhost:9000/activationServer",
and I get
WARN:oeji.nio:javax.net.ssl.SSLException: Inbound closed before
receiving peer's close_notify: possible truncation attack?
So far, the Play! app doesn't print anything about the websockets at
all.
Now, I change the port the client is trying to connect to to 9443,
"wss://localhost:9443/activationServer", and I get a simple timeout on
the client, and nothing in Play. But, if try to connect to Play
before the application has initialized (before I load the homepage
over regular http), then Play spits out this error:
java.lang.IllegalArgumentException: unsupported message type: class
org.jboss.netty.handler.codec.http.DefaultHttpResponse
at
org.jboss.netty.channel.socket.nio.SocketSendBufferPool.acquire(SocketSendBufferPool.java:
55)
at
org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:
461)
at
org.jboss.netty.channel.socket.nio.NioWorker.writeFromUserCode(NioWorker.java:
388)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:
137)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:
76)
at
org.jboss.netty.handler.ssl.SslHandler.handleDownstream(SslHandler.ja
va:421)
etc...
I'm totally stumped... Any hints or suggestions?