H
H
Hamlet Muradyan2016-06-22 19:49:08
HAproxy
Hamlet Muradyan, 2016-06-22 19:49:08

SSL_ERROR_RX_RECORD_TOO_LONG when balancing WebSocket over Haproxy?

Good afternoon.
There is WebSocket Server. There is a server on which stands Haproxy. I want to make balancing WS.
After enabling SSL, my Firefox gives an error: SSL_ERROR_RX_RECORD_TOO_LONG
Google Chrome, in turn, also gives an error: net::ERR_SSL_PROTOCOL_ERROR
After several attempts, they successfully connect to the server.
Here is my Haproxy config.

global
  log /dev/log	local0
  log /dev/log	local1 notice
  chroot /var/lib/haproxy
  maxconn 2048
  tune.ssl.default-dh-param 2048
  tune.maxaccept -1

  # Default SSL material locations
  ca-base /etc/ssl/certs
  crt-base /etc/ssl/private

  ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
  ssl-default-bind-options no-sslv3

defaults
  log	global
  mode	http
  option	httplog
  option	dontlognull

  # Add x-forwarded-for header.
  option forwardfor
  option redispatch
  option http-server-close

        timeout connect 50000
        timeout client 50000
        timeout server 50000

  timeout tunnel 2h

  errorfile 400 /etc/haproxy/errors/400.http
  errorfile 403 /etc/haproxy/errors/403.http
  errorfile 408 /etc/haproxy/errors/408.http
  errorfile 500 /etc/haproxy/errors/500.http
  errorfile 502 /etc/haproxy/errors/502.http
  errorfile 503 /etc/haproxy/errors/503.http
  errorfile 504 /etc/haproxy/errors/504.http

frontend frontend_rest
  bind :80
  reqadd X-Forwarded-Proto:\ http
  default_backend backend_rest

frontend frontend_rest_ssl
  bind :443 ssl crt /etc/ssl/private/***.pem
  reqadd X-Forwarded-Proto:\ https
  default_backend backend_rest

frontend frontend_websocket
        bind :1234
  timeout client 3600s
        default_backend backend_websocket

frontend frontend_websocket_ssl
        bind :1234 ssl crt /etc/ssl/private/***.pem
  timeout client 3600s
        default_backend backend_websocket

backend backend_rest
  balance roundrobin
  mode http
  server app1 ###.###.###.###:80 check

backend backend_websocket
  timeout connect   5s
        timeout queue     5s
        timeout server    3600s
  server broadcaster1 1###.###.###.###:1234 maxconn 32768

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question