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

2024-01-02

将 Hyperledger Fabric Java SDK 与 GO 链代码结合使用,在尝试使用以下命令启动链代码后出现错误channel.sendInstantiationProposal(instantiateProposalRequest, company.getPeers());.

这是我成功安装链码之后的情况。调用上述方法后,我最终会得到这个错误:

[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?

Versions

  • 超级账本结构:1.0.4
  • 码头工人:17.05.0-ce
  • docker-compose:1.17.0
  • 超级账本/结构订购者:1.0.0
  • 超级账本/结构对等点:1.0.0
  • 超级账本/fabric-ccenv:1.0.0
  • 超级账本/fabric-ca:1.0.0
  • 超级账本/fabric-baseos:0.3.1
  • tomcat(码头容器):8.5.23

我的实例化提案请求如下所示(用反射打印):

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 的内置加密支持。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

向对等方发送 Hyperledger Fabric 的链码实例化请求时出现 OCI 运行时错误 的相关文章

  • Java中有没有一种方法可以通过名称实例化一个类?

    我正在寻找问题 从字符串名称实例化一个类 https stackoverflow com questions 9854900 instantiate an class from its string name它描述了如何在有名称的情况下实例
  • 如何将本机库链接到 IntelliJ 中的 jar?

    我正在尝试在 IntelliJ 中设置 OpenCV 但是我一直在弄清楚如何告诉 IntelliJ 在哪里可以找到本机库位置 在 Eclipse 中 添加 jar 后 您可以在 Build Config 屏幕中设置 Native 库的位置
  • 如何让 BlazeDS 忽略属性?

    我有一个 java 类 它有一个带有 getter 和 setter 的字段 以及第二对 getter 和 setter 它们以另一种方式访问 该字段 public class NullAbleId private static final
  • 序列的排列?

    我有具体数量的数字 现在我想以某种方式显示这个序列的所有可能的排列 例如 如果数字数量为3 我想显示 0 0 0 0 0 1 0 0 2 0 1 0 0 1 1 0 1 2 0 2 0 0 2 1 0 2 2 1 0 0 1 0 1 1 0
  • 在内存中使用 byte[] 创建 zip 文件。 Zip 文件总是损坏

    我创建的 zip 文件有问题 我正在使用 Java 7 我尝试从字节数组创建一个 zip 文件 其中包含两个或多个 Excel 文件 应用程序始终完成 没有任何异常 所以 我以为一切都好 当我尝试打开 zip 文件后 Windows 7 出
  • .properties 中的通配符

    是否存在任何方法 我可以将通配符添加到属性文件中 并且具有所有含义 例如a b c d lalalala 或为所有以结尾的内容设置一个正则表达式a b c anything 普通的 Java 属性文件无法处理这个问题 不 请记住 它实际上是
  • 过滤两次 Lambda Java

    我有一个清单如下 1 2 3 4 5 6 7 和 预期结果必须是 1 2 3 4 5 6 7 我知道怎么做才能到7点 我的结果 1 2 3 4 5 6 我也想知道如何输入 7 我添加了i gt i objList size 1到我的过滤器
  • Pig Udf 显示结果

    我是 Pig 的新手 我用 Java 编写了一个 udf 并且包含了一个 System out println 其中的声明 我必须知道在 Pig 中运行时该语句在哪里打印 假设你的UDF 扩展了 EvalFunc 您可以使用从返回的 Log
  • java.lang.IllegalStateException:应用程序 PagerAdapter 更改了适配器的内容,而没有调用 PagerAdapter#notifyDataSetChanged android

    我正在尝试使用静态类将值传递给视图 而不是使用意图 因为我必须传递大量数据 有时我会收到此错误 但无法找出主要原因是什么 Error java lang IllegalStateException The application s Pag
  • 没有 Spring 的自定义 Prometheus 指标

    我需要为 Web 应用程序提供自定义指标 问题是我不能使用 Spring 但我必须使用 jax rs 端点 要求非常简单 想象一下 您有一个包含键值对的映射 其中键是指标名称 值是一个简单的整数 它是一个计数器 代码会是这样的 public
  • 检测并缩短字符串中的所有网址

    假设我有一条字符串消息 您应该将 file zip 上传到http google com extremelylonglink zip http google com extremelylonglink zip not https stack
  • 无法创建请求的服务[org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]-MySQL

    我是 Hibernate 的新手 我目前正在使用 Spring boot 框架并尝试通过 hibernate 创建数据库表 我知道以前也问过同样的问题 但我似乎无法根据我的环境找出如何修复错误 休眠配置文件
  • 帮助将图像从 Servlet 获取到 JSP 页面 [重复]

    这个问题在这里已经有答案了 我目前必须生成一个显示字符串文本的图像 我需要在 Servlet 上制作此图像 然后以某种方式将图像传递到 JSP 页面 以便它可以显示它 我试图避免保存图像 而是以某种方式将图像流式传输到 JSP 自从我开始寻
  • 像 Java 这样的静态类型语言中动态方法解析背后的原因是什么

    我对 Java 中引用变量的动态 静态类型和动态方法解析的概念有点困惑 考虑 public class Types Override public boolean equals Object obj System out println i
  • Spring Boot Data JPA 从存储过程接收多个输出参数

    我尝试通过 Spring Boot Data JPA v2 2 6 调用具有多个输出参数的存储过程 但收到错误 DEBUG http nio 8080 exec 1 org hibernate engine jdbc spi SqlStat
  • 如何在谷歌地图android上显示多个标记

    我想在谷歌地图android上显示带有多个标记的位置 问题是当我运行我的应用程序时 它只显示一个位置 标记 这是我的代码 public class koordinatTask extends AsyncTask
  • 在我的 Spring Boot 示例中无法打开版本 3 中的 Swagger UI

    我在 Spring Boot 示例中打开 swagger ui 时遇到问题 当我访问 localhost 8080 swagger ui 或 localhost 8080 root api name swagger ui 时出现这种错误 S
  • logcat 中 mSecurityInputMethodService 为 null

    我写了一点android应显示智能手机当前位置 最后已知位置 的应用程序 尽管我复制了示例代码 并尝试了其他几种解决方案 但似乎每次都有相同的错误 我的应用程序由一个按钮组成 按下按钮应该log经度和纬度 但仅对数 mSecurityInp
  • java for windows 中的文件图标叠加

    我正在尝试像 Tortoise SVN 或 Dropbox 一样在文件和文件夹上实现图标叠加 我在网上查了很多资料 但没有找到Java的解决方案 Can anyone help me with this 很抱歉确认您的担忧 但这无法在 Ja
  • Spring Rest 和 Jsonp

    我正在尝试让我的 Spring Rest 控制器返回jsonp但我没有快乐 如果我想返回 json 但我有返回的要求 完全相同的代码可以正常工作jsonp我添加了一个转换器 我在网上找到了用于执行 jsonp 转换的源代码 我正在使用 Sp

随机推荐