Run the node
Initialize the databases and let the IBD run.
Last updated
Initialize the databases and let the IBD run.
Last updated
The configuration files are listed on the Bitprim Node Configuration Files section.
The configuration file is passed to the Bitprim node using the argument -c /path/to/file
For this example I'm going to use the one for the .
Important parameters:
archive_directory: this is where all the old debug and error logs will be stored.
debug_file: this is where the current debug file will be located.
error_file: this is where the current error file will be located.
host_file: this file will contain the result of the dns seeders and addr queries with some peers.
directory: this folder is where the database is going to be stored.
safe_mode: safe mode can be set to false, it changes the LMDB settings. With the safe_mode set to false, the node will download the blockchain faster but the database will lose durability in case of a system crash.
In order to run the Bitprim node it's required to initialize the databases. Assuming that the configuration file is saved in the same directory that your Bitprim node:
After initializing the database, the node needs to be run without the -i
parameter.
./bn -c config.cfg
The node will start to download the blockchain and start to accept requests via RPC.
The RPC port and IP allowed to request information can be set in the configuration file.
Error starting inbound session: address already in use
This error is shown when the port is already in use. It can be fixed changing the inbound_port in the configuration file or stopping any application that is using the same port.
Error seeding host addresses:
Sometimes the dns seeds do not work well and the node will exit with an error saying:
Error seeding host addresses: unresponsive peer may be throttling
This can be fixed manually populating the host_file with some peers and their respective port.
For example for Bitcoin Cash Testnet:
nslookup testnet-seed.bitprim.org
This will return:
So using this information just adding the following line will fix the problem. If the file doesn't exists, it needs to be created, make sure to create it in the same folder that was set in the configuration file.
(NODE VERSION 0.17 OR LESS) The node hangs on closing / cannot run because database corruption:
When the node can not close after executing Control
+C
and the node is force killed, the database will keep some locks in the data directory. In order to be able to run the node, the file named exclusive_lock must be deleted from the system. If the flush_lock file also exists it needs to be deleted, but the database may be corrupted.
In the release 0.18 the node uses LMDB and the database is more robust and is not corrupted if the node is forced killed or the power went down.