istio: 503 NC cluster_not_found Error for Service with SE
Is this the right place to submit this?
- This is not a security vulnerability or a crashing bug
- This is not a question about how to use Istio
Bug Description
With no changes made to istio config, we observed different behaviour on different days.
A request that was working on 2024-03-01 now returns 503 NC cluster_not_found error on 2024-03-04.
Before
[2024-03-01T18:09:47.423Z] "GET /auth/realms/master/.well-known/openid-configuration HTTP/1.1" 200 - via_upstream - "-" 0 6381 6 6 "-" "okhttp/4.11.0" "3f774d92e8c3a1e315b7753d4eda06f3" "keycloak-http.idp" "172.20.81.14:80" outbound|80||keycloak-http.idp.svc.cluster.local 10.5.7.134:57036 240.240.52.207:80 10.5.7.134:43558 - default
[2024-03-01T18:09:47.530Z] "POST /auth/realms/master/protocol/openid-connect/token HTTP/1.1" 200 - via_upstream - "-" 431 4068 25 24 "-" "okhttp/4.11.0" "3f774d92e8c3a1e315b7753d4eda06f3" "keycloak-http.idp" "172.20.81.14:80" outbound|80||keycloak-http.idp.svc.cluster.local 10.5.7.134:57036 240.240.52.207:80 10.5.7.134:43558 - default
[2024-03-01T18:09:47.720Z] "GET /auth/realms/master/protocol/openid-connect/certs HTTP/1.1" 200 - via_upstream - "-" 0 2973 6 5 "-" "okhttp/4.11.0" "3f774d92e8c3a1e315b7753d4eda06f3" "keycloak-http.idp" "172.20.81.14:80" outbound|80||keycloak-http.idp.svc.cluster.local 10.5.7.134:57036 240.240.52.207:80 10.5.7.134:43558 - default
After
[2024-03-04T07:54:21.766Z] "GET /auth/realms/master/.well-known/openid-configuration HTTP/1.1" 503 NC cluster_not_found - "-" 0 0 0 - "-" "okhttp/4.11.0" "143efeca5cf4fb2b8e71d36b0349bc16" "keycloak-http.idp" "-" - - 240.240.52.207:80 10.5.7.134:56060 - default
[2024-03-04T07:54:22.002Z] "GET /auth/realms/master/.well-known/openid-configuration HTTP/1.1" 503 NC cluster_not_found - "-" 0 0 0 - "-" "okhttp/4.11.0" "143efeca5cf4fb2b8e71d36b0349bc16" "keycloak-http.idp" "-" - - 240.240.52.207:80 10.5.7.134:56060 - default
[2024-03-04T07:54:22.077Z] "GET /auth/realms/master/.well-known/openid-configuration HTTP/1.1" 503 NC cluster_not_found - "-" 0 0 0 - "-" "okhttp/4.11.0" "143efeca5cf4fb2b8e71d36b0349bc16" "keycloak-http.idp" "-" - - 240.240.52.207:80 10.5.7.134:56060 - default
The only action that was taken was the cluster was scaled down to 0 nodes during the weekend and then scaled up again after.
Version
$ istioctl version
client version: 1.20.3
control plane version: 1.20.3
data plane version: 1.20.3 (23 proxies)
$ k version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.27.3
Kustomize Version: v5.0.1
Server Version: v1.27.9-eks-5e0fdde
$ helm version --short
v3.13.1+g3547a4b
Additional Information
Configuration
Istiod Config
accessLogFile: /dev/stdout
defaultConfig:
discoveryAddress: istiod-1-20-3.istio-system.svc:15012
holdApplicationUntilProxyStarts: true
image:
imageType: distroless
proxyMetadata:
ISTIO_META_DNS_AUTO_ALLOCATE: "true"
ISTIO_META_DNS_CAPTURE: "true"
defaultProviders:
metrics:
- prometheus
discoverySelectors:
- matchLabels:
istio-discovery: enabled
enablePrometheusMerge: true
outboundTrafficPolicy:
mode: REGISTRY_ONLY
rootNamespace: istio-system
trustDomain: cluster.local
Service Entries
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: keycloak-ext
namespace: istio-ingress
spec:
exportTo:
- '*'
hosts:
- keycloak-http.idp.svc.cluster.local
location: MESH_EXTERNAL
ports:
- name: tcp-keycloak-port
number: 8443
protocol: TCP
resolution: DNS
---
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: keycloak-http-ext
namespace: istio-ingress
spec:
exportTo:
- '*'
hosts:
- keycloak-http.idp.svc.cluster.local
location: MESH_EXTERNAL
ports:
- name: http
number: 80
protocol: HTTP
resolution: DNS
Port 80 Listener for Pod
[
{
"name": "0.0.0.0_80",
"address": {
"socketAddress": {
"address": "0.0.0.0",
"portValue": 80
}
},
"filterChains": [
{
"filterChainMatch": {
"transportProtocol": "raw_buffer",
"applicationProtocols": [
"http/1.1",
"h2c"
]
},
"filters": [
{
"name": "envoy.filters.network.http_connection_manager",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"statPrefix": "outbound_0.0.0.0_80",
"rds": {
"configSource": {
"ads": {},
"initialFetchTimeout": "0s",
"resourceApiVersion": "V3"
},
"routeConfigName": "80"
},
"httpFilters": [
{
"name": "istio.metadata_exchange",
"typedConfig": {
"@type": "type.googleapis.com/udpa.type.v1.TypedStruct",
"typeUrl": "type.googleapis.com/io.istio.http.peer_metadata.Config",
"value": {
"upstream_discovery": [
{
"istio_headers": {}
},
{
"workload_discovery": {}
}
],
"upstream_propagation": [
{
"istio_headers": {}
}
]
}
}
},
{
"name": "envoy.filters.http.grpc_stats",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.grpc_stats.v3.FilterConfig",
"emitFilterState": true,
"statsForAllMethods": false
}
},
{
"name": "istio.alpn",
"typedConfig": {
"@type": "type.googleapis.com/istio.envoy.config.filter.http.alpn.v2alpha1.FilterConfig",
"alpnOverride": [
{
"alpnOverride": [
"istio-http/1.0",
"istio",
"http/1.0"
]
},
{
"upstreamProtocol": "HTTP11",
"alpnOverride": [
"istio-http/1.1",
"istio",
"http/1.1"
]
},
{
"upstreamProtocol": "HTTP2",
"alpnOverride": [
"istio-h2",
"istio",
"h2"
]
}
]
}
},
{
"name": "envoy.filters.http.fault",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault"
}
},
{
"name": "envoy.filters.http.cors",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors"
}
},
{
"name": "istio.stats",
"typedConfig": {
"@type": "type.googleapis.com/stats.PluginConfig"
}
},
{
"name": "envoy.filters.http.router",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
}
}
],
"tracing": {
"clientSampling": {
"value": 100
},
"randomSampling": {
"value": 10
},
"overallSampling": {
"value": 100
},
"customTags": [
{
"tag": "istio.authorization.dry_run.allow_policy.name",
"metadata": {
"kind": {
"request": {}
},
"metadataKey": {
"key": "envoy.filters.http.rbac",
"path": [
{
"key": "istio_dry_run_allow_shadow_effective_policy_id"
}
]
}
}
},
{
"tag": "istio.authorization.dry_run.allow_policy.result",
"metadata": {
"kind": {
"request": {}
},
"metadataKey": {
"key": "envoy.filters.http.rbac",
"path": [
{
"key": "istio_dry_run_allow_shadow_engine_result"
}
]
}
}
},
{
"tag": "istio.authorization.dry_run.deny_policy.name",
"metadata": {
"kind": {
"request": {}
},
"metadataKey": {
"key": "envoy.filters.http.rbac",
"path": [
{
"key": "istio_dry_run_deny_shadow_effective_policy_id"
}
]
}
}
},
{
"tag": "istio.authorization.dry_run.deny_policy.result",
"metadata": {
"kind": {
"request": {}
},
"metadataKey": {
"key": "envoy.filters.http.rbac",
"path": [
{
"key": "istio_dry_run_deny_shadow_engine_result"
}
]
}
}
},
{
"tag": "istio.canonical_revision",
"literal": {
"value": "latest"
}
},
{
"tag": "istio.canonical_service",
"literal": {
"value": "busybox"
}
},
{
"tag": "istio.mesh_id",
"literal": {
"value": "cluster.local"
}
},
{
"tag": "istio.namespace",
"literal": {
"value": "shared"
}
}
]
},
"streamIdleTimeout": "0s",
"accessLog": [
{
"name": "envoy.access_loggers.file",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/stdout",
"logFormat": {
"textFormatSource": {
"inlineString": "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %RESPONSE_CODE_DETAILS% %CONNECTION_TERMINATION_DETAILS% \"%UPSTREAM_TRANSPORT_FAILURE_REASON%\" %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME% %ROUTE_NAME%\n"
}
}
}
}
],
"useRemoteAddress": false,
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
],
"normalizePath": true,
"pathWithEscapedSlashesAction": "KEEP_UNCHANGED",
"requestIdExtension": {
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig",
"useRequestIdForTraceSampling": true
}
}
}
}
]
}
],
"defaultFilterChain": {
"filterChainMatch": {},
"filters": [
{
"name": "istio.stats",
"typedConfig": {
"@type": "type.googleapis.com/stats.PluginConfig"
}
},
{
"name": "envoy.filters.network.tcp_proxy",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy",
"statPrefix": "BlackHoleCluster",
"cluster": "BlackHoleCluster",
"accessLog": [
{
"name": "envoy.access_loggers.file",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/stdout",
"logFormat": {
"textFormatSource": {
"inlineString": "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %RESPONSE_CODE_DETAILS% %CONNECTION_TERMINATION_DETAILS% \"%UPSTREAM_TRANSPORT_FAILURE_REASON%\" %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME% %ROUTE_NAME%\n"
}
}
}
}
]
}
}
],
"name": "PassthroughFilterChain"
},
"listenerFilters": [
{
"name": "envoy.filters.listener.tls_inspector",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector"
}
},
{
"name": "envoy.filters.listener.http_inspector",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.listener.http_inspector.v3.HttpInspector"
}
}
],
"listenerFiltersTimeout": "0s",
"continueOnListenerFiltersTimeout": true,
"trafficDirection": "OUTBOUND",
"bindToPort": false
}
]
Port 8443 Listener
[
{
"name": "240.240.52.207_8443",
"address": {
"socketAddress": {
"address": "240.240.52.207",
"portValue": 8443
}
},
"filterChains": [
{
"filters": [
{
"name": "istio.stats",
"typedConfig": {
"@type": "type.googleapis.com/stats.PluginConfig"
}
},
{
"name": "envoy.filters.network.tcp_proxy",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy",
"statPrefix": "outbound|8443||keycloak-http.idp.svc.cluster.local",
"cluster": "outbound|8443||keycloak-http.idp.svc.cluster.local",
"accessLog": [
{
"name": "envoy.access_loggers.file",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/stdout",
"logFormat": {
"textFormatSource": {
"inlineString": "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH)% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %RESPONSE_CODE_DETAILS% %CONNECTION_TERMINATION_DETAILS% \"%UPSTREAM_TRANSPORT_FAILURE_REASON%\" %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" %UPSTREAM_CLUSTER% %UPSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_LOCAL_ADDRESS% %DOWNSTREAM_REMOTE_ADDRESS% %REQUESTED_SERVER_NAME% %ROUTE_NAME%\n"
}
}
}
}
]
}
}
]
}
],
"listenerFiltersTimeout": "0s",
"continueOnListenerFiltersTimeout": true,
"trafficDirection": "OUTBOUND",
"bindToPort": false
}
]
Route to Service on Port 80
{
"name": "keycloak-http.idp.svc.cluster.local:80",
"domains": [
"keycloak-http.idp.svc.cluster.local",
"keycloak-http.idp",
"keycloak-http.idp.svc",
"240.240.52.207"
],
"routes": [
{
"name": "default",
"match": {
"prefix": "/"
},
"route": {
"cluster": "outbound|80||keycloak-http.idp.svc.cluster.local",
"timeout": "0s",
"retryPolicy": {
"retryOn": "connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes",
"numRetries": 2,
"retryHostPredicate": [
{
"name": "envoy.retry_host_predicates.previous_hosts",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.retry.host.previous_hosts.v3.PreviousHostsPredicate"
}
}
],
"hostSelectionRetryMaxAttempts": "5",
"retriableStatusCodes": [
503
]
},
"maxGrpcTimeout": "0s"
},
"decorator": {
"operation": "keycloak-http.idp.svc.cluster.local:80/*"
}
}
],
"includeRequestAttemptCount": true
}
No Cluster for Service on Port 80
$ istioctl proxy-config cluster busybox --direction outbound --port 80 --fqdn "keycloak-http.idp.svc.cluster.local" -o json
[]
Cluster for Service on Port 8443
$ istioctl proxy-config cluster busybox --direction outbound --port 8443 --fqdn "keycloak-http.idp.svc.cluster.local" -o json
[
{
"name": "outbound|8443||keycloak-http.idp.svc.cluster.local",
"type": "STRICT_DNS",
"connectTimeout": "10s",
"lbPolicy": "LEAST_REQUEST",
"loadAssignment": {
"clusterName": "outbound|8443||keycloak-http.idp.svc.cluster.local",
"endpoints": [
{
"locality": {},
"lbEndpoints": [
{
"endpoint": {
"address": {
"socketAddress": {
"address": "keycloak-http.idp.svc.cluster.local",
"portValue": 8443
}
}
},
"metadata": {
"filterMetadata": {
"istio": {
"workload": ";;;;"
}
}
},
"loadBalancingWeight": 1
}
],
"loadBalancingWeight": 1
}
]
},
"circuitBreakers": {
"thresholds": [
{
"maxConnections": 4294967295,
"maxPendingRequests": 4294967295,
"maxRequests": 4294967295,
"maxRetries": 4294967295,
"trackRemaining": true
}
]
},
"dnsRefreshRate": "60s",
"respectDnsTtl": true,
"dnsLookupFamily": "V4_ONLY",
"commonLbConfig": {
"localityWeightedLbConfig": {}
},
"metadata": {
"filterMetadata": {
"istio": {
"external": true,
"services": [
{
"host": "keycloak-http.idp.svc.cluster.local",
"name": "keycloak-http.idp.svc.cluster.local",
"namespace": "istio-ingress"
}
]
}
}
},
"filters": [
{
"name": "istio.metadata_exchange",
"typedConfig": {
"@type": "type.googleapis.com/udpa.type.v1.TypedStruct",
"typeUrl": "type.googleapis.com/envoy.tcp.metadataexchange.config.MetadataExchange",
"value": {
"enable_discovery": true,
"protocol": "istio-peer-exchange"
}
}
}
]
}
]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 23 (13 by maintainers)
Should be next Tuesday if the e2e tests, which are currently running, are passing.
NP. I think the original issue is still valid so we should keep this open .
Fwiw it could also probably be fixed by merging the 2 SEs into a single one.
not sure when is next release
FYI https://github.com/istio/istio/issues/49489, this is fixed
@lkalaivanan Will be today or tomorrow. The patch versions were scheduled to be released after 1.21’s release.