Support Article
Websocket protocol not supported
SA-46996
Summary
When using the Fiddler to watch the traffic after logging in, some requests display an HTTP 501 response error. The request has headers with WebSockets and the response has a header that states 'WebSocket protocol not supported'.
Error Messages
HTTP 501 response
Steps to Reproduce
- Log in to the application.
- Capture the traffic using the Fiddler.
Root Cause
The HTTP 501 response is not a fatal error and does not cause side affects.
Resolution
Pega 7.2 and later versions introduced the Server Push Notifications.
For more information, refer to: https://community.pega.com/knowledgebase/articles/real-time-applications-and-push-notifications-pega-7-platform
WebSockets and Long-Polling are the two supported transport protocols for Server Push Notifications. WebSockets is used when displaying a portal. If this fails, downgrade to use Long-Polling.
HTTP 501 signifies that the application that is currently running, does not support WebSockets. This is not a fatal error and the user downgrades to use Long-Polling.
Apache Mod Proxy WebSocket support:
Use mod_proxy_wstunnel.so for WebSockets to work with Apache WebServer using mod_proxy,
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
This is available only in Apache 2.4.5 and later versions.
Add this Proxy pass line such that PRPushServlet uses the WebSocket connection in the backend:
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /prweb/PRPushServlet ws://<prpc_host>:<prpc_port>/prweb/PRPushServlet retry=0
ProxyPass /prweb http://<prpc_host>:<prpc_port>/prweb nocanon
ProxyPassReverse /prweb http://<prpc_host>:<prpc_port>/prweb
Published December 29, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.