java.net.SocketException: Connection reset

JIRA | Claire Lee | 2 years ago
  1. 0

    My JAVA application is run on Tomcat Server with a single MongoDB. This error occurs some times a day. - Here is an exception message. ---------------------------------------------------------------------------------------------------- com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /172.20.1.4:27017 b/c of error java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:189) at java.net.SocketInputStream.read(SocketInputStream.java:121) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at org.bson.io.Bits.readFully(Bits.java:46) at org.bson.io.Bits.readFully(Bits.java:33) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.<init>(Response.java:40) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DB.command(DB.java:262) at com.mongodb.DB.command(DB.java:244) at com.mongodb.DBCollection.getCount(DBCollection.java:985) at com.mongodb.DBCursor.size(DBCursor.java:602) at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:271) at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93) at sun.reflect.GeneratedMethodAccessor6078.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy586.findAll(Unknown Source) ---------------------------------------------------------------------------------------------------- - The code about connecting MongoDB is not different. Here is the code. MongoClientOptions options = MongoClientOptions.builder() .connectionsPerHost(50).build(); MongoClient client = new MongoClient(new ServerAddress(dbHost, dbPort), Arrays.asList(credential), options); ---------------------------------------------------------------------------------------------------- I can't even guess whether it's caused by a Network problem or a MongoDB java driver. This issue is really worrying..Please, help me.

    JIRA | 2 years ago | Claire Lee
    java.net.SocketException: Connection reset
  2. 0

    My JAVA application is run on Tomcat Server with a single MongoDB. This error occurs some times a day. - Here is an exception message. ---------------------------------------------------------------------------------------------------- com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /172.20.1.4:27017 b/c of error java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:189) at java.net.SocketInputStream.read(SocketInputStream.java:121) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at org.bson.io.Bits.readFully(Bits.java:46) at org.bson.io.Bits.readFully(Bits.java:33) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.<init>(Response.java:40) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DB.command(DB.java:262) at com.mongodb.DB.command(DB.java:244) at com.mongodb.DBCollection.getCount(DBCollection.java:985) at com.mongodb.DBCursor.size(DBCursor.java:602) at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:271) at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93) at sun.reflect.GeneratedMethodAccessor6078.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy586.findAll(Unknown Source) ---------------------------------------------------------------------------------------------------- - The code about connecting MongoDB is not different. Here is the code. MongoClientOptions options = MongoClientOptions.builder() .connectionsPerHost(50).build(); MongoClient client = new MongoClient(new ServerAddress(dbHost, dbPort), Arrays.asList(credential), options); ---------------------------------------------------------------------------------------------------- I can't even guess whether it's caused by a Network problem or a MongoDB java driver. This issue is really worrying..Please, help me.

    JIRA | 2 years ago | Claire Lee
    java.net.SocketException: Connection reset
  3. 0

    My JAVA application is run on Tomcat Server with a single MongoDB. This error occurs some times a day. - Here is an exception message. ---------------------------------------------------------------------------------------------------- com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /172.20.1.4:27017 b/c of error java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:189) at java.net.SocketInputStream.read(SocketInputStream.java:121) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at org.bson.io.Bits.readFully(Bits.java:46) at org.bson.io.Bits.readFully(Bits.java:33) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.<init>(Response.java:40) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DB.command(DB.java:262) at com.mongodb.DB.command(DB.java:244) at com.mongodb.DBCollection.getCount(DBCollection.java:985) at com.mongodb.DBCursor.size(DBCursor.java:602) at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:271) at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93) at sun.reflect.GeneratedMethodAccessor6078.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy586.findAll(Unknown Source) ---------------------------------------------------------------------------------------------------- - The code about connecting MongoDB is not different. Here is the code. MongoClientOptions options = MongoClientOptions.builder() .connectionsPerHost(50).build(); MongoClient client = new MongoClient(new ServerAddress(dbHost, dbPort), Arrays.asList(credential), options); ---------------------------------------------------------------------------------------------------- I can't even guess whether it's caused by a Network problem or a MongoDB java driver. This issue is really worrying..Please, help me.

    JIRA | 2 years ago | Claire Lee
    java.net.SocketException: Connection reset
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    My JAVA application is run on Tomcat Server with a single MongoDB. This error occurs some times a day. - Here is an exception message. ---------------------------------------------------------------------------------------------------- com.mongodb.DBPortPool gotError WARNING: emptying DBPortPool to /172.20.1.4:27017 b/c of error java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:189) at java.net.SocketInputStream.read(SocketInputStream.java:121) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at org.bson.io.Bits.readFully(Bits.java:46) at org.bson.io.Bits.readFully(Bits.java:33) at org.bson.io.Bits.readFully(Bits.java:28) at com.mongodb.Response.<init>(Response.java:40) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DB.command(DB.java:262) at com.mongodb.DB.command(DB.java:244) at com.mongodb.DBCollection.getCount(DBCollection.java:985) at com.mongodb.DBCursor.size(DBCursor.java:602) at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:271) at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93) at sun.reflect.GeneratedMethodAccessor6078.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy586.findAll(Unknown Source) ---------------------------------------------------------------------------------------------------- - The code about connecting MongoDB is not different. Here is the code. MongoClientOptions options = MongoClientOptions.builder() .connectionsPerHost(50).build(); MongoClient client = new MongoClient(new ServerAddress(dbHost, dbPort), Arrays.asList(credential), options); ---------------------------------------------------------------------------------------------------- I can't even guess whether it's caused by a Network problem or a MongoDB java driver. This issue is really worrying..Please, help me.

    JIRA | 2 years ago | Claire Lee
    java.net.SocketException: Connection reset
  6. 0

    mariadb - Configuration to stop mysql sleep - Database Administrators Stack Exchange

    stackexchange.com | 7 months ago
    java.sql.SQLNonTransientConnectionException: Could not read resultset: Connection reset

  1. Andreas Häber 4 times, last 2 months ago
  2. sriharshakiran 1 times, last 7 months ago
14 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketException

    Connection reset

    at java.net.SocketInputStream.read()
  2. Java RT
    BufferedInputStream.read
    1. java.net.SocketInputStream.read(SocketInputStream.java:189)
    2. java.net.SocketInputStream.read(SocketInputStream.java:121)
    3. java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
    4. java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
    5. java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    5 frames
  3. MongoDB Java Driver
    DBCursor.size
    1. org.bson.io.Bits.readFully(Bits.java:46)
    2. org.bson.io.Bits.readFully(Bits.java:33)
    3. org.bson.io.Bits.readFully(Bits.java:28)
    4. com.mongodb.Response.<init>(Response.java:40)
    5. com.mongodb.DBPort.go(DBPort.java:142)
    6. com.mongodb.DBPort.call(DBPort.java:92)
    7. com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244)
    8. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)
    9. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)
    10. com.mongodb.DB.command(DB.java:262)
    11. com.mongodb.DB.command(DB.java:244)
    12. com.mongodb.DBCollection.getCount(DBCollection.java:985)
    13. com.mongodb.DBCursor.size(DBCursor.java:602)
    13 frames
  4. Querydsl - Mongodb support
    MongodbQuery.list
    1. com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:271)
    1 frame
  5. Spring Data MongoDB - Core
    QueryDslMongoRepository.findAll
    1. org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93)
    1 frame
  6. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor6078.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3. java.lang.reflect.Method.invoke(Method.java:483)
    3 frames
  7. Spring Data Core
    RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
    1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:358)
    2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343)
    2 frames
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  9. com.sun.proxy
    $Proxy586.findAll
    1. com.sun.proxy.$Proxy586.findAll(Unknown Source)
    1 frame