简体   繁体   中英

Jenkins installation on Ubuntu using Vagrant - NO HTTP access

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:

  1. Install Vagrant and Virtual Box on MAC
  2. Create a folder for the vagrant
  3. vagrant init bento/ubuntu-16.04
  4. nano Vagrantfile - delete the hasztag from the port forwarding to 8080
  5. Vagrant up
  6. Vagrant ssh

Install git:

  1. Sudo apt-get install git
  2. Git --version

Installing Java:

  1. sudo apt update
  2. Sudo apt-get upgrade
  3. sudo apt install default-jdk
  4. sudo apt install default-jre

Install Jenkins:

  1. wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -

  2. sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'

  3. sudo apt-get install -y jenkins --allow-unauthenticated

  4. To check the password: vi /var/log/jenkins/jenkins.log

  5. 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM