My build started to fail without any changes in the project code, so it looks like a problem with Travis runtime.
My build uses MongoDB to run integration tests:
services:
- mongodb
and since 2018-12-08, every time the build is run it fails because integration tests can’t connect to MongoDB:
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=travis-job-b0d8719f-570a-4f48-88a2-1d864ae48787:33492, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
I’m a bit confused because I can’t see a way how to get support or report an issue with the Travis-Ci builds when it seems that a problem is not on my side.
Hi @BanzaiMan, yes, MongoDB service seems to start but I don’t know why it dies or stops listening.
This is a Java/Gradle build, so all my dependencies are fixed and controlled. I have no idea what is changed. I have restarted a build that used to be green and now it fails.
In my build, there is no MongoDB configuration. All I have is the declaration of mongodb service in the .travis.yml
services:
- mongodb
My integration tests connect to mongodb server using defaults, so they expect the mongodb service to listen on 127.0.0.1:27017. If the mongodb address is changed to travis-job-799337c2-0504-4daf-8374-3f399182937f:42865, definitely my tests won’t be able to connect. It looks like a blocker. Do you know why mongodb address is changed and how to get the defaults back?
Looks like the problem is caused by this big infrastructure migration on Travis-CI
Whatever I do, my integration tests can’t connect to MongoDB.
Moreover, this problem is not caused by the MongoDB service that is launched in the build environment.
I got the same error after switching to Embedded Mongo.