You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a little wrapper to make it easier to use ipfs as a library.
I've been having trouble restarting the node due to socket reuse problems with the utp socket. I noticed the SO_REUSE opts commented out in net/swarm/conn.go, but it seems to have no problem reusing the TCP connection, so I'm especially surprised there's a problem reusing the UDP. I have confirmed the socket indeed remains open while the TCP connection is closed (using lsof -i) even after the log (below) indicates it's been closed.
21:35:04.003 INFO conn: listener closing: [Peer Qme5epCPhcKA] /ip4/0.0.0.0/tcp/4001 listen.go:47
21:35:04.003 DEBUG conn: [Peer Qme5epCPhcKA] closing Conn with [Peer QmaCpDMGvV2B] multiconn.go:216
21:35:04.003 INFO conn: listener closing: [Peer Qme5epCPhcKA] /ip4/0.0.0.0/udp/4002/utp listen.go:47
21:35:04.003 DEBUG conn: [Peer Qme5epCPhcKA] closing Conn with [Peer QmaCpDMGvV2B] conn.go:115
2014/11/27 21:35:09 restarting...
21:35:09.753 INFO swarm: InterfaceListenAddresses:[/ip6/fe80::4e8d:79ff:fedb:fd72/tcp/4001 /ip4/192.168.1.140/tcp/4001] addrs.go:64
21:35:09.753 INFO swarm: InterfaceListenAddresses:[/ip6/fe80::4e8d:79ff:fedb:fd72/udp/4002/utp /ip4/192.168.1.140/udp/4002/utp] addrs.go:64
21:35:09.753 ERROR swarm: Failed to listen on: /ip4/0.0.0.0/udp/4002/utp - Failed to listen on /ip4/0.0.0.0/udp/4002/utp: listen udp 0.0.0.0:4002: bind: address already in use conn.go:28
21:35:09.753 INFO conn: swarm listening on /ip4/0.0.0.0/tcp/4001 -- &{0xc20803c070 0xc208206d80}
listen.go:78
2014/11/27 21:35:09 1: Failed to listen on /ip4/0.0.0.0/udp/4002/utp: listen udp 0.0.0.0:4002: bind: address already in use
The text was updated successfully, but these errors were encountered:
Oh, this is interesting. thanks for finding this. It's possible this is due to how the utp lib works. I'll take a look at this in the next few days. cc @anacrolix as he may be interested.
@ebuchman i imagine this is a bug in h2so5/utp or jbenet/go-multiaddr-net. it shouldn't be in master as of #490 (merging shortly). Depending on what other udp transport we use (#58), this may or may not resurce. closing for now.
I'm writing a little wrapper to make it easier to use ipfs as a library.
I've been having trouble restarting the node due to socket reuse problems with the
utp
socket. I noticed theSO_REUSE
opts commented out innet/swarm/conn.go
, but it seems to have no problem reusing theTCP
connection, so I'm especially surprised there's a problem reusing theUDP
. I have confirmed the socket indeed remains open while theTCP
connection is closed (usinglsof -i
) even after the log (below) indicates it's been closed.The text was updated successfully, but these errors were encountered: