IMPORTANT UPGRADE NOTICE
IMPORTANT NOTES FOR UPGRADING
The securenode tracker uses a new configuration meaning if you upgrade through the normal restart process it will break.
There are two options for fixing your config:
-
Re-run the installer again, this will re-generate the new config which is compatible with the latest version (remember to grab the latest version first)
-
Update the config manually, remember to replace all the variables starting with $
cat << EOF > /mnt/zen/secnode/config.json
{
"active": "secure",
"secure": {
"nodetype": "secure",
"nodeid": null,
"servers": [
"ts2.eu",
"ts1.eu",
"ts3.eu",
"ts4.eu",
"ts4.na",
"ts3.na",
"ts2.na",
"ts1.na"
],
"stakeaddr": "$stakeaddr",
"email": "$email",
"fqdn": "$fqdn",
"ipv": "4",
"region": "$region",
"home": "ts1.$region",
"category": "none"
}
}
EOF
see my discord PM's to you. most notable last remark
I used the second method and the tracker log was outputting this error:
2018-07-17 16:42:53 UTC -- connect ENETUNREACH 127.0.0.0:80 - Local (0.0.0.0:0)
Fix was to stop zend, edit zen.conf and change rpcallowip=127.0.0.0/24 to rpcallowip=127.0.0.1
Not really sure how this error is related to the tracker but it happened right after I restarted it so if anyone else encounters it, there's the solution.
I used your new install script and I saw it created config.json but in the logs I am getting this error:
Jul 17 18:48:34 mn1 systemd[1]: Started Zen Secnodetracker Container. Jul 17 18:48:35 mn1 docker[9370]: Secure node config found OK - linking... Jul 17 18:48:36 mn1 docker[9370]: Retrieving zen rpc config.... Jul 17 18:48:36 mn1 docker[9370]: /home/node/secnodetracker/app.js:23 Jul 17 18:48:36 mn1 docker[9370]: if (config.ipv === '6') { Jul 17 18:48:36 mn1 docker[9370]: ^ Jul 17 18:48:36 mn1 docker[9370]: TypeError: Cannot read property 'ipv' of undefined Jul 17 18:48:36 mn1 docker[9370]: at Object. (/home/node/secnodetracker/app.js:23:12) Jul 17 18:48:36 mn1 docker[9370]: at Module._compile (module.js:652:30) Jul 17 18:48:36 mn1 docker[9370]: at Object.Module._extensions..js (module.js:663:10) Jul 17 18:48:36 mn1 docker[9370]: at Module.load (module.js:565:32) Jul 17 18:48:36 mn1 docker[9370]: at tryModuleLoad (module.js:505:12) Jul 17 18:48:36 mn1 docker[9370]: at Function.Module._load (module.js:497:3) Jul 17 18:48:36 mn1 docker[9370]: at Function.Module.runMain (module.js:693:10) Jul 17 18:48:36 mn1 docker[9370]: at startup (bootstrap_node.js:191:16) Jul 17 18:48:36 mn1 docker[9370]: at bootstrap_node.js:612:3
@333miiko i added some more information with regard to Challenges when your back online. it's cause they moved the Nodetracker (of course), so challenges are not running.
i commented on Discord i should of said. :)
I noticed that a directory called "local" was created in /mnt/zen/secnode. Is that correct?
Tried many different things but all still come back to the error listed about about config.piv. Not sure how to get around it.
@slayorktc you should have a file called config.json in that folder. Did that not get created?
Yes. There is config.json in that folder.
@phobos777 regarding challenges you can use these steps to try restart the challenge process:
apt-get update && apt-get install jq
Now use this bash file to manually trigger a new challenge:
#!/bin/bash
echo "Starting Testnet Node Challenge Benchmark...time to completion: 15 minutes"
for i in {1..3}; do echo -n "Running Challenge - Wait 300s - Test $i of 3 - Node Status: "; \
curl -s "https://$(cat /mnt/zen/secnode/config.json | jq -r '.testnet.home').zensystem.io/$(docker exec -it zen-node gosu user zen-cli listaddresses | jq -r '.[0]')/$(cat /mnt/zen/secnode/config.json | jq -r '.testnet.nodeid')/send"; \
date -u +' - %Y-%m-%d %H:%M:%S UTC'; sleep 300; done
echo "Benchmark Complete. Check results at:"
echo "https://$(cat /mnt/zen/secnode/config.json | jq -r '.testnet.home').zensystem.io/nodes/$(cat /mnt/zen/secnode/config.json | jq -r '.testnet.nodeid')/chals
@slayorktc could you post the content of config.json (redact your email, hostname and stakeaddr)
{ "active": "", "secure": { "nodetype": "", "nodeid": null, "servers": [ "ts2.eu", "ts1.eu", "ts3.eu", "ts4.eu", "ts4.na", "ts3.na", "ts2.na", "ts1.na" ], "stakeaddr": "x", "email": "x", "fqdn": "snode1.convergegroup.tech", "ipv": "4", "region": "na", "home": "ts1.na", "category": "none" } }
Replaced those two with x
Did you use the new parameter at the end of the installer to define it as a secure node?
new parameter? I don't think the install.sh asked for that I did pop into the container and run setup.js which I completed successfully but the error was still present.
The error seems to be because it can't read the config of what ip format you are using. Did you try restart the service in case you didn't get the most latest image?
Yup, systemctl restart both zen-node and zen-secnodetracker. Multiple reboots. Nothing seemed to fix it.. There is a local directory inside secnode dir. Not sure if that is normal or not.
The local directory is generated by node config
Could you try in the host server clear all the files in /mnt/zen/secnode/
Then try run:
stakeaddr=x
email=x
fqdn=x
region=na
cat << EOF > /mnt/zen/secnode/config.json
{
"active": "secure",
"secure": {
"nodetype": "secure",
"nodeid": null,
"servers": [
"ts2.eu",
"ts1.eu",
"ts3.eu",
"ts4.eu",
"ts4.na",
"ts3.na",
"ts2.na",
"ts1.na"
],
"stakeaddr": "$stakeaddr",
"email": "$email",
"fqdn": "$fqdn",
"ipv": "4",
"region": "$region",
"home": "ts1.$region",
"category": "none"
}
}
EOF
Now restart the zen-secnodetracker, obviously replace x with the appropriate variables.
I got this error: Jul 18 03:20:30 mn1 docker[11549]: No secure node config found. exiting Jul 18 03:20:30 mn1 systemd[1]: zen-secnodetracker.service: Main process exited, code=exited, status=1/FAILURE Jul 18 03:20:30 mn1 systemd[1]: zen-secnodetracker.service: Unit entered failed state. Jul 18 03:20:30 mn1 systemd[1]: zen-secnodetracker.service: Failed with result 'exit-code'. Jul 18 03:20:30 mn1 systemd[1]: zen-secnodetracker.service: Service hold-off time over, scheduling restart. Jul 18 03:20:30 mn1 systemd[1]: Stopped Zen Secnodetracker Container. Jul 18 03:20:30 mn1 systemd[1]: zen-secnodetracker.service: Start request repeated too quickly. Jul 18 03:20:30 mn1 systemd[1]: Failed to start Zen Secnodetracker Container.
root@mn1:/mnt/zen/secnode# pwd /mnt/zen/secnode root@mn1:/mnt/zen/secnode# ls config.json root@mn1:/mnt/zen/secnode#
Outside the container. Ran it sitting inside /mnt/zen/secnode
systemctl stop zen-secnodetracker
docker run --rm -v /mnt/zen:/mnt/zen --name secnode -it --entrypoint=/bin/bash whenlambomoon/secnodetracker
cd /home/node/secnodetracker
ls config
node setup
node app
cd /home/node/nodetracker -- Didn't exist but did you mean 'secnodetracker'?
Also no config file in that dir
Configuration for super node saved. Setup complete!
root@46306da1ec86:/home/node/secnodetracker# node app
Retrieving zen rpc config....
STARTING NODETRACKER
CPU Intel(R) Xeon(R) CPU D-1521 @ 2.40GHz count=4 speed=2399
Node.js version: v8.11.3
Tracker app version: 0.3.0
Node type: super
MemTotal: 7.98GB MemFree: 4.48GB MemAvailable: 6.70GB SwapTotal: 8.19GB SwapFree: 8.19GB
2018-07-18 01:55:00 UTC -- Connected to server xns1.eu. Initializing...
2018-07-18 01:55:00 UTC -- ERROR zend get t-address
2018-07-18 01:55:00 UTC -- connect ENETUNREACH 127.0.0.0:80 - Local (0.0.0.0:0)
2018-07-18 01:55:10 UTC -- ERROR zend get t-address
2018-07-18 01:55:10 UTC -- connect ENETUNREACH 127.0.0.0:80 - Local (0.0.0.0:0)
Yep sorry /home/node/secnodetracker there would be a config folder in there now
Now the last issue is you need to exit out and modify /mnt/zen/config/zen.conf
and change the line that starts with rpcallowip to be rpcallowip=127.0.0.1
Okay. Getting closer. I know have this error:
Jul 18 04:16:02 mn1 docker[19097]: External IP address (externalip=) not found in zen.conf. At least one (IPv4 or IP Jul 18 04:16:02 mn1 docker[19097]: If multiple, add the externalip= for each address on a separate line. Jul 18 04:16:03 mn1 systemd[1]: zen-secnodetracker.service: Service hold-off time over, scheduling restart
I added externalip=VPS IP port=9033
Running the zen-secnodetracker is still producing the same ipv === error.
Inside the container, running node setup.js, then node app.js, now produces this message:
018-07-18 02:24:09 UTC -- connect ECONNREFUSED 127.0.0.1:18231 2018-07-18 02:24:19 UTC -- ERROR zend get t-address 2018-07-18 02:24:19 UTC -- connect ECONNREFUSED 127.0.0.1:18231
Well, I think i finally got it up and running.. I think I needed to change these 3 lines:
{ "active": "super", "super": { "nodetype": "super",
After the other changes I stated above about externalip and port to zen.conf. Seems to be working now.
Thanks for the all the help! Ill toss some zen your way!
Glad you got it working! I don't think externalip is required, that may have just been due to the earlier rpc issues.
Let me know if you have any other issues.
@333miiko on reboot of a secure or supernode; the securenode tracker is now requiring one 'externalip' for secure and two external ip (ipv4 and ipv6 for supers). here is an output of the secnode tracker. (i also go a new email this morning from the zen dev team)
root@localhost:~# docker logs -f zen-secnodetracker Secure node config found OK - linking... Retrieving zen rpc config.... External IP address (externalip=) not found in zen.conf. At least one (IPv4 or IPv6) required for secure nodes. Both IPv4 and IPv6 required for super nodes. If multiple, add the externalip= for each address on a separate line.
**and add port while your there please: LOL:
root@localhost:~# docker logs -f zen-secnodetracker Secure node config found OK - linking... Retrieving zen rpc config.... Port not found in zen.conf. Add 'port=9033' for mainnet or 'port=19033' for testnet root@localhost:~#**
Agreed. externalip= port= change 127.0.0.1
How do I deal with having ipv6 and ipv4? Do I need to have two certs? Not exactly sure how to get that working correctly..