Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Can't access Jenkins running on EC2 instance from browser
Post Body

Hi everyone,

So I'm trying to install the Jenkins server on a running EC2 instance that was pre-created on AWS (CentOS-based environment).

I have conducted all the necessary steps in advance:

  • Downloaded and installed Jenkins (from the repository)
  • Created inbound and outbound rules (SSH, HTTP on port 80, HTTPS on port 443; TCP on port 8080) for both the Instance itself and Network ACLs
  • The Jenkins service is up and running

systemctl status jenkins
● jenkins.service - LSB: Jenkins Automation Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins; generated)
   Active: active (exited) since Thu 2022-01-13 13:01:08 UTC; 50min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1035 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4724)
   Memory: 0B
   CGroup: /system.slice/jenkins.service

Jan 13 13:01:05 ip-172-31-93-145.ec2.internal systemd[1]: Starting LSB: Jenkins Automation Server...
Jan 13 13:01:05 ip-172-31-93-145.ec2.internal runuser[1060]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Jan 13 13:01:08 ip-172-31-93-145.ec2.internal runuser[1060]: pam_unix(runuser:session): session closed for user jenkins
Jan 13 13:01:08 ip-172-31-93-145.ec2.internal jenkins[1035]: Starting Jenkins [  OK  ]
Jan 13 13:01:08 ip-172-31-93-145.ec2.internal systemd[1]: Started LSB: Jenkins Automation Server.

The only issue I am struggling with is accessing Jenkins via the Web (from my local browser) so I can finish the rest of the configuration process. I tried both the hostname and IP address on port 8080 but I am still getting the "This site can’t be reached" error.

https://preview.redd.it/j8m3175ulgb81.png?width=917&format=png&auto=webp&s=80f1e92dbb5863f9ade05f8a3ef66b77722b809b

Here is the output I have after running the netstat command:

netstat -apn | grep :
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1037/sshd           
tcp        0     36 172.31.93.145:22        178.221.182.72:37512    ESTABLISHED 1435/sshd: ec2-user 
tcp6       0      0 :::22                   :::*                    LISTEN      1037/sshd           
udp        0      0 127.0.0.1:323           0.0.0.0:*                           703/chronyd         
udp        0      0 172.31.93.145:68        172.31.80.1:67          ESTABLISHED 805/NetworkManager  
udp6       0      0 ::1:323                 :::*                                703/chronyd         
unix  2      [ ]         DGRAM                    27872    1435/sshd: ec2-user  
unix  2      [ ]         STREAM     CONNECTED     27506    1435/sshd: ec2-user  
unix  3      [ ]         STREAM     CONNECTED     27879    1435/sshd: ec2-user  
unix  2      [ ]         STREAM     CONNECTED     27526    1435/sshd: ec2-user  
unix  3      [ ]         STREAM     CONNECTED     27878    1449/sshd: ec2-user

Solutions I have tried so far:

firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --zone=public --add-service=jenkins --permanent
firewall-cmd --zone=public --add-source=172.31.93.145/20 --permanent
firewall-cmd --reload
firewall-cmd --list-all

Do you have any suggestions?

Author
Account Strength
100%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
37,306
Link Karma
15,102
Comment Karma
22,133
Profile updated: 1 day ago
Posts updated: 16 hours ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago