I’m trying to create an ipfs cluster.
I got 3 machines running on the same network and I want to “clusterize” them.
Each machine is running a docker container ipfs-cluster.
I succeeded to connect “ipfs” peer by bootstrapping peer to each other.
But, I’m not able to connect “ipfs-cluster” peer.
When I attempt to connect a peer to an other, I always have an error message.
All service.json file have the same secret.
Command:
docker exec ipfs-node ipfs-cluster-ctl --debug peers add /ip4/<ip>/tcp/9096/ipfs/QmW9wAZtDG8EkiP2NkMEQUhRLCit1ocG2JSd4QwoDLQYUz
Logs:
14:36:13.137 DEBUG cluster-ct: POST: http://127.0.0.1:9094/peers main.go:465
An error ocurred:
Code: 500
Message: dial attempt failed: <peer.ID bRwyFj> --> <peer.ID W9wAZt> dial attempt failed: i/o timeout
14:36:23.143 DEBUG cluster-ct: Response body: {"code":500,"message":"dial attempt failed: \u003cpeer.ID bRwyFj\u003e --\u003e \u003cpeer.ID W9wAZt\u003e dial attempt failed: i/o timeout"}
main.go:485
14:44:48.714 DEBUG cluster-ct: POST: http://127.0.0.1:9094/peers main.go:465
14:44:48.715 DEBUG cluster-ct: Response body: {"code":500,"message":"dial backoff"}
main.go:485
An error ocurred:
Code: 500
Message: dial backoff
14:52:25.861 DEBUG cluster-ct: POST: http://127.0.0.1:9094/peers main.go:465
An error ocurred:
Code: 500
Message: dial attempt failed: <peer.ID bRwyFj> --> <peer.ID W9wAZt> dial attempt failed: EOF
14:52:35.863 DEBUG cluster-ct: Response body: {"code":500,"message":"dial attempt failed: \u003cpeer.ID bRwyFj\u003e --\u003e \u003cpeer.ID W9wAZt\u003e dial attempt failed: EOF"}
main.go:485
machine1, service.json:
{
"cluster": {
"id": "QmRzjMdL8gLhq44vKnfLqMnVNhA5G1Etg26x5C7WgFsKLe",
"private_key": "<private-key>",
"secret": "9a42070d8e8e3016bfd5cb17e34220fdd4abb7c6e5ec0e3c2016c8545faf438d",
"peers": [],
"bootstrap": [],
"leave_on_shutdown": false,
"listen_multiaddress": "/ip4/0.0.0.0/tcp/9096",
"state_sync_interval": "1m0s",
"ipfs_sync_interval": "2m10s",
"replication_factor": -1,
"monitor_ping_interval": "15s"
},
"consensus": {
"raft": {
"heartbeat_timeout": "1s",
"election_timeout": "1s",
"commit_timeout": "50ms",
"max_append_entries": 64,
"trailing_logs": 10240,
"snapshot_interval": "2m0s",
"snapshot_threshold": 8192,
"leader_lease_timeout": "500ms"
}
},
"api": {
"restapi": {
"listen_multiaddress": "/ip4/127.0.0.1/tcp/9094",
"read_timeout": "30s",
"read_header_timeout": "5s",
"write_timeout": "1m0s",
"idle_timeout": "2m0s",
"basic_auth_credentials": null
}
},
"ipfs_connector": {
"ipfshttp": {
"proxy_listen_multiaddress": "/ip4/127.0.0.1/tcp/9095",
"node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
"connect_swarms_delay": "7s",
"proxy_read_timeout": "10m0s",
"proxy_read_header_timeout": "5s",
"proxy_write_timeout": "10m0s",
"proxy_idle_timeout": "1m0s"
}
},
"monitor": {
"monbasic": {
"check_interval": "15s"
}
},
"informer": {
"disk": {
"metric_ttl": "30s",
"metric_type": "freespace"
},
"numpin": {
"metric_ttl": "10s"
}
}
}
machine2, service.json:
{
"cluster": {
"id": "QmWoon78YVxzixMX3AG54mpZNuQsGYXjvTuj9XfsjVSDv9",
"private_key": "<private-key>",
"secret": "9a42070d8e8e3016bfd5cb17e34220fdd4abb7c6e5ec0e3c2016c8545faf438d",
"peers": [],
"bootstrap": [],
"leave_on_shutdown": false,
"listen_multiaddress": "/ip4/0.0.0.0/tcp/9096",
"state_sync_interval": "1m0s",
"ipfs_sync_interval": "2m10s",
"replication_factor": -1,
"monitor_ping_interval": "15s"
},
"consensus": {
"raft": {
"heartbeat_timeout": "1s",
"election_timeout": "1s",
"commit_timeout": "50ms",
"max_append_entries": 64,
"trailing_logs": 10240,
"snapshot_interval": "2m0s",
"snapshot_threshold": 8192,
"leader_lease_timeout": "500ms"
}
},
"api": {
"restapi": {
"listen_multiaddress": "/ip4/127.0.0.1/tcp/9094",
"read_timeout": "30s",
"read_header_timeout": "5s",
"write_timeout": "1m0s",
"idle_timeout": "2m0s",
"basic_auth_credentials": null
}
},
"ipfs_connector": {
"ipfshttp": {
"proxy_listen_multiaddress": "/ip4/127.0.0.1/tcp/9095",
"node_multiaddress": "/ip4/127.0.0.1/tcp/5001",
"connect_swarms_delay": "7s",
"proxy_read_timeout": "10m0s",
"proxy_read_header_timeout": "5s",
"proxy_write_timeout": "10m0s",
"proxy_idle_timeout": "1m0s"
}
},
"monitor": {
"monbasic": {
"check_interval": "15s"
}
},
"informer": {
"disk": {
"metric_ttl": "30s",
"metric_type": "freespace"
},
"numpin": {
"metric_ttl": "10s"
}
}
}
machine1, docker exec ipfs-node ipfs-cluster-ctl id:
QmbRwyFjjKVatfZDRxNKUtnRoWqZp7Eh4gKG8q2eqdktqX | 0 peers
> Addresses:
- /ip4/127.0.0.1/tcp/9096/ipfs/QmbRwyFjjKVatfZDRxNKUtnRoWqZp7Eh4gKG8q2eqdktqX
- /ip4/172.18.0.4/tcp/9096/ipfs/QmbRwyFjjKVatfZDRxNKUtnRoWqZp7Eh4gKG8q2eqdktqX
> IPFS: QmNPbmXBhnJGJEFyuCZAHRc2t6vtZaPBKZcmJbHaRt5uWz
- /ip4/127.0.0.1/tcp/4001/ipfs/QmNPbmXBhnJGJEFyuCZAHRc2t6vtZaPBKZcmJbHaRt5uWz
- /ip4/172.18.0.4/tcp/4001/ipfs/QmNPbmXBhnJGJEFyuCZAHRc2t6vtZaPBKZcmJbHaRt5uWz
machine2, docker exec ipfs-node ipfs-cluster-ctl id:
QmW9wAZtDG8EkiP2NkMEQUhRLCit1ocG2JSd4QwoDLQYUz | 0 peers
> Addresses:
- /ip4/127.0.0.1/tcp/9096/ipfs/QmW9wAZtDG8EkiP2NkMEQUhRLCit1ocG2JSd4QwoDLQYUz
- /ip4/172.18.0.4/tcp/9096/ipfs/QmW9wAZtDG8EkiP2NkMEQUhRLCit1ocG2JSd4QwoDLQYUz
> IPFS: QmabDq9z9DYZQWpCdY7eNT1rxjjpJJQ77RwfLo6TcAggfD
- /ip4/127.0.0.1/tcp/4001/ipfs/QmabDq9z9DYZQWpCdY7eNT1rxjjpJJQ77RwfLo6TcAggfD
- /ip4/172.18.0.4/tcp/4001/ipfs/QmabDq9z9DYZQWpCdY7eNT1rxjjpJJQ77RwfLo6TcAggfD
What Im doing wrong ?