Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to clear the port

Status
Not open for further replies.

LuckySkunk

Technical User
Oct 7, 2004
11
MY
Hi all,

I am new with AIX and Unix. Need help to clear the port that is being held by I dunno what.

Thanks in advance.
 
You are going to have to explain in further detail what the issue is. What "Port" are you speaking of?
 
Port" is pretty vague. Are you talking about network ports?

Check out the following commands and files:
/etc/inetd.conf (lists processes and ports managed by the inetd daemon)
/etc/services (a port number to logical name file)
netstat (will show you the status of your network connections-oodles of options)
lsof (list open files- this will also show you the processes of what is bound to which port-oodles of options)

Good luck!

 
sorry. it's the network port. specifically the port specified in etc/services. i have designated port 1416 to MQSeries but failed to do so when i try to run the mq listener that automatically attach itself to the port as specified in the services config file. the error messages i'm getting right now is "The TCP/IP listener program could not bind to port number 1416". read the documentation and it's highly possible that the port has been occupied by another process and I need to find a way to clear it. Thanks
 
hello,

before launching mqseries, check with netstat -an | more
if a process is already binded to the port you are looking for.

lsof is probably a good tool (third party software, to download from
by the way, if you make any change to /etc/services or /etc/inetd.conf, issue
refresh -s inetd

to have the changes taken in account.

regards,
 
Once if you downloaded the lsof-Tool, type:

lsof -iTCP:1416

and you will get an answer like:

COMMAND PID USER TYPE etc.

look at the "ps -ef" output to find the PID and you have the process running on this port. Kill it or leave it

mad

Advanced Interactive eXecutable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top