【问题标题】:HAproxy SSL Segfault with 1.5-dev17HAproxy SSL Segfault 与 1.5-dev17
【发布时间】:2013-01-18 04:10:24
【问题描述】:

尝试在 1.5-dev17 上启用 ssl 时出现段错误

Ubuntu 服务器 12.04

尝试了几乎所有我能想到的变体,将私钥和 CA 捆绑包连接起来并用作单个 crt,还尝试使用私钥和 ca 文件作为 CA 捆绑包拆分 crt。

/etc/haproxy/haproxy.cfg

global
   maxconn 4096
   daemon

defaults
   mode   http
   contimeout   5000
   clitimeout   50000
   srvtimeout   50000
   option forwardfor
   retries 3
   option redispatch
   option http-server-close

frontend http
   bind *:80
   reqadd X-Forwarded-Proto:\ http
   default_backend unicorn

frontend https
   bind *:443 ssl crt /path/to/private.key ca-file /path/to/bundle.crt
   reqadd X-Forwarded-Proto:\ https
   default_backend unicorn

backend unicorn
   server unicorn 127.0.0.1:8080 check

listen stats :8081
   mode http
   stats enable
   stats scope unicorn
   stats realm Haproxy\ Statistics
   stats uri /
   stats auth haproxy:YOURPASSWORDHERE

gdb 输出

Reading symbols from /usr/local/sbin/haproxy...done.
(gdb) run -f /etc/haproxy/haproxy.cfg
Starting program: /usr/local/sbin/haproxy -f /etc/haproxy/haproxy.cfg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x000000000045edc0 in bind_parse_ssl (args=<optimized out>, cur_arg=<optimized out>, px=<optimized out>, conf=<optimized out>, err=<optimized out>) at src/ssl_sock.c:2566
2566            list_for_each_entry(l, &conf->listeners, by_bind)

【问题讨论】:

  • 确认在 dev14 中没有问题,早期版本一切正常
  • 你在 bundle.crt 中有什么键?

标签: openssl load-balancing haproxy


【解决方案1】:

你的配置不会让我崩溃 haproxy-1.5-dev17。但是,您是否没有任何机会在没有启用 ssl 支持的情况下进行第一次构建,然后只使用 ssl 进行部分重建? 我的意思是,类似:

$ make TARGET=linux2628
...
$ make TARGET=linux2628 USE_STATIC_PCRE=1 USE_OPENSSL=1

如果是这样,您的构建可能无效,因为某些需要重新编译的文件没有重新编译。

你可以试试:

make TARGET=linux2628 USE_STATIC_PCRE=1 USE_OPENSSL=1 clean all

【讨论】:

  • 很好的建议,会试一试并反馈
猜你喜欢
  • 2013-10-14
  • 1970-01-01
  • 2014-01-22
  • 2013-09-03
  • 2013-12-28
  • 2013-12-10
  • 1970-01-01
  • 2021-12-28
  • 2018-09-15
相关资源
最近更新 更多