Eugene Pefti | 3 Oct 22:01 2007
Picon

Re: Please help!!!! Delivery temporarily suspended: lost connection with 127.0.0.1 - message may be sent more than once

Don't understand yet but everything stopped after I reinstalled MySQL
server.
I'll have to investigate it as I left all config files intact.

Thank a lot to all of you guys.

Eugene

-----Original Message-----
From: joel@...
[mailto:joel@...] 
Sent: Wednesday, October 03, 2007 12:27 PM
To: Eugene Pefti
Cc: robert@...; maia-users@...
Subject: Re: [Maia-users] Please help!!!! Delivery temporarily suspended:
lost connection with 127.0.0.1 - message may be sent more than once

Eugene Pefti wrote:
> Hi Robert and Joel,
>
> I am having this php code to test my php connection:
>
> <?php
>
> $dbconn =  <at> mysql_connect('localhost', 'vscan', 'XXXXXXXXX');
>
> if (!$dbconn) {
>
>   echo( '<p>Unable to connect to the ' .
>
>           'database server at this time.</p>' );
>
>         exit();
>
>               }
>
> else { echo ('<p> Connected! </p>');
>
> }
> ?> 
>
> And it reports as a successful connection to the database. 
>
> Could it be that amavisd crashes in the first place when it can't connect
to
> the database when the MySQL service is not up yet.
> This is what I found in the log file:
>
> Oct  3 11:04:32 mail02 amavis[571]: (00571-01) connect_to_sql: unable to
> connect to DSN 'DBI:mysql:maia:localhost': Ca
> n't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
>
> Oct  3 11:04:32 mail02 amavis[571]: (00571-01) TROUBLE in process_request:
> SQL server(s) not reachable at (eval 53) li
> ne 224, <GEN9> line 5.
>
> Oct  3 11:04:32 mail02 amavis[571]: (00571-01) Requesting process rundown
> after fatal error                           
> Oct  3 11:04:32 mail02 amavis[570]: (00570-01) connect_to_sql: unable to
> connect to DSN 'DBI:mysql:maia:localhost': Ca
> n't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
>
> Oct  3 11:04:32 mail02 amavis[570]: (00570-01) TROUBLE in process_request:
> SQL server(s) not reachable at (eval 53) li
> ne 224, <GEN9> line 5.
>
> Oct  3 11:04:32 mail02 amavis[570]: (00570-01) Requesting process rundown
> after fatal error
>
> But then after MySQL service is up we have the other type of error:
>
> Oct  3 11:04:32 mail02 postfix/smtp[533]: DC062330D15:
> to=<info@...>, relay=127.0.0.1[127.0.0.1]:10024, delay
> =3332, delays=3331/0.23/0.84/0.08, dsn=4.4.2, status=deferred (lost
> connection with 127.0.0.1[127.0.0.1] while sending
>  RCPT TO)                                
>
>
>   
OK, just as a sanity check, do any messages get processed, or is it a 
total failure?

This socket specified in your config (/tmp/mysql-socket) seems 
non-standard - perhaps the socket is actually in /var/lib/mysql? That 
would explain why you can access the db through php calls to localhost 
but amavisd can't access a non-existent socket in /tmp.

I suggest that it would be better to use the configuration test script 
that comes with maia, since it tests database access using exactly the 
same path as normal operation, rather than introducing a new and 
unrelated path to the database as your php script does. Or else modify 
your script to use the same access path as maia.

Joel

Gmane