Bitcoin Forum
May 04, 2024, 03:44:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Not able to run bitcoind and GUI at same time  (Read 3893 times)
Rena (OP)
Newbie
*
Offline Offline

Activity: 19
Merit: 0



View Profile WWW
April 19, 2011, 03:50:01 AM
 #1

At least on my Xubuntu machine, any attempt to start the graphical client fails with the message: "Cannot obtain a lock on data directory /home/rena/.bitcoin.  Bitcoin is probably already running." So, any time you want to use the graphical interface you need to first shut down bitcoind, losing all your connections. Or you can leave the GUI open all the time (sitting in taskbar since the option to minimize to tray is disabled), which is kinda inconvenient and makes the daemon not really a daemon anymore.

Can the GUI app not simply work as a frontend to bitcoind, letting it run at all times?
1714837448
Hero Member
*
Offline Offline

Posts: 1714837448

View Profile Personal Message (Offline)

Ignore
1714837448
Reply with quote  #2

1714837448
Report to moderator
If you want to be a moderator, report many posts with accuracy. You will be noticed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714837448
Hero Member
*
Offline Offline

Posts: 1714837448

View Profile Personal Message (Offline)

Ignore
1714837448
Reply with quote  #2

1714837448
Report to moderator
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2216


Chief Scientist


View Profile WWW
April 19, 2011, 12:49:04 PM
 #2

Run the gui with the -server switch.

How often do you get the chance to work on a potentially world-changing project?
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
December 06, 2012, 05:27:36 PM
 #3

Run the gui with the -server switch.


Uhm, sorry for necromancy, but I can't get it to work..

Quote
/opt/bitcoin/bin/64/bitcoin-qt -server

Quote
"Can't lock folder, maybe bitcoin was already started"
Same with --server.
I can't see any hint via --help neither. Is this still working in 0.7x?
Why? I want to have the bitcoind running whenever my computer is on. Always having the blockchain up-to-date and helping the network a bit. Then connect to bitcoind via armory and bitcoin-qt, when needed.

Different question: Is it safe to simply shut down linux? bitcoin-qt takes/took a bit to completely shut itself down, I don't want to corrupt anything when linux doesn't wait for bitcoind to cleanly shut down and switches off the computer..

Ente
stevegee58
Legendary
*
Offline Offline

Activity: 916
Merit: 1003



View Profile
December 06, 2012, 05:29:42 PM
 #4

I run bitcoin-qt in server mode but I did it with a change to the config file.

The latest bitcoin-qt runs quite happily in this mode with p2pool.

You are in a maze of twisty little passages, all alike.
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
December 06, 2012, 06:44:08 PM
 #5

Bitcoind is either a) the RPC server or b) an RPC client.

Bitcoin-Qt is a GUI + optionally the RPC server.

The error you're getting probably means you're already running bitcoind as RPC server, so you can't start Bitcoin-Qt in server mode as well.

Shut bitcoind down (./bitcoind stop), start Bitcoin-Qt with -server, and after that point you can send RPC commands to the GUI.


I do Bitcoin stuff.
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
December 07, 2012, 12:22:12 PM
 #6

Bitcoind is either a) the RPC server or b) an RPC client.

Bitcoin-Qt is a GUI + optionally the RPC server.

The error you're getting probably means you're already running bitcoind as RPC server, so you can't start Bitcoin-Qt in server mode as well.

Shut bitcoind down (./bitcoind stop), start Bitcoin-Qt with -server, and after that point you can send RPC commands to the GUI.

Aaah, now I get it!
So I was in fact running bitcoind and then trying to start bitcoin-qt as a server, which can't work.

So, my new question, now, is: Can I connect bitcoin-qt as a "client" to a constantly running bitcoind?
As I understand, that's what OP was actually asking. He probably changed his plans with "-server".
Now I think this isn't possible at all.. Then I would write a script to stop bitcoind and start bitcoin-qt automatically, when needed.

Ente
BitcoinHoarder
Full Member
***
Offline Offline

Activity: 144
Merit: 100


View Profile
December 07, 2012, 04:17:53 PM
 #7

Bitcoind is either a) the RPC server or b) an RPC client.

Bitcoin-Qt is a GUI + optionally the RPC server.

The error you're getting probably means you're already running bitcoind as RPC server, so you can't start Bitcoin-Qt in server mode as well.

Shut bitcoind down (./bitcoind stop), start Bitcoin-Qt with -server, and after that point you can send RPC commands to the GUI.

Aaah, now I get it!
So I was in fact running bitcoind and then trying to start bitcoin-qt as a server, which can't work.

So, my new question, now, is: Can I connect bitcoin-qt as a "client" to a constantly running bitcoind?
As I understand, that's what OP was actually asking. He probably changed his plans with "-server".
Now I think this isn't possible at all.. Then I would write a script to stop bitcoind and start bitcoin-qt automatically, when needed.

Ente

The problem you will have here is that both bitcoin-qt and bitcoind would be trying to access the same wallet.  You can't start bitcoin-qt and tell it to just be a client.
Ente
Legendary
*
Offline Offline

Activity: 2126
Merit: 1001



View Profile
December 07, 2012, 05:46:18 PM
 #8

..that's what I feared too.
It wouldn't need the stated "-server" flag, but a hypothetical "-client" one.
Thanks for confirming!

Ente
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!