I just realized recovering from a lost database connection does not work when there was no database connection during startup at all. It will stuck in the Confluence had problems starting up page forever.
Is there a Confluence way to self heal this situation? Or at least an option such that Confluence will restart in that situation? That would already fix the problem.
FYI: I am running Confluence on a QNAP NAS through Container Station using the official latest docker image (which works great btw). Each time I boot my NAS, postgres will be available about 3 minutes after Confluence already started and therefore fails to start. Postgres runs through a different platform, so there is no elegant way to bound their lifecycles together. Anyway, a Confluence solution would be the robust way, anyway.
thank you for your help. I did a bit of a research especially for the delay approach and found a life hack more than enough for my home deployment. It's quite robust and based on delays, restarts and checking the database TCP port to respond until Confluence will be started.
In a linux environment tools like netcat and the so-called wait-for-it script (on github) are really helpful. The latter one is also recommended by docker. I've just placed that script into the confluence home folder to survive container updates, together with a start script and created a docker-compose yaml file.
For those few (or many?) people that run Confluence on a QNAP through Container-Station like me: you can create the yaml files through ContainerStation > Create > Create Application.
docker compose yaml:
command: ["/var/atlassian/application-data/confluence/wait-for-it.sh", "nas:5432", "-s", "--timeout=0", "--", "/var/atlassian/application-data/confluence/start_confluence.sh"]
welcome to Atlassian Community!
During startup Confluence expects the database to be there and ready. Your setup is valid (thanks for explaining!) but, I assume, when the application was designed such a scenario was not considered.
Two possibilities which come to mind are:
Please keep in mind there are only two theories of somewhat 'lifehack fixes' - in a data center-like scenario such workarounds are rarely needed :) Maybe you could put the database on a host where it comes alive faster.
Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events