Repository navigation
Socket.IO not working on QA server, but works fine locally #5345
Replies: 1 comment
|
There is a path mismatch in the posted configuration: Preserve ProxyPass "/api/socket.io/" "http://127.0.0.1:3000/api/socket.io/" upgrade=websocket
ProxyPassReverse "/api/socket.io/" "http://127.0.0.1:3000/api/socket.io/"Put it before the broader You can check the path independently of the browser, from the machine running Node: curl -i 'http://127.0.0.1:3000/api/socket.io/?EIO=4&transport=polling'For an unprotected test server, the response should be HTTP 200 with an Engine.IO open packet starting Apache documents rule ordering and protocol upgrades. Older versions need the HTTP/WebSocket rewrite setup, still preserving your configured path. AI-assisted. On a local Socket.IO 4.8.1 server with your |
Uh oh!
There was an error while loading. Please reload this page.
Here’s a concise explanation you can use to raise a request regarding the Socket.IO not working on QA server:
📌 Subject: WebSocket (Socket.IO) Connection Failing on QA Server — Works Fine Locally
📄 Issue Summary:
We are facing an issue where Socket.IO fails to connect on the QA server (
qastaffing.bridgera.com), while the same setup works perfectly in the local development environment.✅ What’s Working:
/api/socket.io) is properly configured and connects overwss://locally.3000and initializes the socket withpath: '/api/socket.io'.❌ Problem Observed on QA:
WebSocket connection to
wss://qastaffing.bridgera.com/api/socket.io/?EIO=4&transport=websocketfails.Browser console shows:
Network tab shows "Provisional headers are shown" and the request never completes.
🔍 Our Setup:
Apache Reverse Proxy is configured with:
ProxyPass /api/socket.io/ ws://127.0.0.1:3000/socket.io/ProxyPass /api http://127.0.0.1:3000Node.js app is correctly initialized with Socket.IO using:
Angular client connects using:
📌 Request:
We suspect the issue may be related to either:
👉 Kindly help us verify:
/api/socket.io/to the Node.js backend.wss://connections.Let me know if you want this formatted as an email or Jira ticket.
All reactions