Mohammad Ayan
Mohammad Ayan

Reputation: 9

cant access jenkins server from browser

i setup the jenkins server in ubuntu 18 in ec2 aws. this is the bash script i used.

#!/bin/bash
sudo apt update
sudo apt install openjdk-11-jdk -y
sudo apt install maven -y
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
  
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

sudo apt-get update
sudo apt-get install jenkins -y
###

for security group i set all traffic from anywhere. i am able to ssh to instance and check systemctl status jenkins. i shows running. but when i access jenkins by using pub ip with port :8080. i doest not load.

i tried removing and adding every rule to security group but nothing helped. also i am using default vpc. thank you

ss are below [inbound rules, jenkins status

Upvotes: 0

Views: 1002

Answers (3)

Poorna Chandra
Poorna Chandra

Reputation: 1

Hii try to reinstall Jenkins manually

Follow the Following steps to install Jenkins manually.

Installing Jenkins in Ubuntu

latest steps

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -

sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \/etc/apt/sources.list.d/jenkins.list'


sudo apt-get update

sudo apt-get install jenkins

Upvotes: -2

prem
prem

Reputation: 624

Check Jenkins running

ps aux | grep jenkins to check Jenkins running

In your case 8080 may be running for different application try to change that port in case 8080 occupied for different application and restart Jenkins it will work for sure!

Upvotes: 0

Allan Chua
Allan Chua

Reputation: 10185

It seems that your Jenkins server is running on a public EC2 instance and you can access it using the following link (I just tested this using both my home PC and mobile phone and I can see the Jenkins initialPassword screen)

enter image description here

http://YOUR_EC2_PUBLIC_IP:8080/

If you still cant access it from your work machine, then the failure to connect to it may be caused by some network filtering in your work network. Please try to access it on your mobile phone to test this theory.

Upvotes: 0

Related Questions