Issue connecting to Azure REDIS
We are trying to connect to Azure REDIS. The logs initially shows as connected but we keep seeing the following error for every second on the API after it is up.
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
REDIS CONNECTED
We did set the REDIS_TLS to the following {"servername": "redis_host_name"}.
Is there anything that we are missing in the configuration?
8 Replies
Hi! Have you set up also
REDIS_HOST
and REDIS_PORT
env variables?
REDIS_TLS
is to configure the secure connection to Redis optionsHi. Yes I did configure REDIS_HOST and REDIS_PORT variables. Are there any other variables that I need to set?
Not for Redis. Under my experience you can set even wrong hostnames inside ioredis (our Redis client downstream) and say it connected.
I would suggest to debug if there is connectivity to the Azure Redis instance from where the API app is being deployed and review the hostname and port in the configuration.
We wrote a sample nodejs app to connect to the REDIS using ioredis and it worked fine. We were able to set and get keys.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Please open a new support thread as this is a different question compared to the original poster in this thread and could lead to bad support.
Thank you. 🙏 Are you enabling Azure Redis in the SSL port or in the non-SSL?
Thank you. 🙏 Are you enabling Azure Redis in the SSL port or in the non-SSL?
I tried both
I can't think of what could be happening to your settings. I would try to run a local Redis instance where the API instance is deployed and connect it to see if it is a network problem between API and Azure Redis. But beyond that I can't come up with more ideas, I am sorry.