2

I am running hyperledger fabric 2.2.0 test-network.It was working fine for 2 3 days,but now when i am trying to install chaincode(any),getting failed after packaging.Below is the error i am getting-

Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "failed to initialize build cache at /home/chaincode/.cache/go-build: mkdir /home/chaincode/.cache: permission denied

I have not made any changes, was working fine untill yesterday. if it need to make directory "/home/chaincode/.cache" then how it was working for last 3 days,since it does not have the needed permission.

I made a diretory 'chaincode' inside home with proper access manually and changed its permission to 777 but still same error.

Appreciate all the help. Thank you

1 Answers1

0

I also faced a similar issue yesterday.

I have deployed the chaincode to an AWS instance. The previous version of chaincode was running. I have 2 peers to the AWS instance.

Yesterday when I was trying to install a new chaincode to the peers it shows the following error.

    2022-09-27 12:14:50.389 UTC [endorser] SimulateProposal -> ERRO 22f failed to invoke chaincode chaincode_test, error: docker build failed: Error returned from build: 1 "failed to initialize build cache at /home/chaincode/.cache/go-build: mkdir /home/chaincode/.cache: permission denied
"
docker image build failed
github.com/hyperledger/fabric/core/container/dockercontroller.(*DockerVM).Build
/go/src/github.com/hyperledger/fabric/core/container/dockercontroller/dockercontroller.go:200
github.com/hyperledger/fabric/core/container.(*Router).Build
/go/src/github.com/hyperledger/fabric/core/container/container.go:125
github.com/hyperledger/fabric/core/chaincode.(*ContainerRuntime).Build
/go/src/github.com/hyperledger/fabric/core/chaincode/container_runtime.go:39
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1
/go/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:82
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1373
docker build failed
error building image
error building chaincode
could not launch chaincode chaincode_test:v2.12
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Launch
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:85
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Invoke
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:197
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:155
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/go/src/github.com/hyperledger/fabric/core/endorser/support.go:126
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:119
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:187
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposalSuccessfullyOrError
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:397
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:340
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler.func1
/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:107
github.com/hyperledger/fabric/internal/peer/node.unaryGrpcLimiter.func1
/go/src/github.com/hyperledger/fabric/internal/peer/node/grpc_limiters.go:51
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
/go/src/github.com/hyperledger/fabric/common/grpclogging/server.go:92
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
/go/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:31
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler
/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:109
google.golang.org/grpc.(*Server).processUnaryRPC
/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1082
google.golang.org/grpc.(*Server).handleStream
/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1405
google.golang.org/grpc.(*Server).serveStreams.func1.1
/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:746
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1373
failed to execute transaction 6e7331ea3982d0f5d4629b697b09c8c326123f009b90ac5d7baed5240cb067ae
github.com/hyperledger/fabric/core/chaincode.processChaincodeExecutionResult
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:161
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:156
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/go/src/github.com/hyperledger/fabric/core/endorser/support.go:126
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:119
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:187
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposalSuccessfullyOrError
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:397
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:340
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/go/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32
github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler.func1
/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:107
github.com/hyperledger/fabric/internal/peer/node.unaryGrpcLimiter.func1
/go/src/github.com/hyperledger/fabric/internal/peer/node/grpc_limiters.go:51
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1
/go/src/github.com/hyperledger/fabric/common/grpclogging/server.go:92
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1
/go/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:31
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
/go/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34
github.com/hyperledger/fabric-protos-go/peer._Endorser_ProcessProposal_Handler
/go/src/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric-protos-go/peer/peer.pb.go:109
google.golang.org/grpc.(*Server).processUnaryRPC
/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1082
google.golang.org/grpc.(*Server).handleStream
/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1405
google.golang.org/grpc.(*Server).serveStreams.func1.1
/go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:746
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1373 channel=test-channel txID=6e7331ea

To solve the issue temporarily we have taken the backup of the peers, couchdb and move the peers to a new AWS instance with proper changes. Now the chaincodes are running in the new AWS instance.

Note: dpkg --print-architecture of both AWS instances shows amd64 as cpu architecture.

iOS-Developer84
  • 654
  • 8
  • 19