"WebSocket connection to .. failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED"
See original GitHub issueI’m using Thruway and AutobahnJS in a project. Everything works fine on my development machine (Windows running WampServer), but when I tried deploying on my live server I found Autobahn is unable to connect to Thruway.
Here’s my JS code:
var connection = new autobahn.Connection({
url: 'ws://www.pricewombat.com:9090',
realm: 'restricted_realm'
});
connection.open();
The error shown in Chrome’s console is:
WebSocket connection to ‘ws://www.pricewombat.com:9090/’ failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
The error shown in IE’s console is:
SCRIPT12029: WebSocket Error: Network Error 12029, A connection with the server could not be established
I have port 9090
opened in the TCP_IN
and TCP_OUT
lists in my firewall and my hosting company confirmed the port is open.
I believe Thruway is working correctly because when I try pushing a message from a PHP file the SimpleWsServer.php
process outputs debug info showing the message was received, but no output is shown when Autobahn tries to connect.
I’m not 100% sure this is an AutobahnJS issue, but do you have any ideas as to what might be causing this error?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Can you guys show me where in the Thruway code you can change 127.0.0.1 to 0.0.0.0?
Do you have Thruway listening on 127.0.0.1 instead of 0.0.0.0?