Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
611 views
in Technique[技术] by (71.8m points)

segmentation fault - HAProxy ERR_EMPTY_RESPONSE

Server crashes and results in the following nondescript message:

root@haproxy:~# /usr/sbin/haproxy -V -d -Ws -f /etc/haproxy/haproxy.cfg
Available polling systems :
      epoll : pref=300,  test result OK
       poll : pref=200,  test result OK
     select : pref=150,  test result OK
Total: 3 (3 usable), will use epoll.

Available filters :
    [SPOE] spoe
    [COMP] compression
    [CACHE] cache
    [TRACE] trace
Using epoll() as the polling mechanism.
[NOTICE] 005/094332 (1191) : New worker #1 (1192) forked
00000000:www-https.accept(0009)=0015 from [xx.xx.xx.xx:yyyyy] ALPN=<none>
00000000:www-https.clireq[0015:ffffffff]: GET /login/ HTTP/1.1
00000000:www-https.clihdr[0015:ffffffff]: user-agent: Wget/1.20.3 (linux-gnu)
00000000:www-https.clihdr[0015:ffffffff]: accept: */*
00000000:www-https.clihdr[0015:ffffffff]: accept-encoding: identity
00000000:www-https.clihdr[0015:ffffffff]: host: app1.domain
[ALERT] 005/094335 (1191) : Current worker #1 (1192) exited with code 135 (Bus error)
[ALERT] 005/094335 (1191) : exit-on-failure: killing every processes with SIGTERM
[WARNING] 005/094335 (1191) : All workers exited. Exiting... (135)

Configuration is valid.

root@haproxy:~# /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -c
Configuration file is valid

Using a pretty standard HAProxy configuration (SSL termination and host-based ACL) such as:

global
    ... <from installation>

default
    ... <from installation>

frontend https
    bind *:443 ssl crt /etc/haproxy/certs/my.cert.pem

    acl a1 hdr_dom(host) -i app1.domain
    acl a2 hdr_dom(host) -i app2.domain

    use_backend b1 if a1
    use_backend b2 if a2

backend b1
    server s1 zz.zz.zz.zz:8000 check

backend b2
    server s2 qq.qq.qq.qq:80 check


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The solution here was to upgrade HAProxy.

Coming from Ubuntu 20.04.1 TLS with haproxy=2.0.13-2ubuntu0.1 , I used https://haproxy.debian.net/ to check for the right PPA.

Same config works fine then.

TL;DR

add-apt-repository ppa:vbernat/haproxy-2.2
apt-get upgrade haproxy

Other than that, folks at https://github.com/haproxy/haproxy/issues are very helpful.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...