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

Not all payments fullfilled #4

Open
NinjaZool opened this issue Aug 11, 2017 · 22 comments
Open

Not all payments fullfilled #4

NinjaZool opened this issue Aug 11, 2017 · 22 comments

Comments

@NinjaZool
Copy link

as here: bonesoul#662

Not all "payments" are fullfilled and payments they aren't made (payments are not receveid and are not on blockexplorer)

Seeing the log, Coinum seems fail payments and it isn't re-try to pay. Furthermore on coinium web page (failed) payments are described as "payed" but flagged with "fullfilled NO" (as shown in attached image)

notfullfilledblock

In log, first payment failed, report this error:
[Error] [CoiniumServ.Payments.PaymentProcessor] [mycoin] An error occured while trying to execute payment; "The request timed out"
[Information] [CoiniumServ.Payments.PaymentProcessor] [mycoin] No pending payments found
[Error] [CoiniumServ.Pools.NetworkInfo] [mycoin] Can not read getmininginfo(): Error: SendFailure (Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.)

Since first failed payment, subsequent payments return this error:
[Error] [CoiniumServ.Payments.PaymentProcessor] [mycoin] An error occured while trying to execute payment; "Account has insufficient funds"
[Information] [CoiniumServ.Payments.PaymentProcessor] [mycoin] No pending payments found

but in this last case my account, in relation to "minimum" in "payments" in pools/default.json, has sufficient funds.

My system is Debian 8.

@vkynchev
Copy link

vkynchev commented Aug 12, 2017

Hi! Nice to see people are interested in CoiniumServ :)
In my situation I am running CoiniumServ on non-Windows machine and the mono CPU usage is very high. Could you check your usage?
If the CPU usage is more than 90% the coin daemon gives timeout errors. The same applies to redis & mysql. What you could try is to move CoiniumServ to another host(temporarily) to see if the problem exists...

Normally there shouldn't be any timeout errors with the daemon as it needs to be running 24/7 with 100% availability. Could you check yourcoind listaccounts and see if the transaction made it through. That will explain the insufficient funds error as only the response 'timed out'.

And there is another error with the mysql database which I will post PR shortly.

BTW: What coin are you mining?

@vagabondan
Copy link
Owner

Hi!
I see no exceptional CPU usage despite average share-load is rather intensive ~10 shares/second.
CPU usage is from 1 to 10% at such rates.
I concentrate on LTC for now.

@vkynchev
Copy link

vkynchev commented Aug 13, 2017

@vagabondan On what OS are you running? On my macOS it is 90-99% and in docker container (with ubuntu16.04) it is the same... Only on Windows machine it keeps it under 2% with 110MH with varDiff...

From how many workers do you get ~10 shares/s... What are the varDiff settings for your pool?

@vagabondan
Copy link
Owner

@vkynchev I run it on pure Ubuntu 16.04 server without docker, latest mono version.

Well, exact number of workers and varDiff separately are not so important because pool load depends on their combination: if you have low performance workers set diff to low numbers, and vice versa.
Just choose comfortable load for your pool playing with these parameters. For me 10 shares/s is appropriate, but I could have it for different numbers of workers.

@vagabondan
Copy link
Owner

@NinjaZool I agree with @vkynchev. Your situation looks like CS lost connection to your wallet (yourcoind daemon) and couldn't reinitiate it. Another possible reason could be in you wallet's features, so please tell us what software do you run as wallet?

@vkynchev
Copy link

vkynchev commented Aug 13, 2017

@NinjaZool @vagabondan Actually now I encountered similar(maybe the same) issue with LTC testnet. When I mine about 10 blocks the first payout goes through, but there are insufficient funds for the second... After the error I checked the total sum that has to be paid and the account balance - there are missing 0.02 LTC and the transaction cannot be sent. Which I resolved by adding the main wallet in the "rewards" part of pool.json like that "<<YOUR_ADDRESS>>": 0.1, which saves 0.1% from the block for transaction fees. Hope this helps!

@vagabondan
Copy link
Owner

vagabondan commented Aug 14, 2017

@vkynchev I believe I've found the reason of 90% CPU usage: connection to redis can not be instantiated for unknown reason. That's why you've proposed "abortConnect=false" but this doesn't solve the root problem. Now I'm trying to find out what's happened.

@vkynchev
Copy link

vkynchev commented Aug 14, 2017

@vagabondan Cool! Thanks for pointing me... Just found out that redis connection randomly drops... Even tried on public redis hosting - same issue...
Also another question... is segwit is enabled on LTC testnet4?

@vagabondan
Copy link
Owner

vagabondan commented Aug 14, 2017

@vkynchev Problem is in StackExchange.Redis v1.2.5:
StackExchange/StackExchange.Redis#683
Recommend to revert to 1.2.4 version. This should work: works for me.

About LTC testnet4:
I believe all testents should be synchronized by enabled features with main net, but I don't know exactly.

@vagabondan
Copy link
Owner

Commited with StackExchange.Redis v1.2.4 onboard

@vkynchev
Copy link

vkynchev commented Aug 14, 2017

@vagabondan Thanks! This fixed the connection to redis... After about an hour I'll make PRs with some changes...

@vagabondan
Copy link
Owner

vagabondan commented Aug 17, 2017

@NinjaZool does your problem stay actual?

@MyWay
Copy link

MyWay commented Aug 18, 2017

Same problem with Peercoin. Upgrading right now to latest commit.

@NinjaZool
Copy link
Author

@vkynchev Peercoin

@vagabondan After update, pool has restarted to pay, but at the time of payment, pool log has gave these errors in debug.log:

08/19/2017 11:43:09 -04:00 [Debug] [CoiniumServ.Mining.MinerManager] [Peercoin] Miner authentication failed: address1 [ipPool]
08/19/2017 11:43:09 -04:00 [Error] [CoiniumServ.Pools.NetworkInfo] [Peercoin] Can not read getinfo(): Error getting response stream (ReadDone1): ReceiveFailure
08/19/2017 11:43:09 -04:00 [Error] [CoiniumServ.Blocks.BlockProcessor] [Peercoin] Unhandled rpc-exception: The request timed out
08/19/2017 11:43:09 -04:00 [Debug] [CoiniumServ.Server.Mining.Stratum.StratumServer] [Peercoin] Stratum client disconnected: "Not Connected!"
08/19/2017 11:43:14 -04:00 [Error] [CoiniumServ.Pools.NetworkInfo] [Peercoin] Can not read getmininginfo(): The request timed out
08/19/2017 11:43:14 -04:00 [Error] [CoiniumServ.Pools.NetworkInfo] [Peercoin] Can not read getblocktemplate(): Error: SendFailure (Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.)
08/19/2017 11:43:14 -04:00 [Debug] [CoiniumServ.Statistics.StatisticsManager] [global] Recached statistics - took 6.787 seconds
08/19/2017 11:43:14 -04:00 [Error] [CoiniumServ.Blocks.BlockProcessor] [Peercoin] Unhandled rpc-exception: The request timed out
08/19/2017 11:43:19 -04:00 [Error] [CoiniumServ.Blocks.BlockProcessor] [Peercoin] Unhandled rpc-exception: The request timed out
08/19/2017 11:43:19 -04:00 [Error] [CoiniumServ.Blocks.BlockProcessor] [Peercoin] Unhandled rpc-exception: Error: SendFailure (Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.)

Furthermore, webpage statistics and tables Transaction and Payment in MySql db have not been updated:

  • In Payment table, payments are not yet fullfilled (Completed = 0);
  • In Transaction table, there are not transactions of the new payments to miners.

@vkynchev
Copy link

vkynchev commented Aug 20, 2017

@NinjaZool This looks like the coin daemon is not responding... Where are you hosting your coind? Could you run peercoind getinfo? Also could you post your pool config?

@MyWay
Copy link

MyWay commented Aug 20, 2017

Upgraded again right now. I'm getting:

[CoiniumServ.Pools.NetworkInfo] [Peercoin] RpcException while DetectSubmitBlockSupport
CoiniumServ.Daemon.Exceptions.RpcErrorException: Block decode failed
  at CoiniumServ.Daemon.DaemonBase.GetJsonResponse (System.Net.HttpWebRequest httpWebRequest) [0x000c6] in <ffb6b6b1e4574a93a37464027d367e62>:0 
  at CoiniumServ.Daemon.DaemonBase.GetRpcResponse[T] (System.Net.HttpWebRequest httpWebRequest) [0x00000] in <ffb6b6b1e4574a93a37464027d367e62>:0 
  at CoiniumServ.Daemon.DaemonBase.MakeRpcRequest[T] (CoiniumServ.Daemon.DaemonRequest walletRequest) [0x00008] in <ffb6b6b1e4574a93a37464027d367e62>:0 
  at CoiniumServ.Daemon.DaemonBase.MakeRequest[T] (System.String method, System.Object[] parameters) [0x00019] in <ffb6b6b1e4574a93a37464027d367e62>:0 
  at CoiniumServ.Daemon.DaemonClient.SubmitBlock (System.String blockHex) [0x00000] in <ffb6b6b1e4574a93a37464027d367e62>:0 
  at CoiniumServ.Pools.NetworkInfo.DetectSubmitBlockSupport () [0x00000] in <ff

@vagabondan
Copy link
Owner

vagabondan commented Aug 20, 2017

@MyWay The reason is your wallet returns error codes. It is not an error actually, but the way to determine what methods of submit block are supported by your wallet. Just skip it for now.
Fix is here: aac98c2

@NinjaZool
Copy link
Author

@vkynchev Meanwhile i've completely switch off Peercoin, now i'm on WACoins (however based on Peercoin) and i have same behaviour.

  1. Actually my host is YourLastHost
  2. My getinfo:
./wacoinsd getinfo
{
    "version" : "0.1.2.e8ce593",
    "protocolversion" : 60006,
    "walletversion" : 60000,
    "balance" : 204.87074000,
    "newmint" : 291.71650000,
    "stake" : 0.00000000,
    "blocks" : 4273,
    "moneysupply" : 7205840.01758100,
    "connections" : 8,
    "proxy" : "",
    "ip" : "MYIPPool",
    "difficulty" : 1414878.29745398,
    "testnet" : false,
    "keypoololdest" : 1503103397,
    "keypoolsize" : 101,
    "paytxfee" : 0.00080000,
    "errors" : ""
}
  1. My ConiumServ/bin/Release/config/pools/wacoins.json file:
{
    "enabled": true,
    "coin": "wacoins.json",
    "daemon": {
        "port": aPortNumber,
        "username": "anUsername",
        "password": "aSuperSecretPassword"
    },

    "payments": {
        "enabled": true,
        "interval": 3600,
        "minimum": 1.02
    },

    "wallet": {
        "address": "anAddress",
        "txfee": 0.01
    },
    "rewards": [
        {
            "anotherAddress": myFeeReward
        }
    ],
    "stratum": {
        "port": anotherPortNumber
    },
    "storage": {
        "hybrid": {
            "mysql": {
                "database": "myDbName"
            }
        }
    }
}

@vkynchev
Copy link

@NinjaZool Could you try to use this in the daemon part...

"daemon": {
        "host": "<localhost or 127.0.0.1>",
        "port": <rpc port **NOT** p2p port>,
        "username": "<not_super_secret_user>",
        "password": "<super_secret_pass>"
},

Also your coin daemon could not be configured correctly...
Try with this config:

daemon=0
server=1
port=<your_p2p_port>
rpcport=<**your_rpc_port**>
rpcuser=<not_super_secret_user>
rpcpassword=<super_secret_pass>

There should not be any spaces between the = signs

If the coin daemon is not on the same host you should add rpcallowip=<your_network_mask> to the coind config...

@vkynchev
Copy link

vkynchev commented Aug 21, 2017

@NinjaZool Your problem is not specifically to Peercoin but to the connection between CoiniumServ and the coin daemon... The miner fails to authenticate because there is address verification made by the coin daemon and the other errors are for about the same issue...

My config looks like this:

"daemon": {
        "host": "192.168.1.11",
        "port": 19335,
        "username": "litecoinrpc",
        "password": "<super_secret_pass>"
    },

And in coin.conf:

daemon=0
server=1
testnet=1
port=19336
rpcallowip=192.168.1.1/24
rpcport=19335
rpcuser=litecoinrpc
rpcpassword=<super_secret_pass>

@MyWay
Copy link

MyWay commented Aug 27, 2017

Still getting
CoiniumServ.Daemon.Exceptions.RpcException: The request timed out ---> System.Net.WebException: The request timed out at System.Net.HttpWebRequest.GetRequestStream () [0x0004d] in <2b0d86369d72459baed0cee98a8e578a>:0 at CoiniumServ.Daemon.DaemonBase.MakeHttpRequest (CoiniumServ.Daemon.DaemonRequest walletRequest) [0x000b8] in <df2a3eee802a4f6484d3f35123e0b85f>:0 --- End of inner exception stack trace --- at CoiniumServ.Daemon.DaemonBase.MakeHttpRequest (CoiniumServ.Daemon.DaemonRequest walletRequest) [0x000fd] in <df2a3eee802a4f6484d3f35123e0b85f>:0 at CoiniumServ.Daemon.DaemonBase.MakeRpcRequest[T] (CoiniumServ.Daemon.DaemonRequest walletRequest) [0x00000] in <df2a3eee802a4f6484d3f35123e0b85f>:0 at CoiniumServ.Daemon.DaemonBase.MakeRequest[T] (System.String method, System.Object[] parameters) [0x00019] in <df2a3eee802a4f6484d3f35123e0b85f>:0 at CoiniumServ.Daemon.DaemonClient.GetBlockTemplate (System.Boolean modeRequired) [0x00067] in <df2a3eee802a4f6484d3f35123e0b85f>:0 at CoiniumServ.Jobs.Manager.JobManager.BlockPoller (System.Object stats) [0x0002a] in <df2a3eee802a4f6484d3f35123e0b85f>:0
I can confirm that the node daemon is working correctly while I'm getting these errors on the pool. If I stop and restart the pool is working again.

@NinjaZool
Copy link
Author

@vkynchev I've checked Daemon configuration files and they're properly configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants