Open nickcocchiarella opened 6 years ago
did you run npm update ?
Yes, it's now running I fixed an issue with it earlier, however this is the new error I am getting following fixing the previous issue (radis server now installed).
module.js:356 Module._extensions[extension](this, filename); ^ Error: /home/user123/pool/node_modules/bignum/binding/bignum.node: undefined symbol: node_module_register at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/home/user123/pool/node_modules/bignum/index.js:4:11) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) 2018-02-19 08:10:42 [master] Pool fork 24 died, spawning replacement worker...
Try with node 0.10.48
nvm install 0.10.48 nvm use 0.10.48 nvm use default
Then, rebuild source
cd node-cryptonode-pool
rm -rf node_modules
npm update
Hi! That fix seems to have done something this is new error?
2018-02-19 09:22:20 [pool] (Thread 18) Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"} 2018-02-19 09:22:20 [pool] (Thread 21) Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"} 2018-02-19 09:22:20 [pool] (Thread 22) Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"} 2018-02-19 09:22:20 [pool] (Thread 20) Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"} 2018-02-19 09:22:20 [pool] (Thread 23) Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"} 2018-02-19 09:22:20 [pool] (Thread 24) Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
That is nothing to do with you, this is the deamon config. let me reconfigure and i'll come back.
Now getting the same error, after doing what you said again;
sudo node init.js Failed to read config file config.json
SyntaxError: Unexpected token /
/home/user123/node-cryptonote-pool/lib/logger.js:16
var logDir = config.logging.files.directory;
^
ReferenceError: config is not defined
at Object.
hi ! please make sure that you install enough lib. Ubuntu 16: `apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server
add-apt-repository ppa:bitcoin/bitcoin
apt-get update
apt-get install libdb4.8-dev libdb4.8++-dev`
Ubuntu 14 `apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
apt-get install libboost-all-dev git npm nodejs nodejs-legacy libminiupnpc-dev redis-server
add-apt-repository ppa:bitcoin/bitcoin
apt-get update
apt-get install libdb4.8-dev libdb4.8++-dev
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh
source ~/.profile
nvm install 0.10.25
nvm use 0.10.25`
`sudo node init.js Failed to read config file config.json
SyntaxError: Unexpected string /home/user123/node-cryptonote-pool/lib/logger.js:16 var logDir = config.logging.files.directory; ^
ReferenceError: config is not defined
at Object.
This still don't work.
you need rebuild source again and edit in config.json
gyp ERR! build error gyp ERR! stack Error:
make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:269:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-112-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/user123/node-cryptonote-pool/node_modules/multi-hashing
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
cryptonote-pool@0.0.1 /home/user123/node-cryptonote-pool
└── cryptonote-util@0.0.3 (git://github.com/romankosoj/node-cryptonote-util.git#b5474a8adff6786d2e3f86c5003c0833ca59aa5d)
npm ERR! Linux 4.4.0-112-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE
npm ERR! multi-hashing@0.0.9 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the multi-hashing@0.0.9 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the multi-hashing package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs multi-hashing
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls multi-hashing
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/user123/node-cryptonote-pool/npm-debug.log `
which ubuntu you use ? 16 or 14 ?
use node 0.10.48
The same with 48. I'm on ubuntu 16.
npm ERR! Linux 4.4.0-112-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "update" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! code ELIFECYCLE
npm ERR! multi-hashing@0.0.9 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the multi-hashing@0.0.9 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the multi-hashing package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs multi-hashing
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls multi-hashing
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /home/user123/node-cryptonote-pool/npm-debug.log
did you do rm -rf node_modules before npm update ?
Yes
544 sudo npm update 545 nvm install 0.10.48 546 nvm use 0.10.48 547 nvm use default 548 rm -rf node_modules 549 sudo rm -rf node_modules 550 sudo npm update 551 history
why sudo ? run without sudo
npm update
I'm using ubuntu, ubuntu is required for sudo
npm ERR! error rolling back errno: 3, npm ERR! error rolling back code: 'EACCES', npm ERR! error rolling back path: '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util' } npm ERR! Linux 4.4.0-112-generic npm ERR! argv "/home/user123/.nvm/v0.10.48/bin/node" "/home/user123/.nvm/v0.10.48/bin/npm" "update" npm ERR! node v0.10.48 npm ERR! npm v2.15.1 npm ERR! path npm-debug.log.3522203672 npm ERR! code EACCES npm ERR! errno 3
npm ERR! Error: EACCES, open 'npm-debug.log.3522203672' npm ERR! { [Error: EACCES, open 'npm-debug.log.3522203672'] errno: 3, code: 'EACCES', path: 'npm-debug.log.3522203672' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! /home/user123/node-cryptonote-pool/npm-debug.log user123@ubuntu:~/node-cryptonote-pool$
npm not required root permision.
user123@ubuntu:~/node-cryptonote-pool$ npm update npm ERR! tar.unpack untar error /home/user123/.npm/multi-hashing/0.0.9/package.tgz npm ERR! Linux 4.4.0-112-generic npm ERR! argv "/home/user123/.nvm/v0.10.48/bin/node" "/home/user123/.nvm/v0.10.48/bin/npm" "update" npm ERR! node v0.10.48 npm ERR! npm v2.15.1 npm ERR! path /home/user123/node-cryptonote-pool/node_modules/cryptonote-util npm ERR! code EACCES npm ERR! errno 3
npm ERR! Error: EACCES, rmdir '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util' npm ERR! { [Error: EACCES, rmdir '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! error rolling back Error: EACCES, rmdir '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util' npm ERR! error rolling back { [Error: EACCES, rmdir '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util'] npm ERR! error rolling back errno: 3, npm ERR! error rolling back code: 'EACCES', npm ERR! error rolling back path: '/home/user123/node-cryptonote-pool/node_modules/cryptonote-util' } npm ERR! Linux 4.4.0-112-generic npm ERR! argv "/home/user123/.nvm/v0.10.48/bin/node" "/home/user123/.nvm/v0.10.48/bin/npm" "update" npm ERR! node v0.10.48 npm ERR! npm v2.15.1 npm ERR! path npm-debug.log.3522203672 npm ERR! code EACCES npm ERR! errno 3
npm ERR! Error: EACCES, open 'npm-debug.log.3522203672' npm ERR! { [Error: EACCES, open 'npm-debug.log.3522203672'] errno: 3, code: 'EACCES', path: 'npm-debug.log.3522203672' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! /home/user123/node-cryptonote-pool/npm-debug.log
change to user root.
Switched to root; root@ubuntu:/home/user123/node-cryptonote-pool# node init.js Failed to read config file config.json
SyntaxError: Unexpected string
/home/user123/node-cryptonote-pool/lib/logger.js:16
var logDir = config.logging.files.directory;
^
ReferenceError: config is not defined
at Object.
did you edit config_example.json and change it into name config.json ?
yes
root@ubuntu:/home/user123/node-cryptonote-pool# dir build init.js LICENSE node_modules README.md website_example config.json lib logs package.json redisBlocksUpgrade.js root@ubuntu:/home/user123/node-cryptonote-pool#
ahhh ! got big problem
Failed to read config file config.json
have error when you edit haha. check spelling.
default script: Failed to read config file config.json
SyntaxError: Unexpected token /
/home/user123/node-cryptonote-pool/lib/logger.js:16
var logDir = config.logging.files.directory;
^
ReferenceError: config is not defined
at Object.
let me see your config.js file
`root@ubuntu:/home/user123/node-cryptonote-pool# cat config.json / Used for storage in redis so multiple coins can share the same redis instance. / "coin": "monero",
/ Used for front-end display / "symbol": "MRO",
"logging": {
"files": {
/* Specifies the level of log output verbosity. This level and anything
more severe will be logged. Options are: info, warn, or error. */
"level": "info",
/* Directory where to write log files. */
"directory": "logs",
/* How often (in seconds) to append/flush data to the log files. */
"flushInterval": 5
},
"console": {
"level": "info",
/* Gives console output useful colors. If you direct that output to a log file
then disable this feature to avoid nasty characters in the file. */
"colors": true
}
},
/ Modular Pool Server / "poolServer": { "enabled": true,
/* Set to "auto" by default which will spawn one process/fork/worker for each CPU
core in your system. Each of these workers will run a separate instance of your
pool(s), and the kernel will load balance miners using these forks. Optionally,
the 'forks' field can be a number for how many forks will be spawned. */
"clusterForks": "auto",
/* Address where block rewards go, and miner payments come from. */
"poolAddress": "4AsBy39rpUMTmgTUARGq2bFQWhDhdQNekK5v4uaLU699NPAnx9CubEJ82AkvD5ScoAZNYRwBxybayainhyThHAZWCdKmPYn"
/* Poll RPC daemons for new blocks every this many milliseconds. */
"blockRefreshInterval": 1000,
/* How many seconds until we consider a miner disconnected. */
"minerTimeout": 900,
"ports": [
{
"port": 3333, //Port for mining apps to connect to
"difficulty": 100, //Initial difficulty miners are set to
"desc": "Low end hardware" //Description of port
},
{
"port": 5555,
"difficulty": 2000,
"desc": "Mid range hardware"
},
{
"port": 7777,
"difficulty": 10000,
"desc": "High end hardware"
}
],
/* Variable difficulty is a feature that will automatically adjust difficulty for
individual miners based on their hashrate in order to lower networking and CPU
overhead. */
"varDiff": {
"minDiff": 2, //Minimum difficulty
"maxDiff": 100000,
"targetTime": 100, //Try to get 1 share per this many seconds
"retargetTime": 30, //Check to see if we should retarget every this many seconds
"variancePercent": 30, //Allow time to vary this % from target without retargeting
"maxJump": 100 //Limit diff percent increase/decrease in a single retargetting
},
/* Feature to trust share difficulties from miners which can
significantly reduce CPU load. */
"shareTrust": {
"enabled": true,
"min": 10, //Minimum percent probability for share hashing
"stepDown": 3, //Increase trust probability % this much with each valid share
"threshold": 10, //Amount of valid shares required before trusting begins
"penalty": 30 //Upon breaking trust require this many valid share before trusting
},
/* If under low-diff share attack we can ban their IP to reduce system/network load. */
"banning": {
"enabled": true,
"time": 600, //How many seconds to ban worker for
"invalidPercent": 25, //What percent of invalid shares triggers ban
"checkThreshold": 30 //Perform check when this many shares have been submitted
},
/* [Warning: several reports of this feature being broken. Proposed fix needs to be tested.]
Slush Mining is a reward calculation technique which disincentivizes pool hopping and rewards
'loyal' miners by valuing younger shares higher than older shares. Remember adjusting the weight!
More about it here: https://mining.bitcoin.cz/help/#!/manual/rewards */
"slushMining": {
"enabled": false, //Enables slush mining. Recommended for pools catering to professional miners
"weight": 300, //Defines how fast the score assigned to a share declines in time. The value should roughly be equivalent to the average round duration in seconds divided by 8. When deviating by too much numbers may get too high for JS.
"lastBlockCheckRate": 1 //How often the pool checks the timestamp of the last block. Lower numbers increase load but raise precision of the share value
}
},
/ Module that sends payments to miners according to their submitted shares. / "payments": { "enabled": true, "interval": 600, //how often to run in seconds "maxAddresses": 50, //split up payments if sending to more than this many addresses "mixin": 3, //number of transactions yours is indistinguishable from "transferFee": 5000000000, //fee to pay for each transaction "minPayment": 100000000000, //miner balance required before sending payment "denomination": 100000000000 //truncate to this precision and store remainder },
/ Module that monitors the submitted block maturities and manages rounds. Confirmed blocks mark the end of a round where workers' balances are increased in proportion to their shares. / "blockUnlocker": { "enabled": true, "interval": 30, //how often to check block statuses in seconds
/* Block depth required for a block to unlocked/mature. Found in daemon source as
the variable CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW */
"depth": 60,
"poolFee": 1.8, //1.8% pool fee (2% total fee total including donations)
"devDonation": 0.1, //0.1% donation to send to pool dev - only works with Monero
"coreDevDonation": 0.1 //0.1% donation to send to core devs - only works with Monero
},
/ AJAX API used for front-end website. / "api": { "enabled": true, "hashrateWindow": 600, //how many second worth of shares used to estimate hash rate "updateInterval": 3, //gather stats and broadcast every this many seconds "port": 8117, "blocks": 30, //amount of blocks to send at a time "payments": 30, //amount of payments to send at a time "password": "test" //password required for admin stats },
/ Coin daemon connection details. / "daemon": { "host": "127.0.0.1", "port": 18081 },
/ Wallet daemon connection details. / "wallet": { "host": "127.0.0.1", "port": 8082 },
/ Redis connection into. / "redis": { "host": "127.0.0.1", "port": 6379, "auth": null //If set, client will run redis auth command on connect. Use for remote db } `
I've just changed it to the default one on the page, same error.
clear all comment line Need build with clean config See this. https://raw.githubusercontent.com/zone117x/node-cryptonote-pool/master/config_example.json
This seems to have brought it alive. Which is good. Let's see if I can get the deamon sync'd to it.
what's the command to open up 8117 on ubuntu? you got it handy?
have 2 part: Daemon RPC: ./monerod ( it rpc bind port default is 18081 for monero ) Wallet RPC: ./monero-wallet-rpc --rpc-bind-port 8082 --wallet-file path_to_your_wallet --confirm-bind-port
I'm getting this error
Error: Failed to parse block
at Object.BlockTemplate.nextBlob (/root/pool/lib/pool.js:130:23)
at Object.Miner.getJob (/root/pool/lib/pool.js:303:41)
at handleMinerMethod (/root/pool/lib/pool.js:514:28)
at handleMessage (/root/pool/lib/pool.js:648:13)
at Socket.socket.on.on.on.pushMessage (/root/pool/lib/pool.js:702:25)
at Socket.emit (events.js:95:17)
at Socket.
initial issue was just missing ; on the preceeding line before the log file is set in var logDir=
new issue is with cryptonote-util in package.json
When I type this sudo node init.js
I get this
However, in my directory, I got this - I have this;
So you can see I have the config.json - wondering if it's at the correct place or not? or something I am missing.