istio: Problems connecting to redis cluster on 1.1.0-snapshot.4
Provider: EKS Kubernetes version: v1.11.5 mTLS: enabled Istio: 1.1.0-snapshot.4
I’m trying to connect a java application (running inside the mesh) to a redis cluster (running outside the mesh).
redis cluster is in the namespace storage
while application is running in apps
namespace.
As I have mTLS enabled in the mesh I disabled it specifically for storage
namespace with the following,
apiVersion: "networking.istio.io/v1alpha3"
kind: "DestinationRule"
metadata:
name: "default"
namespace: "storage"
spec:
host: "*.storage.svc.cluster.local"
trafficPolicy:
tls:
mode: DISABLE
This works perfectly fine in 1.1.0-snapshot.3
however I’m running into the following problem with 1.1.0-snapshot.4
.
2019-01-22 08:22:09.903 ERROR [authorization-service,,,] 1 --- [sson-netty-11-2] o.r.client.handler.CommandPubSubDecoder : Error: unsupported command 'SUBSCRIBE' channel: [id: 0x605a8390, L:/192.168.46.120:39384 - R:rc-redis-server-master-svc.storage.svc.cluster.local/10.100.89.36:6379] data: null
....
Caused by: org.redisson.client.RedisTimeoutException: Subscribe timeout: (10500ms)
at org.redisson.command.CommandAsyncService.syncSubscription(CommandAsyncService.java:128)
at org.redisson.RedissonTopic.addListener(RedissonTopic.java:105)
at org.redisson.RedissonTopic.addListener(RedissonTopic.java:94)
at org.redisson.RedissonLocalCachedMap.addListeners(RedissonLocalCachedMap.java:222)
at org.redisson.RedissonLocalCachedMap.init(RedissonLocalCachedMap.java:215)
at org.redisson.RedissonLocalCachedMap.<init>(RedissonLocalCachedMap.java:192)
at org.redisson.Redisson.getLocalCachedMap(Redisson.java:255)
at co.riro.authorizationservice.db.redis.RedisUserDaoImpl.initialise(RedisUserDaoImpl.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)
... 72 common frames omitted
Istio proxy (envoy) logging just shows the following,
[2019-01-22T07:02:01.729Z] "- - -" 0 - 0 0 11401 - "-" "-" "-" "-" "192.168.2.225:6379" outbound|6379||rc-redis-server-master-svc.storage.svc.cluster.local 192.168.7.17:55120 10.100.89.36:6379 192.168.7.17:57224 -
[2019-01-22T07:02:01.449Z] "- - -" 0 - 0 0 11688 - "-" "-" "-" "-" "192.168.2.225:6379" outbound|6379||rc-redis-server-master-svc.storage.svc.cluster.local 192.168.7.17:55108 10.100.89.36:6379 192.168.7.17:57212 -
[2019-01-22T07:02:01.453Z] "- - -" 0 - 0 0 11684 - "-" "-" "-" "-" "192.168.2.225:6379" outbound|6379||rc-redis-server-master-svc.storage.svc.cluster.local 192.168.7.17:55112 10.100.89.36:6379 192.168.7.17:57216 -
[2019-01-22T07:02:01.537Z] "- - -" 0 - 0 0 11601 - "-" "-" "-" "-" "192.168.2.225:6379" outbound|6379||rc-redis-server-master-svc.storage.svc.cluster.local 192.168.7.17:55116 10.100.89.36:6379 192.168.7.17:57220 -
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 15 (12 by maintainers)
Then there is
https://www.envoyproxy.io/docs/envoy/latest/configuration/network_filters/redis_proxy_filter#config-network-filters-redis-proxy
and
https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/network/redis_proxy/v2/redis_proxy.proto#envoy-api-msg-config-filter-network-redis-proxy-v2-redisproxy.
@XBeg9 this needs to be fixed in the Redis filter implementation in Envoy. See https://github.com/envoyproxy/envoy/tree/master/source/extensions/filters/network/redis_proxy. As a workaround, you should be able to connect to Redis by replacing the
redis-
prefix in the service port name with something else.