I have installed haproxy 2.6.6, socat 1.7.4.1 and have a working load balancer for Exchange. I want to be able to turn off a node for maintenance and have unsuccessfully tried to use socat to do this.
In my haproxy.cfg global section I have:
stats socket /run/haproxy-master.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
When I am using this command
echo "disable server exch01" | sudo socat stdio unix-connect:/run/haproxy-master.sock
I get
unknown command, but maybe one of the following ones is a better match:
show cli level
show cli sockets
show proc
show version
help
prompt
quit
By sending show cli level it returns admin
If I sudo to root I get a few more commands, like
@master
@!
@
operator
reload
user
prompt
But I am missing disable server, show info, etc
So it looks like it is a permission thing, but it doesnt matter whether I am root or admin. It can also be some faulty initiation of stats socket in haproxy?
I have tried different configurations in haproxy.cfg like
stats socket /run/haproxy-master.sock mode 660 level admin expose-fd listeners
stats socket /run/haproxy-master.sock level admin expose-fd listeners
stats socket /run/haproxy-master.sock mode 660 level admin #expose-fd listeners
I have also tried to change permissions on the haproxy-master.sock file and it is currently 777
I am using bash