Author

Topic: Bitcoin Explorer No RPC Connection (Read 168 times)

hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
March 03, 2024, 07:03:31 AM
#10
I tried setting the rpcuser and rpcpassword in bitcoin.conf but then the electrum server fails to start.

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?


Since I'm running this node on a VM, I am not sure where to access the .env file.

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.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
February 27, 2024, 01:00:45 AM
#9
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.
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
newbie
Activity: 2
Merit: 0
February 26, 2024, 02:00:10 PM
#8
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.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
February 23, 2024, 02:17:42 AM
#7
How do I fix this?
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.
newbie
Activity: 2
Merit: 0
February 22, 2024, 03:11:38 PM
#6
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?
jr. member
Activity: 44
Merit: 22
January 15, 2023, 09:41:29 PM
#5
Hi Ed

All I have is:

server=1
txindex=1
Yeah, its okay.

EDIT: SOMEHOW ITS WORKING
 Huh
Could be that you were not synchronized with the blockchain before? But anyway, glad to see that your issue is resolved.

THANKS ED!! I appreciate it!
hero member
Activity: 1050
Merit: 681
January 15, 2023, 09:36:17 PM
#4
Hi Ed

All I have is:

server=1
txindex=1
Yeah, its okay.

EDIT: SOMEHOW ITS WORKING
 Huh
Could be that you were not synchronized with the blockchain before? But anyway, glad to see that your issue is resolved.
jr. member
Activity: 44
Merit: 22
January 15, 2023, 09:23:56 PM
#3
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
 Huh
hero member
Activity: 1050
Merit: 681
January 15, 2023, 09:16:45 PM
#2
Check your connection details (host & port for Bitcoin Core) as well as your authentication details (username, password, etc).
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).
All of these parameters need to be specified in a ".env" file or via commandline parameters.
Check for .env file sample here: https://github.com/janoside/btc-rpc-explorer/blob/master/.env-sample
jr. member
Activity: 44
Merit: 22
January 15, 2023, 08:55:31 PM
#1
Hi everyone. Got myself into the weeds. I've been working on this for about 2 days  Undecided

Was trying to get mempool running with a node and instead messed up the bitcoin explorer.

Im getting: No RPC Connection
This explorer currently is failing to connect to your Bitcoin core node.

Check your connection details (host & port for Bitcoin Core) as well as your authentication details (username, password, etc).

All of these parameters need to be specified in a ".env" file or via commandline parameters. See the project homepage to review how to configure this explorer.

Thanks!
Jump to: