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

bug: constantly disconnects from a peer #1965

Closed
weboko opened this issue Apr 18, 2024 · 3 comments
Closed

bug: constantly disconnects from a peer #1965

weboko opened this issue Apr 18, 2024 · 3 comments
Assignees

Comments

@weboko
Copy link
Collaborator

weboko commented Apr 18, 2024

This is a bug report

Problem

Right now js-waku node instance constantly connects and disconnects to a remote peer:
image

As @danisharora099 pointed out - it is most likely due to metadata protocol dropping connection and connection manager trying to re-connect.

We should:

  • improve logging to understand why disconnect happens;
  • investigate why this happens and avoid connecting to peers connection to which will be dropped;

Notes

Version:

  "name": "@waku/sdk",
  "version": "0.0.24",
@weboko weboko added the bug Something isn't working label Apr 18, 2024
@vpavlin
Copy link
Member

vpavlin commented Apr 19, 2024

I am seeting these errors in light-js example which might be related

Peer connected with peer id: 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT
libp2p-DmEl0riZ.js:6360 waku:info:connection-manager Connected to peer 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +363ms
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/metadata/1.0.0 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +1s
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/metadata/1.0.0 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +1ms
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/metadata/1.0.0 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +2ms
index.html:150 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'multiaddr')
    at index.html:150:54
    at Array.map (<anonymous>)
    at updatePeersList (index.html:148:38)
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/metadata/1.0.0 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +767ms
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/store/2.0.0-beta4 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +2s
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/metadata/1.0.0 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +1ms
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/store/2.0.0-beta4 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +1ms
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/metadata/1.0.0 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +2ms
libp2p-DmEl0riZ.js:6360 waku:info:stream-manager:/vac/waku/store/2.0.0-beta4 Preemptively opening a stream to 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +2ms
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/metadata/1.0.0 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +2s
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/metadata/1.0.0 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +1ms
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/metadata/1.0.0 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +0ms
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/store/2.0.0-beta4 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +2s
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/metadata/1.0.0 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +0ms
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/store/2.0.0-beta4 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +0ms
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/metadata/1.0.0 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +0ms
libp2p-DmEl0riZ.js:6360 waku:error:stream-manager:/vac/waku/store/2.0.0-beta4 Failed to prepare a new stream for 16Uiu2HAm2M7xs7cLPc3jamawkEqbr7cUJX11uvY7LxQ6WFUdUKUT +0ms
index.html:160 

@danisharora099
Copy link
Collaborator

danisharora099 commented May 14, 2024

After some work on #1994,
some updates on findings re disconnections:

  • by default, we are currently bootstrapping into the fleet with TWN, while by default on js-waku, we used the DefaultPubsubTopic
  • the js-waku node connects to these nodes, the metadata protocol then hangs up the connection because of shard mismatch

few action items come out of this issue:

cc @vpavlin @weboko

@danisharora099
Copy link
Collaborator

closing this issue in favour of the above issues.

if you think something is missed, please feel free to reopen the issue

cc @vpavlin @weboko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

4 participants