Farmerbot: Basic Guide for All Networks [OUTDATED]

No, you can not. You always must have one node running (set this in the config file which one). That node will send the WOL message.

The farmerbot itself doesn’t send the WOL package, it’s done via the chain and executed via the active node… if I understood everything properly. But 100%, you need at least one node running.

Hello sure, thanks for adding.

Under the directory where you set up your farmerbot, you have the directory “config” in there it creates a *.log file if you start the bot via Docker-Compose. There you can search for errors if something wont work as expected!

image

For example:
2023-03-25 13:59:28 [INFO ] [DATAMANAGER] Node 13 is waking up.
2023-03-25 13:59:28 [INFO ] Elapsed time for update: 0.08395063333333333
2023-03-25 14:04:28 [ERROR] [DATAMANAGER] Node 13 wakeup was unsuccessful. Putting its state back to off.

1 Like

Thanks I will add your points in the farmerbot guide or FAQ this week!

Hi,

Some updated info from the chat:

Update on farmerbot testing:

  1. Replicated behaviour that when one node doesn’t boot up (again stuck at downloading the image), the shutdown protocol never starts (so if one node if failing to boot, all nodes stay on). If this is by design, it would be great if that could be optional in the configuration file.
    UPDATE: this actually makes perfect sense. The farmerbot needs to have all nodes running in parallel, to uniquely identify each node. Say we have 6 nodes, one is always on and one is giving issues at boot (always hanging at downloading the zos image). During the periodic wake up, if they would shutdown the 4 nodes that booted correctly and accept that the 5th node wouldn’t boot, it would be easy to just swap the ssd containing the image of the failed node, boot the node, let farmerbot shut it down again and voila…2 nodes, one machine.

  2. Once that node is booted, the others are shutdown quite quickly. The “problem” node stays on a bit longer. How long do nodes stay on before they are shutdown again?

  3. Time in the configuration file to boot is not adhered to. I have set it to 11:30AM. I’m in the Netherlands and the system time of the machine that runs farmerbot is utc. Therefore I would expect the farmerbot to run at 09:30AM. Instead, it runs at 00:30AM.

  4. Separate issue I think, but it’s always the same node causing issues when downloading zos. The only difference with the other machines, is that it’s on a different switch. 4 nodes are on switch A, and switch A is plugged into switch B. The problem node and the always on node are directly in switch B.

OK I did some testing with the one node that did not want to boot up (stuck at downloading image). The HP Z840 has two NICs: a i218LM and a i210. When I use the i210, it doesn’t play nicely with the Linksys Switch it’s attached to. It takes at least 3-4 reboots until it downloads the ZOS image completely. I noticed that also at the beginning, when it detects the NIC, it does many times ‘connection timeout’. That’s where the issue lies I guess. I tried with every HP Z840 and they all had the same behavior.

I now moved all cables to the i218LM, and now it works flawlessly. It boots every time, also much faster (it starts detecting if anything is connected to the i218LM, plus the i218LM detects much faster).

I have set the time in the config.md file now to 07:30AM which SHOULD be 20:30 my time (unless the time in the config file is not considered at all, and just always boots at 00:30 my time).

1 Like

Good to know @checkkill

Please keep us updated on your testing. Very interesting.

I put your new information into the Farmerbot FAQ of the FAQ.
I also put the Farmerbot FAQ in the Guide.

This will be soon updated to the manual. (pull request in progress)
Meanwhile, I simply pasted the whole thing in here (on this forum post).

It’s so cool to see how we can create documentation with the help of everyone!
This guide wasn’t there days ago. And now it’s pretty dense!

Thanks @flowmotion @checkkill @igg @scott @tabularaza @brandonpille @linkmark
and everyone else for contributing to the Farmerbot knowledge base.

1 Like

For “THE_MNEMONIC_OF_YOUR_FARM” are they the same words from my ThreeFold Connect application or others?

Exactly these words.
Don’t forget " as first and last

1 Like

For farms created on the Threefold Connect app, you can also use the HEX version of the seed phrase. It is called the “TF Chain Secret” in the app.

2 Likes

I am somewhat confused, because I have an existing farm on V3, but in the app it says I don’t have any farms connected to any of the wallets.
I think I need to add a wallet to the app, right? But how?
The app asks for a secret when importing a wallet, where can I find that?
Maybe stupid questions, but it is all very confusing

I found the mnemonics, so far so good.
Just had to use docker-compose instead of docker compose but I get the following error:
ERROR: for farmerbot Container “1be58e7042db” is unhealthy.
ERROR: Encountered errors while bringing up the project.
It looks like it is the grid3_client_1 container that is having an issue

There’s much faster responses for this on the chat if you need help now.

If you look on this image, you can add a wallet address (STELLAR PAYOUT ADDRESS):
image

Usually, you can create a wallet, and then a farm, on the TF Connect App.
In the farm creation, you link the wallet to the farm.

This guide might help you too:

https://manual.grid.tf/TF_Farmer_Guide/TF_Complete_Farmer_Guide/farmer_guide.html#create-a-wallet

That worked for me Mik, I m now trying to start the farmerbot docker, but unsuccessfully…

1 Like

About this error, when a container is unhealthy is means that the healthcheck built into the image failed.

I think you should be using docker compose instead of docker-compose, as written in the guide: https://www2.manual.grid.tf/farmerbot/farmerbot.html

docker compose is the command, and docker-compose is related to the file (in the guide).

For more information on the difference between the two terms: https://stackoverflow.com/questions/66514436/difference-between-docker-compose-and-docker-compose

Not sure but here’s a fix from one of the users:

" I’ve just installed the latest Docker Engine on a new machine and had a lot of commands running with docker-compose , which now fail. I found it useful to setup an alias for the new command: alias docker-compose='docker compose'"

Did you already set the Farmerbot?

There’s been an update, see this:

Stupid mistake, 2 words in mnemonic without space inbetween…
Doh!

1 Like

Good to know it’s fixed then :slight_smile:

Yes I think it is working, however, only 2 of the 4 nodes do a shutdown (when I set them to never_shutdown as in the video, they restart, but it is always the same 2 servers shutting down)
Will they never shut down all 4 when not being used? What is the criteria and how can I check from the logging why a server is or is not shut down?
Thanks!