no combination of peers can be derived which satisfy the endorsement policy: required chaincodes are not installed on sufficient peers #784
-
Hi all, I encountered a problem when client send proposal to Fabric network via SDK, the background as following : 1 A customized network with 2 Organizations in which includes two peers respectively. 3 orderer node. Adopt external builder (external chain code service,) 2 package chaincode and create package file ,and install on above 2 orgs (4 peers) respectively, as well approve the chaincode for each org ,then commit the chaincode 3 deploy the chaincode instance through docker-compose ,and the docker instance working fine Problem: When i send the request (Create asset) to fabric network through SDK API not works , and check the log from the specific peer show the error: no combination of peers can be derived which satisfy the endorsement policy: required chaincodes are not installed on sufficient peers" required chaincodes are not installed on sufficient peers" errorVerbose="required chaincodes are not installed on sufficient peers\ngithub.com/hyperledger/fabric/discovery/endorsement.(*endorsementAnalyzer).computeEndorsementResponse\n\t/discovery/endorsement/endorsement.go:189\ngithub.com/hyperledger/fabric/discovery/endorsement.(*endorsementAnalyzer).PeersForEndorsement\n\t/discovery/endorsement/endorsement.go:101\ngithub.com/hyperledger/fabric/internal/pkg/gateway.(*registry).endorsementPlan\n\t/internal/pkg/gateway/registry.go:59\ngithub.com/hyperledger/fabric/internal/pkg/gateway.(*Server).planFromFirstEndorser\n\t/internal/pkg/gateway/endorse.go:185\ngithub.com/hyperledger/fabric/internal/pkg/gateway.(*Server).Endorse\n\t/internal/pkg/gateway/endorse.go:69\ngithub.com/hyperledger/fabric-protos-go/gateway._Gateway_Endorse_Handler.func1\n\t/vendor/github.com/hyperledger/fabric-protos-go/gateway/gateway.pb.go:1122\ngithub.com/hyperledger/fabric/internal/peer/node.serve.unaryGrpcLimiter.func13\n\t/internal/peer/node/grpc_limiters.go:56\ngithub.com/hyperledger/fabric/internal/pkg/comm.NewGRPCServerFromListener.ChainUnaryServer.func9.1.1\n\t/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25\ngithub.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1\n\t/common/grpclogging/server.go:92\ngithub.com/hyperledger/fabric/internal/pkg/comm.NewGRPCServerFromListener.ChainUnaryServer.func9.1.1\n\t/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25\ngithub.com/hyperledger/fabric/internal/peer/node.serve.UnaryServerInterceptor.func11\n\t/common/grpcmetrics/interceptor.go:31\ngithub.com/hyperledger/fabric/internal/pkg/comm.NewGRPCServerFromListener.ChainUnaryServer.func9.1.1\n\t/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:25\ngithub.com/hyperledger/fabric/internal/pkg/comm.NewGRPCServerFromListener.ChainUnaryServer.func9\n\t/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34\ngithub.com/hyperledger/fabric-protos-go/gateway._Gateway_Endorse_Handler\n\t/vendor/github.com/hyperledger/fabric-protos-go/gateway/gateway.pb.go:1124\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/vendor/google.golang.org/grpc/server.go:1385\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/vendor/google.golang.org/grpc/server.go:1796\ngoogle.golang.org/grpc.(*Server).serveStreams.func2.1\n\t/vendor/google.golang.org/grpc/server.go:1029\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1695" Additionally, It was working fine for the similar process for another channel and chaincode which configured previously, It was make me confused . Any reply will appreciated ,Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To get to the point in the code indicated by your trace, I think the chaincode must not be deployed on any of the peers in the organization to which your Gateway peer belongs. Then the discovery service is not able to find any combinations of organization peers that have the chaincode installed with sufficient peers to satisfy the endorsement policy. I would check that your client is connecting to the Gateway service on one of the 4 peers that are members of your new channel. You could then check the discovery service's view of where the chaincode is deployed using the discovery CLI. It is worth checking that your endorsement policy really can be satisfied only by organizations in the new channel. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply , Yes , I found the chaincode was not installed properly on peers by discover cli, however , it was list the installed chaincode when using peer lifecycle chaincode queryinstalled. By mistake (Actually i often stuck in various of configuration details for Fabric : ) ,The root cause was the improper format in the connection json file of external chaincode project ,the above error was gone when i correct the json file and deploy again |
Beta Was this translation helpful? Give feedback.
To get to the point in the code indicated by your trace, I think the chaincode must not be deployed on any of the peers in the organization to which your Gateway peer belongs. Then the discovery service is not able to find any combinations of organization peers that have the chaincode installed with sufficient peers to satisfy the endorsement policy.
I would check that your client is connecting to the Gateway service on one of the 4 peers that are members of your new channel. You could then check the discovery service's view of where the chaincode is deployed using the discovery CLI. It is worth checking that your endorsement policy really can be satisfied only by organizations in the new…