Title: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: FredCailloux on February 29, 2024, 03:12:53 PM Newly installed myNode OS is running on a mini PC with 8GB RAM and 2T SSD.
The whole blockchain is now completely loaded in the SSD Electrum Server and Bitcoin are running OK. The NTC RPC Explorer has the little green light. From the myNode Home page, when clicking on the “Explorer” button, a new web page open and show this error: Code: No RPC Connection Here is a copy of the NTC RPC Explorer .env file: Location: /opt/mynode/btc-rpc-explorer/.env Code: ======= START OF .env FILE ( stripped of all comments )=========== I’m a newbie in the world of all things node and linux, so my knowledge is pretty limited. Where do I start to get the NTC RPC Explorer functional ? Thank you for any assistance. Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: FredCailloux on February 29, 2024, 03:36:56 PM Here is a partial log file from the BTC RPC EXPLORER STATUS file.
Not the whole file for these lines repeat about 50 times over, which IMO would be useless to completely post here. Code: Feb 29 09:18:36 mynode btcrpcexplorer[8611]: 2024-02-29T15:18:36.124Z btcexp:errorVerbose Stack: Error: connect ECONNREFUSED ::1:8332 Code: # bitcoin configuration Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: BitMaxz on February 29, 2024, 04:30:58 PM What's your current config in your Bitcoin.conf file? Did you set up RPC and enable it?
Based on the logs it seems it's a connection refused. Would you mind to replace this BTCEXP_HOST=0.0.0.0 with BTCEXP_HOST=127.0.0.1 and then replace localhost with the local IP of your node like 192.168.1.1 then use this command to restart the explorer. Code: sudo systemctl restart btc-rpc-explorer If the error still persists try the other configuration posted below. - https://bitcointalk.org/index.php?topic=5367296.msg61517989#msg61517989 Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: BlackHatCoiner on February 29, 2024, 06:50:03 PM The error says that BTC RPC explorer attempts to connect to localhost on IPv6. Is that surely supported? Try adding the followings two in configuration file:
Code: rpcbind=127.0.0.1 And replace "localhost" with "127.0.0.1" in the .env configuration as rightly said by BitMaxz. (That'll switch to IPv4) Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: FredCailloux on March 01, 2024, 12:26:40 AM What's your current config in your Bitcoin.conf file? Did you set up RPC and enable it? Based on the logs it seems it's a connection refused. Would you mind to replace this BTCEXP_HOST=0.0.0.0 with BTCEXP_HOST=127.0.0.1 and then replace localhost with the local IP of your node like 192.168.1.1 then use this command to restart the explorer. Code: sudo systemctl restart btc-rpc-explorer - https://bitcointalk.org/index.php?topic=5367296.msg61517989#msg61517989 OK. Some weird things happened. First, if I edit .env with nano, the file will be edited properly. Then when restarting BTC_RPC_Explorer from myNode "Manage" page, the .env file will revert back to original. All changes will disappear. Second, your proposed line "sudo systemctl restart btc-rpc-explorer" will generate an error in Terminal: Code: Failed to restart btc-rpc-explorer.service: Unit btc-rpc-explorer.service not found. Third, I've added the Bitcoin config file on my second post ( see #2 ) Fourth, I did enabled RPC but I didnt do anything about setting it up cause I do not have any knowledge about how to do so. Thanks for your help. Very appreciated. Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: FredCailloux on March 01, 2024, 12:29:33 AM Try adding the followings two in configuration file: Which config file ? Bitcoin or .env ?Code: rpcbind=127.0.0.1 Thanks Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: ABCbits on March 01, 2024, 10:15:01 AM OK. Some weird things happened. First, if I edit .env with nano, the file will be edited properly. Then when restarting BTC_RPC_Explorer from myNode "Manage" page, the .env file will revert back to original. All changes will disappear. --snip-- That's weird. I only tried myNode for a bit, but it's possible it's overridden by myNode. Have you checked whether you can edit BTC RPC Explorer setting from myNode GUI app? Try adding the followings two in configuration file: Which config file ? Bitcoin or .env ?Code: rpcbind=127.0.0.1 Thanks He refer to Bitcoin Core's config file. Title: Re: Why is the RPC explorer failing to connect to the Bitcoin Core in myNode ? Post by: FredCailloux on March 01, 2024, 02:25:20 PM Have you checked whether you can edit BTC RPC Explorer setting from myNode GUI app? There doesn't seem to be any way for editing the .env file from any of myNode GUI pages.At least, I couldn't find anything. |