ERROR [ExceptionHandler] connect ECONNREFUSED 127.0.0.1:6379
I use docker-compose.yml and .env file with REDIS_URL=redis://redis:6379, but it seems hardcoded 127.0.0.1 in the server image, so it cannot connected to redis.
Here are the server log and keep restarting
[Nest] 1 - 10/30/2024, 1:49:55 AM LOG [InstanceLoader] ServerlessModule dependencies initialized +0ms [Nest] 1 - 10/30/2024, 1:49:55 AM LOG [InstanceLoader] FileUploadModule dependencies initialized +0ms [Nest] 1 - 10/30/2024, 1:49:55 AM LOG [InstanceLoader] FileModule dependencies initialized +1ms [Nest] 1 - 10/30/2024, 1:49:55 AM ERROR [ExceptionHandler] connect ECONNREFUSED 127.0.0.1:6379 Error: connect ECONNREFUSED 127.0.0.1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
2 Replies