Bitcoin Forum
May 07, 2024, 11:09:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ArmoryDB on Raspberry Pi 3  (Read 186 times)
johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 17, 2018, 09:00:44 AM
 #1

I'm running ArmoryDB --ram-usage=1 on a RPI3 but it always fails with this message after a while:

Code:
mdb_enlarge_map failed with error: "Cannot allocate memory", id: 12
ran out of new map indexes

This is the first time running it, so it is building the DB.
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715123374
Hero Member
*
Offline Offline

Posts: 1715123374

View Profile Personal Message (Offline)

Ignore
1715123374
Reply with quote  #2

1715123374
Report to moderator
1715123374
Hero Member
*
Offline Offline

Posts: 1715123374

View Profile Personal Message (Offline)

Ignore
1715123374
Reply with quote  #2

1715123374
Report to moderator
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3668
Merit: 1347

Armory Developer


View Profile
January 17, 2018, 09:56:32 AM
 #2

Don't build the db on a Pi

johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 17, 2018, 02:57:53 PM
 #3

haha! great!

I think I only need to copy .armory/databases. Am I right?

thanks!!
johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 17, 2018, 09:16:29 PM
 #4

I copied databases directory and now it got stuck:

Code:
$ ./ArmoryDB --ram-usage=1
/home/pi
/home/pi
logging in /home/pi/.armory/dbLog.txt
-INFO  - 22:14:10: (main.cpp:32) Running on 4 threads
-INFO  - 22:14:10: (main.cpp:33) Ram usage level: 1
-INFO  - 22:14:10: (BlockUtils.cpp:915) blkfile dir: /home/pi/.bitcoin/blocks
-INFO  - 22:14:10: (BlockUtils.cpp:916) lmdb dir: /home/pi/.armory/databases
-INFO  - 22:14:10: (lmdb_wrapper.cpp:388) Opening databases...
-INFO  - 22:14:10: (BDM_Server.h:263) Listening on port 9001

johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 19, 2018, 07:37:38 AM
 #5

It's still running and stuck. It does nothing at all.

The only thing I did was to copy .armory/databases from my desktop computer to my pi.
Anything else I should know? I've been googling with no luck...

I see a .cookie_ file in .armory directory. I think this is new. Could it be related to this behavior?
droark
Sr. Member
****
Offline Offline

Activity: 525
Merit: 282


View Profile WWW
January 19, 2018, 08:30:10 AM
 #6

I see a .cookie_ file in .armory directory. I think this is new. Could it be related to this behavior?

.cookie_ is generated whenever Armory kicks off ArmoryDB. I don't think it'll cause any issues. To be safe, if Armory and ArmoryDB aren't running, delete the cookie and try again. If it still doesn't work, I don't know what's happening. I finally broke down and bought an RPi3 but it'll be awhile before I get around to playing with cross-compiling and running Armory on it. Don't wait on me. Smiley
johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 19, 2018, 12:41:25 PM
 #7

I'm not running ArmoryQt on Pi3. Only ArmoryDB :-)

I compiled it directly on Pi. I think you can use make server as it doesn't need any dependencies, I think. Try it.



I tried to create a new databases build from scratch in my desktop PC, moved ".armory" to my pi and ArmoryDB is stuck at the same point commented above...
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3668
Merit: 1347

Armory Developer


View Profile
January 19, 2018, 01:23:56 PM
 #8

DB is tied to the ondisk blockchain. You can't move a DB around to a different copy of the chain. Also I don't think the meta entries for LMDB are even the same going from 64 to 32 bits. It's typically bound to the pointer size, which naturally differs between 64 and 32 bits.

johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 19, 2018, 01:41:26 PM
 #9

Do you think that using some swap space in my Pi would do the trick? In this way I would have enough memory to create the DB directly on the Pi.

Also I don't think the meta entries for LMDB are even the same going from 64 to 32 bits. It's typically bound to the pointer size, which naturally differs between 64 and 32 bits.

Yup! I saw that it complains about some .lmdb files are not LMDB format...
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3668
Merit: 1347

Armory Developer


View Profile
January 19, 2018, 03:24:38 PM
 #10

The issue isn't the amount of memory, it's addressable space. LMDB maps all on disk data into memory. If that value exceeds the process addressable memory, you will get a critical failure. On 32 bit systems, process addressable memory maxes out around 2~3GB. Therefor, any file LMDB uses that exceeds 2GB in size cannot be created nor used on a 32bit system. This is a long winded way to saying please don't try this.

If you insist on attempting this setup, you should do it the smart way: create a 32bit VM of some Debian flavored distro, the closest you can to the target Raspbian version. Give this VM a copy of the blockchain, then build the smallest existing Armory DB on that VM (db-type=DB_BARE). This will give you a ~200MB database. Then take this DB with the relevant copy of the chain your Pi and cross your fingers.

johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 20, 2018, 12:05:11 PM
 #11

The issue isn't the amount of memory, it's addressable space. LMDB maps all on disk data into memory. If that value exceeds the process addressable memory, you will get a critical failure. On 32 bit systems, process addressable memory maxes out around 2~3GB. Therefor, any file LMDB uses that exceeds 2GB in size cannot be created nor used on a 32bit system. This is a long winded way to saying please don't try this.

Oh, I understand. So then I only would be able to build it in rPi if I had installed a 64bit linux on my Pi, which I haven't...
goatpig
Moderator
Legendary
*
Offline Offline

Activity: 3668
Merit: 1347

Armory Developer


View Profile
January 20, 2018, 04:31:02 PM
Merited by johnlu (5)
 #12

Oh, I understand. So then I only would be able to build it in rPi if I had installed a 64bit linux on my Pi, which I haven't...

You could theoretically build the BARE db on a Pi assuming you use the lowest ram-usage setting. That DB is small enough that you won't run into LMDB issues, but you also have to consider total process RAM, which could exceed the addressable memory as a whole.

johnlu (OP)
Sr. Member
****
Offline Offline

Activity: 471
Merit: 252



View Profile
January 21, 2018, 03:33:50 PM
 #13

Thanks for your your helpfull guidance!!
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!