MySQL errors in Mail err-Log

Discussion in 'Installation/Configuration' started by voltron81, Mar 18, 2010.

  1. voltron81

    voltron81 New Member

    Hi to everybody.
    I'm running 2 mailserver based on ispconfig 3.0.1.6 and a master-master replication of mysql (and replication of /var/vmail with glusterfs).

    The system is working fine, but I can see sometimes in Mail err-Log few errors like:
    Code:
    Mar 18 09:29:42 srv3 postfix/smtp[8885]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:29:43 srv3 postfix/error[8916]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:29:44 srv3 postfix/qmgr[28259]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:31:07 srv3 authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Too many connections
    Mar 18 09:31:07 srv3 pop3d: authentication error: Input/output error
    Mar 18 09:31:34 srv3 postfix/smtp[9047]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:31:35 srv3 postfix/error[9052]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:31:36 srv3 postfix/qmgr[9046]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:33:46 srv3 postfix/smtp[9113]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:33:47 srv3 postfix/error[9120]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:33:48 srv3 postfix/smtp[9112]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Mar 18 09:33:48 srv3 postfix/qmgr[9111]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    How can I avoid this errors?
    Thanks
    Michele
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /etc/postfix/
     
  3. voltron81

    voltron81 New Member

    Hi till
    This is the output:
    Code:
    drwxr-xr-x  3 root root     4096 2010-03-12 10:42 .
    drwxr-xr-x 95 root root     4096 2010-03-18 04:06 ..
    -rw-r--r--  1 root root        0 2009-10-27 15:48 body_checks
    -rw-r--r--  1 root root      425 2010-02-12 16:17 dynamicmaps.cf
    -rw-r--r--  1 root root      334 2010-02-12 16:14 header_checks
    -rw-r--r--  1 root root     3380 2010-03-03 09:53 main.cf
    -rw-r--r--  1 root root     3375 2009-12-16 13:53 main.cf~
    -rw-r--r--  1 root root     3286 2009-10-27 15:50 main.cf~2
    -rw-r--r--  1 root root     5002 2010-03-11 17:46 master.cf
    -r--------  1 root root     4348 2009-10-27 15:50 master.cf~
    -rw-r--r--  1 root root        0 2009-10-27 15:48 mime_header_checks
    -rw-r-----  1 root postfix   231 2009-10-27 15:48 mysql-virtual_client.cf
    -rw-r-----  1 root postfix   221 2009-10-27 15:48 mysql-virtual_domains.cf
    -rw-r-----  1 root postfix   218 2009-10-27 15:48 mysql-virtual_email2email.cf
    -rw-r-----  1 root postfix   230 2009-10-27 15:48 mysql-virtual_forwardings.cf
    -rw-r-----  1 root postfix   287 2009-10-27 15:48 mysql-virtual_mailboxes.cf
    -rw-r-----  1 root postfix   252 2009-10-27 15:48 mysql-virtual_recipient.cf
    -rw-r-----  1 root postfix   224 2009-10-27 15:48 mysql-virtual_relaydomains.cf
    -rw-r-----  1 root postfix   249 2009-10-27 15:48 mysql-virtual_sender.cf
    -rw-r-----  1 root postfix   227 2009-10-27 15:48 mysql-virtual_transports.cf
    -rw-r--r--  1 root root        0 2009-10-27 15:48 nested_header_checks
    -rw-r--r--  1 root root    18231 2008-09-14 14:53 postfix-files
    -rwxr-xr-x  1 root root     7421 2008-09-14 14:53 postfix-script
    -rwxr-xr-x  1 root root    22774 2008-09-14 14:53 post-install
    drwxr-xr-x  2 root root     4096 2009-11-24 09:24 sasl
    -rw-r--r--  1 root root     1757 2009-10-27 15:50 smtpd.cert
    -rw-r-----  1 root root     1679 2009-10-27 15:50 smtpd.key
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check if the content in the file /etc/postfix/mysql-virtual_relaydomains.cf looks ok (e.g. if the username, password and database name is identical to the values in the other mysql-.......cf files in the postfix directory.
     
  5. voltron81

    voltron81 New Member

    Hi till,
    the file look like fine.
    Anyway the problem is happened just yesterday morning, and for 2 minutes...

    Could be that I'm reaching the max connections of mysql? In /etc/mysql/my.cnf I've
    Code:
    #max_connections        = 100
    , so I guess I'm using the default value, that is 100.

    I hope is not that problem, because I really don't want to change nothing in my.cnf... since the database is master master replicated and both servers are active...

    Suggestions?

    Thanks
    Michele
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats possible. Please try to set max_connections to 500 and restart mysql. But you should be able to see in phpmyadmin the number of connection errors, so its worth to check that first.
     
  7. abubin

    abubin New Member

    i seems to be having this error also:

    Code:
    Jul 30 09:00:17 vn239 postfix/error[15444]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 09:24:37 vn239 postfix/error[17306]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 11:54:59 vn239 postfix/error[1147]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 12:24:37 vn239 postfix/smtp[3989]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 13:09:36 vn239 postfix/error[7307]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 13:24:37 vn239 postfix/smtp[8330]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 17:24:37 vn239 postfix/smtp[25925]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jul 30 18:00:22 vn239 postfix/error[28223]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    
    Here is what's in mysql-virtual_relaydomains.cf
    Code:
    user = ispconfig
    password = 2ce289bfbaa0835dc9ab7ea0c691b84d
    dbname = dbispconfig
    table = mail_transport
    select_field = domain
    where_field = domain
    additional_conditions = and active = 'y'
    
    The max_connections in mysql is already at 512.

    Any idea?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Which ISPConfig version?
     
  9. DKLeader

    DKLeader Member

    Samme problem

    Could see that this thread has been dead for a few months and no solution listed.

    I have the same problem as described.
    I am running ISPConfig 3 in a multiserver setup.

    A bit on my setup :

    web server : IP 192.168.90
    mail server : IP 192.168.60 (postfix / dovecot)
    db server : IP 192.168.40
    These are behind a router with IP 92.62.196.69
    ns1 and ns2 are on 92.62.196.66 / 67 (bind9)

    All servers are controlled and hosted by me.

    Ports opened on the router : 25, 110, 587 and 143 to IP 192.168.60

    My mysql-virtual_relaydomains.cf :
    Should the last line be hosts = localhost ?

    // DKLeader
     
    Last edited: Oct 2, 2010

Share This Page