2
votes

I created and joined the channel, I could not install test chaincode via the CLI. It was successful when I am using Alpha2.

I have the following error message at CLI:

root@18599095828d:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n mycc -v 1.0 -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 2017-06-13 08:09:17.401 UTC [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/intermediatecerts: no such file or directory] 2017-06-13 08:09:17.401 UTC [msp] getMspConfig -> INFO 002 crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/intermediatecerts]. Skipping.: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/crls: no such file or directory] 2017-06-13 08:09:17.401 UTC [msp] getMspConfig -> INFO 003 MSP configuration file not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/config.yaml]: [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp/config.yaml: no such file or directory] 2017-06-13 08:09:17.424 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP 2017-06-13 08:09:17.424 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity 2017-06-13 08:09:17.425 UTC [golang-platform] getCodeFromFS -> DEBU 006 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining imports: go list: failed with error: "exec: not started"

 
Usage:
  peer chaincode install [flags]

Global Flags:
      --cafile string              Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
  -C, --chainID string             The chain on which this command should be executed (default "testchainid")
  -c, --ctor string                Constructor message for the chaincode in JSON format (default "{}")
  -E, --escc string                The name of the endorsement system chaincode to be used for this chaincode
  -l, --lang string                Language the chaincode is written in (default "golang")
      --logging-level string       Default logging level and overrides, see core.yaml for full syntax
  -n, --name string                Name of the chaincode
  -o, --orderer string             Ordering service endpoint
  -p, --path string                Path to chaincode
  -P, --policy string              The endorsement policy associated to this chaincode
      --test.coverprofile string   Done (default "coverage.cov")
  -t, --tid string                 Name of a custom ID generation algorithm (hashing and decoding) e.g. sha256base64
      --tls                        Use TLS when communicating with the orderer endpoint
  -u, --username string            Username for chaincode operations when security is enabled
  -v, --version string             Version of the chaincode specified in install/instantiate/upgrade commands
  -V, --vscc string                The name of the verification system chaincode to be used for this chaincode

root@18599095828d:/opt/gopath/src/github.com/hyperledger/fabric/peer#
1

1 Answers

5
votes

The issue is that you can no longer use the peer container as the CLI. You should use the fabric-tools container instead.

Please note the change in the e2e compose file here: https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/docker-compose-cli.yaml#L42

Please try the fabric-tools image and things should work

FYI - the error is due to the fact that the Go compiler is no included in the fabric-peer image and it is now required when using the CLI to package chaincode