Created 11-01-2017 11:06 AM
Hi,
I am using HDP 2.6. I need to use Jenkins for continuous integration. I am unable to install correctly.
I followed below steps
1. sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
2. sudo yum install jenkins
3. sudo service jenkins start
4. iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT -m comment --comment "Tomcat Server port
5. service iptables save
from my windows desktop if I browse this jenkins URL, http://localhost:8080/, It is not opening. It launches ambari.
What am I doing wrong? Please assist.
Created 11-01-2017 11:47 AM
Jenkins will by default run on port 8080. If you were using the default config , then the step 3 might have failed for you
You can check it by running
ps -ef | grep -i jenkins
I suggest you to change the port of jenkins and then restart jenkins. To change the port open "/etc/sysconfig/jenkins" and search for JENKINS_PORT. You should see that it is set to 8080. Change the port which doesn't conflict with other ports and restart the jenkins (ie run step 3).
Thanks,
Aditya
Created 11-02-2017 09:57 AM
@Aditya ,
As you told, I followed the below steps. But still I can not access the jenkins from my windows desktop.
1. Modified the port number to 8081
2. Restarted the jenkins service
3. iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT -m comment --comment "Tomcat Server port"
4. service iptables save
When I tried to access jenkins url- http://localhost:8081/, I am getting the below error message. Can you please look into this?
localhost refused to connect.
Created 11-02-2017 10:21 AM
Can you please check if jenkins is running. Can you give the output of below commands
ps -ef | grep -i jenkins<br>netstat -tupln | grep 8081
If the first command doesn't return any output. Then try changing to some random port 9099. I'm not really sure if port 8081 will be occupied by another process
Thanks,
Aditya
Created on 11-02-2017 10:30 AM - edited 08-18-2019 02:16 AM
@ Aditya,
Please find below the screen shot of the commands output.
Created 11-02-2017 10:34 AM
Looks like jenkins is running. Can you try with IP /hostname of the box instead of using localhost.
Created 01-07-2019 09:02 PM
In adittion, within my cluster, port was assigned to 9090, by getting the pid from above command I just ran
netstat -tuplen | grep <pid>
and I got the port where the UI is running
Created 11-02-2017 10:38 AM
Looks like you are running HDP Sandbox which will using port 8080 (as Port Forwarding address) for AmbariServer.
So either you will need to stop the Ambari Server on your Sandbox and then try again.
.
Also many times the browser caches the Ambari UI scripts (cached data) so even if we hit loalhost:8080 it will show the cached pages (even if the ambari server ) is not running. So please try the incognito mode.
.
However In Virtual Box you have option to configure Network Port Forwarding to Add new ports (Like 8081 for your Jenkins)
Please see thePort Forwarding
Section in the below link: