Print Page | Close Window

Could not bind to socket. Address and port are already in use.

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=1067
Printed Date: 05 February 2025 at 1:54pm


Topic: Could not bind to socket. Address and port are already in use.
Posted By: Guests
Subject: Could not bind to socket. Address and port are already in use.
Date Posted: 24 June 2003 at 2:13pm

Error message on startup. Right now I'm attempting to start / test as a non-service. I have checked my SMTP configuration, and even removed the stopped smtp virtual server that had been defined at the spare IP that I'm converting to SpamFilter. My configuration is specific with respect to binding  the Exchange server SMTP virtual server to the main NIC on 10.2.0.3:25. My SpamFilter configuration specifies 10.2.3.1:25 as the listen address/port, and 10.2.0.3:25 as the destination. I am running v.122 on w2K Server. Suggestions as to what else I should look at to identify the cause?

Tx,

Robert




Replies:
Posted By: LogSat
Date Posted: 24 June 2003 at 2:35pm

The 1st thing to try is, without SpamFilter running, to issue the following from a command prompt:

telnet 10.2.3.1 25

if a connection is made, then there is another service (Exchange maybe?) listening on port 25 on that IP, which is why SpamFilter will complain that it could not bind to that socket. Hopefully the banner on that telnet connection will give you indications on what the application is.

Roberto Franceschetti
LogSat Software



Posted By: Guests
Date Posted: 24 June 2003 at 3:14pm

Thanks Roberto. Telnet from another host, as well as from the console of the host in question, gets no response. On the host itself, the program terminates almost immediately - i.e. doesn't seem like it's hanging around to time out. As I rarely use telnet, I don't know if this is normal. In any event, there's no error message associated with the return. so I am concluding that there's no responsive service running on the ip:port.

I have rebooted a number of times in the course of testing this server. I've also shut down IIS completely. Also shut down NNTP virtual server, although that's obviously on a different port - indeed was specific to a different IP/NIC as well, but I'm trying to turn off any unnecessary "stuff" that might possibly create a conflict.

Is there any other way under 2K to see what processes are bound to ip:port?

Tx,

Robert



Posted By: BillStewart
Date Posted: 24 June 2003 at 6:20pm

To see if the port is in use, type in "netstat -an" at a command prompt.

For which applications are binding to which ports, you can use TCPView from http://www.sysinternals.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - http://www.sysinternals.com" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - http://www.sysinternals.com .



Posted By: Guests
Date Posted: 24 June 2003 at 6:40pm

Thanks. I got SpamFilter working by binding to 10.2.0.3:26 instead of 10.2.3.1:25. I suspect Exchange is the culpret, although I'll need to verify that with the software to which you referred me. In any event, my firewall now routes to :26, and SpamFilter passes accepted email to :25. Everyone seems to be happy - me, the admin, probably most of all!

Do you know of any 3d party software that manages relay by whitelist / blacklist, or that provides authenticated smtp for relay? I have a situation where I must provide relay for overseas users. Exchange auth smtp doesn't seem to work with non-MS firewalls (Raptor 7 in my case). I know this is not what you're here to support, so simply asking in the hope that you may have run across something.

Thanks!

Robert 



Posted By: Guests
Date Posted: 24 June 2003 at 6:51pm

I think that socket pooling may be the cause of the "busy" :25 on the second IP. Here is an MSDN reference from a colleague:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/htm/ref_mb_DisableSocketPooling.asp" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/htm/ref_mb_DisableSocketPooling.asp" CLASS="ASPForums" TITLE="WARNING: URL created by poster. - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/htm/ref_mb_DisableSocketPooling.asp

Sounds to me as though Exchange is looking at all :25 even though I have assigned it to a specific IP. I will post further if I can confirm, or if I learn more that might be material. Hope this helps other folks.

Robert




Print Page | Close Window