Skip to content

Jenkins not accessible on EC2 RHEL instance

0

Hello,

I have an instance EC2 installed with Jenkins but it’s not accessible. I have investigated almost everything within my understanding but seems i need more help to check this further.

Can someone please take a look and comment ?

Resource used -- https://www.jenkins.io/doc/tutorials/tutorial-for-installing-jenkins-on-AWS/

  1. Port 8080 listening on VM.

[root@RHEL-VM ~]# netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1338/sshd: /usr/sbi tcp6 0 0 :::80 :::* LISTEN 741/httpd tcp6 0 0 :::22 :::* LISTEN 1338/sshd: /usr/sbi tcp6 0 0 :::8080 :::* LISTEN 742/java udp 0 0 127.0.0.1:323 0.0.0.0:* 658/chronyd udp6 0 0 ::1:323 :::* 658/chronyd

  1. Below is the security group inbound rule,

Enter image description here

  1. Jenkins service already running,

[root@RHEL-VM ~]# systemctl status jenkins ● jenkins.service - Jenkins Continuous Integration Server Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; preset: disabled) Active: active (running) since Tue 2025-05-13 11:02:45 IST; 28min ago Main PID: 3492 (java) Tasks: 48 (limit: 48629) Memory: 546.7M CPU: 27.307s CGroup: /system.slice/jenkins.service └─3492 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/w>

May 13 11:02:43 RHEL-VM jenkins[3492]: 2025-05-13 05:32:43.988+0000 [id=30] INFO h.p.b.g.GlobalTimeOutConfig> May 13 11:02:44 RHEL-VM jenkins[3492]: 2025-05-13 05:32:44.049+0000 [id=30] WARNING o.j.p.d.DockerBuilder$De> May 13 11:02:44 RHEL-VM jenkins[3492]: 2025-05-13 05:32:44.515+0000 [id=29] INFO jenkins.InitReactorRunner$1> May 13 11:02:45 RHEL-VM jenkins[3492]: 2025-05-13 05:32:45.146+0000 [id=29] INFO jenkins.InitReactorRunner$1> May 13 11:02:45 RHEL-VM jenkins[3492]: 2025-05-13 05:32:45.278+0000 [id=32] INFO jenkins.InitReactorRunner$1> May 13 11:02:45 RHEL-VM jenkins[3492]: 2025-05-13 05:32:45.279+0000 [id=31] INFO jenkins.InitReactorRunner$1> May 13 11:02:45 RHEL-VM jenkins[3492]: 2025-05-13 05:32:45.287+0000 [id=30] INFO jenkins.InitReactorRunner$1> May 13 11:02:45 RHEL-VM jenkins[3492]: 2025-05-13 05:32:45.374+0000 [id=30] INFO jenkins.InitReactorRunner$1> May 13 11:02:45 RHEL-VM jenkins[3492]: 2025-05-13 05:32:45.414+0000 [id=23] INFO hudson.lifecycle.Lifecycle#> May 13 11:02:45 RHEL-VM systemd[1]: Started Jenkins Continuous Integration Server.

  1. Below are subnet settings on AWS console.

Routes (2)

1

Destination

Target

172.31.0.0/16 local 0.0.0.0/0 igw-0b809f73f4317e895

Thanks, Piyush

  • What error are you seeing? The troubleshooting will be very different for a Timeout (which implies likely a connectivity issue) vs something else like Connection Refused (which implies application/OS config issues)

asked 2 months ago32 views
1 Answer
0

Based on the information provided, it appears that your Jenkins installation on the EC2 RHEL instance is running correctly, but there might be a few reasons why it's not accessible:

  1. Security Group Configuration: While you've shown that port 8080 is open in the security group, make sure that the source IP range is set correctly. If it's not set to 0.0.0.0/0 (allow from anywhere) or your specific IP address, you won't be able to access it.

  2. Network ACLs: Check if there are any Network ACLs associated with your subnet that might be blocking incoming traffic on port 8080.

  3. Public IP Address: Ensure that your EC2 instance has a public IP address assigned to it. If it doesn't, you won't be able to access it from the internet.

  4. Firewall on the EC2 Instance: The RHEL instance might have its own firewall (like iptables or firewalld) that's blocking incoming connections. You may need to configure it to allow traffic on port 8080.

  5. Jenkins Configuration: Verify that Jenkins is configured to listen on all interfaces (0.0.0.0) rather than just localhost.

  6. VPC and Subnet Configuration: Your subnet seems to have a route to an Internet Gateway, which is good. Make sure the subnet is a public subnet and that the VPC has DNS hostnames and DNS resolution enabled.

To troubleshoot:

  1. Try accessing Jenkins using the instance's private IP address from within the same VPC.
  2. Check Jenkins log files for any error messages or warnings.
  3. Use network diagnostic tools to verify connectivity to port 8080.
  4. If possible, try accessing the instance using AWS Systems Manager Session Manager to rule out network-related issues.

If none of these steps resolve the issue, you might want to consider stopping and starting the instance (which will change its public IP if you're not using an Elastic IP) or contacting AWS support for more in-depth assistance.
Sources
Not able to run jenkins on AWS EC2 instance | AWS re:Post
Behavior of ec2 on port 8080 | AWS re:Post
I can't connect to my EC2 instance | AWS re:Post

answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.