Is it possible to set up a restart script for offline nodes?

I am using the GUI version of STORJ for Windows. At least once my node went offline for no apparent reason (that I could tell anyway), and simply restarting the node in services fixed it. I believe the service was already running before I restarted it.

Is it possible to set up a script that detects if the node is offline, and then restarts the Windows service?

It’s better to figure out - why is it stopping?
The service should not stop normally. So, it’s better to check your logs, when it’s happened again: https://documentation.storj.io/resources/faq/check-logs
It could stop to prevent your node from disqualification (for example - the USB disk is disconnected, or has a failure)

You can configure service restart in the Services applet though

2 Likes

Thanks for the tip, I have set up restart service, restart service and restart machine for 1st, 2nd and 3rd failure now.

Regarding logfile: If I set a custom logfilepath, will that allow me to get a complete log? Or, will it also be limited to 20 last lines or some other limitation? As I understand it, log files can become enormous in size if not restricted like that.

There is no limits and no restrictions. You should use something like a logrotate to limit the log size.

2 Likes

Thanks, will check it out.

I went to https://documentation.storj.io/resources/faq/check-logs?_ga=2.139411507.1840445923.1607511625-16747486.1606219606 and then clicked “redirected your logs to a file”, but it seems the hyperlinked text leads to a blank.

Thank you, fixed.
It points to the https://documentation.storj.io/resources/faq/redirect-logs

1 Like