连接mongo的服务提示:HTTP Status 500 - com.mongodb.MongoException$Network: can't call something

时间:2021-08-11 21:01:10

连接mongo的服务提示以下错误
原因:达到了mongodb启动时预设的最大连接数,无法创建新的连接

HTTP Status 500 - com.mongodb.MongoException$Network: can't call something : mctu.jcms-8chedao.com/192.168.6.119:37002/uc


type Exception report

message com.mongodb.MongoException$Network: can't call something : mctu.jcms-8chedao.com/192.168.6.119:37002/uc

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: com.mongodb.MongoException$Network: can't call something : mctu.jcms-8chedao.com/192.168.6.119:37002/uc
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

root cause

com.mongodb.MongoException$Network: can't call something : mctu.jcms-8chedao.com/192.168.6.119:37002/uc
    com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:295)
    com.mongodb.DBTCPConnector.call(DBTCPConnector.java:257)
    com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:310)
    com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:295)
    com.mongodb.DBCursor._check(DBCursor.java:368)
    com.mongodb.DBCursor._hasNext(DBCursor.java:459)
    com.mongodb.DBCursor.hasNext(DBCursor.java:484)
    com.jcm.db.MongoAPI.getUrl(MongoAPI.java:429)
    com.jcm.shorturl.service.ShortService.doShortUrl(ShortService.java:15)
    org.apache.jsp.ht.getshorturl_jsp._jspService(getshorturl_jsp.java:77)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

root cause

java.net.SocketException: Connection reset
    java.net.SocketInputStream.read(SocketInputStream.java:189)
    java.net.SocketInputStream.read(SocketInputStream.java:121)
    java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
    java.io.BufferedInputStream.read(BufferedInputStream.java:334)
    org.bson.io.Bits.readFully(Bits.java:46)
    org.bson.io.Bits.readFully(Bits.java:33)
    org.bson.io.Bits.readFully(Bits.java:28)
    com.mongodb.Response.<init>(Response.java:40)
    com.mongodb.DBPort.go(DBPort.java:124)
    com.mongodb.DBPort.call(DBPort.java:74)
    com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:286)
    com.mongodb.DBTCPConnector.call(DBTCPConnector.java:257)
    com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:310)
    com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:295)
    com.mongodb.DBCursor._check(DBCursor.java:368)
    com.mongodb.DBCursor._hasNext(DBCursor.java:459)
    com.mongodb.DBCursor.hasNext(DBCursor.java:484)
    com.jcm.db.MongoAPI.getUrl(MongoAPI.java:429)
    com.jcm.shorturl.service.ShortService.doShortUrl(ShortService.java:15)
    org.apache.jsp.ht.getshorturl_jsp._jspService(getshorturl_jsp.java:77)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.34 logs.


Apache Tomcat/7.0.34