Hi,

Am 01.05.2016 um 18:18 schrieb Jonathan Matthews:
> frontend my_frontend

>     bind :80
>     acl global hdr(host) -i blablabla
>     use_backend my_backend if global
> backend my_backend
>     server google www.google.com:80 <http://www.google.com:80>

Given that you don't alter the Host header before submitting the request to Google, I'm not sure what you're expecting to happen.


This has been previously troubleshooted on discourse and I advised to post this to the mailing list.

This is not about when the Host header is actually blablabla. Its about when its not:

The ACL doesn't match, and no backend is selected, no server can be connected to. That's why we see NOSRV in the log. However, we also see the SC flag, which implies that there was a network problem while connecting to a backend server. Which is not true in this case, because we never even opened a socket to the backend.



Why do you think it's misleading?

We don't open a backend socket, so we shouldn't imply (by the SC flag) that there is a network problem on the backend.

Here's how this looks trough strace (you can see the only involved sockets are the one on the frontend and the syslog socket):

18:32:55.530183 epoll_wait(3, {{EPOLLIN, {u32=4, u64=4}}}, 200, 1000) = 1
18:32:55.874843 gettimeofday({1462120375, 874872}, NULL) = 0
18:32:55.874934 accept4(4, {sa_family=AF_INET, sin_port=htons(34934), sin_addr=inet_addr("10.0.0.55")}, [16], SOCK_NONBLOCK) = 6
18:32:55.875060 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0
18:32:55.875222 accept4(4, 0xbf81501c, [128], SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable) 18:32:55.875356 recv(6, 0x926e318, 15360, 0) = -1 EAGAIN (Resource temporarily unavailable) 18:32:55.875392 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLRDHUP, {u32=6, u64=6}}) = 0
18:32:55.875392 gettimeofday({1462120375, 875392}, NULL) = 0
18:32:55.875392 epoll_wait(3, {{EPOLLIN, {u32=6, u64=6}}}, 200, 1000) = 1
18:32:55.875898 gettimeofday({1462120375, 875920}, NULL) = 0
18:32:55.875972 recv(6, "GET / HTTP/1.1\r\nUser-Agent: curl"..., 15360, 0) = 73
18:32:55.876758 epoll_ctl(3, EPOLL_CTL_DEL, 6, {0, {u32=6, u64=6}}) = 0
18:32:55.877220 gettimeofday({1462120375, 877361}, NULL) = 0
18:32:55.877643 epoll_wait(3, {}, 200, 0) = 0
18:32:55.878121 gettimeofday({1462120375, 878261}, NULL) = 0
18:32:55.878507 send(6, "HTTP/1.0 503 Service Unavailable"..., 212, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE) = 212
18:32:55.879024 shutdown(6, SHUT_WR)    = 0
18:32:55.879460 close(6)                = 0
18:32:55.879868 sendmsg(5, {msg_name(16)={sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("10.0.0.3")}, msg_iov(8)=[{"<46>May 1 18:32:55 ", 20}, {"haproxy", 7}, {"[", 1}, {"9363", 4}, {"]: ", 3}, {"", 0}, {"10.0.0.55:34934 [01/May/2016:18:"..., 136}, {"\n", 1}], msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 172




Regards,

Lukas


Reply via email to