bonesoul / CoiniumServ

Next-gen crypto currency mining pool software
Other
795 stars 493 forks source link

cgminer/4.9.0 disconnect/reconnect from/to the pool in a loop #1025

Open robbterr opened 6 years ago

robbterr commented 6 years ago

Hi,

i set up the coinium server on ubuntu (azure) and configured multiple currencies. Everything is working fine with cpu/gpu miners and some asic miners. I wanted to test the server and performance with more hash power und tried to use: www.miningrigrentals.com

About 50% of the miners are always reconnecting, so i looked in the logs and found this:

05/08/2018 18:45:20 +00:00 [Verbose] [StratumMiner] [Lynx] rx: "{
    'id' : 1874,
    'method' : 'mining.multi_version',
    'params' : [
        1
    ]
}"
05/08/2018 18:45:20 +00:00 [Verbose] [StratumMiner] [Lynx] tx: "{
    'jsonrpc' : '2.0',
    'error' : {
        'code' : -32601,
        'message' : 'Method not found',
        'data' : 'The method does not exist / is not available.'
    },
    'id' : 1874
}"

at the same time:

05/08/2018 18:45:19 +00:00 [Debug] [StratumServer] [Lynx] Stratum client connected: "172.104.181.35:54500"
05/08/2018 18:45:20 +00:00 [Debug] [MinerManager] [Lynx] Authenticated miner: KR7B6kF9mntd4sz6fiF6V8HR2c1e9oS1bJ [172.104.181.35:54500]
05/08/2018 18:45:20 +00:00 [Debug] [StratumServer] [Lynx] Stratum client disconnected: "Not Connected!"

and then the miner tries to reconnect

I think most (all) of the miners that are reconnecting are cgminer/4.9.0

So ... is there something i can do? Can the server return something so that the miner does not disconnect?

Is it connected to ?:

Thx for the help And thx for the nice pool server

bonesoul commented 6 years ago

It's calling a method "/" which is weird. We should ignore this internally then.

robbterr commented 6 years ago

isn´t it calling mining.multi_version?

bonesoul commented 6 years ago

sorry my bad, seems so.

robbterr commented 6 years ago

i ignored the requests that caused the error(s) and it looks like it´s working fine

the description of mining.extranonce.subscribe says if a server does not support it, it can just be ignored https://www.nicehash.com/help/patches-for-extranoncesubscription

i cant find any documentation for mining.multi_version

+        [JsonRpcMethod("mining.multi_version")]
+        public void MiningMultiVersion()
+        {
+            // do nothing;
+        }
+        
+        [JsonRpcMethod("mining.extranonce.subscribe")]
+        public void MiningExtraonceSubscrube()
+        {
+            // do nothing;
+        }
vr4dude316 commented 6 years ago

This is exac happening to me. Where is this file, so I can edit?

cryptonoob42 commented 6 years ago

I can confirm half of @robbterr 's solution. I added his proposed method MiningExtranonceSubscribe() to

src/CoiniumServ/Server/Mining/Stratum/StratumService.cs

and a rented rig with sgminer/5.5.5-b can now connect and mine just fine. I simply added those lines to the file mentioned above, rebuilt, adapted the main config file again to change the webserver port, and started CoiniumServ again.

@vr4dude316 maybe you want to do that as well, if you haven't already?