Bitcoin Forum
May 10, 2015, 08:26:06 PM *
News: Latest stable version of Bitcoin Core: 0.10.1 [Torrent] (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Having problems specifing -datadir  (Read 2056 times)
psyvenrix
Newbie
*
Offline Offline

Activity: 1


View Profile

Ignore
July 28, 2010, 01:38:00 PM
 #1

Whilst not amazingly critical, i find it strange that i consistently get the below error messages from the console and debug.log when i try to specify the datadir option with anything other than the period char (current directory).
This is using the bitcoind program on an archlinux terminal session, im not using the GUI at all (headless box accessed via ssh)

From Console:
************************
EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in AppInit()

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery

and from the debug.log inside the datadir : -

Bitcoin version 0.3.4.0 beta
Default data directory /home/psyvenrix/.bitcoin
Bound to port 8333
Loading addresses...
dbenv.open strLogDir=./datadir2/database strErrorFile=./datadir2/db.log


************************
EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in AppInit()

Yes, that is a SVN build, as the tar.gz from the main site is linked against openssl ver 0.9.8 i think and my arch linux system has 1.0.0 i think, so i just grabed the latest SVN source and built that (aside from a makefile tweak it compiled ok).

ive checked the permissions on both the directory containing the binaries and the aforementioned datadir, all are writable by my login (& no other ACL/SELinux trickery in the background either)

I have only just started using bitcoin, so i find it strange that it's throwing a recovery type error when the contents of that directory are freshly generated (i.e. i can rm -rf the lot, then start bitcoind with a new non-existent directory, watch it create the files needed then bomb out)

Thoughts anyone? Huh
1431289566
Hero Member
*
Offline Offline

Posts: 1431289566

View Profile Personal Message (Offline)

Ignore
1431289566
Reply with quote  #2

1431289566
Report to moderator
coin palace Get BONUS UP TO 1 BTC! Limited offer! CLAIM NOW!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1431289566
Hero Member
*
Offline Offline

Posts: 1431289566

View Profile Personal Message (Offline)

Ignore
1431289566
Reply with quote  #2

1431289566
Report to moderator
1431289566
Hero Member
*
Offline Offline

Posts: 1431289566

View Profile Personal Message (Offline)

Ignore
1431289566
Reply with quote  #2

1431289566
Report to moderator
1431289566
Hero Member
*
Offline Offline

Posts: 1431289566

View Profile Personal Message (Offline)

Ignore
1431289566
Reply with quote  #2

1431289566
Report to moderator
1431289566
Hero Member
*
Offline Offline

Posts: 1431289566

View Profile Personal Message (Offline)

Ignore
1431289566
Reply with quote  #2

1431289566
Report to moderator
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW

Ignore
July 28, 2010, 01:40:57 PM
 #2

Does it work if you specify the full path?  e.g. -datadir=/home/psyvenrix/datadir2  ?

How often do you get the chance to work on a potentially world-changing project?
satoshi
Founder
Sr. Member
*
Offline Offline

Activity: 364


View Profile

Ignore
July 28, 2010, 08:58:26 PM
 #3

It was able to reproduce this.  The database doesn't like the relative path.

"bitcoind -datadir=./subdir getinfo" works against a running daemon, but trying to start the daemon as "bitcoind -datadir=./subdir" gets that exception.

I guess we should resolve the full path before passing it to the database.

It looks like you were the first one to ever use -datadir with a relative path.
Tilka
Newbie
*
Offline Offline

Activity: 11


\(^o^)/


View Profile

Ignore
August 05, 2010, 07:07:36 AM
 #4

+1 for quick bug fix. I'd like to be able to do that, too.

Donations welcome: 16G4GxyP45cjtihHUKqjeaWh8WjCjXNsYX
lachesis
Full Member
***
Offline Offline

Activity: 210


View Profile

Ignore
August 11, 2010, 05:58:43 PM
 #5

It was able to reproduce this.  The database doesn't like the relative path.

"bitcoind -datadir=./subdir getinfo" works against a running daemon, but trying to start the daemon as "bitcoind -datadir=./subdir" gets that exception.

I guess we should resolve the full path before passing it to the database.

It looks like you were the first one to ever use -datadir with a relative path.
I've tried to do it before too, but I never considered it a large enough bug to report. It would be nice to see a fix, though.

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1AFTbit16o6FNg2msnAbXVR2G3EVTWefmc
Vanity .onion address service - <8 character addresses free!
satoshi
Founder
Sr. Member
*
Offline Offline

Activity: 364


View Profile

Ignore
August 12, 2010, 09:43:29 PM
 #6

Fixed in SVN rev 130.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!