我正在使用yajsw在Windows机器上部署一个播放框架应用程序作为Windows服务。我正在使用these步骤来安装服务。这种方法没有问题并且工作正常。但是,当我尝试添加jks ssl文件时,我收到错误。我的start.bat文件是那样的
java -Dhttps.keyStore=XXX.jks -Dhttps.keyStorePassword=YYY -Dhttp.port=disabled
-Dhttps.port=9043 -cp "C:\Myapp\myapp-1.0-SNAPSHOT\lib\*" play.core.server.NettyServer
如果我直接运行这个start.bat我的jks工作,我在谷歌浏览器上看到ssl证书但是如果我在运行runConsole.bat时尝试将其作为Windows服务并从谷歌Chrome中点击url它会给出下面的堆栈跟踪和网站不可见
2015-02-19 18:58:59,187 - [ERROR] - from play in New I/O server boss #5
Error loading HTTPS keystore from C:\Myapp\myapp-1.0-SNAPSHOT\XXX.jks
java.io.IOException: Keystore was tampered with, or password was incorrect
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772) ~[na:1.7.0_17]
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55) ~[na:1.7.0_17]
at java.security.KeyStore.load(KeyStore.java:1214) ~[na:1.7.0_17]
at play.core.server.NettyServer$PlayPipelineFactory$$anonfun$sslContext$1$$anonfun$apply$3.apply(NettyServer.scala:78) ~[com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at play.core.server.NettyServer$PlayPipelineFactory$$anonfun$sslContext$1$$anonfun$apply$3.apply(NettyServer.scala:77) ~[com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at resource.AbstractManagedResource$$anonfun$5.apply(AbstractManagedResource.scala:86) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:124) ~[org.scala-lang.scala-library-2.10.3.jar:na]
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:124) ~[org.scala-lang.scala-library-2.10.3.jar:na]
at scala.util.control.Exception$Catch.apply(Exception.scala:102) ~[org.scala-lang.scala-library-2.10.3.jar:na]
at scala.util.control.Exception$Catch.either(Exception.scala:124) ~[org.scala-lang.scala-library-2.10.3.jar:na]
at resource.AbstractManagedResource.acquireFor(AbstractManagedResource.scala:86) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at resource.ManagedResourceOperations$class.acquireAndGet(ManagedResourceOperations.scala:25) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at resource.AbstractManagedResource.acquireAndGet(AbstractManagedResource.scala:48) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at resource.ManagedResourceOperations$class.foreach(ManagedResourceOperations.scala:45) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at resource.AbstractManagedResource.foreach(AbstractManagedResource.scala:48) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at play.core.server.NettyServer$PlayPipelineFactory$$anonfun$sslContext$1.apply(NettyServer.scala:77) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at play.core.server.NettyServer$PlayPipelineFactory$$anonfun$sslContext$1.apply(NettyServer.scala:69) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at scala.Option.map(Option.scala:145) [org.scala-lang.scala-library-2.10.3.jar:na]
at play.core.server.NettyServer$PlayPipelineFactory.sslContext$lzycompute(NettyServer.scala:69) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at play.core.server.NettyServer$PlayPipelineFactory.sslContext(NettyServer.scala:68) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at play.core.server.NettyServer$PlayPipelineFactory.getPipeline(NettyServer.scala:51) [com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at org.jboss.netty.channel.socket.nio.NioServerBoss.registerAcceptedChannel(NioServerBoss.java:134) [io.netty.netty-3.7.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerBoss.process(NioServerBoss.java:104) [io.netty.netty-3.7.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) [io.netty.netty-3.7.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) [io.netty.netty-3.7.1.Final.jar:na]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [io.netty.netty-3.7.1.Final.jar:na]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [io.netty.netty-3.7.1.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
Caused by: java.security.UnrecoverableKeyException: Password verification failed
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770) ~[na:1.7.0_17]
... 29 common frames omitted
直接运行start.bat和使用yajsw运行它有什么区别?我被困了。
播放框架版本:2.2.3 Yajsw版本:11.11
答案 0 :(得分:0)
两天后我解决了自己的问题。问题是关于a,(逗号)字符。 您需要在wrapper.conf文件中转义逗号字符。它记录为below
"," is used as list delimiter. If required you will have to escape it (eg write "\,")
我希望它能避免你搜索两天:)