0

I got a port id(8080) already in use error when try to host a app.

tried the below to know which service uses the port 8080

> netstat -aon | findstr 8080   
TCP    0.0.0.0:8080           0.0.0.0:0  LISTENING       7812   
TCP    [::]:8080              [::]:0            LISTENING       7812

> tasklist /fi "pid eq 7812"

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
java.exe                      7812 Services                   0    119,352 K

>tasklist /svc /fi "pid eq 7812"

Image Name                     PID Services
========================= ======== ============================================
java.exe                      7812 N/A

from the above, just got the info abt the imagename which is java.exe. but not specific about the service.

mean time, just tried localhost:8080, that opens jenkins login page. Came to know, its jenkins that runs on 8080.

wondering, how can i find from the command prompt, which app/service(in this case its jenkins) is running on 8080?

interestingly, when i try filter by service name it shows its bind with different pid. Pls tell me why it shows a different Pid.

>tasklist /svc /fi "services eq jenkins*"

Image Name                     PID Services
========================= ======== ============================================
jenkins.exe                   4488 Jenkins
2
  • java.exe cannot act as a Windows Service. It does not fullfil the required interfaces.
    – Daniel B
    Commented Apr 10, 2020 at 11:55
  • 1
    The PS command: Get-Process -Id (Get-NetTCPConnection -LocalPort 8080 -State Listen).OwningProcess | select * might be helpful. Commented Apr 10, 2020 at 13:56

0

You must log in to answer this question.

Browse other questions tagged .