Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sontakkerahul3 opened this issue Feb 20, 2020 · 2 comments
Open

Comments

@sontakkerahul3
Copy link

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

@vfarcic
Copy link
Owner

vfarcic commented Feb 23, 2020

Unfortunately, this project has been abandoned and is not under active development anymore. Everyone switched from Swarm to Kubernetes and, as a result, the number of users of this project dropped to close to zero.

Would you be up for a challenge and try to fix it yourself? If you can create a PR, I'd be happy to merge it and make a new release.

@vfarcic
Copy link
Owner

vfarcic commented Feb 23, 2020

By the way, a long time ago the project moved to docker-flow/docker-flow-proxy. Since then, many new features and fixes were added. You can see that if you go to the project README (https://github.com/vfarcic/docker-flow-proxy).

I would suggest that you first try the latest version of docker-flow/docker-flow-proxy (NOT vfarcic/docker-flow-proxy) and see whether the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants