Solved

How to close port 3020?

Posted on 2008-06-24
6
774 Views
Last Modified: 2013-12-03
Dear Experts,

I have a Client / Server application that are communicating through port 3020.
PS: the application has to run on this port, so there is no option to change it.
In many times the server fails to listen on port 3020 and claims that the port is in use.

I wanted to check this so:
-Closed the Client and Server applications
-telnet 127.0.0.1 3020
-I find it replying to this command instead of failing to open connection

I need an application or a code snippet that closes explicitly this port 3020 so that I can run my Client / Server application smoothly over this port.

I am running Windows XP SP2, any ideas ?

Thanks very much,
Georges Antoun
0
Comment
Question by:Georges_Antoun
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 29

Accepted Solution

by:
Michael Worsham earned 500 total points
ID: 21858017
I recommend downloading and running TCPView to see what is using port 3020 on the PC:
http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

Then you can see what is actively taking over this port and look at disabling it.

0
 
LVL 86

Expert Comment

by:jkr
ID: 21858065
Since it is probably your own app using that port, you need to make sure that only one instance runs at a time, otherwise you'll run into trouble. See http://support.microsoft.com/kb/243953 ("How to limit 32-bit applications to one instance in Visual C++")
0
 
LVL 40

Expert Comment

by:evilrix
ID: 21858074
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

by:evilrix
ID: 21858089
>> Is the port in a Time_WAIT state?
You can find this out by using the netstat command.
Proto  Local Address          Foreign Address        State
TCP    cenobite:3069          bu-in-f189.google.com:http  ESTABLISHED
TCP    cenobite:3218          ug-in-f19.google.com:http  TIME_WAIT <--------------------------------------EXAMPLE
TCP    cenobite:3460          207.46.248.248:http    ESTABLISHED
TCP    cenobite:3499          lm-in-f147.google.com:http  ESTABLISHED
TCP    cenobite:3501          ug-in-f19.google.com:http  ESTABLISHED

Open in new window

0
 
LVL 12

Expert Comment

by:trinitrotoluene
ID: 21858161
are you registering a channel on that port?
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 21858371
Consider setting socket option SO_REUSEADDR, if the socket cannot be closed politely. Beware that this must have been set on the previous listener. You'll have to wait for TIME_WAIT otherwise, as evilrix pointed out.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question