From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Subject: IPFS trouble Date: Tue, 18 Dec 2018 14:00:30 +0100 Message-ID: <20181218140030.3545935e@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/s2=v3ruA=WH7SR+FWp_vJcg"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZGBe-00086G-Kh for guix-devel@gnu.org; Tue, 18 Dec 2018 09:17:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZGBb-00056L-GS for guix-devel@gnu.org; Tue, 18 Dec 2018 09:17:30 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Laura Lazzati , guix-devel --Sig_/s2=v3ruA=WH7SR+FWp_vJcg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Laura, I'm sending this also to guix-devel [and sorry for the previous, empty, private mail, I was too fast on the sending button]. Note: I'm also new to IPFS, so I hope everything is correct here, if someone knows better, please reply. On Tue, 18 Dec 2018 00:04:56 -0300 Laura Lazzati wrote: > > A good guide is: > > https://medium.com/textileio/the-definitive-guide-to-publishing-content= -on-ipfs-ipns-dfe751f1e8d0. =20 > Sorry, I read the documentation, but I am mixed up. > I have my peer identity, and my /ipfs/hash... > And I find confusing several things: > If I run ipfs add myfile, using my command line, I cannot find myfile > in my node. even the add command returns a hash for that file I guess. > And if I run ipfs ls or cat that hash, the file is shown. I don't get what you mean with "I cannot find my file". Where are you looking for it? > I found useful for instance the webui, but when running ipfs add, my > files don't appear there if I open it and the other way around either: > the files are there if I upload them in the webui, and they have a > hash. I can copy the hash from the webui, but it doesn't work if I run > ipfs ls on that hash. And the files added with ipfs add myfile do not > appear in the webui. The webui however has an option to share your > file, I don't know if that is useful. You have in IPFS file-objects and directory-objects. The command 'ipfs ls' is for listing the contents of directory-objects (i.e. list the files in that directory). If you use it on file-objects (that exit in the store), the command just returns with no output. This works for me: I have the daemon down, i.e. no 'ipfs daemon' started. Then I can still add things to my local IPFS-store: ``` mkdir baz echo "foo" > baz/foo.txt echo "bar" > baz/bar.txt echo "Hello World, now it is $(date -u -Ins)" > baz/hello.txt cat baz/hello.txt=20 Hello World, now it is 2018-12-18T12:08:57,304514914+00:00 ipfs add -r baz/ added QmTz3oc4gdpRMKP2sdGUPZTAGRngqjsi99BPoztyP53JMM baz/bar.txt added QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 baz/foo.txt added QmXXZWRsLhFAHNWW6tH4TJVB2UiUPsUX8TZhYavqTne6RH baz/hello.txt added QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg baz 67 B / 67 B [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D] 100.00% Now I can open the web-browser: localhost:9090/ipfs/QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 --> (Note:I changed my port from default 8080 to 9090, on 8080 is already something listening) Unable to connect, I don't have the daemon up yet. https://ipfs.io/ipfs/QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 --> Shows "foo", as this Hash is already uploaded in the global network by someone else. https://ipfs.io/ipfs/QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg --> That is with the hash of the directory. Times out, this is not found on the global network. Starting daemon: ipfs daemon Browser: localhost:5001/webui Redirects: http://localhost:5001/ipfs/QmSDgpiHco5yXdyVTfhKxr3aiJ82ynz8V14QcGKicM3rVh/#/ Entering hash of "foo" in the "Explore" tab: QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 Finds it, I can view it. Entering hash of "baz" directory: http://localhost:9090/ipfs/QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg Yes, it lists the directory. Globally available: https://ipfs.io/ipfs/QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg I can see the directory structure. And I can see the files foo.txt, bar.txt and hello.txt listed: https://ipfs.io/ipfs/QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg/bar.txt But, the "hello.txt" takes its time to download, until now I still don't see it: https://ipfs.io/ipfs/QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg/hello.t= xt Probably that's because it first needs to search the network and find my little local host for that file. Hm. Strange. Ah, after 5 minutes, it's there! Maybe that's also your problem? Going to my server, daemon is down by default: myserver$ ipfs ls QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 Error: merkledag: not found myserver$ echo "foo" > foo.txt myserver$ ipfs add foo.txt=20 added QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 foo.txt 4 B / 4 B [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D] 100.00% myserver$ ipfs ls QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 myserver$ (i.e., no error, no output) myserver$ ipfs daemon & Looking for the directory: myserver$ ipfs ls QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg [Waiting 3 minutes nothing happens, then:] QmTz3oc4gdpRMKP2sdGUPZTAGRngqjsi99BPoztyP53JMM 12 bar.txt QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 12 foo.txt QmXXZWRsLhFAHNWW6tH4TJVB2UiUPsUX8TZhYavqTne6RH 67 hello.txt myserver$ ipfs cat QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg/hello.txt Hello World, now it is 2018-12-18T12:08:57,304514914+00:00 (instantly!) Hope this helps a bit, Bj=C3=B6rn --Sig_/s2=v3ruA=WH7SR+FWp_vJcg Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlwY728ACgkQvyhstlk+X/3LpgCgnfZoV99d/IWYhCt1CWA3c7zK z1QAmwdfe8fzTpAksiYicdnr0HuO6z+g =UpGI -----END PGP SIGNATURE----- --Sig_/s2=v3ruA=WH7SR+FWp_vJcg--