Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question
1  
Perhaps Jenkins is only listening on localhost. –  EEAA Jul 17 '12 at 22:20

5 Answers 5

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

share|improve this answer

Add JENKINS_ARGS

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

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

share|improve this answer
    
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

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

sudo ufw allow 8080

share|improve this answer

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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