I am trying to implement consul-agent and proxy as sidecar container inside my ECS fargate service. So, inside the task, there will be 3 containers running:
- core-business-service-container
- consul-agent-container
- core-business-consul-proxy-container
All containers are up and running on ECS task. The node has registered in the consul UI as well. But, the service is not up in the consul UI.
I dig in and found the log of 'consul-agent-container', Here is the error log:
2021/03/12 03:33:14 [ERR] http: Request PUT /v1/agent/check/pass/greeting-fargate-proxy-ttl?note=, error: CheckID "greeting-fargate-proxy-ttl" does not have associated TTL from=127.0.0.1:43252
Here are the commands I used to connect consul.
- consul-agent-container:
"exec consul agent -ui -data-dir /consul/data -client="127.0.0.1" -bind="{{ GetPrivateIP }}" -retry-join "172.31.79.139""
- core-business-consul-proxy-container:
"exec consul connect proxy -register -service greeting-fargate -http-addr 127.0.0.1:8500 -listen 127.0.0.1:8080 -service-addr 127.0.0.1:3000"