Problem process description
I saw someone in a technical group asking:
Following the official quick start example, I typed the following two commands:
When typing the second command, I found that connect error dial tcp 127.0.0.1:8801:connection:No connection could be made because the target machine actively refused it. What should I do?
Actually, this problem is directly in English: Unable to connect to port 8801. This means that other nodes are not open. In fact, the two commands above in the official document are not a big problem; this is just that other nodes are not open, causing the node to not detect other nodes, so these commands are output.
Solution
Pull down the official document and see the following command:
In the second command to start consensus, we actually started a node at the beginning. We only need to open other nodes, and there will no longer be a prompt that the port 8801 cannot be connected.
Command description
instruction | illustrate |
---|---|
-c | Run as a supervisor node |
-g | Generate a bat file. In fact, another official way to get started quickly is to generate a series of commands to open the node, and then put it into a file called batrun_showAll.bat. Click to run it to complete the operation of all nodes, as follows picture |
-n | Node ID |
-N | Indicate how many nodes are in each shard |
-s | shard id |
-S | Specify the number of shards |
Feel free to point out errors…
For details, please refer to the official documentation:BlockEmulator official documentation