0

I tried bind nc on port 41120, but it said port has already been used. So I want to find out which process binded this port and if I can kill it. I executed netstat  -taupen| grep  41120 and it shows below:

**tcp        0      0 10.70.66.109:41120      0.0.0.0:*               LISTEN      1001       926754931   -**

Then I tried use ss command, it shows below:

sudo ss --tcp --listening --processes 'sport = 41120'
State       Recv-Q Send-Q                                                                                                       Local Address:Port                                                                                                           Peer Address:Port

So I tried execute lsof -ni | grep 41120 command, nothing displaied.
And I tried rpcinfo it shows like below:

sudo rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  39131  status
    100024    1   tcp  51145  status

It seems not help.
How can I confirm which process using port 41120?
Thank you in advance!

fajin yu
  • 195
  • 3
  • 10
  • Try to telnet on 41120. Sometimes services may output some messages when connecting to their listening port through telnet. – Krackout Sep 15 '20 at 06:15
  • @Krackout Thanks for your comment! I tried telnet this port and I found it is my program, but I has been killed it last night. And I can't found by `ps` with grep name. – fajin yu Sep 15 '20 at 07:07

0 Answers0