Jenkins won't start: Failed to listen on port 8080
Solution 1:
Fixed - for anyone else who might have this problem in future. I used this Techrepublic article, which boils down to
netstat -a -n -o | grep "8080"
to find out how to find out which process was using port 8080 and then killed it in Task Manager and then restarted Jenkins and all was well (so far!).
Solution 2:
To start Jenkins on WinStone container(default container bundled with Jenkins war) use the following command:
java -jar jenkins.war --ajp13Port=-1 --httpPort=9090
Also, to check if a certain port is being used by any application use in Windows:
netstat -ano | find "9090"
Its better to run Jenkins on Tomcat.
Solution 3:
As in Error Stack Trace it is mentioned that port 8080 is already in use, Check where port 8080 is used or as alternative change the Jenkins Port in Jenkins.xml to some other aviable port.
Solution 4:
putting this here in case it helps someone --I had the same initial problem - port 8080 blocked.
If you can believe this --windows store was running on port 8080 and blocking my Jenkins port. grrr!
Steps to remedy:
1) used @HenryHey's answer above to find the PID: netstat -a -n -o | grep "8080"
2) used sysinternals proc explorer to find what program was registered to the PID
3) used the following command (found article by @Joy-Qiao - thanks) to remove windows store app (use powershell): Get-AppxPackage windowsstore | Remove-AppxPackage
Note: this was a rather drastic approach to clearing port 8080 - a better option would be to just move Jenkins to another port but I was feeling a bit draconic.