2013/12/24 Lukas Tribus <[email protected]>

> Hi,
>
>
> > dev19 is OK.
> >
> > The config I use is:
>
> With your exact configuration (other than changing the server ip) I'm
> still unable to reproduce the problem:
>
>  00000002:ap.accept(0004)=0005 from [10.0.0.3:55871]
>  00000002:ap.clireq[0005:ffffffff]: GET / HTTP/1.1
>  00000002:ap.clihdr[0005:ffffffff]: User-Agent: curl/7.30.0
>  00000002:ap.clihdr[0005:ffffffff]: Accept: */*
>  00000002:ap.clihdr[0005:ffffffff]: Host: www.mytest.com
>  00000002:www.srvrep[0005:0006]: HTTP/1.1 200 OK
>  00000002:www.srvhdr[0005:0006]: Date: Tue, 24 Dec 2013 12:40:21 GMT
>  00000002:www.srvhdr[0005:0006]: Server: Apache/2.4.2 (Win32)
> OpenSSL/1.0.1c PHP/5.4.4
>  00000002:www.srvhdr[0005:0006]: Content-Length: 579
>  00000002:www.srvhdr[0005:0006]: Connection: close
>  00000002:www.srvhdr[0005:0006]: Content-Type: text/html;charset=UTF-8
>  00000002:www.srvcls[0005:0006]
>  00000002:www.clicls[0005:0006]
>  00000002:www.closed[0005:0006]
>
>
> Could you:
> - check with "-m sub www.mytest.com"? Currently, you seem to use (the
>   working) "-m sub mytest", but the former should work as well (it makes
>   a difference if it doesn't)
>

    I testd with -m sub www.mytest.com  -m sub mytest, and both work OK.



> - remove all the server options on the backend, just leaving
>   "server SERVER 1.2.3.4" (making sure none of those health/maxconn
>   settings influence the behavior)
>

    With no luck




> - test with dev20
>

   With no luck   if build haproxy with the same build shell script

strace output is:


09:41:04 epoll_wait(3, {}, 200, 1000)   = 0
09:41:05 epoll_wait(3, {}, 200, 1000)   = 0
09:41:06 epoll_wait(3, {}, 200, 1000)   = 0
09:41:07 epoll_wait(3, {{EPOLLIN, {u32=4, u64=4}}}, 200, 1000) = 1
09:41:07 accept4(4, {sa_family=AF_INET, sin_port=htons(42809),
sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 5
09:41:07 setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
09:41:07 write(1, "00000001:ap.accept(0004)=0005 fr"...,
5300000001:ap.accept(0004)=0005 from [127.0.0.1:42809]
) = 53
09:41:07 accept4(4, 0x7fffcd43fe00, [128], SOCK_NONBLOCK) = -1 EAGAIN
(Resource temporarily unavailable)
09:41:07 recvfrom(5, 0x162a104, 8192, 0, 0, 0) = -1 EAGAIN (Resource
temporarily unavailable)
09:41:07 epoll_ctl(3, EPOLL_CTL_ADD, 5, {EPOLLIN|0x2000, {u32=5, u64=5}}) =
0
09:41:07 epoll_wait(3, {{EPOLLIN, {u32=5, u64=5}}}, 200, 1000) = 1
09:41:07 recvfrom(5, "GET / HTTP/1.0\r\nUser-Agent: Wget"..., 8192, 0,
NULL, NULL) = 112
09:41:07 write(1, "00000001:ap.clireq[0005:ffffffff"...,
5000000001:ap.clireq[0005:ffffffff]: GET / HTTP/1.0
) = 50
09:41:07 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
6900000001:ap.clihdr[0005:ffffffff]: User-Agent: Wget/1.12 (linux-gnu)
) = 69
09:41:07 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
4700000001:ap.clihdr[0005:ffffffff]: Accept: */*
) = 47
09:41:07 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
5600000001:ap.clihdr[0005:ffffffff]: Host: www.mytest.com
) = 56
09:41:07 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
5800000001:ap.clihdr[0005:ffffffff]: Connection: Keep-Alive
) = 58
09:41:07 epoll_ctl(3, EPOLL_CTL_MOD, 5, {EPOLLOUT, {u32=5, u64=5}}) = 0
09:41:07 epoll_wait(3, {{EPOLLOUT, {u32=5, u64=5}}}, 200, 1000) = 1
09:41:07 sendto(5, "HTTP/1.0 503 Service Unavailable"..., 212,
MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 212
09:41:07 shutdown(5, 1 /* send */)      = 0
09:41:07 close(5)                       = 0
09:41:07 write(1, "00000001:ap.clicls[0005:ffffffff"...,
3400000001:ap.clicls[0005:ffffffff]
) = 34
09:41:07 write(1, "00000001:ap.closed[0005:ffffffff"...,
3400000001:ap.closed[0005:ffffffff]
) = 34
09:41:07 epoll_wait(3, {}, 200, 1000)   = 0
09:41:08 epoll_wait(3, {}, 200, 1000)   = 0
09:41:09 epoll_wait(3, {}, 200, 1000)   = 0
09:41:10 epoll_wait(3, {}, 200, 1000)   = 0
09:41:11 epoll_wait(3, {}, 200, 1000)   = 0
09:41:12 epoll_wait(3, {}, 200, 1000)   = 0
09:41:13 epoll_wait(3, ^C <unfinished ...>







>  - compile with full debug options and run through "strace -t":
>    make clean
>    make DEBUG=-DDEBUG_FULL CFLAGS="-g -O0" TARGET=linux2628 \
>     CPU=native USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
>    strace -t ./haproxy -f [...]
> - post the debug/strace output
>
>

  Works OK if I run the command in console one by one!


{}, 200, 1000)   = 0
10:32:48 epoll_wait(3, {}, 200, 1000)   = 0
10:32:49 epoll_wait(3, {{EPOLLIN, {u32=4, u64=4}}}, 200, 1000) = 1
10:32:50 accept4(4, {sa_family=AF_INET, sin_port=htons(42820),
sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 5
10:32:50 setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
10:32:50 write(1, "00000001:ap.accept(0004)=0005 fr"...,
5300000001:ap.accept(0004)=0005 from [127.0.0.1:42820]
) = 53
10:32:50 accept4(4, 0x7fff8e7e8cd0, [128], SOCK_NONBLOCK) = -1 EAGAIN
(Resource temporarily unavailable)
10:32:50 recvfrom(5, 0x20f3104, 8192, 0, 0, 0) = -1 EAGAIN (Resource
temporarily unavailable)
10:32:50 epoll_ctl(3, EPOLL_CTL_ADD, 5, {EPOLLIN|0x2000, {u32=5, u64=5}}) =
0
10:32:50 epoll_wait(3, {{EPOLLIN, {u32=5, u64=5}}}, 200, 1000) = 1
10:32:50 recvfrom(5, "GET / HTTP/1.0\r\nUser-Agent: Wget"..., 8192, 0,
NULL, NULL) = 112
10:32:50 write(1, "00000001:ap.clireq[0005:ffffffff"...,
5000000001:ap.clireq[0005:ffffffff]: GET / HTTP/1.0
) = 50
10:32:50 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
6900000001:ap.clihdr[0005:ffffffff]: User-Agent: Wget/1.12 (linux-gnu)
) = 69
10:32:50 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
4700000001:ap.clihdr[0005:ffffffff]: Accept: */*
) = 47
10:32:50 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
5600000001:ap.clihdr[0005:ffffffff]: Host: www.mytest.com
) = 56
10:32:50 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
5800000001:ap.clihdr[0005:ffffffff]: Connection: Keep-Alive
) = 58
10:32:50 getsockopt(5, SOL_IP, 0x50 /* IP_??? */, 0x20f2c10,
0x7fff8e7e8c2c) = -1 ENOPROTOOPT (Protocol not available)
10:32:50 getsockname(5, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
10:32:50 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 6
10:32:50 fcntl(6, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
10:32:50 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0
10:32:50 connect(6, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("192.168.39.252")}, 16) = -1 EINPROGRESS (Operation now
in progress)
10:32:50 epoll_ctl(3, EPOLL_CTL_DEL, 5, {0, {u32=5, u64=5}}) = 0
10:32:50 epoll_wait(3, {}, 200, 0)      = 0
10:32:50 sendto(6, "GET / HTTP/1.0\r\nUser-Agent: Wget"..., 88,
MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = -1 EAGAIN (Resource temporarily
unavailable)
10:32:50 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLOUT, {u32=6, u64=6}}) = 0
10:32:50 epoll_wait(3, {{EPOLLOUT, {u32=6, u64=6}}}, 200, 1000) = 1
10:32:50 sendto(6, "GET / HTTP/1.0\r\nUser-Agent: Wget"..., 88,
MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 88
10:32:50 epoll_ctl(3, EPOLL_CTL_MOD, 6, {EPOLLIN|0x2000, {u32=6, u64=6}}) =
0
10:32:50 epoll_wait(3, {{EPOLLIN|0x2000, {u32=6, u64=6}}}, 200, 1000) = 1
10:32:50 recvfrom(6, "HTTP/1.1 200 OK\r\nDate: Wed, 25 D"..., 8192, 0,
NULL, NULL) = 1379
10:32:50 close(6)                       = 0
10:32:50 write(1, "00000001:www.srvrep[0005:0006]: "...,
4800000001:www.srvrep[0005:0006]: HTTP/1.1 200 OK
) = 48
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
6800000001:www.srvhdr[0005:0006]: Date: Wed, 25 Dec 2013 02:32:46 GMT
) = 68
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
9100000001:www.srvhdr[0005:0006]: Server: Apache/2.2.8 (Win32)
mod_python/3.3.1 Python/2.5.4
) = 91
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
7700000001:www.srvhdr[0005:0006]: Last-Modified: Tue, 20 Aug 2013 09:18:56
GMT
) = 77
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
7200000001:www.srvhdr[0005:0006]: ETag: "100000000fb2d-440-4e45d8be15ee8"
) = 72
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
5300000001:www.srvhdr[0005:0006]: Accept-Ranges: bytes
) = 53
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
5300000001:www.srvhdr[0005:0006]: Content-Length: 1088
) = 53
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
5000000001:www.srvhdr[0005:0006]: Connection: close
) = 50
10:32:50 write(1, "00000001:www.srvhdr[0005:0006]: "...,
5600000001:www.srvhdr[0005:0006]: Content-Type: text/html
) = 56
10:32:50 write(1, "00000001:www.srvcls[0005:0006]\n",
3100000001:www.srvcls[0005:0006]
) = 31
10:32:50 epoll_wait(3, {}, 200, 0)      = 0
10:32:50 sendto(5, "HTTP/1.1 200 OK\r\nDate: Wed, 25 D"..., 1379,
MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 1379
10:32:50 shutdown(5, 1 /* send */)      = 0
10:32:50 close(5)                       = 0
10:32:50 write(1, "00000001:www.clicls[0005:0006]\n",
3100000001:www.clicls[0005:0006]
) = 31
10:32:50 write(1, "00000001:www.closed[0005:0006]\n",
3100000001:www.closed[0005:0006]
) = 31
10:32:50 epoll_wait(3, {}, 200, 1000)   = 0
10:32:51 epoll_wait(3, {}, 200, 1000)   = 0
10:32:52 epoll_wait(3, ^C <unfinished ...>



The command to build haproxy is  "  make TARGET=linux2628 USE_STATIC_PCRE=1
USE_GETADDRINFO=1 USE_OPENSSL=1 USE_ZLIB=1" and also works OK.

If the command is entered in in console , works OK.

If run the command in a build  script to build haproxy and copy it to dest
dir ,failed, strace output is:


{}, 200, 1000)   = 0
10:25:23 epoll_wait(3, {}, 200, 1000)   = 0
10:25:24 epoll_wait(3, {}, 200, 1000)   = 0
10:25:25 epoll_wait(3, {{EPOLLIN, {u32=4, u64=4}}}, 200, 1000) = 1
10:25:26 accept4(4, {sa_family=AF_INET, sin_port=htons(42819),
sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 5
10:25:26 setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
10:25:26 write(1, "00000001:ap.accept(0004)=0005 fr"...,
5300000001:ap.accept(0004)=0005 from [127.0.0.1:42819]
) = 53
10:25:26 accept4(4, 0x7fff7a9a83f0, [128], SOCK_NONBLOCK) = -1 EAGAIN
(Resource temporarily unavailable)
10:25:26 recvfrom(5, 0x1386104, 8192, 0, 0, 0) = -1 EAGAIN (Resource
temporarily unavailable)
10:25:26 epoll_ctl(3, EPOLL_CTL_ADD, 5, {EPOLLIN|0x2000, {u32=5, u64=5}}) =
0
10:25:26 epoll_wait(3, {{EPOLLIN, {u32=5, u64=5}}}, 200, 1000) = 1
10:25:26 recvfrom(5, "GET / HTTP/1.0\r\nUser-Agent: Wget"..., 8192, 0,
NULL, NULL) = 112
10:25:26 write(1, "00000001:ap.clireq[0005:ffffffff"...,
5000000001:ap.clireq[0005:ffffffff]: GET / HTTP/1.0
) = 50
10:25:26 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
6900000001:ap.clihdr[0005:ffffffff]: User-Agent: Wget/1.12 (linux-gnu)
) = 69
10:25:26 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
4700000001:ap.clihdr[0005:ffffffff]: Accept: */*
) = 47
10:25:26 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
5600000001:ap.clihdr[0005:ffffffff]: Host: www.mytest.com
) = 56
10:25:26 write(1, "00000001:ap.clihdr[0005:ffffffff"...,
5800000001:ap.clihdr[0005:ffffffff]: Connection: Keep-Alive
) = 58
10:25:26 epoll_ctl(3, EPOLL_CTL_MOD, 5, {EPOLLOUT, {u32=5, u64=5}}) = 0
10:25:26 epoll_wait(3, {{EPOLLOUT, {u32=5, u64=5}}}, 200, 1000) = 1
10:25:26 sendto(5, "HTTP/1.0 503 Service Unavailable"..., 212,
MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 212
10:25:26 shutdown(5, 1 /* send */)      = 0
10:25:26 close(5)                       = 0
10:25:26 write(1, "00000001:ap.clicls[0005:ffffffff"...,
3400000001:ap.clicls[0005:ffffffff]
) = 34
10:25:26 write(1, "00000001:ap.closed[0005:ffffffff"...,
3400000001:ap.closed[0005:ffffffff]
) = 34
10:25:26 epoll_wait(3, {}, 200, 1000)   = 0



After I add  "make clean" before " make TARGET=linux2628 USE_STATIC_PCRE=1
USE_GETADDRINFO=1 USE_OPENSSL=1 USE_ZLIB=1" in the script,  haproxy works
OK!!



>
> Regards,
>
> Lukas
>

Reply via email to