我的公司使用 Play 框架和 Scala 作为我们的后端服务器。最近我们的服务器出现了问题。在向远程 API 发出安全 (SSL) 请求时,我们遇到以下异常。似乎是有关 SSL 的问题,但我不确定。一个月前我们遇到了类似的问题,并设置了标志:
-J-XX:-UseAESIntrinsics -DXX:-UseAESIntrinsics
似乎有帮助。现在问题又回来了。
更多信息:- 玩2.5.9- 斯卡拉 2.11.8- 服务器操作系统:Centos 6.8- JVM 1.8.0_25
异常(exception):
- AsyncHttpClient-2-4 - 2016-12-21 03:59:17,434 - [调试] - 来自 org.asynchttpclient.netty.handler.HttpHandler - channel 上出现意外的 I/O 异常 [id: 0x9ad15e31, L:/[IP_ADDRESS:端口 - R:服务器/IP_ADDRESS:443]java.lang.NullPointerException: null在java.lang.System.arraycopy( native 方法)在 com.sun.crypto.provider.GCTR.reset(GCTR.java:125)在 com.sun.crypto.provider.GCTR.doFinal(GCTR.java:116)在 com.sun.crypto.provider.GaloisCounterMode.doLastBlock(GaloisCounterMode.java:343)在 com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:511)在 com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1023)在 com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:960)在 com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:479)在javax.crypto.CipherSpi.bufferCrypt(CipherSpi.java:830)在javax.crypto.CipherSpi.engineDoFinal(CipherSpi.java:730)在 javax.crypto.Cipher.doFinal(Cipher.java:2416)在 sun.security.ssl.CipherBox.decrypt(CipherBox.java:535)在 sun.security.ssl.EngineInputRecord.decrypt(EngineInputRecord.java:200)在sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:968)在sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:901)在 sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:775)在 javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)在 io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1094)在 io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:966)在 io.netty.handler.ssl.SslHandler.decode(SslHandler.java:900)在 io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)在 io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)在io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)在io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)在 io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)在 io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)在io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)在io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)在 io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)在 io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)在 io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)在io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)在io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)在io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)在io.netty.util.concurrent.SingleThreadEventExecutor $2.run(SingleThreadEventExecutor.java:140)在 io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)在 java.lang.Thread.run(Thread.java:745)
有人知道问题可能是什么以及我们如何解决它吗?
提前致谢,
什洛米。
我认为你应该升级你的java版本。 1.8.0_25 非常旧,从堆栈跟踪来看它看起来像是一个 JDK bug。升级到最新的 Java 8 版本,看看它是否仍然发生(我怀疑答案是否定的;))
我是一名优秀的程序员,十分优秀!