Title: ArmoryDB standalone doesn't connect to bitcoin node Post by: bobulus on September 05, 2018, 08:03:53 PM I'm having an issue when running ArmoryDB directly, (without the GUI so I can use armoryd.py). ArmoryDB appears to never connects to the bitcoin node. Running with the following command:
ArmoryDB --datadir=/armory If you look at my Direct - dbLog.txt, you'll notice it just stops after "Listening on port 19002". When running from the GUI, it connects to the bitcoin node fine. With the GUI - dbLog.txt, it continues with "Executing: doInitialSyncOnLoad". Am I misconfiguring something? How do I get ArmoryDB to connect to my bitcoin node when running ArmoryDB directly? Armory 0.96.4 Bitcoin Core 0.16.2 running regtest Later when I'm running armoryd.py I get the error "DB error: Magic bytes mismatch! Different blokchain?", but I believe it's because ArmoryDB never connected to my bitcoin node. (armoryd.py works fine when I run Armory from the GUI too). armorydb.conf Code: satoshi-datadir=/bitcoin/regtest/blocks BAD - Direct - dbLog.txt Code: Log file opened at 19:30:00: /armory/dbLog.txt GOOD - GUI - dbLog.txt Code: Log file opened at 18:39:13: /armory/dbLog.txt Title: Re: ArmoryDB standalone doesn't connect to bitcoin node Post by: bobulus on September 06, 2018, 05:12:15 PM After browsing the C++ code, I decided to try passing in configuration via the command line instead of the config file, and it worked. It seems like either my config file is incorrect, or maybe bug in how ArmoryDB parses armorydb.conf. When I have a chance I'll go back and debug a bit.
Title: Re: ArmoryDB standalone doesn't connect to bitcoin node Post by: bob123 on September 08, 2018, 09:33:49 AM It seems like either my config file is incorrect, [...] That's what i am assuming. If i recall correctly you need to put the path between " ". So, the first line of your armorydb.conf should be: Code: satoshi-datadir="/bitcoin/regtest/blocks" instead of Code: satoshi-datadir=/bitcoin/regtest/blocks Also, are you sure the absolute path /bitcoin/* is correct ? Title: Re: ArmoryDB standalone doesn't connect to bitcoin node Post by: goatpig on September 09, 2018, 09:02:10 AM Quote I'm having an issue when running ArmoryDB directly, (without the GUI so I can use armoryd.py). ArmoryDB appears to never connects to the bitcoin node. Running with the following command: ArmoryDB --datadir=/armory You have to start it in regtest: Code: ArmoryDB --datadir=/armory --regtest Title: Re: ArmoryDB standalone doesn't connect to bitcoin node Post by: bobulus on September 09, 2018, 11:06:22 PM You have to start it in regtest: Does it not work when setting regtest via armorydb.conf for ArmoryDB? It works when running the GUI, with setting regest in the conf file: Code: armory --datadir=/armory I'm using the same conf file for both. Title: Re: ArmoryDB standalone doesn't connect to bitcoin node Post by: goatpig on September 11, 2018, 12:14:16 AM Quote Does it not work when setting regtest via armorydb.conf for ArmoryDB? It works when running the GUI, with setting regest in the conf file: When called from the GUI, the DB is spawned with --regtest. Browse armorylog.txt, you should see the db invocation with the relevant arg. Quote I'm using the same conf file for both. CLI args overrule the config file. The way it works is the arguments are tokenized and inserted into a map. Then the content of the config file is loaded and passed through the same process. Any insertion of an existing key into the token map will be ignored as per std::map mechanics. This means most everything in your db config file will be ignored when spawning from the GUI as it passes a pretty exhaustive list of arguments. |