Our GitLab CI/CD pipeline is failing due to a MongooseServerSelectionError (ECONNREFUSED 192.11.111.10:30017), indicating that the MongoDB service is either unreachable, not running, or blocked by network restrictions—requesting assistance to verify conne

I am experiencing an issue while running my GitLab CI/CD pipeline on my KodeKloud GitLab Runner. The pipeline fails during the test stage with a MongooseServerSelectionError: connect ECONNREFUSED 192.11.111.10:30017, indicating that the Node.js application cannot connect to MongoDB.

Issue Details:

  • GitLab Runner Version: 17.7.0 (3153ccc6)
  • Pipeline Executor: Docker (docker executor)
  • Docker Image Used: node:17-alpine3.14
  • MongoDB Host: 192.11.111.10 (external or internal IP unknown)
  • MongoDB Port: 30017
  • Error Message:
error!! MongooseServerSelectionError: connect ECONNREFUSED 192.11.111.10:30017
  1. Are you running a lab? If so, a link to the lab would be very helpful to understand what’s going on.
  2. Seeing the CI script file would help as well.