gpt4 book ai didi

ssl - yajsw 播放 framewok ssl 错误

转载 作者:太空宇宙 更新时间:2023-11-03 13:07:45 25 4
gpt4 key购买 nike

我正在使用 yajsw 在 windows 机器上部署一个 play 框架应用程序作为 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 证书但是如果我在运行 runConsole.bat 并点击来自 google chrome 的 url 时尝试使它成为一个 windows 服务它会给出下面的堆栈跟踪并且网站不可见

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.3Yajsw 版本:11.11

最佳答案

两天后我解决了自己的问题。问题是关于一个 ,(逗号)字符。您需要在 wrapper.conf 文件中转义逗号字符。它记录为 below

"," is used as list delimiter. If required you will have to escape it (eg write "\,")

我希望它可以避免你搜索两天:)

关于ssl - yajsw 播放 framewok ssl 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28624862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com