openresty / openresty/lua-nginx-module

500 Internal Server Error

Open
#2,309 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

nginx config
nginx version: nginx/1.24.0
built by gcc 11.4.1 20230605 (Red Hat 11.4.1-2) (GCC)
built with OpenSSL 3.0.7 1 Nov 2022
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --with-ld-opt=-Wl,-rpath,/usr/local/lib --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-file-aio --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-stream --with-stream_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --add-module=/root/src/BUILD/nginx-1.24.0/headers-more-nginx-module-0.37 --add-module=/root/src/BUILD/nginx-1.24.0/nginx-upload-module-2.3.0 --add-module=/root/src/BUILD/nginx-1.24.0/lua-nginx-module-0.10.26 --add-module=/root/src/BUILD/nginx-1.24.0/ngx_devel_kit-0.3.3 --add-module=/root/src/BUILD/nginx-1.24.0/ngx_http_geoip2_module-3.4 --add-module=/root/src/BUILD/nginx-1.24.0/njs-7133f0400019/nginx

     ```

set_by_lua_block $uuid {
if ngx.var.http_x_request_id == nil then
return uuid4.getUUID()
else
return ngx.var.http_x_request_id
end
}


nginx return 500.

Could you give me a suggestion?
Thanks

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 with the reported nginx configuration and the set_by_lua_block snippet, then inspect the nginx error log for the 500 response. Reproduce the configuration with the stated nginx and Lua module versions before investigating the request-ID variable and uuid4 call. Done means identifying a confirmed cause and documenting a reproducible fix or the missing information needed.

Written by the indexing model from the issue text.

Assessment

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