openresty / openresty/resty-cli

Cant Resolve host name. Tried adding with CLI parameters. Should this work?

Open
#72 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
269
Forks
59
Avg merge
1h 35m
Merged PRs (30d)
2

Description

I'm running a unit test with resty in a kubernetes cluster.

resty /kong/spec/jwtcache_test.lua --http-conf 'resolver 172.31.0.10' --main-conf 'resolver 172.31.0.10'

This test uses "resty.redis" to try to connect to a redis instance that is deployed as a service.

Error:
redis could not be resolved (3: Host not found)

Should this work? I'm not really looking up a proxy address in nginx.

Thanks for your time in looking at this issue.

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 /kong/spec/jwtcache_test.lua with the shown resty command and its --http-conf and --main-conf resolver values. Trace how those options reach the nginx configuration used by resty.redis, then verify whether the Redis service hostname resolves. Done means the behavior is clarified and, if appropriate, covered by a focused test or documented workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, lua, nginx, redis
Domain
cli, databases, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.