Jenkins not accessible with http://<hostname>:8080 in Windows server 2012

Viewed 22337

I have installed Jenkins in Windows server 2012 64-bit machine and want to make it available in internal network.

I have added --httpListenAddress to 0.0.0.0 and restarted Jenkins and tried to access it with http://hostname:8080 but no page shows up(though It showing Jenkins icon in URL bar). However http://localhost:8080 works fine.

enter image description here

Further I checked the firewall inbound rule for the Jenkins but seems it has no issues. enter image description here

I tried to catch the listening ports with "netstat -aon | find /i "8080" and found <host ip address>:8080 FIN_WAIT_2 which sign towards that the request is stuck(May be I am wrong).

I am clueless what exactly is blocking to use hostname with jenkins. Please share your solution if you already fixed this issue.

3 Answers

You might try adding a Windows Firewall rule. Go to Windows Firewall, Advanced Configuration, Inbound Rules rule and create an Allow rule for the specific version of java.exe you have installed.

This worked for us with the drawback that every time you upgrade Java, you must also modify the firewall rule. This is because Java creates a new subfolder for every version. We've tried using %JAVA_HOME% in firewall rules but it doesn't seem to work. We were on Windows Server 2012R2 at the time.

Similar answer here: https://stackoverflow.com/a/17479566/7752

You cannot access from outside the machine because Jenkins Service does not have credentials to use that machine, only from localhost is accessible.

This is how to enter the credentials in Jenkins service.

  1. In the Windows search bar, type services then enter.
  2. Then scroll down to Jenkins and double-click on it.
  3. In Jenkins Properties, select the tab "Log On".
  4. Select Check box "This account"
  5. Update your username and password.

Voila! Now Jenkins web can connect to the Jenkins machine via Jenkins service.

Related