Occasionally a server deployment can fail if mongo-on-update didnt run successfully, probably because mongo-on-update ran before mongo had fully initialised. This is hard to reproduce but sometimes we saw errors like this where Hearth could not connect to Mongo:
2023-02-23T13:24:57.598Z - error: message=failed to connect to server [mongo1:27017] on first connect [MongoError: Authentication failed
The on-deploy.sh script creates users in the database and updates their passwords on each deploy.
A potential solution could be running the on-deploy.sh script after a 2 minute timeout to allow the stack a chance to fully start up. But it's still unclear what is causing this problem.
Occasionally a server deployment can fail if mongo-on-update didnt run successfully, probably because mongo-on-update ran before mongo had fully initialised. This is hard to reproduce but sometimes we saw errors like this where Hearth could not connect to Mongo:
The on-deploy.sh script creates users in the database and updates their passwords on each deploy.
A potential solution could be running the on-deploy.sh script after a 2 minute timeout to allow the stack a chance to fully start up. But it's still unclear what is causing this problem.