mongodb偶尔报错com.mongodb.MongoSocketReadException: Prematurely reached end of stream

项目开发中,链接mongodb的项目,偶尔报错com.mongodb.MongoSocketReadException: Prematurely reached end of stream

报错的详细信息:

2022-07-11 08:34:00.001  INFO 1 --- [   scheduling-1] o.s.d.mongodb.core.convert.QueryMapper   : Could not map 'UsageRecord.processed'. Maybe a fragment in 'Boolean' is considered a simple type. Mapper continues with processed.
2022-07-11 08:34:01.410  INFO 1 --- [   scheduling-1] org.mongodb.driver.connection            : Closed connection [connectionId{localValue:60, serverValue:1824}] to 10.100.111.121:27017 because there was a socket exception raised by this connection.
2022-07-11 08:34:01.411  INFO 1 --- [   scheduling-1] org.mongodb.driver.cluster               : No server chosen by ReadPreferenceServerSelector{readPreference=primary} from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=MULTIPLE, serverDescriptions=[ServerDescription{address=10.100.111.121:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, ServerDescription{address=10.100.15.147:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=904746, setName='rs0', canonicalAddress=10.100.15.147:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='10.100.111.121:27017', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=null, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdcb123f4ce1a82a43f54, counter=4}, lastWriteDate=Mon Jul 11 08:33:45 GMT 2022, lastUpdateTimeNanos=19883840756252}, ServerDescription{address=10.100.73.126:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=897679, setName='rs0', canonicalAddress=10.100.73.126:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='10.100.111.121:27017', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=null, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdee0732609efe7dccae6, counter=4}, lastWriteDate=Mon Jul 11 08:33:45 GMT 2022, lastUpdateTimeNanos=19884448424902}]}. Waiting for 30000 ms before timing out
2022-07-11 08:34:01.412  INFO 1 --- [nio-5010-exec-2] org.mongodb.driver.connection            : Closed connection [connectionId{localValue:57, serverValue:1386}] to 10.100.111.121:27017 because there was a socket exception raised by this connection.
2022-07-11 08:34:01.412  INFO 1 --- [0.111.121:27017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server 10.100.111.121:27017com.mongodb.MongoSocketReadException: Prematurely reached end of streamat com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:131) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:647) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receiveMessageWithAdditionalTimeout(InternalStreamConnection.java:512) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:355) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receive(InternalStreamConnection.java:315) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:215) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:144) ~[mongodb-driver-core-4.2.3.jar:na]at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]2022-07-11 08:34:01.413  INFO 1 --- [0.111.121:27017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server 10.100.111.121:27017com.mongodb.MongoSocketOpenException: Exception opening socketat com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:143) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:188) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:144) ~[mongodb-driver-core-4.2.3.jar:na]at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
Caused by: java.net.ConnectException: Connection refused (Connection refused)at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na]at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412) ~[na:na]at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255) ~[na:na]at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237) ~[na:na]at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:na]at java.base/java.net.Socket.connect(Socket.java:609) ~[na:na]at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ~[mongodb-driver-core-4.2.3.jar:na]... 4 common frames omitted2022-07-11 08:34:01.414  INFO 1 --- [nio-5010-exec-2] org.mongodb.driver.connection            : Closed connection [connectionId{localValue:61}] to 10.100.111.121:27017 because there was a socket exception raised by this connection.
2022-07-11 08:34:01.426 ERROR 1 --- [nio-5010-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Prematurely reached end of stream; nested exception is com.mongodb.MongoSocketReadException: Prematurely reached end of stream] with root causecom.mongodb.MongoSocketReadException: Prematurely reached end of streamat com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:131) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:647) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receiveMessageWithAdditionalTimeout(InternalStreamConnection.java:512) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:355) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:279) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:100) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:490) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:71) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:253) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:202) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:118) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:110) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.operation.QueryBatchCursor.getMore(QueryBatchCursor.java:268) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.internal.operation.QueryBatchCursor.hasNext(QueryBatchCursor.java:141) ~[mongodb-driver-core-4.2.3.jar:na]at com.mongodb.client.internal.MongoBatchCursorAdapter.hasNext(MongoBatchCursorAdapter.java:54) ~[mongodb-driver-sync-4.2.3.jar:na]at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:2811) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2543) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2525) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:847) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:833) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at com.fastonetech.billing.service.v1.BillV1Service.create(BillV1Service.kt:41) ~[classes/:na]at com.fastonetech.billing.controller.BillController.getByMonth(BillController.kt:65) ~[classes/:na]at jdk.internal.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) ~[na:na]at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.9.jar:5.3.9]at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.9.jar:5.3.9]at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.9.jar:5.3.9]at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.9.jar:5.3.9]at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) ~[tomcat-embed-core-9.0.50.jar:4.0.FR]at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.9.jar:5.3.9]at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.50.jar:4.0.FR]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.50.jar:9.0.50]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.9.jar:5.3.9]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar:5.3.9]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.9.jar:5.3.9]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar:5.3.9]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.9.jar:5.3.9]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar:5.3.9]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.50.jar:9.0.50]at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]2022-07-11 08:34:01.440  INFO 1 --- [00.15.147:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=10.100.15.147:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=885369, setName='rs0', canonicalAddress=10.100.15.147:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='null', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=null, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdcb123f4ce1a82a43f54, counter=4}, lastWriteDate=Mon Jul 11 08:33:58 GMT 2022, lastUpdateTimeNanos=19893848661980}
2022-07-11 08:34:02.048  INFO 1 --- [00.73.126:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=10.100.73.126:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=859001, setName='rs0', canonicalAddress=10.100.73.126:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='null', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=null, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdee0732609efe7dccae6, counter=4}, lastWriteDate=Mon Jul 11 08:33:58 GMT 2022, lastUpdateTimeNanos=19894456486754}
2022-07-11 08:34:09.519  INFO 1 --- [00.73.126:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=10.100.73.126:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=829781, setName='rs0', canonicalAddress=10.100.73.126:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='10.100.73.126:27017', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=7fffffff000000000000042e, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdee0732609efe7dccae6, counter=5}, lastWriteDate=Mon Jul 11 08:33:58 GMT 2022, lastUpdateTimeNanos=19901926859608}
2022-07-11 08:34:10.535  INFO 1 --- [00.73.126:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=10.100.73.126:27017, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=829781, setName='rs0', canonicalAddress=10.100.73.126:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='10.100.73.126:27017', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=7fffffff000000000000042e, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdee0732609efe7dccae6, counter=6}, lastWriteDate=Mon Jul 11 08:34:10 GMT 2022, lastUpdateTimeNanos=19902943021680}
2022-07-11 08:34:10.535  INFO 1 --- [00.73.126:27017] org.mongodb.driver.cluster               : Setting max election id to 7fffffff000000000000042e from replica set primary 10.100.73.126:27017
2022-07-11 08:34:10.535  INFO 1 --- [00.73.126:27017] org.mongodb.driver.cluster               : Discovered replica set primary 10.100.73.126:27017
2022-07-11 08:34:10.552  INFO 1 --- [   scheduling-1] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:70, serverValue:410}] to 10.100.73.126:27017
2022-07-11 08:34:11.448  INFO 1 --- [00.15.147:27017] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=10.100.15.147:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=875959, setName='rs0', canonicalAddress=10.100.15.147:27017, hosts=[10.100.15.147:27017, 10.100.73.126:27017, 10.100.111.121:27017], passives=[], arbiters=[], primary='10.100.73.126:27017', tagSet=TagSet{[Tag{name='serviceName', value='mongodb'}]}, electionId=null, setVersion=5209130, topologyVersion=TopologyVersion{processId=62cbdcb123f4ce1a82a43f54, counter=4}, lastWriteDate=Mon Jul 11 08:34:10 GMT 2022, lastUpdateTimeNanos=19903856653811}
2022-07-11 08:34:16.523  INFO 1 --- [0.111.121:27017] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:71, serverValue:24}] to 10.100.111.121:27017

从保存的信息看,应该是链接问题,经过查找,加了一些参数:

&maxIdleTimeMS=1500000&maxWaitTime=120000&connectTimeout=60000&socketTimeout=60000&socketKeepAlive=true&readPreference=primary&retryWrites=true

但是还是有这个错误,没法做到根除异常信息。

后来排查发现,是mongodb集群节点频繁重启,造成链接点断开造成的。查看mongodb的状态数据
在这里插入图片描述

mongodb的节点服务已经宕机,出现OOM的问题。

升级mongoDB的内存,随这个问题也就解决了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/27801.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【强烈推荐】程序员平时使用最多的绘图软件之一!!!

draw.io 之前画图一般都是使用processOn(https://www.processon.com/),缺点就是只能通过网站画图,并且存在云端,不花钱想白嫖,只能画几张。 像我这种家庭条件,怎么用得起,而且我喜欢把东西存…

聊聊最适合程序员的画图工具

画图工具 没问题,直接坦白讲,我用了 2 年的画图工具是:draw.io。 我的图解文章里的图片全是在 draw.io 这个工具画的,写了那么久的图解文章,再加上我工作中也有画图的习惯,累计也有在上面画了接近 1000 张…

一款国内外流行的绘图软件,Visio国产类似工具!

如果大家因为价格较高、电脑系统限制、运行环境限制、操作不习惯等原因,想要寻找Visio的替代品,那我真心推荐你试下国产软件亿图图示。 亿图图示可替代Visio的优势和理由有7个: 1、跨平台设计,云端储存 关键词:兼容…

科研画图都用什么软件?

在看一些文章的时候,经常感觉有些概念图画的非常精致漂亮,但是不知道是用什么软件画的,各位大神都习惯使用什么样的软件呢 兔森破兔样 ,原以为遇到无脑喷子是大V们的特权,今天… 20 人赞同 注意题主问的是科研文章中的…

OpenAI 人工智能绘图工具 DALLE 好用吗?

用朴素的语言,还原你天马星空的想象。 喜悦 早上,终于收到了 OpenAI 的通知 —— 漫长的排队后,我可以用 DALLE 了。 这款人工智能绘图工具让我种草了多长时间?其实都快忘了,哈哈。查了一下,我是 4 月 7 日…

Web在线聊天室(完结) --- 注册用户+ip地址

注册用户 注册用户接口设计前端异步回调ajax函数编写servlet实现注册业务逻辑操作数据库插入新用户实现效果 项目发布地址 注册用户 接口设计 请求: POST /register {name: xxx,password: xxx,nickName: "蔡徐坤",signature: "我擅长唱跳rap篮球", } 响应…

IP获取方法二:太平洋网络IP地址查询Web接口

接口列表: (1)ip.jsp(2)ipJson.jsp(3)jsAlert.jsp(4)jsDom.jsp(5)jsFunction.jsp(6)jsLabel.jsp(7)jsWrite.jsp(8)whois/index.jsp(9)ipAreaCoord.jsp(10)ipAreaCoordJson.jsp 接口参数:param ip:可指定IP地址,不指定则取request.getRemoteAddr()的值。…

从APNIC获取中国IP地址列表

关于APNIC 全球IP地址块被IANA(Internet Assigned Numbers Authority)分配给全球三大地区性IP地址分配机构,它们分别是: ARIN (American Registry for Internet Numbers) 负责北美、南美、加勒比以及非洲撒哈啦部分的IP地址分配。同时还要给全球NSP(Netw…

使用IPIP.net识别客户端真实访问地址,具体到国家,省,市

这个IP库实测还是比较准确的,免费版的可以具体到国内城市,国外只能到国家名称,免费版的自己定期更新Ip数据库即可。 以下为C#调用代码 class Program{static void Main(string[] args){try{//传入要查询的ip 和17monipdb.datx 下载的ip库所在位置string address …

Google 以图搜图 - 相似图片搜索原理 - Java实现

前阵子在阮一峰的博客上看到了这篇《相似图片搜索原理》博客,就有一种冲动要将这些原理实现出来了。 Google "相似图片搜索":你可以用一张图片,搜索互联网上所有与它相似的图片。 打开Google图片搜索页面: 点击使用上传…

GPT-5紧急叫停?千名专家联名呼吁,AI技术的未来又该何去何从?

在半个月前强势上线的GPT-4 ,以其强大的性能再次掀起了一波关于人工智能技术的全民热潮。但GPT-4太强了,强到发指,不止群众恐慌,北京时间3月29日,全世界的 AI 大佬们纷纷出手,千名专家发表公开信&#xff0…

这次彻底搞懂 Redis,超详细总结!

作者:wugongzi 来源:https://www.cnblogs.com/wugongzi/p/16827473.html Redis 基础 如果对 Redis 还不了解的同学可以先看一下这篇 https://www.cnblogs.com/wugongzi/p/12841273.html 这里面介绍了 Redis 是什么,以及怎么用。 Redis 管道 我…

《花雕学AI》35:如何一次性和17个AI聊天机器人交流?ChatALL让你轻松实现

聊天机器人,也称为对话机器人,是一种能够通过自然语言与人类进行交流的人工智能系统。聊天机器人的应用领域非常广泛,从客服、娱乐、教育、医疗、社交等,到科研、商业、政治、军事等,几乎无所不包。随着深度学习和自然…

一个程序员的成长之路

学习笔记 java基础类型与String相关基本类型范围基本类型的转换byte计算自动转换int基本类型与包装类equals与的区别 集合比较与常用集合原理反射机制与真实使用场景动态代理与使用范例异常类加载机制与热加载实现与反编译内存模型与threadLocal与syncronizejvm的GC与调优处理J…

【Idea】人工智能编程他来了,Idea集成一款和ChatGPT一样智能的编码辅助神器

文章目录 简介官方介绍功能介绍 注册使用使用方法功能说明 结尾 简介 Bito是一款建立在OpenAI和ChatGPT之上的开发辅助神器!他可以帮我们生成代码、语法提示、生成测试用例、解释代码含义、生成注释、优化代码、检测代码安全性以及学习理论知识等!我们可…

澎湃新闻对话腾讯丁珂:从“治已病”到“治未病”,企业需快速构建“安全免疫力”

作者:澎湃新闻记者 周頔 随着数字化进程加快,企业数字化体系的边界在不断拓展,安全风险和挑战不断增加,传统被动防御的安全应对常显疲态,数字安全时代亟待建立全新的安全范式。 6月13日,腾讯安全联合IDC等…

2023年大学生就业怎么样?双一流高校就业率仅15%,到底是咋了?

2023年,大学毕业生就业状况如何,一直是社会关注的焦点。尤其是中国的双一流高校,以其优越的教学与研究背景和实力,被众多年轻人视为就业的理想选择。 然而,在最新的统计数据中,这些一流高校的就业率却惊人…

Chat GPT 的上线,网络安全问题已经显现

前言 Chat GPT已经发布了,一位不知名的作者将它的孪生兄弟“DAN”就在世界上最黑暗的暗网上线了。 这个黑化的GPT刚刚上线的一周后,就已经有组织利用“DAN”犯罪了。 他们利用虚拟电话号码注册各种交友平台的账号,然后再模仿有魅力的男女人…

媒体专访|知道创宇黑哥:视野和格局将决定网络空间测绘的未来!

日前,网安专业媒体安全牛【牛人访谈】栏目专访了知道创宇CSO黑哥(周景平)。 围绕知道创宇出版的新书《网络空间测绘技术与实践》,安全牛分析师与黑哥就网络空间测绘技术当下的应用与挑战、未来的发展与创新进行了对话与交流。 以…

《花雕学AI》比尔・盖茨:AI 和 ChatGPT 可以改善人类生活,但也要防止滥用和危害

3月21号,微软创始人比尔盖茨,发表最新AI文章《人工智能时代已经开始——人工智能与手机、互联网一样具有革命性》,文章中表示:「自1980年首次看到图形用户界面(graphical user interface)以来,O…