-
Notifications
You must be signed in to change notification settings - Fork 113
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
lua-nginx-module report http v2 not supported yet unexpectedly #50
Comments
Show your simplified configuration, please.
pon., 29.04.2019, 14:35 użytkownik ncubrian <[email protected]>
napisał:
… I'm using the following version of Nginx.
nginx version: nginx/1.14.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_stub_status_module --with-threads --with-stream --with-stream_ssl_module --add-module=/tmp/ngx_devel_kit-0.3.0 --add-module=/tmp/lua-nginx-module-0.10.9rc7
I have defined four virtual servers in http config block. One virtual
server is defined with listen 443 ssl;, while three other virtual servers
are defined with listen 443 ssl http2;. The lua-nginx-module is used in
the server without http2 configured to handle file upload. The code is as
follows.
local req_socket = ngx.req.socket
local sock, err = req_socket()
if not sock then
return nil, err
end
Strange thing is the error.log reports that http v2 is not supported yet.
But the http2 is not even configured in this virtual server. The error
log is as below.
2019/04/29 15:26:19 [error] 22281#22281: *6512 lua entry thread aborted: runtime error: /opt/nginx/co
nf/lua/resty/upload.lua:61: http v2 not supported yet
stack traceback:
coroutine 0:
[C]: in function 'req_socket'
/opt/nginx/conf/lua/resty/upload.lua:61: in function 'new'
It looks like the http2 configuration exists beyond the virtual server in
which it's configured, like somehow it becomes a global thing.
After I delete the http2 in all three other virtual servers, the
error.log stops reporting the error mentioned above.
I don't know what make this happen. Is it a bug or something wrong with my
configuration?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AADOT5VC67HIYQBLJXMN6TTPS3TP3ANCNFSM4HJC4ZWA>
.
|
conf/nginx.conf
conf/foobar1.http.conf
conf/foobar2.http.conf
conf/upload.conf
conf/lua/upload.lua package.path = '/usr/local/share/lua/5.1/?.lua;/opt/nginx/conf/lua/resty/?.lua;'
package.cpath = '/usr/local/lib/lua/5.1/?.so;'
if ngx.var.request_method == "GET" then
ngx.log(ngx.ERR, "upload does not allow GET method")
ngx.exit(412)
end
local upload = require "upload"
local chunk_size = 4096
local form = upload:new(chunk_size) conf/lua/resty/upload.lua local req_socket = ngx.req.socket
function _M.new(self, chunk_size)
local boundary = get_boundary()
if not boundary then
return nil, "no boundary defined in Content-Type"
end
local sock, err = req_socket()
if not sock then
return nil, err
end
end When I tried to upload a file through
|
Hello friend, do you have any clues? |
I have the same problem too. It don't work when I upload by browser, but it work when I upload by Postman. Removing http2 from all configs can fix this problem, but it's not a good way( |
Got the same error message :| |
Same over here with openresty/1.15.8.1 |
I'm using the following version of Nginx.
I have defined four virtual servers in http config block. One virtual server is defined with
listen 443 ssl;
, while three other virtual servers are defined withlisten 443 ssl http2;
. Thelua-nginx-module
is used in the server withouthttp2
configured to handle file upload. The code is as follows.Strange thing is the error.log reports that http v2 is not supported yet. But the
http2
is not even configured in this virtual server. The error log is as below.It looks like the
http2
configuration exists beyond the virtual server in which it's configured, like somehow it becomes a global thing.After I delete the
http2
in all three other virtual servers, the error.log stops reporting the error mentioned above.I don't know what make this happen. Is it a bug or something wrong with my configuration?
The text was updated successfully, but these errors were encountered: