Author

Topic: SOLO mining With Bitcoin-qt RPC error (Read 6266 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
July 17, 2015, 08:43:35 AM
#15
There's so much wrong with this...

Current bitcoin does not support mining with getwork or stratum. It only supports giving you GBT templates. Which means you need a full featured miner that can read the GBT templates and create work out of them. Plain CPU mining software cannot do it. Cgminer can, but it is only designed to support ASIC mining hardware. Alternatively you need to add full pool software, like ckpool, between bitcoin and your mining software, and even then, your mining software must also support stratum mining.

Short version: You cannot use bitcoin qt/core as a mining server which is what you're trying to do. You need full featured mining software or pool software to generate the mining work.
newbie
Activity: 11
Merit: 0
July 17, 2015, 05:07:40 AM
#14
Supposing it is expressed in BTC, that's a nice balance you got there Smiley

it's "regtest" mode balance Smiley
if this balance real --->  i am a biloner  Grin
newbie
Activity: 11
Merit: 0
July 06, 2015, 09:36:30 AM
#13
tnx for help me , JSON format is problem Smiley

i used this script php and correct conect to Local Server test Smiley


Code:
// Get cURL resource
  
require_once 'jsonRPCClient.php';
 
  
$bitcoin = new jsonRPCClient('http://xuser:[email protected]:8332');

  echo 
"
\n";
  
print_r($bitcoin->getinfo()); echo "\n";
  
print_r($bitcoin->getblocknumber()); echo "\n";

  echo 
"Received: ".$bitcoin->getreceivedbylabel("n3sCmQrQsSyMRpHHuSjFU4r5sTcsjZSZYn")."\n";
  echo 
"
\n";
  

  echo include(
json_decode$url));

?>




Now Test :

http://127.0.0.1/curl.php

Reply From server and see in my Browser:

Array
(
    [version] => 100200
    [protocolversion] => 70002
    [walletversion] => 60000
    [balance] => 5999.99999288
    [blocks] => 220
    [timeoffset] => 0
    [connections] => 0
    [proxy] => 127.0.0.1:9050
    [difficulty] => 0
    [testnet] =>
    [keypoololdest] => 1428402437
    [keypoolsize] => 101
    [paytxfee] => 0
    [relayfee] => 1.0E-5
    [errors] =>
)
newbie
Activity: 11
Merit: 0
April 07, 2015, 06:58:55 AM
#12
Try putting "listen=1" in your bitcoin.conf
 Wink

Code:
rpcuser=Xuser
rpcpassword=Q123456789
rpcport=8332
daemon=1
server=1
listen=1
rpcallowip=127.0.0.1
newbie
Activity: 11
Merit: 0
April 06, 2015, 10:52:11 AM
#11
Listen=1 But Not change error

i write a simple programm with delphi to Raw Connect the RPC protocol (JSON-RPC)


First extract Real packet with Wireshark :

{"id": 1, "method": "mining.subscribe", "params": ["cpuminer/2.4.1"]}


{"id":1,"result":[[["mining.set_difficulty","b4b6693b72a50c7116db18d6497cac52"],["mining.notify","ae6812eb4cd7735a302a8a9dd95cf71f"]],"7c660042",4],"error":null}

{"id":null,"params":[1024],"method":"mining.set_difficulty"}

{"id": 2, "method": "mining.authorize", "params": ["Xuser", "Q12345678"]}

And So replace in raw  requets

but give me error 500  or 401 Unauthorize



Code:


function SendJson(js:string):string;
var
  Json: string;
  sResponse: string;
  JsonToSend: TStringStream;
begin
JSON := JS;
  JsonToSend := TStringStream.Create(Utf8Encode(Json));
  try
    Form1.IDHTTP1.Request.ContentType := 'application/json';
    Form1.IDHTTP1.Request.CharSet := 'utf-8';
    Form1.IdHTTP1.Request.Username:='Xuser';
    Form1.IdHTTP1.Request.Password:='Q123456789';

    try
      sResponse := Form1.IDHTTP1.Post('http://127.0.0.1:8332', JsonToSend);
    except
      on E: Exception do
        ShowMessage('Error on request: '#13#10 + e.Message);
    end;
  finally
    JsonToSend.Free;
  end;
Result := sResponse;

end;
//---------------------------------
procedure TForm1.Button3Click(Sender: TObject);
begin

memo1.Lines.Add( SendJson('{"id": 2, "method": "mining.authorize", "params": ["Xuser", "Q123456789"]}'));

memo1.Lines.Add( SendJson('{"id": 1, "method": "mining.subscribe", "params": ["cpuminer/2.4.1"]}'));

memo1.Lines.Add( SendJson('{"jsonrpc": "1.0", "method": getinfo, "params": "[]" }'));

end;


 Huh
my brain Fucked Smiley
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
April 06, 2015, 10:36:55 AM
#10
tnx a lot
how to Repair this Problem ?

i use normal application software mining (for example cpuminer) , why ?
Try putting "listen=1" in your bitcoin.conf
newbie
Activity: 11
Merit: 0
April 06, 2015, 10:15:24 AM
#9
tnx a lot
how to Repair this Problem ?

i use normal application software mining (for example cpuminer) , why ?
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
April 06, 2015, 09:59:10 AM
#8
Undecided Cry
Http is oky (in chrome browser by default not show http://  )
port is oky
user is oky
pass is oky
...... is okyyyy
---------------------------------
if incorect http protocol or port or user or password  never see this page text.
oky ?


me error :
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

please Solve this ERROR code
From rpcprotocol.h:
Code:
RPC_PARSE_ERROR      = -32700
It happens when the client cannot parse the RPC request being sent to it.
newbie
Activity: 11
Merit: 0
April 06, 2015, 08:34:48 AM
#7
 Undecided Cry
Http is oky (in chrome browser by default not show http://  )
port is oky
user is oky
pass is oky
...... is okyyyy
---------------------------------
if incorect http protocol or port or user or password  never see this page text.
oky ?


me error :
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

please Solve this ERROR code
legendary
Activity: 3248
Merit: 1070
April 06, 2015, 08:11:24 AM
#6
only For you Changed port to 8332 Smiley
but see again error


OKY? Smiley

and about CPUminer only For TEST Grin

i'm checking for this, i found similar errors on other thread, and you should re-check user, password and pool just to be sure

try to add "http://" before localhost
newbie
Activity: 11
Merit: 0
April 06, 2015, 07:57:12 AM
#5
only For you Changed port to 8332 Smiley
but see again error
http://i59.tinypic.com/5pndkz.jpg

OKY? Smiley

and about CPUminer only For TEST Grin
legendary
Activity: 3248
Merit: 1070
April 06, 2015, 07:46:29 AM
#4
hold on you are mining bitcoin in solo via cpu? that is not profitable at all

but if you want to mine anyway, i think the error appear because you aren't using the default port maybe, try 8332
newbie
Activity: 11
Merit: 0
April 06, 2015, 07:19:41 AM
#3
thanks
but
port 3333 is free befor run "bitcoin-qt.exe -server"

after run server mode , port is used, and send http request on port i can view data error...
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

if port used by any software never see this messages.

and other parameter (-server or allowip by default ) removed , but my error again see  error code:-32700

Sad(

another method test connected to bitcoin server port by  CPU-miner
minerd -a sha256d -t 1 -R 1 -q  -o http://127.0.0.1:3333 -u Xuser -p Q123456789

see error:

C:\miner>minerd -a sha256d -t 1 -R 1 -q  -o http://127.0.0.1:3333 -u Xuser -p Q123456789

[2015-04-06 16:46:45] 1 miner threads started, using 'sha256d' algorithm.
[2015-04-06 16:46:51] HTTP request failed: The requested URL returned error: 500
 Internal Server Error

 
legendary
Activity: 3248
Merit: 1070
April 06, 2015, 07:03:09 AM
#2
you don't need "-server", just server=1 in the config, you also do not need "port" or "daemon", same for "rpcconnect"

the error could be related to maybe another client using the same port?

try to change it to something else

p.s. rpc alloip for internal ip isn't needed too, unless you want to setup a small pool with 2+ pc mining in solo
newbie
Activity: 11
Merit: 0
April 06, 2015, 06:35:56 AM
#1
hi all
i have a problem

run "bitcoin-qt.exe -Server" ( and full Config Smiley any Change parameter and any evrything more....

But i recive error on port RPCport

This error: ( http://127.0.0.1:3333 )

{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}


i can't Solved Sad

my os : windows 8.1
btcoin Core version : last version(v0.10.0 (32-bit)  and Update Full BlockChain
my Config :

rpcuser=Xuser
rpcpassword=Q123456789
rpcport=3333
port=3334
daemon=1
server=1
rpcallowip=127.0.0.1
rpcallowip=192.168.0.1/255.255.255.0
rpcconnect=127.0.0.1

Evrybody help me ?
Jump to: