haproxy启动失败,报错。
Haproxy.cfg文件的截图如下
systemctl status haproxy.service显示如下
haproxy.service - SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments.
Loaded: loaded (/etc/rc.d/init.d/haproxy; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 五 2020-09-11 21:49:48 CST; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 4179 ExecStart=/etc/rc.d/init.d/haproxy start (code=exited, status=1/FAILURE)
9月 11 21:49:48 k8s-master haproxy[4179]: [ALERT] 254/214948 (4183) : parsing [/etc/haproxy/haproxy.cfg:77] : 'server inst1' unknown keyword 'fail'. Registered keywords :[ ALL] id
9月 11 21:49:48 k8s-master haproxy[4179]: [ALERT] 254/214948 (4183) : parsing [/etc/haproxy/haproxy.cfg:78] : 'server inst2' unknown keyword 'fail'.
9月 11 21:49:48 k8s-master haproxy[4179]: [ALERT] 254/214948 (4183) : parsing [/etc/haproxy/haproxy.cfg:85] : error opening file for custom error message .
9月 11 21:49:48 k8s-master haproxy[4179]: [ALERT] 254/214948 (4183) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
9月 11 21:49:48 k8s-master haproxy[4179]: [ALERT] 254/214948 (4183) : Fatal errors found in configuration.
9月 11 21:49:48 k8s-master systemd[1]: haproxy.service: control process exited, code=exited status=1
9月 11 21:49:48 k8s-master haproxy[4179]: Errors found in configuration file, check it with 'haproxy check'.
9月 11 21:49:48 k8s-master systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments..
9月 11 21:49:48 k8s-master systemd[1]: Unit haproxy.service entered failed state.
9月 11 21:49:48 k8s-master systemd[1]: haproxy.service failed.
后来尝试把 红框中两个inst换成相应主机主机名,还是不行,报同样的错误