【问题标题】:HA Proxy fails to start - failed to drop supplementary groupsHA 代理无法启动 - 未能删除补充组
【发布时间】:2020-01-24 14:03:33
【问题描述】:

我正在为我们的服务器设置 HAProxy,但在尝试启动它时遇到了问题。当我从 /etc/init.d 调用 haproxy 脚本时,它只告诉我它无法启动:

Starting haproxy:                                          [FAILED]

在运行命令haproxy -db -f /etc/haproxy/haproxy.cfg 时,我得到以下信息:

[WARNING] 023/125320 (15540) : parsing [/etc/haproxy/haproxy.cfg:19] : 'option httplog' not usable with frontend 'https' (needs 'mode http'). Falling back to 'option tcplog'.
[WARNING] 023/125320 (15540) : [haproxy.main()] Failed to drop supplementary groups. Using 'gid'/'group' without 'uid'/'user' is generally useless.
[ALERT] 023/125320 (15540) : [haproxy.main()] Cannot set gid 7058355.

选项 httplog 我可以很容易地修复,但我不知道supplementary groups 警告或cannot set gid 警报来自哪里。由于遗留环境需求,我正在使用 haproxy 1.6.7 版本,并且具有以下配置文件:

global
  log 127.0.0.1   local0
  log 127.0.0.1   local1 notice
  #log loghost    local0 info
  maxconn 4096
  #debug
  #quiet
  user <User name here.  Already checked that user exists on server>
  group <Group name here.  Already checked that group exists on server and that user is part of it>

defaults
  log     global
  mode    http
  retries 3
  timeout client 50s
  timeout connect 5s
  timeout server 50s
  option dontlognull
  option httplog
  option redispatch
  balance  roundrobin

# Set up application listeners here.

listen admin
  bind 127.0.0.1:22002
  mode http
  stats uri /


frontend http
  maxconn 2000
  bind 0.0.0.0:4000
  default_backend servers-http

frontend https
  mode tcp
  maxconn 2000
  bind 0.0.0.0:4001
  default_backend servers-https


backend servers-http
  server <Server Name Here> <IP Address Here>:4002 weight 1 maxconn 100 check

backend servers-https
  mode tcp
  server <Server Name Here> <IP Address Here>:4003 weight 1 maxconn 100 check
  option ssl-hello-chk

我真的不知道从这里去哪里。

【问题讨论】:

  • server fault 是这个问题的更好的地方
  • 我什至不知道服务器有堆栈交换。不过我想通了。

标签: proxy configuration config haproxy


【解决方案1】:

我发现了这个特殊问题。我需要将用户和所有者设置为 root。

global
  log 127.0.0.1   local0
  log 127.0.0.1   local1 notice
  #log loghost    local0 info
  maxconn 4096
  #debug
  #quiet
  user root
  group root

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-07
    • 2016-12-25
    • 2017-09-08
    • 2015-05-10
    相关资源
    最近更新 更多