0

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 etc

So it looks like it is a permission thing, and since I am root it may be something with the initiation of the stats sockets in haproxy?

I have tried everything

02dag
  • 1
  • 1

1 Answers1

0

I didnt install haproxy by using sudo update install haproxy from Ubuntu itself, Instead I downloaded the latest version of haproxy, which of that time was 2.6.6 and installed it manually. This was a bad decision

That version doesnt install /run/haproxy/admin.sock which socat needs.

I started over and installed from Ubuntu and everything worked as it should.

Could be some libraries missing in the downloadable version or some prereq tasks I have missed.

02dag
  • 1
  • 1