Play plugin support for HTTPS

When I configure my Play 2.2 app with -Dhttps.port=9443 to enable SSL, I get an Address in use error. No other process has this port (checked using both netstat and telnet), and this works fine when used directly from Play. I suspect this is related to the appending of "run 9443" to the Java command line.

Also note that once the target is set to "run 9443", that will stick around even if I remove the -Dhttps.port=9443.

IDEA 13.1.2, Play 2.0 Support plugin 0.36.431.

Here is the full call stack:

org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:9443
 at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
 at play.core.server.NettyServer$$anonfun$11.apply(NettyServer.scala:143)
 at play.core.server.NettyServer$$anonfun$11.apply(NettyServer.scala:140)
 at scala.Option.map(Option.scala:145)
 at play.core.server.NettyServer.<init>(NettyServer.scala:140)
 at play.core.server.NettyServer$$anonfun$mainDev$1.apply(NettyServer.scala:310)
 at play.core.server.NettyServer$$anonfun$mainDev$1.apply(NettyServer.scala:308)
 at play.utils.Threads$.withContextClassLoader(Threads.scala:18)
 at play.core.server.NettyServer$.mainDev(NettyServer.scala:307)
 at play.core.server.NettyServer$.mainDevHttpMode(NettyServer.scala:303)
 at play.core.server.NettyServer.mainDevHttpMode(NettyServer.scala)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at play.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$1.apply(PlayRun.scala:233)
 at play.PlayRun$$anonfun$playRunTask$1$$anonfun$apply$1.apply(PlayRun.scala:91)
 at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
 at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
 at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
Caused by: java.net.BindException: Address already in use
 at sun.nio.ch.Net.bind0(Native Method)
 at sun.nio.ch.Net.bind(Net.java:444)
 at sun.nio.ch.Net.bind(Net.java:436)
 at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
 at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
 at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
 at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366)
 at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)
 at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:744)

Please sign in to leave a comment.