Coder Social home page Coder Social logo

Comments (2)

marcus-pousette avatar marcus-pousette commented on July 18, 2024

This is what I get when I am starting up the node after closing

2024-01-25T23:54:38.968Z libp2p:transports creating listener for @libp2p/tcp on /ip4/127.0.0.1/tcp/0
2024-01-25T23:54:38.968Z libp2p:tcp:listener Listening on { address: '127.0.0.1', family: 4, port: 60420 }
2024-01-25T23:54:38.969Z libp2p:connection-manager dial 12D3KooWPQUiiod5RRfnRf2reXAP1mw5vM86m32atbXZuN3T49Yd
2024-01-25T23:54:38.969Z libp2p:connection-manager had an existing non-transient connection to 12D3KooWPQUiiod5RRfnRf2reXAP1mw5vM86m32atbXZuN3T49Yd
2024-01-25T23:54:38.969Z libp2p:tcp:socket 127.0.0.1:60410 socket end
2024-01-25T23:54:38.969Z libp2p:mplex initiator stream with id 1 and protocol /test/0.0.0 ended
2024-01-25T23:54:38.969Z libp2p:mplex receiver stream with id 1 and protocol /test/0.0.0 ended
2024-01-25T23:54:38.969Z libp2p:tcp:socket 127.0.0.1:60410 socket close
2024-01-25T23:54:38.969Z libp2p:connection:outbound:aynwkw1706226876843 closing connection to /ip4/127.0.0.1/tcp/60410/p2p/12D3KooWPQUiiod5RRfnRf2reXAP1mw5vM86m32atbXZuN3T49Yd
2024-01-25T23:54:38.970Z libp2p:tcp:socket 127.0.0.1:60410 socket was already destroyed when trying to close

It seems libp2p:connection-manager had an existing non-transient connection to 12D3KooWPQUiiod5RRfnRf2reXAP1mw5vM86m32atbXZuN3T49Yd
is skipping doing some things because of this. I assume this creates consequences down the line (?)

I dont get it by putting a delay before start and connect. Then it will look like this

2024-01-26T00:01:02.345Z libp2p:transports creating listener for @libp2p/tcp on /ip4/127.0.0.1/tcp/0
2024-01-26T00:01:02.345Z libp2p:tcp:listener Listening on { address: '127.0.0.1', family: 4, port: 61966 }
2024-01-26T00:01:05.346Z libp2p:connection-manager dial 12D3KooWLNL49UuYwaSRh1fbE7Qj2CJwYj9KftHX2iBBR2m6eZJF
2024-01-26T00:01:05.347Z libp2p:connection-manager:dial-queue creating dial target for 12D3KooWLNL49UuYwaSRh1fbE7Qj2CJwYj9KftHX2iBBR2m6eZJF [
'/ip4/127.0.0.1/tcp/61966/p2p/12D3KooWLNL49UuYwaSRh1fbE7Qj2CJwYj9KftHX2iBBR2m6eZJF'
]
2024-01-26T00:01:05.348Z libp2p:tcp dialing /ip4/127.0.0.1/tcp/61966/p2p/12D3KooWLNL49UuYwaSRh1fbE7Qj2CJwYj9KftHX2iBBR2m6eZJF
2024-01-26T00:01:05.348Z libp2p:tcp connection opened /ip4/127.0.0.1/tcp/61966/p2p/12D3KooWLNL49UuYwaSRh1fbE7Qj2CJwYj9KftHX2iBBR2m6eZJF
2024-01-26T00:01:05.348Z libp2p:tcp new outbound connection /ip4/127.0.0.1/tcp/61966/p2p/12D3KooWLNL49UuYwaSRh1fbE7Qj2CJwYj9KftHX2iBBR2m6eZJF
2024-01-26T00:01:05.348Z libp2p:tcp:socket starting the outbound connection upgrade
2024-01-26T00:01:05.348Z libp2p:tcp:socket selecting outbound crypto protocol [ '/noise' ]
2024-01-26T00:01:05.348Z libp2p:tcp:listener new inbound connection /ip4/127.0.0.1/tcp/61980
2024-01-26T00:01:05.348Z libp2p:tcp:socket starting the inbound connection upgrade

from js-libp2p.

marcus-pousette avatar marcus-pousette commented on July 18, 2024

It seems to matter which node is dialling whom.. If the node that is not closing is dialing the the other node. Then it will fail, but the other way around it works. I assume that the node that is not stopping have a connection lingering that ought to close, which makes dialling again not possible. Given this, this might not be a problematic issue after all because it is usually the node that is starting that is starting to dial.

But the only issue perhaps is that I received a ConnectionImpl object after dialing (from the "wrong" side), even if it was perhaps closing, which made this problem less easy to understand.

You might close this if this is expected behaviour

from js-libp2p.

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.