Jenkins cli handshake error

A had the same issue. Running Apache/2.4 on linux machine. Adding upgrade=websocket to proxy config fixed it.

Proxy section in apache configuration:

  ProxyPass         "/" "http://localhost:8080/" upgrade=websocket
  ProxyPassReverse  "/" "http://localhost:8080/"