Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: CIYAM on April 14, 2012, 09:12:04 AM



Title: Problem running bitcoind.exe and bitcoin-qt.exe (-server) concurrently
Post by: CIYAM on April 14, 2012, 09:12:04 AM
I imported a private key using bitcoind while bitcoin-qt was running (Windows) and although it appears that the import operation worked fine both bitcoind and bitcoin-qt hung. After ctrl-c from bitcoind still bitcoin-qt would not respond (had to kill the task).

I then restarted bitcoin-qt and luckily all seems to be fine - looking at debug.log showed just a bunch of blank lines between fetching blocks and the restart (so no indication why clients were presumably locked and why killing one process didn't unlock the other).

BTW I have had no problem doing "read" operations (such as listtransactions) with the GUI running or using setaccount (this operation is the first other "write" operation I've performed whilst running the two clients simultaneously).


Title: Re: Unsafe to run bitcoind.exe and bitcoin-qt.exe at the same time?
Post by: Revalin on April 14, 2012, 09:46:45 AM
I don't know why it's letting you do that; I'm pretty sure you're not supposed to.

If you want a server and GUI at the same time, run bitcoin-qt with -server .


Title: Re: Unsafe to run bitcoind.exe and bitcoin-qt.exe at the same time?
Post by: CIYAM on April 14, 2012, 10:04:06 AM
Hmm... I have the following settings in bitcoin.conf:

# To allow usage with RPC-JSON interface
server=1
rpcallowip=127.0.0.1
rpcpassword=***some_password***

So am guessing that it should be working after all. :/


Title: Re: Problem running bitcoind.exe and bitcoin-qt.exe (-server) concurrently
Post by: Pieter Wuille on April 17, 2012, 12:02:43 PM
importprivkey is slow because it does a rescan of the entire blockchain, and blocks most other operations while it's running. It's not intended to be used frequently in its current form.

I think you'll just need some patience.


Title: Re: Problem running bitcoind.exe and bitcoin-qt.exe (-server) concurrently
Post by: CIYAM on April 17, 2012, 12:54:22 PM
importprivkey is slow because it does a rescan of the entire blockchain, and blocks most other operations while it's running. It's not intended to be used frequently in its current form.

Thanks Pieter - I hadn't considered this as it was a newly generated vanity gen private key.

I guess waiting for approx. 10 minutes was not patient enough (only using a laptop). :)

Luckily it doesn't look like I damaged anything by shutting down bitcoin-qt (and also the import seemed to work fine).

Perhaps a flag to not scan could be considered (when you know you are dealing with a brand new private key like I was) ???