Re: ValidateLSCCInvocation failed error


jay park
 

Thank you for your help.
I was in wrong place. Yes, you are right. The container just started once we invoke.

Thanks again,
Jay.



From: David Enyeart <enyeart@...>
Sent: Wednesday, February 10, 2021 5:37 PM
To: jay park <jungil.park@...>
Cc: fabric@... <fabric@...>
Subject: Re: [Hyperledger Fabric] ValidateLSCCInvocation failed error
 

You should not upgrade a 2nd or 3rd time.
Again - 'Upgrade' is a transaction on the channel, therefore you only need to do it once for the whole channel, not per peer or per organization.
The chaincode image will be built on each peer and chaincode container will spin up automatically when needed. When you invoke chaincode on the 3rd peer, are you getting some error message that leads you to believe that it can't start the container?


Dave Enyeart

"jay park" ---02/10/2021 07:53:09 AM---Hi David, Thank you for your response.

From: "jay park" <jungil.park@...>
To: David Enyeart <enyeart@...>
Cc: "fabric@..." <fabric@...>
Date: 02/10/2021 07:53 AM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] ValidateLSCCInvocation failed error
Sent by: fabric@...





Hi David, Thank you for your response. If you see below log, I first...
This Message Is From an External Sender
This message came from outside your organization.
Hi David,

Thank you for your response.

If you see below log, I first install on 4 peers.
And then upgrade two peers with success.
And third one is failed.

Actually, my problem is I have only two chaincode containers, I need one more for a different peer.
Could you advise how to do it?


===================== Chaincode is installed on peer1.org2 =====================
Upgrading chaincode on peer0.org1...
CORE_PEER_LOCALMSPID=Org1MSP
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ID=cli
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@.../msp
CORE_PEER_TLS_ENABLED=true
+ peer chaincode upgrade -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n chaincode -l golang -v 2.55133w -c '{"Args":["init","1","0"]}' -P 'OR ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
2021-02-10 11:49:58.434 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:58.437 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:58.445 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2021-02-10 11:49:58.445 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
+ res=0
+ set +x
2021-02-10 11:49:49.403 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:49.406 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:49.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2021-02-10 11:49:49.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2021-02-10 11:49:58.386 UTC [chaincodeCmd] submitInstallProposal -> INFO 005 Installed remotely: response:<status:200 payload:"OK" >
===================== Chaincode is upgraded on org1 peer0 =====================

Upgrading chaincode on peer0.org2...
CORE_PEER_LOCALMSPID=Org2MSP
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ID=cli
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@.../msp
CORE_PEER_TLS_ENABLED=true
+ peer chaincode upgrade -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n chaincode -l golang -v 2.55133w -c '{"Args":["init","2","0"]}' -P 'OR ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
2021-02-10 11:49:59.039 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:59.042 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:59.069 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2021-02-10 11:49:59.069 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
+ res=0
+ set +x
2021-02-10 11:49:49.403 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:49.406 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:49.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2021-02-10 11:49:49.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2021-02-10 11:49:58.386 UTC [chaincodeCmd] submitInstallProposal -> INFO 005 Installed remotely: response:<status:200 payload:"OK" >
===================== Chaincode is upgraded on org2 peer0 =====================

Upgrading chaincode on peer1.org1...
CORE_PEER_LOCALMSPID=Org1MSP
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ID=cli
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@.../msp
CORE_PEER_TLS_ENABLED=true
+ peer chaincode upgrade -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n chaincode -l golang -v 2.55133w -c '{"Args":["init","1","1"]}' -P 'OR ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')'
2021-02-10 11:49:59.778 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:59.781 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:59.795 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2021-02-10 11:49:59.795 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg version already exists for chaincode with name 'chaincode'
+ res=1
+ set +x
2021-02-10 11:49:49.403 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:49.406 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2021-02-10 11:49:49.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2021-02-10 11:49:49.415 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2021-02-10 11:49:58.386 UTC [chaincodeCmd] submitInstallProposal -> INFO 005 Installed remotely: response:<status:200 payload:"OK" >
!!!!!!!!!!!!!!! Chaincode upgrade on org1 peer1 has Failed !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute End-2-End Scenario ===========








From: David Enyeart <enyeart@...>
Sent:
Tuesday, February 9, 2021 6:29 PM
To:
jay park <jungil.park@...>
Cc:
fabric@... <fabric@...>
Subject:
Re: [Hyperledger Fabric] ValidateLSCCInvocation failed error

It looks like you are using legacy chaincode. 'Upgrade' is a transaction on the channel, therefore you only need to do it once for the whole channel, not per peer or per organization.


Dave Enyeart

"jay park" ---02/08/2021 05:07:42 PM---Hi Team, I have two organizations and two peers each. For some reason, we just upgraded only one pee

From:
"jay park" <jungil.park@...>
To:
David Enyeart <enyeart@...>
Cc:
"fabric@..." <fabric@...>
Date:
02/08/2021 05:07 PM
Subject:
[EXTERNAL] [Hyperledger Fabric] ValidateLSCCInvocation failed error
Sent by:
fabric@...





Hi Team, I have two organizations and two peers each. For some...
This Message Is From an External Sender
This message came from outside your organization.
Hi Team,

I have two organizations and two peers each. For some reason, we just upgraded only one peer in each organization (but installed chaincode all peers).
Now I need to run all 4 peers but I have got error like below.
Does anyone know what could be the reason? And let me know how to fix it?

HF version : 2.1


Log :


2021-02-08 21:56:41.254 UTC [
BAAS-peer1.org1.example.com] [vscc] Validate -> ERRO 586 VSCC error: ValidateLSCCInvocation failed, err Existing version of the cc on the ledger (2.009) should be different from the upgraded one
2021-02-08 21:56:41.254 UTC [
BAAS-peer1.org1.example.com] [committer.txvalidator] ValidateWithPlugin -> DEBU 587 Transaction 58c925c7e278c656fac4638c3dd4b64e99a99cb3c1e0257ad17a0f6946b8e0fa appears to be invalid: Existing version of the cc on the ledger (2.009) should be different from the upgraded one
2021-02-08 21:56:41.254 UTC [
BAAS-peer1.org1.example.com] [committer.txvalidator] validateTx -> ERRO 588 VSCCValidateTx for transaction txId = 58c925c7e278c656fac4638c3dd4b64e99a99cb3c1e0257ad17a0f6946b8e0fa returned error: Existing version of the cc on the ledger (2.009) should be different from the upgraded one

Best Regards,
Jungil.







Join {fabric@lists.hyperledger.org to automatically receive all group messages.