global.database.getCache('pool_stats_pps') return false, do I miss something in db pool.config ?
Hi,
after first run deploy.sh , those API:
- /api/pool/stats/pps
- /api/pool/stats/pplns
- /api/pool/stats/solo
keep telling:
TypeError: Cannot create property 'fee' on boolean 'false'
at /home/username/nodejs-pool/lib/api.js:248:28
at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
at next (/home/username/nodejs-pool/node_modules/express/lib/router/route.js:131:13)
at makeResponseCacheable (/home/username/nodejs-pool/node_modules/apicache/src/apicache.js:207:5)
at cache (/home/username/nodejs-pool/node_modules/apicache/src/apicache.js:438:16)
at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
at next (/home/username/nodejs-pool/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/home/username/nodejs-pool/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
at /home/username/nodejs-pool/node_modules/express/lib/router/index.js:277:22
at param (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:349:14)
at param (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:410:3)
at next (/home/username/nodejs-pool/node_modules/express/lib/router/index.js:271:10)
at jsonParser (/home/username/nodejs-pool/node_modules/body-parser/lib/types/json.js:110:7)
at Layer.handle [as handle_request] (/home/username/nodejs-pool/node_modules/express/lib/router/layer.js:95:5)
I've check the code, it seen not get the db cache on /api.js line 248,
global.database.getCache('pool_stats_pplns')
which returns a false value.
Do I miss some configs value in database pool.config or config.json something ?
And, API /leafApi also return a 502 Bad Gateway.
Thanks for help.
Try to restart api module. This happens during initial pool run. Also see https://github.com/Snipa22/nodejs-pool/pull/280
I've restart api several times and errors appear as the same. I wonder may be some config value lost. @MoneroOcean
@longnight enable PPS restart worker module then wait 1 min.
or add in worker module
if (!(global.database.getCache('pool_stats_pps'))){
global.database.setCache('pool_stats_pps', {
hashRate: 0,
miners: 0,
totalHashes: 0,
lastBlockFoundTime: 0,
lastBlockFound: 0,
totalBlocksFound: 0,
totalMinersPaid: 0,
totalPayments: 0,
roundHashes: 0,
totalAltBlocksFound: 0,
altBlocksFound: {},
activePort: 0,
activePortProfit: 0,
activePortComment: "",
minBlockRewards: {}
});
}
@1rV1N-git Thank you.
What should do to enable PPS ? I've already modified some config in db pool.config.
And, I appended above code in to worker module, /api/pool/stats/pps no more complaint, but
/api/pool/stats/pplns
/api/pool/stats/solo
/leafApi
are still giving me 500 error