Author

Topic: ArmoryDB on Raspberry Pi 3 (Read 221 times)

sr. member
Activity: 471
Merit: 252
January 21, 2018, 10:33:50 AM
#13
Thanks for your your helpfull guidance!!
legendary
Activity: 3794
Merit: 1375
Armory Developer
January 20, 2018, 11:31:02 AM
#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.
sr. member
Activity: 471
Merit: 252
January 20, 2018, 07:05:11 AM
#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...
legendary
Activity: 3794
Merit: 1375
Armory Developer
January 19, 2018, 10:24:38 AM
#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.
sr. member
Activity: 471
Merit: 252
January 19, 2018, 08:41:26 AM
#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...
legendary
Activity: 3794
Merit: 1375
Armory Developer
January 19, 2018, 08:23:56 AM
#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.
sr. member
Activity: 471
Merit: 252
January 19, 2018, 07:41:25 AM
#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...
sr. member
Activity: 525
Merit: 282
January 19, 2018, 03: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
sr. member
Activity: 471
Merit: 252
January 19, 2018, 02: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?
sr. member
Activity: 471
Merit: 252
January 17, 2018, 04: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

sr. member
Activity: 471
Merit: 252
January 17, 2018, 09:57:53 AM
#3
haha! great!

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

thanks!!
legendary
Activity: 3794
Merit: 1375
Armory Developer
January 17, 2018, 04:56:32 AM
#2
Don't build the db on a Pi
sr. member
Activity: 471
Merit: 252
January 17, 2018, 04: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.
Jump to: