Author

Topic: mempool / electrs install, can load transactions but not addresses (Read 254 times)

newbie
Activity: 6
Merit: 0
I think you might have a firewall. First try using 127.0.0.1 instead of 192.168.4.116

in /electrs/config.toml
Code:
electrum_rpc_addr = "127.0.0.1:50001"


hah! my electrum_rpc_addr was already set to 127.0.0.1, changing it back to the local IP 192.168.4.116 has (so far, I think, still indexing) resolved the address lookup issue!

Quote
~$ curl -sSL "http://mempool.myserver/api/address/1KXLMMcwtB9VsbBXboaV6AxUv7mmomWEeR"
{"address":"1KXLMMcwtB9VsbBXboaV6AxUv7mmomWEeR","chain_stats":{"funded_txo_count":0,"funded_txo_sum":979079,"spent_txo_count":0,"spent_txo_sum":0,"tx_count":1},"mempool_stats":{"funded_txo_count":0,"funded_txo_sum":0,"spent_txo_count":0,"spent_txo_sum":0,"tx_count":0},"electrum":true}

However, this does mean that I can no longer connect my desktop electrum to the hosted instance via the onion address which was working before (when I had rpc_addr set to 127.0.0.1) but this is a minor issue, I can probably resolve w opening the port through NAT.
jr. member
Activity: 39
Merit: 9
I think you might have a firewall. First try using 127.0.0.1 instead of 192.168.4.116

in /electrs/config.toml
Code:
electrum_rpc_addr = "127.0.0.1:50001"

Quote
Make sure that the rcpallowip= coorelates to your local subnet address range.
bitcoin.conf
Code:
rpcbind=127.0.0.1
rpcallowip=192.168.4.0/24
rpcport=8332
newbie
Activity: 6
Merit: 0
I think it is likely the error is not on the Bitcoin side it is rather on the mempool. To be sure, try to add the debug configurations on my post above, I believe it will give clarity why the mempool is returning HTTP 500 since it will log more output on both electrs and mempool.

Looks like it's the connection between mempool and electrs as you suspected.

When I use the rpc values in bitcoin.conf as per the original guide I get the occasional error when running mempool, but I can see it syncing
Quote
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 1 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 2 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 3 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 4 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 5 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 6 / 6
Dec 13 14:43:40 [75581] DEBUG: Mempool blocks calculated in 0.001 seconds
Dec 13 14:43:40 [75581] DEBUG: New mempool size: 470 Change: 6
Dec 13 14:43:40 [75581] DEBUG: Mempool updated in 0.01 seconds
Dec 13 14:43:41 [75581] DEBUG: Electrum attempting reconnect...
Dec 13 14:43:41 [75581] ERR: Electrum error: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":50001}
Dec 13 14:43:41 [75581] ERR: Electrum error: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":50001}
Dec 13 14:43:41 [75581] INFO: Disconnected from Electrum Server at 192.168.4.116:50001

I tried your suggestion in another thread on here by setting the bind/allowip values
Quote
rpcbind:127.0.0.1
rpcbind:192.168.4.116
rpcallowip:192.168.4.122
rpcport:8332

But that causes mempool to fail immediately on restart (it never connects)
Quote
Dec 13 14:45:53 [75763] DEBUG: updateMempoolInfo: connect ECONNREFUSED 192.168.4.116:8332
Dec 13 14:45:53 [75763] WARN: runMainLoop error: connect ECONNREFUSED 192.168.4.116:8332. Retrying in 10 sec.
Dec 13 14:45:53 [75763] DEBUG: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":8332}
jr. member
Activity: 39
Merit: 9
I think it is likely the error is not on the Bitcoin side it is rather on the mempool. To be sure, try to add the debug configurations on my post above, I believe it will give clarity why the mempool is returning HTTP 500 since it will log more output on both electrs and mempool.

You are right.

Quote
Inspecting the URL via the Browser dev tools console gets me the same HTTP 500 error

There may also be an access error.  Start a bitcoin node with the -debug parameter and inspect what the node writes at the time of the request. You can use without -daemon.
legendary
Activity: 1932
Merit: 1273
I think it is likely the error is not on the Bitcoin side it is rather on the mempool. To be sure, try to add the debug configurations on my post above, I believe it will give clarity why the mempool is returning HTTP 500 since it will log more output on both electrs and mempool.
newbie
Activity: 6
Merit: 0
Looks like I might be getting somewhere..

Quote
# bitcoin-cli getaddressinfo 1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
error code: -18
error message:
No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)

Looks like the bitcoin-d install didn't include a wallet and that is required in order to query addresses?? I ran createwallet and it looks OK now.

Quote
# bitcoin-cli createwallet "testwallet"
{
  "name": "testwallet",
  "warning": ""
}

# bitcoin-cli getaddressinfo 1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
{
  "address": "1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm",
  "scriptPubKey": "76a914ddcbf1131395a90e772396e0e5bad51cc2923c7388ac",
  "ismine": false,
  "solvable": false,
  "iswatchonly": false,
  "isscript": false,
  "iswitness": false,
  "ischange": false,
  "labels": [
  ]
}

Inspecting the URL via the Browser dev tools console gets me the same HTTP 500 error
Quote
Request URL: http://mempool.myserver.com/api/address/1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
Request Method: GET
Status Code: 500 Internal Server Error
Remote Address: 127.0.0.1:61274
Referrer Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 5
Content-Type: text/html; charset=utf-8
Date: Sun, 12 Dec 2021 00:35:02 GMT
ETag: W/"5-fy9qFc+NorJ+Wkr0e1jnrXHAs9k"
Server: nginx
X-Powered-By: Express
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Host: mempool.myserver.com
Referer: http://mempool.myserver.com/address/1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
Sec-GPC: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
legendary
Activity: 1932
Merit: 1273
could not find an associate log for electrs.
It looks like the tutorial you followed did not enable the log for both electrs and mempool. Try to add the below configurations:

Code:
# Electrs
# /usr/local/etc/electrs/config.toml

# add this on the last line
verbose = 4

---

# mempool-config.json
# https://github.com/seth586/guides/blob/master/FreeNAS/bitcoin/freenas_8_mempool.md

# find "SYSLOG" and then change "ENABLED" to true
"SYSLOG": {
    "ENABLED": true,
    "HOST": "127.0.0.1",
    "PORT": 514,
    "MIN_PRIORITY": "info",
    "FACILITY": "local7"
  },

Then restart both applications. After that, run this on terminal $ tail -f /var/log/syslog and then try to open up mempool site again and visit any addresses. Look up at the terminal, it will probably show the loggings.
jr. member
Activity: 39
Merit: 9
Have you followed this instruction?
https://github.com/seth586/guides/blob/master/FreeNAS/bitcoin/freenas_2_bitcoin.md

Did you forget to specify the parameters in the bitcoin conf?

Code:
server=1
txindex=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

Have you tried using the bitcoin-cli getaddressinfo [address] command directly?

Quote
But when I try to navigate/search
As far as I understand, you are using the web page for search? If yes: look what JsonRpc returns. You can do this in the browser in developer mode on the Network tab.
newbie
Activity: 6
Merit: 0
Appreciate the suggestions folks..

getmempoolinfo returns
Quote
{
  "loaded": true,
  "size": 572,
  "bytes": 191953,
  "usage": 1004624,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "unbroadcastcount": 0
}


nginx logs have some funky http codes, internal server error for the address GET?
Quote
185.220.101.178 - - [12/Dec/2021:09:01:06 +1100] "GET /api/tx/dba3a64c1117fb5c67dfc4546b18968ff6f6d716705427c86c6d7cb6d87afb3f HTTP/1.1" 200 801
185.220.101.178 - - [12/Dec/2021:09:01:07 +1100] "GET /api/tx/dba3a64c1117fb5c67dfc4546b18968ff6f6d716705427c86c6d7cb6d87afb3f/outspends HTTP/1.1" 501 15
185.220.101.178 - - [12/Dec/2021:09:01:51 +1100] "GET /api/address/bc1qn75z0k77ywdc47cu9t68xg67rr3g0sw3pm47jv HTTP/1.1" 500 5

could not find an associate log for electrs.

i can share the clearnet address for the mempool if that might help?

jr. member
Activity: 39
Merit: 9
Any specific logs I can inspect?

I'm not very familiar with FreeNAS (since it's based on FreeBSD), but i would check directory /var/log and check syslog file.

Code:
cd /var/log
cat syslog | grep electrs

Sorry, but this is a question for the author to analyze his problem. I think there is a problem with the mempool

Why do you think the problem is related with Bitcoin Core's mempool?


I do not know about the author, but it happened to me when there are transactions in the mempool that were overwritten or with erroneous waste and the local mempool did not match the network one - I could not get data by addresses.
jr. member
Activity: 39
Merit: 9
What does the command return?

Code:
bitcoin-cli getmempoolinfo

1. Please don't hijack other's topic. Make your own.
2. You can find your answer in the documentation: https://developer.bitcoin.org/reference/rpc/getmempoolinfo.html


Sorry, but this is a question for the author to analyze his problem. I think there is a problem with the mempool



We just had a similar problem when the mempool stuck, then we solved the problem of restarting the node with zapwallettxes
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
What does the command return?

Code:
bitcoin-cli getmempoolinfo

1. Please don't hijack other's topic. Make your own.
2. You can find your answer in the documentation: https://developer.bitcoin.org/reference/rpc/getmempoolinfo.html
jr. member
Activity: 39
Merit: 9
What does the command return?

Code:
bitcoin-cli getmempoolinfo
newbie
Activity: 6
Merit: 0
In the case of the Bitcoin node, you can use getchaintips RPC and it will tell you the current block height the node has processed. It also has a field for flags and at what block height they are activated; chances are if you aren't anywhere close to the Taproot flag block height then your node is not completely verified.

There is also a friendlier getblockchaininfo RPC that gives you the verification process as a decimal between 0 and 1 ( 1=fully verified ).

getblockchaininfo shows the latest block, and when I send a test transaction I can see it immediately in my mempool view by searching the txid. However if I then click on the associated address that's when I get the "Error loading address data" message.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
In the case of the Bitcoin node, you can use getchaintips RPC and it will tell you the current block height the node has processed. It also has a field for flags and at what block height they are activated; chances are if you aren't anywhere close to the Taproot flag block height then your node is not completely verified.

There is also a friendlier getblockchaininfo RPC that gives you the verification process as a decimal between 0 and 1 ( 1=fully verified ).
newbie
Activity: 6
Merit: 0
Hi all,

https://github.com/seth586/guides/blob/master/FreeNAS/bitcoin/README.md

I pretty much followed this excellent FreeNAS guide to get my bitcoin and lnd node up and running. I can load my local mempool install up and view any blocks/transactions without problems. But when I try to navigate/search for a particular address it always ends up with "Error loading address data." Is this a syncing issue? It's been almost a week since I got electrs up and running. Is there any way to know when a full sync has completed? Any specific logs I can inspect?

Thanks
Jump to: