Hello @lkysow I was earlier using the older release of consul. I updated to latest (0.32.0), and have made some further progress.
helm install consul hashicorp/consul --version 0.32.0 -f config.yaml
#config.yaml
global:
name: consul
connectInject:
enabled: true
default: true
metrics:
defaultEnableMerging: true
controller:
enabled: true
ui:
enabled: true
metrics_provider: prometheus
metrics_proxy:
base_url: "http://prometheus-server"
prometheus:
enabled: true
The request from the ServiceRouter is reaching the destination as shown by the logs of the envoy-sidecar container of the destination.
[2021-06-29 15:43:22.477][13][debug][http] [source/common/http/conn_manager_impl.cc:261] [C15] new stream
[2021-06-29 15:43:22.477][13][debug][http] [source/common/http/conn_manager_impl.cc:882] [C15][S744548391255673329] request headers complete (end_stream=false):
':authority', 'localhost:1234'
':path', '/login'
':method', 'POST'
'user-agent', 'curl/7.52.1'
'accept', '*/*'
'content-type', 'application/json'
'content-length', '48'
'x-forwarded-proto', 'http'
'x-request-id', '4e82bcc1-8601-47b4-87fe-92626b766d57'
'x-envoy-expected-rq-timeout-ms', '15000'
'x-envoy-original-path', '/iam/login'
[2021-06-29 15:43:22.477][13][debug][http] [source/common/http/filter_manager.cc:779] [C15][S744548391255673329] request end stream
[2021-06-29 15:43:22.477][13][debug][http] [source/common/http/filter_manager.cc:883] [C15][S744548391255673329] Sending local reply with details upstream_reset_before_response_started{connection failure}
[2021-06-29 15:43:22.477][13][debug][http] [source/common/http/conn_manager_impl.cc:1469] [C15][S744548391255673329] encoding headers via codec (end_stream=false):
':status', '503'
'content-length', '91'
'content-type', 'text/plain'
'date', 'Tue, 29 Jun 2021 15:43:22 GMT'
'server', 'envoy'
The status in response received by the sidecar container is 503 which is a problem.
One more critical observation is this log that the destination container pod generates at startup.
Running on http://0.0.0.0:8181
{ Error: connect ECONNREFUSED 18.216.238.224:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '18.216.238.224',
port: 443 }
The application runs on port 8181. I don’t know if the above error in application log is related to the side car proxies that get created due to connect-inject.
One more rather unrelated observation is in the consul-ui topology.
The expected flow is static-client → static-server → kc-wrap.
The additional kc-wrap on the left and static-client on the right seems to be misplaced. Any thing wrong in my configuration?