I tried a few requests
curl --insecure https://baz.example.com:64443
baz on 3443
curl --insecure https://baz.example.com:64443
baz on 3443
curl --insecure https://baz.example.com:64443
baz on 3443
curl --insecure https://baz.example.com:64443
Default on 1443
curl --insecure https://baz.example.com:64443
Default on 1443
curl --insecure https://baz.example.com:64443
baz on 3443
and this is what I got
sudo cat /var/log/haproxy.log
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy foo_ft_https
started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy foo_ft_https
started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy
foo_bk_default started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy
foo_bk_default started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy foo_bk_bar
started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy foo_bk_bar
started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy foo_bk_baz
started.
Jul 2 21:26:35 no-redirect-www-org haproxy[27154]: Proxy foo_bk_baz
started.
Jul 2 21:26:46 no-redirect-www-org haproxy[18887]: 127.0.0.1:34777
[02/Jul/2015:21:26:46.256] foo_ft_https foo_bk_default/foo_srv_default
1/0/16 3777 -- 0/0/0/0/0 0/0
Jul 2 21:26:47 no-redirect-www-org haproxy[18887]: 127.0.0.1:34779
[02/Jul/2015:21:26:47.108] foo_ft_https foo_bk_default/foo_srv_default
1/0/19 3777 -- 0/0/0/0/0 0/0
But in the console I also see this:
[ALERT] 182/212643 (27154) : sendto logger #1 failed: No such file or
directory (errno=2)
[ALERT] 182/212643 (27154) : sendto logger #2 failed: No such file or
directory (errno=2)
[ALERT] 182/212644 (27154) : sendto logger #1 failed: No such file or
directory (errno=2)
[ALERT] 182/212644 (27154) : sendto logger #2 failed: No such file or
directory (errno=2)
[ALERT] 182/212645 (27154) : sendto logger #1 failed: No such file or
directory (errno=2)
[ALERT] 182/212645 (27154) : sendto logger #2 failed: No such file or
directory (errno=2)
[ALERT] 182/212647 (27154) : sendto logger #1 failed: No such file or
directory (errno=2)
[ALERT] 182/212647 (27154) : sendto logger #2 failed: No such file or
directory (errno=2)
Obviously something is wrong with my logging config, this is what I have:
https://gist.github.com/coolaj86/2faa07aa535e6dc04639
*For reference:*
To get it to log at all I had to set the log socket
global
log /var/lib/haproxy/dev/log local0
And I had to restart the log daemon (it wasn't restarted when I installed
haproxy)
sudo service rsyslog restart
And then the log appeared as
/var/log/haproxy.log
*This is what I fumbled through before I figured that out:*
First I tried what was already in the default config
global
log /dev/log local0
I restarted and tried a few requests, but I found very little in the log
directory
sudo grep -iR haproxy /var/log/
and this came up in the console
[ALERT] 182/210919 (25797) : sendto logger #1 failed: No such file or
directory (errno=2)
[ALERT] 182/210919 (25797) : sendto logger #2 failed: No such file or
directory (errno=2)
Next I tried using an actual ip address, but that still yielded nothing
global
log 127.0.0.1 local0
I googled a bit and found that the appropriate log conf is installed
sudo vim /etc/rsyslog.d/49-haproxy.conf
But the log socket didn't exist until after I manually restarted the
logging daemon
# nothing here
sudo ls /var/lib/haproxy/dev/log
sudo service rsyslog restart
# now it exists
sudo ls /var/lib/haproxy/dev/log
So I set the log yet again
global
log /var/lib/haproxy/dev/log local0
I restarted the server and now it works, more or less
AJ ONeal
(317) 426-6525