Hi Sander,

I simply did apt-get haproxy and configured in a way whatever first google 
tutorial suggested. It doesn't make sense to read that fine bible manual if you 
want to try things out.

In any case, haproxy does not report any of these warnings and if it fails 
there is no messages at all.


By running haproxy -c -f <cfg> I get the same *warnings* as you do. And at the 
end I get this: "Configuration file is valid"


> Also using the http-no-delay option is heavily discouraged.


That's the only one I really need and that's the point I'm trying to test 
haproxy. I've read manual only for this cfg option 😊

By using '-c -f' at least I know that the option was ignored and that's why I 
didn't see effect that I expected.


________________________________
From: Sander Klein <[email protected]>
Sent: July 30, 2017 8:13 AM
To: p s
Cc: [email protected]
Subject: Re: haproxy fails to properly direct connection to correct back end.

Hi P S,

I have to say, the way you type your emails makes one really want to
help you. You seem to be positive, constructive and I don't see any
whining. And yes, I'm a sarcastic person.

So, for your first problem. I don't know what goes wrong, but with me if
haproxy fails to start, it actually does give back the reason why it
does actually tells me why it doesn't start. The complete error is 'See
"systemctl status haproxy.service" and "journalctl -xe" for details.'
and 'journalxtl -xe' gives it back nicely. Did you read the output?

Now, back to your original issue.

I've build a simple setup, added your config, tried to test it and:

root@wonko-the-sane:/etc/haproxy# haproxy -c -f /etc/haproxy/haproxy.cfg
[WARNING] 210/135916 (26036) : config : 'option forwardfor' ignored for
backend 'nodejs' as it requires HTTP mode.
[WARNING] 210/135916 (26036) : config : 'option forwardfor' ignored for
backend 'nodejs_test' as it requires HTTP mode.
[WARNING] 210/135916 (26036) : config : 'option http-no-delay' ignored
for backend 'nodejs_test' as it requires HTTP mode.
[ALERT] 210/135916 (26036) : http frontend 'all'
(/etc/haproxy/haproxy.cfg:16) tries to use incompatible tcp backend
'nodejs' (/etc/haproxy/haproxy.cfg:1) as its default backend (see
'mode').
[ALERT] 210/135916 (26036) : http frontend 'all'
(/etc/haproxy/haproxy.cfg:16) tries to use incompatible tcp backend
'nodejs_test' (/etc/haproxy/haproxy.cfg:8) in a 'use_backend' rule (see
'mode').
[ALERT] 210/135916 (26036) : Fatal errors found in configuration.

I do not run anything on port 80, nor on 8090 since I do not have to,
because *your config is simply broken*. May I suggest you Read The Fine
Manual (tm)?
https://cbonte.github.io/haproxy-dconv/1.7/configuration.html is a great
HAProxy version 1.7.6 - Configuration Manual - GitHub 
Pages<https://cbonte.github.io/haproxy-dconv/1.7/configuration.html>
cbonte.github.io
This document covers the configuration language as implemented in the version 
specified above. It does not provide any hint, example or advice.


source.

Also using the http-no-delay option is heavily discouraged.

Why the project is not hosted on Github, I simply do not know. I'm not
the author and I do not get to choose. But to be honest, I couldn't care
less where the project is hosted. The support on haproxy has always been
great for me and I do not think github would have made that better. Just
because it is different and maybe a bit old school for some, doesn't
make it really bad. And funny thing is, the other project you are
referring to, nginx, isn't on github either....

Out of office replies to a mailinglist are indeed a bit braindead, but
since I have the option to delete emails they do not bother me. Just
delete them and *poof* go one with your life.

Happy HAProxying!

Sander

Reply via email to