Author

Topic: How to start Armory json rpc (Read 389 times)

legendary
Activity: 3766
Merit: 1364
Armory Developer
January 02, 2019, 11:46:30 AM
#23
I have couple of questions, please clarify my doubt on it.
1. In Bitcoin core we used to call bitcoin-cli getwalletinfo through command line, and through json rpc curl request curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/. Do we have same thing in Armory, if let me know some example of it.

With armoryd, all calls assume the context that a current wallet is selected. To get data from other wallets, you need to select the relevant one. The first wallet armoryd loads is set as the default one.

There's a somewhat large armoryd example you can find here:

https://github.com/goatpig/BitcoinArmory/blob/master/webshop/server.py

Unfortunately I don't know how much of it still works, as it was written in 2014.

Quote
2. Can we have armory.conf file just like bitcoin.conf to have json rpc username and password in .armory/ folder

It would be armoryd.conf
newbie
Activity: 15
Merit: 0
December 28, 2018, 03:05:31 AM
#22
I have couple of questions, please clarify my doubt on it.
1. In Bitcoin core we used to call bitcoin-cli getwalletinfo through command line, and through json rpc curl request curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/. Do we have same thing in Armory, if let me know some example of it.

2. Can we have armory.conf file just like bitcoin.conf to have json rpc username and password in .armory/ folder
newbie
Activity: 15
Merit: 0
December 28, 2018, 01:56:50 AM
#21
Awesome!!!!! Smiley armoryd rpc got started, just to cross check will paste the log, let me know is that fine.
Quote
python armoryd.py
Traceback (most recent call last):
  File "update_version.py", line 14, in
    f = open(hash_loc, "r")
IOError: [Errno 2] No such file or directory: '.git/91a3137ef1056e15cc606a186b0e508f84c'
/home/techjini
(ERROR) ArmoryUtils.py:3723 - Unsupported language  specified. Defaulting to English (en)
(WARNING) armoryd.py:3140 - ************************************************************************
(WARNING) armoryd.py:3142 - * Please note that armoryd v0.96.4 is beta software and is still in
(WARNING) armoryd.py:3143 - * development. Whenever applicable, the interface is designed to match
(WARNING) armoryd.py:3144 - * that of bitcoind, with function parameters and return values closely
(WARNING) armoryd.py:3145 - * matching those of bitcoind. Despite this, the function parameters and
(WARNING) armoryd.py:3146 - * return values may change, both for ported bitcoind function and
(WARNING) armoryd.py:3147 - * Armory-specific functions.
(WARNING) armoryd.py:3148 - ************************************************************************
(WARNING) armoryd.py:3149 -
(WARNING) armoryd.py:3150 - ********************************************************************************
(WARNING) armoryd.py:3152 - * WARNING!  WALLET FILE ACCESS IS NOT INTERPROCESS-SAFE!
(WARNING) armoryd.py:3153 - *           DO NOT run armoryd at the same time as ArmoryQt if
(WARNING) armoryd.py:3154 - *           they are managing the same wallet file.  If you want
(WARNING) armoryd.py:3155 - *           to manage the same wallet with both applications
(WARNING) armoryd.py:3156 - *           you must make a digital copy/backup of the wallet file
(WARNING) armoryd.py:3157 - *           into another directory and point armoryd at that one. 
(WARNING) armoryd.py:3158 - *           
(WARNING) armoryd.py:3159 - *           As long as the two processes do not share the same
(WARNING) armoryd.py:3160 - *           actual file, there is no risk of wallet corruption.
(WARNING) armoryd.py:3161 - *           Just be aware that addresses may end up being reused
(WARNING) armoryd.py:3162 - *           if you execute transactions at approximately the same
(WARNING) armoryd.py:3163 - *           time with both apps.
(WARNING) armoryd.py:3164 - *
(WARNING) armoryd.py:3165 - ********************************************************************************
(WARNING) armoryd.py:3166 -
(WARNING) armoryd.py:3193 - No lockboxes were loaded.
(WARNING) armoryd.py:3231 - Active wallet is set to GGxjtHsu
(WARNING) armoryd.py:3409 - Registering wallet: GGxjtHsu
(WARNING) armoryd.py:3446 - Server started...
legendary
Activity: 3766
Merit: 1364
Armory Developer
December 27, 2018, 09:54:51 AM
#20
Quote
what is command to run ArmoryDB?

./ArmoryDB


Quote
also by running this, i don't need to run python ArmoryQt.py

No.
newbie
Activity: 15
Merit: 0
December 27, 2018, 09:53:36 AM
#19
what is command to run ArmoryDB? and also by running this, i don't need to run python ArmoryQt.py
legendary
Activity: 3766
Merit: 1364
Armory Developer
December 27, 2018, 09:51:44 AM
#18
Yeah that's not gonna work because the client randomizes the DB port when it automates it. Just run ArmoryDB on its own then armoryd.
newbie
Activity: 15
Merit: 0
December 27, 2018, 03:57:20 AM
#17
Below are the steps executed for installing Armory, let me know if any issue in these steps.
1. Clone the repository from https://github.com/goatpig/BitcoinArmory and checkout into v0.96.4, after this did rest of the steps as per the documentation https://github.com/goatpig/BitcoinArmory/blob/master/linuxbuild/Linux_build_notes.md
2. Clone the repository from https://github.com/goatpig/armoryd
3. Copied the armoryd.py and txjsonrpc from armoryd folder into BitcoinArmory folder
4. Executed the python ArmoryQt.py command and this opens the Armory wallet GUI and node will started to sync
5. Try to execute the python armoryd.py to start the armoryd rpc inside the BitcoinArmory , but this is giving below error
Quote
python armoryd.py
Traceback (most recent call last):
  File "update_version.py", line 14, in
    f = open(hash_loc, "r")
IOError: [Errno 2] No such file or directory: '.git/91a3137ef1056e15cc606a186b0e508f84c'
/home/techjini
(ERROR) ArmoryUtils.py:3723 - Unsupported language  specified. Defaulting to English (en)
(ERROR) armoryd.py:3256 - could not find instance of armorydb at 127.0.0.1:9001
legendary
Activity: 3766
Merit: 1364
Armory Developer
December 27, 2018, 03:27:02 AM
#16
This log shows the DB running fine. What issues are you experiencing?
newbie
Activity: 15
Merit: 0
December 27, 2018, 01:14:19 AM
#15
Below is the log of dbLog.txt please look into it
Quote
tail -f dbLog.txt
-INFO  - 11:40:52: (nodeRPC.cpp:57) RPC connection established
-INFO  - 11:40:52: (BlockDataManagerConfig.cpp:895) waiting on node sync: 99.9997%
-INFO  - 11:40:52: (nodeRPC.cpp:425) Node is ready
-INFO  - 11:40:52: (BlockUtils.cpp:1108) Executing: doInitialSyncOnLoad
-INFO  - 11:40:52: (DatabaseBuilder.cpp:199) Reading headers from db
-INFO  - 11:40:52: (BDM_Server.cpp:1121) registered bdv: b955798b1dfc5c6b8a8f
-INFO  - 11:41:12: (DatabaseBuilder.cpp:238) Found 554788 headers in db
-INFO  - 11:41:15: (DatabaseBuilder.cpp:64) Rewinding 100 blocks
-INFO  - 11:41:15: (DatabaseBuilder.cpp:71) updating HEADERS db
-INFO  - 11:41:15: (DatabaseBuilder.cpp:493) Found next block after skipping 1625150bytes






-INFO  - 11:41:30: (DatabaseBuilder.cpp:281) parsed block file #1469
-INFO  - 11:41:30: (DatabaseBuilder.cpp:281) parsed block file #1470
-INFO  - 11:41:30: (DatabaseBuilder.cpp:281) parsed block file #1471
-INFO  - 11:41:32: (DatabaseBuilder.cpp:281) parsed block file #1472
-INFO  - 11:41:36: (DatabaseBuilder.cpp:281) parsed block file #1475
-INFO  - 11:41:38: (Blockchain.cpp:248) Organizing chain
-INFO  - 11:41:38: (Blockchain.cpp:370) Organized chain in 0s
-INFO  - 11:41:38: (DatabaseBuilder.cpp:76) updated HEADERS db in 23s
-INFO  - 11:41:38: (lmdb_wrapper.cpp:388) Opening databases...
-INFO  - 11:41:38: (DatabaseBuilder.cpp:1231) verifying txfilters integrity
-INFO  - 11:42:08: (DatabaseBuilder.cpp:1314) done checking txfilters
-INFO  - 11:42:08: (DatabaseBuilder.cpp:134) scanning new blocks from #554788 to #555688
-INFO  - 11:42:11: (BlockchainScanner.cpp:852) scanned from block #554788 to #555429
-INFO  - 11:42:11: (BlockchainScanner.cpp:852) scanned from block #555430 to #555688
-INFO  - 11:42:11: (BlockchainScanner.cpp:214) scanned transaction history in 3s
-INFO  - 11:42:11: (lmdb_wrapper.cpp:388) Opening databases...
-INFO  - 11:42:11: (DatabaseBuilder.cpp:186) scanned new blocks in 3s
-INFO  - 11:42:11: (DatabaseBuilder.cpp:190) init db in 79s
-INFO  - 11:42:11: (BDM_supportClasses.cpp:1891) Enabling zero-conf tracking
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 5 zc parser threads
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 10 zc parser threads
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 15 zc parser threads
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 20 zc parser threads
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 25 zc parser threads
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 30 zc parser threads
-WARN  - 11:42:25: (BDM_supportClasses.cpp:1944) running 35 zc parser threads
legendary
Activity: 3766
Merit: 1364
Armory Developer
December 21, 2018, 10:44:11 PM
#14
Is ArmoryDB running? Can you post dbLog.txt?
newbie
Activity: 15
Merit: 0
December 21, 2018, 10:45:23 AM
#13
I have deleted the file .cookie_ and below is the latest file list, But issue is still existing (ERROR) armoryd.py:3256 - could not find instance of armorydb at 127.0.0.1:9001

Quote
total 1308
drwxrwxr-x  5 techjini techjini    4096 Dec 21 20:36 ./
drwxr-xr-x 70 techjini techjini    4096 Dec 21 10:42 ../
-rw-------  1 techjini techjini   61440 Dec 21 06:54 armory_2suEyUSWK_wallet.lmdb
-rw-------  1 techjini techjini    8192 Dec 21 20:25 armory_2suEyUSWK_wallet.lmdb-lock
-rw-rw-r--  1 techjini techjini    9450 Dec 21 20:36 armorycpplog.txt
-rw-rw-r--  1 techjini techjini      12 Dec 18 18:38 armoryd.py
-rw-rw-r--  1 techjini techjini   27907 Dec 21 07:01 armory_GGxjtHsu_backup.wallet
-rw-rw-r--  1 techjini techjini   27907 Dec 21 07:01 armory_GGxjtHsu_.wallet
-rw-rw-r--  1 techjini techjini 1051761 Dec 21 20:36 armorylog.txt
-rw-rw-r--  1 techjini techjini    1674 Dec 21 20:31 ArmorySettings.txt
drwxrwxr-x  2 techjini techjini    4096 Dec 18 09:08 atisignedannounce/
drwxrwxr-x  2 techjini techjini    4096 Dec 21 06:52 databases/
-rw-rw-r--  1 techjini techjini   89068 Dec 21 20:31 dbLog.txt
-rw-rw-r--  1 techjini techjini   13056 Dec 21 06:59 multipliers.txt
drwxrwxr-x  3 techjini techjini    4096 Dec 18 16:28 testnet3/
legendary
Activity: 3766
Merit: 1364
Armory Developer
December 21, 2018, 09:08:57 AM
#12
Is there a file named .cookie_ in your Armory datadir (where the wallets and .conf are)? If so, delete it.
sr. member
Activity: 525
Merit: 282
December 21, 2018, 03:18:19 AM
#11
When you invoked ArmoryDB, did you set fcgi-port to 9001? (I know listen-port is in the doc I referenced. That's for Armory 0.97.)
newbie
Activity: 15
Merit: 0
December 21, 2018, 03:03:22 AM
#10
Hi @droark/@goatpig
Now we are getting below error on running python armoryd.py

Quote
Traceback (most recent call last):
  File "update_version.py", line 14, in
    f = open(hash_loc, "r")
IOError: [Errno 2] No such file or directory: '.git/91a3137ef1056e15cc606a186b0e508f84c'
/home/techjini
(ERROR) ArmoryUtils.py:3723 - Unsupported language  specified. Defaulting to English (en)
(ERROR) armoryd.py:3256 - could not find instance of armorydb at 127.0.0.1:9001

Below are the port getting utilized for the Armory
Quote
python    13984 techjini   24u  IPv4 178516      0t0  TCP 127.0.0.1:8223 (LISTEN)
ArmoryDB  14016 techjini   24u  IPv4 178516      0t0  TCP 127.0.0.1:8223 (LISTEN)
ArmoryDB  14016 techjini   41u  IPv4 171977      0t0  TCP 127.0.0.1:55771 (LISTEN)
newbie
Activity: 15
Merit: 0
December 20, 2018, 08:12:05 PM
#9
will do.
legendary
Activity: 3766
Merit: 1364
Armory Developer
December 20, 2018, 08:10:35 PM
#8
1) Make sure you are using the right version of Armory. armoryd as found in the repo (https://github.com/goatpig/armoryd) is meant to be paired with Armory as found in the master branch of the BitcoinArmory repo (https://github.com/goatpig/BitcoinArmory)

2) Start your Bitcoin node.

3) Start ArmoryDB. This is the blockchain processing service that interfaces between the Bitcoin network (your node) and clients (ArmoryQt/armoryd). ArmoryQt automates the node and db for you, but armoryd does not, as it expects you are savvy enough to manage the software stack yourself.

4) At this point you should be able to run armoryd (python armoryd.py)
newbie
Activity: 15
Merit: 0
December 20, 2018, 07:40:06 PM
#7
Oh!!! we are using v0.96 let me checkout to v0.96.4 and compile to source, will get back to you if we have any queries.
sr. member
Activity: 525
Merit: 282
December 19, 2018, 03:50:55 PM
#6
Yes, we are using the latest version v0.96, as per the documentation mentioned.

Do you mean 0.96 or 0.96.4? I ask because there are still people getting Armory from an old web site that has 0.96 as the latest version. Nobody should be running 0.96.
newbie
Activity: 15
Merit: 0
December 19, 2018, 12:58:02 PM
#5
Yes, we are using the latest version v0.96, as per the documentation mentioned. Let me know, if you get free to get connect personally through team viewer atleast for max 15min to resolve the issue.
sr. member
Activity: 525
Merit: 282
December 18, 2018, 01:39:05 PM
#4
Which version of Armory are you running? Also, is this the latest armoryd?
newbie
Activity: 15
Merit: 0
December 18, 2018, 04:38:33 AM
#3
Thanks, i am looking into it,
But got this error running python armoryd.py

Traceback (most recent call last):
  File "update_version.py", line 14, in
    f = open(hash_loc, "r")
IOError: [Errno 2] No such file or directory: '.git/aa72293f82c3ef3f1d29f93c83ad70099f4'
/home/techjini
(ERROR) ArmoryUtils.py:3747 - Unsupported language  specified. Defaulting to English (en)
(ERROR) Traceback (most recent call last):
  File "armoryd.py", line 3629, in
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 3129, in __init__
    if Cpp.BlockDataManagerConfig_testConnection(\
AttributeError: 'module' object has no attribute 'BlockDataManagerConfig_testConnection'

Traceback (most recent call last):
  File "armoryd.py", line 3629, in
    rpc_server = Armory_Daemon()
  File "armoryd.py", line 3129, in __init__
    if Cpp.BlockDataManagerConfig_testConnection(\
AttributeError: 'module' object has no attribute 'BlockDataManagerConfig_testConnection'
sr. member
Activity: 525
Merit: 282
December 18, 2018, 03:20:53 AM
#2
I created a PR here that should have the info you need. If not, let me know, and I'll update the PR when I can.
newbie
Activity: 15
Merit: 0
December 18, 2018, 02:32:00 AM
#1
I have done setup of BitcoinArmory and Armoryd.py, txjsonrpc folder inside the BitcoinArmory. How to start daemon server? Please help me in knowing starting daemon server, because lack of Armory documentation quality not able to find it
Jump to: