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

bitswap: couldnt open sender again after SendMsg... #4128

Open
vitsum opened this issue Aug 7, 2017 · 7 comments
Open

bitswap: couldnt open sender again after SendMsg... #4128

vitsum opened this issue Aug 7, 2017 · 7 comments
Labels
topic/nat Topic nat

Comments

@vitsum
Copy link

vitsum commented Aug 7, 2017

Version information:

ipfs version --all
go-ipfs version: 0.4.10-
Repo version: 5
System version: amd64/windows
Golang version: go1.8.3

Type: Bug

Severity: High

Description:

I have ipfs installed on my laptop, and my 2 vds servers. My laptop is connected to wifi router.
I ipfs add some files on my laptop and then trying to get them through my vds. After a long waiting time I get error from the daemon (on vds):

ERROR bitswap: couldnt open sender again after SendMsg(<peer.ID ZeDjcE>) failed: dial attempt failed: <peer.ID P4NTZM> --> <peer.ID ZeDjcE> dial attempt failed: i/o timeout wantmanager.go:223

Sometimes it works, but very often it doesn't.

@whyrusleeping
Copy link
Member

@vitsum Its likely that your server cannot connect through your routers NAT to get to your laptop. If you try manually connecting your laptop to the server before fetching the data on the server do things work as expected?

@whyrusleeping whyrusleeping added the topic/nat Topic nat label Aug 29, 2017
@ssikdar1
Copy link

ssikdar1 commented Sep 19, 2017

Hey,

I'm getting similar errors. In my case I was trying to follow the instructions on the getting started page:
https://ipfs.io/docs/getting-started/

I do seem to get peers:

shan@shan-ThinkPad-T530:~$ ipfs swarm peers
/ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx
/ip4/162.243.248.213/tcp/4001/ipfs/QmSoLueR4xBeUbY9WZ9xGUUxunbKWcrNFTDAadQJmocnWm
/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd
/ip4/54.183.195.243/tcp/4001/ipfs/QmdqtwK5XwunwV5DQEHyEyVj6wQVQV137kgGArFynhwCbh
/ip4/78.71.33.168/tcp/4001/ipfs/QmYX2WUJv3cPeNPki8FvKejUwCpPdeyvJ9yBV9cGiNY8GF

Just letting it run over time gives this error on the terminal running the ipfs daemon:

Daemon is ready
18:34:08.012 ERROR    bitswap: couldnt open sender again after SendMsg(<peer.ID crXmJi>) failed: dial attempt failed: <peer.ID PGn38n> --> <peer.ID crXmJi> dial attempt failed: dial tcp6 [2400:2412:b81:5500:1011:3abd:e885:b7cb]:4001: connect: network is unreachable wantmanager.go:223

And when I try to get the cat.jpg:

shan@shan-ThinkPad-T530:~$ ipfs cat /ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx/cat.jpg >cat.jpg

It just hangs. This is what show up on the daemon terminal:

18:34:46.175 ERROR    bitswap: couldnt open sender again after SendMsg(<peer.ID YQH1vG>) failed: dial attempt failed: context deadline exceeded wantmanager.go:223
18:34:54.373 ERROR    bitswap: couldnt open sender again after SendMsg(<peer.ID Q5k9N7>) failed: dial backoff wantmanager.go:223
18:35:22.797 ERROR    bitswap: couldnt open sender again after SendMsg(<peer.ID a3aVp9>) failed: dial attempt failed: <peer.ID PGn38n> --> <peer.ID a3aVp9> dial attempt failed: Attempted to connect to zero address: /ip4/0.0.0.0/tcp/53934 wantmanager.go:223

Version:

shan@shan-ThinkPad-T530:~$ ipfs version --all
go-ipfs version: 0.4.10-4679f80
Repo version: 5
System version: amd64/linux
Golang version: go1.7.5

@Stebalien
Copy link
Member

bitswap: couldnt open sender again after SendMsg(<peer.ID crXmJi>) failed: dial attempt failed: <peer.ID PGn38n> --> <peer.ID crXmJi> dial attempt failed: dial tcp6 [2400:2412:b81:5500:1011:3abd:e885:b7cb]:4001: connect: network is unreachable wantmanager.go:22

You probably don't have IPv6 networking support.

And when I try to get the cat.jpg:

Have you added that file to IPFS? If so, are you connected to the peer on which you added the file? It looks like IPFS is trying to find that file but can't.

It just hangs. This is what show up on the daemon terminal:

Those aren't unusual. Just IPFS failing to talk to some peers (although, honestly, we should probably just ignore silently advertised zero addresses instead of printing errors).

@ssikdar1
Copy link

Have you added that file to IPFS? If so, are you connected to the peer on which you added the file? It looks like IPFS is trying to find that file but can't.

I was just following the tutorial:

Now, you should be able to get objects from the network. Try:

ipfs cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg >cat.jpg
open cat.jpg

Are there any public files I can try to ipfs cat once I get swarm peers on the network, to test that i've connected successfully online?

I am able to add files:
shan@shan-ThinkPad-T530:$ echo "hello world" > hello
shan@shan-ThinkPad-T530:
$ ipfs add hello
added QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o hello
shan@shan-ThinkPad-T530:~$ ipfs cat QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o

and can see it on the UI at http://localhost:5001/webui

@Stebalien
Copy link
Member

Stebalien commented Sep 20, 2017

Are there any public files I can try to ipfs cat once I get swarm peers on the network, to test that i've connected successfully online?

Yes, you should be able to cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg. After taking a closer look, it looks like QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx is a peer address, not a link to a file/directory. To clear up any confusion, /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ is a directory in IPFS that contains a file called cat.jpg, not the address of a peer.

@Stebalien
Copy link
Member

In case you're interested, /ip4/104.236.151.122/tcp/4001/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx is actually a multiaddr and the /ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx part isn't related to addresses like /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg. The fact that we use /ipfs for both is a bit of an historical mistake. Really, that mulitaddr should be /ip4/104.236.151.122/tcp/4001/p2p/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx but we haven't gotten around to switching this yet (and doing so will not be easy, if not impossible).

@ssikdar1
Copy link

thanks for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/nat Topic nat
Projects
No open projects
Development

No branches or pull requests

4 participants