Solved

How to close port 3020?

Posted on 2008-06-24
6
766 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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 clear a vector as well as how to detect empty vectors in C++.

726 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