0

MacOS 10.15.5 Intellij 2020.2

I have a java application which starts HTTP server on port 4232. I stopped the application (sometimes it hangs and I need to use force (red skull icon) button). Then I launch the app one more time and I get that cannot start port is already used.

Fine, so I try to find that process and kill it. I use lsof to find pid which uses that port - but nothing. It is not intellij issue, because I can telnet to localhost 4232, so something uses that port.

Could you tell me how can I debug it? I know that reboot is a solution but it is not a preferred solution.

I found many posts with similar questions but nothing helps - I just cannot find what uses this port.

Passarinho
  • 69
  • 2
  • 13
  • hi @Passarinho, try following: 1. get the pid listening to your port. see https://stackoverflow.com/questions/4421633/who-is-listening-on-a-given-tcp-port-on-mac-os-x 2. in activity monitor look up appname for the pid Also use sudo to see processes owned by system – hce Aug 08 '20 at 12:59
  • Hi @hce, I cannot get the pid using these methods. This process is killed, but the port is still used. – Passarinho Aug 10 '20 at 11:19
  • hi @Passarinho, try >netstat -aon | grep "4232" with sudo rights. please post the result. also show your telnet localhost:4232 result. – hce Aug 17 '20 at 00:35

0 Answers0