Unable to access Jenkins server
EDIT 2
If running Jenkins on an Amazon EC2 instance, try setting HTTP_HOST
to 0.0.0.0
. You may not be able to bind the public interface IP directly.
EDIT 1
Check /etc/default/jenkins
instead if you installed directly from the .deb
package.
It appears Jenkins is listening on localhost (--httpListenAddress=127.0.0.1
). In this configuration, Jenkins is not listening for connections from the network interface.
To resolve for Ubuntu, check the contents of /etc/init/jenkins.conf
and append --httpListenAddress=x.x.x.x
to JENKINS_ARGS
(where x.x.x.x
is the server's external IP address).
Related videos on Youtube
Josef van Niekerk
With nearly 14 years of experience in software development and eCommerce, I am utterly infatuated with technology. I eat challenge for breakfast, and like to make technological problems disappear. I am a strong team player, take constructive criticism extremely well. I have a strong belief, that to become better, we have to be around people that are more experienced than oneself. My favorite time spent at work is building and coding cutting edge interactive UI's that makes any system fun and easy to use, and is where my ability to think creatively and logically comes in very handy. My main life ingredient includes learning, and therefore enjoy constantly enriching my skills by taking online courses, watching endless hours of videos, and tinkering with whatever I can get my hands on. I enjoy doing carpentry, home DIY and tinkering with an Arduino and some electronics.
Updated on September 18, 2022Comments
-
Josef van Niekerk almost 2 years
I'm trying to install Jenkins on my web server, which is an Ubuntu 13.10 server running on an Amazon EC2 instance. I've restarted Jenkins using
sudo /etc/init.d/jenkins restart
When I check my processes with
ps aux | grep jenkins
I can see multiple items running with the following descriptions:
jenkins 22356 0.0 0.0 20268 400 ? S 10:10 0:00 /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1 --ajp13ListenAddress=127.0.0.1 --preferredClassLoader=java.net.URLClassLoader jenkins 22358 5.9 5.7 1618372 97376 ? Sl 10:10 0:17 /usr/bin/java -jar /usr/share/jenkins/jenkins.war --webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1 --httpListenAddress=127.0.0.1 --ajp13ListenAddress=127.0.0.1 --preferredClassLoader=java.net.URLClassLoader
The server doesn't want to allow me to access this installation, so if I visit
x.x.x.x:8080
I just get a "Oops! Google Chrome could not connect" page, not even a HTTP status 404 / 500.
I tried checking /var/log/jenkins/jenkins.log, but it doesn't indicate any problems. Here's the log output after restarting:
Running from: /usr/share/jenkins/jenkins.war Dec 02, 2013 10:10:07 AM winstone.Logger logInternal INFO: Beginning extraction from war file Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME") Dec 02, 2013 10:10:13 AM winstone.Logger logInternal INFO: HTTP Listener started: port=8080 Dec 02, 2013 10:10:13 AM winstone.Logger logInternal INFO: Winstone Servlet Engine v0.9.10 running: controlPort=disabled Dec 02, 2013 10:10:14 AM jenkins.InitReactorRunner$1 onAttained INFO: Started initialization Dec 02, 2013 10:10:14 AM jenkins.InitReactorRunner$1 onAttained INFO: Listed all plugins Dec 02, 2013 10:10:14 AM jenkins.InitReactorRunner$1 onAttained INFO: Prepared all plugins Dec 02, 2013 10:10:14 AM jenkins.InitReactorRunner$1 onAttained INFO: Started all plugins Dec 02, 2013 10:10:14 AM jenkins.InitReactorRunner$1 onAttained INFO: Augmented all extensions Dec 02, 2013 10:10:22 AM jenkins.InitReactorRunner$1 onAttained INFO: Loaded all jobs Dec 02, 2013 10:10:23 AM jenkins.InitReactorRunner$1 onAttained INFO: Completed initialization Dec 02, 2013 10:10:23 AM hudson.TcpSlaveAgentListener <init> INFO: JNLP slave agent listener started on TCP port 43315 Dec 02, 2013 10:10:23 AM hudson.WebAppMain$2 run INFO: Jenkins is fully up and running
I was thinking I could be having a problem with EC2 security groups blocking the port, but my security group assigned to that server has got 8080 port opened for HTTP inbound.
Another check I tried was to SSH into the server, and use Lynx to see if Jenkins is actually serving content. I visited
http://localhost:8080
and it was showing the Jenkins page as expected.Any ideas?
-
Josef van Niekerk over 10 yearsCool, I changed HTTP_HOST to the correct IP address, but it causes SEVERE: Container startup failed, Failed to listen on port 8080 and Cannot assign requested address errors when restarting. :(
-
Josef van Niekerk over 10 yearsShould I try installing OpenJDK instead: stackoverflow.com/questions/14710095/…
-
plasmid87 over 10 yearsCould be EC2 networking weirdness. Try setting
HTTP_HOST
to0.0.0.0
, does that help? -
Josef van Niekerk over 10 yearsI tried 0.0.0.0 as well, but I'll give it another shot.