zenprotocol / zen-wallet

Node and GUI for the Zen Protocol.
https://www.zenprotocol.com
Other
35 stars 13 forks source link

Discovery error with peer: NBitcoin.Protocol.NetworkAddress OperationCanceledException: The operation was canceled #2

Open gsdean opened 6 years ago

gsdean commented 6 years ago

following the instructions for OSX (https://www.zenprotocol.com/alpha).

Full Stack: Network(E) Discovery error with peer: NBitcoin.Protocol.NetworkAddress OperationCanceledException: The operation was canceled. at System.Collections.Concurrent.BlockingCollection1[T].TryTakeWithNoTimeValidation (T& item, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken, System.Threading.CancellationTokenSource combinedTokenSource) [0x0008e] in <5afdc70d980c4033b3878286f754d091>:0 at System.Collections.Concurrent.BlockingCollection1[T].TryTake (T& item, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00006] in <5afdc70d980c4033b3878286f754d091>:0 at System.Collections.Concurrent.BlockingCollection1[T].Take (System.Threading.CancellationToken cancellationToken) [0x00000] in <5afdc70d980c4033b3878286f754d091>:0 at NBitcoin.Protocol.PollMessageListener1[T].ReceiveMessage (System.Threading.CancellationToken cancellationToken) [0x00006] in :0 at NBitcoin.Protocol.NodeListener.ReceivePayload[TPayload] (System.Threading.CancellationToken cancellationToken) [0x000d1] in :0 at NBitcoin.Protocol.Node.VersionHandshake (NBitcoin.Protocol.NodeRequirement requirements, System.Threading.CancellationToken cancellationToken) [0x00044] in :0 at NBitcoin.Protocol.Node.VersionHandshake (System.Threading.CancellationToken cancellationToken) [0x00000] in :0 at NBitcoin.Protocol.AddressManager+<>c__DisplayClass70_0.b__1 (NBitcoin.Protocol.NetworkAddress p) [0x00086] in :0

topynate commented 6 years ago

Thanks. We're overhauling the network code, which should fix this bug. We've restarted the seed peers so you should be able to connect in the mean time.

Douvi commented 6 years ago

got the same issue here

Douvi commented 6 years ago

The app started back to connect

pw96pw96pw96 commented 6 years ago

got the same issue here

kaitoukidd commented 6 years ago

here is the same error

pw96pw96pw96 commented 6 years ago

The app could connect to peer now, though it still generated an error msg beforehand: Network(E) Error while OnMessageReceived event raised SocketException: Operation not supported at System.Net.IPAddress.get_Address () [0x00014] in :0 at NBitcoin.Protocol.AddressManager.ContainsAddress (System.Net.IPAddress address) [0x0001a] in :0 at NBitcoin.Protocol.AddressManager.Add (System.Collections.Generic.IEnumerable1[T] vAddr, System.Net.IPAddress source, System.TimeSpan nTimePenalty) [0x00037] in <bb37feab734942c999a26765ef4da255>:0 at NBitcoin.Protocol.AddressManager.Add (System.Collections.Generic.IEnumerable1[T] vAddr, System.Net.IPAddress source) [0x00011] in :0 at NBitcoin.Protocol.Behaviors.AddressManagerBehavior+<>cDisplayClass16_0.b2 (NBitcoin.Protocol.AddrPayload addr) [0x00081] in :0 at NBitcoin.Protocol.Message.IfPayloadIs[T] (System.Action`1[T] action) [0x00019] in :0 at NBitcoin.Protocol.Behaviors.AddressManagerBehavior.AttachedNode_MessageReceived (NBitcoin.Protocol.Node node, NBitcoin.Protocol.IncomingMessage message) [0x0003b] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <4fdc5ed61a074cafb49fa42deb20d521>:0 I guess it might just be timing issue: the depended service didn't start the first time, then it started, and thus connection is ok...

Douvi commented 6 years ago
Network Information: 0 : Disconnection request 
Network Information: 0 : State changed from Connected to Disconnecting
Network Information: 0 : Need 1 more peers
Network Information: 0 : Stop sending
Network Information: 0 : State changed from Disconnecting to Offline
Network Information: 0 : Stop listening
Network Information: 0 : Remaining peer to get : 1
Network Information: 0 : State changed from Offline to Connected
Network Information: 0 : Outbound connection successfull
Network Information: 0 : Listening
Network Error: 0 : Discovery error with peer: NBitcoin.Protocol.NetworkAddress OperationCanceledException: The operation was canceled.  at System.Collections.Concurrent.BlockingCollection`1[T].TryTakeWithNoTimeValidation (T& item, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken, System.Threading.CancellationTokenSource combinedTokenSource) [0x0008e] in <5afdc70d980c4033b3878286f754d091>:0 
  at System.Collections.Concurrent.BlockingCollection`1[T].TryTake (T& item, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00006] in <5afdc70d980c4033b3878286f754d091>:0 
  at System.Collections.Concurrent.BlockingCollection`1[T].Take (System.Threading.CancellationToken cancellationToken) [0x00000] in <5afdc70d980c4033b3878286f754d091>:0 
  at NBitcoin.Protocol.PollMessageListener`1[T].ReceiveMessage (System.Threading.CancellationToken cancellationToken) [0x00006] in <c79239f051444075b68b7920aba1b848>:0 
  at NBitcoin.Protocol.NodeListener.ReceivePayload[TPayload] (System.Threading.CancellationToken cancellationToken) [0x000d1] in <c79239f051444075b68b7920aba1b848>:0 
  at NBitcoin.Protocol.Node.VersionHandshake (NBitcoin.Protocol.NodeRequirement requirements, System.Threading.CancellationToken cancellationToken) [0x00044] in <c79239f051444075b68b7920aba1b848>:0 
  at NBitcoin.Protocol.Node.VersionHandshake (System.Threading.CancellationToken cancellationToken) [0x00000] in <c79239f051444075b68b7920aba1b848>:0 
  at NBitcoin.Protocol.AddressManager+<>c__DisplayClass70_0.<DiscoverPeers>b__1 (NBitcoin.Protocol.NetworkAddress p) [0x00086] in <c79239f051444075b68b7920aba1b848>:0 

I notify when you open the app it's allwayse fail to get the connection. But after a time X it will successed connect

UrbanSharon commented 6 years ago

@pw96pw96pw96 - new binaries are available for download which should fix the issue you encountered

UrbanSharon commented 6 years ago

@Douvi this is not actually a bug or an error, it's just that the trace shouldn't be printing that. it's printed when a connection cant be established with a peer that's listed in the node's address list

pw96pw96pw96 commented 6 years ago

@UrbanSharon - It will be helpful if instructions on how to build and run from source could be given. Anyway, thank you for fixing the issue.

pw96pw96pw96 commented 6 years ago

@UrbanSharon I sent some Zen via the faucet into address 14eh93uk/Nfogl/NiyHVpwzxCXPz6Z8kv/CRMFVzaCr0=. But when I opened the wallet/portfolio, it says "Discovering peers: 0%" See screenshot. My node started via mono zen.exe -m is running fine. screen shot 2017-11-20 at 3 42 22 pm

pw96pw96pw96 commented 6 years ago

@UrbanSharon After leaving the wallet open for a long time, it can show the balance now. I guess it was because the wallet was downloading all the blocks. Issue resolved. Thx.