Monday, November 3, 2008

What ports are in use - error 10048 - NETSTAT

·

Ever attempt to start a service that will not start or pops up a warning stating that another service is listening on that port with error 10048? This happens when a service is using the listening port that your service is attempting to listen on.

This commonly happens with SMTP on Windows 2003. For example, lets say you want to trial a new mail server and you install it on Windows 2003. After the install you receive error 10048 or the SMTP services will not start. The reason this may happen is because Windows 2003 has it's own SMTP server and will occupy port 25 not allowing other services to listen on that port (this is true for all services not just SMTP and the same applies to other operating systems). Here's a way around this problem and how to use NETSTAT to see if port 25 is occupied.

Open a DOS prompt and type the following (type netstat -? for help).

netstat -an

The response will list the TCP listening ports first and then the UDP ports. If the Windows 2003 SMTP service is listening on port 25 you will see this entry,

TCP 0.0.0.0:25 0.0.0.0:0 LISTENING

or

TCP 0.0.0.0:smtp 0.0.0.0:0 LISTENING

To disable Windows 2003 SMTP service go to Administrator Tools - Services and stop the Simple Mail Transfer Protocol service and set it to disabled. Now issue the netstat -an command again to see if port 25 is available, if so, you should be able to start your SMTP service.

Another side affect of the Simple Mail Transfer Protocol service on Windows 2003 is that it magically starts by itself, I've seen this happen a few times and suspect it's directly related to updating windows or updating IIS. If the Simple Mail Transfer Protocol service does start after you've disabled it your email clients will report error 'We do not relay' (which is a response from the Simple Mail Transfer Protocol service) and you will need to stop and disable the service again or at least check to see if another SMTP service is listening on port 25 using netstat.

Archive

Tweets