0
votes

There is a particular issue with my Chaincode deployment in Hyperledger 1.4 - while UPGRADING Chaincodes.

I'm using NODE FABRIC SDK to install,instantiate and upgrade chaincodes. My env is Docker Containers on a single machine with 4 ORG and 2 PEER each.

As per the lifecycle guidelines - an upgarde is very similar to new installation of chaincode with respect to install, instantiate (upgrade), invoke.

Install goes on fine - but while instantiating I get the following error:

2020-11-10 14:41:39.321 UTC [core.comm] ServerHandshake -> ERRO 15a7 TLS handshake failed with error tls: client didn't provide a certificate server=ChaincodeServer remoteaddress=172.20.0.28:47086

2020-11-10 14:41:39.322 UTC [peer.chaincode.dev-peer0.xxx.local.xxx.ae-agmaccounttransactions-v5] func2 -> INFO 15a8 2020-11-10 14:41:39.321 UTC [shim] userChaincodeStreamGetter -> ERRO 001 Error trying to connect to local peer: remote error: tls: bad certificate

If someone has got any clue please do let me know.

My env VARIABLES at the peer level (where I am trying to instantiate).

declare -x CORE_LEDGER_STATE_STATEDATABASE="CouchDB"
declare -x CORE_LOGGING_PEER="debug"
declare -x CORE_PEER_ADDRESS="peer0.xxx.local.ubn.xx:7051"
declare -x CORE_PEER_ID="peer0.xxx.local.ubn.xx"
declare -x CORE_PEER_LOCALMSPID="DxxMSP"
declare -x CORE_PEER_MSPCONFIGPATH="/etc/hyperledger/fabric/msp"
declare -x CORE_PEER_TLS_CERT_FILE="/etc/hyperledger/fabric/msp/signcerts/peer0.xxx.local.ubn.xx-cert.pem"
declare -x CORE_PEER_TLS_CLIENTAUTHREQUIRED="false"
declare -x CORE_PEER_TLS_ENABLED="true"
declare -x CORE_PEER_TLS_KEY_FILE="/etc/hyperledger/fabric/msp/keystore/9fc50c7d9031b7e4a6432609c1ec424cd71010664e1b74442ef31c05dbd5f041_sk"
declare -x CORE_PEER_TLS_ROOTCERT_FILE="/etc/hyperledger/fabric/msp/cacerts/ca.xxx.local.ubn.xx-cert.pem"
declare -x CORE_VM_DOCKER_ATTACHSTDOUT="true"
declare -x CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE="fixtures_default"
declare -x CORE_VM_ENDPOINT="unix:///host/var/run/docker.sock"
declare -x FABRIC_CFG_PATH="/etc/hyperledger/fabric"
declare -x HOME="/root"```
1

1 Answers

0
votes

Based on the some reasearch - I found out the following things: The issue with BAD TLS could be due to a wrong set of VENDORING libraries with chaincode itslef.

For my particular case - I was bundling fabric 1.0.5 vendor support files with 1.4 chaincode and that was causing all my issues. Once I re-vendored my chaincode everything was a breeze.

There is a great tutorial kind of video from @muralisr of hyperledger project - in my view very importing aspect of BC Development to include external libraries in HYPERLEDER project.

https://www.youtube.com/watch?v=-mlUaJbFHcM