Solved

How to close port 3020?

Posted on 2008-06-24
6
755 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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 clear a vector as well as how to detect empty vectors in C++.

920 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