How to REALLY restart MSMQ


Sometimes you restart MSMQ as part of your troubleshooting but it seems to make no difference and you end up having to reboot the machine instead to fix a problem.


The reason is that MSMQ has layers (just like Shrek).



  • On top is the queue manager service that applications talk to for sending messages, opening queues, and so on.
    This layer can be restarted with “NET STOP MSMQ / NET START MSMQ” or through Computer Management.

  • Underneath is the device driver that manages the Storage directory and the memory mapped files.
    Only “NET STOP MQAC / NET START MSMQ” will have any effect on this layer.
    MQAC stands for Message Queuing Access Control.

Comments (4)

  1. bb00001 says:

    Hi John,

    Thanks for the info.  What should I do if I get the error "The Message Queuing access control service could not be stopped." when attempting NET STOP MQAC?  MQAC does not appear in the service control manager, and I’m now unable to restart MSMQ.

    Thanks.

  2. MSDN Archive says:

    It sounds like MQAC is in an unresponsive state. Simply running NET STOP MQAC would not cause this on it’s own.

    Why it is not responding would be hard to say as I expect there are no errors in the event log.

    Can you reproduce the problem after rebooting the server or is it intermittent?

    Make sure that all other applications, such as backup and anti-virus products, have NO access to the Storage and StorageLQS directories.

    Ultimately you may need to generate some MSMQ debugging logs and engage PSS. Chapter 15 of the MSMQ FAQ (link on the left) covers generating logs.

  3. bb00001 says:

    The problem that led me to restart MSMQ is an intermittent failure with an MSMQ app running on our Citrix servers.  It randomly affects individual servers, not the entire farm at the same time.  Our investigations have so far failed to produce anything useful.  Rebooting the server is currently the only way of us clearing it.

    The error message in the event log following my attempt to restart MQAC is: "The service cannot start due to its failure to connect to its device driver"; the MQAC service is listed as a non-PnP device in device manager, and I have now been able to start the device.  I restarted both MQAC and MSMQ, but the problem with the app is still apparent.    

    I will add those directories to the A/V exclusion settings and look into the debugging logs you mentioned.  Thanks again for your help.

  4. MSDN Archive says:

    MSMQ applications can only talk to the MSMQ queue manager and not the MQAC driver. So the driver is failing which impacts the queue manager and therefore your app.

    I don’t understand how you are seeing MQAC appear in Device Manager as it shouldn’t be there, unless this is some Citrix-specific implementation. For example, my test machine has a "Microsoft Virtual Server Storage Bus" in Device Manager so you can definitely have software devices installed.

    If MSMQ is back up and running, what is the remaining problem with the application?