fabric-samples icon indicating copy to clipboard operation
fabric-samples copied to clipboard

Error: "After 5 attempts, peer0.org1 has failed to join channel 'mychannel'"

Open Logof opened this issue 2 years ago • 3 comments

OS: Linux 6.1.11-arch1-1 x86_64 Docker version 23.0.1, build a5ee5b1dfc

run: $ ./fabcar/startFabric.sh javascript

result:

Channel 'mychannel' created
Joining org1 peer to the channel...
Using organization 1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
+ peer channel join -b ./channel-artifacts/mychannel.block
+ res=1
2023-02-13 17:00:15.727 +05 0001 ERRO [comm.tls] ClientHandshake -> Client TLS handshake failed after 207.71µs with error: EOF remoteaddress=[::1]:7051
2023-02-13 17:00:16.728 +05 0002 ERRO [comm.tls] ClientHandshake -> Client TLS handshake failed after 247.081µs with error: EOF remoteaddress=[::1]:7051
2023-02-13 17:00:18.158 +05 0003 ERRO [comm.tls] ClientHandshake -> Client TLS handshake failed after 234.759µs with error: EOF remoteaddress=[::1]:7051
Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: context deadline exceeded
After 5 attempts, peer0.org1 has failed to join channel 'mychannel' 

If you delete everything and download it again, then everything starts working until the first reboot.

Logof avatar Feb 13 '23 12:02 Logof

After you shut down the network using the network.sh down, make sure the container volumes are also removed. You can try running docker volume rm $(docker volume ls -q) -f (this will remove all the volumes, be cautious)

adityajoshi12 avatar Mar 05 '23 14:03 adityajoshi12

Suggested way to remove docker containers doesn't work. I fixed the problem by editing the line in startFabric.sh ./network.sh up createChannel -ca #-s couchdb

Logof avatar Mar 06 '23 06:03 Logof

./network.sh down is having issue on removing the container's volumes. Volume removing command with the volume names, use the command prefixed with compose_ instead of docker_. Just change it to work properly.

image

mohankumar90 avatar Apr 10 '23 13:04 mohankumar90