Last active
May 15, 2017 13:35
-
-
Save hvram1/aff4891f5fda9c11032dc855b2cc33f0 to your computer and use it in GitHub Desktop.
Hyperledger chaincode instantiation error
This file contains 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
===================== Chaincode is installed on remote peer PEER0 ===================== | |
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_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key | |
CORE_PEER_LOCALMSPID=Org2MSP | |
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock | |
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt | |
CORE_PEER_TLS_ENABLED=true | |
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp | |
CORE_PEER_ID=cli | |
CORE_LOGGING_LEVEL=DEBUG | |
CORE_PEER_ADDRESS=peer0.org2.example.com:7051 | |
2017-05-15 10:07:54.093 UTC [msp] getMspConfig -> INFO 001[0m intermidiate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/intermediatecerts: no such file or directory] | |
2017-05-15 10:07:54.094 UTC [msp] getMspConfig -> INFO 002[0m crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/crls: no such file or directory] | |
2017-05-15 10:07:54.094 UTC [msp] getMspConfig -> INFO 003[0m MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/config.yaml: no such file or directory] | |
[36m2017-05-15 10:07:54.135 UTC [msp] GetLocalMSP -> DEBU 004[0m Returning existing local MSP | |
[36m2017-05-15 10:07:54.135 UTC [msp] GetDefaultSigningIdentity -> DEBU 005[0m Obtaining default signing identity | |
[36m2017-05-15 10:07:54.135 UTC [golang-platform] collectChaincodeFiles -> DEBU 006[0m not using input for hash computation for path:"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" name:"mycc" version:"1.0" | |
[36m2017-05-15 10:07:54.135 UTC [golang-platform] getCodeFromFS -> DEBU 007[0m getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 | |
[36m2017-05-15 10:07:54.135 UTC [util] HashFilesInDir -> DEBU 008[0m hashFiles /opt/gopath/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 | |
2017-05-15 10:07:54.139 UTC [golang-platform] writeGopathSrc -> INFO 009[0m rootDirectory = /opt/gopath/src | |
2017-05-15 10:07:54.139 UTC [container] WriteFolderToTarPackage -> INFO 00a[0m rootDirectory = /opt/gopath/src | |
[36m2017-05-15 10:07:54.277 UTC [msp] Sign -> DEBU 00b[0m Sign: plaintext: 0AA2070A5C08031A0C08FAFBE5C80510...CBF867000000FFFFF0824D67001C0000 | |
[36m2017-05-15 10:07:54.277 UTC [msp] Sign -> DEBU 00c[0m Sign: digest: F29D2F6A6E9C675517075370387168384D7C03937737B173038D123780723BE6 | |
[36m2017-05-15 10:07:54.281 UTC [chaincodeCmd] install -> DEBU 00d[0m Installed remotely response:<status:200 payload:"OK" > | |
2017-05-15 10:07:54.282 UTC [main] main -> INFO 00e[0m Exiting..... | |
===================== Chaincode is installed on remote peer PEER2 ===================== | |
Instantiating chaincode on Peer2/Org2 ... | |
+ PEER=2 | |
+ setGlobals 2 | |
+ '[' 2 -eq 0 -o 2 -eq 1 ']' | |
+ CORE_PEER_LOCALMSPID=Org2MSP | |
+ 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@org2.example.com/msp | |
+ '[' 2 -eq 2 ']' | |
+ CORE_PEER_ADDRESS=peer0.org2.example.com:7051 | |
+ env | |
+ grep CORE | |
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_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key | |
CORE_PEER_LOCALMSPID=Org2MSP | |
CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock | |
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt | |
CORE_PEER_TLS_ENABLED=true | |
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp | |
CORE_PEER_ID=cli | |
CORE_LOGGING_LEVEL=DEBUG | |
CORE_PEER_ADDRESS=peer0.org2.example.com:7051 | |
+ '[' -z true -o true = false ']' | |
+ peer chaincode instantiate -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/cacerts/ca.example.com-cert.pem -C harichan -n mycc -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'OR ('\''Org1MSP.member'\'','\''Org2MSP.member'\'')' | |
+ res=1 | |
+ cat log.txt | |
2017-05-15 10:07:54.377 UTC [msp] getMspConfig -> INFO 001[0m intermidiate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/intermediatecerts: no such file or directory] | |
2017-05-15 10:07:54.377 UTC [msp] getMspConfig -> INFO 002[0m crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/crls: no such file or directory] | |
2017-05-15 10:07:54.377 UTC [msp] getMspConfig -> INFO 003[0m MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/config.yaml: no such file or directory] | |
[36m2017-05-15 10:07:54.419 UTC [msp] GetLocalMSP -> DEBU 004[0m Returning existing local MSP | |
[36m2017-05-15 10:07:54.419 UTC [msp] GetDefaultSigningIdentity -> DEBU 005[0m Obtaining default signing identity | |
2017-05-15 10:07:54.428 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 006[0m Using default escc | |
2017-05-15 10:07:54.428 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 007[0m Using default vscc | |
[36m2017-05-15 10:07:54.429 UTC [msp] Sign -> DEBU 008[0m Sign: plaintext: 0AAC070A6608031A0C08FAFBE5C80510...324D53500A04657363630A0476736363 | |
[36m2017-05-15 10:07:54.429 UTC [msp] Sign -> DEBU 009[0m Sign: digest: 1478467FB4600A3D2DF5DE6270C7D8027457F70CFA4E1BB39CB7C1EFE8B46FF5 | |
Error: Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image | |
Usage: | |
peer chaincode instantiate [flags] |
This file contains 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
λ docker ps --format "{{.ID}} : {{.Image}} : {{.Status}} : {{.Names}}" | |
e96f9c901b58 : hyperledger/fabric-testenv : Up 4 minutes : cli | |
9bf8a7757d9b : hyperledger/fabric-orderer : Up 4 minutes : orderer.example.com | |
11894105db83 : hyperledger/fabric-peer : Up 4 minutes : peer0.org1.example.com | |
508e72d611ab : hyperledger/fabric-peer : Up 4 minutes : peer1.org2.example.com | |
efb062adff31 : hyperledger/fabric-peer : Up 4 minutes : peer1.org1.example.com | |
705b026fa6a2 : hyperledger/fabric-peer : Up 4 minutes : peer0.org2.example.com | |
5524f0c0baca : hyperledger/fabric-ca:x86_64-1.0.0-alpha : Up 4 minutes : ca_peerOrg1 | |
3be3f3e371f1 : hyperledger/fabric-ca:x86_64-1.0.0-alpha : Up 4 minutes : ca_peerOrg2 | |
E:\projects\hyperledger-local\e2e_cli | |
λ docker images | |
REPOSITORY TAG IMAGE ID CREATED SIZE | |
10.200.208.11:5000/hyperledger/fabric-ccenv latest b5948741383b 8 days ago 1.29 GB | |
hyperledger/fabric-ccenv 1.0.0-snapshot-f5987e2 b5948741383b 8 days ago 1.29 GB | |
hyperledger/fabric-ccenv latest b5948741383b 8 days ago 1.29 GB | |
hyperledger/fabric-testenv latest 4a487b93966f 8 days ago 1.4 GB | |
hyperledger/fabric-orderer latest 377e857c0436 8 days ago 182 MB | |
hyperledger/fabric-peer latest 36cf446acc15 8 days ago 185 MB | |
hyperledger/fabric-ca x86_64-1.0.0-alpha 35311d8617b4 8 weeks ago 240 MB | |
hyperledger/fabric-baseos x86_64-0.3.0 c3a4cf3b3350 3 months ago 161 MB | |
d4w/nsenter latest 9e4f13a0901e 7 months ago 83.8 kB |
This file contains 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
[36m2017-05-15 10:07:54.433 UTC [chaincode] launchAndWaitForRegister -> DEBU 420[0m start container with env: | |
CORE_CHAINCODE_ID_NAME=mycc:1.0 | |
CORE_PEER_TLS_ENABLED=true | |
CORE_CHAINCODE_LOGLEVEL=WARNING | |
CORE_CHAINCODE_LOGFORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message} | |
[36m2017-05-15 10:07:54.433 UTC [container] lockContainer -> DEBU 421[0m waiting for container(dev-peer0.org2.example.com-mycc-1.0) lock | |
[36m2017-05-15 10:07:54.433 UTC [container] lockContainer -> DEBU 422[0m got container (dev-peer0.org2.example.com-mycc-1.0) lock | |
[36m2017-05-15 10:07:54.433 UTC [dockercontroller] Start -> DEBU 423[0m Cleanup container dev-peer0.org2.example.com-mycc-1.0 | |
[36m2017-05-15 10:07:54.434 UTC [dockercontroller] stopInternal -> DEBU 424[0m Stop container dev-peer0.org2.example.com-mycc-1.0(No such container: dev-peer0.org2.example.com-mycc-1.0) | |
[36m2017-05-15 10:07:54.435 UTC [dockercontroller] stopInternal -> DEBU 425[0m Kill container dev-peer0.org2.example.com-mycc-1.0 (No such container: dev-peer0.org2.example.com-mycc-1.0) | |
[36m2017-05-15 10:07:54.435 UTC [dockercontroller] stopInternal -> DEBU 426[0m Remove container dev-peer0.org2.example.com-mycc-1.0 (No such container: dev-peer0.org2.example.com-mycc-1.0) | |
[36m2017-05-15 10:07:54.435 UTC [dockercontroller] Start -> DEBU 427[0m Start container dev-peer0.org2.example.com-mycc-1.0 | |
[36m2017-05-15 10:07:54.435 UTC [dockercontroller] getDockerHostConfig -> DEBU 428[0m docker container hostconfig NetworkMode: e2ecli_default | |
[36m2017-05-15 10:07:54.436 UTC [dockercontroller] createContainer -> DEBU 429[0m Create container: dev-peer0.org2.example.com-mycc-1.0 | |
[36m2017-05-15 10:07:54.438 UTC [dockercontroller] Start -> DEBU 42a[0m start-could not find image ...attempt to recreate image no such image | |
[36m2017-05-15 10:07:54.440 UTC [chaincode-platform] generateDockerfile -> DEBU 42b[0m | |
FROM hyperledger/fabric-baseos:x86_64-0.3.0 | |
ADD binpackage.tar /usr/local/bin | |
LABEL org.hyperledger.fabric.chaincode.id.name="mycc" \ | |
org.hyperledger.fabric.chaincode.id.version="1.0" \ | |
org.hyperledger.fabric.chaincode.type="GOLANG" \ | |
org.hyperledger.fabric.version="1.0.0-snapshot-f5987e2" \ | |
org.hyperledger.fabric.base.version="0.3.0" | |
ENV CORE_CHAINCODE_BUILDLEVEL=1.0.0-snapshot-f5987e2 | |
ENV CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer.crt | |
COPY peer.crt /etc/hyperledger/fabric/peer.crt | |
[31m2017-05-15 10:07:54.456 UTC [chaincode-platform] func1 -> ERRO 42c[0m Failed to generate platform-specific docker build: Error creating container: no such image | |
[31m2017-05-15 10:07:54.456 UTC [dockercontroller] deployImage -> ERRO 42d[0m Error building images: Failed to generate platform-specific docker build: Error creating container: no such image | |
[31m2017-05-15 10:07:54.456 UTC [dockercontroller] deployImage -> ERRO 42e[0m Image Output: | |
******************** | |
******************** | |
[36m2017-05-15 10:07:54.456 UTC [container] unlockContainer -> DEBU 42f[0m container lock deleted(dev-peer0.org2.example.com-mycc-1.0) | |
[31m2017-05-15 10:07:54.456 UTC [chaincode] Launch -> ERRO 430[0m launchAndWaitForRegister failed Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image | |
[36m2017-05-15 10:07:54.456 UTC [lockbasedtxmgr] Done -> DEBU 431[0m Done with transaction simulation / query execution [e5c0c063-d4d6-4dcf-95aa-43084f435fd0] | |
[36m2017-05-15 10:07:55.756 UTC [deliveryClient] StopDeliverForChannel -> DEBU 432[0m This peer will stop pass blocks from orderer service to other peers | |
[33m2017-05-15 10:07:55.756 UTC [blocksProvider] DeliverBlocks -> WARN 433[0m Receive error: Client is closing |
In case anybody is hitting this gist from google then this problem is solved .
I had to tag the ccenv image as hyperledger/fabric-ccenv:x86_64-1.0.0-snapshot-f5987e2 . I had done only 1.0.0-snapshot-f5987e2 . (i.e.) I missed the x86_64- prefix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hyperledger logs