Reconnecting a rebuilt node
Hi all, me again. Many people have rebuilt their instances resulting in the following error upon their attempt to connect to their node tracker to the tracking servers.
Registration failed. IP Address already registered.
Lets take a look as to what is happening here. The unique identifiers for the node are the wallet.dat (specifically the t-address at index 0), the FQDN, staking address, nodeid and IP address. If you need to update anyone of these, only one can change at a time per connection attempt to the tracking server.
So say for instance, you had a hard drive fail on you system or something was wrong with your VPS instance and ended up with the same IP, and you need to rebuild your instance and you dont have the wallet.dat backed up, when you configuring your rebuilt instance you will need to setup the config.json with the previous nodeid, set the staking address as the original one, and the FQDN as the original one. This coupled with the same IP address, you will be able to reconnect the node to the tracking server because wallet.dat (node t_address not for stake) has changed and only 1 change occurred.
Steps to perform this are
Step 1:
Run cd ~/nodetracker && node setup.js
Add the same staking address and FQDN that was previously used on this instance. Furnish the other information requested.
Step 2:
Edit the config/config.json file. You can use your favourite editor, but for this example I will use nano: nano config/config.json
For securenodes you may see something similar to the following:
{
"active": "secure",
"secure": {
"nodetype": "secure",
"servers": [
"ts1.na",
"ts2.na",
"ts3.eu",
"ts4.na",
"ts1.eu",
"ts3.na",
"ts2.eu",
"ts4.eu",
"ts6.eu",
"ts5.eu"
],
"stakeaddr": "znyourStakingaddress",
"email": "your-email",
"fqdn": "mynode1.yourdomain.com",
"ipv": "6",
"region": "na",
"home": "ts2.na",
"category": "none"
}
}
Of interest in this file is the section
{
"active": "secure",
"secure": {
"nodetype": "secure",
"servers": [
Here we need to add an addtional line with the old nodeid
{
"active": "secure",
"secure": {
"nodetype": "secure",
"nodeid": "xxxxx",
"servers": [
Supernodes are similar, where you will need to add the same line, or a line may be already present with "nodeid": null, this then just needs to be changed to
{
"active": "super",
"secure": {
"nodetype": "super",
"nodeid": "xxxxx",
"servers": [
Replace xxxxx with your old node id
Save the file using control+o and enter, then press control+x to exit.
Step 3:
Now we need to connect the tracker to tracking server to register the change to the wallet.dat specifically the "Node t_address (not for stake)". Run node app.js
You should then see a notification that that the Node t_address (not for stake) has changed. At this point your node tracker should be functioning again correctly. If you wish to change the FQDN and the staking address, then you will need to perform the following additional steps
Additional Step 4 - Changing FQDN:
First we need to stop the tracker if it is running using control+c, then re-run node setup.js
and change the FQDN to the new one you want to use, then run node app.js
.This will then make a single change, the FQDN and allow the tracker to connect to the server. You will see a notice advising that the FQDN has changed.
Additional Step 5 - Changing the Staking Address:
Then if you wish to change the staking address, you will need to stop the tracker again and then re-run node setup.js
and change the staking address.Once the staking address has been changed in the setup, and you run node app.js
, again a single change will occur resulting in the successful connection to the tracking server, and a notice that your staking address change is pending and will occur at block height xxxxxxx