Missing, duplicated or incorrect header sec-websocket-key

Discussion in 'Server Operation' started by francoisPE, Oct 14, 2022.

  1. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Hello,
    I have an ISPC server with apache2.
    I run nextcloud on one virtualhost and try to setup a notify_push server for that nextcloud.
    This notify_push server is a binary running with systemd which is reachable thanks to a websocket proxy.
    So that I put in related ISPC website apache_directive :
    Code:
    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
        Require all granted
    </Proxy>
    ProxyPass /push/ws ws://127.0.0.1:50004/ws
    ProxyPass /push/ http://127.0.0.1:50004/
    ProxyPassReverse /push/ http://127.0.0.1:50004/
    
    But, unfortunately, testing it with appropriate process it gives
    Code:
    [2022-10-14 23:00:40.757570 +02:00] INFO [test_client] test_client/src/main.rs:29: Found push server at wss://mync.tld/push/ws
    Error:
      × Can't connect to server
      ├─▶ WebSocket protocol error: Missing, duplicated or incorrect header sec-websocket-key
      ╰─▶ Missing, duplicated or incorrect header sec-websocket-key
    
    I am almost convience that's an apache2 issue
    I see in my log
    Code:
    [Fri Oct 14 21:53:04.773790 2022] [proxy:error] [pid 3240304:tid 139890524133120] (9)Bad file descriptor: [client IPhidden] AH03307: ap_proxy_transfer_between_connections: error on sock - ap_pass_brigade
    
    Any idea of what to do ?
     

Share This Page