Wednesday, 18 March 2015

How to Troubleshoot Transport Queuing Problems in Exchange Server 2007

1.  Cannot connect to destination machine to deliver mail
The administrator must first identify which queue seems to accumulate messages without delivering them.
To get to this information run the command:
get-queue “SortOrder:-MessageCount
Sample output:
Identity  DeliveryType Status MessageCount NextHopDomain
--------  ------------ ------ ------------ -------------
ExchServer2\5  SmartHost... Retry  2  localhost
ExchServer2\Unreacha... Unreachable  Ready  1  Unreachable Domain
ExchServer2\Submissi... Undefined  Ready  0 Submission
The “-Results:<desired result count>” argument can be passed to the task to limit the number of queues returned.
get-queue “SortOrder:-MessageCount “Results:1 | fl
Identity  : ExchServer2\5
DeliveryType  : SmartHostConnectorDelivery
NextHopDomain  : localhost
NextHopConnector : a54b112f-e70f-38ae-de6f-415fe1456fee
Status :
Retry
MessageCount  : 2
LastError :
451 4.4.0 Primary target IP address responded with: "421 4.2
1 Unable to connect." Attempted failover to alternate host,
but that did not succeed. Either there are no alternate hos
ts, or delivery failed to all alternate hosts.
LastRetryTime  : 5/5/2010 7:35:20 PM
NextRetryTime  : 5/5/2010 7:35:21 PM
IsValid  : True
ObjectState  : Unchanged
First make sure the queue status is not Suspended
If the queue is suspended, resume it by running the following command, which will automatically attempt to connect to the destination:
resume-queue <QueueIdentity>
The LastError queue field should be descriptive enough to make it obvious that the problem lies with the server being diagnosed or the remote server or somewhere in between (MX records).
If some send connectors are left enabled pointing to a smarthost that doesn't exist anymore
2.   Messages stuck in a delivery queue but destination seems OK
The queue status may be Ready or even Active but the message count won't go down.
In this case the admin would have to make sure first that some messages are being delivered.
The first thing to do is call:
get-queue <QueueIdentity>
As in the previous situation described, first make sure first the queue status is not Suspended. Next, check if the queue status is Retry.
The time of the next connection attempt is given by the NextRetryTime queue field. If the destination is known to have had a problem that was fixed in the meanwhile, run:
retry-queue <QueueIdentity>
to attempt to establish a connection.
If the queue is Active and the message count fluctuates up and down then the queue is working as expected: messages are being delivered but they can also be rejected – in both cases they disappear from the queue. If the queue message count seems to be increasing constantly, it’s time to take a look at the messages:
get-message -Queue <QueueIdentity>Â
Identity  FromAddress  Status  Queue  Subject
--------  -----------  ------  -----  -------
ExchServer2\5\1  <>  Suspended  ExchServer2\5  Undeliverabl...
ExchServer2\5\2   me@a.com  Ready  ExchServer2\5  party!
To get the active messages run the following command a few times and see if any results are returned:
get-message “Filter:{Queue “eq <QueueIdentity>“and Status “eq Active"}
3.  Messages rejected by a remote machine
To get even more detailed information on a particular message run:
$m=get-message <MessageIdentity> -IncludeRecipientInfo
$m.Recipients | fl
We can export the NDR messages and look at their body. To export a message it must be first suspended:
suspend-message <message identity>
export-message <message identity> -Path: <path to directory or file>
resume-message <message identity>
4.  Messages stuck in the submission queue
Make sure the submission queue is not suspended (the status must be Ready).
get-queue Submission
Look at the messages in Retry
get-message “Filter:{Queue “eq Submission“and Status “eq Retry}
By default, the categorizer can only process 20 messages at once (in various stages of categorization). If all those 20 jobs are stuck, no more messages will be picked up from the submission queue for processing, and as a result, the submission queue will grow continuously
get-message “Filter: {Queue “eq Submission and Status “eq Active} | ft Identity
5. Messages show in the poison queue
First, take a look at the poison queue
get-queue Poison
or
get-queue <ServerName>\Poison
Then the messages must be looked at individually
get-message “Queue:Poison
All those messages are considered suspended. The admin now has a couple of options
· resume-message <poison message identity>
· get-message “Queue:Poison | export-message “Path: C:\temp"
· remove-message <poison message identity> -withNDR:$false

No comments:

Post a Comment