Solved

How to close port 3020?

Posted on 2008-06-24
6
748 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
6 Comments
 
LVL 29

Accepted Solution

by:
Michael W 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now