Failed with MongoDB connection on Linux version.
Opened this issue · 0 comments
Hello, I am getting this error when I try to run Docker on a Linux machine, but when I run the exact same command on a Mac, it works pretty well.
I’ve seen some old issues, but their solution to use MongoDB 4 doesn’t work either.
docker-compose-api-1 | com.mongodb.MongoSocketOpenException: Exception opening socket
docker-compose-api-1 | at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70)
docker-compose-api-1 | at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:180)
docker-compose-api-1 | at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:188)
docker-compose-api-1 | at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:152)
docker-compose-api-1 | at java.base/java.lang.Thread.run(Unknown Source)
docker-compose-api-1 | Caused by: java.net.SocketTimeoutException: connect timed out
docker-compose-api-1 | at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
docker-compose-api-1 | at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
docker-compose-api-1 | at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
docker-compose-api-1 | at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)
docker-compose-api-1 | at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
docker-compose-api-1 | at java.base/java.net.Socket.connect(Unknown Source)
docker-compose-api-1 | at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107)
docker-compose-api-1 | at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79)
docker-compose-api-1 | at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65)
docker-compose-api-1 | ... 4 common frames omitted
PROGRESS] saving checkpoint snapshot min: 3, snapshot max: 3 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 66"}}
docker-compose-ingestion-1 | 2023-07-19 15:41:06.000 ERROR 1 --- [pool-7-thread-1] i.e.e.i.b.workers.BlockDispatcherRunner : Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]
docker-compose-ingestion-1 |
docker-compose-ingestion-1 | org.springframework.dao.DataAccessResourceFailureException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongodb:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]
docker-compose-ingestion-1 | at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:95) ~[spring-data-mongodb-3.3.4.jar!/:3.3.4]
docker-compose-ingestion-1 | at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:2929) ~[spring-data-mongodb-3.3.4.jar!/:3.3.4]
docker-compose-ingestion-1 | at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:2865) ~[spring-data-mongodb-3.3.4.jar!/:3.3.4]
docker-compose-ingestion-1 | at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2581) ~[spring-data-mongodb-3.3.4.jar!/:3.3.4]
docker-compose-ingestion-1 | at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2563) ~[spring-data-mongodb-3.3.4.jar!/:3.3.4]
docker-compose-ingestion-1 | at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:868) ~[spring-data-mongodb-3.3.4.jar!/:3.3.4]
Thanks in advance