Title: How can I run -server with a Mac install? Post by: hhigins on July 22, 2011, 07:00:41 PM I would like to use the HTTP JSON-RPC and need to run the bitcoin server from my local machine (Mac OS X).
My setup varies from this question http://forum.bitcoin.org/index.php?action=printpage;topic=21956.0 (http://forum.bitcoin.org/index.php?action=printpage;topic=21956.0) in that my set up looks like the following... I downloaded from here http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.24/bitcoin-0.3.24-macosx.zip/download (http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.24/bitcoin-0.3.24-macosx.zip/download) - Downloads -v0.3.24 -license.txt +src - Application Support -bitcoin -__db.001 -__db.002 -__db.003 -__db.004 -__db.005 -__db.006 -addr.dat -block00001 -blkindex.dat +database -db.log -debug.log -wallet.dat From ~/Application Support/bitcoin/ if I run bitcoin -server I get bitcoin: command not found. I also cannot find a bitcoin.conf file. I am able to launch the GUI from my Applications folder. What do I have to do to get the server running? Thanks. Title: Re: How can I run -server with a Mac install? Post by: Rob P. on July 22, 2011, 07:21:41 PM Open Terminal.
Issue these commands: Code: echo "rpcuser=user" >> /Users/<YOUR USER HERE>/Library/Application\ Support/Bitcoin/bitcoin.conf The above assumes you change <YOUR USER HERE> to your username and that you move the v0.3.24 folder you downloaded to your /Applications folder. This will also run the GUI, can't be helped without recompiling, but the app will now respond to commands. To test: Code: /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin getbalance Should return your current Bitcoin account balance (assuming the local client is the one you use and has your wallet.dat) Title: Re: How can I run -server with a Mac install? Post by: hhigins on July 22, 2011, 07:51:11 PM Thanks for working with me Rob P. Running /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin -server returns...
************************ EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE unrecognized line in 'rpcuser-user' bitcoin in AppInit() ************************ EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE unrecognized line in 'rpcuser-user' bitcoin in CMyApp::OnUnhandledException() Abort trap hhiggins-MacBook-Pro:bitcoin hhiggins$ /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin getbalance ************************ EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE unrecognized line in 'rpcuser-user' bitcoin in AppInit() ************************ EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE unrecognized line in 'rpcuser-user' bitcoin in CMyApp::OnUnhandledException() Abort trap hhiggins-MacBook-Pro:bitcoin hhiggins$ /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin -server ************************ EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE unrecognized line in 'rpcuser-user' bitcoin in AppInit() ************************ EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE unrecognized line in 'rpcuser-user' bitcoin in CMyApp::OnUnhandledException() Title: Re: How can I run -server with a Mac install? Post by: Rob P. on July 23, 2011, 02:55:00 AM There's something wrong with your bitcoin.conf file:
Go to your /Users/<YOUR USER HERE>/Library/Application\ Support/Bitcoin folder. Right-click on bitcoin.conf. Choose "Open with", "Other", and select TextEdit from your Applications. It should look like: Code: rpcuser=user If it doesn't look like the above, fix it and save it. It would appear you used an " - " instead of an " = ". Title: Re: How can I run -server with a Mac install? Post by: hhigins on July 23, 2011, 02:33:20 PM That was the case. Thanks.
|