yajsw 播放 framewok ssl 错误
yajsw play framewok ssl error
我正在使用 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 工作并且我在 google chrome 上看到 ssl 证书但是如果我尝试使它成为 windows 服务当我 运行 runConsole.bat 并从 google 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$$anonfun$apply.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$$anonfun$apply.apply(NettyServer.scala:77) ~[com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at resource.AbstractManagedResource$$anonfun.apply(AbstractManagedResource.scala:86) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at scala.util.control.Exception$Catch$$anonfun$either.apply(Exception.scala:124) ~[org.scala-lang.scala-library-2.10.3.jar:na]
at scala.util.control.Exception$Catch$$anonfun$either.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.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.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.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
直接运行ning start.bat 和用yajsw 运行ning 有什么区别?我卡住了。
播放框架版本:2.2.3
Yajsw 版本:11.11
两天后我解决了自己的问题。问题是关于一个 ,(逗号)字符。
您需要转义 wrapper.conf 文件中的逗号字符。它被记录为 below
"," is used as list delimiter. If required you will have to escape it (eg write "\,")
我希望它可以避免你搜索两天:)
我正在使用 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 工作并且我在 google chrome 上看到 ssl 证书但是如果我尝试使它成为 windows 服务当我 运行 runConsole.bat 并从 google 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$$anonfun$apply.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$$anonfun$apply.apply(NettyServer.scala:77) ~[com.typesafe.play.play_2.10-2.2.3.jar:2.2.3]
at resource.AbstractManagedResource$$anonfun.apply(AbstractManagedResource.scala:86) ~[com.jsuereth.scala-arm_2.10-1.3.jar:1.3]
at scala.util.control.Exception$Catch$$anonfun$either.apply(Exception.scala:124) ~[org.scala-lang.scala-library-2.10.3.jar:na]
at scala.util.control.Exception$Catch$$anonfun$either.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.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.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.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
直接运行ning start.bat 和用yajsw 运行ning 有什么区别?我卡住了。
播放框架版本:2.2.3 Yajsw 版本:11.11
两天后我解决了自己的问题。问题是关于一个 ,(逗号)字符。 您需要转义 wrapper.conf 文件中的逗号字符。它被记录为 below
"," is used as list delimiter. If required you will have to escape it (eg write "\,")
我希望它可以避免你搜索两天:)