- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
项目开发中,链接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:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at 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:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
at 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 omitted
2022-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 cause
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at 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的内存,随这个问题也就解决了。
根本不是 SQL 人员。让顾问编写以下代码。 首先,它确保只选择了一所小学 - 然后,在 BEGIN 之后,如果变量 @Term 等于 3,我们想要在 IF 语句下执行操作。问题就在这里。当 @Ter
以下 javascript 将 bool 值呈现到每个语句的右侧: var reg = new RegExp(/^[\w\/].*result\b/); console.log(reg.test('p
有什么区别: x = 1 while x < 5 do x += 1 print x end 和: x = 1 while x < 5 x += 1 print x end 将 do
对于初学者来说,我是编程的“菜鸟”,所以只需了解事情的工作原理并向社区寻求帮助。 但是...我想知道的是: 我想要构建一个 Web 应用程序,两个主要用户界面之一实际上是日历产品。每个日历项目都有 8
我正在尝试制作带有图片上传选项的表单。我正在使用 express-http-proxy作为我的 API 代理和 multer按照建议。 app.use('/api', upload.any(), pr
根据this中的回答和 this问题,C++ 标准在 § 23.2.1 中声明 end() 对于所有 STL 容器都具有恒定的时间复杂度。 如果我理解正确的话: std::forward_list 只
当我使用 css 属性 align-items 时,我看不到 flex-end 值或 end 值有任何视觉差异>. align-items: end 和 align-items: flex-end 有
Sub RowRangeMove() Sheets.Add().Name = "CopySheet" With Sheets("BigDataSet - Copy")
假设第 1 到 5,000 列中有 25,000 到 50,000 行数据,每列可能有不同的行数。所有数据都是连续的,即列中没有空行,也没有空列。 考虑以下代码 Dim i As Long Dim W
我在 MYSQL 中有一个表,必须在 postgresql 中转换它。 我正在使用以下命令创建表格。 create table emp(COMPLETE BOOLEAN NOT NULL, END B
我正在尝试使用 Lark 为 BASIC 创建一个 LALR 解析器,而且我很难解决“END”语句和“END IF”等语句之间的冲突。这是语法的简化版本: %ignore /[ \t\f]+/ pro
试图理解this MSDN sample但我对这些行感到困惑: IAsyncResult result = Dns.BeginGetHostEntry(args[0], null, null); Co
我在 http://www.sgi.com/tech/stl/nth_element.html 阅读了 std::nth_element 的描述 template void nth_element(
为什么标准将 end() 定义为末尾,而不是实际末尾? 最佳答案 最好的论据是Dijkstra himself 提出的论据。 : 您希望范围的大小是一个简单的差异end - begin; 当序列退化为
我试图根据一些参数停止页面的其余部分加载;但不确定语法是否正确。 @if(dayRes + dayTri == 2){Sorry, etc @Response.End} 上面抛出这个错误: CS150
在二分搜索中,我们通常有 low 和 high 变量,并且通常有一个 while 循环来测试 low <= high,如以下代码所示(来自维基百科): int SortedArray[max] = {
我将 MS-Test 与 Visual Studio 2010 和 Visual Basic 结合使用。 在下面的函数中,代码覆盖率告诉我,有一个未检查的 block ,并且带有 “End Try”
所以今天我一直致力于使用 Protractor 为 Angular JS 应用程序设置端到端测试。为了编写更清晰的测试,我使用了 Protractor 网站上描述的 Page Object 模式。 测
所以 meteor js 的全部意义在于允许用户一次对整个堆栈进行编码,但是如果我正在使用像 django 这样的旧框架之一,可以借用meteor js的前端代码吗?比如前端的数据库同步,模板化,或者
我正在使用 wavesurfer.js 和 recorder.js 制作采样器。一切都很顺利,除了我无法使用 play([start[, end]]) 调整循环长度。 wavesurfer.seekT
我是一名优秀的程序员,十分优秀!