sparrow icon indicating copy to clipboard operation
sparrow copied to clipboard

Wallet doesn't want to start syncing unless it's being rebooted.

Open Transisto opened this issue 3 years ago • 9 comments

image

It never end up connecting to blockstream or any server when I toggle connection on and off.

2022-10-23 02:16:26,159 ERROR [ElectrumServerReadThread] c.s.s.n.TcpTransport [null:-1] Error opening socket inputstream java.net.SocketException: Socket is closed

That error looks very familiar, sorry if I already reported.

Transisto avatar Oct 23 '22 06:10 Transisto

Same thing keeps happening after a few days, even with a wallet that is only about 100 address deep.

Can't find any sign of actually trying to connect image

2022-10-29 19:46:11,652 ERROR [stop-whirlpoolClient] c.s.w.c.w.WhirlpoolWallet [null:-1] com.samourai.wallet.api.backend.beans.HttpException: java.util.concurrent.ExecutionException: java.net.UnknownHostException: pool.whirl.mx 2022-10-31 07:58:36,115 ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-10452] c.s.w.c.m.d.MixSession[1667215817597] [null:-1] ! connexion lost, reconnecting for a new mix... 2022-10-31 07:58:36,117 ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-10285] c.s.w.c.m.d.MixSession[1667216987608] [null:-1] ! connexion lost, reconnecting for a new mix... 2022-10-31 09:24:36,197 ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-10943] c.s.w.c.m.d.MixSession[1667221151797] [null:-1] ! connexion lost, reconnecting for a new mix... 2022-10-31 09:24:36,198 ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-10945] c.s.w.c.m.d.MixSession[1667221151798] [null:-1] ! connexion lost, reconnecting for a new mix... 2022-10-31 13:17:40,778 ERROR [ElectrumServerReadThread] c.s.s.n.TcpTransport [null:-1] Error opening socket inputstream java.net.SocketException: Socket is closed at java.base/sun.security.ssl.SSLSocketImpl.getInputStream(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.readInputLoop(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$ReadRunnable.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-10-31 13:17:40,785 ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-11488] c.s.w.c.m.d.MixSession[1667233572007] [null:-1] ! connexion lost, reconnecting for a new mix... 2022-10-31 13:17:40,786 ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-11489] c.s.w.c.m.d.MixSession[1667233572011] [null:-1] ! connexion lost, reconnecting for a new mix... 2022-11-01 18:08:50,524 ERROR [ElectrumServerReadThread] c.s.s.n.TcpTransport [null:-1] Error opening socket inputstream java.net.SocketException: Socket is closed at java.base/sun.security.ssl.SSLSocketImpl.getInputStream(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.readInputLoop(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$ReadRunnable.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-11-01 18:08:50,527 WARN [JavaFX Application Thread] c.s.s.t.TransactionController [null:-1] Failed to retrieve all referenced input transactions, aborting transaction fetch 2022-11-01 18:08:50,530 WARN [JavaFX Application Thread] c.s.s.t.TransactionController [null:-1] Failed to retrieve all referenced input transactions, aborting transaction fetch 2022-11-01 18:08:50,530 WARN [JavaFX Application Thread] c.s.s.t.TransactionController [null:-1] Failed to retrieve all referenced input transactions, aborting transaction fetch 2022-11-01 18:08:56,109 ERROR [JavaFX Application Thread] c.s.s.t.HeadersController [null:-1] Error broadcasting transaction com.sparrowwallet.sparrow.net.ServerException: Retries exhausted at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer.broadcastTransaction(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer.broadcastTransactionPrivately(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$BroadcastTransactionService$1.call(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$BroadcastTransactionService$1.call(Unknown Source) at javafx.graphics@18/javafx.concurrent.Task$TaskCallable.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics@18/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: com.sparrowwallet.sparrow.net.ElectrumServerRpcException: Retries exhausted at [email protected]/com.sparrowwallet.sparrow.net.SimpleElectrumServerRpc.broadcastTransaction(Unknown Source) ... 12 common frames omitted Caused by: com.sparrowwallet.sparrow.net.ServerException: Retries exhausted at [email protected]/com.sparrowwallet.sparrow.net.RetryLogic.getResult(Unknown Source) ... 13 common frames omitted Caused by: java.lang.IllegalStateException: I/O error during a request processing at [email protected]/com.github.arteam.simplejsonrpc.client.builder.RequestBuilder.executeRequest(Unknown Source) at [email protected]/com.github.arteam.simplejsonrpc.client.builder.RequestBuilder.executeAndConvert(Unknown Source) at [email protected]/com.github.arteam.simplejsonrpc.client.builder.RequestBuilder.execute(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.SimpleElectrumServerRpc.lambda$broadcastTransaction$15(Unknown Source) ... 14 common frames omitted Caused by: java.net.SocketException: Socket is closed at java.base/sun.security.ssl.SSLSocketImpl.getOutputStream(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.writeRequest(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.pass(Unknown Source) ... 18 common frames omitted 2022-11-01 18:12:05,144 ERROR [ElectrumServerReadThread] c.s.s.n.TcpTransport [null:-1] Error opening socket inputstream java.net.SocketException: Socket is closed at java.base/sun.security.ssl.SSLSocketImpl.getInputStream(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.readInputLoop(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$ReadRunnable.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-11-01 18:12:18,786 ERROR [ElectrumServerReadThread] c.s.s.n.TcpTransport [null:-1] Error opening socket inputstream java.net.SocketException: Socket is closed at java.base/sun.security.ssl.SSLSocketImpl.getInputStream(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.readInputLoop(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$ReadRunnable.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) 2022-11-01 18:12:19,391 ERROR [ElectrumServerReadThread] c.s.s.n.TcpTransport [null:-1] Error opening socket inputstream java.net.SocketException: Socket is closed at java.base/sun.security.ssl.SSLSocketImpl.getInputStream(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.TcpTransport.readInputLoop(Unknown Source) at [email protected]/com.sparrowwallet.sparrow.net.ElectrumServer$ReadRunnable.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

Log show it has not tried reconnecting on it's own for about 24h, Above are the logs when trying to toggle it to reconnect manually.

Transisto avatar Nov 01 '22 22:11 Transisto

I can't reproduce this, but I have made changes in 0260a126 that ensure connecting sockets are closed. My theory is that the server may be blocking multiple connection attempts from the same client. Shutting down Sparrow would have had the effect of closing any connecting sockets, so Sparrow now does this automatically when a new connection is attempted.

craigraw avatar Nov 16 '22 06:11 craigraw

When in that slow stuck state, closing the wallet normally doesn't work, After 20min it's still using a CPU core in the background with no windows.

Transisto avatar Dec 12 '22 16:12 Transisto

Do you test/experience this on any platform other than Windows?

craigraw avatar Dec 13 '22 06:12 craigraw

@craigraw I started using it on a M1 OSX once again, I'll report more comprehsively once I have more data.

So far seems like the wallet went into a state of UI non-responsiveness for 4-5 minutes, Didn't acheive any CJ while registered to 3 pool in 12h Will report back. Thank you

Transisto avatar Dec 21 '22 19:12 Transisto

Same thing on OSX M1, a wallet with a lot of remixes can't after about ~2 days.

Transisto avatar Dec 25 '22 00:12 Transisto

I'm also experiencing this on a RPI4 Raspibolt build on Sparrow Server 1.7.7 (downgraded from 1.7.8) for now. I see 10 timeouts in the log and then it sits idle and disconnected.

Let me know if there is any specific information I can provide.

Edit: using Sparrow SERVER

s373nZ avatar Aug 08 '23 15:08 s373nZ

@s373nZ Are you connecting to a local or remote server? If it's local there should be no reason for timeouts in the first place, and it suggests there is something problematic with the server. Try restarting it.

craigraw avatar Aug 09 '23 09:08 craigraw

I connect to my local fulcrum and no more do I end up with sparrow idling disconnected.

On Wed, Aug 9, 2023 at 5:38 AM craigraw @.***> wrote:

@s373nZ https://github.com/s373nZ Are you connecting to a local or remote server? If it's local there should be no reason for timeouts in the first place, and it suggests there is something problematic with the server. Try restarting it.

— Reply to this email directly, view it on GitHub https://github.com/sparrowwallet/sparrow/issues/716#issuecomment-1670998971, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC643EIZIYGGSGDZ4LZUM3XUNLDFANCNFSM6AAAAAARME524U . You are receiving this because you authored the thread.Message ID: @.***>

Transisto avatar Aug 09 '23 23:08 Transisto