Welcome to the Linux Foundation Forum!

Lab8.1 : Failed to generate platform-specific docker build error on instantiation

Hello,

I'm working on lab 8.1 and I'm dealing with an issue when I try to instantiate balance_transfer.

  • Installation goes well
    root@ec2092a1f011:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n bt1 -v 1.0 -p github.com/balance_transfer2 -l golang
    2020-10-07 09:55:38.682 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
    2020-10-07 09:55:38.683 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
    2020-10-07 09:55:41.579 UTC [main] main -> INFO 003 Exiting....

  • But instantiation returns some errors
    root@ec2092a1f011:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -n bt1 -v 1.0 -C mychannel -c '{"Args":[]}' -o orderer.example.com:7050
    2020-10-07 09:56:24.211 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
    2020-10-07 09:56:24.211 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
    Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 2 "# github.com/balance_transfer2/vendor/google.golang.org/grpc/internal/credentials
    chaincode/input/src/github.com/balance_transfer2/vendor/google.golang.org/grpc/internal/credentials/spiffe.go:36:70: state.PeerCertificates[0].URIs undefined (type *x509.Certificate has no field or method URIs)
    chaincode/input/src/github.com/balance_transfer2/vendor/google.golang.org/grpc/internal/credentials/spiffe.go:40:47: state.PeerCertificates[0].URIs undefined (type *x509.Certificate has no field or method URIs)
    chaincode/input/src/github.com/balance_transfer2/vendor/google.golang.org/grpc/internal/credentials/spiffe.go:58:35: state.PeerCertificates[0].URIs undefined (type *x509.Certificate has no field or method URIs)
    # github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive
    chaincode/input/src/github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive/archive.go:365:5: hdr.Format undefined (type *tar.Header has no field or method Format)
    chaincode/input/src/github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive/archive.go:365:15: undefined: tar.FormatPAX
    chaincode/input/src/github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive/archive.go:1160:7: hdr.Format undefined (type *tar.Header has no field or method Format)
    chaincode/input/src/github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive/archive.go:1160:17: undefined: tar.FormatPAX
    chaincode/input/src/github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive/copy.go:346:7: hdr.Format undefined (type *tar.Header has no field or method Format)
    chaincode/input/src/github.com/balance_transfer2/vendor/github.com/docker/docker/pkg/archive/copy.go:346:17: undefined: tar.FormatPAX

Note : I duplicated the balance_transfer folder to do again the go mod init that were not done correctly done on the first try, that's why I'm using the balance_transfer2 folder on the install command

It seems that that issue might be due to the go version I'm using : **
_root@ec2092a1f011:/opt/gopath/src/github.com/hyperledger/fabric/peer# go version
go version **go1.9
linux/amd64_

Did anyone meet the same problem ?

Thank you !
Matthieu

Comments

  • Hello,

    A minimal required version of Go to work with Hyperledger Fabric 1.4.x is 1.12.x. Please, install a newer version of Go following the official installation guide.
    Note! You should first remove a previous version of Go to avoid any conflicts during the installation.

    Best regards,
    Ilya

Categories

Upcoming Training