azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
2.99k stars 108 forks source link

[BUG]: MongoDB failed to install #129

Closed sureshfizzy closed 8 months ago

sureshfizzy commented 8 months ago

What happened?

MongoDB is failing on new install

What should have happened?

MongoDB container should be installed and started

How to reproduce the bug?

  1. deploy new docker image (docker run -d -p 80:80 -p 443:443 -p 4242:4242/udp --privileged --name cosmos-server -h cosmos-server --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /:/mnt/host -v /var/lib/cosmos:/config azukaar/cosmos-server:latest)
  2. cosmo server wont start

Relevant log output

2023/11/09 13:56:02 [ERROR] Metrics - Database Connect : MongoDB URL is not set, cannot connect to the database.

2023/11/09 13:56:02 [INFO] Metrics: Agglomeration done. Saving to DB

2023/11/09 13:56:02 [INFO] (Re) Connecting to the database...

2023/11/09 13:56:02 [ERROR] Metrics - Database Connect : MongoDB URL is not set, cannot connect to the database.

Other details

No response

System details

azukaar commented 8 months ago

Until you have finished the installer it is normal that it cannot connect to the DB

danielo515 commented 5 months ago

In my case the database is failing to start. Any suggestion about how to fix that?

ERROR: child process failed, exited with 51
To see additional information in this output, start without the "--fork" option.
warning: initdb logs cannot write to '/proc/1/fd/1', so they are in '/data/db/docker-initdb.log' instead
about to fork child process, waiting until server is ready for connections.
forked process: 27
ERROR: child process failed, exited with 51
To see additional information in this output, start without the "--fork" option.
warning: initdb logs cannot write to '/proc/1/fd/1', so they are in '/data/db/docker-initdb.log' instead
about to fork child process, waiting until server is ready for connections.
forked process: 27
azukaar commented 5 months ago

This is a MongoDB thing I suggest checking their forum: https://www.mongodb.com/community/forums/t/error-child-process-failed-exited-with-error-number-51/230721

danielo515 commented 5 months ago

Nevermind, I updated to ubuntu 18, then updated docker and it worked. Maybe the installer should check some minimums in versions