-
Bug
-
Resolution: Done
-
Medium
-
None
-
None
-
None
-
None
HAProxy only supports syslog unix communication to log its message. It must be done within /dev/log directory.
See https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.1-log and https://unix.stackexchange.com/a/345716 for more details. There might be a way to redirect to syslog using logstach, but it's a more involved fix.
At least, by redirecting the messages to syslog, we will see the haproxy entries in /var/log/syslog
Expected
haproxy messages monitored
Actual
HAProxy Syslog fails to bind to host, as the specified path isn't the syslog one, e.g. where the unix socket is open.
$ kubectl --namespace=onap-aai logs aai-service-3869033750-pn3zf <7>haproxy-systemd-wrapper: executing /usr/local/sbin/haproxy -p /run/haproxy.pid -f /usr/local/etc/haproxy/haproxy.cfg -Ds [ALERT] 330/203633 (8) : sendmsg logger #1 failed: Connection refused (errno=111) [ALERT] 330/203633 (8) : sendmsg logger #2 failed: Connection refused (errno=111) [ALERT] 330/203633 (8) : sendmsg logger #1 failed: Connection refused (errno=111) [ALERT] 330/203633 (8) : sendmsg logger #1 failed: Connection refused (errno=111) [ALERT] 330/203633 (8) : sendmsg logger #1 failed: Connection refused (errno=111)
Fix --> result
root@k8s-adetalhouet-2:/dockerdata-nfs/onap/aai/haproxy/log# tail -f /var/log/syslog Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59986 [27/Nov/2017:21:10:52.189] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/119/21/+140 200 +728 - - ---- 4/4/4/4/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=logical-link&filter=link-name:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59986 [27/Nov/2017:21:10:52.189] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/119/21/+140 200 +728 - - ---- 4/4/4/4/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=logical-link&filter=link-name:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59994 [27/Nov/2017:21:10:52.226] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/128/9/+137 200 +728 - - ---- 3/3/3/3/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=l3-network&filter=network-id:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59994 [27/Nov/2017:21:10:52.226] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/128/9/+137 200 +728 - - ---- 3/3/3/3/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=l3-network&filter=network-id:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59996 [27/Nov/2017:21:10:52.252] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/113/3/+116 200 +729 - - ---- 2/2/2/2/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=physical-link&filter=link-name:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59996 [27/Nov/2017:21:10:52.252] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/113/3/+116 200 +729 - - ---- 2/2/2/2/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=physical-link&filter=link-name:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59992 [27/Nov/2017:21:10:52.226] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/138/9/+147 200 +721 - - ---- 1/1/1/1/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=tenant&filter=tenant-id:EXISTS HTTP/1.1" Nov 27 21:10:52 k8s-adetalhouet-2 haproxy[8]: 10.42.87.134:59992 [27/Nov/2017:21:10:52.226] IST_8443~ IST_AAI_8446/aai-traversal.onap-aai 0/0/138/9/+147 200 +721 - - ---- 1/1/1/1/0 0/0 {aai-service.onap-aai:8443} {} "GET /aai/v9/search/nodes-query?search-node-type=tenant&filter=tenant-id:EXISTS HTTP/1.1"