Topology updater

I cannot make topologyupdater run as a cronjob or as systemd service cron gives output of unable to parse mainnet-json and the systemd service has exitcode 1 or smth like that bassicly a failure, now i can run it perfectly in my terminal, what gives ?


What is the actual command put into the cron?

Hi @catalyst0 ,

I’m using /etc/cron.hourly myself, fairly easy, you just have to drop a script and it will run on an hourly schedule.
Here is mine, pretty easy one liner


# updateTopology on a hourly basis to stay in the main topology.json
/usr/bin/su - -s /bin/bash -c '/cardano/tools/topologyUpdater/' cardano

It just say to run command “/cardano/tools/topologyUpdater/” through a bash shell as the “cardano” user with full impersonnation (including env, home etc …).
It’s important to specify the user since otherwise it would run as root.

Hope that helps

ok - try to redirect the output of the command into a file '/cardano/tools/topologyUpdater/ > /cardano/tools/topologyUpdater/topology.log 2>&1'

and see what is the result of the execution logs by itself. You just have to have a “logs” directory.
See it’s env file for more details.

Yes, but what if topologyUpdater script called in a incorrect way? And that is the case now…

Hi, Would I need to run the topology updater on the testnet relay too?


to get incoming connections on your relay, yes. But if would be interested in could you create a block without any other relay connects to your relays…

1 Like

Thanks for the answer :slight_smile:
So far Iv’e only seen that script for the mainnet, do you happen to have a link to the one that works on the testnet?

if the topologyUpdater has set up correctly then it will work on testnet as well without the need to provide additional thing…