Welcome! Log In Create A New Profile

Advanced

stream, it always aborts the first server in upstream

October 05, 2015 08:20AM
A strange 'bug' in stream, it always aborts the first server in upstream eventhough there is nothing wrong with the server.

2015/10/05 12:21:01 [info] 1436#684: *1 client 192.168.xxx.xxx:1994 connected to 0.0.0.0:xxxx
2015/10/05 12:21:01 [info] 1436#684: *1 proxy 192.168.xxx.xxx:1493 connected to 192.168.xxx.200:xxxx
2015/10/05 12:21:03 [info] 1436#684: *1 client disconnected, bytes from/to client:334/192600, bytes from/to upstream:192600/334
>>server1 in upstream aborted after 2 seconds
2015/10/05 12:21:04 [info] 1436#684: *3 client 192.168.xxx.xxx:1998 connected to 0.0.0.0:xxxx
2015/10/05 12:21:04 [info] 1436#684: *3 proxy 192.168.xxx.xxx:1494 connected to 192.168.xxx.200:xxxx
>>server2 (which is the same as server1) connects ok and streams perfect

stream {
upstream backendst {
# servers are all the same, when using different servers the problem remains
# when using only one server the logs say the same, abort on first attempt, after 2 seconds a second attempt works ok
server 192.168.xxx.200:xxxx;
server 192.168.xxx.200:xxxx;
}

server {
listen xxxx;
# extremely tight timeout settings, have tested with 10x these values which made no difference to the issue
proxy_connect_timeout 10s; # to proxy backend
proxy_timeout 10s; # to client
proxy_next_upstream on;
proxy_next_upstream_timeout 10;
proxy_next_upstream_tries 2;
proxy_pass backendst;
}
}

nb. I am aware it says "client disconnected" but this is not the case, wget, curl, and a dozen other apps all do and log the same thing. Connecting directly to upstream servers works fine too on the first try (no reconnect).

---
nginx for Windows http://nginx-win.ecsds.eu/
Subject Author Posted

stream, it always aborts the first server in upstream

itpp2012 October 05, 2015 08:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 323
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready