5

I have installed Jenkins and opened port 8080 on Ubuntu 12.04 server but still can't access Jenkins remotely. Below is the procedures I took.

# Install Jenkins, enable UFW and open port 8080
sudo apt-get install jenkins
sudo ufw enable
sudo ufw allow 8080
sudo ufw reload

# Check the status
sudo ufw status
8080    ALLOW    Anywhere
8080    ALLOW    Anywhere (v6)

# Locally
curl -I localhost:8080
HTTP/1.1 200 OK
Server: Winstone Servlet Engine v0.9.10
...

# On an external machine
curl -I [ip]:8080
couldn't connect to host
  • 1
    Perhaps Jenkins is only listening on localhost. – EEAA Jul 17 '12 at 22:20
7

I ran into this issue which was resolved by editing jenkins config file

sudo vim /etc/default/jenkins

edit HTTP_HOST, default 127.0.0.1 to

HTTP_HOST=0.0.0.0

|improve this answer|||||
  • 3
    I don't even have HTTP_HOST in my file. How did you get it? – IgorGanapolsky Sep 19 '16 at 5:36
0

Add JENKINS_ARGS

JENKINS_ARGS="--prefix=/jenkins --httpListenAddress=YOUR_IP --ajp13ListenAddress=YOUR_IP"

on Centos/Redhat, you can find on /etc/sysconfig/jenkins.

|improve this answer|||||
  • 1
    On Ubuntu it's /etc/default/jenkins. – mgorven Jul 18 '12 at 4:41
  • Tried internal and external ip addresses and still nothing. When I add the ip args I can no longer access jenkins locally. – ezraspectre Jul 18 '12 at 19:51
  • I will probably end up setting up projects on my desktop installation and exporting them to the server installation -- is this the usually process -- im new to jenkins? – ezraspectre Jul 18 '12 at 19:59
  • after you add the JENKINS_ARGS, are you able to see the --httpListenAddress on your process list (ps aux|grep jenkins) ? or if you can find jenkins.war, just running it manually (java -jar jenkins.war -httpListenAddress=YOUR_IP) – chocripple Jul 19 '12 at 5:50
  • @Rikih -- yup its in the output for sudo ps aux | grep jenkins -- but still cant access jenkins remotely – ezraspectre Jul 19 '12 at 19:11
0

I recently ran into this issue which was resolved by adding 8080 port access to the uft firewall.

sudo ufw allow 8080

|improve this answer|||||
0

Check if apparmor is running on your Ubuntu , may be apparmor blocking it, if its running stop it.

|improve this answer|||||
0

What firewall are you using? If you are using iptables then run sudo iptables -L to see which ports are opened/blocked.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.