com.mongodb.MongoException$Network

Read operation to server localhost/127.0.0.1:27017 failed on database data

Samebug tips9

host port isnt set

Check if your MongoDB is available.


rprp

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web5776

  • via Unknown by Etienne Morency-Bachand [X],
  • via Unknown by Etienne Morency-Bachand [X],
  • Stack trace

    • com.mongodb.MongoException$Network: Read operation to server localhost/127.0.0.1:27017 failed on database data at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:253)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBCollection.findOne(DBCollection.java:728)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBCollection.findOne(DBCollection.java:670)[mongo-java-driver-2.11.3.jar:na] at org.obiba.magma.datasource.mongodb.MongoDBValueTable.asDBObject(MongoDBValueTable.java:78)[magma-datasource-mongodb-1.8-20131125.202939-77.jar:1.8-SNAPSHOT] at org.obiba.magma.datasource.mongodb.MongoDBValueTable$1.getTimestampsObject(MongoDBValueTable.java:144)[magma-datasource-mongodb-1.8-20131125.202939-77.jar:1.8-SNAPSHOT] at org.obiba.magma.datasource.mongodb.MongoDBValueTable$1.getLastUpdate(MongoDBValueTable.java:150)[magma-datasource-mongodb-1.8-20131125.202939-77.jar:1.8-SNAPSHOT] at org.obiba.magma.support.Timestampeds$1.compare(Timestampeds.java:18)[magma-api-1.8-20131125.202939-83.jar:1.8-SNAPSHOT] at org.obiba.magma.support.Timestampeds$1.compare(Timestampeds.java:10)[magma-api-1.8-20131125.202939-83.jar:1.8-SNAPSHOT] at org.obiba.opal.search.es.EsIndexManager$EsValueTableIndex.isUpToDate(EsIndexManager.java:338)[opal-search-2.0-SNAPSHOT.jar:na] at org.obiba.opal.web.search.IndexResource.getTableIndexationStatus(IndexResource.java:88)[opal-search-2.0-SNAPSHOT.jar:na] at org.obiba.opal.web.search.SearchServiceResource.getTableStatusDto(SearchServiceResource.java:80)[opal-search-2.0-SNAPSHOT.jar:na] at org.obiba.opal.web.search.SearchServiceResource.getIndices(SearchServiceResource.java:47)[opal-search-2.0-SNAPSHOT.jar:na] at org.obiba.opal.web.search.SearchServiceResource$$FastClassByCGLIB$$8851a7ee.invoke(<generated>)[spring-core-3.2.4.RELEASE.jar:na] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)[spring-core-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)[spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)[spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)[spring-aop-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.obiba.opal.web.search.SearchServiceResource$$EnhancerByCGLIB$$52303235.getIndices(<generated>)[spring-core-3.2.4.RELEASE.jar:na] at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_25] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:221)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)[resteasy-jaxrs-3.0.5.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)[resteasy-jaxrs-3.0.5.Final.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)[javax.servlet-2.5.0.v201103041518.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1329)[jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106] at org.obiba.opal.server.httpd.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:70)[opal-httpd-2.0-SNAPSHOT.jar:na] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)[jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106] at org.obiba.opal.server.httpd.OpalVersionFilter.doFilterInternal(OpalVersionFilter.java:39)[opal-httpd-2.0-SNAPSHOT.jar:na] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)[jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)[jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[jetty-servlet-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.Server.handle(Server.java:363)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)[jetty-http-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[jetty-http-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[jetty-server-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)[jetty-io-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)[jetty-io-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[jetty-util-7.6.8.v20121106.jar:7.6.8.v20121106] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[jetty-util-7.6.8.v20121106.jar:7.6.8.v20121106] at java.lang.Thread.run(Thread.java:724)[na:1.7.0_25] Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method)[na:1.7.0_25] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)[na:1.7.0_25] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)[na:1.7.0_25] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)[na:1.7.0_25] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.7.0_25] at java.net.Socket.connect(Socket.java:579)[na:1.7.0_25] at com.mongodb.DBPort._open(DBPort.java:223)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBPort.go(DBPort.java:125)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBPort.call(DBPort.java:92)[mongo-java-driver-2.11.3.jar:na] at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244)[mongo-java-driver-2.11.3.jar:na] ... 64 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    LukaLuka
    Once,
    HandemelindoHandemelindo
    2 times, last one
    mortalman7mortalman7
    Once,
    jedcuajedcua
    Once,
    Unknown visitor
    Unknown visitorOnce,
    483 more bugmates