Closed photis closed 6 years ago
Confirmed. Stopped 'grin server' and started after a few seconds new. On both miners:
May 07 11:01:59.000 ERRO Communication error with stratum server: Connection reset by peer (os error 104)
May 07 11:01:59.000 ERRO Error reading message: ConnectionError("broken pipe")
May 07 11:01:59.023 WARN Connection Status: Can't establish server connection to 193.175.82.53:13416. Will retry every 5 seconds
May 07 11:02:05.022 WARN Connection Status: Can't establish server connection to 193.175.82.53:13416. Will retry every 5 seconds
May 07 11:02:11.022 WARN Connection Status: Can't establish server connection to 193.175.82.53:13416. Will retry every 5 seconds
May 07 11:02:17.022 WARN Connection Status: Can't establish server connection to 193.175.82.53:13416. Will retry every 5 seconds
May 07 11:02:23.022 WARN Connection Status: Can't establish server connection to 193.175.82.53:13416. Will retry every 5 seconds
May 07 11:02:29.023 WARN Connection Status: Connected to Grin server at 193.175.82.53:13416.
May 07 11:02:29.023 DEBG sending request: {"id":"0","jsonrpc":"2.0","method":"getjobtemplate","params":null}
May 07 11:02:29.023 DEBG sending request: {"id":"0","jsonrpc":"2.0","method":"status","params":null}
May 07 11:03:00.000 DEBG sending request: {"id":"0","jsonrpc":"2.0","method":"status","params":null}
May 07 11:03:31.000 DEBG sending request: {"id":"0","jsonrpc":"2.0","method":"status","params":null}
May 07 11:03:45.000 DEBG Received message: {"id":"Stratum","jsonrpc":"2.0","method":"job","params":"{\"height\":56879,\"difficulty\":1,\"pre_pow\":\"0001000000000000de2f78f9a023eb167d3a9cd09ebe38f479d81047ab6bef2da400d5559758a6f6c8e1000000005af016220000000000013693437f12ef638824bbb8dff9551a6e61f8bdc03bde6d0a93736fcfdc215d0544525eca16102b2ea0f83573a8121be25f26fa35e4e9f8ead9934ffcc96067316fecf34b20fc5f5235d2c810b89f34c99e03a3a0c39e7a31458369d6b72b90f306c41f9c6284dfee7be0fff46f5e3b53d05161464b4be24a8b8774c1e25f60417e1d\"}"}
May 07 11:03:45.000 DEBG Received request type: job
May 07 11:03:45.000 INFO Got a new job: JobTemplate { height: 56879, difficulty: 1, pre_pow: "0001000000000000de2f78f9a023eb167d3a9cd09ebe38f479d81047ab6bef2da400d5559758a6f6c8e1000000005af016220000000000013693437f12ef638824bbb8dff9551a6e61f8bdc03bde6d0a93736fcfdc215d0544525eca16102b2ea0f83573a8121be25f26fa35e4e9f8ead9934ffcc96067316fecf34b20fc5f5235d2c810b89f34c99e03a3a0c39e7a31458369d6b72b90f306c41f9c6284dfee7be0fff46f5e3b53d05161464b4be24a8b8774c1e25f60417e1d" }
May 07 11:03:45.000 DEBG Received message: {"id":"1","jsonrpc":"2.0","method":"getjobtemplate","result":"{\"height\":56879,\"difficulty\":1,\"pre_pow\":\"0001000000000000de2f78f9a023eb167d3a9cd09ebe38f479d81047ab6bef2da400d5559758a6f6c8e1000000005af016220000000000013693437f12ef638824bbb8dff9551a6e61f8bdc03bde6d0a93736fcfdc215d0544525eca16102b2ea0f83573a8121be25f26fa35e4e9f8ead9934ffcc96067316fecf34b20fc5f5235d2c810b89f34c99e03a3a0c39e7a31458369d6b72b90f306c41f9c6284dfee7be0fff46f5e3b53d05161464b4be24a8b8774c1e25f60417e1d\"}","error":null}
May 07 11:03:45.000 DEBG Received response with id: 1
May 07 11:03:45.001 INFO Got a job at height 56879 and difficulty 1
May 07 11:04:02.000 DEBG sending request: {"id":"0","jsonrpc":"2.0","method":"status","params":null}
May 07 11:04:33.000 DEBG sending request: {"id":"0","jsonrpc":"2.0","method":"status","params":null}
May 07 11:04:39.000 DEBG Received message: {"id":"Stratum","jsonrpc":"2.0","method":"job","params":"{\"height\":56881,\"difficulty\":1,\"pre_pow\":\"0001000000000000de316820fdfc32a8d0b3bb4b1c3c5708fc69520efcdcc6a72583924657cea6179973000000005af0166e00000000000136953c3726b8b47b99a8c6a2452efb02f5bb8c324298d81db11b1449fd5f95cc5ae81e3699b4614431ed3d1452ab5853e03bd3aa2463e212d0821822f0162811a9587a33499ee48fdc99ec5e802ee8e6535a0c3c957ac166826e792f3f100d6c5fb61f9c6284dfee7be0fff46f5e3b53d05161464b4be24a8b8774c1e25f60417e1d\"}"}
May 07 11:04:39.000 DEBG Received request type: job
May 07 11:04:39.000 INFO Got a new job: JobTemplate { height: 56881, difficulty: 1, pre_pow: "0001000000000000de316820fdfc32a8d0b3bb4b1c3c5708fc69520efcdcc6a72583924657cea6179973000000005af0166e00000000000136953c3726b8b47b99a8c6a2452efb02f5bb8c324298d81db11b1449fd5f95cc5ae81e3699b4614431ed3d1452ab5853e03bd3aa2463e212d0821822f0162811a9587a33499ee48fdc99ec5e802ee8e6535a0c3c957ac166826e792f3f100d6c5fb61f9c6284dfee7be0fff46f5e3b53d05161464b4be24a8b8774c1e25f60417e1d" }
May 07 11:04:39.000 DEBG Received message: {"id":"1","jsonrpc":"2.0","method":"status","result":"{\"id\":\"1\",\"height\":56881,\"difficulty\":1,\"accepted\":0,\"rejected\":0,\"stale\":0}","error":null}
Both miners (one arm64 with 6 cores, the other arm64 with 4 cores) use two of the available cores for 'whatever':
[grin@rock64 miner]$ top -b -1 -n1 | head -n20
top - 11:21:22 up 9 days, 19:02, 1 user, load average: 2.18, 2.12, 2.10
Tasks: 102 total, 2 running, 100 sleeping, 0 stopped, 0 zombie
%Cpu0 : 0.0 us, 11.8 sy, 0.0 ni, 88.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 23.5 us, 0.0 sy, 0.0 ni, 76.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3986.2 total, 3278.0 free, 66.9 used, 641.3 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 3880.0 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11690 grin 20 0 645428 5940 4656 R 218.8 0.1 1767:41 grin-miner
12007 grin 20 0 9444 3312 2788 R 6.2 0.1 0:00.02 top
1 root 20 0 162072 8236 6260 S 0.0 0.2 0:11.52 systemd
top - 09:26:26 up 2 days, 10:57, 1 user, load average: 2.27, 2.18, 2.17
Tasks: 102 total, 2 running, 100 sleeping, 0 stopped, 0 zombie
%Cpu0 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 16.3 us, 0.3 sy, 0.0 ni, 83.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 4035764 total, 3465248 free, 49200 used, 521316 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 3703436 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2260 grin 20 0 642648 9484 3104 R 215.9 0.2 17316:09 grin-miner
1 root 20 0 6836 4432 2744 S 0.0 0.1 0:09.16 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kthreadd
After restarting both of the miners by pressing 'q' in the tui and starting grin-miner new, the mining works as expected.
I see the issue here. Resolved with: https://github.com/mimblewimble/grin-miner/pull/7
@photis Please verify the fix and close this issue if you find it resolved.
Works like a charm now. Closed.
I’ve got 3 miners connected to 1 stratum server. One of the miners runs locally (on the same machine as the stratum server), 2 of them run remotely (on 2 MacBook Pro’s conected over the internet). When the miners lose connection to the stratum server (either because of a flaky network connection or because the stratum server was stopped/restarted), they create a new connection successfully (with a new worker ID) but fail to resume mining.