Author

Topic: Having problems specifing -datadir (Read 9485 times)

founder
Activity: 364
Merit: 6472
August 12, 2010, 05:43:29 PM
#6
Fixed in SVN rev 130.
full member
Activity: 210
Merit: 104
August 11, 2010, 01: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.
newbie
Activity: 11
Merit: 0
August 05, 2010, 03:07:36 AM
#4
+1 for quick bug fix. I'd like to be able to do that, too.
founder
Activity: 364
Merit: 6472
July 28, 2010, 04: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.
legendary
Activity: 1652
Merit: 2216
Chief Scientist
July 28, 2010, 09:40:57 AM
#2
Does it work if you specify the full path?  e.g. -datadir=/home/psyvenrix/datadir2  ?
newbie
Activity: 1
Merit: 0
July 28, 2010, 09:38:00 AM
#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
Jump to: