Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge mining proxy exits after a while [igor] #5293

Open
hansieodendaal opened this issue Apr 6, 2023 · 8 comments
Open

Merge mining proxy exits after a while [igor] #5293

hansieodendaal opened this issue Apr 6, 2023 · 8 comments
Labels
C-bug Category - fixes a bug, typically associated with an issue.

Comments

@hansieodendaal
Copy link
Contributor

hansieodendaal commented Apr 6, 2023

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:

Initializing logging according to "config\\log4rs_merge_mining_proxy.yml"
Connecting to base node at 127.0.0.1:18152
Listening on 127.0.0.1:18181...
Initial base node sync achieved. Ready to mine at height #3521
Listening on /ip4/127.0.0.1/tcp/18181...

Press any key to continue . . .

tari_merge_mining_proxy config:

[merge_mining_proxy]

monerod_url = [ # mainnet
    # Tari Labs
    # more reliable
    "http://xmr.nthrow.nyc:18081",
    "http://node1.xmr-tw.org:18081",
    # not so reliable
    "http://node.xmrig.com:18081",
    "http://monero.exan.tech:18081",
    "http://18.132.124.81:18081",
    # Potential issue
    "http://xmr.support:18081",
]

submit_to_origin = false

xmrig config:

{
    "autosave": true,
    "cpu": true,
    "opencl": false,
    "cuda": false,
    "pools": [
        {
            "coin": "monero",
            "algo": "rx/0",
            "url": "cryptonote.social:5556",
            "user": "489r43gR8bDMJNBf4Q6sL9CNERvZQrTqjRCSESqgWQEWWq2UGAfj2voaw3zBtD7U8CQ391Nc1PDHUHiN85yhbZnCDasqzyX.taritest",
            "pass": "start_diff=60000;payment_scheme=pprop;donate=0.5",
            "tls": true,
            "keepalive": true,
            "nicehash": false,
            "self-select": "127.0.0.1:18181",
            "submit-to-origin": true
        }
    ]
}
@hansieodendaal hansieodendaal converted this from a draft issue Apr 6, 2023
@hansieodendaal hansieodendaal changed the title Merge mining proxy exits after a while Merge mining proxy exits after a while [igor] Apr 6, 2023
@WildWeasel35
Copy link

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

@hansieodendaal
Copy link
Contributor Author

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

@SWvheerden SWvheerden added the C-bug Category - fixes a bug, typically associated with an issue. label Apr 12, 2023
@SWvheerden SWvheerden moved this from Bugs to Backlog in Tari Esme Testnet Apr 14, 2023
@SWvheerden SWvheerden moved this from Backlog to Under observation in Tari Esme Testnet May 9, 2023
@SWvheerden SWvheerden moved this from Under observation to Backlog in Tari Esme Testnet Jul 3, 2023
@SWvheerden SWvheerden moved this from Backlog to Selected for development in Tari Esme Testnet Jul 4, 2023
@SWvheerden
Copy link
Collaborator

lets reconfirm or close

@hansieodendaal
Copy link
Contributor Author

hansieodendaal commented Jul 4, 2023

Confirmed, still an issue
Please keep this issue open

@WildWeasel35
Copy link

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?

@stringhandler
Copy link
Collaborator

Thanks!
image

@hansieodendaal
Copy link
Contributor Author

hansieodendaal commented Jul 4, 2023

@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.

run_xmrig.zip

@WildWeasel35
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - fixes a bug, typically associated with an issue.
Projects
Status: Selected for development
Development

No branches or pull requests

4 participants