I’m running ipfs daemon and when I tried to pin numerous CIDs using a bash script I get this…
Error: pin: block was not found locally (offline): ipld: could not find bafybeiciowtzyi2zznftcz44ew23ii5vodmpt5hwllta24rxelqrn4tpq4
Error: pin: block was not found locally (offline): ipld: could not find bafybeibp3lm2ywfwj4rcrekp6vzqdo22jmlh7gqflktnwvjsr5hytxq4vm
Error: pin: block was not found locally (offline): ipld: could not find bafybeib2z7ckzq7qo5pw5krdfqo2imzo5o76dylr2mex3qqj3mcvvl6rn4
Error: pin: block was not found locally (offline): ipld: could not find bafybeiadwgpcqgxzmqijndf4ll7tatxsedzuwnqauh5epj46mecskfivtq
Error: pin: block was not found locally (offline): ipld: could not find bafybeig6qkww7gaksmddvmn3n4nrbsnb2gqwjrhluacvc73yytiblf3wdy
My command is ipfs pin add bafybeig6qkww7gaksmddvmn3n4nrbsnb2gqwjrhluacvc73yytiblf3wdy
I googled but no answer apparently. Seems like I’m the first experiencing this
Ok, if I kill my ipfs.service and just run ipfs daemon from cli, it works. But I don’t know what’s wrong with my ipfs.service since I followed tutorials online and I’m jut a total noob.
Oh, I see the user of the daemon and the client is not the same,
You can do mkdir ~/.ipfs && echo "/ip4/127.0.0.1/tcp/5001" > ~/.ipfs/api which is gonna make the CLI always try to use API instead.
Interestingly, I actually have another old IPFS node that was set up by me and running perfectly months ago. But now also suffering from daemon issues. Below shows how the daemon is running and yet IPFS acts like it’s not running.
root@ip-172-31-11-119:~# systemctl status ipfs.service
● ipfs.service - InterPlanetary File System (IPFS) daemon
Loaded: loaded (/etc/systemd/system/ipfs.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2023-08-15 04:54:50 UTC; 1min 45s ago
Docs: https://docs.ipfs.io/
Main PID: 123712 (ipfs)
Tasks: 9 (limit: 9503)
Memory: 209.6M (swap max: 0B)
CGroup: /system.slice/ipfs.service
└─123712 /usr/local/bin/ipfs daemon --init --migrate
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Swarm announcing /ip4/13.215.169.228/udp/4001/quic
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Swarm announcing /ip4/172.31.11.119/tcp/4001
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Swarm announcing /ip4/172.31.11.119/udp/4001/quic
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Swarm announcing /ip6/::1/tcp/4001
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Swarm announcing /ip6/::1/udp/4001/quic
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: API server listening on /ip4/127.0.0.1/tcp/5001
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: WebUI: http://127.0.0.1:5001/webui
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal ipfs[123712]: Daemon is ready
Aug 15 04:54:50 ip-172-31-11-119.ap-southeast-1.compute.internal systemd[1]: Started InterPlanetary File System (IPFS) daemon.
root@ip-172-31-11-119:~# ipfs pin add bafkreifwpfpsrowlztlcma552hp4hclelu6n5g3lioiapikszq57i4al5m
Error: pin: merkledag: not found