We have configured HAProxy for load balancing WEBSockets. We are facing issue saying websocket backend server not available in haproxy log. But Websocket server is up and running. To further debug this problem, need to enable stats log.Can anyone point us to the link on how to configure stats or how to further debug this problem
You can find the details of the logging system in the documentation, section 8 .
As an example, here is a basic logging configuration:
global log 127.0.0.1 syslog debug defaults log global mode http option httplog
Never mark backend as failed?
Any issues doing reverse proxy to a backend SSL connection?
Please download the latest code from the below location.
and paste this source code on your linux machine.
How to enable Debug Log:
Make changes in Makefile:
Set parameter: DEBUG= –DDEBUG_FULL (Optionally –DDEBUG_FSM)
Rename file name which is attached with mail (debug_modified.h) to debug.h and replace the debug.h file with /home/user_name/haproxy-1.5.18/include/common/debug.h [In haproxy source code Folder]
#make TARGET=linux2628 [whatever kernel version of your Machine but should be higher or equal to linux-2.6.28, in our case it is greater than Ver-2.6.28 for Centos7.x (x is subversion)]
Run Haproxy with command: (It is standalone binary, so not mandatory of haproxy-systemd-wrapper as of now)
…/Directory_where_haproxy_binary_is/# ./haproxy –f /etc/haproxy/haproxy.cfg –d -V
Note: Log would only for those be created wherever DPRINTF are called in code (For Example Log is thrown on same terminal(tab) in case curl command is fire for checking load balancing).
If you have any confusion then please put on this scrap.
And please like my post