Might need to review some tracing to find the failures.
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/msmq/ms704062(v=vs.85)
--please don't forget to Accept as answer if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have MSMQ server running on Windows Server 2016.
The applications are using public queues.
I see the tcp ports in "bound" state growing for the msmq process. Till all the ports are used up.
Is there a way to find out what is causing this?
example:
PS C:\Scripts> Get-NetTCPConnection -State BOUND |select -First 5
LocalAddress LocalPort RemoteAddress RemotePort State AppliedSetting OwningProcess
0.0.0.0 65534 0.0.0.0 0 Bound 3240
0.0.0.0 65530 0.0.0.0 0 Bound 3240
0.0.0.0 65529 0.0.0.0 0 Bound 3240
0.0.0.0 65522 0.0.0.0 0 Bound 3240
0.0.0.0 65519 0.0.0.0 0 Bound 3240
Might need to review some tracing to find the failures.
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/msmq/ms704062(v=vs.85)
--please don't forget to Accept as answer if the reply is helpful--
@RuLe Hi,
Thank you for posting in Q&A!
About Troubleshoot Port exhaustion,The key is to identify which process or application is using all the ports. Below are some of the tools that you can use to isolate to one single process:
1.Start by looking at the netstat output.
If you are using Windows Server 2016, then you can run the command netstat -anobq and check for the process ID which has maximum entries as BOUND.
2.Check the Task Manager:
(1)Add a column called “handles” under details/processes.
(2)Sort the column handles to identify the process with the highest number of handles. Usually the process with handles greater than 3000 could be the culprit except for processes like System, lsass.exe, store.exe, sqlsvr.exe.
(3)If any other process than these has a higher number, stop that process and then try to login using domain credentials and see if it succeeds.
Finally, if the above methods did not help you isolate the process, we suggest you collect a complete memory dump of the machine in the issue state. The dump will tell you which process has the maximum handles.
For more details, please refer to:
https://learn.microsoft.com/en-us/windows/client-management/troubleshoot-tcpip-port-exhaust[troubleshoot-tcpip-port-exhaust][4]
Hope you have a nice day!
Gloria
============================================
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.
https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html
I know it is the MSMQ process.
The question is why and is it a service that is reading/writing from/to msmq that is causing this.
I will try the link that DSPatrick has sent for the tracing. Only I have little hope because:
Https locally used and local services are writing to the local queues. And both are not supported for msmq tracing.
From a windows perspective; generally if the process uses some dynamically assigned range of ports and didn't complete (and close) successfully and is repeatedly being triggered then it may be expected behavior to eventually run out of ports.
--please don't forget to Accept as answer if the reply is helpful--