james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Short <Steve.Sh...@PostX.com>
Subject RE: Problem with Retries and Bounces
Date Wed, 27 Feb 2002 23:29:44 GMT

Sorry for the delay, flu and other work got in the way but I'm back on the
case.

I can confirm that the problem is real and can give an easy way for anyone
else to reproduce it.  To do so, edit the RemoteDelivery parameters in the
'transport' section of your James config.xml. Add a gateway server and
reduce the retry count and timeout so you don't have to wait days to see the
problem, like this:

            <delayTime> 5000 </delayTime>
            <maxRetries> 3 </maxRetries>

            <gateway>NON.EXISTENT.COM</gateway>
            <gatewayPort>25</gatewayPort>

This tells the RemoteDelivery mailet to use a non existent server for
relaying messages.  Clearly this is an artifical test case that I am using
to demonstrate the problem, the issue affects all 'temporary' failures
within RemoteDelivery.

Now fire up James and send it an SMTP message.  What will happen is this:

- James will write the message to the spool queue
- James will read the message from the spool queue and hand it to
RemoteDelivery
- RemoteDelivery will write the message to the outgoing folder
- A RemoteDelivery deliverythread will read the message from the outgoing
folder and try to delivery it
- Delivery will fail ('cos the gateway server is invalid), and
RemoteDelivery increment the 'try' count for the message
- RemoteDelivery will write the message back to the outgoing folder 
*** This is where it goes wrong, the FILESTREAMOBJECT file has 0 bytes, 
*** so the message has lost all it's Mime headers
- RemoteDelivery will wakeup every 5 seconds and try again until the retry
count has been exceeded.
- RemoteDelivery will try to bounce the message by calling James.bounce()
(via a proxy context object).
- James.bounce() gets a NullPointerException while create the bounce message
because there are no
  valid recipient addresses in the message (they got wiped along with the
Mime headers).
- RemoteDelivery.run method gets general Exception. 

If you haven't installed my minor fix patches, then James will enter an
infitine loop, this is because the
invalid message is still in the outgoing folder, so RemoteDelivery will read
it, try to bounce it again, get
an exception again, read it again, try to bounce it, get exception again
etc. If you do have my fixes installed you'll
get alog message that says "encountered unexpected exception while bouncing
message" and the message is removed from the outgoing folder.  It should
probably also go into the error folder, but since the message is basically
corrupt I didn't feel confident about doing that.

So there is a basic problem with the way RemoteDelivery stores/retrieves the
message from it's outgoing mailrepository.

Regards
Steve



  





-----Original Message-----
From: Lucas Gonze [mailto:lucas@gonze.com]
Sent: Friday, February 15, 2002 3:03 PM
To: James Developers List
Subject: RE: Problem with Retries and Bounces


That's a useful clue, Steve.  Have you tried incrementally morphing the
default config to yours to see at what point the problem happens?

On Fri, 15 Feb 2002, Steve Short wrote:

>
> I partially retract my statement.  The problem doesn't happen with
> unmodififed James configuration, so it could be my configuration - but I
> still don't know what it is!!
>
> Any help appreciated.
>
> Steve
>


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message