添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
org.springframework.data.mongodb.UncategorizedMongoDbException: Exception receiving message; nested exception is com.mongodb.MongoSocketReadException: Exception receiving message
at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:107)
at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:2114)
at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:464)
at org.springframework.data.mongodb.core.MongoTemplate.saveDBObject(MongoTemplate.java:1080)
at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:1015)
at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:961)
at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:949)
at com.foundation.mongo.dao.impl.MongoBaseDaoImpl.save(MongoBaseDaoImpl.java:108)
at com.foundation.service.record.service.impl.BaseRecordServiceImpl.saveRecord(BaseRecordServiceImpl.java:33)
at com.foundation.service.record.service.impl.IndicatorRecordService.saveIndicator(IndicatorRecordService.java:47)
at com.foundation.service.record.service.impl.IndicatorRecordService.saveIndicators(IndicatorRecordService.java:119)
at com.foundation.service.record.service.impl.IndicatorRecordService$$FastClassBySpringCGLIB$$56955274.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
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.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
at com.foundation.service.record.service.impl.IndicatorRecordService$$EnhancerBySpringCGLIB$$d2c761dd.saveIndicators(<generated>)
at com.foundation.service.canal.listener.BusiSyncHandle.syncBusiExamValue(BusiSyncHandle.java:741)
at com.foundation.service.canal.listener.BusiSyncHandle$$FastClassBySpringCGLIB$$57f9d56c.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
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.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
at com.foundation.service.canal.listener.BusiSyncHandle$$EnhancerBySpringCGLIB$$cf8285c5.syncBusiExamValue(<generated>)
at com.foundation.service.canal.listener.BusiAnscWatcherThread.gotoSyncData(BusiAnscWatcherThread.java:232)
at com.foundation.service.canal.listener.BusiAnscWatcherThread.dealBusinessData(BusiAnscWatcherThread.java:181)
at com.foundation.service.canal.listener.BusiAnscWatcherThread.switchHandle(BusiAnscWatcherThread.java:149)
at com.foundation.service.canal.listener.BusiAnscWatcherThread.init(BusiAnscWatcherThread.java:89)
at com.foundation.service.canal.listener.BusiAnscWatcherThread.run(BusiAnscWatcherThread.java:53)
Caused by: com.mongodb.MongoSocketReadException: Exception receiving message
at com.mongodb.connection.InternalStreamConnection.translateReadException(InternalStreamConnection.java:481)
at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:226)
at com.mongodb.connection.UsageTrackingInternalConnection.receiveMessage(UsageTrackingInternalConnection.java:105)
at com.mongodb.connection.DefaultConnectionPool$PooledConnection.receiveMessage(DefaultConnectionPool.java:438)
at com.mongodb.connection.WriteCommandProtocol.receiveMessage(WriteCommandProtocol.java:262)
at com.mongodb.connection.WriteCommandProtocol.execute(WriteCommandProtocol.java:104)
at com.mongodb.connection.InsertCommandProtocol.execute(InsertCommandProtocol.java:67)
at com.mongodb.connection.InsertCommandProtocol.execute(InsertCommandProtocol.java:37)
at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:168)
at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:289)
at com.mongodb.connection.DefaultServerConnection.insertCommand(DefaultServerConnection.java:118)
at com.mongodb.operation.InsertOperation.executeCommandProtocol(InsertOperation.java:76)
at com.mongodb.operation.BaseWriteOperation$1.call(BaseWriteOperation.java:142)
at com.mongodb.operation.BaseWriteOperation$1.call(BaseWriteOperation.java:134)
at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:232)
at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:223)
at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:134)
at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:61)
at com.mongodb.Mongo.execute(Mongo.java:827)
at com.mongodb.Mongo$2.execute(Mongo.java:810)
at com.mongodb.DBCollection.executeWriteOperation(DBCollection.java:333)
at com.mongodb.DBCollection.insert(DBCollection.java:328)
at com.mongodb.DBCollection.insert(DBCollection.java:319)
at com.mongodb.DBCollection.insert(DBCollection.java:289)
at com.mongodb.DBCollection.insert(DBCollection.java:255)
at com.mongodb.DBCollection.insert(DBCollection.java:177)
at com.mongodb.DBCollection.save(DBCollection.java:398)
at com.mongodb.DBCollection.save(DBCollection.java:373)
at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:1085)
at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:462)
... 38 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at com.mongodb.connection.SocketStream.read(SocketStream.java:85)
at com.mongodb.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:492)
at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:222)
... 66 more
<!-- 开启注解 -->
    <context:property-placeholder location="classpath:mongodb.properties" ignore-unresolvable="true"/>
    <mongo:mongo-client host="${mongo.host}" port="${mongo.port}" id="mongo">
    </mongo:mongo-client>
    <mongo:db-factory id="mongoDbFactory" dbname="${mongo.dbname}" mongo-ref="mongo" />
<mongo:client-options  connections-per-host="500"  threads-allowed-to-block-for-connection-multiplier="50"  connect-timeout="10000"  max-wait-time="25000"  socket-keep-alive="true"  socket-timeout="0"/>

我设置了一下参数,这个问题到目前为之,就没有再出现过了。后续再跟踪一下。应该是设置的

socket-timeout="0"
起了作用 评论 ( 0 )