gpt4 book ai didi

java - 通过 awselb 使用 ssl 时的 neo4j java 驱动程序问题

转载 作者:搜寻专家 更新时间:2023-11-01 03:47:28 26 4
gpt4 key购买 nike

我正在使用 neo4j 社区版本 3.1.1 和企业版版本 3.0.1,并通过 awselb 配置了 ssl。要连接我使用 neo4j java 驱动程序版本 1.0.0在我通过 awselb 配置 ssl 和连接后,我遇到了打开文件的问题,它们增长得如此之快,而且数量没有减少。 enter image description here应用程序中使用 ssl 的代码

GraphDatabase.driver(host, authToken, Config.build().withEncryptionLevel(Config.EncryptionLevel.REQUIRED).toConfig());

我尝试将 neo4j 驱动程序升级到版本 1.1.1 和 1.1.2 但有另一个问题:当我定期查询 neo4j 时,一切都很好,我从数据库中获取数据,但定期出现 500 错误,并在应用程序中记录此异常

没有 ssl 我没有问题

org.neo4j.driver.v1.exceptions.ServiceUnavailableException: SSL Connection terminated while receiving data. This can happen due to network instabilities, or due to restarts of the database.
at org.neo4j.driver.internal.security.TLSSocketChannel.channelRead(TLSSocketChannel.java:170)
at org.neo4j.driver.internal.security.TLSSocketChannel.unwrap(TLSSocketChannel.java:229)
at org.neo4j.driver.internal.security.TLSSocketChannel.read(TLSSocketChannel.java:419)
at org.neo4j.driver.internal.net.BufferingChunkedInput.readNextPacket(BufferingChunkedInput.java:409)
at org.neo4j.driver.internal.net.BufferingChunkedInput.readChunkSize(BufferingChunkedInput.java:345)
at org.neo4j.driver.internal.net.BufferingChunkedInput.read(BufferingChunkedInput.java:247)
at org.neo4j.driver.internal.net.BufferingChunkedInput.fillScratchBuffer(BufferingChunkedInput.java:216)
at org.neo4j.driver.internal.net.BufferingChunkedInput.readByte(BufferingChunkedInput.java:110)
at org.neo4j.driver.internal.packstream.PackStream$Unpacker.unpackStructHeader(PackStream.java:430)
at org.neo4j.driver.internal.messaging.PackStreamMessageFormatV1$Reader.read(PackStreamMessageFormatV1.java:398)
at org.neo4j.driver.internal.net.SocketClient.receiveOne(SocketClient.java:176)
at org.neo4j.driver.internal.net.SocketConnection.receiveOne(SocketConnection.java:214)
at org.neo4j.driver.internal.net.ConcurrencyGuardingConnection.receiveOne(ConcurrencyGuardingConnection.java:166)
at org.neo4j.driver.internal.net.pooling.PooledConnection.receiveOne(PooledConnection.java:182)
at org.neo4j.driver.internal.InternalStatementResult.tryFetchNext(InternalStatementResult.java:324)
at org.neo4j.driver.internal.InternalStatementResult.hasNext(InternalStatementResult.java:191)
at org.neo4j.driver.internal.InternalStatementResult.list(InternalStatementResult.java:261)
at carx.neo4j.beans.services.Neo4jClient.getResults(Neo4jClient.java:90)
at carx.mpserver.beans.services.impl.StorageFacadeServiceImpl.getLastTopPeriodIds(StorageFacadeServiceImpl.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:97)
at carx.web.spark.beans.aspect.abased.ProfilerUtilAspect.profile(ProfilerUtilAspect.java:55)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:620)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:609)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy94.getLastTopPeriodIds(Unknown Source)
at carx.mpserver.beans.services.impl.TopServiceImpl.getPeriodInfo(TopServiceImpl.java:265)
at carx.mpserver.beans.services.impl.TopServiceImpl.list(TopServiceImpl.java:162)
at carx.mpserver.beans.services.impl.MpServerUserApiImpl.topList(MpServerUserApiImpl.java:168)
at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:73)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy126.topList(Unknown Source)
at carx.mpserver.beans.bootstraps.CarxMpRoutesServiceImpl.lambda$initRoutes$14(CarxMpRoutesServiceImpl.java:102)
at carx.web.spark.beans.service.impl.BaseSparkRoutesService$ContextAwareAndToJsonRoute.handle(BaseSparkRoutesService.java:292)
at spark.RouteImpl$1.handle(RouteImpl.java:61)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:128)
at spark.servlet.SparkFilter.doFilter(SparkFilter.java:173)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:201)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:178)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
at org.eclipse.jetty.server.Server.handle(Server.java:517)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Thread.java:745)

最佳答案

我在 Rest API 中遇到了同样的问题。最初我已经实例化了 GraphDatabase.driver(..) 每个推荐的 API 调用。然后我在构造函数中实例化了 GraphDatabase.driver(..) 并在每个 API 中重复使用它。然后没有遇到任何问题。

关于java - 通过 awselb 使用 ssl 时的 neo4j java 驱动程序问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42359832/

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