Openstack Harproxy configure file

4.9k views Asked by At

I have two machines which have already installed openstack(used RDO all-in-one). The IP address of one machine is 10.0.3.139. Another IP address is 10.0.3.113. And I followed official document to configure haproxy.cfg. This is configure file:

global
  chroot  /var/lib/haproxy
  daemon
  group  haproxy
  maxconn  4000
  pidfile  /var/run/haproxy.pid
  user  haproxy

defaults
  log  global
  maxconn  8000
  option  redispatch
  retries  3
  timeout  http-request 10s
  timeout  queue 1m
  timeout  connect 10s
  timeout  client 1m
  timeout  server 1m
  timeout  check 10s

listen dashboard_cluster
  bind 10.0.3.113:443
  balance  source
  option  tcpka
  option  httpchk
  option  tcplog
  server controller1 10.0.3.113:443 check inter 2000 rise 2 fall 5

listen galera_cluster
  bind 10.0.3.113:3306
  balance  source
  option  httpchk
  server controller1 10.0.3.113:3306 check port 9200 inter 2000 rise 2 fall 5

listen glance_api_cluster
  bind 10.0.3.113:9292
  balance  source
  option  tcpka
  option  httpchk
  option  tcplog

When I run

haproxy -f openstack-haproxy.cfg

It says

[ALERT] 000/192001 (45698) : parsing [openstack-haproxy.cfg:4] : cannot find group id    for 'haproxy' (0:Success)
[ALERT] 000/192001 (45698) : parsing [openstack-haproxy.cfg:7] : cannot find user id for 'haproxy' (0:Success)
[ALERT] 000/192001 (45698) : Error(s) found in configuration file : openstack-haproxy.cfg
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'dashboard_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'glance_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'glance_registry_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy  'keystone_admin_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'keystone_public_internal_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'nova_ec2_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'nova_compute_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'nova_metadata_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'cinder_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'ceilometer_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'spice_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'neutron_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'swift_proxy_cluster' since it has no log address.
[ALERT] 000/192001 (45698) : Fatal errors found in configuration.

Where is my configure file wrong ? Could someone help me ? Or what should I do about openstack-haproxy ? Thanks a lot!

2

There are 2 answers

2
lukesUbuntu On BEST ANSWER

Check if you have "haproxy" group & user you will need that to start the service

#egrep -i "^haproxy" /etc/group

if not there

#useradd -g haproxy haproxy
0
AudioBubble On

Add group, Add user to the group

[root@server2 haproxy-1.5.3]# groupadd haproxy
[root@server2 haproxy-1.5.3]# useradd -g haproxy haproxy
[root@server2 haproxy-1.5.3]# id haproxy
uid=500(haproxy) gid=500(haproxy) groups=500(haproxy)