Which program/task is using port .. on Windows

Today I ran into the issue that the SMTP server of my beloved Domino server was not able to startup due to the following error message after a reboot of the Windows server:

06.03.2020 08:02:38 SMTP Server: Another application is already listening on port 25: 220 NOTES02 SMTP Server ready
06.03.2020 08:02:38 SMTP Server: Started
06.03.2020 08:02:38 SMTP Server: Listener failure, TCP/IP port number [25] is already in use on this system
06.03.2020 08:02:38 Suspending listen task for 20 seconds due to network errors

So what was causing the SMTP to startup ? To find out just enter the following command in a command prompt window:

netstat -aon | findstr 25

Then you will get all services listening to port *25*

result

With this information you just have to search for PID “8” in the Task Manager and either kill the task or end the service.

taskmgr

There´s also another way I received from Harald Reisinger:

With Powershell: Get-NetTCPConnection -LocalPort 25 | Select-Object -Property @{ Name=’Id’; Expression={$_.OwningProcess}} | Get-Process

Thanks to Harald for sharing this great information !

One comment

Leave a Reply to Cormac McCarthy Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s