Problems Connecting Sparrow to Electrs (been working for 2 years)

It’s been a few weeks, but I opened up Sparrow today to find that it won’t connect to my Umbrel node (that’s local on the same network).

I logged onto my Umbrel and restarted it. The Bitcoin Node wasn’t fully synced… so I waited and it eventually synced up to 100%.

When I opened Electris I got “Waiting for Bitcoin Node to finish Syncing…” for a bit:

Eventually I got a loading bar and it took the whole day and night to get to 100% (was 100% when I woke up this AM).

Sparrow still won’t connect… I refreshed the Electrs and it’s back to “Waiting for Bitcoin Node to finish Syncing…”

I’ve changed nothing on the Sparrow config:

Anyone have any ideas?

edit: I’ve also uninstalled and reinstalled Electrs

I’ve been having this problem for a couple of months after Electrs/Sparrow working fine for a month or so before that. Running Umbrel on their Umbrel Home device. Cannot seem to solve it. Very frustrating. About to just get a whole new setup to run a node since Umbrel seems pretty useless without an electrum server

1 Like

Welllll patience may be the answer… I just left i all alone for a few hours came back and the connection tested good:

1 Like

Great to hear @AVGjoe

In terms of your persistent issue @therewillbeFUD, can you please SSH into your Umbrel and run the following command (if this is still an issue): ~/umbrel/scripts/app compose electrs logs --tail 250
You can share the output here, and then we can try isolate the problem.

I get the following error when trying to run that command

Interesting- that is a strange error to get given electrs is running. It may be that electrs had a problematic start-up, or there is a docker issue.

In that case, could you please try the following first

sudo ~/umbrel/scripts/app restart bitcoin

after this script completes, again try

sudo ~/umbrel/scripts/app compose electrs logs --tail 250

Thank you for taking the time to help me with this by the way. The bitcoin app restart command solved that errror. Here is a pastebin of the electrs logs - it’s very long

Ok I would take the same approach for the electrs app too- it appears it got stuck at block height 812441

sudo ~/umbrel/scripts/app restart electrs

Hopefully this will resolve the issue- it may take electrs 24hrs to resync after this

Thank you, this worked! And I think I’ve discovered the problem - I set up Umbrel through my desktop PC and I had been trying to also access it through a laptop, which is on the same wifi network as the desktop and the node. For some reason every time I try to access Umbrel through the laptop, it disrupts electrs. It’s not critical to fix this - I can just use the desktop - but that’s what was causing electrs to get stuck.

Hmmm interesting, I will raise this with the team as that’s a weird issue to encounter.
Did you discover this problem by noticing it only dropped out when you used your laptop, or is there something else that highlighted this?

Actually this is not the problem. Restarting electrs with the command you gave me worked very briefly but now electrs is stuck again and restarting it didn’t work this time, even on the desktop. I will retrieve the logs again.

I am trying to access Umbrel with Sparrow wallet, not sure if that’s relevant

Ah nice, the logs are giving a clear error now at least.

electrs_1 | [2023-10-19T12:33:10.368Z WARN electrs::server] 1: failed to shutdown TCP connection Transport endpoint is not connected (os error 107)
electrs_1 | [2023-10-19T12:35:41.624Z ERROR electrs::server] 2: disconnecting due to failed to send response: “[{"id":504,"jsonrpc":"2.0","result":"9d1e8c77fc36c3023dbe2e6ec4871a520468edeb1742493cdeee78b0827ec6bc"},{"id":505,"jsonrpc":"2.0","result":"2d90c16c6becd0adc5f3bbf201c3f66881dee0d6c3a5543877e3d4596999ca6e"},{"id":506,"jsonrpc":"2.0","result":"381395d02925b3280060a2b4a60bffa03f10616e4433764f471a8c69938c442c"},{"id":507,"jsonrpc":"2.0","result":"237a8380a7a9c9aa98a228051c376e1161a1dd8c9e03469978232032ebf92102"},{"id":508,"jsonrpc":"2.0","result":"237a8380a7a9c9aa98a228051c376e1161a1dd8c9e03469978232032ebf92102"},{"id":509,"jsonrpc":"2.0","result":"a3260c890f0b7883a3d0260b8eb9b1c9972489965fcb032e0549d6aac67e58f5"},{"id":510,"jsonrpc":"2.0","result":"b2cf494cc98c0bd31dacffc3f157457b3c5778d58d24eacde7a8569168090dc9"},{"id":511,"jsonrpc":"2.0","result":"5b702df50773a8dd8b61de88b8265ca9f6d1e112007e452a007819e70e404708"},{"id":512,"jsonrpc":"2.0","result":"69404b30be27c3fa3eca101c0fa68970139c9364db90378c772ec0f98e350b6c"},{"id":513,"jsonrpc":"2.0","result":"2763cd9ed2fd777bd1c12adc274bae00f774c37dca323a11c6c4d0a283b16641"},{"id":514,"jsonrpc":"2.0","result":"a1088896a1f659ea8c90f9f199ca1805bdb21f46a701b8acd1ec6f4f7d8e370e"},{"id":515,"jsonrpc":"2.0","result":"2763cd9ed2fd777bd1c12adc274bae00f774c37dca323a11c6c4d0a283b16641"},{"id":516,"jsonrpc":"2.0","result":"6420e8d84c5b0a106540636a8d02f2cb60f4f3b9d7586570804d20ca1a9f8296"},{"id":517,"jsonrpc":"2.0","result":"2de8ff2b1e580424461e6047b91a4d5cf481ac53eadd0397938cd7d947f0f859"},{"id":518,"jsonrpc":"2.0","result":"b3e1c26ccd424356d769a0acec4bc750e4bdbffde435145af8b5f6857c2827ce"},{"id":519,"jsonrpc":"2.0","result":null},{"id":520,"jsonrpc":"2.0","result":null},{"id":521,"jsonrpc":"2.0","result":null},{"id":522,"jsonrpc":"2.0","result":null},{"id":523,"jsonrpc":"2.0","result":null},{"id":524,"jsonrpc":"2.0","result":null},{"id":525,"jsonrpc":"2.0","result":null},{"id":526,"jsonrpc":"2.0","result":null},{"id":527,"jsonrpc":"2.0","result":null},{"id":528,"jsonrpc":"2.0","result":null},{"id":529,"jsonrpc":"2.0","result":null},{"id":530,"jsonrpc":"2.0","result":null},{"id":531,"jsonrpc":"2.0","result":null},{"id":532,"jsonrpc":"2.0","result":null},{"id":533,"jsonrpc":"2.0","result":null},{"id":534,"jsonrpc":"2.0","result":null},{"id":535,"jsonrpc":"2.0","result":null},{"id":536,"jsonrpc":"2.0","result":null},{"id":537,"jsonrpc":"2.0","result":null},{"id":538,"jsonrpc":"2.0","result":null},{"id":539,"jsonrpc":"2.0","result":null},{"id":540,"jsonrpc":"2.0","result":null},{"id":541,"jsonrpc":"2.0","result":null},{"id":542,"jsonrpc":"2.0","result":null}]\n”
electrs_1 | [2023-10-19T12:35:41.624Z WARN electrs::server] 2: failed to shutdown TCP connection Transport endpoint is not connected (os error 107)
electrs_1 | [2023-10-19T12:35:41.629Z INFO electrs::index] indexing 1 blocks: [812915…812915]
electrs_1 | [2023-10-19T12:35:41.692Z INFO electrs::chain] chain updated: tip=0000000000000000000148c918cdc160e41f7306cc8d5ceac8188ad24a413cbc, height=812915

Although this issue appears to be on the Electrs side- I believe rebuilding bitcoin’s peer connections may help to ‘remount’ electrs. Hopefully this can resolve the issue.

Then stop Bitcoin:

~/umbrel/scripts/app stop bitcoin

Then you can delete the peers.dat file:

rm /home/umbrel/umbrel/app-data/bitcoin/data/bitcoin/peers.dat

(If the above command works it just sends you to the new line, sometimes this is confusing but that means it was successful otherwise if you run it again you’ll see it now displays “No such file or directory”)

Then start Bitcoin again:

~/umbrel/scripts/app start bitcoin

I would also restart Umbrel after this. If this does not work I will raise it further with the dev team to take a look at- thanks for your patience thus far.

Thank you again for this. Trying what you suggested but I’m getting this error when I try to stop the bitcoin app (I tried restarting it then stopping it but same error)

Any suggestions?

did you figure out a solution?

Electrs put out an update a month or so ago it seems and since then it’s been working great. Thanks for the followup

I have been bedeviled by this issue. I cannot connect to Electrs after getting a new raspberry Pi and syncing the Bitcoin node. I do not know what else to do

Oh I thought you were Umbrel support lol. I didn’t do anything other than update Electrs. Now it works great.