当前位置: 首页 > 面试题库 >

向同级发送Hyperledger Fabric的链码实例化请求时出现OCI运行时错误

贺桐
2023-03-14
问题内容

结合使用Hyperledger Fabric Java SDK和GO链码,尝试使用初始化链码后出现错误
channel.sendInstantiationProposal(instantiateProposalRequest, company.getPeers());

这是在我成功安装chaincode之后。调用上述方法后,我最终会收到此错误:

[dockercontroller] Start -> ERRO 352 start-could not start container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\"\n"}

由于chaincode它不是我所知道的二进制文件,因此它本身很特殊。也许是peer chaincode什么意思?

版本号

  • Hyperledger面料:1.0.4
  • 码头工人:17.05.0-ce
  • 码头工人组成:1.17.0
  • hyperledger / fabric-orderer:1.0.0
  • hyperledger / fabric-peer:1.0.0
  • hyperledger / fabric-ccenv:1.0.0
  • hyperledger / fabric-ca:1.0.0
  • hyperledger / fabric-baseos:0.3.1
  • Tomcat(码头工人容器):8.5.23

我的实例化提案请求看起来像这样(印有Reflection):

tomcat              | 2017-12-01 10:41:03 DEBUG Debug:24 - org.hyperledger.fabric.sdk.InstantiateProposalRequest
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -   getProposalWaitTime: 20000
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -   getChaincodeName: test_cc_go
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -   getChaincodePath: super/test_cc
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -   getChaincodeVersion: 0.0.1
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:43 -   getChaincodeEndorsementPolicy:
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:24 -     org.hyperledger.fabric.sdk.ChaincodeEndorsementPolicy
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:43 -       getChaincodeEndorsementPolicyAsBytes:
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:24 -         [B
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:41 -   getTransientMap:
tomcat              | {}
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -   getChaincodeLanguage: GO_LANG
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:43 -   getChaincodeID:
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:24 -     org.hyperledger.fabric.sdk.ChaincodeID
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:41 -       getFabricChaincodeID:
tomcat              | path: "super/test_cc"
tomcat              | name: "test_cc_go"
tomcat              | version: "0.0.1"
tomcat              |
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -       getVersion: 0.0.1
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -       getName: test_cc_go
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -       getPath: super/test_cc
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:33 -   getFcn: init
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:38 -   getArgBytes: null
tomcat              | 2017-12-01 10:41:03 DEBUG Debug:41 -   getArgs:
tomcat              | [testarg!]

看来它无法正确创建容器,因为我stop container dev-peer0.company.org- test_cc_go-0.0.1(Container not running: dev-peer0.company.org- test_cc_go-0.0.1)早于主要错误。

我的tomcat容器和对等方之一的完整日志:

tomcat              | 2017-12-01 10:41:03 DEBUG HyperledgerConfigurator:370 - Building instantiateProposalRequest...
tomcat              | 2017-12-01 10:41:03 DEBUG HyperledgerConfigurator:391 - Reading endorsement policy from path: /etc/hyperledger/chaincodeendorsementpolicy.yaml
tomcat              | 2017-12-01 10:41:03 DEBUG HyperledgerConfigurator:404 - Sending instantiation request to all peers...
tomcat              | 2017-12-01 10:41:03 DEBUG NettyClientHandler:147 -
tomcat              | ----------------OUTBOUND--------------------
tomcat              | [id: 0x0d3de89a, L:/172.18.0.11:41906 - R:peer0.company.org/172.18.0.8:7051] HEADERS: streamId=7, headers=GrpcHttp2OutboundHeaders[:authority: peer0.company.org, :path: /protos.Endorser/ProcessProposal, :method: POST, :scheme: https, content-type: application/grpc, te: trailers, user-agent: grpc-java-netty/1.5.0, grpc-accept-encoding: gzip], streamDependency=0, weight=16, exclusive=false, padding=0, endStream=false
tomcat              | ------------------------------------
tomcat              | 2017-12-01 10:41:03 DEBUG NettyClientHandler:147 -
tomcat              | ----------------OUTBOUND--------------------
tomcat              | [id: 0x0d3de89a, L:/172.18.0.11:41906 - R:peer0.company.org/172.18.0.8:7051] DATA: streamId=7, padding=0, endStream=true, length=1247, bytes=00000004da0a8f090a93070a72080310011a0c08bfe384d10510c082fc8102221270726573746174696f6e2d6368616e6e656c2a403263393063616131343431...
tomcat              | ------------------------------------
peer0.company.org      | 2017-12-01 10:41:03.545 UTC [endorser] ProcessProposal -> DEBU 2f9 Entry
peer0.company.org      | 2017-12-01 10:41:03.545 UTC [protoutils] ValidateProposalMessage -> DEBU 2fa ValidateProposalMessage starts for signed proposal 0xc42177e420
peer0.company.org      | 2017-12-01 10:41:03.545 UTC [protoutils] validateChannelHeader -> DEBU 2fb validateChannelHeader info: header type 3
peer0.company.org      | 2017-12-01 10:41:03.545 UTC [protoutils] checkSignatureFromCreator -> DEBU 2fc checkSignatureFromCreator starts
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [protoutils] checkSignatureFromCreator -> DEBU 2fd checkSignatureFromCreator info: creator is &{DCMSP 47c36cc8e5813d60b506bf2f8757150a0ee044e386f271d8f7df23626c0c3131}
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [protoutils] checkSignatureFromCreator -> DEBU 2fe checkSignatureFromCreator info: creator is valid
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [protoutils] checkSignatureFromCreator -> DEBU 2ff checkSignatureFromCreator exists successfully
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 300 validateChaincodeProposalMessage starts for proposal 0xc420307400, header 0xc42177e450
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [protoutils] validateChaincodeProposalMessage -> DEBU 301 validateChaincodeProposalMessage info: header extension references chaincode name:"lscc"
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [endorser] ProcessProposal -> DEBU 302 processing txid: 2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [fsblkstorage] retrieveTransactionByID -> DEBU 303 retrieveTransactionByID() - txId = [2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6]
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [lockbasedtxmgr] NewTxSimulator -> DEBU 304 constructing new tx simulator
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [lockbasedtxmgr] newLockBasedTxSimulator -> DEBU 305 constructing new tx simulator [7ee0c1a2-4569-49a4-bbca-dd6eb4b6688e]
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [endorser] simulateProposal -> DEBU 306 Entry - txid: 2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6 channel id: super-channel
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [endorser] callChaincode -> DEBU 307 Entry - txid: 2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6 channel id: super-channel version: 1.0.0
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [ccprovider] NewCCContext -> DEBU 308 NewCCCC (chain=super-channel,chaincode=lscc,version=1.0.0,txid=2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6,syscc=true,proposal=0xc420307400,canname=lscc:1.0.0
peer0.company.org      | 2017-12-01 10:41:03.546 UTC [chaincode] Launch -> DEBU 309 chaincode is running(no need to launch) : lscc:1.0.0
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] Execute -> DEBU 30a Entry
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] Execute -> DEBU 30b chaincode canonical name: lscc:1.0.0
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] sendExecuteMessage -> DEBU 30c [2c90caa1]Inside sendExecuteMessage. Message TRANSACTION
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] setChaincodeProposal -> DEBU 30d Setting chaincode proposal context...
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] setChaincodeProposal -> DEBU 30e Proposal different from nil. Creating chaincode proposal context...
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] sendExecuteMessage -> DEBU 30f [2c90caa1]sendExecuteMsg trigger event TRANSACTION
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] processStream -> DEBU 310 [2c90caa1]Move state message TRANSACTION
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] HandleMessage -> DEBU 311 [2c90caa1]Fabric side Handling ChaincodeMessage of type: TRANSACTION in state ready
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] filterError -> DEBU 312 Ignoring NoTransitionError: no transition
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] processStream -> DEBU 313 [2c90caa1]sending state message TRANSACTION
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] func1 -> DEBU 314 [2c90caa1]Received message TRANSACTION from shim
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] handleMessage -> DEBU 315 [2c90caa1]Handling ChaincodeMessage of type: TRANSACTION(state:ready)
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] beforeTransaction -> DEBU 316 [2c90caa1]Received TRANSACTION, invoking transaction on chaincode(Src:ready, Dst:ready)
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] handleGetState -> DEBU 317 [2c90caa1]Sending GET_STATE
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] processStream -> DEBU 318 [2c90caa1]Received message GET_STATE from shim
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] HandleMessage -> DEBU 319 [2c90caa1]Fabric side Handling ChaincodeMessage of type: GET_STATE in state ready
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] afterGetState -> DEBU 31a [2c90caa1]Received GET_STATE, invoking get state from ledger
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] filterError -> DEBU 31b Ignoring NoTransitionError: no transition
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] func1 -> DEBU 31c [2c90caa1] getting state for chaincode lscc, key test_cc_go, channel super-channel
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [stateleveldb] GetState -> DEBU 31d GetState(). ns=lscc, key=test_cc_go
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] func1 -> DEBU 31e [2c90caa1]No state associated with key: test_cc_go. Sending RESPONSE with an empty payload
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [chaincode] 1 -> DEBU 31f [2c90caa1]handleGetState serial send RESPONSE
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] func1 -> DEBU 320 [2c90caa1]Received message RESPONSE from shim
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] handleMessage -> DEBU 321 [2c90caa1]Handling ChaincodeMessage of type: RESPONSE(state:ready)
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] sendChannel -> DEBU 322 [2c90caa1]before send
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] sendChannel -> DEBU 323 [2c90caa1]after send
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] afterResponse -> DEBU 324 [2c90caa1]Received RESPONSE, communicated (state:ready)
peer0.company.org      | 2017-12-01 10:41:03.547 UTC [shim] handleGetState -> DEBU 325 [2c90caa1]GetState received payload RESPONSE
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] handlePutState -> DEBU 326 [2c90caa1]Inside putstate
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] handlePutState -> DEBU 327 [2c90caa1]Sending PUT_STATE
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] processStream -> DEBU 328 [2c90caa1]Received message PUT_STATE from shim
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] HandleMessage -> DEBU 329 [2c90caa1]Fabric side Handling ChaincodeMessage of type: PUT_STATE in state ready
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] filterError -> DEBU 32a Ignoring NoTransitionError: no transition
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] func1 -> DEBU 32b [2c90caa1]state is ready
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] func1 -> DEBU 32c [2c90caa1]Completed PUT_STATE. Sending RESPONSE
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] 1 -> DEBU 32d [2c90caa1]enterBusyState trigger event RESPONSE
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] processStream -> DEBU 32e [2c90caa1]Move state message RESPONSE
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] HandleMessage -> DEBU 32f [2c90caa1]Fabric side Handling ChaincodeMessage of type: RESPONSE in state ready
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] filterError -> DEBU 330 Ignoring NoTransitionError: no transition
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] processStream -> DEBU 331 [2c90caa1]sending state message RESPONSE
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] func1 -> DEBU 332 [2c90caa1]Received message RESPONSE from shim
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] handleMessage -> DEBU 333 [2c90caa1]Handling ChaincodeMessage of type: RESPONSE(state:ready)
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] sendChannel -> DEBU 334 [2c90caa1]before send
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] sendChannel -> DEBU 335 [2c90caa1]after send
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] handlePutState -> DEBU 336 [2c90caa1]Received RESPONSE. Successfully updated state
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] afterResponse -> DEBU 337 [2c90caa1]Received RESPONSE, communicated (state:ready)
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] func1 -> DEBU 338 [2c90caa1]Transaction completed. Sending COMPLETED
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] func1 -> DEBU 339 [2c90caa1]Move state message COMPLETED
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] handleMessage -> DEBU 33a [2c90caa1]Handling ChaincodeMessage of type: COMPLETED(state:ready)
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [shim] func1 -> DEBU 33b [2c90caa1]send state message COMPLETED
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] processStream -> DEBU 33c [2c90caa1]Received message COMPLETED from shim
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] HandleMessage -> DEBU 33d [2c90caa1]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] HandleMessage -> DEBU 33e [2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6]HandleMessage- COMPLETED. Notify
peer0.company.org      | 2017-12-01 10:41:03.548 UTC [chaincode] notify -> DEBU 33f notifying Txid:2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] Execute -> DEBU 340 Exit
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [ccprovider] NewCCContext -> DEBU 341 NewCCCC (chain=super-channel,chaincode=test_cc_go,version=0.0.1,txid=2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6,syscc=false,proposal=0xc420307400,canname=test_cc_go:0.0.1
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] Launch -> DEBU 342 launchAndWaitForRegister fetched 1587 bytes from file system
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] getArgsAndEnv -> DEBU 343 Executable is chaincode
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] getArgsAndEnv -> DEBU 344 Args [chaincode -peer.address=peer0.company.org:7051]
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] launchAndWaitForRegister -> DEBU 345 start container: test_cc_go:0.0.1(networkid:dev,peerid:peer0.company.org)
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] launchAndWaitForRegister -> DEBU 346 start container with args: chaincode -peer.address=peer0.company.org:7051
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [chaincode] launchAndWaitForRegister -> DEBU 347 start container with env:
peer0.company.org      |    CORE_CHAINCODE_ID_NAME=test_cc_go:0.0.1
peer0.company.org      |    CORE_PEER_TLS_ENABLED=true
peer0.company.org      |    CORE_CHAINCODE_LOGGING_LEVEL=debug
peer0.company.org      |    CORE_CHAINCODE_LOGGING_SHIM=debug
peer0.company.org      |    CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [container] lockContainer -> DEBU 348 waiting for container(dev-peer0.company.org-test_cc_go-0.0.1) lock
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [container] lockContainer -> DEBU 349 got container (dev-peer0.company.org-test_cc_go-0.0.1) lock
peer0.company.org      | 2017-12-01 10:41:03.549 UTC [dockercontroller] Start -> DEBU 34a Cleanup container dev-peer0.company.org-test_cc_go-0.0.1
peer0.company.org      | 2017-12-01 10:41:03.550 UTC [dockercontroller] stopInternal -> DEBU 34b Stop container dev-peer0.company.org-test_cc_go-0.0.1(Container not running: dev-peer0.company.org-test_cc_go-0.0.1)
peer0.company.org      | 2017-12-01 10:41:03.550 UTC [dockercontroller] stopInternal -> DEBU 34c Kill container dev-peer0.company.org-test_cc_go-0.0.1 (API error (500): {"message":"Cannot kill container dev-peer0.company.org-test_cc_go-0.0.1: Container 935c3c20aca77b6a8a398aea553e524a734a30f6dfceab5fd4ca4683b3e1eb8f is not running"}
peer0.company.org      | )
peer0.company.org      | 2017-12-01 10:41:03.611 UTC [dockercontroller] stopInternal -> DEBU 34d Removed container dev-peer0.company.org-test_cc_go-0.0.1
peer0.company.org      | 2017-12-01 10:41:03.611 UTC [dockercontroller] Start -> DEBU 34e Start container dev-peer0.company.org-test_cc_go-0.0.1
peer0.company.org      | 2017-12-01 10:41:03.611 UTC [dockercontroller] getDockerHostConfig -> DEBU 34f docker container hostconfig NetworkMode: compose_default
peer0.company.org      | 2017-12-01 10:41:03.612 UTC [dockercontroller] createContainer -> DEBU 350 Create container: dev-peer0.company.org-test_cc_go-0.0.1
peer0.company.org      | 2017-12-01 10:41:03.754 UTC [dockercontroller] createContainer -> DEBU 351 Created container: dev-peer0.company.org-test_cc_go-0.0.1
peer0.company.org      | 2017-12-01 10:41:04.514 UTC [dockercontroller] Start -> ERRO 352 start-could not start container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\"\n"}
peer0.company.org      | 2017-12-01 10:41:04.514 UTC [container] unlockContainer -> DEBU 353 container lock deleted(dev-peer0.company.org-test_cc_go-0.0.1)
peer0.company.org      | 2017-12-01 10:41:04.514 UTC [chaincode] Launch -> ERRO 354 launchAndWaitForRegister failed Error starting container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\"\n"}
peer0.company.org      | 2017-12-01 10:41:04.514 UTC [endorser] callChaincode -> DEBU 355 Exit
peer0.company.org      | 2017-12-01 10:41:04.514 UTC [endorser] simulateProposal -> ERRO 356 failed to invoke chaincode name:"lscc"  on transaction 2c90caa144141c930234edc062ab6c2f85df97905bc4596ed8f425eecaf88bb6, error: Error starting container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\"\n"}

如果有人可以给我一些指导,不胜感激!先感谢您!

编辑:这是将链码放在对等方的方式:

链码源位于,/etc/hyperledger/chaincode/src/super/test_cc/test_cc.go我正在使用client.sendInstallProposal(installProposalRequest, company.getPeers());命令将其发送给同级。以下是安装建议的外观以及对等方之后的响应:

2017-12-03 17:08:25 INFO  HyperledgerConfigurator:326 - Installing super.chaincode as company into channel super-channel
tomcat              | 2017-12-03 17:08:25 DEBUG HyperledgerConfigurator:330 - Chaincode source path: /etc/hyperledger/chaincode/
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:24 - org.hyperledger.fabric.sdk.InstallProposalRequest
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:41 -   getChaincodeSourceLocation: 
tomcat              | /etc/hyperledger/chaincode
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:38 -   getChaincodeInputStream: null
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -   getProposalWaitTime: 20000
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -   getChaincodeName: test_cc_go
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -   getChaincodePath: super/test_cc
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -   getChaincodeVersion: 0.0.1
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:38 -   getChaincodeEndorsementPolicy: null
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:38 -   getTransientMap: null
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -   getChaincodeLanguage: GO_LANG
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:43 -   getChaincodeID:
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:24 -     org.hyperledger.fabric.sdk.ChaincodeID
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:41 -       getFabricChaincodeID: 
tomcat              | path: "super/test_cc"
tomcat              | name: "test_cc_go"
tomcat              | version: "0.0.1"
tomcat              | 
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -       getVersion: 0.0.1
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -       getName: test_cc_go
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:33 -       getPath: super/test_cc
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:31 -   getFcn: null
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:38 -   getArgBytes: null
tomcat              | 2017-12-03 17:08:25 DEBUG Debug:38 -   getArgs: null
tomcat              | 2017-12-03 17:08:25 DEBUG HyperledgerConfigurator:350 - Sending chaincode installation request...
...
tomcat              | 2017-12-03 17:08:25 DEBUG HyperledgerConfigurator:361 - Responses:
tomcat              | 2017-12-03 17:08:25 DEBUG HyperledgerConfigurator:363 - TransactionID: fd72977b40808609e781cd658454f7753599ec8c27f61acb4629fae4dc520e10, peer: peer0.company.org, decision: SUCCESS
tomcat              | 2017-12-03 17:08:25 DEBUG HyperledgerConfigurator:363 - TransactionID: fd72977b40808609e781cd658454f7753599ec8c27f61acb4629fae4dc520e10, peer: peer1.company.org, decision: SUCCESS

EDIT2:对等方的链码位于/var/hyperledger/production/chaincodes/test_cc_go.0.0.1,但这不在其路径中/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin。它也不会chaincode尝试调用它。


问题答案:

事实证明,我的链码使用了依赖项(在我的情况下为scrypt),这导致构建失败。该代码可以通过其单元测试并可以正常编译,但是由于这个原因,它无法在同级上运行。您可能想要将go依赖项安装到ccenv(用于编译链码)上,或者在我的情况下,我放弃了它,以支持Hyperledger
Fabric 1.1的内置加密支持。



 类似资料:
  • 我想向soap请求发送XML,我使用python请求,如下所示: 当我发送请求时,我会发出以下请求: 我在这样的请求中进行: 我给出了一些错误,比如你不能发送这样的请求。 我意识到我必须发送带有此请求的证书才能获得成功响应 我有<代码>。cer和。crt文件发送,但我这样发送: 并得到以下错误: 更新: 我在PK中使用openssl x509-inform der。cer-输出PK。pem并尝试以

  • 我是谷歌云数据流的新手。我在我的Windows机器上设置了所有内容,当我尝试使用以下命令运行字数示例时: mvn compile exec:java -Dexec.mainClass=com.nyt.dataflowPoc.WordCount -Dexec.args=“--project=cdfpoc-1264 --stagingLocation=gs://poc-location/staging

  • 我正在尝试使用ajax发送post请求,但始终出现以下错误: XMLHttpRequest无法加载http://192.168.1.123:8080。对预检请求的响应无法通过权限改造检查:请求的资源上不存在“访问控制允许源”标头。因此不允许访问源“http://localhost:8080”。 这是我的代码

  • 我是新来的vuejs和我下面的教程(https://www.youtube.com/watch?v=Wy9q22isx3U

  • 我正在尝试将post请求从Angular前端发送到ASP.NET后端。 Get请求工作正常。 当我发送: this.http.post(“http://localhost:3000/api/cards”,“some data”,httpOptions).subscribe(res=>this.display(res)); 对于我正在从VS2017运行的ASP.NET API,我得到: 错误{…}错

  • 我正在学习春靴和反应现在。 book.js bookresourceimp.java