3

I'm currently running a node on a cloud machine and I'm running into several issues when trying to connect to it using the Polkadot Portal.

I've tried doing it in two ways, the first is by running the node using a docker image I've created and binding its ports. I have set up a reverse-proxy as per Polkadot's documentation (here). When I try accessing the node using the Polkadot Explorer, I get the following error in the console: WebSocket connection to 'wss://{cloud_ip_address}/' failed.

This made me think it could be a problem with docker, so I tried running the node natively in the machine without using it. This proved to go at least one step further, since the node was able to receive the connection attempt, but then it says the following in the node's output:

Accepted a new tcp connection from {my_ip_address:random_port}.
WS Error <Http(Token)>: Invalid byte where token is required.

Could someone please help me understand what I am doing wrong and how I can connect to the cloud hosted node?

PS. The command used to run the node was:

./path/to/binary --chain ./chainSpecRaw.json --force-authoring --base-path /tmp/node \
 --name "Test Node" --ws-external --rpc-external --rpc-cors all --allow-private-ipv4
2
  • Can you include the entire command that you're using to run your node? May 2, 2022 at 4:53
  • yeah, added it now May 2, 2022 at 8:17

2 Answers 2

1

I've managed to fix my issue by setting up a proper certificate instead of using the self signed one. Once that was done, everything worked as expected.

0

As you are connecting from outside to your node you probably have to pass the inscure flags too --rpc-methods unsafe --ws-external --rpc-external the last one is only if you need rpc external access, in your case --ws-external would be ok.

1
  • I had all those parameters already added except for the rpc-methods, tried adding it as well, but no success May 2, 2022 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.