Open tryvalve opened 3 years ago
hi ,it means the module doesn't work , i guess u can only proxy http request .
This step wrong: "copy ./nginx.conf /usr/local/openresty/nginx/conf/nginx.conf"
u should copy the "objs/nginx" to "/usr/sbin/nginx" or add dynamic module "ngx_http_proxy_connect_module-master" copy the so file
Enabling debugging while building nginx pointed to a probable root cause being host addresses being IPv6. If your target host resolution includes IPv6 addresses then you will get 502s when the IPv6 address is attempted. Adding "ipv6=off" to your resolver line should be a functioning workaround until it is fixed in code.
Change this: resolver 8.8.8.8; To This: resolver 8.8.8.8 ipv6=off;
@scott-hiemstra Thanks for pointing out the workaround. I think I'm experiencing a similar issue (which vanishes when using ipv6=off
) and I wonder if that's really a problem of this module. I can't see why a IPv6 address isn't usable with proxy_connect_address
:thinking:
@scott-hiemstra you're a life saver
I see similar issue. Disabling ipv6 fixed it. But I noticed that resolver reports a list of IPs and proxy_connect tries only one IP from the list reported.
Is it possible to configure the proxy_connect to try all IPs reported by resolver - if some of the connection attempts failed - till one IP that succeeded is found?
Enabling debugging while building nginx pointed to a probable root cause being host addresses being IPv6. If your target host resolution includes IPv6 addresses then you will get 502s when the IPv6 address is attempted. Adding "ipv6=off" to your resolver line should be a functioning workaround until it is fixed in code.
Change this: resolver 8.8.8.8; To This: resolver 8.8.8.8 ipv6=off;
Great, it works to me, Thanks!
Ⅰ. Issue Description
Intermittent 502 errors when using openresty 1.17.8.2 with 1018.path.
Ⅱ. Describe what happened
Ⅲ. Describe what you expected to happen
I expected the requests to be proxied through localhost:3128.
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Dockerfile:
nginx.conf:
Ⅴ. Anything else we need to know?
nginx error.log:
Ⅵ. Environment: