dvandal / cryptonote-nodejs-pool

Mining pool for all CryptoNote based coins using Cryptonight, Cryptonight Light and Cryptonight Heavy algorithms
GNU General Public License v2.0
364 stars 610 forks source link

node init.js #692

Open Sarahshohani opened 2 years ago

Sarahshohani commented 2 years ago

I have get this error while performing node init.js could you please help? uname -a: Linux vmi677535.contaboserver.net 4.15.0-134-generic #138-Ubuntu SMP Fri Jan 15 10:52:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I have installed node 11 ,14,16 but none of them worked I have also tried nvm but didn't worked for me.

/root/pool/nodemodules/dateformat/lib/dateformat.js:1 var token=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]"|'[^']'/g;var timezone=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g;var timezoneClip=/[^-+\dA-Z]/g;export default function dateFormat(date,mask,utc,gmt){if(arguments.length===1&&typeof date==="string"&&!/\d/.test(date)){mask=date;date=undefined}date=date||date===0?date:new Date;if(!(date instanceof Date)){date=new Date(date)}if(isNaN(date)){throw TypeError("Invalid date")}mask=String(masks[mask]||mask||masks["default"]);var maskSlice=mask.slice(0,4);if(maskSlice==="UTC:"||maskSlice==="GMT:"){mask=mask.slice(4);utc=true;if(maskSlice==="GMT:"){gmt=true}}var =function _(){return utc?"getUTC":"get"};var d=function d(){return date[()+"Date"]()};var D=function D(){return date[_()+"Day"]()};var m=function m(){return date[()+"Month"]()};var y=function y(){return date[_()+"Full

SyntaxError: Unexpected token export at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/root/pool/lib/logger.js:11:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32)

Stardock2018 commented 2 years ago

Use node v11.15.0, I had the same problem.

dagwood-Fenichuck commented 2 years ago

Stardock2018 I used node v11.15.0 as you suggested but doesn't work, can you show your miner working, please

Stardock2018 commented 2 years ago

Graft.westcoastxmr.ca

On Sat., Oct. 16, 2021, 11:12 a.m. dagwood-Fenichuck, < @.***> wrote:

Stardock2018 I used node v11.15.0 as you suggested but doesn't work, can you show your miner working, please

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dvandal/cryptonote-nodejs-pool/issues/692#issuecomment-944957739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAIPFRXYBJLW7PE75ZXDRLUHGXBVANCNFSM5FBMMCMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dagwood-Fenichuck commented 2 years ago

Hi thanks for that shows great my site shows like this but just can't get buildl to run with the date format problem will try installing everything for the tenth time

Stardock2018 commented 2 years ago

What Ubuntu version are you using?

On Sat., Oct. 16, 2021, 12:17 p.m. dagwood-Fenichuck, < @.***> wrote:

Hi thanks for that shows great my site shows like this but just can't get buildl to run with the date format problem will try installing everything for the tenth time

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dvandal/cryptonote-nodejs-pool/issues/692#issuecomment-944973829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAIPFXQNCH2OXPBPVA3NVDUHG6TZANCNFSM5FBMMCMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dagwood-Fenichuck commented 2 years ago

ubuntu 18.04 bionic

Stardock2018 commented 2 years ago

did you install all the deps. ?

maletazul commented 2 years ago

anyone knows how to fix it ? i have some error on 18

dagwood-Fenichuck commented 2 years ago

Installed everything in package.json plus two peer dependencies build says were missing, do you have a screenshot of the console running the pool at the end when you node init.js

maletazul commented 2 years ago

Installed everything in package.json plus two peer dependencies build says were missing, do you have a screenshot of the console running the pool at the end when you node init.js

sure, here he is: ubuntu 18 node --version v11.15.0

datetime@0.0.3 dateformat@5.0.2

node init.js /home/luissilva/pool/node_modules/dateformat/lib/dateformat.js:26 export default function dateFormat (date, mask, utc, gmt) { ^^^^^^

SyntaxError: Unexpected token export at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/home/luissilva/pool/lib/logger.js:11:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32)

or

/home/luissilva/pool/nodemodules/dateformat/lib/dateformat.js:1 var token=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]"|'[^']'/g;var timezone=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g;var timezoneClip=/[^-+\dA-Z]/g;export default function dateFormat(date,mask,utc,gmt){if(arguments.length===1&&typeof date==="string"&&!/\d/.test(date)){mask=date;date=undefined}date=date||date===0?date:new Date;if(!(date instanceof Date)){date=new Date(date)}if(isNaN(date)){throw TypeError("Invalid date")}mask=String(masks[mask]||mask||masks["default"]);var maskSlice=mask.slice(0,4);if(maskSlice==="UTC:"||maskSlice==="GMT:"){mask=mask.slice(4);utc=true;if(maskSlice==="GMT:"){gmt=true}}var =function _(){return utc?"getUTC":"get"};var d=function d(){return date[()+"Date"]()};var D=function D(){return date[_()+"Day"]()};var m=function m(){return date[()+"Month"]()};var y=function y(){return date

SyntaxError: Unexpected token export at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/home/luissilva/pool/lib/logger.js:11:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32)

dagwood-Fenichuck commented 2 years ago

Stardock2018 do you have a screenshot of the miner running after you node init.js sir

maletazul commented 2 years ago

Stardock2018 do you have a screenshot of the miner running after you node init.js sir

The pool even start for miner connections, its a fresh install. is that you are asking?

dagwood-Fenichuck commented 2 years ago

Yes if you can i can't get the miner connection to start

maletazul commented 2 years ago

Yes if you can i can't get the miner connection to start

Like me

Sarahshohani commented 2 years ago

Hi, thank you for your answer did you exactly used these structures? and did you exactly used git clone https://github.com/dvandal/cryptonote-nodejs-pool.git pool

dagwood-Fenichuck commented 2 years ago

yes followed all instructions https://github.com/dvandal/cryptonote-nodejs-pool.git pool, but still gives dateformat error, I added ESM module, type: module to package.json changed dateformat.js to cjs and require to import and now get config undefined dont know where to go from here can anyone install this?

TheReal420BlazeIt commented 2 years ago

Had the same issue yesterday. Found out the npm dateformat package has some recent updates that results in the above error. For me, changing the "dateformat": "*" to "dateformat": "4.5.1" in package.json, and run npm update again, fixed the issue.

Sarahshohani commented 2 years ago

Thank you , I did what you said about the dateformat and the node init.js command had worked thank you for your answer but there is just one problem that my site won't load? www.blackberrygojiberry.com

TheReal420BlazeIt commented 2 years ago

That is probably because of your config.json & the website's config.js. In the pool's config.json, under the api section, you need to bind to your ip address. Leaving it on 0.0.0.0 won't work. I also had some issues when using 127.0.0.1, so use your local ip address of the server. After that, set the same ip address in the website's config.js behind the api variable.

Sarahshohani commented 2 years ago

Thank you , I have changed my bind IP to my public ip address and even 127.0.0.1 but none of them didn't work I've also tried to remove my ssl to see if that has problem but it didn't work too

Sarahshohani commented 2 years ago

could you please send me your config files

TheReal420BlazeIt commented 2 years ago

Looks like your website's config.js is wrong. I see you use var api = "blackberrygojiberry.com:8117"; but that should be var api = "http://blackberrygojiberry.com:8117";. You have to place http or https in front of it. In your case http.

Sarahshohani commented 2 years ago

Thank you it worked for me.

dagwood-Fenichuck commented 2 years ago

Thank you guys now running. have turtlecoin node in /home/user/ and pool in /var/www/pool can't connect to node daemon with pool on 127.0.0.1 or 0.0.0.0 have used my domain.com using nginx with reverse proxy. you can see its working. error from daemon 2021-11-11 02:15:34 [api] Error getting last block data {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} 2021-11-11 02:15:34 [api] Stat collection finished: 1 ms redis, 25 ms daemon

API started & listening on 0.0.0.0 port 8117 2021-11-11 02:15:09 [pool] (Thread 1) Clear values for connected workers in redis database. (node:15224) ExperimentalWarning: queueMicrotask() is experimental. 2021-11-11 02:15:09 [pool] (Thread 3) Clear values for port 3333 in redis database. 2021-11-11 02:15:09 [pool] (Thread 3) Started server listening on port 3333 2021-11-11 02:15:09 [pool] (Thread 3) Clear values for port 4444 in redis database. 2021-11-11 02:15:09 [pool] (Thread 3) Started server listening on port 4444 2021-11-11 02:15:09 [pool] (Thread 3) Clear values for port 5555 in redis database. 2021-11-11 02:15:09 [pool] (Thread 3) Started server listening on port 5555

So it's not connecting to daemon someone tell me how to connect to this turtlecoin daemon please

88plug commented 2 years ago

Had the same issue yesterday. Found out the npm dateformat package has some recent updates that results in the above error. For me, changing the "dateformat": "*" to "dateformat": "4.5.1" in package.json, and run npm update again, fixed the issue.

Works to solve the original error!

domajor commented 9 months ago

:~/pool$ node init.js 2023-10-06 22:08:09 [master] Starting Cryptonote Node.JS pool version v2.0.0 (node:10999) UnhandledPromiseRejectionWarning: Error: The client is closed ubuntu 20