vulpemventures / nigiri

🍣 A delicious docker box for special Bitcoin, Lightning and Liquid cookings
https://nigiri.vulpem.com
MIT License
273 stars 44 forks source link

Chopstick fail to connect to Electrs when faucet is enabled #176

Open loic86 opened 1 year ago

loic86 commented 1 year ago

Hi, I'm trying to run nigiri and I managed to get all the containers running.

Then, of course also esplora is not working

screenshot-2023-02-10-15:11:28

Instead all the liquid containers run correctly.

loic86 commented 1 year ago

This is the docker ps: screenshot-2023-02-10-15:55:35

Thanks in advance for your time!

tiero commented 1 year ago

Interesting! let me try to replicate: Are you on Mac (Intel or Apple chip?) or Linux?

loic86 commented 1 year ago

I'm on arch linux

tiero commented 1 year ago

It seems bitcoin core has trouble syncing: can you try nigiri stop --delete && nigiri start again?

loic86 commented 1 year ago

Ok I did restart nigiri as you suggested, at the very beginning of chopsticks logs I get: chopsticks | time="2023-02-10T15:11:20Z" level=info msg="Starting server with configuration:" chain=bitcoin electrs_url="http://electrs:30000" faucet_enabled=true listen_url="0.0.0.0:3000" logger_enabled=true mining_enabled=true rpc_server_url="http://admin1:123@bitcoin:18443" tls_enabled=false chopsticks | time="2023-02-10T15:11:38Z" level=warning msg="Faucet not funded, check the error" error="Timeout reading data from server" status=500 chopsticks | time="2023-02-10T15:11:48Z" level=fatal msg="rescan blockchain" error="could not rescan: Timeout reading data from server" chopsticks | time="2023-02-10T15:11:54Z" level=info msg="Starting server with configuration:" chain=bitcoin electrs_url="http://electrs:30000" faucet_enabled=true listen_url="0.0.0.0:3000" logger_enabled=true mining_enabled=true rpc_server_url="http://admin1:123@bitcoin:18443" tls_enabled=false chopsticks | time="2023-02-10T15:11:55Z" level=fatal msg="rescan blockchain" error="could not rescan: Method rescanblockchain failed with error: Wallet is currently rescanning. Abort existing rescan or wait." chopsticks | time="2023-02-10T15:12:02Z" level=info msg="Starting server with configuration:" chain=bitcoin electrs_url="http://electrs:30000" faucet_enabled=true listen_url="0.0.0.0:3000" logger_enabled=true mining_enabled=true rpc_server_url="http://admin1:123@bitcoin:18443" tls_enabled=false

So, first it gets: chopsticks | time="2023-02-10T15:11:38Z" level=warning msg="Faucet not funded, check the error" error="Timeout reading data from server" status=500 and then start the loops

tiero commented 1 year ago

Does just waiting ie. 5 seconds help? I can't replicate the issue on Mac Apple chip

loic86 commented 1 year ago

I'm trying to manually stop and only start the chopsticks container with: cd ~/.nigiri && docker-compose run chopsticks and I still get the same: INFO[0000] Starting server with configuration: chain=bitcoin electrs_url="http://electrs:30000" faucet_enabled=true listen_url="0.0.0.0:3000" logger_enabled=true mining_enabled=true rpc_server_url="http://admin1:123@bitcoin:18443" tls_enabled=false FATA[0010] rescan blockchain error="could not rescan: Timeout reading data from server"

but if I remove the --use-faucet flag I get chopsticks running correctly (on the left) and then I can also run esplora (on the right) screenshot-2023-02-10-16:52:42

so the issue arise when the faucet is enabled.

tiero commented 1 year ago

oh thank you so much for the debug! Will dive into it over next days

tiero commented 1 year ago

Can you try this latest release and see if it fixes on your side? https://github.com/vulpemventures/nigiri/releases/tag/v0.4.14

loic86 commented 1 year ago

Thank you! I tried but I get the same error on esplora UI and workaround to make chopstick work by commenting out: