polkascan / explorer

Polkascan Substrate Explorer
GNU General Public License v3.0
42 stars 44 forks source link

Connecting to custom substrate node #14

Closed 6636345e closed 1 year ago

6636345e commented 1 year ago

Hello.

I have a seperate customized substrate node in a server and when I try to connect the endpoints using Polkscan explorer, it does not want to connect to the exposed endpoints. *Seen screenshots below:

arjanz commented 1 year ago

The first endpoint labeled "Local node URL" in the connection dialogue is the URL to the Substrate node, so that should also be "ws://10.11.101.23:9944" in your case. You can change this in the UI config file: https://github.com/polkascan/explorer/blob/main/explorer-ui-config.json

6636345e commented 1 year ago
Screenshot 2022-11-08 at 14 21 11
6636345e commented 1 year ago

Also when I run the Substrate node locally, it does connect. But not on the server which is the goa, running the node and explorer on the server.

arjanz commented 1 year ago

Have you run the Substrate node with --ws-external --rpc-cors=all to allow external connections?

6636345e commented 1 year ago

Yes, substrate node with ./target/release/node-template --ws-external --rpc-cors=all. I am not sure if it's because I am running it as Docker docker-compose up --build and I noticed that the DOCKER image is pulled from arjanz/substrate-node-template:latest but I want it to connect to the local substrate node not use the node from the docker image.

arjanz commented 1 year ago
  • Thanks for the response!
  • But I have changed 'Local node URL' to 'ws://10.11.101.23:9944' but it still display "connecting".
  • Check screenshots below

I still see ws://127.0.0.1:9944 in stead of ws://10.11.101.23:9944 in your screenshot, I think because it's stored in your browser's local storage. What if you manually replace it there with ws://10.11.101.23:9944?

I noticed that the DOCKER image is pulled from arjanz/substrate-node-template:latest but I want it to connect to the local substrate node not use the node from the docker image.

Yes this was actually temporary hosted from my personal Docker hub account, thanks for noticing, I'll replace it with the Polkascan one as it should.

6636345e commented 1 year ago

I still see ws://127.0.0.1:9944 in stead of ws://10.11.101.23:9944 in your screenshot, I think because it's stored in your browser's local storage. What if you manually replace it there with ws://10.11.101.23:9944?

Oh yes thank you, it was stored in my browser's local storage, thank you now it connects

Yes this was actually temporary hosted from my personal Docker hub account, thanks for noticing, I'll replace it with the Polkascan one as it should.

Glad I helped while asking help myself, thanks for assistance.