You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by "Jerome Lacoste @ BBC" <la...@altern.org> on 2003/02/11 18:21:05 UTC

james unusable because of delivery failures to postmaster. Configuration problem?

I've setup james 2.1 a couple of weeks ago for our internal use. I've 
found out that my installation is now unusable as james is now looping 
on itself trying to deliver error messages without success.

The /opt/mysql/data/james/spool.MYD file takes more than 200 Mo and 
/opt/james/apps/james/var/mail/error contains 36752 files!

A quick look to the contents of these emails show me that james tries 
and fails to send mail to the postmaster, defined as 
"deesse-admin@localhost". There is a user called deesse-admin on the 
box, and a mail user called deesse-admin created using the 
administrative commands (using telnet).

I think the following happened: an email was sent to the James SMTP 
server with a 'To' field containing an external address. Failing to do 
that, james tried to send an email to the postmaster. This failed as 
well and triggered a new mail to the postmaster Thus the exponential 
problem.

[There should perhaps be something to preventing a loop there.]

Note: sendmail is not installed as I didn't want to create a conflict 
with james. Is that the reason for the failure?

Any ideas on how to fix the problem?
I tried changing the postmaster address and restart james without luck.
I can uncomment the mailet that notifies the postmaster in case of 
problems, but I don't think it is the correct solution, neither that it 
will have effect at that stage.
I've had a look to the "James and sendmail document" but that doens't 
seem to be what I want.

I am new to james, so do not hesitate to give me some details.

For information the machine is a PIV 1.7 with 256 Mo and 512 SWAP, 
running Mandrake 9.0.
Self installed applications include:
- mysql 4.0.6 gamma (yes I know I should upgrade).
- james 2.1
- SDK 1.4


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: james unusable because of delivery failures to postmaster. Configuration problem?

Posted by "Jerome Lacoste @ BBC" <la...@altern.org>.
Noel J. Bergman wrote:

>>I didn't enable special debugging (I can't remember). But there are
>>plenty of log files in james/apps/james/logs.
>>    
>>
>
>In SAR-INF/environment.xml, you can change log levels from INFO to DEBUG.
>
>  
>
>>database-connections.maildb_ ****** connection 22 is way too old: 65063 >
>>    
>>
>60000
>  
>
>>this message being  repeated every 60-65 seconds.
>>    
>>
>
>  
>
>>java.sql.SQLException: Communication link failure:
>>    
>>
>java.net.SocketException
>  
>
>>   at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source) ...
>>    
>>
>
>This one is easy to fix, and the fix will be in James v2.1.1.  Change your
>config.xml entry to add "?autoReconnect=true", e.g.,
>
>   <dburl>jdbc:mysql://127.0.0.1/mail?autoReconnect=true</dburl>
>
>The problem is that your system is currently overwhelmed in the spool.  I
>ran a similar test just yesterday, and saw all of these I/O related errors
>before adding the autoReconnect option.
>
>Once you have made that change and rebooted James, it will take a while for
>the queue to clear.  You could manually delete entries for the postmaster
>account via the mysql client.
>
thanks for you answers.

I made a DELETE * from spool where recipients = <my postmaster address>;
and it removed most of them.

There is probably another problem as, after having restarted james, I 
now have 95% CPU usage with mysql.
Perhaps related to those big files  in mysql/data/ or to the fact that I 
remove the contents of the james/var/mail/error directory?

I checked quickly and the bug files in mysql don't seemt to decrease.

Got to go. Will investigate further tomorrow.
Thanks for your help.

J



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: james unusable because of delivery failures to postmaster. Configuration problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I didn't enable special debugging (I can't remember). But there are
> plenty of log files in james/apps/james/logs.

In SAR-INF/environment.xml, you can change log levels from INFO to DEBUG.

> database-connections.maildb_ ****** connection 22 is way too old: 65063 >
60000
> this message being  repeated every 60-65 seconds.

> java.sql.SQLException: Communication link failure:
java.net.SocketException
>    at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source) ...

This one is easy to fix, and the fix will be in James v2.1.1.  Change your
config.xml entry to add "?autoReconnect=true", e.g.,

   <dburl>jdbc:mysql://127.0.0.1/mail?autoReconnect=true</dburl>

The problem is that your system is currently overwhelmed in the spool.  I
ran a similar test just yesterday, and saw all of these I/O related errors
before adding the autoReconnect option.

Once you have made that change and rebooted James, it will take a while for
the queue to clear.  You could manually delete entries for the postmaster
account via the mysql client.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: james unusable because of delivery failures to postmaster. Configuration problem?

Posted by "Jerome Lacoste @ BBC" <la...@altern.org>.
Noel J. Bergman wrote:

>>james is now looping on itself trying to deliver error
>>messages without success.
>>    
>>
>
>  
>
>>james tries and fails to send mail to the postmaster, defined as
>>"deesse-admin@localhost". There is a user called deesse-admin on
>>the box, and a mail user called deesse-admin created using the
>>administrative commands (using telnet).
>>    
>>
>
>It doesn't matter if there is a user with that name or not.  All that
>matters is whether or not there is one defined in the user repository.
>
 OK that confirms my thinking.

>>an email was sent to the James SMTP server with a 'To' field
>>containing an external address. Failing to do that, james
>>tried to send an email to the postmaster. This failed as
>>well and triggered a new mail to the postmaster
>>    
>>
>
>Why did mail to postmaster fail?  Did you turn on DEBUG for the logs to see
>if you could see why a message to deesee-admin or postmaster is not being
>directed to the local repository?  Resolving that problem would take care of
>the rest.
>

I didn't enable special debugging (I can't remember). But there are 
plenty of log files in james/apps/james/logs.

For example in default.log:
database-connections.maildb_ ****** connection 22 is way too old: 65063 
 > 60000
[ stack trace]

this message being  repeated every 60-65 seconds.

in mailstore.log:
Error retrieving pending messages
java.sql.SQLException: Communication link failure: java.net.SocketException
    at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source) ...
    [...]
    at 
org.apache.james.mailrepository.JDBCSpoolRepository.loadPendingMessages(JDBCSpoolRepository.java:232)

This happening every 5 seconds.

and the last one susceptible to be of interest:
 
in smtpserver.log

ERROR smtpserver: Unknown error occured while processing DATA.
javax.mail.MessagingException: Exceptio spooling message: Communication 
link falure: java.net.SocketException;
 nested exception is:
   java.lang.RunteimException: Exception cayght while storing mail 
Container: java.sql.SQLExceotuib: Communication link failure: 
java.net.SocketException
   at org.apache.james.James.sendMail(James.java:450)
   ....

Does that indicate something to one of you?

Jerome



---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: james unusable because of delivery failures to postmaster. Configuration problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> james is now looping on itself trying to deliver error
> messages without success.

> james tries and fails to send mail to the postmaster, defined as
> "deesse-admin@localhost". There is a user called deesse-admin on
> the box, and a mail user called deesse-admin created using the
> administrative commands (using telnet).

It doesn't matter if there is a user with that name or not.  All that
matters is whether or not there is one defined in the user repository.

> an email was sent to the James SMTP server with a 'To' field
> containing an external address. Failing to do that, james
> tried to send an email to the postmaster. This failed as
> well and triggered a new mail to the postmaster

Why did mail to postmaster fail?  Did you turn on DEBUG for the logs to see
if you could see why a message to deesee-admin or postmaster is not being
directed to the local repository?  Resolving that problem would take care of
the rest.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: james unusable because of delivery failures to postmaster. Configuration problem?

Posted by Danny Angus <da...@apache.org>.
> Note: sendmail is not installed as I didn't want to create a conflict 
> with james. Is that the reason for the failure?

No, James is much happier not to have sendmail, James doesn't replace the "mail" command of *nix systems, and this is usually implemented with sendmail. So we provide some clues about how to intercept this mail with James.