Solved the problem when MongoDB may not be immediately accepting connections (docs.travis-ci.com)