Help with setting up ipfs cluster

Hello, i am setting up an ipfs cluster, initially between two remote machines, using docker.
I have added the multiaddress of 2nd cluster peer in service.json config of 1st cluster peer like so:
“peer_addresses”: [“/ip4/143.176.14.172/tcp/9096/p2p/12D3KooWHG4PcH53t4zjKFfo1nu4a1UhCvKKm7tTeLJddjBDXKtv”]
Yet, it is not connecting. After multiple restarts, the peerstore file remains empty. Viewing the logs it seems it is not even trying to connect to anything other than its ipfs buddy.

2024-10-04T08:57:32.509Z INFO cluster ipfs-cluster/cluster.go:737 - No other peers

what am i missing here?

Update: changing permissions on peerstore helps me to get that filled, but it is still not trying to connect.

Update2: logs do signal this:

Changing user to ipfs
/usr/local/bin/entrypoint.sh: line 13: su-exec: not found

Are you using the official docker build or something else?

If you can run with --debug flag, you will see more, including info about bootstrapping.

I’m not sure about the ‘not found’: ipfs-cluster/docker/entrypoint.sh at master · ipfs-cluster/ipfs-cluster · GitHub . An error would kill the container so it’s perhaps not finding IPFS_CLUSTER_PATH ?

Hi Hector, thanks for replying.

I was using an adopted version of

running one cluster/ipfs pair on each machine and opening 9996 ports. That didnt work somehow.

this morning i went back to original example with a setup of 3 peers on one machine and it works fine. I noticed how multiaddresses in peerstore changed from localhost to a private ip in my lan, so i assume that there is a connection check before addresses are added to peerstore. Meaning connection issues could have been interfering with filling peerstore and not necessarily permission errors.

btw, the cluster path was not the issue in my faulty setup , looking at these logs:
ipfs-cluster-service version 1.0.6+gitd4484ec3f1fb559675555debf1bb9ac3220ad1af
Found IPFS cluster configuration at /data/ipfs-cluster

Hemingway, i am going to give it a fresh try later this morning …

P.S. Good news. It works. Today is smooth sailing. My guess is now (again) that i somehow screwed up when adapting the location of volumes (and creating the local folders with my regular user, not ipfs )

Now i need to put it to use …

The original example relies on multicast I think, for discovery. On boot, peers will try to connect to at least one of peer_addresses.

Good to hear that it works!