I’ve been trying to install Jenkins on ubuntu using Vagrant. Even though I am not getting any errors along the way I am not able to open http://localhost:8080
Here’s my steps:
- Install Vagrant and Virtual Box on MAC
- Create a folder for the vagrant
- vagrant init bento/ubuntu-16.04
- nano Vagrantfile – delete the hasztag from the port forwarding to 8080
- Vagrant up
- Vagrant ssh
Install git:
- Sudo apt-get install git
- Git –version
Installing Java:
- sudo apt update
- Sudo apt-get upgrade
- sudo apt install default-jdk
- sudo apt install default-jre
Install Jenkins:
-
wget -q -O – http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add –
-
sudo sh -c ‘echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list’
-
sudo apt-get install -y jenkins –allow-unauthenticated
-
To check the password: vi /var/log/jenkins/jenkins.log
-
To start Jenkins: systemctl start jenkins
systemctl status jenkins
When I start the jenkins server I can do telnet 127.0.0.1 8080 but when I turn it off it doesn’t work. Any idea why I cannot access GUI using the browser?
2
Answers
Try in ubuntu to do "curl http://localhost:8080" , if response is not some error code page, like 4xx/5xx, check firewall and allow traffic on port 8080. Therefore try to access Jenkins from Host Machine.
Make sure you don’t have a service running on port 8080 on your guest machine.