Piler Service - cant connect to mysql server

Issue #520 resolved
Edwin Nichols created an issue

New Installation with no upgrades - Have followed all available instructions on how to install and gone through all of the configurations repeatedly with no success. Piler and Apache start, and can log in using the credentials specified for Piler as well, but in the GUI for health monitoring, Piler shows an error. When starting the piler service, the service starts but prints to screen immediately: [root@BCGEMAIL etc]# service piler restart stopping piler starting piler . . . cant connect to mysql server

Nothing is written to piler's mailbox related to the failure to connect and no log files seem to have any related errors. Attempting to telnet to port 25 results in: 421 bcgemail (FQDN removed for privacy) service not available

Environment CentOS 6.6, (Final).
MySQL 5.1.73. Piler: piler 1.1.0, build 884, Janos SUTO sj@acts.hu

Build Date: Fri Mar 6 14:45:03 EST 2015 ldd version: ldd (GNU libc) 2.12 gcc version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) Configure command: ./configure --localstatedir=/var --with-database=mysql --enable-starttls

Comments (9)

  1. eXtremeSHOK

    Not a bug ... Installation is the problem.

    Are you using the latest piler source from the master branch ?

  2. Edwin Nichols reporter

    I don't disagree that it is may not be a bug, but in the absence of any error anywhere other than cant connect to mysql server, I am lost on how to determine what is wrong. I am using the latest from http://www.mailpiler.org/en/download.html which is build 884. I am not a developer, so I can't easily determine which version is in the linked master branch and if it is the same or different than the one that I took to be the stable release.

  3. Janos SUTO repo owner

    piler needs the mysql server right when it starts. If it can't find (or connect) then it quits or returns a 421 temp fail error to the smtp client. So as the first step check if you have mysql daemon running (I assume you have the piler database and it's properly installed).

    Note that piler has no mailbox, every complaint it emits goes to /var/log/maillog, be sure to check it.

  4. Edwin Nichols reporter

    I was able to determine that I was not using the master branch as per the comment from Extremeshok. I downloaded the latest build, extracted the files, performed a configure (leaving off starttls for simplicity sake), followed by make and su -c 'make install'. I verified the settings in piler.conf afterward and commented out the database and port for mysql again.

    The mysql daemon is running - I can connect to the piler database through mysql and sphinx is able to connect. Only piler is giving an error. Here are the last lines from the maillog - the "unknown key" error appeared with the build of version 1.1.1 and was not present with the prior build. Also, here is the current output of piler -v: [root@BCGEMAIL jsuto-piler-daf6e904b7b6]# piler -v piler 1.1.1, build 903, Janos SUTO sj@acts.hu

    Build Date: Mon Mar 9 16:47:31 EDT 2015 ldd version: ldd (GNU libc) 2.12 gcc version: gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) Configure command: ./configure --localstatedir=/var --with-database=mysql

    Mar 9 16:51:37 BCGEMAIL piler[20888]: piler 1.1.1, build 903 starting Mar 9 16:55:44 BCGEMAIL piler[20892]: connection from 192.168.2.229 Mar 9 16:55:44 BCGEMAIL piler[20892]: Cannot connect to mysql server Mar 9 16:56:02 BCGEMAIL piler[20891]: piler has been terminated Mar 9 16:56:03 BCGEMAIL piler[20954]: unknown key: "session_timeout" Mar 9 16:56:03 BCGEMAIL piler[20954]: cannot connect to mysql server Mar 9 16:56:03 BCGEMAIL piler[20954]: piler 1.1.1, build 903 starting Mar 9 17:00:45 BCGEMAIL piler[20958]: connection from 192.168.2.229 Mar 9 17:00:45 BCGEMAIL piler[20958]: Cannot connect to mysql server Mar 9 17:05:01 BCGEMAIL piler: INDEXER INFO: indexing delta1 started Mar 9 17:05:01 BCGEMAIL piler: INDEXER INFO: indexing delta1 finished Mar 9 17:05:06 BCGEMAIL piler: INDEXER INFO: merging delta to dailydelta started Mar 9 17:05:06 BCGEMAIL piler: INDEXER INFO: merging delta to dailydelta finished Mar 9 17:05:46 BCGEMAIL piler[20959]: connection from 192.168.2.229 Mar 9 17:05:46 BCGEMAIL piler[20959]: Cannot connect to mysql server Mar 9 17:10:46 BCGEMAIL piler[20960]: connection from 192.168.2.229 Mar 9 17:10:46 BCGEMAIL piler[20960]: Cannot connect to mysql server Mar 9 17:15:46 BCGEMAIL piler[20961]: connection from 192.168.2.229 Mar 9 17:15:46 BCGEMAIL piler[20961]: Cannot connect to mysql server Mar 9 17:20:46 BCGEMAIL piler[20962]: connection from 192.168.2.229 Mar 9 17:20:46 BCGEMAIL piler[20962]: Cannot connect to mysql server Mar 9 17:24:56 BCGEMAIL piler[20957]: piler has been terminated Mar 9 17:24:57 BCGEMAIL piler[21189]: unknown key: "session_timeout" Mar 9 17:24:57 BCGEMAIL piler[21189]: cannot connect to mysql server Mar 9 17:24:57 BCGEMAIL piler[21189]: piler 1.1.1, build 903 starting Mar 9 17:25:46 BCGEMAIL piler[21193]: connection from 192.168.2.229 Mar 9 17:25:46 BCGEMAIL piler[21193]: Cannot connect to mysql server

  5. Janos SUTO repo owner

    If you have teamviewer and ready for a remote session, then find me on skype (janos.suto). I'll wait ~15 minutes, so be quick, and I'll help you.

  6. Janos SUTO repo owner

    I don't remember so clearly after a year, but it must have been the mysql* settings in piler.conf. Once they were set properly (username, password, socket path) everything was just fine.

  7. Log in to comment