Bitcoin Forum
September 19, 2019, 09:58:48 AM *
News: If you like a topic and you see an orange "bump" link, click it. More info.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Debian 7 + bitcoind from source + libdb5.1 = nope [SOLVED]  (Read 5408 times)
w00dy
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
November 30, 2013, 08:51:33 PM
Last edit: December 01, 2013, 09:20:04 AM by w00dy
 #1

- i want to compile bitcoind on Debian 7.2 x64
- i can NOT install libdb4.x dev packages because it breaks other stuff on the box.
- i don't care about the wallet. i just need to run bitcoind on this box
- litecoind (latest) is running fine.... compiled on this box.

the kernel:
Code:
Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.51-1

after a git clone i do a ./autogen.sh  

the ./configure breaks with
Code:
configure: error: Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore)

ok... no problem... just "fix" it with "--with-incompatible-bdb".
the ./configure runs through and i can do a "make".


bitcoind builds successfully but if i try to run it i get
Code:
Error: Error initializing wallet database environment /home/bitcoin/.bitcoin!


debug.log
Code:
2013-11-30 20:14:35 Bitcoin version v0.8.2-827-gb78d1cd-beta (2013-11-29 22:04:18 -0800)
2013-11-30 20:14:35 Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
2013-11-30 20:14:35 Default data directory /home/bitcoin/.bitcoin
2013-11-30 20:14:35 Using data directory /home/bitcoin/.bitcoin
2013-11-30 20:14:35 Using at most 125 connections (1024 file descriptors available)
2013-11-30 20:14:35 Using 4 threads for script verification
2013-11-30 20:14:35 init message: Verifying wallet...
2013-11-30 20:14:35 dbenv.open LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
2013-11-30 20:14:35 ERROR: CDB() : error Invalid argument (22) opening database environment
2013-11-30 20:14:35 Moved old /home/bitcoin/.bitcoin/database to /home/bitcoin/.bitcoin/database.1385842475.bak. Retrying.
2013-11-30 20:14:35 dbenv.open LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
2013-11-30 20:14:35 ERROR: CDB() : error Invalid argument (22) opening database environment
2013-11-30 20:14:35 Error: Error initializing wallet database environment /home/bitcoin/.bitcoin!
2013-11-30 20:14:35 Shutdown : In progress...
2013-11-30 20:14:35 StopNode()
2013-11-30 20:14:35 Shutdown : done


even tho it says "init message: Verifying wallet..." - there is no wallet.dat.


the only "fix" for this error i found via google is pretty much a "delete .bitcoin"... but it does not work here. no matter what i do, it fails always with "Error initializing wallet database environment"

 Embarrassed

any1?
1568887128
Hero Member
*
Offline Offline

Posts: 1568887128

View Profile Personal Message (Offline)

Ignore
1568887128
Reply with quote  #2

1568887128
Report to moderator
1568887128
Hero Member
*
Offline Offline

Posts: 1568887128

View Profile Personal Message (Offline)

Ignore
1568887128
Reply with quote  #2

1568887128
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568887128
Hero Member
*
Offline Offline

Posts: 1568887128

View Profile Personal Message (Offline)

Ignore
1568887128
Reply with quote  #2

1568887128
Report to moderator
1568887128
Hero Member
*
Offline Offline

Posts: 1568887128

View Profile Personal Message (Offline)

Ignore
1568887128
Reply with quote  #2

1568887128
Report to moderator
1568887128
Hero Member
*
Offline Offline

Posts: 1568887128

View Profile Personal Message (Offline)

Ignore
1568887128
Reply with quote  #2

1568887128
Report to moderator
Adriano
Staff
Legendary
*
Offline Offline

Activity: 1182
Merit: 1020



View Profile
November 30, 2013, 09:04:51 PM
 #2

Are you running it with the user who owns /home/bitcoin/

Have any file/directory been created under /home/bitcoin/.bitcoin ?

I would say it seems a permission issue.

Adriano

--
w00dy
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
November 30, 2013, 09:20:18 PM
Last edit: November 30, 2013, 09:48:36 PM by w00dy
 #3

Are you running it with the user who owns /home/bitcoin/

Have any file/directory been created under /home/bitcoin/.bitcoin ?

I would say it seems a permission issue.

Adriano

i think permissions are fine.

- there is a user "bitcoin" in group "bitcoin"

also, the litecoin stuff to compare, entrys in my passwd
Code:
bitcoin:x:1005:1005::/home/bitcoin:/bin/bash
litecoin:x:1006:1006::/home/litecoin:/bin/bash

and group
Code:
bitcoin:x:1005:
litecoin:x:1006:

/home
Code:
drwxr-xr-x  5 root     root     4096 Nov 30 12:56 .
drwxr-xr-x 22 root     root     4096 Nov 29 16:39 ..
drwxr-xr-x  3 bitcoin  bitcoin  4096 Nov 30 21:21 bitcoin
drwxrwxr-x 13 woody    users    4096 Nov 29 17:16 data
drwxr-xr-x  3 litecoin litecoin 4096 Nov 30 13:38 litecoin
lrwxrwxrwx  1 root     root       16 Apr  9  2012 woody -> data/home_woody/

- bitcoin/litecoin homes sit on /
- data is a raid5 volume, woody's home is symlinked on it.

/home/litecoin
Code:
drwxr-xr-x 3 litecoin litecoin    4096 Nov 30 13:38 .
drwxr-xr-x 5 root     root        4096 Nov 30 12:56 ..
-rw------- 1 litecoin litecoin     386 Nov 30 15:22 .bash_history
-rw-r--r-- 1 litecoin litecoin     220 Apr 10  2010 .bash_logout
-rw-r--r-- 1 litecoin litecoin    3393 Nov 30 13:40 .bashrc
drwx------ 3 litecoin litecoin    4096 Nov 30 13:29 .config
drwxr-xr-x 5 litecoin litecoin    4096 Nov 30 12:57 .litecoin
-rwxr-xr-x 1 litecoin litecoin 3318720 Nov 30 13:37 litecoind
-rw-r--r-- 1 litecoin litecoin     675 Apr 10  2010 .profile


/home/bitcoin
Code:
drwxr-xr-x 3 bitcoin bitcoin     4096 Nov 30 21:21 .
drwxr-xr-x 5 root    root        4096 Nov 30 12:56 ..
-rw------- 1 bitcoin bitcoin        5 Nov 30 15:22 .bash_history
-rw-r--r-- 1 bitcoin bitcoin      220 Apr 10  2010 .bash_logout
-rw-r--r-- 1 bitcoin bitcoin     3392 Dez 30  2012 .bashrc
drwxr-xr-x 5 bitcoin bitcoin     4096 Nov 30 21:21 .bitcoin
-rwxr-xr-x 1 bitcoin bitcoin 69807266 Nov 30 21:02 bitcoind
-rwxr-xr-x 1 bitcoin bitcoin  4286024 Nov 30 15:11 bitcoind_broken
-rw-r--r-- 1 bitcoin bitcoin      675 Apr 10  2010 .profile

running bitcoind_broken or non-stripped bitcoind executable as root OR user bitcoin (su - bitcoin -> ./bitcoind) make no difference.

Edit:
.bitcoin is NOT created if i run as root
.bitcoin IS created if i run as "bitcoin"

Code:
drwxr-xr-x 4 bitcoin bitcoin 4096 Nov 30 22:47 .
drwxr-xr-x 3 bitcoin bitcoin 4096 Nov 30 22:47 ..
drwx------ 2 bitcoin bitcoin 4096 Nov 30 22:47 database
drwx------ 2 bitcoin bitcoin 4096 Nov 30 22:47 database.1385848052.bak
-rw------- 1 bitcoin bitcoin  102 Nov 30 22:47 db.log
-rw------- 1 bitcoin bitcoin 1264 Nov 30 22:47 debug.log
-rw------- 1 bitcoin bitcoin    0 Nov 30 22:47 .lock
-rw------- 1 bitcoin bitcoin 1106 Nov 30 22:47 peers.dat
gmaxwell
Moderator
Legendary
*
qt
Offline Offline

Activity: 2814
Merit: 2414



View Profile
December 01, 2013, 12:51:56 AM
 #4

You cannot switch BDB versions on a wallet that wasn't cleanly shut down on the prior version, I'd guess thats whats happening here.
Adriano
Staff
Legendary
*
Offline Offline

Activity: 1182
Merit: 1020



View Profile
December 01, 2013, 01:03:41 AM
 #5

You cannot switch BDB versions on a wallet that wasn't cleanly shut down on the prior version, I'd guess thats whats happening here.

As I understood it is a brand new instalation where the wallet.dat isn't even present yet and had to be created.



running bitcoind_broken or non-stripped bitcoind executable as root OR user bitcoin (su - bitcoin -> ./bitcoind) make no difference.

Edit:
.bitcoin is NOT created if i run as root
.bitcoin IS created if i run as "bitcoin"

.bitcoin is probably being created on /root/.bitcoin when you run it as root (unless you define datadir on the command line)

Anyway, if it was created when you run it as bitcoin user then it is not permission problem indeed.

Code:
drwxr-xr-x 4 bitcoin bitcoin 4096 Nov 30 22:47 .
drwxr-xr-x 3 bitcoin bitcoin 4096 Nov 30 22:47 ..
drwx------ 2 bitcoin bitcoin 4096 Nov 30 22:47 database
drwx------ 2 bitcoin bitcoin 4096 Nov 30 22:47 database.1385848052.bak
-rw------- 1 bitcoin bitcoin  102 Nov 30 22:47 db.log
-rw------- 1 bitcoin bitcoin 1264 Nov 30 22:47 debug.log
-rw------- 1 bitcoin bitcoin    0 Nov 30 22:47 .lock
-rw------- 1 bitcoin bitcoin 1106 Nov 30 22:47 peers.dat

If you remove the /home/bitcoind/.bitcoin/ and start bitcoind again, does it create again the same files as stated above?

Adriano

--
Adriano
Staff
Legendary
*
Offline Offline

Activity: 1182
Merit: 1020



View Profile
December 01, 2013, 01:29:02 AM
 #6

I have just tried with https://github.com/bitcoin/bitcoin/archive/0.8.6.zip on my system and it worked ok on debian 7.2 with libdb5.1

Can you try downloading it directly instead of cloning and see if there is any differences ?


Adriano

--
w00dy
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
December 01, 2013, 07:42:05 AM
 #7

You cannot switch BDB versions on a wallet that wasn't cleanly shut down on the prior version, I'd guess thats whats happening here.

As I understood it is a brand new instalation where the wallet.dat isn't even present yet and had to be created.

Adriano is right here.

running bitcoind_broken or non-stripped bitcoind executable as root OR user bitcoin (su - bitcoin -> ./bitcoind) make no difference.

Edit:
.bitcoin is NOT created if i run as root
.bitcoin IS created if i run as "bitcoin"

.bitcoin is probably being created on /root/.bitcoin when you run it as root (unless you define datadir on the command line)
yeah, you are right here again. missed that one.


.bitcoin is found in /root but it's contens look exactly like the "bitcoin" user dir.
Code:
drwxr-xr-x  9 root root 4096 Nov 30 22:46 .
drwx------ 10 root root 4096 Dez  1 08:05 ..
drwx------  2 root root 4096 Nov 30 22:46 database
drwx------  2 root root 4096 Nov 30 20:02 database.1385838167.bak
drwx------  2 root root 4096 Nov 30 20:02 database.1385841392.bak
drwx------  2 root root 4096 Nov 30 20:56 database.1385841553.bak
drwx------  2 root root 4096 Nov 30 20:59 database.1385842412.bak
drwx------  2 root root 4096 Nov 30 21:13 database.1385847977.bak
drwx------  2 root root 4096 Nov 30 22:46 database.1385847996.bak
-rw-------  1 root root  612 Nov 30 22:46 db.log
-rw-------  1 root root 7152 Nov 30 22:46 debug.log
-rw-------  1 root root    0 Nov 30 20:02 .lock
-rw-------  1 root root 1106 Nov 30 22:46 peers.dat

ALL the database directorys are empty.


Quote
If you remove the /home/bitcoind/.bitcoin/ and start bitcoind again, does it create again the same files as stated above?
Adriano

Code:
su - bitcoin
rm -r .bitcoin
./bitcoind

you get this:
Code:
drwxr-xr-x 4 bitcoin bitcoin 4096 Dez  1 08:35 .
drwxr-xr-x 3 bitcoin bitcoin 4096 Dez  1 08:35 ..
drwx------ 2 bitcoin bitcoin 4096 Dez  1 08:35 database
drwx------ 2 bitcoin bitcoin 4096 Dez  1 08:35 database.1385883348.bak
-rw------- 1 bitcoin bitcoin  102 Dez  1 08:35 db.log
-rw------- 1 bitcoin bitcoin 1264 Dez  1 08:35 debug.log
-rw------- 1 bitcoin bitcoin    0 Dez  1 08:35 .lock
-rw------- 1 bitcoin bitcoin 1106 Dez  1 08:35 peers.dat

Quote
I have just tried with https://github.com/bitcoin/bitcoin/archive/0.8.6.zip on my system and it worked ok on debian 7.2 with libdb5.1

Can you try downloading it directly instead of cloning and see if there is any differences ?

will do soon.

Thx for your help!
w00dy
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
December 01, 2013, 09:18:53 AM
 #8

ooooookay... looks like the problem was somehow on my end.


this debian box got upgraded from squeeze to wheezy like 2 months ago.

I'm not really sure what the solution was but i did this:

- installed the upnp libs (before, i always compiled with USE_UPNP=0)
- apt-get auto-remove'ed left-overs from Squeeze (lots of old boost libs got removed)
- restarted  Tongue

now the git cloned source and the zip-DL source compile and work...  Cool

thx a lot!

Adriano
Staff
Legendary
*
Offline Offline

Activity: 1182
Merit: 1020



View Profile
December 01, 2013, 10:41:40 AM
 #9

ooooookay... looks like the problem was somehow on my end.


this debian box got upgraded from squeeze to wheezy like 2 months ago.

I'm not really sure what the solution was but i did this:

- installed the upnp libs (before, i always compiled with USE_UPNP=0)
- apt-get auto-remove'ed left-overs from Squeeze (lots of old boost libs got removed)
- restarted  Tongue

now the git cloned source and the zip-DL source compile and work...  Cool

thx a lot!




That's great.



--
Barmz
Full Member
***
Offline Offline

Activity: 188
Merit: 100


View Profile
December 02, 2013, 11:28:53 PM
 #10

Great job, I have the same problem w/ DBD5.1 + Debian 7 + Bitcoind source Smiley

I'll try again tomorrow

   SEMUX   -   An innovative high-performance blockchain platform  
▬▬▬▬▬      Powered by Semux BFT consensus algorithm      ▬▬▬▬▬
Github    -    Discord    -    Twitter    -    Telegram    -    Get Free Airdrop Now!
nostromo429
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
December 08, 2013, 06:36:08 PM
 #11

I'm running into this problem with bitcoind and BerkeleyDB on Debian wheezy myself, now, in a brand-new installation from scratch.

Question: What does the
Code:
--with-incompatible-bdb
"fix" actually cause to happen?  Namely, that copies of the wallet from this instance couldn't be used with other bitcoin installations?  That's bad.

I'm curious why BDB 4.8 is still being used, it seems to be near obsolescence even on known-glacial distros (CentOS and Debian stable).

My problem is that IFF
Code:
--with-incompatible-bdb
does break moving wallets between clients, I can't use it.  It's a hard requirement.  Debian 7 is also a hard requirement.

Options?  Maybe I could build BDB 4.8 and shove it someplace really out-of-the-way like /opt?

Thanks in advance!
Adriano
Staff
Legendary
*
Offline Offline

Activity: 1182
Merit: 1020



View Profile
December 09, 2013, 02:38:12 AM
 #12

I'm running into this problem with bitcoind and BerkeleyDB on Debian wheezy myself, now, in a brand-new installation from scratch.

Question: What does the
Code:
--with-incompatible-bdb
"fix" actually cause to happen?  Namely, that copies of the wallet from this instance couldn't be used with other bitcoin installations?  That's bad.

I'm curious why BDB 4.8 is still being used, it seems to be near obsolescence even on known-glacial distros (CentOS and Debian stable).

My problem is that IFF
Code:
--with-incompatible-bdb
does break moving wallets between clients, I can't use it.  It's a hard requirement.  Debian 7 is also a hard requirement.

Options?  Maybe I could build BDB 4.8 and shove it someplace really out-of-the-way like /opt?

Thanks in advance!

you can always export the privkeys and import them on the other instance if they're really incompatible. Anyways, if you are building both servers you probably will use the same version and then they will be compatible between them.

Adriano

--
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!