Openstack Harproxy 配置文件



我有两台机器已经安装了openstack(使用RDO一体机)。一台计算机的 IP 地址是 10.0.3.139。另一个 IP 地址是 10.0.3.113。我按照官方文档配置了haproxy.cfg。这是配置文件:

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

当我跑步时

haproxy -f openstack-haproxy.cfg

它说

[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.

我的配置文件哪里错了?有人可以帮助我吗?或者我应该怎么做 openstack-haproxy ?多谢!

添加组,将用户添加到组

[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)

检查您是否有" haproxy"用户,您将需要它来启动服务

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

如果不存在

#useradd -g haproxy haproxy

相关内容

  • 没有找到相关文章

最新更新