Websocket protocol not supported
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'.
HTTP 501 response
Steps to Reproduce
- Log in to the application.
- Capture the traffic using the Fiddler.
The HTTP 501 response is not a fatal error and does not cause side affects.
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:
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
0% found this useful