Hyperledger Fabri c 2.0 byfn. sh ошибка при установке цепного кода - PullRequest
0 голосов
/ 16 апреля 2020

У меня точно такая же проблема, как указано в этом вопросе: Ошибка: не удалось подтвердить установку цепного кода: rp c Ошибка: код = Недоступно des c = транспорт закрывается

Если вы решили ответить на этот вопрос, просмотрите вопрос в ссылке, поскольку моя проблема точно такая же, за исключением того, что моя среда выглядит следующим образом:

    OS: RHEL 7.7
    Go version: 1.13.7
    Node version: 12.13.0
    Docker version: 18.09.7 (Client and Engine)
    NO INTERNET ACCESS

Я выполняю сценарий с следующая команда:

./byfn.sh up -a -s couchdb -l javascript -v

Единственное, что я могу добавить к другому (без ответа) вопросу, - это вывод docker журналов для peer0.org1.example.com:

2020-04-15 20:52:21.548 UTC [gossip.channel] reportMembershipChanges -> INFO 05d [[mychannel] Membership view has changed. peers went online:  [[peer0.org2.example.com:9051 ] [peer1.org2.example.com:10051 ]] , current view:  [[peer1.org1.example.com:8051] [peer0.org2.example.com:9051 ] [peer1.org2.example.com:10051 ]]]
2020-04-15 20:57:20.764 UTC [endorser] callChaincode -> INFO 05e finished chaincode: _lifecycle duration: 300000ms channel= txID=dfbc8dc6
2020-04-15 20:57:20.764 UTC [endorser] SimulateProposal -> ERRO 05f failed to invoke chaincode _lifecycle, error: timeout expired while executing transaction
github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute
    /go/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1215
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).execute
    /go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:272
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Invoke
    /go/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:202
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:114
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
    /go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:173
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposalSuccessfullyOrError
    /go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:377
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
    /go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:320
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/vendor/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/common/grpclogging.UnaryServerInterceptor.func1
    /go/src/github.com/hyperledger/fabric/common/grpclogging/server.go:92
github.com/hyperledger/fabric/vendor/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/hyperledger/fabric/vendor/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/vendor/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/vendor/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
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
    /go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:995
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
    /go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1275
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
    /go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:710
runtime.goexit
    /usr/local/go/src/runtime/asm_amd64.s:1357
error sending
failed to execute transaction dfbc8dc6777361d37da9a542fbe95ef35c6188d4f2719b80c4827b724f92b87f
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:114
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
    /go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:173
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposalSuccessfullyOrError
    /go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:377
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
    /go/src/github.com/hyperledger/fabric/core/endorser/endorser.go:320
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/vendor/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/common/grpclogging.UnaryServerInterceptor.func1
    /go/src/github.com/hyperledger/fabric/common/grpclogging/server.go:92
github.com/hyperledger/fabric/vendor/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/hyperledger/fabric/vendor/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/vendor/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/vendor/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
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
    /go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:995
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
    /go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1275
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
    /go/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:710
runtime.goexit
    /usr/local/go/src/runtime/asm_amd64.s:1357 channel= txID=dfbc8dc6
2020-04-15 20:57:20.764 UTC [comm.grpc.server] 1 -> INFO 060 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.23.0.17:60354 grpc.code=OK grpc.call_duration=5m0.001572359s
2020-04-15 20:58:51.215 UTC [lifecycle] InstallChaincode -> INFO 061 Successfully installed chaincode with package ID 'mycc_1:1a85dbaa408ea570f05740792f9cd3c140d2b3c40b2bea1002d33aa13fb3d6e6'

РЕДАКТИРОВАТЬ (17.04.2020) НЕКОТОРЫЕ НОВЫЕ ИНФОРМАЦИИ:

  1. Команда установки однорангового цепочки жизненного цикла постоянно завершается неудачно через 5 минут (время ожидания для журналов docker выше).
  2. Впоследствии (см. Последние две строки в журналах docker) цепной код действительно устанавливается.
  3. Я изменил first-network / scripts / utils. sh функция installChaincode для кода ниже и тогда все работает s до успешного завершения.
    installChaincode() {
      PEER=$1
      ORG=$2
      setGlobals $PEER $ORG
      set -x
      peer lifecycle chaincode install mycc.tar.gz >&log.txt
      res=$?
      set +x
      cat log.txt
      if [ ${CC_RUNTIME_LANGUAGE} = "node" ];
      then
            echo "chaincode install returned $res"
            echo "sleeping for 10 minutes..."
            sleep 600
      else
            verifyResult $res "installation on peer${PEER}.org${ORG} has failed"
      fi
      echo "== Chaincode is installed on peer${PEER}.org${ORG} =============== "
      echo
    }

Интересно, почему установка цепного кода жизненного цикла одноранговой системы возвращает ошибку примерно через минуту, даже если в фоновом режиме работает команда SimulateProposal (см. docker журналы выше - первые несколько строк).

А потом, почему установка цепного кода действительно работает, если команда установки возвращает ошибку? Я говорю это потому, что последующий вызов queryInstalled вернется успешно из сценария byfn. sh.

1 Ответ

0 голосов
/ 16 апреля 2020

Поскольку вы используете Hyperledger Fabri c, я бы не рекомендовал создавать byfn. Это было устарело от HLF. Вместо этого попробуйте использовать test-network, как это предлагается в HLF.

Для версии 2.0 они добавили примечание вверху страницы.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...