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

websocket: failed to close network connection: close tcp #10416

Closed
3 tasks done
phpmac opened this issue May 4, 2024 · 8 comments · Fixed by #10463
Closed
3 tasks done

websocket: failed to close network connection: close tcp #10416

phpmac opened this issue May 4, 2024 · 8 comments · Fixed by #10463
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up

Comments

@phpmac
Copy link

phpmac commented May 4, 2024

Checklist

Installation method

ipfs-desktop

Version

No response

Config

No response

Description

[a](http://23.95.11.66:3000/projects/a)
/

ipfs

APP
CPU 0.4%
Memory 410.8 MB
Network I/O 244.1 MB / 158.8 MB
Edit to pin a message for this service
initializing IPFS node at /data/ipfs
Initializing daemon...
Kubo version: 0.28.0-e7f0f34
Repo version: 15
System version: amd64/linux
Golang version: go1.22.2
2024/05/04 18:58:32 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
Swarm listening on /ip4/10.0.1.174/tcp/4001
Swarm listening on /ip4/10.0.1.174/udp/4001/quic-v1
Swarm listening on /ip4/10.0.1.174/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /ip4/10.0.2.129/tcp/4001
Swarm listening on /ip4/10.0.2.129/udp/4001/quic-v1
Swarm listening on /ip4/10.0.2.129/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /ip4/172.19.0.20/tcp/4001
Swarm listening on /ip4/172.19.0.20/udp/4001/quic-v1
Swarm listening on /ip4/172.19.0.20/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/127.0.0.1/udp/4001/quic-v1
Swarm announcing /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm announcing /ip4/172.19.0.20/tcp/4001
Swarm announcing /ip4/172.19.0.20/udp/4001/quic-v1
Swarm announcing /ip4/172.19.0.20/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm announcing /ip4/23.95.11.66/udp/32980/quic-v1
Swarm announcing /ip4/23.95.11.66/udp/32980/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
RPC API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
Gateway server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready
2024/05/04 18:58:56 websocket: failed to close network connection: close tcp 172.19.0.15:57232->145.40.118.135:443: use of closed network connection
2024/05/04 18:59:38 websocket: failed to close network connection: close tcp 172.19.0.20:58760->145.40.118.135:443: use of closed network connection
2024/05/04 19:00:47 websocket: failed to close network connection: close tcp 172.19.0.20:45834->172.64.144.159:443: use of closed network connection
2024/05/04 19:01:39 websocket: failed to close network connection: close tcp 172.19.0.20:43902->145.40.118.135:443: use of closed network connection
2024/05/04 19:02:04 websocket: failed to close network connection: close tcp 172.19.0.15:35512->145.40.118.135:443: use of closed network connection
2024/05/04 19:02:27 websocket: failed to close network connection: close tcp 172.19.0.20:56978->145.40.118.135:443: use of closed network connection
2024/05/04 19:04:11 websocket: failed to close network connection: close tcp 172.19.0.15:37282->145.40.118.135:443: use of closed network connection
2024/05/04 19:05:23 websocket: failed to close network connection: close tcp 172.19.0.15:33652->145.40.118.135:443: use of closed network connection
Changing user to ipfs
ipfs version 0.28.0
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
Error: lock /data/ipfs/repo.lock: someone else has the lock
Kubo version: 0.28.0-e7f0f34
Repo version: 15
System version: amd64/linux
Golang version: go1.22.2

Use
+
K
to trigger search


Logs
Lines
50
initializing IPFS node at /data/ipfs
Initializing daemon...
Kubo version: 0.28.0-e7f0f34
Repo version: 15
System version: amd64/linux
Golang version: go1.22.2
2024/05/04 18:58:32 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
Swarm listening on /ip4/10.0.1.174/tcp/4001
Swarm listening on /ip4/10.0.1.174/udp/4001/quic-v1
Swarm listening on /ip4/10.0.1.174/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /ip4/10.0.2.129/tcp/4001
Swarm listening on /ip4/10.0.2.129/udp/4001/quic-v1
Swarm listening on /ip4/10.0.2.129/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1
Swarm listening on /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /ip4/172.19.0.20/tcp/4001
Swarm listening on /ip4/172.19.0.20/udp/4001/quic-v1
Swarm listening on /ip4/172.19.0.20/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/127.0.0.1/udp/4001/quic-v1
Swarm announcing /ip4/127.0.0.1/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm announcing /ip4/172.19.0.20/tcp/4001
Swarm announcing /ip4/172.19.0.20/udp/4001/quic-v1
Swarm announcing /ip4/172.19.0.20/udp/4001/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
Swarm announcing /ip4/23.95.11.66/udp/32980/quic-v1
Swarm announcing /ip4/23.95.11.66/udp/32980/quic-v1/webtransport/certhash/uEiBC1lPftzpyh1tTvr_DmNbimm5r3TRhYrS6B3oB6hDInA/certhash/uEiDtaSGsb2bB2cqNMhCWw5rwGwbrK1eA1DAEqYfA5XyguQ
RPC API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
Gateway server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready
2024/05/04 18:58:56 websocket: failed to close network connection: close tcp 172.19.0.15:57232->145.40.118.135:443: use of closed network connection
2024/05/04 18:59:38 websocket: failed to close network connection: close tcp 172.19.0.20:58760->145.40.118.135:443: use of closed network connection
2024/05/04 19:00:47 websocket: failed to close network connection: close tcp 172.19.0.20:45834->172.64.144.159:443: use of closed network connection
2024/05/04 19:01:39 websocket: failed to close network connection: close tcp 172.19.0.20:43902->145.40.118.135:443: use of closed network connection
2024/05/04 19:02:04 websocket: failed to close network connection: close tcp 172.19.0.15:35512->145.40.118.135:443: use of closed network connection
2024/05/04 19:02:27 websocket: failed to close network connection: close tcp 172.19.0.20:56978->145.40.118.135:443: use of closed network connection
2024/05/04 19:04:11 websocket: failed to close network connection: close tcp 172.19.0.15:37282->145.40.118.135:443: use of closed network connection
2024/05/04 19:05:23 websocket: failed to close network connection: close tcp 172.19.0.15:33652->145.40.118.135:443: use of closed network connection
Changing user to ipfs
ipfs version 0.28.0
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
Error: lock /data/ipfs/repo.lock: someone else has the lock
Kubo version: 0.28.0-e7f0f34
Repo version: 15
System version: amd64/linux
Golang version: go1.22.2
@phpmac phpmac added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels May 4, 2024
@pablomendezroyo
Copy link

Can someone give more context about the criticality of this issue, please?

@aschmahmann
Copy link
Contributor

This bug here seems to be obnoxious logging rather than some other underlying issue. It's going to be reverted in the next go-libp2p release (and will get propagated into the following kubo release) libp2p/go-libp2p#2762.

@phpmac
Copy link
Author

phpmac commented May 6, 2024 via email

@darshsingh116
Copy link

image
Basically ipfs is trying to close a port which has already terminated by itself or some other reason.. also stopping ipfs deamon is not closing the ports properly i think (use netstat to see).
After restarting pc , launching ipfs daemon , adding a file , ipfs.io works fine for few minutes or few tries.. after that 504 Gateway timeout it gives on any further uploads. My theory is that the ports binding is not good and is lost resulting misbehaviour after few tries/minutes for launching ipfs for first time after restarting pc.

@lidel
Copy link
Member

lidel commented Jun 11, 2024

This should be fixed in v0.29

Ref. https://github.com/ipfs/kubo/releases/tag/v0.29.0

@lidel lidel closed this as completed Jun 11, 2024
@wenyue
Copy link

wenyue commented Jun 20, 2024

Not fixed yet, still have the bug.

@lidel
Copy link
Member

lidel commented Jul 3, 2024

Indeed, the upstream project had some hiccups.
Reopening as we need libp2p/go-libp2p#2861

@lidel lidel reopened this Jul 3, 2024
@lidel lidel mentioned this issue Jul 3, 2024
32 tasks
@lidel lidel added P2 Medium: Good to have, but can wait until someone steps up effort/hours Estimated to take one or several hours and removed need/triage Needs initial labeling and prioritization labels Jul 9, 2024
@Tuanm
Copy link

Tuanm commented Jul 23, 2024

Still faced this issue when using Kubo (containerized in version 0.29.0-3f0947b).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: No status
Development

Successfully merging a pull request may close this issue.

7 participants