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

Server in docker keeps restarting - can't connect to mongo #17

Closed
anarion80 opened this issue Jun 7, 2024 · 3 comments
Closed

Server in docker keeps restarting - can't connect to mongo #17

anarion80 opened this issue Jun 7, 2024 · 3 comments

Comments

@anarion80
Copy link

Server keeps restarting after docker install:

Node.js v22.2.0
(node:1) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
node:events:498
      throw er; // Unhandled 'error' event
      ^
MongoServerSelectionError: getaddrinfo EAI_AGAIN mongo
    at Timeout._onTimeout (/server/node_modules/pino-mongodb/node_modules/mongodb/lib/sdam/topology.js:292:38)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
Emitted 'error' event on ThreadStream instance at:
    at Immediate.<anonymous> (/server/node_modules/thread-stream/index.js:369:12)
    at process.processImmediate (node:internal/timers:478:21)

At first glance this seems to be related to mongo being hardcoded in here:

uri: `mongodb://mongo:${db.port}/`,

while I'm using DB_HOST env variable and a different name than mongo

@SquirrelCorporation
Copy link
Collaborator

Hi @anarion80 Thanks a lot for the feedback, and pointing the mistake
I have published a new version we the fix, if you could confirm it resolves the problem,

@anarion80
Copy link
Author

Ok, I will wait for the docker images to be rebuilt and then check.

@anarion80
Copy link
Author

Ok, it works now 👍🏻

I added Squirrel Servers Manager to my fork of Ansible-NAS: anarion80/ansible-nas#167

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

1 participant