docs: fix missing --tlsRootCertFiles in CLI examples#5471
Open
mishalshanavas wants to merge 1 commit into
Open
docs: fix missing --tlsRootCertFiles in CLI examples#5471mishalshanavas wants to merge 1 commit into
mishalshanavas wants to merge 1 commit into
Conversation
Contributor
Author
|
Reproduction steps (using Before (old example — broken): peer chaincode invoke -o localhost:7050 -C mychannel -n basic \
--peerAddresses localhost:7051 \
--peerAddresses localhost:9051 \
-c '{"function":"InitLedger","Args":[]}'
# Error: error validating peer connection parameters: number of peer addresses (2)
# does not match the number of TLS root cert files (1)After (fixed example): peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com \
--tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" \
-C mychannel -n basic \
--peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" \
--peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" \
-c '{"function":"InitLedger","Args":[]}'
# Chaincode invoke successful. result: status:200 |
b131bfd to
bb4decc
Compare
The wrapper postscript examples for 'peer chaincode invoke' and 'peer lifecycle chaincode commit' were missing the --tlsRootCertFiles flag when --peerAddresses was used in a TLS-enabled network. Without this flag, both commands would fail to connect to peers when TLS is enabled. Updated examples to pair --tlsRootCertFiles with each --peerAddresses entry, consistent with the pattern used in docs/source/endorsement-policies.rst and other tutorials. Signed-off-by: mishalshanavas <mishalshanavas8@gmail.com>
bb4decc to
d2e79c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title:
docs: fix missing --tlsRootCertFiles in peer chaincode CLI examplesType of change
Description
Two CLI examples in the wrapper documentation files were missing the
--tlsRootCertFilesflag, which must be paired 1:1 with each--peerAddressesentry when TLS is enabled.docs/wrappers/peer_chaincode_postscript.md: thepeer chaincode invokeexample had no TLS flags at all — added--tls --cafilefor the orderer and--tlsRootCertFilesfor each peer address.docs/wrappers/peer_lifecycle_chaincode_postscript.md: thepeer lifecycle chaincode commitexample had--tls --cafileset (TLS on) but was missing--tlsRootCertFilesfor both peer addresses.Additional details
Tested on
fabric-samples/test-networkwith a live TLS-enabled network.