Welcome to the Linux Foundation Forum!

Apple M1: Channel creation failed: orderer client failed to connect to localhost:7050

Options

I tried to do network down and then network up then sudo ./network.sh up createChannel -ca -s couchdb but I still encounter this error. Please help as I'm stuck on this.

Creating channel mychannel
Using organization 1

  • peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /Users/ciel/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
  • peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /Users/ciel/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
  • peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /Users/ciel/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
  • peer channel create -o localhost:7050 -c mychannel --ordererTLSHostnameOverride orderer.example.com -f ./channel-artifacts/mychannel.tx --outputBlock ./channel-artifacts/mychannel.block --tls --cafile /Users/ciel/go/src/github.com/hyperledger/fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
  • res=1
    Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp [::1]:7050: connect: connection refused"
    Channel creation failed

Best Answer

Answers

  • skyrocket55
    skyrocket55 Posts: 5
    Options

    reinstalled docker and followed the steps here https://dev.to/capriciousrebel/getting-started-with-hyperledger-fabric-on-macos-2937 and getting this error now

    Error: Post "https://localhost:7053/participation/v1/channels": dial tcp [::1]:7053: connect: connection refused

    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
      Error: error getting endorser client for channel: endorser client failed to connect to localhost:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp [::1]:7051: connect: connection refused"
      After 5 attempts, peer0.org1 has failed to join channel 'mychannel'
  • Bobbijn
    Bobbijn Posts: 191
    Options

    Hello @skyrocket55 ,

    Welcome to the Developers course for Fabric. Getting the system set up correctly is imperative for success in the course.

    The error you're encountering is related to a connection issue with the orderer and peer services, which suggests they might not be running or are inaccessible at the specified ports.
    First, please ensure that all Docker containers for your network are up and running using the docker ps command.
    If they're not running, you might need to check your Docker setup and restart.

    Also, ensure there are no network conflicts, and the ports mentioned in the error messages are correctly mapped and accessible.

    Additionally, double-check the configuration files for any discrepancies in the port numbers or addresses. For more detailed troubleshooting, consider revisiting the network setup instructions or consulting Hyperledger Fabric's official documentation for guidance on resolving connection issues.

    Let me know if this helps, Bobbi

Categories

Upcoming Training