openresty / openresty/lua-resty-dns

DNS ERROR

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

Nobody has claimed this yet.

Dominant language
Lua
Stars
338
Forks
107
Avg merge
1h 29m
Merged PRs (30d)
2

Description

ERROR: /usr/local/openresty/lualib/resty/dns/resolver.lua:384: bad argument #1 to 'lshift' (number expected, got nil)
stack traceback:
/usr/local/openresty/lualib/resty/dns/resolver.lua:384: in function 'parse_section'
/usr/local/openresty/lualib/resty/dns/resolver.lua:745: in function 'parse_response'
/usr/local/openresty/lualib/resty/dns/resolver.lua:909: in function 'query'
test.lua:19: in function 'file_gen'
init_worker_by_lua:45: in function <init_worker_by_lua:43>
[C]: in function 'xpcall'
init_worker_by_lua:52: in function <init_worker_by_lua:50>
It seems to be an issue with lua-resty-dns. Do you have any suggestions for the next steps?

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 at /usr/local/openresty/lualib/resty/dns/resolver.lua:384 and trace the parse_section call through parse_response and query. Reproduce the failure from test.lua:19 in the init_worker_by_lua context, then determine which DNS response data leads to the nil argument. Done means the reported DNS query no longer raises this error, with a regression check if the repository provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
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.