Solved

How to close port 3020?

Posted on 2008-06-24
6
760 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is IHttpActionResult a promise pattern? 2 67
Which browser works with XP 16 170
.NET tools for adding thread safety to a web app? 3 31
Where did System.Data.Objects go? 2 23
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

813 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

10 Experts available now in Live!

Get 1:1 Help Now