# Transient connection to peer error

**URL:** <https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675>\
**Category:** Uncategorized\
**Tags:** files\
**Created:** [December 13, 2022, 1:20pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675 "2022-12-13T13:20:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlesperez534](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@charlesperez534](https://discuss.ipfs.tech/u/charlesperez534)\
**Post date:** [December 13, 2022, 1:20pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/1 "2022-12-13T13:20:12Z")

</div>

Hello!

When running [https://ipfs-check.on.fleek.co/](https://ipfs-check.on.fleek.co/) to check if my IPFS node was publicly available, I was getting the multiaddr and downloading CID errors showing that my node wasn’t available.

I enabled port forwarding to 4001 as instructed in [this](https://docs.ipfs.tech/how-to/nat-configuration/#upnp) article, but when I check again, I get now only `There was an error downloading the CID from the peer: transient connection to peer` (and of course, this causes a time-out error when querying the CID)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/1/1332533dff45c0d3c40c613c741df1a80478c459.png)

Any ideas how to solve this?

Thanks in advance for the help.

---

<div class="post-metadata">

**Author:** ![Frederic-Zhou](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/frederic-zhou/32/7265_2.png) [@Frederic-Zhou](https://discuss.ipfs.tech/u/Frederic-Zhou)\
**Post date:** [December 14, 2022, 12:46pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/2 "2022-12-14T12:46:16Z")

</div>

Are your nodes behind NAT ?

---

<div class="post-metadata">

**Author:** ![charlesperez534](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@charlesperez534](https://discuss.ipfs.tech/u/charlesperez534)\
**Post date:** [December 14, 2022, 1:10pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/3 "2022-12-14T13:10:06Z")

</div>

Yes, I am.

But I did port forwarding to 4001 using [these](https://docs.ipfs.tech/how-to/nat-configuration/#port-forwarding) instructions. Shouldn’t that have solved it?

---

<div class="post-metadata">

**Author:** ![Frederic-Zhou](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/frederic-zhou/32/7265_2.png) [@Frederic-Zhou](https://discuss.ipfs.tech/u/Frederic-Zhou)\
**Post date:** [December 14, 2022, 1:31pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/4 "2022-12-14T13:31:07Z")

</div>

There is a way to test，you could first make sure that your local node port 4001 can be accessed from a server from another public IP.

---

<div class="post-metadata">

**Author:** ![charlesperez534](https://avatars.discourse-cdn.com/v4/letter/c/278dde/32.png) [@charlesperez534](https://discuss.ipfs.tech/u/charlesperez534)\
**Post date:** [December 14, 2022, 1:45pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/5 "2022-12-14T13:45:50Z")

</div>

Just tested it out, from another machine, with `nc YYY.YYY.Y.Y 4001` and got `multistream/1.0.0` which basically means that the connection was established successfully.

---

<div class="post-metadata">

**Author:** ![Frederic-Zhou](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/frederic-zhou/32/7265_2.png) [@Frederic-Zhou](https://discuss.ipfs.tech/u/Frederic-Zhou)\
**Post date:** [December 14, 2022, 2:20pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/6 "2022-12-14T14:20:40Z")

</div>

This means that your node 4001 can be connected, but there is a possibility that [https://ipfs-check.on.fleek.co/](https://ipfs-check.on.fleek.co/) node cannot connect to your node, so it connect the node through the relay. In my own experience debugging IPFS nodes, transient connection-to-peer errors occur in this situation.

---

<div class="post-metadata">

**Author:** ![IngwiePhoenix](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ingwiephoenix/32/7350_2.png) [@IngwiePhoenix](https://discuss.ipfs.tech/u/IngwiePhoenix)\
**Post date:** [January 14, 2023, 3:47am UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/7 "2023-01-14T03:47:16Z")

</div>

Hello! I am stuck in this exact same issue too.

Is port-forwarding completely required? I was using this tool [check.ipfs.network](https://check.ipfs.network/) to verify.

When using `/p2p/$peerID` to look up my CID, it returned the transient error.

So far, I have not found a definitive answer. UPnP and PMT are enabled on my OpenWrt; but I could be overlooking something…

So I would like to know:

- Is port-forwarding needed? I know UPnP is often used for network-local things - such as my SATIP server being recognized by VLC and TVHeadend - but can it also be used for port-forwarding? I have never heared about PMT, but it is enabled.
- Can I use hole-punching to work around this if I don’t want to neccessarily open up a port? I could; I would just like to know if I really _must_ 😉 Knowing more is always a lil’ better.
- As a little off-topic, but assuming the check.ipfs.network tool can find my content now using the P2P address, how can I then instruct an IPFS gateway - say `cf-ipfs.com` - to connect to my maschine through p2p so my friend can access the file i am sharing for him?

Thanks a bunch! 🙂

---

<div class="post-metadata">

**Author:** ![regcs](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/regcs/32/7438_2.png) [@regcs](https://discuss.ipfs.tech/u/regcs)\
**Post date:** [February 12, 2023, 3:15pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/8 "2023-02-12T15:15:46Z")

</div>

Hi, I am behind a NAT (home router connected to another router, which is connected to the internet). I see the same error, if I do not announce my public IP explicitly via the IPFS node configuration having port forwarding enabled. It seems that whenever my node is establishing a connection via a relay node (which it seems to do automatically, if I don’t announce my public IP), it can fetch files from the IPFS network, but it cannot provide files to the network. Furthermore, according to `ipfs swarm peers --direction` all my connections are `outbound`.

Is it correct, that the “transient connection” is indicating a connection that is working over a relay? If so, why does that prevent my IPFS node from providing files even though I can connect to other nodes?

---

<div class="post-metadata">

**Author:** ![DontBreakAlex](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/dontbreakalex/32/7516_2.png) [@DontBreakAlex](https://discuss.ipfs.tech/u/DontBreakAlex)\
**Post date:** [March 12, 2023, 12:42am UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/9 "2023-03-12T00:42:08Z")

</div>

I am experiencing the same issue (I confirmed that my UPnP is working with a quick nc), did you find a way to fix it ?

---

<div class="post-metadata">

**Author:** ![DontBreakAlex](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/dontbreakalex/32/7516_2.png) [@DontBreakAlex](https://discuss.ipfs.tech/u/DontBreakAlex)\
**Post date:** [March 12, 2023, 12:21pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/10 "2023-03-12T12:21:22Z")

</div>

It indeed seams like this is indeed a issue with relays:

```auto
❌ Could not connect to multiaddr: failed to dial 12D3KooWJHRXk8USQCwuP8ixQaGgWGiUQ8yBjakesYz1WuVskaRo:
  * [/ip4/89.233.108.3/tcp/4001/p2p/12D3KooWEzPfsr97JgovDBYGyems8N1p42MB2DY98JekdM5uj48g/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)
  * [/ip4/89.233.108.3/udp/4001/quic/p2p/12D3KooWEzPfsr97JgovDBYGyems8N1p42MB2DY98JekdM5uj48g/p2p-circuit] concurrent active dial through the same relay failed with a protocol error

```

I have no issues getting the file from another machine in a datacenter away from me, but neither IPFS check nor public gateways can get the file, seemingly because they try to go through a relay…

---

<div class="post-metadata">

**Author:** ![StudiedTransform](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@StudiedTransform](https://discuss.ipfs.tech/u/StudiedTransform)\
**Post date:** [December 3, 2023, 3:13pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/11 "2023-12-03T15:13:25Z")

</div>

I seem to be having the same issue.

Running `ncat` remotely shows the port as open by returning `/multistream/1.0.0`, although `ipfs swarm peers --direction` shows all connections as outbound, and I keep getting:  
`❌ There was an error downloading the CID from the peer: transient connection to peer` on the IPFS checker pages.

---

<div class="post-metadata">

**Author:** ![nmsteve](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/nmsteve/32/8505_2.png) [@nmsteve](https://discuss.ipfs.tech/u/nmsteve)\
**Post date:** [April 11, 2024, 4:33pm UTC](https://discuss.ipfs.tech/t/transient-connection-to-peer-error/15675/12 "2024-04-11T16:33:27Z")

</div>

I was facing the same issues. I used these commands to configure the firewall on my SSH Ubuntu server to allow access to my IPFS node. Please note that I’m not sure whether this might raise security concerns for your server.

```auto
iptables -A INPUT -p tcp --dport 4001 -j ACCEPT
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
iptables -A INPUT -p tcp --dport 5001 -j ACCEPT

```
