Code Monkey home page Code Monkey logo

Comments (8)

MarnixCroes avatar MarnixCroes commented on August 18, 2024 2

can repro, 2.0.6 RC1 02a6ee2

[32] WARNING	SpecificNodeBlockProvider.ReconnectingLoopAsync (119)	Wasabi could not complete the handshake with the node '127.0.0.1:8333'. Probably Wasabi is not whitelisted by the node.
Use "whitebind" in the node configuration. Typically whitebind=127.0.0.1:8333 if Wasabi and the node are on the same machine and whitelist=1.2.3.4 if they are not.
2024-02-23 11:21:00.028 [57] WARNING	PeriodicRunner.ExecuteAsync (110)	System.Net.Http.HttpRequestException: Failed to handle the HTTP request via Tor.
 ---> WalletWasabi.Tor.Socks5.Exceptions.TorConnectionException: Failed to read/write HTTP(s) request.
 ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
   at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.UpgradeToSslAsync(TcpClient tcpClient, String host, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(String host, Int32 port, Boolean useSsl, INamedCircuit circuit, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.CreateNewConnectionAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.ObtainFreeConnectionAsync(Uri requestUri, ICircuit circuit, CancellationToken token)
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendAsync(HttpRequestMessage request, ICircuit circuit, Int32 maximumRedirects, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendAsync(HttpRequestMessage request, ICircuit circuit, Int32 maximumRedirects, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpMethod method, String relativeUri, HttpContent content, CancellationToken cancellationToken)
   at WalletWasabi.WebClients.Wasabi.WasabiClient.GetVersionsAsync(CancellationToken cancel)
   at WalletWasabi.WebClients.Wasabi.WasabiClient.CheckUpdatesAsync(CancellationToken cancel)
   at WalletWasabi.Services.UpdateChecker.ActionAsync(CancellationToken cancel)
   at WalletWasabi.Bases.PeriodicRunner.ExecuteAsync(CancellationToken stoppingToken)

from walletwasabi.

nopara73 avatar nopara73 commented on August 18, 2024 1

Wasabi connects to the local full node by default. That's a feature, not a bug. However, the warnings should not be happening.

from walletwasabi.

turbolay avatar turbolay commented on August 18, 2024 1

This should not be debug level, and it should not be hidden either. It's definitely a problem.
It means that there is a local node, we managed to connect to it, but not to handshake.
So we are not connected to the node.

So the problem is to log several times in a row I suppose. What we can do is to add a bool so we only log once, that way:

diff --git a/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs b/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs
index 7ebaa1c78..85f99f844 100644
--- a/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs
+++ b/WalletWasabi/Wallets/SpecificNodeBlockProvider.cs
@@ -86,6 +86,8 @@ public class SpecificNodeBlockProvider : IBlockProvider, IAsyncDisposable
                CancellationToken shutdownToken = LoopCts.Token;
                TimeSpan reconnectDelay = MinReconnectDelay;
 
+               var shouldLogHandShakeWarning = true;
+
                while (!shutdownToken.IsCancellationRequested)
                {
                        using CancellationTokenSource connectCts = new(TimeSpan.FromSeconds(10));
@@ -97,6 +99,8 @@ public class SpecificNodeBlockProvider : IBlockProvider, IAsyncDisposable
                        {
                                using ConnectedNode connectedNode = await ConnectAsync(linkedCts.Token).ConfigureAwait(false);
 
+                               shouldLogHandShakeWarning = true;
+
                                // Reset reconnect delay as we actually connected the local node.
                                reconnectDelay = MinReconnectDelay;
                                _specificBitcoinCoreNode = connectedNode;
@@ -117,7 +121,11 @@ public class SpecificNodeBlockProvider : IBlockProvider, IAsyncDisposable
                                                Use "whitebind" in the node configuration. Typically whitebind=127.0.0.1:8333 if Wasabi and the node are on the same machine and whitelist=1.2.3.4 if they are not.
                                                """;
 
-                                       Logger.LogWarning(message);
+                                       if (shouldLogHandShakeWarning)
+                                       {
+                                               Logger.LogWarning(message);
+                                               shouldLogHandShakeWarning = false;
+                                       }
                                }
 
                                if (!shutdownToken.IsCancellationRequested)

from walletwasabi.

molnard avatar molnard commented on August 18, 2024

Yes, the warning message should be DEBUG level - but only in case of the intention was not to use full node otherwise it should be a warning.

from walletwasabi.

turbolay avatar turbolay commented on August 18, 2024

Can anyone repro this? I didn't see this issue happening on my side for a long time.

from walletwasabi.

Szpoti avatar Szpoti commented on August 18, 2024

Haven't been able to reproduce since.

from walletwasabi.

molnard avatar molnard commented on August 18, 2024

Can you still repro this Rafe?

from walletwasabi.

BTCparadigm avatar BTCparadigm commented on August 18, 2024

@molnard yes, I saw this again few days ago while running master.

from walletwasabi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.