If you want to make sure your Orchestrator is connecting to the ETH and ZNN nodes correctly, please use this script. This script also checks to make sure your Orchestrator is accessible on port 55055.
Setup Instructions
- Copy the script below to a file, for example,
healthcheck.sh
. - Give execute permissions to the script:
chmod +x healthcheck.sh
- Run the script:
./healthcheck.sh
Note: This script assumes that your logs are stored in /var/log/syslog*
. If your logs are stored in a different location, you’ll need to adjust the script accordingly.
#!/bin/bash
# Define the search queries
SEARCH_1="websocket: close 1006"
SEARCH_2="websocket: close 1001"
# Get the date 2 days ago in the format that matches log timestamps
DATE_2_DAYS_AGO=$(date -d "2 days ago" '+%Y-%m-%d')
# Count the number of instances for each search query in the logs from the last 2 days
COUNT_1=$(grep -c "$SEARCH_1" /var/log/syslog* | awk -F: -v date="$DATE_2_DAYS_AGO" '$1 ~ date {sum += $2} END {print sum+0}')
COUNT_2=$(grep -c "$SEARCH_2" /var/log/syslog* | awk -F: -v date="$DATE_2_DAYS_AGO" '$1 ~ date {sum += $2} END {print sum+0}')
# Report the number for each search query
echo "Number of instances for \"$SEARCH_1\": $COUNT_1"
echo "Number of instances for \"$SEARCH_2\": $COUNT_2"
# Get the public IP of the device
PUBLIC_IP=$(curl -s ifconfig.me)
# Check if port 55055 is open using telnet
(echo > /dev/tcp/$PUBLIC_IP/55055) &>/dev/null && echo "Port 55055 is open" || echo "Port 55055 is NOT Open. Open Port TCP 55055 on your firewall"
Log References
websocket: close 1006 (abnormal closure): unexpected EOF
Orchestrator failed because znn node is down
websocket: close 1001 (going away): upstream went away
Orchestrator failed because eth node is down