无法在 haproxy 上绑定端口

无法在 haproxy 上绑定端口

我正在尝试在不同的端口上绑定多个证书,但出现以下错误:

[ALERT] 308/144418 (17671) : Starting frontend https_in: cannot bind socket [10.12.61.12:444]

这是配置

frontend https_in
        bind 10.12.61.11:80
        bind 10.12.61.11:443 ssl crt /etc/ssl/certs/domain1.com.pem
        bind 10.12.61.12:444 ssl crt /etc/ssl/certs/sub.domain1.com.pem

        mode tcp

        acl domain_site1 hdr(host) -i site.domain.com
        use_backend bk_domain1 if domain_site1

        acl domain_site2 hdr(host) -i site.sub.domain.com
        use_backend bk_domain1 if domain_site2

backend bk_domain1
        balance leastconn

        server node1 10.0.20.16:80 check
        server node2 10.0.20.18:80 check

Netstat 没有显示在端口 444 上监听的任何内容,所以我不确定为什么会失败。

这是输出ip addr

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 
  link/ether 00:15:5d:14:91:07 brd ff:ff:ff:ff:ff:ff
  inet 10.12.61.55/24 brd 10.12.61.255 scope global dynamic eth0
    valid_lft 691041sec preferred_lft 691041sec 
  inet 10.12.61.11/32 scope global eth0
    valid_lft forever preferred_lft forever
  inet 10.12.61.12/32 scope global eth0
    valid_lft forever preferred_lft forever
  inet6 fe80::215:5dff:fe14:9107/64 scope link
    valid_lft forever preferred_lft forever

答案1

您可能需要更新服务器上的端口配置

/etc/services

snpp            444/tcp                         # Simple Network Paging Protocol
snpp            444/udp                         # Simple Network Paging Protocol

https           444/tcp                         # http protocol over TLS/SSL
https           444/udp                         # http protocol over TLS/SSL
https           444/sctp                        # http protocol over TLS/SSL

相关内容