<div dir="ltr"><div><div><div><div><div>Hi guys,<br><br></div>I have an nginx proxying udp/streams to another proxy which handles the connection to the backend.<br><br></div>The same proxy proxying the udp streams to another proxy is working ok.<br></div>But
when it proxies it to the other one, it fills with the worker error. I
turned on debugging and what i see, is that nginx aint releasing the udp
connections...<br></div><div>I could use a hand as I cant get it to work.<br></div><div><br></div>in the first proxy i have:<br><br> server {<br> listen *:8330 udp;<br> proxy_responses 1;<br> proxy_pass second-proxy:8330;<br> error_log /var/log/nginx/8330udp.log debug;<br> }<br><br><br><br></div>in the second that is the main which receives from various proxies:<br><br>server {<br> listen *:8330 udp;<br> proxy_responses 1;<br> proxy_pass server:8302;<br> error_log /var/log/nginx/udp8330.log debug;<br> }<br><div><br><br></div><div>This same config in another "third" proxy for a differnet set of backends works ok.<br><br><br><br></div><div>The main proxy for the working requests logs is like this, it is ending the connections:<br><br>2018/01/02 17:08:01 [debug] 6158#6158: *13 recv: fd:70 183 of 16384<br>2018/01/02
17:08:01 [debug] 6158#6158: *13 write new buf t:1 f:0 00000000012A6D00,
pos 00000000012A7270, size: 183 file: 0, size: 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 stream write filter: l:1 f:1 s:183<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 sendmsg: 183 of 183<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 stream write filter 0000000000000000<br>2018/01/02
17:08:01 [info] 6158#6158: *13 udp upstream disconnected, bytes from/to
client:122/183, bytes from/to upstream:183/122<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 finalize stream proxy: 200<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free rr peer 1 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 close stream proxy upstream connection: 70<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 reusable connection: 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 finalize stream session: 200<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 stream log handler<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 close stream connection: 41<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 event timer del: 41: 1514913481260<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 reusable connection: 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free: 00000000012A7270<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free: 00000000012A70D0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free: 0000000001199550, unused: 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free: 00000000012A6C90, unused: 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free: 00000000012A6DA0, unused: 0<br>2018/01/02 17:08:01 [debug] 6158#6158: *13 free: 00000000012A6EB0, unused: 24<br><br><br><br>The same proxy for the other non working one is: NO finalize, nor closing connection<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 recvmsg: <a href="http://52.200.231.253:13129" target="_blank">52.200.231.253:13129</a> fd:51 n:313<br>2018/01/02 17:06:30 [info] 6101#6101: *291 udp client <a href="http://52.200.231.253:13129" target="_blank">52.200.231.253:13129</a> connected to <a href="http://0.0.0.0:8330" target="_blank">0.0.0.0:8330</a><br>2018/01/02 17:06:30 [debug] 6101#6101: *291 posix_memalign: 00000000025DE410:256 @16<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 posix_memalign: 00000000025DE520:256 @16<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 generic phase: 0<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 generic phase: 1<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 FFFFFFFF 9405CE34<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 FFFFFFFF 12282534<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 0000FFFF 00000D0A<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 FFFFFFFF 2E952734<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 FFFFFFFF 368A1934<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 FFFFFFFF AEEB2C34<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 access: FDE7C834 FFFFFFFF FDE7C834<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 generic phase: 2<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 proxy connection handler<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 malloc: 00000000025DE630:400<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 get rr peer, try: 1<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 dgram socket 87<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 epoll add connection: fd:87 ev:80002005<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 connect to <a href="http://52.44.235.174:8330" target="_blank">52.44.235.174:8330</a>, fd:87 #292<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 connected<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 proxy connect: 0<br>2018/01/02 17:06:30 [info] 6101#6101: *291 udp proxy <a href="http://10.13.11.74:48173" target="_blank">10.13.11.74:48173</a> connected to <a href="http://52.44.235.174:8330" target="_blank">52.44.235.174:8330</a><br>2018/01/02 17:06:30 [debug] 6101#6101: *291 malloc: 00000000025DE7D0:16384<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 stream proxy add preread buffer: 313<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 posix_memalign: 00000000025E27E0:256 @16<br>2018/01/02
17:06:30 [debug] 6101#6101: *291 write new buf t:1 f:0
00000000025DE2C0, pos 00000000025DE2C0, size: 313 file: 0, size: 0<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 stream write filter: l:1 f:1 s:313<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 sendmsg: 313 of 313<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 stream write filter 0000000000000000<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 event timer add: 51: 600000:1514913390811<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 event timer: 51, old: 1514913390811, new: 1514913390811<br>2018/01/02 17:06:30 [debug] 6101#6101: *291 event timer: 51, old: 1514913390811, new: 1514913390811<br>2018/01/02 17:06:31 [debug] 6101#6101: recvmsg on <a href="http://0.0.0.0:8330" target="_blank">0.0.0.0:8330</a>, ready: 0<br>2018/01/02 17:06:31 [debug] 6101#6101: posix_memalign: 00000000025EF740:256 @16<br>2018/01/02 17:06:31 [debug] 6101#6101: posix_memalign: 00000000025EF850:256 @16<br>2018/01/02 17:06:31 [debug] 6101#6101: malloc: 00000000025EF960:313<br>2018/01/02 17:06:31 [debug] 6101#6101: *297 recvmsg: <a href="http://52.20.21.23:13129" target="_blank">52.20.21.23:13129</a> fd:51 n:313<br>2018/01/02 17:06:31 [info] 6101#6101: *297 udp client <a href="http://52.20.21.23:13129" target="_blank">52.20.21.23:13129</a> connected to <a href="http://0.0.0.0:8330" target="_blank">0.0.0.0:8330</a><br></div><div><br><br></div><div>Both same nginx version.<br><br></div>Thanks!<div class="gmail-yj6qo gmail-ajU"><div id="gmail-:8na" class="gmail-ajR" tabindex="0"><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div></div>