Reputation: 49
I've tried setting up jenkins on some free-tier ec2 instances (I've tried ubuntu based and Amazon's own AMI) and despite jenkins running properly I can't access it on port 8080 using browser no matter what I try.
I've check that jenkins is running both by running sudo service jenkins status and by running curl localhost:8080 once I'm ssh'd in.
I've tried all the answers to similar questions on the web but nothing has worked. I've set up my security group exactly as all guides online state for installing jenkins on ec2 , I even went really overboard and made it overly open - nothing! Note - I've not tried setting it up behind apache/nginx but I'm feeling I shouldn't have to out of the principle that it should work on 8080
UPDATE - I caved and tried to setup Nginx using this link https://markunsworth.com/2012/02/11/setting-up-a-jenkins-build-server-on-ec2/ . I get the standard nginx welcome screen - it doesn't serve up jenkins for me
Any help would be hugely appreciated
Upvotes: 4
Views: 15581
Reputation: 31
I have faced similar issue in the Windows Ec2. Configured the inbound Security group and setup Custom TCP >> Protocol: TCP >> Port Range: 8080>>Source: Custom 0.0.0.0/0 . Accessed URL from browser http://url:8080, couldn't access the Jenkins.
Later in Ec2 under Control Panel\System and Security\Windows Defender Firewall >> Advanced Setting Configured the New Inbound rules for 8080 port resolved the issue.
Upvotes: 1
Reputation: 1
Visit https://www.jenkins.io/doc/tutorials/tutorial-for-installing-jenkins-on-AWS/
Follow the steps to create under Creating a security group
Then follow 5th step under Launching an Amazon EC2 instance
If you have already created the instance then click on that instace from instances dashboard then open Action dropdown -> Security -> Change security groups
Remove the default security group from the Security groups associated table this enables "Add security group" button
Then search for the newly created security group and select it. Then click on save button.
you should be able to access jenkins from http://<your_EC2_public_DNS>:8080
Upvotes: 0
Reputation: 1
In my case none of above solutions helped and in the end it was just overlooked "s" in https://instance-url:8080
when I deleted it and used http://instance-url:8080 it worked
Upvotes: -1
Reputation: 159
Go to the inbound tab of the Security group and do the below thing.
Type: Custom TCP
Protocol: TCP
Port Range: 8080
Source: Custom 0.0.0.0/0
Upvotes: 2
Reputation: 19
Anyone who is facing problem please make sure that your java path is correct in Windows firewall -> Inbound rule -> Jenkins right click and go to properties then program and services select your java path by browsing. I was allow to access from outside EC2 once I setup java path properly.
Upvotes: 0
Reputation: 696
I got same problem. To check if your Jenkins is running, you can try ps aux | grep jenkins
In my case, I was running Tomcat at port 8080, when I try that command, it shows nothing
Then I changed my Tomcat port and restart Jenkins by using
sudo systemctl stop jenkins
sudo systemctl start jenkins
and when I check Jenkins again, it was fine.
There, you can see that the port that Jenkins is using is 8080
. To change the port, you can try sudo vi /etc/sysconfig/jenkins
and look for JENKINS_PORT
If you config it right, you will see something like this
To summarize:
Upvotes: 0
Reputation: 21
Try this steps it work for me
sudo yum update –y
sudo wget -O /etc/yum.repos.d/jenkins.repo
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum upgrade
sudo yum install jenkins java-1.8.0-openjdk-devel -y
sudo systemctl daemon-reload
sudo systemctl start jenkins
sudo systemctl status jenkins
Upvotes: 1
Reputation: 23
Make sure open 8080 port on aws console, while accessing url from browser, by default it use https://* , try to access with http.
Upvotes: 0
Reputation: 5641
You need to open 8080 port in AWS.
Check this to do it: https://hayato-iriumi.net/2019/08/22/how-to-install-jenkins-on-aws/
After that you 're good to go by using the public IP of the EC2 and port 8080 :)
Upvotes: 5