Open hansieodendaal opened 1 year ago
Confirmed to be a long-standing issue for me as well on multiple OS and hardware platforms. Would be happy to test on another XMR pool if anyone knows of an alternative to cryptonote.social that works with merge mining
For a really long time, using the configuration above, I have been running XMrig from a Powershell script (as administrator) on Windows 10 that would restart XMRig every 45 minutes or so. My original issue was that it seems XMRig stops communicating with cryptonote.social. Since I discovered the issue above, I added a check that would execute every minute to see if the merge mining proxy is still running. I have some results to share.
The Powershell script:
param ($merge_mining_proxy_path)
if ($Null -eq $merge_mining_proxy_path) {
Write-Information -MessageData "'merge_mining_proxy_exe' not set" -InformationAction Continue
Exit
}
$current_path = Get-Location
$xmrig_exe = "xmrig"
$merge_mining_proxy_exe = "tari_merge_mining_proxy"
function Start-Proxy-If-Not-Running($count) {
if ($Null -eq (get-process $merge_mining_proxy_exe -ErrorAction SilentlyContinue)) {
Write-Information -MessageData "$merge_mining_proxy_exe is not running, starting ($count)" -InformationAction Continue
Set-Location $merge_mining_proxy_path
Start-Process -FilePath "start_tari_merge_mining_proxy.bat"
Set-Location $current_path
return $true
}
return $false
}
function Stop-Start-Xmrig($count) {
if ($Null -ne (get-process $xmrig_exe -ErrorAction SilentlyContinue)) {
Stop-Process -Name ($xmrig_exe)
}
Write-Information -MessageData "stop-start $xmrig_exe ($count)" -InformationAction Continue
Start-Process -FilePath ./$xmrig_exe -ArgumentList "--log-file=.\xmrig.exe.log --verbose"
}
$loop_count = 0
$proxy_restart_count = 1
$xmrig_restart_count = 1
do {
$restarted = Start-Proxy-If-Not-Running($proxy_restart_count)
if ($true -eq $restarted) {
$proxy_restart_count += 1
}
if ($loop_count % 45 -eq 0) {
Stop-Start-Xmrig($xmrig_restart_count)
$xmrig_restart_count += 1
}
Start-Sleep -Seconds (1 * 60)
$loop_count += 1
} while ($true)
The console output - the merge mining proxy exited by itself 4 times in ~44.5 hours (the 1st entries are normal startup):
tari_merge_mining_proxy is not running, starting (1)
stop-start xmrig (1)
stop-start xmrig (2)
stop-start xmrig (3)
stop-start xmrig (4)
stop-start xmrig (5)
stop-start xmrig (6)
stop-start xmrig (7)
stop-start xmrig (8)
stop-start xmrig (9)
stop-start xmrig (10)
stop-start xmrig (11)
stop-start xmrig (12)
stop-start xmrig (13)
stop-start xmrig (14)
stop-start xmrig (15)
stop-start xmrig (16)
stop-start xmrig (17)
stop-start xmrig (18)
stop-start xmrig (19)
stop-start xmrig (20)
stop-start xmrig (21)
stop-start xmrig (22)
stop-start xmrig (23)
stop-start xmrig (24)
stop-start xmrig (25)
stop-start xmrig (26)
stop-start xmrig (27)
stop-start xmrig (28)
stop-start xmrig (29)
stop-start xmrig (30)
stop-start xmrig (31)
stop-start xmrig (32)
stop-start xmrig (33)
stop-start xmrig (34)
stop-start xmrig (35)
stop-start xmrig (36)
stop-start xmrig (37)
stop-start xmrig (38)
stop-start xmrig (39)
tari_merge_mining_proxy is not running, starting (2)
stop-start xmrig (40)
stop-start xmrig (41)
stop-start xmrig (42)
stop-start xmrig (43)
stop-start xmrig (44)
stop-start xmrig (45)
stop-start xmrig (46)
stop-start xmrig (47)
tari_merge_mining_proxy is not running, starting (3)
tari_merge_mining_proxy is not running, starting (4)
stop-start xmrig (48)
stop-start xmrig (49)
stop-start xmrig (50)
stop-start xmrig (51)
stop-start xmrig (52)
stop-start xmrig (53)
stop-start xmrig (54)
stop-start xmrig (55)
tari_merge_mining_proxy is not running, starting (5)
stop-start xmrig (56)
stop-start xmrig (57)
stop-start xmrig (58)
stop-start xmrig (59)
For the console output above, the last entries in the trace log file before the proxy exited:
2023-04-09 14:58:42.215508800 [c::pow::monero_rx] DEBUG Valid Monero data: MoneroPowData
2023-04-09 21:16:36.406440300 [c::pow::monero_rx] DEBUG Valid Monero data: MoneroPowData
2023-04-09 21:31:22.692684300 [c::pow::monero_rx] DEBUG Valid Monero data: MoneroPowData
2023-04-10 03:25:53.361283100 [c::pow::monero_rx] DEBUG Valid Monero data: MoneroPowData
lets reconfirm or close
Confirmed, still an issue Please keep this issue open
Confirmed still an issue on Ubuntu and Mac as well, connecting to a private pool with self-select. Tari stagenet, Monero mainnet.
@hansieodendaal, have you found it necessary to restart xmrig if the proxy is restarted before xmrig flatlines?
Thanks!
@WildWeasel35, I made a PowerShell script that restarts XMRig every 45 minutes irrespective if it is working or not and checks every minute if the merge mining proxy is still running. The reason for this is that sometimes XMRig goes stale and the merge mining proxy exits.
Great, thank you. I find that my xmrig only goes stale when merge mining. It doesn't exit but continues to run, just with no hash rate. This will help
This happens with
self-select
on monerod mainnet without any error messages in the log file or in the console.tari_merge_mining_proxy console ouptut:
tari_merge_mining_proxy config:
xmrig config: