L
LLDAP9mo ago
Kikikan

Kikikan - Hello everyone, I am having a tiny is...

Hello everyone, I am having a tiny issue with LLDAP. When podman starts the pod in which lldap is on, I'm guessing LLDAP starts faster than the database, and then because the database has not started, it quits waiting and then stops. (Because if I rerun it, it works flawlessly.) Is there a solution to this problem? (Like an environmental variable that disables this forced stop?) Here is the log:
Setup permissions.. Starting lldap..
Loading configuration from /data/lldap_config.toml 2024-01-05T22:01:33.008667227+00:00 INFO set_up_server [ 3.61ms | 100.00% ] 2024-01-05T22:01:33.008797385+00:00 INFO ┕━ i [info]: Starting LLDAP version 0.5.0 2024-01-05T22:02:03.010592257+00:00 ERROR 🚨 [error]: Could not bring up the servers: Connection Error: pool timed out while waiting for an open connection: pool timed out while waiting for an open connection 2024-01-05T22:02:03.010908228+00:00 INFO i [info]: End.
Solution:
another way to solve it (though it's a bit ugly) would be to have the equivalent of docker-compose's restart: unless-stopped
Jump to solution
8 Replies
nitnelave
nitnelave9mo ago
Usually you would solve that by introducing a startup dependency on the DB, with a health check on the DB that tells you once it's up
Solution
nitnelave
nitnelave9mo ago
another way to solve it (though it's a bit ugly) would be to have the equivalent of docker-compose's restart: unless-stopped
Kikikan
Kikikan9mo ago
thanks for telling me the proper solution, I will look into it later I forgot that this setting existed for a hot minute. it was set to OnFailure, which should mean that it will automatically restart the container if the container exits with an error, however, podman did not restart it when I set it to Always, it restarted until lldap was finally able to connect to the database so now I'm just wondering if this is podman's fault, or LLDAP returns a non-error exit code when in fact, it exited with an error
nitnelave
nitnelave9mo ago
Hmm, yeah, there's a point at which I'm just logging an error instead of returning it
Kikikan
Kikikan9mo ago
anyways, thank you so much for the help and making LLDAP, have a nice day! 🙂
Kikikan
Kikikan9mo ago
Thank you for the quick fix 🙂
nitnelave
nitnelave9mo ago
My pleasure!
Want results from more Discord servers?
Add your server