sparrow
sparrow copied to clipboard
[Feature] Provide automatic wiping of sparrow.log
Description
Sparrow provides logging output via the sparrow.log file. The output can be a bit verbose though as the call stacks are quite "line heavy".
This can amount to big log files, e.g. I have a file that was created roughly 1.5 months ago and already contains almost 200.000 lines and is 21MB in size.
Solution
Provide a setting which enables to specify a time after which the log file is wiped.
That's surprising large. Ideally the log file should not grow this fast under normal circumstances. Can you determine if there is a lot of repetition, and if so of what kind of errors?
The following errors are the more common ones. Do note, my Sparrow often gets disconnected from fulcrum (connected via Tor) which I never tried to resolve since most of the time toggling network connection off and on "solves" it.
<DATE> ERROR [Whirlpool-HttpClient-COORDINATOR_WEBSOCKET-88] o.s.w.s.s.c.DefaultTransportRequest [null:-1] TransportRequest[url=http://<ONION.onion>/ws/connect/#/#/xhr_streaming] failed. Falling back on next transport.
org.springframework.web.client.HttpServerErrorException: 404 Unexpected XHR receive status
at [email protected]/org.springframework.web.socket.sockjs.client.JettyXhrTransport$SockJsResponseListener.onBegin(Unknown Source)
at [email protected]/org.eclipse.jetty.client.ResponseNotifier.notifyBegin(Unknown Source)
at [email protected]/org.eclipse.jetty.client.ResponseNotifier.notifyBegin(Unknown Source)
at [email protected]/org.eclipse.jetty.client.HttpReceiver.responseBegin(Unknown Source)
at [email protected]/org.eclipse.jetty.client.http.HttpReceiverOverHTTP.startResponse(Unknown Source)
at [email protected]/org.eclipse.jetty.http.HttpParser.parseLine(Unknown Source)
at [email protected]/org.eclipse.jetty.http.HttpParser.parseNext(Unknown Source)
at [email protected]/org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(Unknown Source)
at [email protected]/org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(Unknown Source)
at [email protected]/org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(Unknown Source)
at [email protected]/org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(Unknown Source)
at [email protected]/org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(Unknown Source)
at [email protected]/org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Unknown Source)
at [email protected]/org.eclipse.jetty.io.FillInterest.fillable(Unknown Source)
at [email protected]/org.eclipse.jetty.io.ChannelEndPoint$2.run(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
<DATE> WARN [] c.s.w.c.w.d.p.ExpirablePoolSupplier [null:-1] load() failure => last value fallback
com.samourai.wallet.api.backend.beans.HttpException: java.util.concurrent.TimeoutException: Total timeout 30000 ms elapsed
at [email protected]/com.samourai.http.client.JacksonHttpClient.getJson(Unknown Source)
at [email protected]/com.samourai.http.client.JacksonHttpClient.getJson(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.whirlpool.ServerApi.fetchPools(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.wallet.data.pool.ExpirablePoolSupplier.fetch(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.wallet.data.pool.ExpirablePoolSupplier.fetch(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.wallet.data.supplier.ExpirableSupplier$1.getOrThrow(Unknown Source)
at [email protected]/com.zeroleak.throwingsupplier.ThrowingSupplier.get(Unknown Source)
at [email protected]/com.zeroleak.throwingsupplier.ThrowingSupplier.get(Unknown Source)
at [email protected]/com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.wallet.data.supplier.ExpirableSupplier.load(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.wallet.data.dataSource.WalletResponseDataSource.load(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.wallet.data.dataSource.WalletResponseDataSource$2.runOrchestrator(Unknown Source)
at [email protected]/com.samourai.wallet.util.AbstractOrchestrator$1.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.TimeoutException: Total timeout 30000 ms elapsed
at [email protected]/org.eclipse.jetty.client.HttpDestination$TimeoutTask.onTimeoutExpired(Unknown Source)
at [email protected]/org.eclipse.jetty.io.CyclicTimeout$Wakeup.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 common frames omitted
- (I'd say at least 75% of log entries)
<DATE> ERROR [mixSession-reconnect-1663851994623] o.s.w.s.s.c.SockJsClient [null:-1] Initial SockJS "Info" request to server failed, url=ws://<ONION>/ws/connect
org.springframework.web.socket.sockjs.SockJsTransportFailureException: Failed to execute request to http://<ONION>/ws/connect/info; nested exception is java.util.concurrent.ExecutionException: java.io.IOException: SOCKS4 tunnel failed with code 91
at [email protected]/org.springframework.web.socket.sockjs.client.JettyXhrTransport.executeRequest(Unknown Source)
at [email protected]/org.springframework.web.socket.sockjs.client.JettyXhrTransport.executeInfoRequestInternal(Unknown Source)
at [email protected]/org.springframework.web.socket.sockjs.client.AbstractXhrTransport.executeInfoRequest(Unknown Source)
at [email protected]/org.springframework.web.socket.sockjs.client.SockJsClient.getServerInfo(Unknown Source)
at [email protected]/org.springframework.web.socket.sockjs.client.SockJsClient.doHandshake(Unknown Source)
at [email protected]/org.springframework.web.socket.messaging.WebSocketStompClient.connect(Unknown Source)
at [email protected]/org.springframework.web.socket.messaging.WebSocketStompClient.connect(Unknown Source)
at [email protected]/com.sparrowwallet.nightjar.stomp.JavaStompClient.connect(Unknown Source)
at [email protected]/com.samourai.stomp.client.StompTransport.connect(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.mix.dialog.MixSession.connect(Unknown Source)
at [email protected]/com.samourai.whirlpool.client.mix.dialog.MixSession$3$1.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: SOCKS4 tunnel failed with code 91
at [email protected]/org.eclipse.jetty.client.util.FutureResponseListener.getResult(Unknown Source)
at [email protected]/org.eclipse.jetty.client.util.FutureResponseListener.get(Unknown Source)
at [email protected]/org.eclipse.jetty.client.HttpRequest.send(Unknown Source)
... 12 common frames omitted
Caused by: java.io.IOException: SOCKS4 tunnel failed with code 91
at [email protected]/org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection.onSocks4Response(Unknown Source)
at [email protected]/org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection.access$300(Unknown Source)
at [email protected]/org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection$Socks4Parser.parse(Unknown Source)
at [email protected]/org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection$Socks4Parser.access$200(Unknown Source)
at [email protected]/org.eclipse.jetty.client.Socks4Proxy$Socks4ProxyConnection.onFillable(Unknown Source)
at [email protected]/org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Unknown Source)
at [email protected]/org.eclipse.jetty.io.FillInterest.fillable(Unknown Source)
at [email protected]/org.eclipse.jetty.io.ChannelEndPoint$2.run(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Unknown Source)
at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(Unknown Source)
... 1 common frames omitted
All of these are coming from the Whirlpool client, and as you note most likely Tor related. I'd be considering using a VPN instead of Tor at this point, although I know the privacy is not exactly the same.
That said I'm considering suppressing exception logging for the third example you provided, which should reduce the problem dramatically.
1 & 3 (of the examples provided above) have been suppressed in 6ad81e12. Hopefully this greatly reduces the Whirlpool connection logging output, so I'm going to close this issue off for now.