Find the answer to your Linux question:
Results 1 to 5 of 5
Hi , When i m running some applications, i am getting error like, Bind error "Address already in use". How can we know a port is bound to which application? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    2

    which port is bound to which application?


    Hi ,

    When i m running some applications, i am getting error like,
    Bind error "Address already in use".

    How can we know a port is bound to which application?

    is there any command to know this information.

    plz help me,
    Thanx,
    Chittu.

  2. #2
    Just Joined!
    Join Date
    Nov 2006
    Location
    India,Tamilnadu
    Posts
    4

    Hi

    Did u write any socket programming ? If so you can check using the command netstat and check if the port is already in use. Else pls specify what kind of application makes this error.

  3. #3
    Just Joined!
    Join Date
    Nov 2006
    Posts
    2
    hi,

    just write a java program which connects create a server socket.
    and execute 2 instances of this program in same machine , u ll definitely get this error , while executing one of the program.

    Using netstat we can only get which ports are reserved( connected to remote port), But i want some application which tells me this port is using by this application.

    Thanx,
    Chittu.

  4. #4
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    Quote Originally Posted by sarath.chitta
    Hi ,

    When i m running some applications, i am getting error like,
    Bind error "Address already in use".

    How can we know a port is bound to which application?

    is there any command to know this information.

    plz help me,
    Thanx,
    Chittu.
    Try lsof -i as root
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  5. #5
    Just Joined!
    Join Date
    Jun 2006
    Location
    (.)
    Posts
    69
    Hi,

    Try this

    nmap -v -sS -O 192.168.2.1
    netstat -plant | grep LIST

    Thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •