Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered issue when start the project #14

Open
hoatepdev opened this issue Jul 17, 2024 · 1 comment
Open

Encountered issue when start the project #14

hoatepdev opened this issue Jul 17, 2024 · 1 comment

Comments

@hoatepdev
Copy link

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:

  1. Clone the repository: git clone ...

  2. Install dependencies: yarn

  3. Infrastructure installation: yarn infra
    Actual 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 argument

    Screenshot:
    image

  4. Run project: yarn start:dev
    Actual Result:
    When running the command npm run migration-mongo:run the following error occurs:

DbConnectionError: MongoServerSelectionError: connect EHOSTUNREACH 10.5.0.5:27017

  **Screenshot**: 

image

Thanks for reading, I would appreciate a solution to this problem!
@mike-lima-gaivota

@mikemajesty
Copy link
Owner

it's replica set, try to use a mongo single instance image.
https://hub.docker.com/_/mongo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants