Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error #2309

Open
qnapnickchang opened this issue May 3, 2024 · 1 comment
Open

500 Internal Server Error #2309

qnapnickchang opened this issue May 3, 2024 · 1 comment

Comments

@qnapnickchang
Copy link

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
@Rockybilly
Copy link

if uuid4 is a module, it seems to missing that from the code or the issue description that

local uuid4 = require("uuid4.lua")
or something similar. So the name uuid4 name seems undefined. But if it is a global variable or something, and should be accessable, the problem could be within the function getUUID. Nginx error log should give sufficient explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants