Skip to content

haproxy : parsing [haproxy.cfg:90] and parsing [haproxy.cfg:101] #463

Description

@sontakkerahul3

Getting below error after configuring haproxy.

[root@inha01vr haproxy]# systemctl status haproxy -l
â haproxy.service - HAProxy Load Balancer
Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-02-20 09:29:49 IST; 1min 37s ago
Process: 22275 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS (code=exited, status=1/FAILURE)
Main PID: 22275 (code=exited, status=1/FAILURE)

Feb 20 09:29:49 inha01vr.cloud.vssi.com systemd[1]: Started HAProxy Load Balancer.
Feb 20 09:29:49 inha01vr.cloud.vssi.com haproxy-systemd-wrapper[22275]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Feb 20 09:29:49 inha01vr.cloud.vssi.com haproxy-systemd-wrapper[22275]: [ALERT] 050/092949 (22276) : parsing [/etc/haproxy/haproxy.cfg:90] : 'server cloudapi.vssi.internal.vodafone.com' : invalid address: 'cloudapi.vssi.internal.vodafone.com' in 'cloudapi.vssi.internal.vodafone.com:33333'
Feb 20 09:29:49 inha01vr.cloud.vssi.com haproxy-systemd-wrapper[22275]: [ALERT] 050/092949 (22276) : parsing [/etc/haproxy/haproxy.cfg:101] : 'server cloudws.vssi.internal.vodafone.com' : invalid address: 'cloudws.vssi.internal.vodafone.com' in 'cloudws.vssi.internal.vodafone.com:44444'
Feb 20 09:29:49 inha01vr.cloud.vssi.com haproxy-systemd-wrapper[22275]: [ALERT] 050/092949 (22276) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
Feb 20 09:29:49 inha01vr.cloud.vssi.com haproxy-systemd-wrapper[22275]: [ALERT] 050/092949 (22276) : Fatal errors found in configuration.
Feb 20 09:29:49 inha01vr.cloud.vssi.com haproxy-systemd-wrapper[22275]: haproxy-systemd-wrapper: exit, haproxy RC=1
Feb 20 09:29:49 inha01vr.cloud.vssi.com systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE
Feb 20 09:29:49 inha01vr.cloud.vssi.com systemd[1]: Unit haproxy.service entered failed state.
Feb 20 09:29:49 inha01vr.cloud.vssi.com systemd[1]: haproxy.service failed.
[root@inha01vr haproxy]# vi haproxy.cfg
[root@inha01vr haproxy]# haproxy -V -c -f haproxy.cfg
[ALERT] 050/093616 (22331) : parsing [haproxy.cfg:90] : 'server cloudapi.vssi.internal.vodafone.com' : invalid address: 'cloudapi.vssi.internal.vodafone.com' in 'cloudapi.vssi.internal.vodafone.com:33333'

[ALERT] 050/093616 (22331) : parsing [haproxy.cfg:101] : 'server cloudws.vssi.internal.vodafone.com' : invalid address: 'cloudws.vssi.internal.vodafone.com' in 'cloudws.vssi.internal.vodafone.com:44444'

[ALERT] 050/093616 (22331) : Error(s) found in configuration file : haproxy.cfg
[ALERT] 050/093616 (22331) : Fatal errors found in configuration.
[root@inha01vr haproxy]#

below is my haproxy configuration:

global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
log 127.0.0.1 local2

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

# turn on stats unix socket
stats socket /var/lib/haproxy/stats

#---------------------------------------------------------------------

common defaults that all the 'listen' and 'backend' sections will

use if not designated in their block

#---------------------------------------------------------------------
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000

#---------------------------------------------------------------------

main frontend which proxys to the backends

#---------------------------------------------------------------------
listen stats :9000
stats enable
stats realm Haproxy\ Statistics
stats uri /haproxy_stats
stats auth admin:password
stats refresh 30
mode http

frontend main1
bind *:8443
default_backend router8443
mode http

backend router8443
balance roundrobin
mode http
server cloud.vssi.internal.vodafone.com cloud.vssi.internal.vodafone.com:8443 check

frontend main2
bind *:33333
default_backend router33333
mode http

backend router33333
balance roundrobin
mode http
server cloudapi.vssi.internal.vodafone.com cloudapi.vssi.internal.vodafone.com:33333 check

frontend main3
bind *:44444
default_backend router44444
mode http

backend router44444
balance roundrobin
mode http
server cloudws.vssi.internal.vodafone.com cloudws.vssi.internal.vodafone.com:44444 check

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions