Can't send a MSMQ message to the second DNS name of a server

Posted this on StackOverflow, but I think it's probably more germane to this crowd.

I am having an issue with sending a MSMQ message to the second DNS name on a server. If we send the IP for that same server, we're fine, but that's not where we are going architecturally. Any ideas as to why MSMQ would care about which name it receives?

Here is our example:

Server Information: The physical server load-int-01, has a second IP and DNS name associated with it. First IP/DNS: load-int-01, with IP 10.0.10.10 Second IP/DNS: load-intv, with IP 10.0.10.20

Queue path formats used:

FormatName:DIRECT=OS:load-int-01\private$\MyQueue -> Works Fine

FormatName:DIRECT=OS:load-intv\private$\MyQueue -> Returns the following error:

The queue does not exist or you do not have sufficient permissions to perform this operation

We have also tried using the IP addresses instead, and both sets of IPs work fine.

FormatName:DIRECT=TCP:10.0.10.10\private$\MyQueue -> Works Fine FormatName:DIRECT=TCP:10.0.10.20\private$\MyQueue -> Works Fine


Solution 1:

Could be due to reverse lookup. I'm not sure how MSMQ gets its hostname info, but if it's getting the hostname from Windows and not the DNS hostname of the second IP then a reverse lookup for the second IP would fail since it would return the second dns hostname which is different then the actual hostname of the server.

Solution 2:

To resolve via DNS use the DNS name rather than the IP this way--both should resolve:

FORMATNAME:Direct=OS:load-intv\private$\MyQueue
FORMATNAME:Direct=OS:load-int-01\private$\MyQueue 

Additionally, run the following registry script on the MSMQ server (per http://support.microsoft.com/kb/306785):

reg.exe ADD HKLM\Software\Microsoft\MSMQ\Parameters /V IgnoreOSNameValidation /t REG_DWORD /d 1 /f

Solution 3:

MSMQ is probably expecting the computer's netbios name to match the dns hostname used to get there. It's the same problem you have when you try to use a CNAME to map a drive to a Windows server.

There is a way to alias the name for it by adding a registry entry:

HKEY_Local_Machine\System\CurrentControlSet\Services\LanmanServer\Parameters
Add Value: OptionalNames REG_SZ with as value the name of the alias 
If you make it a type REG_MULTI_SZ, you can add multiple aliases.