1

I am getting an error that a port I am try to link in a docker-compose is being used by something else.

I can see my ports that are listening using suggested commands from here: How can I list my open network ports with netstat?

In my terminal I'm getting something looks approximately like the below:

Command   Pid         User     Fd    Type Device             Size/Off  Node    Name
java      343        _hivesvc  179u  IPv6 0x31e0f5f4193134b3      0t0  TCP     localhost:8999 (LISTEN)

How can I further investigate what is utilizing this port? I assume the Device is the detail I'm looking for? But the hexadecimal hash doesn't tell me anything I can interpret.

4
  • 1
    there seems to be a java process with PID 343 using that port
    – nohillside
    Commented Dec 15, 2021 at 17:01
  • Is there a way I can take the PID and get the actual application name or directory that's running there?
    – Hofbr
    Commented Dec 15, 2021 at 17:08
  • 1
    Try ps -xEf -p PID
    – nohillside
    Commented Dec 15, 2021 at 17:14
  • That worked, thank you. Happy to select your mark your answer as the solution if you want to post.
    – Hofbr
    Commented Dec 15, 2021 at 17:46

1 Answer 1

1

You can run ps -xEf -p PID to see details about the process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .