Issue with web sockets

LabKey Support Forum
Issue with web sockets bront  2022-01-05 13:24
Status: Closed
 

hi,

We are working on setting up 21.11.3-4-nci on Ubuntu 18.04 and are having some problems with web sockets. We're getting 404 errors.

Our LabKey installation resides on a separate server behind an Apache reverse proxy. The only allowed connection is TLS over port 8443.

Here is our current Apache setup:

RewriteEngine on
RewriteCond ${HTTP:Upgrade} websocket [NC]
RewriteCond ${HTTP:Connection} upgrade [NC]
RewriteRule /(.*) wss://172.19.20.190:8443/$1 [P,L]

ProxyPass / https://172.19.20.190:8443/
ProxyPassReverse / https://172.19.20.190:8443/

Any help or examples would be greatly appreciated.

Thanks,

bront

 
 
Jon (LabKey DevOps) responded:  2022-01-05 13:48
Hi Bront,

Have you had a chance to review our docs regarding WebSockets?

https://www.labkey.org/Documentation/wiki-page.view?name=trouble#websocket
https://www.labkey.org/Documentation/wiki-page.view?name=configTomcat#websocket

If I'm looking at your rewrite rule correctly, I think you might be missing the _websocket prefix as described in our docs.

Regards,

Jon
 
bront responded:  2022-01-11 12:15
Status: Active
Hi,

I am glad you found this helpful.

It took us about a day of reading and testing to discover that this code worked all along. Not sure where we were going wrong (might have been associated with "graceful" restarts of Apache, but not sure that was the case either.

Regardless, this is working for us now.

Thanks,

bront
 
bront responded:  2022-01-11 12:17