From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laura Lazzati Subject: Re: IPFS trouble Date: Tue, 18 Dec 2018 10:07:13 -0300 Message-ID: References: <20181218140030.3545935e@alma-ubu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZGYt-0003Hq-SU for guix-devel@gnu.org; Tue, 18 Dec 2018 09:41:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZGYo-0008KT-7a for guix-devel@gnu.org; Tue, 18 Dec 2018 09:41:31 -0500 In-Reply-To: <20181218140030.3545935e@alma-ubu> 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: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Cc: guix-devel On Tue, Dec 18, 2018 at 10:00 AM Bj=C3=B6rn H=C3=B6fling wrote: > > 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-conte= nt-on-ipfs-ipns-dfe751f1e8d0. > > > 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 > > 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.t= xt > > > But, the "hello.txt" takes its time to download, until now I still > don't see it: > > https://ipfs.io/ipfs/QmZ9iMU1iKRpAs7dR7XTLGaYtkcYFn6EiMXRhqpk5jaeNg/hello= .txt > > 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 > 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 Thank you! I will try it. I felt really silly for spending too much time on that. I just want to share my videos so that you can see how they are, even they are videos for trying out the video/translation tools. BTW, I edited the libreplanet site, changing some stuff about the commands that I faced, and adding comments about why I did so. I am not running the daemon in background, since I don't mind having a terminal open. I will write back to let you know if it your steps work for me :) Thank you! Regards, Laura