Well, I get why it was establishing a connection, as I had just restarted dovecot. Just seemed odd that it was trying to access a table that doesn’t exist. But if legacy code from before the table-per-domain refactoring if the vpopmail DB layout?
-Sent from my Pip-Boy 3000 > On Nov 7, 2017, at 5:08 AM, Eric Broch <ebr...@whitehorsetc.com> wrote: > > Here's the explanation in the code as a result of the 'mysql_query' and > 'mysql_error' call: > > if (mysql_query(&mysql_read,SqlBufRead)) { > fprintf(stderr, "vmysql: sql error[3]: %s\n", > mysql_error(&mysql_read)); > /* - May 29, 2006 - With newer versions of MySQL, there is such a > thing > as a connection timeout regardless of activity. By default under > MySQL 5, this > timeout is 28800 seconds (8 hours). If your vpopmail system runs > fine for the > first 8 hours, then stops authenticating, this timeout is your > problem (especially > under authdaemond). > > What this code does is when an error is encountered, it first tries > to drop and > rebuild a connection to the SQL server and tries again. If this > second attempt > fails, then something other than the connection timeout is the > problem. This fix > need to be implemented in other places but in my setup (Slackware > 10.2, netqmail, > vpopmail, courier-authdaemond, courier-imapd and a few others), this > is always where > the auth attempt died with a "SQL server has gone away" error. > */ > > fprintf(stderr, "Attempting to rebuild connection to SQL server\n"); > vclose(); > verrori = 0; > if ( (err=vauth_open_read()) != 0 ) { > verrori = err; > return(NULL); > } > if (mysql_query(&mysql_read, SqlBufRead)) { > fprintf (stderr, "vmysql: connection rebuild failed: %s\n", > mysql_error(&mysql_read)); > return(NULL); > } > } > > Not sure why mysql (mariadb) would return this error. > > Eric > > >> On 11/7/2017 5:47 AM, Eric Broch wrote: >> That's a good question, Chris. I'll have to delve into the code. >> >> >>> On 11/6/2017 9:57 PM, Chris wrote: >>> Given that the new DB structure for vpopmail involves having a separate >>> table for each domain, I thought seeing this in my dovecot.log was a little >>> weird: >>> >>> Nov 06 20:53:43 auth-worker: Error: vmysql: sql error[3]: Table >>> 'vpopmail.users' doesn't exist >>> Nov 06 20:53:43 auth-worker: Error: Attempting to rebuild connection to SQL >>> server >>> Nov 06 20:53:43 auth-worker: Error: vmysql: connection rebuild failed: >>> Table 'vpopmail.users' doesn't exist >>> >>> Any idea why vmysql is trying to access the users table in the vpopmail db, >>> given that it doesn't exist? >>> >>> -Chris >> > > -- > Eric Broch > White Horse Technical Consulting (WHTC) > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com > For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com > --------------------------------------------------------------------- To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com