You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then make a request that is handled by the batch-requests plugin, you get the following error:
connect to apisix failed: missing the port number
This is because the batch-requests plugin uses the ngx.var.server_port variable when setting up the internal request, assuming that it is populated with a port number. If the client connection came over a unix listening socket, ngx.var.server_port is a zero length string.
Expected Behavior
I get that unix sockets are probably an edge case but it would be nice if this worked.
I will submit a PR shortly with my modified batch-requests.lua that checks for this condition and then gets the server_port from the node_listen property of the APISIX configuration.
Error Logs
No response
Steps to Reproduce
Use the latest docker image
Configure nginx (via apisix config.yml) to listen on a unix socket:
Current Behavior
If you configure Nginx to listen on a unix socket:
And then make a request that is handled by the batch-requests plugin, you get the following error:
This is because the batch-requests plugin uses the
ngx.var.server_port
variable when setting up the internal request, assuming that it is populated with a port number. If the client connection came over a unix listening socket,ngx.var.server_port
is a zero length string.Expected Behavior
I get that unix sockets are probably an edge case but it would be nice if this worked.
I will submit a PR shortly with my modified
batch-requests.lua
that checks for this condition and then gets theserver_port
from thenode_listen
property of the APISIX configuration.Error Logs
No response
Steps to Reproduce
curl --unix-socket /run/sockets/apisix_http http://127.0.0.1:9080/your_url --data '{}'
Environment
luarocks --version
): N/AThe text was updated successfully, but these errors were encountered: