Loading ...
Sorry, an error occurred while loading the content.

Re: mysql lookup errors

Expand Messages
  • /dev/rob0
    ... snip ... snip ... That RPM is probably chroot ed by the distributor. My first guess is that you re seeing a chroot problem. My second guess, SELinux. In
    Message 1 of 6 , Mar 2, 2009
    • 0 Attachment
      On Mon March 2 2009 12:51:23 kj wrote:
      > I'm seeing this in the logs:
      >
      > Mar 2 18:18:05 web postfix/cleanup[27207]: warning: mysql query
      > failed: MySQL server has gone away
      snip
      > Mar 2 18:18:30 web postfix/pickup[26468]: E381E7102B3: uid=48
      > from=<apache>
      snip
      > RHEL5, with the stock Red Hat rpm recompiled with mysql support.

      That RPM is probably chroot'ed by the distributor. My first guess is
      that you're seeing a chroot problem. My second guess, SELinux. In
      either case, seek support from your vendor for these problems.

      > 1. What could possibly cause postfix to have lookup problems when
      > nothing else does? The server did run out of disc space a few days
      > ago. I did a postsuper -s -v which didn't show any problems. Could
      > the disc space issue have damaged something?
      >
      > 2. Is there a way to enable debugging output for connections from
      > apache?

      Uh, "connections from apache", what? Is that a Postfix question? If so
      see postconf.5.html#debug_peer_list and list the IP address of the
      client. See also DEBUG_README (which will also describe the chroot
      issue and how to get out of it.)

      However, the logging in your post did not show any "connections from
      apache," it showed submission via sendmail(1) by your apache user.
      Try "man sendmail" or sendmail.1.html.

      > 3. I looks like the query fails when the mysql connection has timed
      > out. Can postfix be told to reconnect automatically instead of
      > accepting it as a failure?
      --
      Offlist mail to this address is discarded unless
      "/dev/rob0" or "not-spam" is in Subject: header
    • mouss
      ... replace mysql: with proxy:mysql: and try again.
      Message 2 of 6 , Mar 2, 2009
      • 0 Attachment
        kj a écrit :
        > Hi guys,
        >
        > I'm seeing this in the logs:
        >
        > Mar 2 18:18:05 web postfix/cleanup[27207]: warning: mysql query failed:
        > MySQL server has gone away
        > Mar 2 18:18:05 web postfix/cleanup[27207]: warning: D1D1A71029C:
        > virtual_alias_maps map lookup problem for donny_brasco@...
        > Mar 2 18:18:28 web postfix/smtpd[27153]: connect from
        > unknown[xxx.xxx.xxx.xxx]
        > Mar 2 18:18:29 web postfix/trivial-rewrite[27154]: warning: mysql query
        > failed: MySQL server has gone away
        > Mar 2 18:18:29 web postfix/trivial-rewrite[27154]: fatal:
        > mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table
        > lookup problem
        > Mar 2 18:18:30 web postfix/pickup[26468]: E381E7102B3: uid=48
        > from=<apache>
        > Mar 2 18:18:30 web postfix/smtpd[27153]: warning: premature
        > end-of-input on private/rewrite socket while reading input attribute name
        > Mar 2 18:18:30 web postfix/smtpd[27153]: warning: problem talking to
        > service rewrite: Success
        > Mar 2 18:18:30 web postfix/cleanup[27207]: warning: premature
        > end-of-input on private/rewrite socket while reading input attribute name
        > Mar 2 18:18:30 web postfix/cleanup[27207]: warning: problem talking to
        > service rewrite: Connection reset by peer
        > Mar 2 18:18:30 web postfix/master[21481]: warning: process
        > /usr/libexec/postfix/trivial-rewrite pid 27154 exit status 1
        > Mar 2 18:18:31 web postfix/cleanup[27207]: E381E7102B3:
        > message-id=<kfw5i5.rhs3he@...>
        > Mar 2 18:18:31 web postfix/cleanup[27207]: warning: E381E7102B3:
        > virtual_alias_maps map lookup problem for donny_brasco@...
        > Mar 2 18:18:32 web postfix/smtpd[27153]: warning: mysql query failed:
        > MySQL server has gone away
        > Mar 2 18:18:32 web postfix/smtpd[27153]: NOQUEUE: reject: RCPT from
        > unknown[xxx.xxx.xxx.xxx]: 451 4.3.0 <sales@some_domain.com>: Temporary
        > lookup failure;
        >
        > [snip]

        replace "mysql:" with "proxy:mysql:" and try again.
      • MacShane, Tracy
        ... RedHat does not have Postfix chrooting enabled in the distro by default - it seems to be more the Debian-based distros that have that problem. Also, I ve
        Message 3 of 6 , Mar 2, 2009
        • 0 Attachment
          > -----Original Message-----
          > From: owner-postfix-users@...
          > [mailto:owner-postfix-users@...] On Behalf Of /dev/rob0
          > Sent: Tuesday, 3 March 2009 7:31 AM
          > To: postfix-users@...
          > Subject: Re: mysql lookup errors
          >
          > On Mon March 2 2009 12:51:23 kj wrote:
          > > I'm seeing this in the logs:
          > >
          > > Mar 2 18:18:05 web postfix/cleanup[27207]: warning: mysql query
          > > failed: MySQL server has gone away
          > snip
          > > Mar 2 18:18:30 web postfix/pickup[26468]: E381E7102B3: uid=48
          > > from=<apache>
          > snip
          > > RHEL5, with the stock Red Hat rpm recompiled with mysql support.
          >
          > That RPM is probably chroot'ed by the distributor. My first
          > guess is that you're seeing a chroot problem. My second
          > guess, SELinux. In either case, seek support from your vendor
          > for these problems.
          >

          RedHat does not have Postfix chrooting enabled in the distro by default
          - it seems to be more the Debian-based distros that have that problem.
          Also, I've never had any problems with SELinux and Postfix in stock RH
          installs (although I haven't used it with MySql)
        • kj
          Hi guys, Thanks for all the suggestions. It turns out rolling back to MySQL 5.0.x solves the problem. I guess I m affected by something in 5.1 - just don t
          Message 4 of 6 , Mar 3, 2009
          • 0 Attachment
            Hi guys,

            Thanks for all the suggestions. It turns out rolling back to MySQL
            5.0.x solves the problem. I guess I'm affected by something in 5.1 -
            just don't know what.

            --kj
          • Steve Crawford
            ... Perhaps something Monty has discussed: http://monty-says.blogspot.com/2008/11/oops-we-did-it-again-mysql-51-released.html Cheers, Steve
            Message 5 of 6 , Mar 3, 2009
            • 0 Attachment
              kj wrote:
              > Hi guys,
              >
              > Thanks for all the suggestions. It turns out rolling back to MySQL
              > 5.0.x solves the problem. I guess I'm affected by something in 5.1 -
              > just don't know what.
              >
              > --kj
              >
              >
              Perhaps something Monty has discussed:
              http://monty-says.blogspot.com/2008/11/oops-we-did-it-again-mysql-51-released.html

              Cheers,
              Steve
            Your message has been successfully submitted and would be delivered to recipients shortly.