java.lang.RuntimeException

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

    • java.lang.RuntimeException: com.mongodb.MongoException$Network: Read operation to server localhost/127.0.0.1:27017 failed on database data at org.obiba.opal.core.service.impl.DefaultImportService.copyValueTables(DefaultImportService.java:345)[opal-core-2.0-SNAPSHOT.jar:na] at org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:167)[opal-core-2.0-SNAPSHOT.jar:na] at org.obiba.opal.core.service.impl.DefaultImportService.importData(DefaultImportService.java:152)[opal-core-2.0-SNAPSHOT.jar:na] at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:224)[opal-shell-2.0-SNAPSHOT.jar:na] at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:94)[opal-shell-2.0-SNAPSHOT.jar:na] at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:73)[opal-shell-2.0-SNAPSHOT.jar:na] at org.obiba.opal.shell.CommandJob.run(CommandJob.java:132)[opal-shell-2.0-SNAPSHOT.jar:na] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)[shiro-core-1.1.0.jar:1.1.0] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)[shiro-core-1.1.0.jar:1.1.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[na:1.7.0_25] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[na:1.7.0_25] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724)[na:1.7.0_25] Caused by: 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.setLastUpdate(MongoDBValueTable.java:96)[magma-datasource-mongodb-1.8-20131125.202939-77.jar:1.8-SNAPSHOT] at org.obiba.magma.datasource.mongodb.MongoDBValueTableWriter.updateLastUpdate(MongoDBValueTableWriter.java:68)[magma-datasource-mongodb-1.8-20131125.202939-77.jar:1.8-SNAPSHOT] at org.obiba.magma.datasource.mongodb.MongoDBValueTableWriter.close(MongoDBValueTableWriter.java:64)[magma-datasource-mongodb-1.8-20131125.202939-77.jar:1.8-SNAPSHOT] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:165)[magma-api-1.8-20131125.202939-83.jar:1.8-SNAPSHOT] at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:149)[magma-api-1.8-20131125.202939-83.jar:1.8-SNAPSHOT] at org.obiba.opal.core.service.impl.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:133)[opal-core-2.0-SNAPSHOT.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47)[opal-core-2.0-SNAPSHOT.jar:na] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)[spring-tx-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42)[opal-core-2.0-SNAPSHOT.jar:na] at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31)[opal-core-2.0-SNAPSHOT.jar:na] at org.obiba.opal.core.service.impl.DefaultImportService.copyValueTables(DefaultImportService.java:336)[opal-core-2.0-SNAPSHOT.jar:na] ... 14 more 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] ... 32 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