Traefik无法获得SSL证书

时间:2018-12-11 00:13:46

标签: docker ssl traefik toml

我遵循了本指南https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker/ 我启动了traefik,但在日志中却出现以下错误:

  

“无法获取域\“ mydomain.net \”的ACME证书:   无法为域[mydomain.net]生成证书:acme:   错误->一个或多个域出现问题:\ n [mydomain.net]错误   呈现令牌:cloudflare:创建TXT记录失败:错误来自   makeRequest:HTTP状态400:内容   \“ {\”成功\“:false,\”错误\“:[{\”代码\“:81057,\”消息\“:\”   记录已存在。\“}],\”消息\“:[],\”结果\“:空} \” \ n“,

     

“无法获得域\“ test.mydomain.net \”的ACME证书:   无法为域[test.mydomain.net]生成证书:   acme:错误->一个或多个域出现问题:\ n [test.mydomain.net]   呈现令牌时出错:cloudflare:创建TXT记录失败:错误   来自makeRequest:HTTP状态400:内容   \“ {\”成功\“:false,\”错误\“:[{\”代码\“:81057,\”消息\“:\”   记录已存在。\“}],\”消息\“:[],\”结果\“:空} \” \ n“

我正在为我的动态DNS使用Cloudflare,我的@ mydomain.net指向我的路由器IP。起初,我以为它无法在Cloudflare中创建txt记录,但我确实看到了TXT记录:_acme-challenge,正在创建中。我想念什么?

更新:因此,我想我离我越来越近了,没有得到上一个错误,这一次我得到了一个不同的错误,只要有人可以提供帮助。不知道发生了什么。

  level=error msg="Unable to obtain ACME certificate for domains \"*.mydomain.net\" : unable to generate a certificate for the domains [*.mydomain.net]: acme: Error -> One or more domains had a problem:\n[my domain.net] time limit exceeded: last error: dial udp: lookup (serverhostname). on 127.0.0.11:53: server misbehaving\n"

下面是我的Traefik.toml配置

#debug = true

logLevel = "ERROR" #DEBUG, INFO, WARN, ERROR, FATAL, PANIC
InsecureSkipVerify = true
defaultEntryPoints = ["https", "http"]

# WEB interface of Traefik - it will show web page with overview of frontend and backend configurations 
#[web]
#address = ":8080"
#  [web.auth.basic]
#  usersFile = "/shared/.htpasswd"

[api]
  entryPoint = "traefik"
  dashboard = true
  address = ":8080"
  usersFile = "/shared/.htpasswd"

# Force HTTPS
[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
#    [entryPoints.https.auth.basic]
#    usersFile = "/shared/.htpasswd"  
    [entryPoints.https.tls]

[file]
  directory = "/etc/traefik/rules/"
  watch = true

# Enable more detailed statistics.
[web.statistics]
# Number of recent errors logged.
recentErrors = 10

# Let's encrypt configuration
[acme]
email = "myemail address"
storage="/etc/traefik/acme/acme.json"
entryPoint = "https"
acmeLogging=true 
onDemand = false #create certificate when container is created
#onHostRule = true #disable for wildcard domains
# Use a HTTP-01 acme challenge rather than TLS-SNI-01 challenge
#[acme.httpChallenge] #does not work with wildcard domains, use dns challenge
#  entryPoint = "http" #does not work with wildcard domains
[acme.dnsChallenge]
  provider = "cloudflare"
  delayBeforeCheck = 0
[[acme.domains]]
   main = "mydomain.net"
[[acme.domains]]
   main = "*.mydomain.net"

# Connection to docker host system (docker.sock)
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "mydomain.net"
watch = true
# This will hide all docker containers that don't have explicitly  
# set label to "enable"
exposedbydefault = false

谢谢

0 个答案:

没有答案