November 23, 2024, 09:54:47 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Port numbers already in use: how to identify?  (Read 9167 times)

Offline wombat53

  • Linux Noob !
  • *
  • Posts: 17
Port numbers already in use: how to identify?
« on: May 30, 2005, 10:34:01 PM »
Hi group
I am trying to run a daemon which uses a port reserved for it in /etc/services, and after several minutes, it fails, with:

/opt/IBM/db2/V8.1/bin$ db2icd start
"Initializing startup.
a few minutes passes ....
Unable to start DB2 Information center daemon."

SYSLOG indicates the following:

May 30 18:26:07 george inetd[5614]: auth/tcp (2): bind: Address already in use
May 30 18:26:07 george inetd[5614]: finger/tcp (2): bind: Address already in use
May 30 18:26:07 george inetd[5614]: ftp/tcp (2): bind: Address already in use
May 30 18:26:07 george inetd[5614]: time/tcp (2): bind: Address already in use

Am running Slackware LINUX with 2.4.22 kernel

I am presuming the message means that the port is in use (by another process). How can I found out who is currently using which ports, please.
Thanks
George Peters

Offline rohitb

  • Linux Noob !
  • *
  • Posts: 8
Port numbers already in use: how to identify?
« Reply #1 on: June 02, 2005, 09:14:39 AM »
You can try this command

#netstat 1a  

this command gives out put of currently open and connected ports.

Else you can go and search for /etc/services file.This file contains all the information about all the services with the port they are using.
Might be helpfull to you.

Offline wombat53

  • Linux Noob !
  • *
  • Posts: 17
Port numbers already in use: how to identify?
« Reply #2 on: June 02, 2005, 12:18:52 PM »
Thanks rohitb
What is so interesting is that the port reserved for this daemon is not in use, as shown by NETSTAT, not is it used by another procees in /etc/services. I am still mystified by the precise meaning of the SYSLOG message.
THanks
George

Offline rohitb

  • Linux Noob !
  • *
  • Posts: 8
Port numbers already in use: how to identify?
« Reply #3 on: June 03, 2005, 04:22:50 AM »
You didnt got my point, /etc/services files shows you what service uses which port but unless that service is running the port is free.The port will only be in use only when that service is running otherwise it will be used for udp/tcp broadcasts which are randomly generated by tcp/ip stack.

Offline wombat53

  • Linux Noob !
  • *
  • Posts: 17
Port numbers already in use: how to identify?
« Reply #4 on: June 03, 2005, 04:39:12 AM »
Rohit
Ok, but how then to interpret  the messgae:
"May 30 18:26:07 george inetd[5614]: auth/tcp (2): bind: Address already in use"
Which address, exactly? The port (51000)? Certainly that port is NOT in use as shown by NETSTAT. Perhaps it is referring to something else? I am at a loss...I am more familiar with the IBM world, where each and every message(for all sub-systems, products, etc.)  has an identifier, and one can go off to the appropriate Error Messages Manual, with suggested remedies. They might vary in usefulness, of course, but this message from inetd directs me nowhere!
Thanks
George

Offline linuxswan

  • New Member
  • Posts: 1
Re: Port numbers already in use: how to identify?
« Reply #5 on: November 14, 2008, 10:11:50 AM »
try to use this command

namp localhost