Magicking/Clixplorer

Can't connect to my private network

timjp87 opened this issue · 1 comments

Hello,

first of all thank you for your work. I set up a PoA Network with Puppeth on one of my cloud instances. From looking at your code it looks like the endpoint is defined in js/index.js and uses a websocket connection. So I added another node manually which also has a websocket at ws://127.0.0.1:8546.
When I build the explorer and launch a Python HTTP Server from the root I can see that it changed to Label and URL, but it doesn't display any block info from my fully synchronized full node running the websocket. I also tried wss:// as protocol, but with no success.
Am I missing something?

In the Chrome Dev Console I'm getting:
bundle.js:109338 WebSocket connection to 'wss://127.0.0.1:8546/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

With ws:// or just 127.0.0.1:8546 I'm getting "Cannot construct URL" or other errors. So it seems to be somewhat correct at least. I also checked the port on my Websocket enabled node.
INFO [05-31|09:18:51] WebSocket endpoint opened url=ws://127.0.0.1:8546

I'm starting the node simply with --ws.
--ws Enable the WS-RPC server
--wsaddr value WS-RPC server listening interface (default: "localhost")
--wsport value WS-RPC server listening port (default: 8546)
--wsapi value API's offered over the WS-RPC interface
--wsorigins value Origins from which to accept websockets requests
I'd assume that websocket requests from localhost are accepted by default and that the right apis are exposed fro the explorer?

EDIT: with --wsorigins="*" as someone suggested on StackOverflow it still doesn't work.
EDIT2: Also added --wsaddr="0.0.0.0" and changed the wss://:8546 address in index.js to my external IP of this instance now I'm getting:
WebSocket connection to 'wss://:8546/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

Looks I need a certificate?

EDIT3: Ok now I figured out the difference between wss:// and ws:// it's basically like http vs https. With ws:// + my external IP + --wsaddr="0.0.0.0" and --wsorigins="*" it works.

Hope that helps someone in the future.

Thanks!

Hey sorry for the late response but thankfully you figured it out, if you want to contribute you can add documentation on that :D (otherwise I saved it in the Wiki)