Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Proofer on December 16, 2011, 04:03:12 AM



Title: "Cannot obtain a lock on data directory..."
Post by: Proofer on December 16, 2011, 04:03:12 AM
bitcoind 0.5.1, Mac OS 10.6.7

My first experience with bitcoind:

bitcoind -daemon
--seems OK, I can see the process, seems to be some network traffic.

But...

bitcoind -rpcallowip=192.168.168.321
Bitcoin: Cannot obtain a lock on data directory /Users/foobar/Library/Application Support/Bitcoin.  Bitcoin is probably already running.

Bitcoin is indeed already running.  Do I misunderstand usage?  I thought the daemon would be listening for commands such as rpcallowip.



Title: Re: "Cannot obtain a lock on data directory..."
Post by: Proofer on December 16, 2011, 04:15:39 AM
It is bitcoin gui or the daemon running you cannot have both going at the same time they conflict as you have seen already.

But only the daemon (bitcoind) was running.

After my OP I tried to open the GUI version, and it displayed the lock error as I would expect.

Just to make sure, I just did a ps -u, saw only "bitcoind - daemon", issued the -rpcallowip command, and got the same error.


Title: Re: "Cannot obtain a lock on data directory..."
Post by: Proofer on December 16, 2011, 04:28:06 AM
Just to make doubly sure, I restarted the Mac and without doing anything else (other than what automatically happens at startup, e.g., starting my mail client):

~ $ bitcoind -daemon
~ $ bitcoin server starting
# I waited several minutes here for a bash prompt, then hit CR and got it immediately
~ $ bitcoind -rpcallowip=192.168.168.101
Bitcoin: Cannot obtain a lock on data directory /Users/foobar/Library/Application Support/Bitcoin.  Bitcoin is probably already running.
~ $


Title: Re: "Cannot obtain a lock on data directory..."
Post by: sellscript on December 19, 2015, 05:33:32 AM
in centos
default .bitcoind will install in root
how can I change dirdata to folder home

Thanks