[Dovecot] ot: mysql auth worker failure ?
looking through logs I noticed this today:
grep mysql /var/log/maillog | grep fail Aug 3 17:35:25 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:35:57 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:36:02 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:36:23 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:36:40 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:36:50 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:40:04 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:41:04 dovecot: auth-worker(29721): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:41:19 dovecot: auth-worker(29721): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist Aug 3 17:41:38 dovecot: auth-worker(29721): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist
looking at mysqld.log, all i see is:
120721 17:58:44 InnoDB: Shutdown completed; log sequence number 0 76814 120721 17:58:44 [Note] /usr/libexec/mysqld: Shutdown complete
120721 17:58:44 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended 120721 17:59:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 120721 17:59:54 InnoDB: Initializing buffer pool, size = 8.0M 120721 17:59:54 InnoDB: Completed initialization of buffer pool 120721 17:59:54 InnoDB: Started; log sequence number 0 76814 120721 17:59:54 [Note] Event Scheduler: Loaded 0 events 120721 17:59:54 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.1.61' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
no failure were noticed or reported, except for log items
any thoughts ?
I might have been importing (phpmyadmin) some 3 or 4 databases around that time, surely that wouldn't cause such issue ?
-- Voytek Eymont
Am 03.08.2012 15:32, schrieb Voytek Eymont:
grep mysql /var/log/maillog | grep fail Aug 3 17:35:25 dovecot: auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist
states clearly that a table is missing
looking at mysqld.log, all i see is: no failure were noticed or reported, except for log items
any thoughts ?
why should mysqld report a error if a nonsystem table is mising
I might have been importing (phpmyadmin) some 3 or 4 databases around that time, surely that wouldn't cause such issue ?
what about connect directly to mysqld and look if the table exists and review your import dump-files if they did drop tables?
however, this is not a dovecot issue
On Fri, August 3, 2012 11:36 pm, Reindl Harald wrote:
states clearly that a table is missing what about connect directly to mysqld and look if the table exists and review your import dump-files if they did drop tables?
auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist
Reindl , thanks
oops, I clearly mis-interpreted what happened... looking at mysql tables, I don't have such table, and, it seems I'm not using it in my sql:
grep users dovecot-sql.conf grep users dovecot* conf.d]# grep users auth-sql* auth-sql.conf:# Authentication for SQL users. Included from auth.conf. auth-sql.conf.ext:# Authentication for SQL users. Included from auth.conf. conf.d]# grep users 10-auth.conf # If you want to allow master users to log in by specifying the master # Username to use for users logging in with ANONYMOUS SASL mechanism # allow both system users (/etc/passwd) and virtual users to login without # duplicating the system users into virtual database.
where could that be called from ?
-- Voytek Eymont
On 3.8.2012, at 17.08, Voytek Eymont wrote:
states clearly that a table is missing what about connect directly to mysqld and look if the table exists and review your import dump-files if they did drop tables?
auth-worker(28335): Error: mysql: Query failed, retrying: Table 'postfix.users' doesn't exist
Reindl , thanks
oops, I clearly mis-interpreted what happened... looking at mysql tables, I don't have such table, and, it seems I'm not using it in my sql: .. where could that be called from ?
From the default passdb/userdb sql settings. You haven't set one of password_query, user_query or iterate_query and it's trying to use the default which doesn't of course work with your database.
where could that be called from ?
From the default passdb/userdb sql settings. You haven't set one of password_query, user_query or iterate_query and it's trying to use the default which doesn't of course work with your database.
thanks
cd /etc/dovecot
grep password_query *
dovecot-sql.conf:password_query = SELECT username as user, password, '/var/mail/vhosts/%d/%n@%d' as userdb_home, **TRIM**
# grep user_query *
dovecot-sql.conf:user_query = SELECT concat('/var/mail/vhosts/', maildir) as home, concat('maildir:/var/mail/vhosts/', maildir) as mail, **TRIM**
dovecot-sql.conf:user_query = SELECT '/var/mail/vhosts/%d/%n@%d' as home, 'maildir:/var/mail/vhosts/%d/%n@%d' as mail, **TRIM**
OOPS, I seem to have duplicate user_query with my two 'user_query', it's the last one in the file that wins, yes ? so, I should remove the 1st one
# grep iterate_query * #
none. so, I need some 'iterate_query' inserted in my dovecot-sql.conf ?
-- Voytek
Voytek Eymont wrote:
I need some 'iterate_query' inserted in my dovecot-sql.conf ?
You only need it if you need to run some doveadm -A command over all users.
Regards Daniel
On Sun, August 5, 2012 11:08 am, Daniel Parthey wrote:
Voytek Eymont wrote:
I need some 'iterate_query' inserted in my dovecot-sql.conf ?
You only need it if you need to run some doveadm -A command over all users.
Daniel,
thanks for explanation, so I got these when I tried my expunge, I was trying also all 'local' users
I only have virtual users in mysql, there is no *nix users on this system, so, if I had a properly constructed 'iterate_query' I could use that '-A' option to go against all mysql virtual users, and, not try and fail on '/home/whatevr' as valid users ?
-- Voytek
participants (4)
-
Daniel Parthey
-
Reindl Harald
-
Timo Sirainen
-
Voytek Eymont