z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
291 stars 437 forks source link

Could not parse rpc data from daemon instance 0 #312

Open deep40191 opened 6 years ago

deep40191 commented 6 years ago

m@r:~/z-nomp$ npm start

z-nomp@0.0.4 start /home/m/z-nomp LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/node_modules/stratum-pool/node_modules/equihashverify/build/Release/:$PWD/node_modules/equihashverify/build/Release/ node init.js

2018-03-22 10:50:42 [POSIX] [Connection Limit] (Safe to ignore) POSIX module not installed and resource (connection) limit was not raised 2018-03-22 10:50:42 [Master] [CLI] CLI listening on port 17117 2018-03-22 10:50:42 [PPLNT] [zcash] TimeShare processing setup with redis (127.0.0.1:6379) 2018-03-22 10:50:43 [Website] [Server] Website started on localhost:8080 2018-03-22 10:50:43 [Master] [PoolSpawner] Spawned 1 pool(s) on 4 thread(s) 2018-03-22 10:50:43 [Switching] [Setup] (Thread 1) Loading last proxy state from redis 2018-03-22 10:50:43 [Pool] [zcash] (Thread 1) Share processing setup with redis (127.0.0.1:6379) 2018-03-22 10:50:43 [Pool] [zcash] (Thread 1) Could not parse rpc data from daemon instance 0 Request Data: {"method":"getinfo","params":[],"id":1521696043391} Reponse Data: !DOCTYPE html> html lang="en"> head> meta charset="utf-8"> title>Error /head> body> pre>Cannot POST / /body> /html>

deep40191 commented 6 years ago

error

crutched commented 6 years ago

Check your daemon port (in pool_configs/zcash.json, section "daemons"). Looks like you put http port and getting responses from http-server instead of daemon.

mrsaicharan1 commented 6 years ago

@crutched I have come across the same error. Could you explain what you meant by replacing the daemon port. What should i keep in the config file?

crutched commented 6 years ago

@mrsaicharan1 you need to put port for rpc of the daemon in the "daemons" section of config. This port is custom for every coin.

mrsaicharan1 commented 6 years ago

Do you have any idea for zencoin? the rpc port of daemon?

mrsaicharan1 commented 6 years ago

Also, what IP do I put in? The VPS IP or what ?

crutched commented 6 years ago

@mrsaicharan1 if your daemon on the same machine - put 127.0.0.1 loop as ip. Usually rpc works with localhost only, you need to config it if you want to have your daemon on another machine.

mrsaicharan1 commented 6 years ago

I tried keeping that . It says the pool could not start :(. 127.0.0.1 IP Port 80. Do I need to change it elsewhere too?

crutched commented 6 years ago

@mrsaicharan1 I'm 100% sure that 80 port are never used as rpc port of the daemon.

igorvoltaic commented 6 years ago

Zencash or zencoin? Anyways check out zencash pool config example. You can change your rpc port in your node's config file. Line will look like this: rpcport=12345 where 12345 is your preferred rpc port number. Did you start your node before starting z-nomp? Make sure it gives you reply when you make getinfo query.

mrsaicharan1 commented 6 years ago

Yeah,I set up the zencash node before. It gives the live status of number of blocks too. The node works fine. The only thing which is not running is the pool due to config issue.

mrsaicharan1 commented 6 years ago

{ "enabled": true, "coin": "zen.json",

"address": "znYnbSYnMFSZqyk1VMzHE6QNiP7pp6RH7FE",
"_comment_address": "a transparent address to send coinbase rewards to and to transfer to zAddress.",

"zAddress": "zcLh1SzCYt64T1m17TTNXVSYz1txEFbyCL7qSU9oSEbjjf8wD3rWst1wMeeGqN1nmwENy7LAuQ3U1wywyzucwc8sfXCcLrj",
"_comment_zAddress": "a private address used to send coins to tAddress.",

"tAddress": "znhg6n4jpujWfvwxEkjV5aS3CrJbyPdb6Yc",
"_comment_tAddress": "transparent address used to send payments, make this a different address, otherwise payments will not send",

"invalidAddress":"znhGeka9zXmixvw6ufzGpcaSXcSACrjx5WZ",
"_comment_invalidAddress": "Invalid addresses will be converted to the above",

"walletInterval": 2.5,

"rewardRecipients": {
"znYnbSYnMFSZqyk1VMzHE6QNiP7pp6RH7FE":0
},

"tlsOptions": {
    "enabled": false,
    "serverKey":"",
    "serverCert":"",
    "ca":""
},

"paymentProcessing": {
    "enabled": true,
    "paymentMode": "prop",
    "_comment_paymentMode":"prop, pplnt",
    "paymentInterval": 20,
    "minimumPayment": 0.1,
    "maxBlocksPerPayment": 3,
    "daemon": {
        "host": "107.173.118.210",
        "port": 18231,
        "user": "zenuserorsomebettername",
        "password": "replacethiswithagoodpassword"
    }
},

"ports": {
    "3032": {
        "tls":false,
        "diff": 2.5,
        "varDiff": {
            "minDiff": 0.04,
            "maxDiff": 16,
            "targetTime": 15,
            "retargetTime": 60,
            "variancePercent": 30
        }
    }
},

"poolId": "main",
"_comment_poolId": "use it for region identification: eu, us, asia or keep default if you have one stratum instance for one coin",

"daemons": [
    {
        "host": "127.0.0.1",
        "port": ,
    "user": "zenuserorsomebettername",
        "password": "replacethiswithagoodpassword"
    }
],

"p2p": {
    "enabled": false,
    "host": "127.0.0.1",
    "port": 19333,
    "disableTransactions": true
},

"mposMode": {
    "enabled": false,
    "host": "127.0.0.1",
    "port": 3306,
    "user": "me",
    "password": "mypass",
    "database": "zcl",
    "checkPassword": true,
    "autoCreateWorker": false
}

}

mrsaicharan1 commented 6 years ago

Here's my zen.json. @igorvoltaic . Do I need to make any changes?

mrsaicharan1 commented 6 years ago

Have to input port and everything too.

mrsaicharan1 commented 6 years ago

OK, I've gone past this error and put in the correct rpc port. Now how do I tell the miners which IP to connect to?

mrsaicharan1 commented 6 years ago

I'm also getting an error right now saying daemon does not own pool address? Where do I fix this?

igorvoltaic commented 6 years ago

Hi, Yes, your setup doesn’t have port settings in daemon section.

And yes, you need use taddress and zaddress of your daemon

On 5 Jul 2018, at 17:15, Saicharan Reddy notifications@github.com wrote:

I'm also getting an error right now saying daemon does not own pool address? Where do I fix this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mrsaicharan1 commented 6 years ago

Hey @igorvoltaic . yes i've realized my mistake and I have the pool and payments running now

mrsaicharan1 commented 6 years ago

Can you help me with connecting my miner to it?

mrsaicharan1 commented 6 years ago

miner.exe --server us.miningspeed.com --port 3062 --user znmcoPKLvrUd2qfyH8jfrU52AVgU7sJQ9CL.gamingcomputer --pass x --pec

Is this the correct cmd command?

igorvoltaic commented 6 years ago

Check out “ports” section for connection port and use your pool’s IP

On 5 Jul 2018, at 17:24, Saicharan Reddy notifications@github.com wrote:

Can you help me with connecting my miner to it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mrsaicharan1 commented 6 years ago

username and password can be random?

igorvoltaic commented 6 years ago

Of course not. Just use your usual zen address. Address of the pool will accumulate pool’s fee and you address will receive payments after 100 confirmations. (Minus fee, but right now you have zero fee)

If you want SSL support check out my pool request, it has nginx example

On 5 Jul 2018, at 17:27, Saicharan Reddy notifications@github.com wrote:

username and password can be random?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mrsaicharan1 commented 6 years ago

You mean the wallet address right?

igorvoltaic commented 6 years ago

Yes

igorvoltaic commented 6 years ago

Just like with any other pool. Miner’s —server option should contain your pool’s IP address

mrsaicharan1 commented 6 years ago

Thanks @igorvoltaic !Honestly speaking, the setup was a pain in the butt but the community made it easier! Now my pool's up and running!!!! <3

mrsaicharan1 commented 6 years ago

hey @igorvoltaic , the miner has connected to the pool, but the stats don't show up live on z-nomp website. http://107.173.118.210:8080

mrsaicharan1 commented 6 years ago

It says that I have one authorized user on the cmd

igorvoltaic commented 6 years ago

Usually takes several minutes. Does miner show you mining process? Can’t open pool’s web page

On 5 Jul 2018, at 17:47, Saicharan Reddy notifications@github.com wrote:

It says that I have one authorized user on the cmd

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mrsaicharan1 commented 6 years ago

Hey @igorvoltaic . Done , mining has also started! Thanks anyways!!!

mrsaicharan1 commented 6 years ago

One last thing, I wasn't able to change pool fee %. where do I do that?

igorvoltaic commented 6 years ago

In rewardRecipients section you set pool’s address and percentage. 1.0 stands for 1%

On 5 Jul 2018, at 17:51, Saicharan Reddy notifications@github.com wrote:

One last thing, I wasn't able to change pool fee %. where do I do that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.