zone117x / node-open-mining-portal

A scalable all-in-one easy to setup cryptocurrency mining pool and portal written entirely in Node.js.
GNU General Public License v2.0
1.02k stars 1.03k forks source link

Profit switching process died, spawning replacement one more time #377

Open Elmit2015 opened 10 years ago

Elmit2015 commented 10 years ago

grep -i profit /home/ronald/nomp/log |tail 2014-08-28 04:45:09 [Profit] [CALC] BTC/NOBL on Bittrex with 0.00040954 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [CALC] BTC/POT on Poloniex with 0.00028513 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [CALC] BTC/POT on Cryptsy with 0.00030065 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [CALC] BTC/POT on Mintpal with 0.00028276 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [CALC] BTC/POT on Bittrex with 0.00029227 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [CALC] BTC/RBY on Poloniex with 0.00020148 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [CALC] BTC/RBY on Bittrex with 0.00023699 BTC/day per Mh/s 2014-08-28 04:45:09 [Profit] [RESULT] Best coin for scrypt is krugercoin on Cryptsy with 0.00048995 BTC/day per Mh/s 2014-08-28 04:53:23 [Profit] [Check] Collecting profitability data. 2014-08-28 04:56:03 [Master] [Profit] Profit switching process died, spawning replacement...

TypeError: Cannot call method 'forEach' of null at /home/ronald/nomp/libs/profitSwitch.js:493:36 at Request._callback (/home/ronald/nomp/libs/apiBittrex.js:63:17) at Request.self.callback (/home/ronald/nomp/node_modules/request/request.js:123:22) at Request.emit (events.js:98:17) at Request. (/home/ronald/nomp/node_modules/request/request.js:1047:14) at Request.emit (events.js:117:20) at IncomingMessage. (/home/ronald/nomp/node_modules/request/request.js:998:12) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:938:16 at process._tickCallback (node.js:419:13)

After so many times seeing (TypeError) errors I wonder if node.js is not able to catch errors? I don't know how above can happen, but sure it was never intended to catch such a possibility. More, it is constantly lying: "spawning replacement" - It doesn't and it does not give a reason for not doing so in the log! The classical error "divided by zero" was used to emphasize to check each and every piece of an equation. Can that be done here too?

crackfoo commented 10 years ago

it's might be from using the old API URL's. Bittrex is now v1.1 not v1

try changing the url's in apiBittrex

    PUBLIC_API_URL  = 'https://bittrex.com/api/v1.1/public',
    PRIVATE_API_URL = 'https://bittrex.com/v1.1',
Elmit2015 commented 10 years ago

This I did already last week. ;-) I restarted nomp and it worked then again.