GRIZZLY0013:在Glassfish 4

时间:2017-12-07 23:38:10

标签: java glassfish grizzly

我使用Glassfish 4.1.2与Grizzly Framework 2.3.23和Mojarra 2.2.14以及Hibernate Validator 5.1.2与EclipseLink / Eclipse Persistence Services版本2.6.1.v20150605-31e8258

我经常遇到的错误如下:

  GRIZZLY0013: Exception during FilterChain execution java.lang.RuntimeException: Could not derive key
at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1476)
at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.glassfish.grizzly.ssl.SSLUtils.sslEngineUnwrap(SSLUtils.java:460)
at org.glassfish.grizzly.ssl.SSLConnectionContext.unwrap(SSLConnectionContext.java:189)
at org.glassfish.grizzly.ssl.SSLUtils.handshakeUnwrap(SSLUtils.java:286)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:638)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:587)
at org.glassfish.grizzly.ssl.SSLBaseFilter.handleRead(SSLBaseFilter.java:304)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Thread.java:748)
     Caused by: java.security.ProviderException: Could not derive key
at sun.security.ec.ECDHKeyAgreement.engineGenerateSecret(ECDHKeyAgreement.java:133)
at sun.security.ec.ECDHKeyAgreement.engineGenerateSecret(ECDHKeyAgreement.java:163)
at javax.crypto.KeyAgreement.generateSecret(KeyAgreement.java:648)
at sun.security.ssl.ECDHCrypt.getAgreedSecret(ECDHCrypt.java:102)
at sun.security.ssl.ECDHCrypt.getAgreedSecret(ECDHCrypt.java:120)
at sun.security.ssl.ServerHandshaker.clientKeyExchange(ServerHandshaker.java:1613)
at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:281)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:966)
at sun.security.ssl.Handshaker$1.run(Handshaker.java:963)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1416)
at org.glassfish.grizzly.ssl.SSLUtils.executeDelegatedTask(SSLUtils.java:270)
at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:673)
... 16 more
     Caused by: java.security.InvalidAlgorithmParameterException
at sun.security.ec.ECDHKeyAgreement.deriveKey(Native Method)
at sun.security.ec.ECDHKeyAgreement.engineGenerateSecret(ECDHKeyAgreement.java:130)
... 29 more

这在我处理REST请求时最初发生了很多,但是我已经禁用了,现在我发现之前唯一看到的就是它发生前一小时的调度程序。我的网站启动并运行了一段时间后,此错误突然弹出,现在看似随意。一旦Glassfish遇到此错误,服务器的整个https端就会停止工作,我必须重新启动服务器才能使其正常运行。

我发现这个错误似乎与我之前的问题(在REST调用后获取此问题)glassfish github bug report一致。我刚刚尝试在我的JRE的java.security文件中添加BounceCastleProvider作为安全提供程序,并将jar包含在lib / ext文件夹中,因为我看到一些与BouncyCastle存在问题的建议相冲突,尽管我还是不乐观的修复它,因为我没有在任何调用中使用该库时发生这种情况。

除此之外,是否有人对我可以尝试的内容或可能导致此问题的内容有其他想法?我是否需要获得新的SSL证书并尝试使用它?或者我是否需要在Glassfish服务器中更新Grizzly库及其任何依赖项?

0 个答案:

没有答案