You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConsulHeartbeatTask has this method call to agentCheckPass:
@Overridepublicvoidrun() {
TtlScheduler.this.client.agentCheckPass(this.checkId);
if (log.isDebugEnabled()) {
log.debug("Sending consul heartbeat for: " + this.checkId);
}
}
Which without a token, you'll see the following stack trace:
com.ecwid.consul.v1.OperationException: OperationException(statusCode=403, statusMessage='Forbidden', statusContent='Permission denied')
at com.ecwid.consul.v1.agent.AgentConsulClient.agentCheckPass(AgentConsulClient.java:211) ~[consul-api-1.4.1.jar:na]
at com.ecwid.consul.v1.agent.AgentConsulClient.agentCheckPass(AgentConsulClient.java:198) ~[consul-api-1.4.1.jar:na]
at com.ecwid.consul.v1.agent.AgentConsulClient.agentCheckPass(AgentConsulClient.java:193) ~[consul-api-1.4.1.jar:na]
at com.ecwid.consul.v1.ConsulClient.agentCheckPass(ConsulClient.java:259) ~[consul-api-1.4.1.jar:na]
at org.springframework.cloud.consul.discovery.TtlScheduler$ConsulHeartbeatTask.run(TtlScheduler.java:95) ~[spring-cloud-consul-discovery-2.1.1.RELEASE.jar:2.1.1.RELEASE]
Which can be overridden to pass a token too (can be null too):
@Overridepublicvoidrun() {
TtlScheduler.this.client.agentCheckPass(this.checkId, this.aclToken);
if (log.isDebugEnabled()) {
log.debug("Sending consul heartbeat for: " + this.checkId);
}
}
So any reason why i can't submit a simple PR to fix this (Ie am i missing something?)
The text was updated successfully, but these errors were encountered:
If heartbeat is enabled paired with acl tokens, then the heartbeat task does not configure the token to use when communicating with the consul server
ConsulHeartbeatTask has this method call to agentCheckPass:
Which without a token, you'll see the following stack trace:
Which can be overridden to pass a token too (can be null too):
So any reason why i can't submit a simple PR to fix this (Ie am i missing something?)
The text was updated successfully, but these errors were encountered: