Docker Redis Hostname Not Reachable from createQueue
- Dominant language
- JavaScript
- Stars
- 9.4k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
Within my API docker container, I can ping and connect to the networked redis container by its containername redis_cache I set in the docker compose. I ping like this and the hostname is resolveable from my API container as such: `ping redis_cache`
However:
`const queue = kue.createQueue({redis: 'redis://redis_cache:6379'});`
does not work.
`Redis connection to redis_cache:6379 failed - getaddrinfo ENOTFOUND redis_cache redis_cache:6379`
Anyone have any ideas what i can attempt next to get this working?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the kue.createQueue Redis configuration shown in the issue and reproduce the Docker setup using the redis_cache hostname. Compare hostname resolution from the API container with the Node.js Redis connection path; done means the queue connects to Redis without the getaddrinfo ENOTFOUND error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, redis
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100