How to configure a Generic Service in Windows Failover Cluster to use clustered instead of local MSMQ

2.8k Views Asked by At

Running Windows 2008 R2 Datacenter. We have Windows services that receive messages via MSMQ. We are adding a two node cluster and trying to get the services running there. We have added Message Queueing through Failover Cluster Manager and created some test queues on it. We are able to send to the clustered queues from other machines.

Next, we have added our services to the clustered MSMQ service as Generic Service resources. But we can't seem to get the services to use the clustered MSMQ instead of their node's local MSMQ.

Every article I've found on this topic says you just need to add the same Network Name dependency to the generic service as is used by the queuing service, and to check the 'Use Network Name for computer name' option under the General tab on the service's properties. We've done this, but they are still using their local queuing services.

If I take the service resource offline, stop the local Message Queuing service, then bring the service resource back online, the local Message Queuing service starts along with it, so it's definitely bound in some way but I can't see where.

1

There are 1 best solutions below

0
On BEST ANSWER

Turns out you can't just add a dependency to the service via Failover Cluster Manager. We also need to configure the service on each local node via command line as described in this answer:

https://serverfault.com/questions/24821/how-to-add-dependency-on-a-windows-service-after-the-service-is-installed

In our case the command was:

sc config OurService depend= MSMQ$MSMQ-OurClustMsmq (Note the space after the = sign)

I suppose that makes this a duplicate of the serverfault question...

Update: in fact, the dependencies added in the Failover Cluster Manager would have worked just fine but the service had come along with its own (local) MSMQ dependency. In the end, this was resolved not by adding an explicit dependency to the clustered MSMQ but by removing the dependency on the local MSMQ:

sc config OurService depend= /