Ipfs-cluster-ctl: connect: connection refused

my ipfs version is 0.6 、ipfs-cluster and ipfs-cluster-ctl version is 0.13.0_linux-amd64.

i have two VM nodes, ip is、
Each node has IPFS and IPFS-cluster installed.


When executing the following command:
#ipfs-cluster-ctl peers ls
An error occurred:
Code: 0
Message: Get “”: dial tcp connect: connection refused
Why?How to solve it?

Are you executing the ipfs-cluster-ctl command inside one of the VMs or on the host?

ipfs-cluster-ctl command inside VMs.
Is this problem related to VMware? How to solve this problem?

Per your logs, your API is not listening on the local interface (you must have overwritten the default listen multiaddress in the configuration).

Try ipfs-cluster-ctl --host /ip4/ peers ls instead.

thank you!

ipfs-cluster-ctl --host /ip4/ peers ls

12D3KooWBGjhEWv4WdxjJcG8Tw4gt9gS821F1z7NUSgherMKSpHE | isosipfs2 | Sees 1 other peers

- /ip4/
- /ip4/
- /ip4/
IPFS: Qmd2KxcBX4QJRgsMTGc5tPwsnbTYRJrDqaz3hBHgFiiqQT
- /ip4/
- /ip4/
- /ip6/::1/tcp/4001/p2p/Qmd2KxcBX4QJRgsMTGc5tPwsnbTYRJrDqaz3hBHgFiiqQT
12D3KooWJvVdz9aXNTetTWGquX5eo3N3wPWPfDZPf6ZcLdqjG55d | isosipfs1 | Sees 1 other peers
- /ip4/
- /ip4/
- /ip4/
IPFS: QmSDYXPfmGcSvsV8j2h5SzMVTJhR5jSxyebmxLRJrRnF2G
- /ip4/
- /ip4/
- /ip6/::1/tcp/4001/p2p/QmSDYXPfmGcSvsV8j2h5SzMVTJhR5jSxyebmxLRJrRnF2G

What’s the problem? How to solve it concretely?

Here’s mine service.json Configuration of,on is VM have two network card, and

There is no problem. If you want, do:

"http_listen_multiaddress": [
  "/ip4/", "/ip4/"


"http_listen_multiaddress": [ "/ip4/" ]

Only you know why you edited the configuration to listen on a specific interface in the first place. :man_shrugging:

According to your method, the problem has been solved.

Thank you very much!

You are great!

1 Like

I now have a cluster of three nodes. I did a test to add a file to a node and pin to all nodes. My steps are as follows:
# ipfs add hello-isos.txt
added QmSH7NYxNYhBKkbedSKoKh84NvBMAKznyo8MPtUe1jZZ3x hello-isos.txt
18 B / 18 B [=========================================================] 100.00%root@isosipfs1:~/test# ipfs-cluster-ctl pin add QmSH7NYxNYhBKkbedSKoKh84NvBMAKznyo8MPtUe1jZZ3x
> isosipfs1 : PINNED | 2020-10-08T09:38:59.647384655Z
> isosipfs2 : PINNED | 2020-10-08T09:38:59.647014951Z
> isosipfs3 : PINNED | 2020-10-08T09:38:59.643731679Z
root@isosipfs1:~/test# ipfs pin ls QmSH7NYxNYhBKkbedSKoKh84NvBMAKznyo8MPtUe1jZZ3x
QmSH7NYxNYhBKkbedSKoKh84NvBMAKznyo8MPtUe1jZZ3x recursive

I have two questions

  1. So where is the file stored on each node?

  2. If I delete this file in one node, is the file still stored in the other two nodes? What should I do to verify it?

It is stored by IPFS in the IPFS datastore (~/.ipfs/blocks usually) and pinned. ipfs pin ls --type=recursive should show the CID. Note that IPFS chunks and wraps files (https://github.com/ipfs-shipyard/ipfs-primer/blob/12d7298f436fa83e8395ade6969d2a4df298b334/ipfs-dag/lessons/files-as-dags.md)

If you manually unpin it on IPFS and run ipfs repo gc on one node, then IPFS cluster will detect that it is not pinned anymore and retrigger the pin operation.

Here’s what I mean:

If one is added to node A, should this file also be stored on the other two nodes? If it is, then I add A file to node A, and Then I delete that file on node A, then there will still be that file in the other two nodes, right?

What commands can I verify?

I executed the following command on node A:

#ipfs add file1.txt (A file is added to node A)

#ipfs-cluster-ctl pin add file1.txt hash (synchronize file1.txt to the other two nodes in the cluster)

#ipfs file rm file1.txt (delete file file1.txt on node A)

So does filea.txt still exist in the other two nodes? Filea.txt in the /root/.ipfs/blocks of the other two nodes?
I executed the following command on node B:
#ipfs cat file1.txt hash
You should see the contents of file1.txt?
Thank you again!

Yes. And cluster will re-add it to node A fetching it from the other nodes.

thank you,good luck!

Excuse me again. I’d like to ask you a question. How to upload a file to one node and then backup it to another node?

Also, why can’t I view it in webui (IP :5001/webui) from the add command line file?

Just like you did before with ipfs add and ipfs-cluster-ctl pin add.

WebUI does not display pinned items from the pinset, but items from MFS. Cluster does not interact with MFS. (ipfs pin ls --type recursive vs ipfs files ls /)

Thank you very much!

Do you know the “IPFS for nextcloud” project?(https://github.com/justicenode/files_external_ipfs)

If you are interested, you can participate in the development of this project. The author of this project doesn’t seem to be updated.

I think this project is very good. :slight_smile:

1 Like