Loadbalancer returns empty result

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;
}
}

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:

[email protected]:~# 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

And here’s reply from wmp (loadbalancer)

[email protected]:~# 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
    [email protected]:~#

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)

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.” [email protected] napisał:

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.

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
http://nginx.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs