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
288 stars 441 forks source link

npm start error #271

Closed angona2 closed 6 years ago

angona2 commented 6 years ago

Z-nomp was working completely fine, then I shut down my vps for a while and came back to try running it again to only receive errors.

When running "npm start" command the console returns the following:

> z-nomp@0.0.4 start /home/ogminer/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

undefined:1
{"logLevel":"debug","logColors":true,"cliPort":17117,"clustering":{"enabled":true,"forks":"auto"},"defaultPoolConfigs":{"blockRefreshInterval":500,"jobRebroadcastTimeout":55,"connectionTimeout":600,"emitInvalidBlockHashes":false,"validateWorkerUsername":true,"tcpProxyProtocol":false,"banning":{"enabled":true,"time":600,"invalidPercent":50,"checkThreshold":500,"purgeInterval":300},"redis":{"host":"127.0.0.1","port":6379,"password":""}},"website":{"enabled":true,"host":"45.55.45.68","port":8080,"stratumHost":cryppit.com,"stats":{"updateInterval":30,"historicalRetention":14400,"hashrateWindow":300},"adminCenter":{"enabled":false,"password":"password"},"tlsOptions":{"enabled":false,"cert":"","key":""}},"redis":{"host":"127.0.0.1","port":6379},"switching":{"switch1":{"enabled":false,"algorithm":"sha256","ports":{"3333":{"diff":.125"varDiff":{"minDiff":4,"maxDiff":512,"targetTime":15,"retargetTime":90,"variancePercent":30}}}},"switch2":{"enabled":false,"algorithm":"scrypt","ports":{"4444":{"diff":10,"

SyntaxError: Unexpected token c in JSON at position 512
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (/home/ogminer/z-nomp/init.js:27:25)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:193:16)
    at bootstrap_node.js:617:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! z-nomp@0.0.4 start: `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`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the z-nomp@0.0.4 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ogminer/.npm/_logs/2018-01-18T22_54_21_877Z-debug.log

I have already tried the following:

  1. git pull
  2. npm update/install
  3. removing node_module and then doing npm update/install
  4. removing package-lock.json and then doing update/install again
  5. (edit) re-downloaded the repository and started fresh, still no luck

I can verify that my redis_server is running correctly and the blockchain is updated. Any ideas would be appreciated, thank you!

alinturbut commented 6 years ago

The error states cleary that you have an incorrect configuration. If you run your config into a json linter, you will get the same error.

The error is here: "stratumHost": cryppit.com

It is basically expecting a string.

dimdanm commented 6 years ago

Try this steps from super user:

  1. rm -r node_modules
  2. npm update
  3. npm install

Upgrade you system to use node version 8 or later

AlexSpain commented 6 years ago

fix your config.json

The error is here: change this "stratumHost": cryppit.com to this: "stratumHost": "cryppit.com"