I am trying to install a single consul node in openshift with a customized values.yaml for helm. I want a single bootstrapToken for all interactions with consul (no complex policies needed).
So I am creating the secret beforehand:
kubectl create secret generic master-token -n consul-ns --from-literal=‘token=supersecret’
My values.yml looks like:
global:
acls:
manageSystemACLs: true
bootstrapToken:
secretName: master-token
secretKey: token
enabled: false
datacenter: dev-itaag108-corporatehmb01
openshift:
enabled: true
server:
enabled: true
replicas: 1
bootstrap_expect: 1
storage: 1Gi
client:
enabled: false
dns:
enabled: false
ui:
enabled: true
tests:
enabled: false
When I install with helm, consul ui is available but at login time I am getting “Invalid token, The token entered does not exist. Please enter a valid token to log in.”
The pod consul-server-acl-init-gjbn7 keeps logging:
Failure: calling /agent/self to get datacenter: err=“Unexpected response code: 403 (ACL not found)”
The pod consul-server-0 keeps logging:
oc logs pod/dev-itaag108-corporatehmb01-consul-server-0 -n consul-ns
==> Starting Consul agent…
Version: ‘1.9.4’
Node ID: ‘9a46b178-823f-74b2-afe5-0136f533db1d’
Node name: ‘dev-itaag108-corporatehmb01-consul-server-0’
Datacenter: ‘dev-itaag108-corporatehmb01’ (Segment: ‘’)
Server: true (Bootstrap: true)
Client Addr: [0.0.0.0] (HTTP: 8500, HTTPS: -1, gRPC: -1, DNS: 8600)
Cluster Addr: 10.128.2.40 (LAN: 8301, WAN: 8302)
Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false
==> Log data will now stream in as it occurs:
2021-05-28T13:20:48.608Z [WARN] agent: BootstrapExpect is set to 1; this is the same as Bootstrap mode.
2021-05-28T13:20:48.608Z [WARN] agent: bootstrap = true: do not enable unless necessary
2021-05-28T13:20:48.805Z [WARN] agent.auto_config: BootstrapExpect is set to 1; this is the same as Bootstrap mode.
2021-05-28T13:20:48.805Z [WARN] agent.auto_config: bootstrap = true: do not enable unless necessary
2021-05-28T13:20:48.827Z [INFO] agent.server.raft: initial configuration: index=1 servers="[{Suffrage:Voter ID:9a46b178-823f-74b2-afe5-0136f533db1d Address:10.12
8.2.40:8300}]"
2021-05-28T13:20:48.827Z [INFO] agent.server.raft: entering follower state: follower=“Node at 10.128.2.40:8300 [Follower]” leader=
2021-05-28T13:20:48.828Z [INFO] agent.server.serf.wan: serf: EventMemberJoin: dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108-corporatehmb01 10.128.2.40
2021-05-28T13:20:48.904Z [INFO] agent.server.serf.lan: serf: EventMemberJoin: dev-itaag108-corporatehmb01-consul-server-0 10.128.2.40
2021-05-28T13:20:48.904Z [INFO] agent.router: Initializing LAN area manager
2021-05-28T13:20:48.904Z [INFO] agent: Started DNS server: address=0.0.0.0:8600 network=udp
2021-05-28T13:20:48.904Z [INFO] agent.server: Handled event for server in area: event=member-join server=dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108
-corporatehmb01 area=wan
2021-05-28T13:20:48.905Z [INFO] agent: Started DNS server: address=0.0.0.0:8600 network=tcp
2021-05-28T13:20:48.907Z [INFO] agent: Starting server: address=[::]:8500 network=tcp protocol=http
2021-05-28T13:20:48.907Z [WARN] agent: DEPRECATED Backwards compatibility with pre-1.9 metrics enabled. These metrics will be removed in a future version of Cons
ul. Set telemetry { disable_compat_1.9 = true }
to disable them.
2021-05-28T13:20:49.003Z [INFO] agent.server: Adding LAN server: server=“dev-itaag108-corporatehmb01-consul-server-0 (Addr: tcp/10.128.2.40:8300) (DC: dev-itaag1
08-corporatehmb01)”
2021-05-28T13:20:49.003Z [INFO] agent: Retry join is supported for the following discovery methods: cluster=LAN discovery_methods=“aliyun aws azure digitalocean
gce k8s linode mdns os packet scaleway softlayer tencentcloud triton vsphere”
2021-05-28T13:20:49.003Z [INFO] agent: Joining cluster…: cluster=LAN
2021-05-28T13:20:49.003Z [INFO] agent: (LAN) joining: lan_addresses=[dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108-corporatehmb01-consul-server.consul
-ns.svc:8301]
2021-05-28T13:20:49.003Z [INFO] agent: started state syncer
==> Consul agent running!
2021-05-28T13:20:49.305Z [WARN] agent.server.memberlist.lan: memberlist: Failed to resolve dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108-corporatehmb0
1-consul-server.consul-ns.svc:8301: lookup dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108-corporatehmb01-consul-server.consul-ns.svc on 172.30.0.10:53: no s
uch host
2021-05-28T13:20:49.305Z [WARN] agent: (LAN) couldn’t join: number_of_nodes=0 error="1 error occurred:
- Failed to resolve dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108-corporatehmb01-consul-server.consul-ns.svc:8301: lookup dev-itaag108-corporatehmb
01-consul-server-0.dev-itaag108-corporatehmb01-consul-server.consul-ns.svc on 172.30.0.10:53: no such host
"
2021-05-28T13:20:49.305Z [WARN] agent: Join cluster failed, will retry: cluster=LAN retry_interval=30s error=
2021-05-28T13:20:51.040Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:52.041Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:53.041Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:54.044Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:55.046Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:56.046Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:56.254Z [ERROR] agent.anti_entropy: failed to sync remote state: error=“No cluster leader”
2021-05-28T13:20:57.047Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:58.048Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:58.387Z [WARN] agent.server.raft: heartbeat timeout reached, starting election: last-leader=
2021-05-28T13:20:58.387Z [INFO] agent.server.raft: entering candidate state: node=“Node at 10.128.2.40:8300 [Candidate]” term=2
2021-05-28T13:20:58.395Z [INFO] agent.server.raft: election won: tally=1
2021-05-28T13:20:58.395Z [INFO] agent.server.raft: entering leader state: leader=“Node at 10.128.2.40:8300 [Leader]”
2021-05-28T13:20:58.395Z [INFO] agent.server: cluster leadership acquired
2021-05-28T13:20:58.395Z [INFO] agent.server: New leader elected: payload=dev-itaag108-corporatehmb01-consul-server-0
2021-05-28T13:20:58.399Z [INFO] agent.server: initializing acls
2021-05-28T13:20:58.402Z [INFO] agent.server: Created ACL ‘global-management’ policy
2021-05-28T13:20:58.408Z [INFO] agent.server: Created ACL anonymous token from configuration
2021-05-28T13:20:58.408Z [INFO] agent.leader: started routine: routine=“legacy ACL token upgrade”
2021-05-28T13:20:58.408Z [INFO] agent.leader: started routine: routine=“acl token reaping”
2021-05-28T13:20:58.408Z [INFO] agent.server.serf.lan: serf: EventMemberUpdate: dev-itaag108-corporatehmb01-consul-server-0
2021-05-28T13:20:58.408Z [INFO] agent.server.serf.wan: serf: EventMemberUpdate: dev-itaag108-corporatehmb01-consul-server-0.dev-itaag108-corporatehmb01
2021-05-28T13:20:58.408Z [INFO] agent.server: Updating LAN server: server=“dev-itaag108-corporatehmb01-consul-server-0 (Addr: tcp/10.128.2.40:8300) (DC: dev-itaa
g108-corporatehmb01)”
2021-05-28T13:20:58.408Z [INFO] agent.server: Handled event for server in area: event=member-update server=dev-itaag108-corporatehmb01-consul-server-0.dev-itaag1
08-corporatehmb01 area=wan
2021-05-28T13:20:58.417Z [INFO] agent.leader: started routine: routine=“federation state anti-entropy”
2021-05-28T13:20:58.418Z [INFO] agent.leader: started routine: routine=“federation state pruning”
2021-05-28T13:20:58.522Z [INFO] agent.server.connect: initialized primary datacenter CA with provider: provider=consul
2021-05-28T13:20:58.522Z [INFO] agent.leader: started routine: routine=“intermediate cert renew watch”
2021-05-28T13:20:58.522Z [INFO] agent.leader: started routine: routine=“CA root pruning”
2021-05-28T13:20:58.528Z [INFO] agent.server: member joined, marking health alive: member=dev-itaag108-corporatehmb01-consul-server-0
2021-05-28T13:20:58.556Z [INFO] agent.server: federation state anti-entropy synced
2021-05-28T13:20:59.049Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:20:59.777Z [WARN] agent: Node info update blocked by ACLs: node=9a46b178-823f-74b2-afe5-0136f533db1d accessorID=00000000-0000-0000-0000-00000000000
2
2021-05-28T13:21:00.051Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:21:01.051Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:21:02.053Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
2021-05-28T13:21:03.054Z [ERROR] agent.http: Request error: method=GET url=/v1/agent/self from=10.128.2.38:52188 error=“ACL not found”
Any idea?