Bitcoin Explorer RPC Connection Issues

9 replies 456 views
eric21Member
Posts: 8 · Reputation: 106
#1Jul 31, 2018, 01:46 AM
Hey folks. I've hit a bit of a snag here. Been at this for around two days now. I was trying to set up mempool with my node, but I ended up messing with the bitcoin explorer instead. Now I’m getting: No RPC Connection. The explorer can't connect to my Bitcoin core node. Make sure to check your connection settings (host and port for Bitcoin Core) along with your authentication info (username, password, etc). All these settings should be in a '.env' file or passed as command line parameters. Check the project homepage for guidance on configuring this explorer. Appreciate any help!
6 Reply Quote Share
farm100Member
Posts: 5 · Reputation: 99
#2Jul 31, 2018, 05:59 AM
Could you post your bitcoin.conf file configuration sample? Did you confirm that your localhost is not blocking the port? Ensure that Bitcoin Core's RPC server is enabled (server=1). Check for .env file sample here: https://github.com/janoside/btc-rpc-explorer/blob/master/.env-sample
0 Reply Quote Share
eric21Member
Posts: 8 · Reputation: 106
#3Jul 31, 2018, 01:55 PM
Hi Ed All I have is: server=1 txindex=1 I don't know how to use the env. file except mine looks the same as the one linked. I just tried reinstalling everything. EDIT: SOMEHOW ITS WORKING
1 Reply Quote Share
farm100Member
Posts: 5 · Reputation: 99
#4Jul 31, 2018, 07:42 PM
Yeah, its okay. Could be that you were not synchronized with the blockchain before? But anyway, glad to see that your issue is resolved.
0 Reply Quote Share
eric21Member
Posts: 8 · Reputation: 106
#5Jul 31, 2018, 11:06 PM
THANKS ED!! I appreciate it!
5 Reply Quote Share
Posts: 5 · Reputation: 104
#6Jul 31, 2018, 11:33 PM
I'm having the same issue. I run myNode on a VM. This is what the RPC Explorer logs show. Feb 22 13:07:22 mynode btcrpcexplorer[12118]:     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) Feb 22 13:07:22 mynode btcrpcexplorer[12118]: 2024-02-22T19:07:22.866Z btcexp:errorVerbose Stack: Error: connect ECONNREFUSED ::1:8332 Feb 22 13:07:22 mynode btcrpcexplorer[12118]: 2024-02-22T19:07:22.866Z btcexp:error Error RpcError-001: Error: connect ECONNREFUSED ::1:8332, json: {"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"::1","port":8332,"userData":{"request":"getblockchaininfo"}}, userData: [object Object] (json: {"request":"getblockchaininfo"}) Feb 22 13:07:22 mynode btcrpcexplorer[12118]:     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) This is the bitcoin config sample. # bitcoin configuration # /home/bitcoin/.bitcoin/bitcoin.conf # Bitcoin options server=1 daemon=1 # Needed for BTC-RPC-Explorer txindex=1 # CPU count par=-1 # Debug log settings shrinkdebugfile=1 How do I fix this?
1 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#7Aug 1, 2018, 03:24 AM
What about the rpc credentials on your "btc-rpc-explorer.env" or ".env" file? Or have you set the configs via command line interface? Since you didn't set the rpcuser and rpcpassword in bitcoin.conf, you must point the ".cookie" file to the correct directory. It's auto-created in Bitcoin Core's bitcoin data directory, in the custom datadir if you're not using the default.
5 Reply Quote Share
Posts: 5 · Reputation: 104
#8Aug 1, 2018, 07:18 AM
Thanks for replying, I tried setting the rpcuser and rpcpassword in bitcoin.conf but then the electrum server fails to start. Since I'm running this node on a VM, I am not sure where to access the .env file.
4 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#9Aug 1, 2018, 09:26 AM
Since you're also running an Electrum server together with Bitcoin Explorer, You should consider opening your own topic with information about any other programs that you're running or one setting that fixes another may break the other. Using the .cookie file should also work but Bitcoin Explorer must know where to find it if it's not in the default directory. If you can't find env file (you must have run the program "as-is"), you can also use a command line option to set it. Refer to their configuration instructions in their GitHub Repo, here: github.com/janoside/btc-rpc-explorer?tab=readme-ov-file#configuration
1 Reply Quote Share
im_lynxHero Member
Posts: 515 · Reputation: 2161
#10Aug 1, 2018, 08:19 PM
Since you run myNode you will very likely break things when you try to mess with rpcuser and rpcpassword in bitcoin.conf without other modules like the Electrum server knowing about it. I'm not familiar with myNode, but it should have some central config files that define certain global settings for the modules that you can activate in myNode. I wonder why the Bitcoin RPC Explorer module needs any manual tinkering in myNode. Shouldn't it run out of the box when enabled? You will have to try to find such details in the documentation of myNode. As I'm not familiar with myNode, I can't tell, sorry. I run nodes with RaspiBlitz where it's fairly easy to tinker with config files for optional modules. With nodes that are setup based on RaspiBolt (doesn't need to run on a Raspi 4B or 5) you configure everything yourself (some Linux experience is of great help). My other Umbrel node has every optional module in docker containers. I didn't tinker much with my Umbrel but as far as I see, most of the config files are exposed to the docker host file system where you can apply changes. Persistant changes are another beast, i.e. changes that should survive a module update or similar. The Umbrel UI doesn't provide many options for this and I guess this is their policy (eye candy is more important than configurability options). Persistant changes in myNode could also be challenging if you don't understand how myNode is setup internally.
3 Reply Quote Share

Related topics