Thread to Share Zero-Downtime, General Operation Tips and Tricks

Hi, I want to start a thread for operators to share tips for minimal downtime.

It is in the interest of all community members to raise the uptime of the network collectively. I have to look askance at operators that are obsessed with ‘competitive advantage’ and not sharing ‘trade secrets’. Boo.

So, in the spirit of a healthy internet with true hackers (not crackers) that share knowledge I’ll start with what I have:

The following can be used to bring run jormungandr and bring it back up whenever it fails:

#!/bin/bash
RET=1
until [ ${RET} -eq 0 ]; do
  start_my_jormungandr_node
  RET=$?
  sleep 10
done

start_my_jormungandr_node just runs jormungandr with the config and nodesecret

Knowledge Transfer For The Win.

Let’s work together to make Cardano/ADA the beast it is destined to be.

Thanks for starting this thread!
I can offer the below script which filters the trusted peers and rewrites the config file. I use this before every restart which reduces restart time.
Although with the current v0.8.7+ bootstrapping issues you may need to remove trusted peers completely or add
max_bootstrap_attempts: 0
to your config file until v0.8.10 is released.

Shawn Squid Pool
squidpool.com

config-peers

#!/bin/bash
allPeersFile=${JOR_DIR}/all_peers.txt
goodPeersFile=${JOR_DIR}/good_peers.txt
top=${JOR_DIR}/config_top.txt
configFile=${JOR_DIR}/config.yaml
> $goodPeersFile

cat $allPeersFile | while read addr port address id
do 
  ping=$(tcpping -x 1 $addr $port)
  open=$(echo $ping | grep "open" | wc -l)
echo "${addr}: $open"

  if [ $open -eq 1 ]
  then
    echo "  - address: $address" >> $goodPeersFile
    echo "    id: $id" >> $goodPeersFile
  fi
done

peerCount=$(grep address $goodPeersFile | wc -l)
echo "$peerCount open peers"

cat $top > $configFile
cat $goodPeersFile >> $configFile

config_top.txt

---
leadership:
    garbage_collection_interval: 30m
    log_ttl: 24h
log:
- format: plain
  level: warn
  output: stderr
mempool:
    fragment_ttl: 30m
    garbage_collection_interval: 5m
    log_max_entries: 300000
    log_ttl: 1h
    pool_max_entries: 30000
rest:
  listen: "127.0.0.1MREST Port>"
storage: <Your Storage>
p2p:
  gossip_interval: 2s
  listen_address: "/ip4/0.0.0.0/tcp/<Your Port>"
  max_connections: 2048
  max_unreachable_nodes_to_connect_per_event: 128
  public_address: "<Your Address>"
  public_id: <Your Id>
  topics_of_interest:
    blocks: normal
    messages: normal
  trusted_peers:

all_peers.txt

13.56.0.226 3000 "/ip4/13.56.0.226/tcp/3000" 7ddf203c86a012e8863ef19d96aabba23d2445c492d86267
54.183.149.167 3000 "/ip4/54.183.149.167/tcp/3000" df02383863ae5e14fea5d51a092585da34e689a73f704613
52.9.77.197 3000 "/ip4/52.9.77.197/tcp/3000" fcdf302895236d012635052725a0cdfc2e8ee394a1935b63
18.177.78.96 3000 "/ip4/18.177.78.96/tcp/3000" fc89bff08ec4e054b4f03106f5312834abdf2fcb444610e9
3.115.154.161 3000 "/ip4/3.115.154.161/tcp/3000" 35bead7d45b3b8bda5e74aa12126d871069e7617b7f4fe62
18.182.115.51 3000 "/ip4/18.182.115.51/tcp/3000" 8529e334a39a5b6033b698be2040b1089d8f67e0102e2575
18.184.35.137 3000 "/ip4/18.184.35.137/tcp/3000" 06aa98b0ab6589f464d08911717115ef354161f0dc727858
3.125.31.84 3000 "/ip4/3.125.31.84/tcp/3000" 8f9ff09765684199b351d520defac463b1282a63d3cc99ca
3.125.183.71 3000 "/ip4/3.125.183.71/tcp/3000" 9d15a9e2f1336c7acda8ced34e929f697dc24ea0910c3e67
52.9.132.248 3000 "/ip4/52.9.132.248/tcp/3000" 671a9e7a5c739532668511bea823f0f5c5557c99b813456c
52.8.15.52 3000 "/ip4/52.8.15.52/tcp/3000" 18bf81a75e5b15a49b843a66f61602e14d4261fb5595b5f5
13.114.196.228 3000 "/ip4/13.114.196.228/tcp/3000" 7e1020c2e2107a849a8353876d047085f475c9bc646e42e9
13.112.181.42 3000 "/ip4/13.112.181.42/tcp/3000" 52762c49a84699d43c96fdfe6de18079fb2512077d6aa5bc
3.125.75.156 3000 "/ip4/3.125.75.156/tcp/3000" 22fb117f9f72f38b21bca5c0f069766c0d4327925d967791
52.28.91.178 3000 "/ip4/52.28.91.178/tcp/3000" 23b3ca09c644fe8098f64c24d75d9f79c8e058642e63a28c
3.124.116.145 3000 "/ip4/3.124.116.145/tcp/3000" 99cb10f53185fbef110472d45a36082905ee12df8a049b74
1 Like

what will change in v0.8.10 regarding to bootstrapping?

and here is a link if you want to figure out how to download tcpping

Hopefully v0.8.10 will resolve the hanging in bootstrap forever issue that some people have seen.

What goes under public_id? I tried my stake_pool.id but that did not work…

Otherwise it is working if I take that key out of the config…

On Linux you can use the following to generate an id:
openssl rand -hex 24 >public_id.txt