Cluster MSMQ Error - Invalid queue path name

Brad 61 Reputation points
2021-07-08T10:39:32.93+00:00

Hi,

I'm trying to make one of our in-house apps highly available using WCF. The app uses IIS, SQL, Win Services & MSMQ. I've had no issues configuring the Windows Failover Cluster for the windows services and SQL etc, but I'm stuck on MSMQ. The two nodes are in Azure.

Note that MSMQ is used for the Windows Services using PRIVATE$ queues. My goal for clustering MSMQ is should any queues get backlogged, and a failover occurs, the data is not lost.

I've configured the MSMQ Role in the Cluster just fine. Due to lack of documentation, I followed the setup for Clustering in Azure for SQL. I created a new frontend IP on the Azure ILB using a floating IP with HA ports then setup the probe as below. All good so far....

# MSMQ Azure LB Probe Configuration#####  
  
$ClusterNetworkName = "Cluster Network 1"  
$IPResourceName = "IP Address 10.1.0.10"   
$ILBIP = "10.1.0.10"  
[int]$ProbePort = 39999  
  
Import-Module FailoverClusters  
  
Get-ClusterResource $IPResourceName | Set-ClusterParameter -Multiple @{"Address"="$ILBIP";"ProbePort"=$ProbePort;"SubnetMask"="255.255.255.255";"Network"="$ClusterNetworkName";"EnableDhcp"=0}  
  
  
Get-ClusterResource $IPResourceName | Get-ClusterParameter  

Since I'm using HA Ports, I verified the front end ip by RDPing to the IP and I could. I also see from the azure LB hitting on the above probe port too in Wireshark.

I can also right click on the MSMQ Role and select Manage MSMQ and Computer Management loads and I see the Clustered MSMQ which is empty, as it should be.

I create a queue and give Everyone full permissions on the clustered MSMQ, then I run the below code to test.

Add-Type -AssemblyName System.Messaging
$MyQueuePath = 'MSMQ\private$\test'
$MyQueue = if([System.Messaging.MessageQueue]::Exists($MyQueuePath)) {

New-Object System.Messaging.MessageQueue $MyQueuePath  

} else {

[System.Messaging.MessageQueue]::Create($MyQueuePath)  

}

$myQueuePath.Send("Test Text", "test")

But here is where I get Invalid Path. Ive tried using FormatName, FQDN etc with no luck.

Any ideas?

Thanks in advance,

Brad

Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
953 questions
0 comments No comments
{count} votes

Accepted answer
  1. JiayaoZhu 3,911 Reputation points
    2021-07-13T03:28:57.77+00:00

    Hi,

    Thanks for your patience!

    Based on your description, there is something odd on your configuration, and I am not sure if this is because of your Azure platform. The scripts and console do have something difference from what I know from Windows OS platform. In this case, I would suggest you to contact our Microsoft Customer Support and Services directly. Our senior engineers can not only offer you advanced technical support but can give you real-time troubleshooting remotely. In this sense, they can get a deeper insight over your environment and current configuration, which can hardly be realized in our forum (we cannot do log analyzing and real-time remote operation). In addition, if the issue has been proved as system flaw, the consulting fee would be refund. You may find phone number for your region accordingly from the link below.

    Global Customer Service phone numbers:
    https://support.microsoft.com/en-us/help/13948/global-customer-service-phone-numbers

    You can also try to re-create your MSMQ role, while I can only find articles for creating MSMQ role on a Windows SQL cluster. I am not sure if it is also applied for Azure platform. Besides, if you find the re-creation is not helpful, you may still have to call our senior engineers.

    Thanks for your support and understanding! And I find that your issue is quite valuable for the public. So would you please help me Accept Answer, an accepted blog can be put on top of the forum, then the public can get access to the blog more easily.

    BR,
    Joan


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


2 additional answers

Sort by: Most helpful
  1. JiayaoZhu 3,911 Reputation points
    2021-07-09T06:40:02.097+00:00

    Hi,

    Thanks for posting on our forum!

    After my research, I found a similar issue with yours, you can firstly follow the guidance in this blog to do a general troubleshoot:
    https://stackoverflow.com/questions/4144493/creating-a-private-msmq-queue-in-a-microsoft-cluster-via-a-script/11268755

    Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

    Second, check if the provider you use applies the same queue syntax with that of ordinary msmq. Using a clean msmq provider and the syntax work alright.

    Finally, try using the actual machine name instead of "." syntax.

    Thanks for your support!

    BR,
    Joan


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Brad 61 Reputation points
    2021-07-09T09:51:12.463+00:00

    Thanks for the reply.

    I found that link myself and tested a while ago. That allows me to open Computer Management to view the queues created in the MSMQ Cluster but I can do that anyway by right clicking 'Manage Messaging Queue' within WFC.

    Where I'm stuck is that I want to point my windows services to ClusterMSMQ\PRIVATE$\Queuename rather than .\PRIVATE$\Queuename. The queues for the windows services are stipulated in the registry as .\PRIVATE$\Queuename. I know its not the Windows Service since I get the same error when testing manually with PS. This leads me to think Ive configured MSMQ incorrectly somehow. The DNS and PTRs are fine too.