-
Notifications
You must be signed in to change notification settings - Fork 66
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
CRITICAL: IPFS Companion exposes issue where Slate Gateway URLs are not resolving when the IPFS Companion Extension is enabled. #342
Comments
Hey @jimmylee - My guess is that IPFS Companion naively parses outbound GET requests, snagging any that contain |
Thanks @sanderpick, pinging @lidel here in case that helps with the diagnosis |
IPFS Companion will redirect urls that are valid IPFS addresses to the local IPFS deamon. That's the core feature. Are the images announced to the dht? Are there any discoverable provider records? |
I played with slate a bit and it works fine with Companion and my local go-ipfs 0.7.0, if i upload 💚 well known file the content is read from IPFS instead of 💔 Uploading unique stuff thats not on the IPFS network already just hangs. IIUC all this is expected behavior: you have IPFS Companion enabled, and by default it will load content from local IPFS node. If the content is not there yet, it may take time for your node to find it and fetch it. So.. sounds like the problem you experience is slow content discovery when using a local IPFS node? |
(1) @momack2 was the first to report this issue, hopefully she can provide more details if her bandwidth provides (2) I'm on WIFI with this speed: Tagging @carsonfarmer so he might be able to provide details if bandwidth permits. |
Node Type: I am using the out of the box config for IPFS companion. No custom settings @lidel |
Ok, after longer look, I believe this is not a problem with Companion, but discoverability of data on Textile's nodes. Not only my local node is unable to find CIDs you provided in the first comment:
But none of the public gateways, for example:
They hang forever. To confirm its content discovery issue you can download this file and import it to Slate – you will see it works fine, even with companion and local node. |
@lidel an idle thought, companion could look up a dnsaddr record for the domain when it encounters IPFS urls. So |
@lidel they appear to work perfectly fine for me? Even "fresh" slate cids. |
@lidel we're still on |
@olizilla yes.. that would be really elegant. Won't be an easy fix as there is no Web API for dnsaddr lookup, nor we expose it in IPFS APIs. I created ipfs/ipfs-companion#925 to track this idea. @carsonfarmer @jimmylee yeah, now I see them too. Looks like a really slow discovery for some reason. If I add unique CID to Slate, my local node is unable to find it unless I execute preload call to @sanderpick ah.. yeah, that would explain the above observation. Those nodes need to be publicly dialable for other nodes behind NAT to be able to reach them. |
Sounds good! It's now publicly visible ( |
Reporting back here. That node is now running
|
I've added https://slate.textile.io/ipfs/bafkreid5w43amr736etsba7jkpyqlh4tb5powe3ftssd7f5ws5dkfeekqe but my local node is unable to find it via DHT (been looking for over 10 minutes+) @sanderpick what is the PeerID of that machine? |
PeerID: From my local node,
But even after connecting, |
I need to double check if this is still a problem, I'll verify and ping the necessary parties again. |
@jimmylee For what its worth I still experience the problem with content discovery of newly added content 😿 For example, when redirect in IPFS Companion is enabled, my local IPFS node is unable to find content from:
What is concerning, is that it fails to find the content even if I manually connect to peer provided by @sanderpick: $ ipfs swarm connect /p2p/QmR69wtWUMm1TWnmuD4JqC1TWLZcc8iR2KrTenfZZbiztd
connect QmR69wtWUMm1TWnmuD4JqC1TWLZcc8iR2KrTenfZZbiztd success A quick fix is to disable IPFS integration for ..but we really need to figure out the content discovery problem. Note that loading content from local IPFS node works fine on other websites that use content-addressed assets, such as Audius. @jessicaschilling did case study on Audius and can put you in touch with them if you'd like to compare notes on backend setup related to the way content is provided to the IPFS network. |
Hey @lidel @jimmylee sorry to have dropped the ball here. I just popped open this nodes logs and saw a number of these errors shown in this issue:
However, the config is definitely not setup to be running in client mode. Maybe related to high CPU as mentioned in the issue above. In any case, I also noticed that |
I get mixed results. Can confirm the content routing issue seems to be gone for links I posted (content was found fast and loads fine from my local node), however other ones (eg. https://slate.host/bitgraves/september) still struggle to find the content ( Gut feeling: perhaps it only works when you are directly connected to the node in the pod? @sanderpick some ideas to try:
|
After a restart (low CPU), I was able to browse slate pages with fresh local node (no direct connection and no caching).
Yep, not changed from the default.
No.
It appears that when the node goes under very high load (providing a huge amount of Cids), the connectivity suffers, and we see these
The public IP is included in
Partially. We can't use the address filters with Kubernetes. I can manually pluck the filters that will work, but I doubt that will solve the connectivity issue.
Sure, https://gist.github.com/sanderpick/7bd7eb045b31f17e14a80a408e4a1b10 |
Idea from @jsign: Since this machine is only pinning buckets, would it be possible to only provide recursively pinned Cids? That may reduce the load, and since a connection should then exist (at least intermittently), the other Cids will be indirectly discoverable. In any case, I think we need some config tweaking to handle huge amounts of Cids. Any recommendations @lidel, @aschmahmann, @hsanjuan? |
@ribasushi, recommended trying out a quite reasonable config change: disable QUIC. |
@aschmahmann and @jacobheun as FYI for the roots pinning profiles (these are gold @jsign!) |
@momack2 we're in touch. I'm pretty sure those profiles have very little to do with providing/advertising since we are "finding providers" in that profile. My guess is that this has to do with Textile having many IPNS over PubSub channels and periodically querying the DHT to find if anyone new has joined the channel. I suspect Textile is pushing this feature harder than most and with hundreds of topics per node is doing a lot of crawling. They're running some tests now where periodically searching for new PubSub peers is just disabled to see if that's really the issue. Once we've confirmed then we can discuss what the options are. Note: I don't currently have a good guess as to why switching from providing pins to roots would be any less work for this machine since I don't think they're likely to be able to reprovide even 100k pin roots within the default 12 hr period. |
We are experiencing massive resource consumption on our nodes. It seemed to increase when we start getting the error above. Tried running on a server profile with Anyone found a solution to this? Our config: https://gist.github.com/kuzdogan/c1d69dabafc8286f31afc8bb988099b8 |
This issue was reported by momack2. She reported that with IPFS Companion Extension on Google Chrome, you could not view any of the image assets on https://slate.host.
The original screenshot in the report included this:
Reproduction
I was able to reproduce this bug by using Google Chrome, and the IPFS companion extension.
Upon further investigation I was able to deduce that:
You don't need to be running https://slate.host to reproduce this issue, you can just try to visit these URLS:
The text was updated successfully, but these errors were encountered: