Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: Oracle1 on July 26, 2015, 10:13:05 AM



Title: JSON decode failed(1):
Post by: Oracle1 on July 26, 2015, 10:13:05 AM
Hi All,

I am trying to get stratum proxy running on my PC (mining quark at westhash)and I finally have the miner connecting to the proxy and shares are being accepted but a short period  after startup the miner is consistently crashing with this error message



[2015-07-26 20:11:40] JSON decode failed(1): '[' or '{' expected near '<'
[2015-07-26 20:11:40] submit_upstream_work json_rpc_call failed
[2015-07-26 20:11:40] ...retry after 30 seconds

Any help much appreciated!


Title: Re: JSON decode failed(1):
Post by: unsoindovo on July 26, 2015, 03:53:11 PM
Hi All,

I am trying to get stratum proxy running on my PC (mining quark at westhash)and I finally have the miner connecting to the proxy and shares are being accepted but a short period  after startup the miner is consistently crashing with this error message



[2015-07-26 20:11:40] JSON decode failed(1): '[' or '{' expected near '<'
[2015-07-26 20:11:40] submit_upstream_work json_rpc_call failed
[2015-07-26 20:11:40] ...retry after 30 seconds

Any help much appreciated!

i think you write a bad JSON config file....
i mean JSON sintax.

try to copy&paste all your config file into this web tools
http://jsonformatter.curiousconcept.com/
he che for the validity of your conf file...

good luck


Title: Re: JSON decode failed(1):
Post by: Oracle1 on July 27, 2015, 09:49:46 AM
I ran both proxy.config files that I have been using through the website and it deemed both to be valid. The miner is actually starting, submitting shares and I can see it running through the proxy server in the cmd window.

I think it has something to do with the config file not being set up properly for the hardware, or the LAN I am mining with GTX 750 ti cards using ccminer I have two rigs and my PC mining and all machines  display the same error, including the PC which is the proxy server and has two cards mining on it. They all mine fine solo.


{
  "isScrypt" : false,
  "disableStratum" : true,
  "getworkListenPort" : 3333,
  "pools" :
  [
  {
    "name" : "Westhash Quark",
    "host" : "quark.usa.nicehash.com:3345",
    "user" : "bitcoinaddress",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Nicehash Quark",
    "host" : "quark.eu.nicehash.com:3345",
    "user" : "bitcoinaddress",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  }
  ]
}


{
  "isScrypt" : false,
  "disableStratum" : true,
  "getworkListenPort" : 3333,
  "pools" :
  [
  {
    "name" : "Westhash Quark",
    "host" : "quark.usa.nicehash.com:3345",
    "user" : "bitcoinaddy",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  },
  {
    "name" : "Nicehash Quark",
    "host" : "quark.eu.nicehash.com:3345",
    "user" : "bitcoinaddy",
    "password" : "x",
    "enableExtranonceSubscribe" : true
  }
  ]
}

and these are the .bat files

ccminer.exe -i 22.9 -b 4080  -a quark -o http://192.168.0.21:3333 -u x -p x --cpu-priority 4


ccminer.exe -i 20 -b 4080 -a quark -o http://192.168.0.21:3333 -u x -p x --cpu-priority 4


Title: Re: JSON decode failed(1):
Post by: sp_ on July 27, 2015, 10:10:40 AM
disablestratum=true?

Delete the config file and just run:

ccminer.exe -u 1CTiNJyoUmbdMRACtteRWXhGqtSETYd6Vd  -p xxx -a quark  -o stratum+tcp://quark.eu.nicehash.com:3345


Title: Re: JSON decode failed(1):
Post by: Oracle1 on July 27, 2015, 11:09:45 AM
Dumb question but I substitute my coin address into the.conf file yes? Is that file run by the  the miner once the proxy is running or is that file run to start the proxy server? Those commands are almost the same as what I am using to start my miner solo mining without the stratum proxy setup running


Title: Re: JSON decode failed(1):
Post by: dominuspro on July 27, 2015, 08:53:30 PM
The stratum proxy start command:
java -jar stratum-proxy.jar -f stratum-proxy-nicehash.conf

My working config file:

Quote
{
  "logDirectory" : "",
  "logLevel" : "INFO",
  "disableLogAppend": false,
  "stratumListenPort" : 3345,
  "stratumListenAddress" : "0.0.0.0",
  "disableStratum": false,
  "getworkListenPort" : 8666,
  "getworkListenAddress" : "0.0.0.0",
  "disableGetwork": false,
  "apiListenPort" : 8888,
  "apiListenAddress" : "0.0.0.0",
  "disableApi": false,
  "poolConnectionRetryDelay" : 5,
  "poolReconnectStabilityPeriod" : 5,
  "poolNoNotifyTimeout" : 240,
  "rejectReconnectOnDifferentHost" : false,
  "poolHashrateSamplingPeriod" : 600,
  "userHashrateSamplingPeriod" : 600,
  "connectionHashrateSamplingPeriod" : 600,
  "isScrypt" : false,
  "databaseDirectory": "",
  "hashrateDatabaseSamplingPeriod": 60,
  "hashrateDatabaseHistoryDepth": 7,
  "noMidstate": false,
  "apiLogLevel": "INFO",
  "validateGetworkShares": false, // Validate the shares submitted by Getwork workers before submitting the shares to the pool. Only works for SHA256 and Scrypt.
  "poolSwitchingStrategy": "priorityFailover",
  "weightedRoundRobinRoundDuration": 60,
  "apiUser": "",
  "apiPassword": "",
  // The apiEnableSsl should be set to true or left commented if an apiUser is specified. If the apiEnableSsl option is not set, ssl is enabled when apiUser is set else it is disabled.
  //"apiEnableSsl": false,
  "logRealShareDifficulty": false, // Take care, it is CPU intensive and it works only for SHA256 and Scrypt coins.
  "workerNumberLimit": 256, // Only 1, 256 and 65536 values are supported.
  "ipVersion": "auto", // Valid values: auto, v4, v6. Force the use of the IP protocol version.
  "suggestedPoolDifficulty": 0.01, // Suggest this difficulty to the pool. The pool may ignore the suggested difficulty. (if not compatible or for any other reasons)
  "pools" : [ {
    "name" : "Nicehash quark",
    "host" : "quark.eu.nicehash.com:3345",
    "user" : "3DS5V6GZRzo5ToEtWHh15xkkTYcHeP9Vm1",
    "password" : "d=0.02;p=0.24",
    "enableExtranonceSubscribe" : true,
    "weight" : 9,
    "isEnabled": true
  }, {
    "name" : "Westhash quark",
    "host" : "quark.usa.nicehash.com:3345",
    "user" : "3DS5V6GZRzo5ToEtWHh15xkkTYcHeP9Vm1",
    "password" : "d=0.008",
    "enableExtranonceSubscribe" : true,
    "weight" : 1,
    "isEnabled": true
  } ]
}

And the ccminer command:
ccminer.exe -q -a quark -o stratum+tcp://localhost:3345 -u gpu0 -p d=0.002 -d 0 --no-color

It worked without any problems, also from my remote pc throught a ssh tunnel.
I use -d parameter to specify each gpu separately...