Сбой раздела FILE с «Внутренней ошибкой сервера» для Proxmox - PullRequest
0 голосов
/ 20 ноября 2018

a был задан вопрос о проблемах traefik github год назад и закрыт (по-видимому, без правильного отслеживания, как предложено модом).Я не оператор из github, но сейчас я использую traefik и сталкиваюсь с точно такой же проблемой.

Я запускаю traefik из Docker, и он маршрутизирует все контейнеры с подстановочным сертификатом LE.Docker-машина - это виртуальная машина на узле Proxmox, и я хотел бы иметь возможность «перевернуть прокси» Proxmox так, как я использую его, когда я использовал nginx.

Всякий раз, когда я перехожу к нужному интерфейсу https://lab.my.domain, я получаю белую страницу с сообщением «Внутренняя ошибка сервера», и в консоли Chrome кажется, что это ошибка 500.

Моя система работает:

Traefik v1.7.4 
Docker  v18.06.1-ce 
Go      vgo1.10.4 
VM      Container Linux by CoreOS 1911.3.0 (Rhyolite) 
Kernel  v4.14.78-coreos

Моя конфигурация toml выглядит следующим образом:

logLevel = "DEBUG"
defaultEntryPoints = ["http", "https"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]
    minVersion = "VersionTLS12"
    cipherSuites = [
      "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
      "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
      "TLS_RSA_WITH_AES_128_GCM_SHA256",
      "TLS_RSA_WITH_AES_256_GCM_SHA384"
    ]
  [entryPoints.api]
    address=":8080"

[accessLog]
 filePath = "/etc/traefik/log/access.log"
 format = "json"
  [accessLog.filters]
    statusCodes = ["200", "300-302", "404", "500"]
    retryAttempts = true
    minDuration = "10ms"
  [accessLog.fields]
    defaultMode = "keep"
    [accessLog.fields.names]
      "ClientUsername" = "drop"
    [accessLog.fields.headers]
      defaultMode = "keep"
      [accessLog.fields.headers.names]
        "User-Agent" = "redact"
        "Authorization" = "drop"
        "Content-Type" = "keep"

[api]
  entryPoint = "api"
  dashboard = true
  debug = true
  [api.statistics]
    recentErrors = 10

[ping]
  entryPoint = "api"

[acme]
  email = "my@email.com"
  storage = "/etc/traefik/acme/acme.json"
  entryPoint = "https"
  acmeLogging = true 
  caServer = "https://acme-v02.api.letsencrypt.org/directory"
  onDemand = false #create certificate when container is created
  [acme.dnsChallenge]
    provider = "namecheap"
    delayBeforeCheck = 0
  [[acme.domains]]
    main = "*.my.domain"
    sans = ["my.domain"]

[docker]
  endpoint = "unix:///var/run/docker.sock"
  domain = "my.domain"
  watch = true
  exposedByDefault = false
  usebindportip = true

[file]
  [backends]
    [backends.backend-lab]
      [backends.backend-lab.servers]
        [backends.backend-lab.servers.server-lab2]
          url = "https://192.168.5.20:8006"
          weight = 1
        [backends.backend-lab.servers.server-lab1]
          url = "https://192.168.5.13:8006"
          weight = 2
  [frontends]
    [frontends.frontend-lab]
      entryPoints = ["http", "https"]
      backend = "backend-lab"
      passHostHeader = true
      [frontends.frontend-lab.routes]
        [frontends.frontend-lab.routes.route-lab]
          rule = "Host:lab.my.domain"
      [frontends.frontend-lab.auth]
        [frontends.frontend-lab.auth.forward]
          [frontends.frontend-lab.auth.forward.tls]
            insecureSkipVerify = true

[metrics]
  [metrics.prometheus]
    entryPoint = "api"
    buckets = [0.1,0.3,1.2,5.0]

РЕДАКТИРОВАТЬ (некоторые журналы отладки):

time="2018-11-20T15:39:49Z" level=debug msg="Creating route route-lab Host:lab.my.domain"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/roundrobin/rr: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/roundrobin/rr: Forwarding this request to URL" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}" ForwardURL="https://192.168.5.13:8006"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/forward: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"https\",\"Opaque\":\"\",\"User\":null,\"Host\":\"192.168.5.13:8006\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/forward/http: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"https\",\"Opaque\":\"\",\"User\":null,\"Host\":\"192.168.5.13:8006\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/forward/http: Round trip: https://192.168.5.13:8006, code: 500, Length: 21, duration: 191.843816ms tls:version: 303, tls:resume:false, tls:csuite:c02f, tls:server:lab.my.domain"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/forward/http: completed ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"https\",\"Opaque\":\"\",\"User\":null,\"Host\":\"192.168.5.13:8006\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/forward: completed ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"https\",\"Opaque\":\"\",\"User\":null,\"Host\":\"192.168.5.13:8006\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:48Z" level=debug msg="vulcand/oxy/roundrobin/rr: completed ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:51Z" level=debug msg="vulcand/oxy/roundrobin/rr: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:51Z" level=debug msg="vulcand/oxy/roundrobin/rr: Forwarding this request to URL" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}" ForwardURL="https://192.168.5.20:8006"
time="2018-11-20T15:43:51Z" level=debug msg="vulcand/oxy/forward: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"https\",\"Opaque\":\"\",\"User\":null,\"Host\":\"192.168.5.20:8006\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:51Z" level=debug msg="vulcand/oxy/forward/http: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"https\",\"Opaque\":\"\",\"User\":null,\"Host\":\"192.168.5.20:8006\",\"Path\":\"\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"text/html, application/xhtml+xml, image/jxr, */*\"],\"Accept-Encoding\":[\"gzip, deflate, br\"],\"Accept-Language\":[\"en-US\"],\"User-Agent\":[\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"lab.my.domain\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"68.173.55.60:50455\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2018-11-20T15:43:51Z" level=debug msg="vulcand/oxy/forward/http: Round trip: https://192.168.5.20:8006, code: 500, Length: 21, duration: 8.485916ms tls:version: 303, tls:resume:false, tls:csuite:c02f, tls:server:lab.my.domain"
...