# Loadbalancer returns empty result

**URL:** <https://www.ruby-forum.com/t/loadbalancer-returns-empty-result/214525>\
**Category:** NGINX\
**Created:** [December 4, 2011, 5:30pm UTC](https://www.ruby-forum.com/t/loadbalancer-returns-empty-result/214525 "2011-12-04T17:30:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [December 4, 2011, 5:30pm UTC](https://www.ruby-forum.com/t/loadbalancer-returns-empty-result/214525/1 "2011-12-04T17:30:41Z")

</div>

Hi, I wanted to configure my nginx as loadbalancer for other www  
servers working under nginx. Loadbalancer is listening on ipv4:  
192.168.0.1, www servers on ipv6. Here’s my loadbalancer config (only  
part of my nginx.conf)

upstream loadbalancer {  
ip\_hash;  
server [IPv6]:80;  
}  
server {  
listen 192.168.0.1:80;  
server\_name wmp \*.wmp loadbalancer wmpp;  
location / {  
proxy\_pass [http://loadbalancer](http://loadbalancer);  
}  
}

And here’s my ipv6 www config:

server {  
listen [::]:80 ipv6only=on;  
server\_name wmp \*.wmp loadbalancer wmpp;  
access\_log /home/wmp/www/wmp/logs/access.log;  
error\_log /home/wmp/www/wmp/logs/error.log;

```
   root /home/wmp/www/wmp/htdocs/;
   index index.php index.html;
   autoindex off;

   location ~ \.php$ {
           include /etc/nginx/fastcgi_params;
           fastcgi_index index.php;
           fastcgi_pass unix:/var/run/nginx/wmp.php-fpm.socket;
           fastcgi_param SCRIPT_FILENAME

```

$document\_root$fastcgi\_script\_name;  
}  
}

Content of index.html (only this word): PLIK

The host for wmpp is directly pointing for ipv6 server, other ones -  
loadbalancer (192.168.0.1). Here’s my wmpp reply:

root@server:~# curl -v wmpp

- About to connect() to wmpp port 80 (#0)
- Trying IPv6… connected
- Connected to wmpp (IPv6) port 80 (#0)

> GET / HTTP/1.1  
> User-Agent: curl/7.19.7 (x86\_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k  
> zlib/1.2.3.3 libidn/1.15  
> Host: wmpp  
> Accept: _/_

\< HTTP/1.1 200 OK  
\< Server: nginx/1.0.10  
\< Date: Sun, 04 Dec 2011 15:55:38 GMT  
\< Content-Type: text/html  
\< Content-Length: 5  
\< Last-Modified: Sun, 27 Nov 2011 01:51:58 GMT  
\< Connection: keep-alive  
\< Accept-Ranges: bytes  
\<  
PLIK

- Connection #0 to host wmpp left intact
- Closing connection #0  
root@server:~#

And here’s reply from wmp (loadbalancer)

root@server:~# curl -v wmp

- About to connect() to wmp port 80 (#0)
- Trying 192.168.0.1… connected
- Connected to wmp (192.168.0.1) port 80 (#0)

> GET / HTTP/1.1  
> User-Agent: curl/7.19.7 (x86\_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k  
> zlib/1.2.3.3 libidn/1.15  
> Host: wmp  
> Accept: _/_

- Empty reply from server
- Connection #0 to host wmp left intact  
curl: (52) Empty reply from server
- Closing connection #0  
root@server:~#

Loadbalancer’s log:

2011/12/04 17:03:29 [alert] 8955#0: worker process 30536 exited on  
signal 8

Debuglog:

2011/12/04 17:06:06 [debug] 2966#0: post event 0000000000925300  
2011/12/04 17:06:06 [debug] 2966#0: delete posted event 0000000000925300  
2011/12/04 17:06:06 [debug] 2966#0: accept on 192.168.0.1:80, ready: 0  
2011/12/04 17:06:06 [debug] 2966#0: posix\_memalign: 00000000006F28D0:256  
@16  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 accept: 192.168.0.2 fd:3  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 event timer add: 3:  
60000:1323014826292  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 epoll add event: fd:3  
op:1 ev:80000001  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 post event 0000000000925778  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 delete posted event  
0000000000925778  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 malloc:  
000000000088D370:1296  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 posix\_memalign:  
000000000075F470:256 @16  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 malloc:  
000000000086CF50:1024  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 posix\_memalign:  
000000000081C0D0:4096 @16  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http process request line  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 recv: fd:3 153 of 1024  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http request line: “GET /  
HTTP/1.1”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http uri: “/”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http args: “”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http exten: “”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http process request header  
line  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http header: “User-Agent:  
curl/7.19.7 (x86\_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k  
zlib/1.2.3.3 libidn/1.15”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http header: “Host:  
wmp.sored.pl”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http header: “Accept: _/_”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http header done  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 event timer del: 3:  
1323014826292  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 generic phase: 0  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 rewrite phase: 1  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 test location: “/”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 using configuration “/”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http cl:-1 max:1048576  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 rewrite phase: 3  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 post rewrite phase: 4  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 generic phase: 5  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 generic phase: 6  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 generic phase: 7  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 access phase: 8  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 access phase: 9  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 access phase: 10  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 post access phase: 11  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 try files phase: 12  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http init upstream, client  
timer: 0  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 epoll add event: fd:3  
op:3 ev:80000005  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 posix\_memalign:  
0000000000747830:4096 @16  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http script copy: "Host: "  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http script var:  
“loadbalancer”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http script copy: "  
"  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http script copy:  
"Connection: close  
"  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http proxy header:  
“User-Agent: curl/7.19.7 (x86\_64-pc-linux-gnu) libcurl/7.19.7  
OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http proxy header: “Accept:  
_/_”  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http proxy header:  
"GET / HTTP/1.0  
Host: loadbalancer  
Connection: close  
User-Agent: curl/7.19.7 (x86\_64-pc-linux-gnu) libcurl/7.19.7  
OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15  
Accept: _/_

"  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 http cleanup add:  
00000000007479C0  
2011/12/04 17:06:06 [debug] 2966#0: \*2675647 get ip hash peer, try: 0  
2011/12/04 17:06:06 [debug] 3017#0: epoll add event: fd:79 op:1  
ev:00000001  
2011/12/04 17:06:06 [debug] 3017#0: epoll add event: fd:36 op:1  
ev:00000001  
2011/12/04 17:06:06 [debug] 3017#0: epoll add event: fd:37 op:1  
ev:00000001  
2011/12/04 17:06:06 [debug] 3017#0: epoll add event: fd:38 op:1  
ev:00000001  
2011/12/04 17:06:06 [debug] 3017#0: epoll add event: fd:39 op:1  
ev:00000001

Could you help me, I’ve checked everything and I’ve no idea why it  
isn’t working.

–  
Marcin Janowski(WMP)

---

<div class="post-metadata">

**Author:** ![Marcin\_SSSWMPSSSS\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@Marcin\_SSSWMPSSSS\_J](https://www.ruby-forum.com/u/Marcin_SSSWMPSSSS_J)\
**Post date:** [December 6, 2011, 3:31am UTC](https://www.ruby-forum.com/t/loadbalancer-returns-empty-result/214525/2 "2011-12-06T03:31:09Z")

</div>

Maybe this support is in todo list? If yes, on what version i can  
looking  
as this?  
05-12-2011 10:42 użytkownik “Maxim D.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) napisał:

---

<div class="post-metadata">

**Author:** ![Marcin\_SSSWMPSSSS\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@Marcin\_SSSWMPSSSS\_J](https://www.ruby-forum.com/u/Marcin_SSSWMPSSSS_J)\
**Post date:** [December 5, 2011, 10:42am UTC](https://www.ruby-forum.com/t/loadbalancer-returns-empty-result/214525/3 "2011-12-05T10:42:24Z")

</div>

Hello!

On Sun, Dec 04, 2011 at 05:29:45PM +0100, Marcin “WMP” Janowski wrote:

> Hi, I wanted to configure my nginx as loadbalancer for other www  
> servers working under nginx. Loadbalancer is listening on ipv4:  
> 192.168.0.1, www servers on ipv6. Here’s my loadbalancer config (only  
> part of my nginx.conf)
> 
> upstream loadbalancer {  
> ip\_hash;  
> server [IPv6]:80;  
> }

[…]

As of now, nginx doesn’t support ipv6 upstream servers.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Marcin\_SSSWMPSSSS\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/8edcca/32.png) [@Marcin\_SSSWMPSSSS\_J](https://www.ruby-forum.com/u/Marcin_SSSWMPSSSS_J)\
**Post date:** [December 19, 2011, 3:46pm UTC](https://www.ruby-forum.com/t/loadbalancer-returns-empty-result/214525/4 "2011-12-19T15:46:54Z")

</div>

On 12/6/11 6:30 AM, Marcin “WMP” Janowski wrote:

> Maybe this support is in todo list? If yes, on what version i can  
> looking as this?  
> […]

Hi Marcin,

Indeed, there is such task in our long-term todo list, but it is not a  
priority right now.

–  
Maxim K.  
+7 (910) 4293178

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.
