Author

Topic: [SOLVED] Bitcoind RPC client freezes on "move" command. (Read 2390 times)

legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
So I finally figured it out! I backed up my wallet file, completely uninstalled bitcoind and figured out how to successfully compile bitcoin from source, using the 0.7.2rc2 build mentioned previously in the thread. Moved the file that it created into /usr/bin/bitcoind, and the server starts up again! Also tried using the move command, and it works flawlessly

Going to ahead and mark this as solved. Thanks for the help everyone!

Nice to hear that  Smiley
full member
Activity: 220
Merit: 100
So I finally figured it out! I backed up my wallet file, completely uninstalled bitcoind and figured out how to successfully compile bitcoin from source, using the 0.7.2rc2 build mentioned previously in the thread. Moved the file that it created into /usr/bin/bitcoind, and the server starts up again! Also tried using the move command, and it works flawlessly

Going to ahead and mark this as solved. Thanks for the help everyone!
pc
sr. member
Activity: 253
Merit: 250
I'm no expert, but my guess is that it can't find a library it's expecting or something. That is, something trying to load the program is getting a "file not found", and somehow that's bubbling up to a confusing error message.
full member
Activity: 220
Merit: 100
So does anyone have any idea why when I run the 'bitcoind' command it keeps saying the file isnt found, even though I can CLEARLY see it exactly where it should be when I type in 'ls' or when I look at the server through a FTP program...?? doesnt make any sense at all
full member
Activity: 220
Merit: 100
Run...

Code:
./usr/lib/bitcoind &

if you have it in that folder Smiley

hmm... this is confusing. I see the file in there. its named exactly the same. its set to be executable.. but still it keeps saying not found:

Code:
# ./usr/lib/bitcoin/bitcoind &
[1] 3016
-bash: ./usr/lib/bitcoin/bitcoind: No such file or directory

legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
...

that seems to give me the same error.

Code:
# ./usr/bin/bitcoin/bitcoind
-bash: ./usr/bin/bitcoin/bitcoind: No such file or directory

but when I cd into the directory, the file is there..

Code:
# cd /usr/lib/bitcoin
# ls
bitcoind



Run...

Code:
./usr/lib/bitcoind &

if you have it in that folder Smiley
full member
Activity: 220
Merit: 100
you have do
Code:
./usr/bin/bitcoin/bitcoind

It is cause you didn't alias it with bitcoind, and never run it in sudo either, security risk.

that seems to give me the same error.

Code:
# ./usr/bin/bitcoin/bitcoind
-bash: ./usr/bin/bitcoin/bitcoind: No such file or directory

but when I cd into the directory, the file is there..

Code:
# cd /usr/lib/bitcoin
# ls
bitcoind

full member
Activity: 220
Merit: 100
Might it be the problem that's to-be-fixed in version 0.7.2?

Try out the release candidate and see if it works any better for you.

I just saw the fix, nice find

Quote
Bug fixes
---------

* Prevent RPC 'move' from deadlocking. This was caused by trying to lock the
  database twice.

Awesome, thanks guys. Pretty sure this will work..

maybe I just have no idea what im doing, but I cant seem to get the server to work. According to the release candidate post, all I have to do is copy over the 'bitcoind' file. So i went to /usr/bin/bitcoin, copied the file over, gave the new file executable permissions (sudo chmod +x bitcoind)

now, when, heres what I get:
Code:
# sudo bitcoind
exec: 14: /usr/lib/bitcoin/bitcoind: not found

the file is there though, not sure what im missing here?
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
Might it be the problem that's to-be-fixed in version 0.7.2?

Try out the release candidate and see if it works any better for you.

I just saw the fix, nice find

Quote
Bug fixes
---------

* Prevent RPC 'move' from deadlocking. This was caused by trying to lock the
  database twice.
pc
sr. member
Activity: 253
Merit: 250
Might it be the problem that's to-be-fixed in version 0.7.2?

Try out the release candidate and see if it works any better for you.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
yep, "derp - 0.4" is the exact name of the account and it has exactly 0.0016 BTC in it. Its a weird name for an account, I know. Dont ask :p

Got it. I don't know exactly what is the issue you have, never experienced such a thing. I could say is the strange combination of characters in the account name but I could be wrong.

Can you try creating test1 and test2 accounts and move coins between them without the ""? Don't worry if they go negative atm.
full member
Activity: 220
Merit: 100
yep, "derp - 0.4" is the exact name of the account and it has exactly 0.0016 BTC in it. Its a weird name for an account, I know. Dont ask :p
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
...

heres the exact command that I ran from the terminal:

Code:
bitcoind move "derp - 0.4" "Main Account" 0.0016

...

Ok I understand, it should be like:

Code:
bitcoind move derp "Main Account" 0.0016

Accounts need to exist before moving amounts between them. Is "derp - 0.4" the exact name of the account? Issue a "bitcoind listaccounts" command and find out. I don't think your issue is that serious so you have to build from source.
full member
Activity: 220
Merit: 100

Is your wallet encrypted cause then you need to unlock it then lock it again.

No, its not currently encrypted at all. Iv managed to use sendtoaddress straight from the command line and its worked fine, but when using the move command it just freezes up completely, forcing me to find the process and terminate it manually

Just trying to wrap my head around your issue here.

You say that issuing the following command freezes the daemon?

Code:
bitcoind move account2 account2 0.01

Can you give an example of account names you have? Note "" is default account and the ones that include a space like "bitcoin account" need to be quoted.

heres the exact command that I ran from the terminal:

Code:
bitcoind move "derp - 0.4" "Main Account" 0.0016

on further searching, iv found that someone has had a issue with the move command locking up the server, and has made a build/patch of the bitcoind server... see here: https://github.com/sipa/bitcoin/tree/4291e8feab308cb9c7840d74fc7aacf137a7c21f

not sure if that will solve my problem, looks like I would have to build it from source... not really sure how to do that lol. the install file says to use these commands to build it:
Code:
cd src/
make -f makefile.unix

but when I try that it gives me all kinds of errors, like the following:
Code:
alert.cpp:198: error: âcs_mapAlertsâ was not declared in this scope
alert.cpp:198: error: initializer expression list treated as compound expression
alert.cpp:206: error: âclass CClientUIInterfaceâ has no member named âNotifyAlertChangedâ
alert.cpp:212: error: âclass CClientUIInterfaceâ has no member named âNotifyAlertChangedâ
alert.cpp:220: error: expected primary-expression before â&â token
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata

Is your wallet encrypted cause then you need to unlock it then lock it again.

No, its not currently encrypted at all. Iv managed to use sendtoaddress straight from the command line and its worked fine, but when using the move command it just freezes up completely, forcing me to find the process and terminate it manually

Just trying to wrap my head around your issue here.

You say that issuing the following command freezes the daemon?

Code:
bitcoind move account2 account2 0.01

Can you give an example of account names you have? Note "" is default account and the ones that include a space like "bitcoin account" need to be quoted.
full member
Activity: 220
Merit: 100

Is your wallet encrypted cause then you need to unlock it then lock it again.

No, its not currently encrypted at all. Iv managed to use sendtoaddress straight from the command line and its worked fine, but when using the move command it just freezes up completely, forcing me to find the process and terminate it manually
full member
Activity: 220
Merit: 100
The accounts are you trying to move do they have a lot of addresses? That is probably the issue.

Error means it can't connect so check your JSONRPC username and password, make sure you are server mode. Also I have seen a lot of people just set rpcssl to 1 without creating the correct key pairs so check that.

no, they are fairly new accounts. I have only like a dozen addresses or so.

Also pretty sure its not the user/pass, because I can use getbalance, getinfo, listaccounts, listtransactions, getnewaddress etc. just fine with PHP

also good point for the exception handling. Figuring all that stuff out now.

But still, not being able to use the move command has kind of put me at a stand still
newbie
Activity: 50
Merit: 0
I am not sure about the part one. For the second part, you should implement exception handling. You should have something like the following:

Code:
try {
    sendaddress();
} catch(Exception $e) {
    echo "There was an issue sending the bitcoins. Please try again or notify the site's administrator if you continue to receive this message.";
}

That will allow php to continue to execute the rest of the code. You should use a try...catch block whenever there is the possibility of an exception being raised.
full member
Activity: 220
Merit: 100
Hey guys, so I installed the bitcoind server on my VPS (latest version of ubuntu, 64 bit). For the most part it works fine, however when I try and use the 'move' command to move balances between accounts, it just hangs there and the server freezes and doesnt accept any more commands (besides the help command). Iv tried searching around a bunch, but I cant seem to find a solution, and most of the information I have found is for windows users..

Is this a common problem? any ideas for a easy way to solve this? Am I going to have to compile a custom build of bitcoin and reinstall it? If so, could anyone tell me how I would go about doing that (total noob to compiling things), or point me to a resource that would show me how?


now for part 2..

Im trying to use the jsonRPCClient for PHP to build a web app that uses bitcoin. Part of it requires moving balances between accounts.. hence the issue above. But also, whenever I try and use the sendaddress() call, all I get is a fatal error that states that the http request to the bitcoin server was refused..

Code:
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to .... in jsonRPCClient.php

I tried the command directly from the command line, and recieved an error saying that due to the small size of the transaction it required a transaction fee (i forgot to change it from 0.000 btc).

Anyways, is it normal behavior for it to throw up the fatal error like that if a command returns false? Shouldnt it just return that the command failed, or return the error that bitcoin spits out, instead of just killing PHP? It doesnt seem to be very well documented..

thanks in advance


*edit* see my post on page 2 about how I solved this
Jump to: