Am 09-11-2015 11:34, schrieb Willy Tarreau:
Hi Aleks,

On Sun, Nov 08, 2015 at 04:24:29PM +0100, Aleksandar Lazic wrote:
Hi.

Today I have tried to debug haproxy as in the old days ;-), I was not
able to see the communication on stderr.

I'm sure I have something missed in the past on the list to be able to
see the output.

I use it every day and I just retested, it still works for me. Are you
sure you don't have another instance still listening to the same port
and receiving the traffic ? It already happened to me a few times,
reason why I'm asking :-)

Thanks. I also tough like this but no the request reaches the right instanze.

export MONITOR_BIND_PORT=7991 && export HTTP_BIND_PORT=7992 && export HTTPS_BIND_PORT=7993 && strace -fveall -s1024 haproxy-1.6.2/haproxy -f haproxy.conf -d -V

########
...
epoll_wait(3, {}, 200, 1000)            = 0
epoll_wait(3, {{EPOLLIN, {u32=5, u64=5}}}, 200, 1000) = 1
accept4(5, {sa_family=AF_INET, sin_port=htons(52310), sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 7
setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
accept4(5, 0x7ffca18022c0, [128], SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable) recvfrom(7, "GET / HTTP/1.1\r\nUser-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3\r\nHost: 127.0.0.1:7992\r\nAccept: */*\r\n\r\n", 16384, MSG_PEEK, NULL, NULL) = 166
close(7)                                = 0
epoll_wait(3, {}, 200, 1000)            = 0
...
########

Other terminal.

########
curl -vk http://127.0.0.1:7992/
* About to connect() to 127.0.0.1 port 7992 (#0)
*   Trying 127.0.0.1... connected
GET / HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: 127.0.0.1:7992
Accept: */*

* Recv failure: Connection reset by peer
* Closing connection #0
curl: (56) Recv failure: Connection reset by peer
########

gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Willy

Reply via email to