一千萬個為什麽

搜索

當嘗試使用jwilder/nginx嘗試rproxy jenkins時,如何解決“連接上遊時沒有上遊”的問題?



https://github.com/jwilder/nginx-proxy

nginx.1    | 2018/03/04 22:24:54 [error] 102#102: *276 no live upstreams
while connecting to upstream, client: 83.85.143.226, server:
jenkins.releasesoftwaremoreoften.com, request: "GET/HTTP/2.0", upstream:
"http://jenkins.releasesoftwaremoreoften.com/", host: 
"jenkins.releasesoftwaremoreoften.com"

docker-compose文件如下所示:

version: '3'
services:
  jenkins:
    image: jenkins/jenkins:lts
    environment:
      - VIRTUAL_HOST=jenkins.releasesoftwaremoreoften.com
      - VIRTUAL_PORT=8083
    ports:
      - 127.0.0.1:8083:8080
      - 127.0.0.1:50000:50000
    volumes:
      - /usr/local/jenkins/jenkins_home:/var/jenkins_home
    networks:
      - rproxy
      - jenkins

networks:
  jenkins:
  rproxy:
    external:
      name: rproxy

使其工作的另一個嘗試是將VIRTUAL_HOST更改為80,但這不起作用。

導航到 http://jenkins.releasesoftwaremoreoften.com/ 會返回502。

轉載註明原文: 當嘗試使用jwilder/nginx嘗試rproxy jenkins時,如何解決“連接上遊時沒有上遊”的問題?

一共有 2 個回答:

VIRTUAL_HOST意味著指向內部端口,在您的情況下它應該是8080而不是8083

花了很多時間後,我決定不繼續使用這種方法,並決定使用Jenkins掌舵。