Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeerDiscoveryException occurs when a new swarm is created. #3982

Open
s2quake opened this issue Nov 12, 2024 · 0 comments
Open

PeerDiscoveryException occurs when a new swarm is created. #3982

s2quake opened this issue Nov 12, 2024 · 0 comments
Assignees

Comments

@s2quake
Copy link
Contributor

s2quake commented Nov 12, 2024

When a new swarm is created in SwarmOptions and the same BoundPeer is set in StaticPeers and BootstrapOptions.SeedPeers, the following exception is thrown

Libplanet.Net.Protocols.PeerDiscoveryException: All seeds are unreachable.
   at Libplanet.Net.Protocols.KademliaProtocol.BootstrapAsync(IEnumerable`1 bootstrapPeers, Nullable`1 dialTimeout, Int32 depth, CancellationToken cancellationToken)
   at Libplanet.Net.Swarm.BootstrapAsync(IEnumerable`1 seedPeers, Nullable`1 dialTimeout, Int32 searchDepth, CancellationToken cancellationToken)
   at Libplanet.Net.Swarm.BootstrapAsync(CancellationToken cancellationToken)

If only StaticPeers is set, the following exception is thrown.

Libplanet.Net.Protocols.PeerDiscoveryException: No seeds are provided.  If it is intended you should conditionally invoke BootstrapAsync() only when there are seed peers.
   at Libplanet.Net.Protocols.KademliaProtocol.BootstrapAsync(IEnumerable`1 bootstrapPeers, Nullable`1 dialTimeout, Int32 depth, CancellationToken cancellationToken)
   at Libplanet.Net.Swarm.BootstrapAsync(IEnumerable`1 seedPeers, Nullable`1 dialTimeout, Int32 searchDepth, CancellationToken cancellationToken)
   at Libplanet.Net.Swarm.BootstrapAsync(CancellationToken cancellationToken)

However, if only BootstrapOptions.SeedPeers is set, the problem does not occur.

@s2quake s2quake assigned s2quake and limebell and unassigned s2quake Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants