Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Background

The RNode software runs as a server on the RChain network.  The RNode communications software uses gRPC, which uses TLS to secure TCP connections between validators and read-only nodes. The RChain network is a peer to peer network. In order for For a RNode server instance to properly communicate with the rest of the network, secure bi-directional communication must be possible. Validators must be able to send queries to each other and must be able to receive connections from other validators.

Supported Network Configuration

The following network configuration is supported by the RChain communications software supports this network configuration. 

...

RNode server → Router → Internet

The RNode server needs to be directly connected to the router.  The router needs to either support UPnP or have static NAT with port forwarding configured for ports 40400 - 40430.  If you wish to use a different set of ports, specify those at runtime with the --p option.

...

RNode supports the UPnP protocol, which is commonly available on retail routers today. When RNode detects a UPnP gateway device, such as your wireless router, the node software will configure the router's firewall rules automatically. In many small business and home networks, this allows the user to run RNode as a validator without having to reconfigure their network.

Note - Node operators running Docker on Mac OS X will not be successful running RNode with UPnP. If you want to run with Docker on Mac OS X, you must configure static NAT and port forwarding manually. See "Routers without UPnP Support" below.

Info

Test your network

A success message means your configuration should be successful connecting to the RChain network.

An error message means your network configuration may not be successful connecting to the RChain network. You need to investigate your configuration and possibly make changes.

...

Info

Refer to your router's documentation and user guide for specific instructions. 

At a high level, you need to do the followingshould:

  1. The Assure the machine that is running RNode has to be is connected to the router and turned on.
  2. In the router configuration interface, configure Configure static NAT for the machine in the router configuration interface. 
  3. Configure port forwarding for ports 40400 - 40430

...

DeviceAllowed ApplicationsProtocolPort Number
My_RNode_serverRChaintcp40400-40430

Running Docker

If you wish to run rNode from within Docker, you must still configure your network settings to match the supported network configuration.  Additionally, you must run Docker with Running RNode in Docker has additional network configuration requirements. You must. include explicit port mapping options .  By default, Docker runs in network bridge modein your run command with the --p option..  

Example run command:

Code Block
docker run -it -p 40400:40400 --name my_rnode_server -v "$HOME/var":/var rchain/rnode:latest run --default-timeout 6000 --no-upnp -b rnode://address_of_bootstrap_node

Note - Node operators running Docker on Mac OS X will not be successful running RNode with UPnP. If you want to run with Docker on Mac OS X, you must configure static NAT and port forwarding manually. See "Routers without UPnP Support" below.

Successful Connection

You will know if that your node has connected successfully if you see connection messages Look in the console .  Example:

...

for connection confirmation.  Below is an example showing the run command through the confirmation of connection to the bootstrap node.

Code Block
root@salt:~# rnode run --default-timeout 6000 -b rnode://7fa70d245268ed19253f18c802fccd22668a0211@52.119.8.68:40400 --validator-private-key d19bab22bed4d72422e5ae2dc37982635e1d894f5a63dc4f790836a86a05b7ba
18:08:34.299 [main] INFO  c.r.n.configuration.Configuration$ - Starting with profile default
18:08:34.321 [main] INFO  c.r.n.configuration.Configuration$ - Using configuration file: /root/.rnode/rnode.toml
18:08:34.330 [main] WARN  c.r.n.configuration.Configuration$ - Can't load the configuration file: File /root/.rnode/rnode.toml not found
INFO - trying to open ports using UPnP....
INFO - No gateway devices found
INFO - No need to open any port
18:08:43.937 [main] INFO  c.r.node.configuration.Configuration - flag --host was not provided, guessing your external IP address
18:08:44.190 [main] INFO  c.r.node.configuration.Configuration - guessed 52.119.8.64 from source: AmazonAWS service
Using data_dir: /root/.rnode
No certificate found at path /root/.rnode/node.certificate.pem
Generating a X.509 certificate for the node
Generating a PEM secret key for the node
18:08:46.224 [main] INFO  coop.rchain.node.NodeRuntime - RChain Node 0.6.1 (acde1c1a2bc983838a38118653905b0c85ab9c58)
18:08:46.225 [main] INFO  coop.rchain.node.NodeRuntime - Starting node that will bootstrap from rnode://7fa70d245268ed19253f18c802fccd22668a0211@52.119.8.68:40400
18:08:46.501 [main] INFO  o.h.b.c.nio1.NIO1SocketServerGroup - Service bound to address /127.0.0.1:40402
18:08:46.502 [main] INFO  org.http4s.server.blaze.BlazeBuilder -   _   _   _        _ _
18:08:46.503 [main] INFO  org.http4s.server.blaze.BlazeBuilder -  | |_| |_| |_ _ __| | | ___
18:08:46.503 [main] INFO  org.http4s.server.blaze.BlazeBuilder -  | ' \  _|  _| '_ \_  _(_-<
18:08:46.503 [main] INFO  org.http4s.server.blaze.BlazeBuilder -  |_||_\__|\__| .__/ |_|/__/
18:08:46.503 [main] INFO  org.http4s.server.blaze.BlazeBuilder -              |_|
18:08:46.549 [main] INFO  org.http4s.server.blaze.BlazeBuilder - http4s v0.18.0 on blaze v0.12.11 started at http://127.0.0.1:40402/
18:08:46.585 [kamon.prometheus.PrometheusReporter] INFO  kamon.prometheus.PrometheusReporter - Started the embedded HTTP server on http://0.0.0.0:40403
18:08:46.659 [main] INFO  coop.rchain.node.api.GrpcServer$ - gRPC server started, listening on
18:08:47.003 [main] INFO  coop.rchain.node.NodeRuntime - Listening for traffic on rnode://d533e024910f1c4c57eae88c0945a29fdc2ada6a@52.119.8.64:40400.
18:08:47.025 [main] INFO  coop.rchain.comm.rp.Connect$ - Initialize protocol handshake to rnode://7fa70d245268ed19253f18c802fccd22668a0211@52.119.8.68:40400
18:08:49.608 [grpc-default-executor-0] INFO  coop.rchain.comm.rp.Connect$ - Peers: 1.
18:08:49.615 [grpc-default-executor-0] INFO  coop.rchain.comm.rp.Connect$ - Connected to rnode://7fa70d245268ed19253f18c802fccd22668a0211@52.119.8.68:40400.

Error Messages

The RNode software automatically attempts to detect a UPnP gateway.  If you see the following message and are not able to connect to the bootstrap node, then you need to check that your network configuration is correct and your router supports UPnP.

...

RNode will make 5 attempts to connect to the bootstrap.  After the 5th fifth attempt, RNode will exit.    If your RNode cannot connect, you will see the following message.

...