nestjs-microservice-boilerplate-api
nestjs-microservice-boilerplate-api copied to clipboard
Encountered issue when start the project
Environment:
System: Ubuntu 22.04 Node: 20.11.1 NPM: 10.2.4
Description:
When attempting to start the project, an issue was encountered that prevented the project from running as expected. Detailed information about the issue is provided below.
Steps to Reproduce:
-
Clone the repository:
git clone ... -
Install dependencies:
yarn -
Infrastructure installation:
yarn infraActual Result: All docker containers are up and running successfully. In the microservice-mongo-express container, the system reports an error: - MongoError: no primary found in replicaset - /docker-entrypoint.sh: line 14: 10.5.0.5,10.5.0.6,10.5.0.7: Name does not resolve - /docker-entrypoint.sh: line 14: /dev/tcp/10.5.0.5,10.5.0.6,10.5.0.7/27017: Invalid argumentScreenshot:
-
Run project:
yarn start:devActual Result: When running the commandnpm run migration-mongo:runthe following error occurs:
DbConnectionError: MongoServerSelectionError: connect EHOSTUNREACH 10.5.0.5:27017
**Screenshot**:
Thanks for reading, I would appreciate a solution to this problem! @mike-lima-gaivota
it's replica set, try to use a mongo single instance image. https://hub.docker.com/_/mongo