Failure to test Jenkins installation port

Hi,

when running the Jenkins installer, there is a point, when the installer asks for an installation port. Makes sense, to mee. In addition, the installer provides the opportunity to test the availability of the requested port. Now, on my system, that test fails with the message below. Now, that failure is not my problem, but the following is:

The installer insists on a successful test. The “Next” button stays greyed out, and there is no possibility to go on. As a consequence, I cannot install Jenkins.

Any ideas for a workaround, or something like that?

Thanks,

Jochen

P.S: Before someone asks, the problem is not with permissions. Indeed, I launched the installer from a cmd prompt with administrator privileges. Same result.

That’s a very interesting error that I have never seen. What version of Windows are you trying to install on? Is this a machine that is on a domain? Can you give some more details on your environment? You are correct that the installer requires a successful bind to that port. The test is pretty simple, it just calls bind with “127.0.0.1” on that port and throws an error if that fails, so I am not sure where the error comes from specifically.

“Very interesting error” doesn’t sound good. My machine is a Windows 11 Laptop, running in my home network, so no domain, or anything like that. I can supply more information, if you have more specific requests.

Do you happen to have any firewall rules that match up with the port you are trying to use?

Turned out, that I had an old Jenkins installation running. After deinstalling that, everything worked fine.

Sorry,

Jochen

Hi,

This is a fairly common issue with the Jenkins Windows installer and it is usually caused by the port check being too strict rather than the port actually being unusable.

Why this happens

The installer’s “Test Port” step does a basic bind check but it will fail if:

  • Another process briefly holds the port (even system services or antivirus scans)

  • Windows firewall or security software blocks the bind test

  • The port is technically free but not immediately available for the installer’s check method

  • A previous Jenkins/service instance did not fully release the port

Workarounds you can try

1. Choose a different port (quickest fix)
Try something like:

  • 8081

  • 9090

  • 50000+ range ports

Even if 8080 is “free,” switching often bypasses the issue immediately.

2. Run installer as Administrator
Right-click → Run as Administrator
This fixes a lot of false port-test failures.

3. Temporarily disable firewall / antivirus (test only)
Some security tools block port binding checks even when the port is free.

  1. Check if something is already using the port**
    Run in CMD:
netstat -ano | findstr :8080

If something shows up, note the PID and stop it via Task Manager.


5. Use “custom installation path + service install later” approach
If the installer keeps blocking you:

  • Install Jenkins without service binding first (if option available)

  • Then configure port manually in jenkins.xml or jenkins.war run options

Key point

This is usually not a real port conflict it is the installer’s validation logic being overly strict.

If you want, tell me:

  • Which port you selected

  • Windows version

  • Whether antivirus/security tools are active

and I can help pinpoint the exact cause quickly.