openresty / openresty/lua-resty-redis

Trouble connecting to host by aliased hostname

Open
#113 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2k
Forks
447
Avg merge
2h 24m
Merged PRs (30d)
3

Description

I've been running into trouble trying to open a connection from one docker container to another. I've set up redis to run from the base docker alpine image with minimal configuration. I've also set up an nginx server to make some calls out to the redis container. I've found that I can open and establish a connection using redis-lua and calling redis.connect(""). I can also put the redis-server package and connect using redis-cli -h and ping the server as well. But when I try to open a connection using lua-resty-redis, I keep getting connection refused:

connection refused, client: 192.168.21.252, server:
I'm unsure if this is a DNS issue, as it appears that there is no server. But I would expect if this was the case, then the redis-lua library and the redis-cli would not work as well. Any idea what is going on here?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Docker Alpine setup described, with nginx connecting through lua-resty-redis to Redis. Compare that connection with redis-lua and redis-cli using the aliased hostname; done means identifying why only lua-resty-redis is refused and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, lua, nginx, redis
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.