com.mongodb.MongoException$Network: Read operation to server localhost/127.0.0.1:27017 failed on database data

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via GitHub by rawlingsj

host port isnt set

,

Check if your MongoDB is available.

Solutions on the web

via JIRA by Etienne Morency-Bachand [X], 1 year ago
Read operation to server localhost/127.0.0.1:27017 failed on database data
via GitHub by rootsongjc
, 1 year ago
Read operation to server localhost/127.0.0.1:27017 failed on database unitdb0
via GitHub by dblado
, 2 years ago
Read operation to server ip-10-181-140-155/10.181.140.155:27017 failed on database local
via 4programmers.net by Unknown author, 2 years ago
can't call something : localhost/127.0.0.1:27017/t
via GitHub by aurabhi
, 1 year ago
can't call something : localhost/127.0.0.1:37017/svmreporter
via ubnt.com by Unknown author, 1 year ago
Read operation to server localhost/127.0.0.1:7441 failed on database av
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at com.mongodb.DBPort._open(DBPort.java:223)
at com.mongodb.DBPort.go(DBPort.java:125)
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.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
at com.mongodb.DBCollection.findOne(DBCollection.java:728)
at com.mongodb.DBCollection.findOne(DBCollection.java:670)
at org.obiba.magma.datasource.mongodb.MongoDBValueTable.asDBObject(MongoDBValueTable.java:78)
at org.obiba.magma.datasource.mongodb.MongoDBValueTable$1.getTimestampsObject(MongoDBValueTable.java:144)
at org.obiba.magma.datasource.mongodb.MongoDBValueTable$1.getLastUpdate(MongoDBValueTable.java:150)
at org.obiba.magma.support.Timestampeds$1.compare(Timestampeds.java:18)
at org.obiba.magma.support.Timestampeds$1.compare(Timestampeds.java:10)
at org.obiba.opal.search.es.EsIndexManager$EsValueTableIndex.isUpToDate(EsIndexManager.java:338)
at org.obiba.opal.web.search.IndexResource.getTableIndexationStatus(IndexResource.java:88)
at org.obiba.opal.web.search.SearchServiceResource.getTableStatusDto(SearchServiceResource.java:80)
at org.obiba.opal.web.search.SearchServiceResource.getIndices(SearchServiceResource.java:47)
at org.obiba.opal.web.search.SearchServiceResource$$FastClassByCGLIB$$8851a7ee.invoke()
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.obiba.opal.web.search.SearchServiceResource$$EnhancerByCGLIB$$52303235.getIndices()
at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at org.obiba.opal.server.httpd.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:70)
at org.obiba.opal.server.httpd.OpalVersionFilter.doFilterInternal(OpalVersionFilter.java:39)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:363)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at java.lang.Thread.run(Thread.java:724)

Users with the same issue

8 times, 7 hours ago
14 times, 10 hours ago
552 times, 14 hours ago
11 times, 3 days ago
26943 times, 3 days ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.