Boa noite. Estou com um problema o servidor inicializa normalmente e até o momento em que criamos os models, tudo estava funcionando.
Após criar os models comecei a receber o seguinte erro:
com.mongodb.MongoSocketOpenException: Exception opening socket
at com.mongodb.connection.SocketStream.open(SocketStream.java:62) ~[mongodb-driver-core-3.6.4.jar:na]
at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:126) ~[mongodb-driver-core-3.6.4.jar:na]
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:114) ~[mongodb-driver-core-3.6.4.jar:na]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_171]
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_171]
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[na:1.8.0_171]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[na:1.8.0_171]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[na:1.8.0_171]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_171]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[na:1.8.0_171]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[na:1.8.0_171]
at java.net.Socket.connect(Unknown Source) ~[na:1.8.0_171]
at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:59) ~[mongodb-driver-core-3.6.4.jar:na]
at com.mongodb.connection.SocketStream.open(SocketStream.java:57) ~[mongodb-driver-core-3.6.4.jar:na]
... 3 common frames omitted
OBS: Inicializei o mongo da seguinte forma:
mongod --dbpath C:\Users\jorge\Documents\javamongo\db
O que pode estar errado ?