Guides

How to add backup pool in ccminer? Pool failover support in ccminer

Have you ever woke up in the middle of the night to check whether if you miner is working or not? Most of us would have gone through that stage. Especially with difficulty keeps raising constantly on certain coins we don’t want to miss out mining those early blocks. There are many scenarios in which your miner may stop working such as: Power issues, Wifi / Internet issues, crashing due to too much overclocking, unstable drivers and pool connection issues. While all those can be fixed the pool side error is not in your hands.

If you were mining for a long time then at some point you might have heard a pool experiencing downtime. Even a well established mining pool that runs on private server and have features like DDOS protection, auto failover support, self healing servers will fail sometimes. It is so obvious that such occurrence will happen at some point so it is essential to setup atleast one mining pool as a backup.

By configuring a backup pool whenever your miner loses connection or if the main pool is unreachable then it will automatically switch to backup pool and start mining. This way you don’t miss out on your valuable mining time. Adding pool failover support is very simple. Here in this post we’ll show you how to configure backup pool in ccminer.

Adding failover pool in ccminer

When we made ccminer tutorial we thought we covered everything about the miner. But then we actually missed out this one feature that ccminer supports. There are two ways to add backup pool in ccminer. 1. Configuring it directly in your batch file and 2. Creating a config file separately and inputting all the pools that you want as backup.

Adding backup pool in ccminer batch file

In your batch file you usually input algorithm first, then pool address, wallet address and at last coin symbol in case if the pool has more than one coin under same algorithm. To add a backup pool you need to follow the same that is continue the batch file by starting from algorithm, pool address and wallet address. Remember that primary pool comes first and backup pool comes next.

Here is a sample on how the batch file looks:

ccminer-x64 -a x17 -o pool-stratum-server-main -u wallet-address -p c=XVG -a x17 -o pool-stratum-server-backup -u wallet-address -p x
pause

Save the batch file and run the miner. Now by default it starts to mine at primary pool and the moment the pool fails and says stratum connection is interrupted it will switch to secondary pool and starts mining there. Then if backup pool fails at one point it switches to primary pool again.

pool failover timeout rotate

You can also add --time-limit=300 (example) at the end of backup pool. This is time limit in 300 seconds and it tells the miner to mine at backup pool only for 300 seconds (5 minutes) after which it will check for main pool connection. If the primary pool is online then it continues there, if not it will switch to secondary pool, mines for another 5 minutes and then checks for primary pool connection again. This is optional and you can change the time limit as per your wish.

Example:

ccminer-x64 -a tribus -o stratum+tcp://yiimp.eu:8533 -u DECBV2xuYR7RZukbycSo1D31kL4Kpiq88K -p x -a tribus -o stratum+tcp://umine.org:3336 -u DECBV2xuYR7RZukbycSo1D31kL4Kpiq88K -p x --time-limit=900
pause

Adding multiple backup pools, algorithm and coins

The above configuration works with latest tpruvot version and per batch file it only supports one algorithm. But what if you want to add different coins / algorithms and multiple pools all in single setup. For this we are going to create a JSON format configuration file, input all the pools and coin details there and then call it using batch file. This is simple and the configuration is similar to XMR STAK and XMRig.

Multiple pool backup1. Within your ccminer folder create a new text document and rename it as multi-pool.conf or pool-failover.conf or whatever(.conf and not .txt). For example in above image it is multi-coin-pool.conf

2. Next we’ll create a batch file with same name. For example multi-coin-pool.bat.

3. Once done edit your .bat file and input the following command in it. Edit the config name to match the file that you created. That’s it! your batch file is now ready.

ccminer-x64.exe -c multi-coin-pool.conf
pause

4. Now we are going to input all the pool and coin details in the config file. Right click .conf file, edit and then input the following command. The below sample code is just for your reference so edit it accordingly.  Once done save it and run the batch file.

{
"pools":[
{
"name": "ravenminer",
"algo" : "x16r",
"url": "stratum+tcp://ravenminer.com:3336",
"user": "RU5Umsy0rb8AZAwRbP34bGloUrqPAk9gia",
"pass": "x",
"intensity" : 21
},
{
"name": "xvg-umine",
"algo" : "x17",
"url": "stratum+tcp://eu2.umine.org:3737",
"user": "DGdpgo3qLwfLFX8KSrocHCNiPgW7RyxJdQ",
"pass": "c=XVG"
},
{
"name": "tribus-yiimp",
"algo" : "tribus",
"url": "stratum+tcp://yiimp.eu:8533",
"user": "DECBV2xuYR7RZukbycSo1D31kL4Kpiq88K",
"pass": "x"
}
]

}

How it works?

Did you notice that the above config contains 3 different algorithms, coins and pool details. Yes, ccminer supports multiple algorithms so in addition to multiple pool you can also add any algorithm or coin to your config file.

When you run the batch file; by default it starts to mine the first config which in this case it is Ravencoin (x16r). It mines Raven until the pool loses connection and returns stratum connection failed: Timed out error. It retries once and if the pool is still down then it connects to next pool and start mining Verge coin (XVG). If that too fails then it switches over to 3rd pool and start mining Tribus algorithm. This goes on in repeat mode.

Don`t forget to set the wallet address, worker, password, pool stratum server connection info and coin name appropriately . This setup works with all version ccminer (alexis, tpruvot, klaust) and even cryptonight ccminer. Also note that one missing quotation mark, comma or an extra bracket would break the config and it will result in JSON decode failed error.

backup pool JSON decode failed

In addition to this you can also set difficulty, intensity, number of devices, threads, power limit and any command line options that can be found on ccminer. Also you can use this failover strategy in different ways for example you can add 2 different coins in single config, set time limit equally and let them mine in repeat mode. Hope this helps!

Show More

coinguides

We are crypto enthusiasts and our main intention with Coin Guides is to educate people about Cryptocurrency and Blockchain technology. We regularly publish content about Bitcoin, Ethereum, Altcoins, wallet guides, mining tutorials and trading tips.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button