【问题标题】:Jenkins installation on Ubuntu using Vagrant - NO HTTP access使用 Vagrant 在 Ubuntu 上安装 Jenkins - 无 HTTP 访问
【发布时间】:2021-02-18 16:44:17
【问题描述】:

我一直在尝试使用 Vagrant 在 ubuntu 上安装 Jenkins。即使一路上我没有收到任何错误,我也无法打开 http://localhost:8080

这是我的步骤:

  1. 在 MAC 上安装 Vagrant 和 Virtual Box
  2. 为流浪者创建一个文件夹
  3. vagrant init 便当/ubuntu-16.04
  4. nano Vagrantfile - 从转发到 8080 的端口中删除 hasztag
  5. 流浪起来
  6. 流浪ssh

安装 git:

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

安装 Java:

  1. sudo apt 更新
  2. 须藤 apt-get 升级
  3. sudo apt install default-jdk
  4. sudo apt install default-jre

安装 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. 查看密码:vi /var/log/jenkins/jenkins.log

  5. 启动 Jenkins:systemctl start jenkins systemctl 状态詹金斯

当我启动 jenkins 服务器时,我可以执行 telnet 127.0.0.1 8080 但是当我关闭它时它不起作用。知道为什么我无法使用浏览器访问 GUI 吗?

【问题讨论】:

    标签: linux ubuntu jenkins vagrant devops


    【解决方案1】:

    尝试在 ubuntu 中执行 "curl http://localhost:8080" ,如果响应不是一些错误代码页面,例如 4xx/5xx,请检查防火墙并允许端口 8080 上的流量。因此尝试从主机访问 Jenkins .

    【讨论】:

    • 谢谢。我对在 Vagrant 中运行的 Prometheus 有同样的问题。 vagrant 内部 ubuntu 的输出:vagrant@vagrant:~/prometheus-course$ curl localhost:9090 找到。我的 Mac 的输出: curl localhost:9090 curl: (7) 无法连接到 localhost 端口 9090:连接被拒绝
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多