Hello)
I’m working on the deploying Private IPFS Network with data replication among all participant nodes.
What I want to achive is to have private netwrok (for now just with 3 nodes but in future it could be thousands nodes) with data replication. And if by any reason one of the node goes Off rest of the network continue working.
I have 3 VMs on the DigitalOcean Cloud
This is specification details of these machines:
Ubuntu: 16.04
Go version: go1.10.3 linux/amd64
ipfs version 0.4.14
ipfs-cluster-service version 0.5.0
ipfs-cluster-ctl version 0.5.0
I created private network and organized it in the cluster
To create cluster I used method: “Starting a single peer and bootstrapping the rest to it”
This is what I have after run ipfs-cluster-ctl peers ls
command
QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR | ubuntu-s-1vcpu-2gb-fra1-01 | Sees 2 other peers
Addresses:
- /ip4/10.19.0.5/tcp/9096/ipfs/QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR
- /ip4/104.248.38.67/tcp/9096/ipfs/QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR
- /ip4/127.0.0.1/tcp/9096/ipfs/QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR
IPFS: QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip4/10.19.0.5/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip4/104.248.38.67/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip4/127.0.0.1/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip6/::1/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1gk6Wkksefz | ubuntu-s-1vcpu-2gb-ams3-02 | Sees 2 other peers
Addresses:
- /ip4/10.18.0.5/tcp/9096/ipfs/QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1gk6Wkksefz
- /ip4/127.0.0.1/tcp/9096/ipfs/QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1gk6Wkksefz
- /ip4/159.65.196.76/tcp/9096/ipfs/QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1gk6Wkksefz
IPFS: QmRcQRsMnv7cpoeJXiZdr5bEf1A3ztTnAWGtaFgzQK5pEV
- /ip4/10.18.0.5/tcp/4001/ipfs/QmRcQRsMnv7cpoeJXiZdr5bEf1A3ztTnAWGtaFgzQK5pEV
- /ip4/127.0.0.1/tcp/4001/ipfs/QmRcQRsMnv7cpoeJXiZdr5bEf1A3ztTnAWGtaFgzQK5pEV
- /ip4/159.65.196.76/tcp/4001/ipfs/QmRcQRsMnv7cpoeJXiZdr5bEf1A3ztTnAWGtaFgzQK5pEV
- /ip6/::1/tcp/4001/ipfs/QmRcQRsMnv7cpoeJXiZdr5bEf1A3ztTnAWGtaFgzQK5pEV
QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4 | ubuntu-s-1vcpu-2gb-lon1-03 | Sees 2 other peers
Addresses:
- /ip4/10.16.0.5/tcp/9096/ipfs/QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4
- /ip4/127.0.0.1/tcp/9096/ipfs/QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4
- /ip4/138.68.157.219/tcp/9096/ipfs/QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4
IPFS: QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip4/10.16.0.5/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip4/127.0.0.1/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip4/138.68.157.219/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip6/::1/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
I’m able to to add file from one of the node with command “ipfs-cluster-ctl add file.txt” and it replicate this file among rest of the nodes. Great!
After that I continued my tests. I shut down one node and expected that network continue working but it didn’t…
I add file from one of the node(ipfs-cluster-ctl add file.txt
) then I kill all ipfs processes on this machine with “sudo killall -9 ipfs-cluster-service ipfs
”
I was able to cat this file from my two nodes(ipfs cat filehash
), so the pin is worked fine before I shutdown this node
But when I tried to add new file from my remaining two nodes it didn’t happen and I got errors.
ipfs-cluster-ctl add file.txt
routing: not found
(500)
And that what I can see from my IPFS Cluster Daemon log
This is from first node:
sudo systemctl status ipfs-cluster
● ipfs-cluster.service - IPFS-Cluster Daemon
Loaded: loaded (/etc/systemd/system/ipfs-cluster.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-09-20 10:42:02 UTC; 5h 21min ago
Main PID: 1434 (ipfs-cluster-se)
Tasks: 9
Memory: 27.2M
CPU: 6min 18.604s
CGroup: /system.slice/ipfs-cluster.service
└─1434 /root/gopath/bin/ipfs-cluster-service daemon
Sep 20 15:14:03 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:14:03.833 WARNI cluster: Peer <peer.ID TyELZo> received alert for ping in QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjh
Sep 20 15:14:05 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:14:05.824 ERROR raft: peer {Voter QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4 QmZn1tUBPExALzSZqX7J5RKnn5
Sep 20 15:18:32 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:18:32.134 INFO ipfshttp: IPFS Pin request succeeded: QmcRxcQRHRu7may9vf7Mhzeki188mbfPGL4USv4JdxXnrt ipfshttp.
Sep 20 15:19:21 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:19:21.311 ERROR p2p-gorpc: dial attempt failed: <peer.ID TyELZo> —> <peer.ID YwZziU> dial attempt failed: conte
Sep 20 15:25:31 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:25:31.738 ERROR p2p-gorpc: dial attempt failed: <peer.ID TyELZo> —> <peer.ID YwZziU> dial attempt failed: conte
Sep 20 15:25:31 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:25:31.738 ERROR adder: error adding to cluster: dial attempt failed: <peer.ID TyELZo> —> <peer.ID YwZziU>
Sep 20 15:25:31 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: adder.go:146
Sep 20 15:56:51 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:56:51.996 ERROR p2p-gorpc: routing: not found call.go:63
Sep 20 15:56:51 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: 15:56:51.996 ERROR adder: error adding to cluster: routing: not found
Sep 20 15:56:51 ubuntu-s-1vcpu-2gb-fra1-01 ipfs-cluster-service[1434]: adder.go:146
And this is from second node:
sudo systemctl status ipfs-cluster
● ipfs-cluster.service - IPFS-Cluster Daemon
Loaded: loaded (/etc/systemd/system/ipfs-cluster.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-09-20 15:13:28 UTC; 51min ago
Main PID: 1442 (ipfs-cluster-se)
Tasks: 9
Memory: 26.3M
CPU: 44.607s
CGroup: /system.slice/ipfs-cluster.service
└─1442 /root/gopath/bin/ipfs-cluster-service daemon
Sep 20 16:03:55 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:03:55.914 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for ping in QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1
Sep 20 16:03:55 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:03:55.915 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for freespace in QmYwZziUukgsZQtmG4BdVgVLzMRNEWD
Sep 20 16:04:10 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:10.914 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for ping in QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1
Sep 20 16:04:10 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:10.915 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for freespace in QmYwZziUukgsZQtmG4BdVgVLzMRNEWD
Sep 20 16:04:25 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:25.914 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for ping in QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1
Sep 20 16:04:25 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:25.915 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for freespace in QmYwZziUukgsZQtmG4BdVgVLzMRNEWD
Sep 20 16:04:40 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:40.381 ERROR raft: NOTICE: Some RAFT log messages repeat and will only be logged once logging.go:105
Sep 20 16:04:40 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:40.382 ERROR raft: Failed to AppendEntries to {Voter QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1gk6Wkksefz QmYw
Sep 20 16:04:40 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:40.914 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for ping in QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1
Sep 20 16:04:40 ubuntu-s-1vcpu-2gb-lon1-03 ipfs-cluster-service[1442]: 16:04:40.915 WARNI cluster: Peer <peer.ID Zn1tUB> received alert for freespace in QmYwZziUukgsZQtmG4BdVgVLzMRNEWD
And that what I see when run “ipfs-cluster-ctl peers ls
” on both remaining nodes
QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR | ubuntu-s-1vcpu-2gb-fra1-01 | Sees 2 other peers
> Addresses:
- /ip4/10.19.0.5/tcp/9096/ipfs/QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR
- /ip4/104.248.38.67/tcp/9096/ipfs/QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR
- /ip4/127.0.0.1/tcp/9096/ipfs/QmTyELZo8uYrRbVNdDSbMfDdQqmYVJLV2hDFUkx44gjzrR
> IPFS: QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip4/10.19.0.5/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip4/104.248.38.67/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip4/127.0.0.1/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
- /ip6/::1/tcp/4001/ipfs/QmezCHeRwU9n9a8BJFhCxd9ayaNon49Rr5QJfF7zWePYWg
QmYwZziUukgsZQtmG4BdVgVLzMRNEWDXJAm1gk6Wkksefz | ERROR: routing: not found
QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4 | ubuntu-s-1vcpu-2gb-lon1-03 | Sees 2 other peers
> Addresses:
- /ip4/10.16.0.5/tcp/9096/ipfs/QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4
- /ip4/127.0.0.1/tcp/9096/ipfs/QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4
- /ip4/138.68.157.219/tcp/9096/ipfs/QmZn1tUBPExALzSZqX7J5RKnn5TUcUxLaUjhG9FiD3JVn4
> IPFS: QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip4/10.16.0.5/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip4/127.0.0.1/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip4/138.68.157.219/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
- /ip6/::1/tcp/4001/ipfs/QmavdBknF5ReHAoABWW5ygpoFBJrYjkQ6kVKCiajSxMz4p
So my question is: what am I doing wrong and why it doesn’t work when I disabled one node of the private-network/cluster?