node-open-mining-portal icon indicating copy to clipboard operation
node-open-mining-portal copied to clipboard

Redis problem after found a block

Open SuperSpe opened this issue 6 years ago • 3 comments

I setup the pool with Scribe coin and start mining. All works good unitll (I think) the pool found new blocks and start the payment process. This is the error I got continuosly. The pool is working but the website not. `[2018-07-20T06:21:55.895Z] [info] [system] [Website] : Website started on xx.xx.xx.xx:8000 undefined:3 var out='\r\n

\r\n '; var sortedPools = Object.keys(it.stats.pools); out+='\r\n '; sortedPools.sort(function(a, b) { return a.workerCount - b.workerCount; }); out+='\r\n
\r\n \r\n \r\n \r\n
<i class="fa

TypeError: Cannot read property 'replace' of undefined at Object.eval [as blocks] (eval at doT.template (/home/nomp/node_modules/dot/doT.js:133:11), :3:5255) at processTemplates (/home/nomp/libs/website.js:62:62) at /home/nomp/libs/website.js:93:13 at /home/nomp/node_modules/async/dist/async.js:473:16 at iteratorCallback (/home/nomp/node_modules/async/dist/async.js:1050:13) at /home/nomp/node_modules/async/dist/async.js:958:16 at /home/nomp/libs/website.js:86:17 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) [2018-07-20T06:21:55.963Z] [error] [system] [init.js] : Master ^C`

Try to restart and nothing happens, it's something redis related cause if I flushall, the problem disappears until I found a new block.

The pages (views) that contains that html are blocks.html and history.html. If I disable the site form the config all works. I think there is something in the view of the site that retuirn undefined because false reading from redis.

thanks

SuperSpe avatar Jul 20 '18 07:07 SuperSpe

Ok I have isolated the problem to the page blocks.html. If I empty it, the error gone.

SuperSpe avatar Jul 20 '18 07:07 SuperSpe

Did you find your problem? how to solve it? I got the same but did not known how I begin where to solve. [2018-08-03T10:49:13.487Z] [error] [system] [init.js] : Master [2018-08-03T10:49:16.264Z] [info] [system] [Website] : Starting Website module [2018-08-03T10:49:16.271Z] [info] [system] [Stats] : Starting Stats Module... [2018-08-03T10:49:16.271Z] [debug] [system] [Stats] : Initializing Stats Redis... [2018-08-03T10:49:16.275Z] [debug] [system] [Stats] : Initializing Stats History... [2018-08-03T10:49:16.321Z] [info] [system] [Website] : Website started on 0.0.0.0:8080 undefined:3 var out='<style>\r\n #bottomNotes {\r\n display: block;\r\n padding-left: 18px;\r\n padding-right: 18px;\r\n padding-bottom: 18px;\r\n }\r\n\r\n #topPool {\r\n padding-top: 18px;\r\n padding-left: 18px;\r\n padding-right: 18px;\r\n }\r\n\r\n #topPool>div>div>svg {\r\n display: block;\r\n height: 280px;\r\n }\r\n\r\n .poolWrapper {\r\n border: solid 1px #c7c7c7;\r\n border-radius: 5px;\r\n padding: 5px;\r\n margin-bottom: 18px;\r\n }\r\n\r\n .poolLabel {\r\n font-size: 1.2em;\r\n text-align: center;\r\n padding: 4px;\r\n }\r\n\r\n .poolMinerTable {}\r\n\r\n table {\r\n width: 100%;\r\n }\r\n</style>\r\n<div style="margin-top: 36px;" >\r\n '; var sortedPools = Object.keys(it.stats.pools); out+='\r\n '; sortedPools.sort(function(a, b) { return a.workerCount - b.workerCount; }); out+='\r\n <div class="col-md-5 table-responsive">\r\n <table class="table table-bordered">\r\n <thead>\r\n <tr>\r\n <th><i class="fa TypeError: Cannot read property 'charAt' of undefined at Object.eval [as blocks] (eval at doT.template (/home/traudien/nomp/node_modules/dot/doT.js:133:11), <anonymous>:3:1360) at processTemplates (/home/traudien/nomp/libs/website.js:62:62) at /home/traudien/nomp/libs/website.js:93:13 at /home/traudien/nomp/node_modules/async/dist/async.js:473:16 at iteratorCallback (/home/traudien/nomp/node_modules/async/dist/async.js:1064:13) at /home/traudien/nomp/node_modules/async/dist/async.js:969:16 at /home/traudien/nomp/libs/website.js:86:17 at tryToString (fs.js:512:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:500:12)

tiendat247 avatar Aug 03 '18 11:08 tiendat247

This is fixed by having a real pool and coin config. once you generate your configs for the pool correctly and everything is inplace . node init.js works perfectly with no error about charAT

aciddude avatar Aug 19 '19 16:08 aciddude