보안 및 블록체인/블록체인
하이퍼레저 패브릭(Hyperledger Fabric) v2.2 - but chaincode is not installed 에러
1Seok
2022. 8. 4. 17:33
에러
peer lifecycle chaincode commit \
-o localhost:7050 \
--ordererTLSHostnameOverride orderer.example.com \
--tls \
--cafile $ORDERER_CA \
--channelID mychannel \
--name 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 \
--version 1 \
--sequence 1
명령어 이후 아래와 같은 오류발생
new2 - 체인코드 이름
Error: endorsement failure during invoke. response: status:500 message:"make sure the chaincode new2 has been su
ccessfully defined on channel mychannel and try again: chaincode definition for 'new2' exists, but chaincode is not installed"
해결방법
조직내에서 체인코드를 설치하지 못한 조직이 존재하기 때문에 발생한 오류
1. 채널에 가입된 Peer에 Installed된 chaincode확인
peer lifecycle chaincode queryinstalled
2. 확인해본 결과 현재 지정된 피어의 체인코드 new2의 레이블로 지정한 new_2가 없음
3. new2 체인코드 설치후 invoke하면 오류없이 정상으로 네트워크에 기록됨
peer lifecycle chaincode install new2.tar.gz