zip_dia
Hi,

I am receiving the error:
Error: error getting broadcast client: orderer client failed to connect to localhost:10050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:10050: connect: connection refused"

when I run chaincodeInvoke:


    # Create Car
    peer chaincode invoke -o localhost:10050 \
        --ordererTLSHostnameOverride orderer4.example.com \
        --tls $CORE_PEER_TLS_ENABLED \
        --cafile $ORDERER_CA \
        -C $CHANNEL_NAME -n ${CC_NAME} \
        --peerAddresses localhost:7051 \
        --tlsRootCertFiles $PEER0_ORG1_CA \
        --peerAddresses localhost:9051 --tlsRootCertFiles $PEER0_ORG2_CA \
        -c '{"function": "createCar","Args":["Car-1111", "Audi", "R8", "Red", "Pavan"]}'


This is while doing the Blockchain Developer certification
Thanks for your help
Reply 0 0
admin
Hii zip_dia,

This error indicates that the orderer client is failed to connect to the specified address and port. Below are some steps to fix this issue:
 
1. Make sure that the port on the order is running on port 10050. Using the docker ps command to check the port number for the container.
2. Check that the TLS certificates and CA files are correctly configured for both the orderer and the peers. Ensure that the certificates and CA files are up to date and match the configuration of your network.
3. If none of the above steps work, try restarting the orderer and peers, and try the command again.

Regards,
Blockchain Council
Reply 0 0
Reply