我正在尝试在consul作为键/值存储的docker上部署traefik堆栈。我的集群由三个节点(三个主节点)组成:
遵循此文档,traefik非常适合docker swarm https://docs.traefik.io/user-guide/cluster-docker-consul/ 证书已创建,我也可以路由到其他服务。完全没有问题。 但是在领事中,我找不到任何键值,并且它是空的,如下所示。 当我单击如下所示的docker选项时,我可以看到列出的所有服务。
请告诉我如何在领事中获取价值。
以下是领事的日志
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] serf: EventMemberJoin: 636badc2c448 10.0.9.127
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/05 10:54:36 [INFO] raft: Node at 10.0.5.7:8300 [Leader] entering Leader state
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/05 10:54:36 [INFO] consul: cluster leadership acquired
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/05 10:54:36 [INFO] consul: New leader elected: 053068134e4b
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] consul: Handled member-join event for server "636badc2c448.us_east2" in area "wan"
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] consul: Adding LAN server 636badc2c448 (Addr: tcp/10.0.9.127:8300) (DC: us_east2)
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/05 10:54:36 [INFO] consul: member '053068134e4b' joined, marking health alive
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] agent: Started DNS server 10.0.9.127:8600 (udp)
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] agent: Started DNS server 10.0.9.127:8600 (tcp)
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/05 10:54:37 [INFO] agent: Synced node info
traefik_consul.1.vx3sp9vvv5zc@example2200 | ==> Failed to check for updates: Get https://checkpoint-api.hashicorp.com/v1/check/consul?arch=amd64&os=linux&signature=40feeaea-1ebd-e2a2-009d-312ad3acd2aa&version=1.4.0: dial tcp: lookup checkpoint-api.hashicorp.com on 127.0.0.11:53: no such host
traefik_consul.1.vx3sp9vvv5zc@example2200 | ==> Failed to check for updates: Get https://checkpoint-api.hashicorp.com/v1/check/consul?arch=amd64&os=linux&signature=40feeaea-1ebd-e2a2-009d-312ad3acd2aa&version=1.4.0: dial tcp: lookup checkpoint-api.hashicorp.com on 127.0.0.11:53: no such host
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] agent: Started HTTP server on 10.0.9.127:8500 (tcp)
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: Caught signal: terminated
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:28:58 [INFO] agent: started state syncer
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:06 [ERR] agent: failed to sync remote state: No cluster leader
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: Graceful shutdown disabled. Exiting
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [WARN] raft: Heartbeat timeout from "" reached, starting election
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: Requesting shutdown
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] consul: shutting down server
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [INFO] raft: Node at 10.0.9.127:8300 [Candidate] entering Candidate state in term 2
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [WARN] serf: Shutdown without a Leave
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [WARN] serf: Shutdown without a Leave
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [INFO] raft: Election won. Tally: 1
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] manager: shutting down
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [INFO] raft: Node at 10.0.9.127:8300 [Leader] entering Leader state
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: consul server down
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: shutdown complete
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [INFO] consul: cluster leadership acquired
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: Stopping DNS server 10.0.5.7:8600 (tcp)
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [INFO] consul: New leader elected: 636badc2c448
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:07 [INFO] consul: member '636badc2c448' joined, marking health alive
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: Stopping DNS server 10.0.5.7:8600 (udp)
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:47 [INFO] agent: Stopping HTTP server 10.0.5.7:8500 (tcp)
traefik_consul.1.q7egi9lzz6e9@example2199 | 2018/12/07 09:29:08 [INFO] agent: Synced node info
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:48 [WARN] agent: Timeout stopping HTTP server 10.0.5.7:8500 (tcp)
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:48 [INFO] agent: Waiting for endpoints to shut down
traefik_consul.1.q7egi9lzz6e9@example2199 | ==> Failed to check for updates: Get https://checkpoint-api.hashicorp.com/v1/check/consul?arch=amd64&os=linux&signature=6568c199-30b7-ba60-5c35-470a72c434ba&version=1.4.0: dial tcp: lookup checkpoint-api.hashicorp.com on 127.0.0.11:53: no such host
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:48 [INFO] agent: Endpoints down
traefik_consul.1.vx3sp9vvv5zc@example2200 | 2018/12/07 09:28:48 [INFO] agent: Exit code: 1