[REQUEST] Restarting Claymore Dual miner once Hive Agent can't read stats

claymore
offline
agent-miner-stats-sh

#1

Problem:
Roughly, every 100 hours Hive Agent can’t read stats from Claymore monitoring port. As a result, rig is online in Hive Dashboard, but miner is presented offline even though it is working just fine.

Situation can be confirmed with lots of connections in “CLOSE_WAIT” status and their number is growing with Agent’s every new attempt to read data from Claymore (10 secs by default).

Situation is rectified by manually restarting miner.

Solution:
Event though I believe this is miner problem, there is an easy workaround that can be implemented in /hive/bin/agent.miner_stats.sh by adding one (or two) lines of code:

                    if [[ $? -ne 0  || -z $stats ]]; then
                            echo -e "${YELLOW}Failed to read $miner stats from localhost:3333${NOCOLOR}"

#Start of new code to be added ==========
netstat -anp | grep ':3333 ’ | grep CLOSE_WAIT | awk ‘{print $7}’ | cut -d / -f1 | grep -oE “[[:digit:]]{1,}” | xargs kill
sleep 5
#End of new code to be added ==========
else

As it can be seen, when this situation occurs, instead of just writing info message in Agent’s screen, we can additionally drop all problematic connections. That basically kills miner process which is then restarted by default.

It would be really helpful to implement this in HiveOS since every update is overwriting existing script.


#2

could help me I have that error and try to modify the file with the code but it did not work


#3

Did you restart the agent after changing the file?

Did you check using “netstat” that you have the same problem (many CLOSE WAIT connections)?


#4

I made the change and restart the rig

and that’s a flaw that should be fixed in the hive there are many people with the same fault and we have to do the flash usb again


#5

If this is the same problem as I initially had - simple miner restart should do the trick. If you need to re-flash the USB, then there is a different problem.

Since you mention USB stick - did you turn logs-off? I think it is off by default in newer HiveOS versions.


#6

I will definitely stop using hive for a while because when this happens all my rig stops. I will go to another program for a while to give it time to improve those details that should not happen


#7

Not really sure that this is HiveOS issue. Did you troubleshoot more? Do your rigs start mining normally and this happens every now and then or you cannot even start normally? Is Claymore mining at all or not? My issue was just in reporting - Claymore was working all the time - only reporting from miner to Dashboard was suspended…

If Claymore isn’t mining - try using different Claymore version… check miner logs to see what is the cause of the problem.