Exception when running Jenkins on Windows Exception when running Jenkins on Windows jenkins jenkins

Exception when running Jenkins on Windows


Issue is solved by running jenkins with --ajp13Port=-1. It will disable listener of Apache JServ Protocol v1.3. You can also change port to unused one.

After running java -jar jenkins.war --ajp13Port=-1 --httpPort=8082 Jenkins started successfully and is accessible through http://localhost:8082/


I found that the most useful message was:

Caused by: java.io.IOException: Failed to listen on port 8009

As you probably know, this is the typical Apache JServ Protocol AJP Connector port.

Running netstat -ano I found that another process was listening on this port instead of Jenkins. In my case a colleague had installed YouTrack and that service had been started before Jenkins. This made Jenkins unhappy.

I stopped the YouTrack service, started Jenkins and then restarted YouTrack and everyone was happy.


update jenkins.xml to

<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war"  --ajp13Port=-1 --httpPort=8082</arguments>