Error: merkledag: not found

Hello,everybody.

Iā€™m new here. I ran my first ā€œipfs initā€ yesterday and got my first hash and all appear well.
But today I have already forgotten my hash. I try ā€œipfs initā€ again and it shows

 initializing IPFS node at C:\Users\Administrator.PC201603270858\.ipfs
Error: ipfs configuration file already exists!
Reinitializing would overwrite your keys.

At first , i thought the hash maybe in the configfile. So I open the configfile and found the value of ā€œpeerIDā€, but it doesnā€™t work with it.

>ipfs cat /ipfs/QmPgqUZ82T4uMx3FLtifYtSDo21WFhHiVzRA8UuAwNkTEU/readme

Error: merkledag: not found

So , how can I get my merkledag that already exists int the system.???

Note
OK. I have resoved this problem already.:slight_smile:
Please go to ā€œSignificance of key generated by 'ipfs init'ā€

FYI, for other people with this same question, you can run ipfs pin ls to list the hashes of all the content pinned on your node. This will include everything that you have added using ipfs add command because that command pins the content by default.

Note: this can take a long time to run, especially if you have pinned a lot of stuff on your node.

Thanks for your advice.:smiley:
You are so nice. I think i can learn a lot from you.
I know I have a long way to go, but ipfs makes me crazy.

I ran ipfs pin ls and got this:

QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y indirect
QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V indirect
QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB indirect
QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive
QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T recursive
QmXeKtRSz7SVKp8Qh6tXtv6whRF5WXWQPwsqA38houakhZ recursive
QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7 indirect
QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP3L869tgTbPYnsha indirect
QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y indirect
QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm indirect

I only added ā€˜hello worldā€™ using ipfs add. what about the others ?
In my opinion, did i became one of the decentralized node? when i browse through some file in the network of IPFS, IPFS will add some file locally just like run `ipfs addā€™. Is it the answer to my question that i mentioned ?

When you run ipfs init, by default you start out with a few helpful files, like the empty directory QmUNLLsPACC..., and some help files/documentation.

$ ipfs ls QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T
QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V 1688 about
QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y 200  contact
QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7 322  help
QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y 12   ping
QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP3L869tgTbPYnsha 1728 quick-start
QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB 1102 readme
QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm 1173 security-notes

You can prevent ipfs init from adding those files, by using the flag ipfs init --empty-repo.

1 Like

Is there any mechanism that my node will pin objects from other nodes automatically? or other nodes will put files in my node?

IPFS cluster is probably the right solution:

Downloads (ipfs-cluster & ipfs-cluster-ctl):
https://dist.ipfs.io/#ipfs-cluster-service
https://dist.ipfs.io/#ipfs-cluster-ctl

Use ipfs object patch to add all the hashes you want to keep pinned to some IPNS hash on the originator. Then use polling to periodically update the IPNS hash pin on the receivers.