hyperledger/fabric · error
Failed sending proposal, got %s
Error message
Failed sending proposal, got %s
What it means
Error in getChannels: the endorser client's ProcessProposal call for the peer's channels-list proposal returned a transport/gRPC error; %s is that error. It usually means the peer is unreachable, TLS misconfigured, or the endorser service rejected the connection.
Source
Thrown at internal/peer/channel/list.go:69
},
}
var prop *pb.Proposal
c, _ := cc.cf.Signer.Serialize()
prop, _, err = protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, "", invocation, c)
if err != nil {
return nil, fmt.Errorf("Cannot create proposal, due to %s", err)
}
var signedProp *pb.SignedProposal
signedProp, err = protoutil.GetSignedProposal(prop, cc.cf.Signer)
if err != nil {
return nil, fmt.Errorf("Cannot create signed proposal, due to %s", err)
}
proposalResp, err := cc.cf.EndorserClient.ProcessProposal(context.Background(), signedProp)
if err != nil {
return nil, fmt.Errorf("Failed sending proposal, got %s", err)
}
if proposalResp.Response == nil || proposalResp.Response.Status != http.StatusOK {
return nil, fmt.Errorf("Received bad response, status %d: %s", proposalResp.Response.Status, proposalResp.Response.Message)
}
var channelQueryResponse pb.ChannelQueryResponse
err = proto.Unmarshal(proposalResp.Response.Payload, &channelQueryResponse)
if err != nil {
return nil, fmt.Errorf("Cannot read channels list response, %s", err)
}
return channelQueryResponse.Channels, nil
}
func list(cf *ChannelCmdFactory) error {
var err error
if cf == nil {View on GitHub (pinned to 2736b63f8f)
Solutions
- Verify the peer is running and the address/port in --peerAddress is correct
- Provide --tlsRootCertFile matching the peer's TLS CA when TLS is enabled
- Test connectivity (nc/openssl s_client) to the endorser port from the client host
- Check peer logs and gRPC keepalive/deadline settings if timeouts occur
Example fix
// before: wrong port -> connection refused peer channel list --peerAddress peer0.example.com:7050 // after peer channel list --peerAddress peer0.example.com:7051 --tlsRootCertFile tls/ca.crt
Defensive patterns
Strategy: retry
Validate before calling
// pre-flight: TLS and reachability
conn, err := tls.DialWithDialer(&net.Dialer{Timeout: 3 * time.Second}, "tcp", host,
&tls.Config{RootCAs: caPool})
if err != nil { return fmt.Errorf("cannot reach endorser over TLS: %w", err) }
conn.Close() Try / catch
proposalResp, err := cc.cf.EndorserClient.ProcessProposal(context.Background(), signedProp)
if err != nil {
// transient network errors: retry with backoff; TLS/cert errors: fix config, don't retry
return nil, fmt.Errorf("Failed sending proposal, got %s", err)
} Prevention
- Match --peerAddress to the peer's TLS certificate SAN
- Always supply --tlsRootCertFile for TLS peers
- Health-check the peer service in scripts before calls
- Watch for container DNS/port-mapping mistakes (7051 vs mapped port)
When it happens
Trigger: EndorserClient.ProcessProposal returns an error — peer unreachable, connection refused, TLS handshake failure, gRPC deadline exceeded, or the peer closing the connection.
Common situations: Peer service down or wrong --peerAddress; missing --tlsRootCertFile for a TLS-enabled peer; network/firewall/DNS issues in containers; client cert not trusted under mutual TLS.
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- failed sending proposal, due to %s
- orderer `%s` hung up without sending status
- received nil proposal response
- received nil proposal response
- received nil proposal response
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/98623582a8f7a4db.
Report an issue: GitHub.