Topic: Cluebringer starting before MySQL is ready makes it fail forever.
==== Required information ====
- iRedMail version: 0.9.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Nginx
- Linux/BSD distribution name and version: CentOS 7
- Related log if you're reporting an issue:
====
I did a fresh install of iRedMail 0.9.1 without tweaking anything. The problem I'm experiencing is Cluebringer going and staying in bypass mode due to a database connection problem. Only when I restart the Cluebringer service manually it starts working, so it seems like once started and not being able to connect to the database, Cluebringer will stay in bypass mode forever.
You would expect it to try reconnecting later, as a database connection problem could be temporary, but it doesn't. The only other solution I can think of for now is making the cluebringer service start later, depending on MySQL, but I can't seem to figure out how to do that.
And even then it still wouldn't be a watertight solution, as every limit you impose could very well be ignored until next restart if a database connection arises... without any notification or attempt at recovery from Cluebringer's side. I know you didn't create the program but I think it's a major flaw to consider when keeping on using it the way it functions now.
----
The logfile shows this:
[2015/05/19-09:11:00 - 1196] [CORE] INFO: 2015/05/19-09:11:00 CONNECT TCP Peer: "[127.0.0.1]:35096" Local: "[127.0.0.1]:10031"
[2015/05/19-09:11:00 - 1196] [CBPOLICYD] WARNING: Client in BYPASS mode due to DB connection failure!
[2015/05/19-09:11:00 - 1196] [CBPOLICYD] NOTICE: Client BYPASS timeout exceeded, reconnecting...
[2015/05/19-09:11:00 - 1100] [CORE] INFO: Starting "1" children
[2015/05/19-09:11:00 - 2672] [CORE] DEBUG: Child Preforked (2672)
[2015/05/19-09:11:00 - 2672] [CBPOLICYD] DEBUG: Starting up caching engine
So even when it says that the bypass timeout exceeded and will try reconnecting it doesn't.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.