Comments (9)
Used the polkadot api locally and got the genesis hash!
Thanks a lot!
from subport.
Hello @noahsalvadordenjo
I understand that you are trying to run a Substrate node on google cloud and connect the Polkadot JS Apps UI to it. There are a few ways to do this. I'll describe the easiest technique first, then a more robust technique. I'll also observe that getting the UI to connect is unrelated to telemetry.
Using an Insecure Websocket (ws)
When you run your node in google cloud you need to give it the --ws-external
flag which opens up your websocket endpoint to receive traffic from the public internet. So your run command might look something like this.
# Run a dev node
./target/release/substrate --dev --ws-external
# Or in general
./path/to/substrate <your preferred flags> --ws-external
Now that your web socket is open to the public, you can open your web browser. (Firefox will not work for this purpose because it will not allow an https site to connect to a ws websocket, work around this for now by using a different browser). You can navigate to https://polkadot.js.org/apps/#/settings. Enable the custom endpoint
slider, and then enter your url as
ws://<your gcloud ip addr>:9944
. Of course you need to make sure that port 9944 is actually open in your cloud server's firewall.
At this point you should be good to go. If you want to use firefox with the insecure websocket, you will need to host the Apps UI locally. Instructions for that are in its github repo. Firefox also works with the wss method (read on).
Using a Secure Websocket (wss)
If you are using this node for more than just playing around and learning, you'll eventually want a proper wss endpoint. To get one, you can use nginx on your server to act as a reverse proxy. You can reference the official docs and my notes for tips on setting this up and an example configuration file.
When using a secure websocket, you no longer need --ws-external
and you can use any browser including firefox.
from subport.
Thanks a lot,
if i run the node
./target/release/node-template --base-path /tmp/alice --chain local --alice --po
rt 30333 --ws-port 9944 --rpc-port 9933 --telemetry-url 'ws://telemetry.polkadot.io:1024 0' --ws-external
and connect polkadot with my external ip wss://35.223.179.7:9944 i still have the following error:
You are not connected to a node. Ensure that your node is running and that the Websocket endpoint is reachable.
I know that with ethereum I had to specify my internal ip with --rpcaddr. How do I specify my internal ip?
from subport.
The problem is that you specified the wrong endpoint. You wrote wss://35.223.179.7:9944
. But it should be ws://35.223.179.7:9944
. Unless you setup nginx like I described (or do something analogous) you are using an insecure ws
endpoint.
from subport.
I've enabled my firewall port to allow al incoming traffic and i still have the following error
You are not connected to a node. Ensure that your node is running and that the Websocket endpoint is reachable.
You are connecting from a secure location to an insecure WebSocket (ws://35.223.179.7:9944). Due to browser mixed-content security policies this connection type is not allowed. Change the RPC service to a secure 'wss' endpoint.
from subport.
Are you using firefox?
(Firefox will not work for this purpose because it will not allow an https site to connect to a ws websocket, work around this for now by using a different browser)
from subport.
chrome
from subport.
Is it possible to change
Prometheus server started at 127.0.0.1:9615
to use my internal ip?
from subport.
I haven't seen that issue on chrome. It's possible that they have updated to the same policy as firefox. In that case you have two options.
- Setup the reverse proxy so your node has a wss endpoint.
- Host the UI locally ([instructions[(https://github.com/polkadot-js/apps#development))
from subport.
Related Issues (20)
- Rococo slot request for Myriad Social HOT 1
- Reset bifrost(2030) HOT 1
- Request for Permanent Slot for MD5 Network
- Request for Permanent Slot for July Network HOT 18
- Rococo Slot Request
- Rococo Slot Request HOT 4
- Permanent slot for Subsocial (update Soonsocial data) HOT 1
- Rococo slot request from Phala Network HOT 2
- revive Integritee parachain HOT 1
- Run statemint full node HOT 1
- how to config the new version of customSpec.json? HOT 3
- [Parachain] panicked at 'set_validation_data inherent needs to be present in every block!' HOT 14
- Societal Rococo Slot Request HOT 3
- Slot Renew for Para Id 2006, a permanent slot if available HOT 3
- Acurast Rococo Long Term Slot HOT 13
- Request for a temporary slot on Rococo Testnet HOT 1
- Re-onboard Catalyst to Rococo (2023 edition) HOT 2
- Rococo Contracts faucet not working HOT 2
- Additional Contracts nodes
- Fennel Protocol HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from subport.