Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
loic86 opened this issue Feb 10, 2023 · 10 comments
Open

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

loic86 opened this issue Feb 10, 2023 · 10 comments

Comments

@loic86
Copy link

loic86 commented Feb 10, 2023

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

  • The blockchain is initialized with 101 blocks.
  • The electrs works if I do: curl http://localhost:30000/blocks/tip/height I get 101.
  • The chopstics fail to start and I get these logs:
    chopsticks | time="2023-02-10T14:44:23Z" 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-10T14:44:23Z" 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-10T14:44:29Z" 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

Then, of course also esplora is not working

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

Instead all the liquid containers run correctly.

@loic86
Copy link
Author

loic86 commented Feb 10, 2023

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

Thanks in advance for your time!

@tiero
Copy link
Member

tiero commented Feb 10, 2023

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

@loic86
Copy link
Author

loic86 commented Feb 10, 2023

I'm on arch linux

@tiero
Copy link
Member

tiero commented Feb 10, 2023

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

@loic86
Copy link
Author

loic86 commented Feb 10, 2023

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
Copy link
Member

tiero commented Feb 10, 2023

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

@loic86
Copy link
Author

loic86 commented Feb 10, 2023

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.

@loic86 loic86 changed the title Chopstick fail to connect to Electrs Chopstick fail to connect to Electrs when faucet is enabled Feb 10, 2023
@tiero
Copy link
Member

tiero commented Feb 10, 2023

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

@tiero
Copy link
Member

tiero commented Feb 10, 2023

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
Copy link
Author

loic86 commented Feb 13, 2023

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

  • --use-faucet
    If I try to run the chopstick with: docker compose up chopsticks I get:
    Attaching to chopsticks
    chopsticks | time="2023-02-13T08:49:37Z" 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-13T08:49:47Z" level=fatal msg="rescan blockchain" error="could not rescan: Timeout reading data from server"
    chopsticks exited with code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants