Diagnosing Common Queue Errors

MSMQ reports many common errors using generic error messages. For example, opening a queue might give you an error message that looks like this.

An error occurred while opening the queue: The queue does not exist or you do not have sufficient permissions to perform the operation. (-1072824317, 0xc00e0003). The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization.

This error message suggests four or five things that might have gone wrong and how to fix them. However, you have to use the specific error code to figure out more.

The error code for this example is 0xC00E0003, which corresponds to MQ_ERROR_QUEUE_NOT_FOUND. The problem actually is the first one suggested, that the queue does not exist, or perhaps that you've specified the queue name incorrectly.

If the problem had been the second one suggested, that you don't have permission to access the queue, then you probably would have gotten MQ_ERROR_ACCESS_DENIED (0xC00E0025).

If the problem had been the third one suggested, that there was a failure sending or receiving from the queue, then that might have been caused by MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE (0xC00E0069).

If the problem had been the fourth one suggested, that MSMQ is not running, then you instead could have seen MQ_ERROR_SERVICE_NOT_AVAILABLE (0xC00E000B).

Finally, if the problem had been the fifth one suggested, that there was an access violation opening the queue, then that possibly would have been caused by MQ_ERROR_SHARING_VIOLATION (0xC00E0009) when someone else has already opened the queue for exclusive access.

Next time: Proxy Caching Changes