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

标签 java docker-compose containers hyperledger-fabric oracle-call-interface

将 Hyperledger Fabric Java SDK 与 GO 链代码结合使用,在尝试使用以下命令启动链代码后出现错误 ojit_代码。

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

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

版本

  • super 账本结构:1.0.4
  • docker:17.05.0-ce
  • docker-compose:1.17.0
  • super 账本/fabric-orderer:1.0.0
  • super 账本/fabric-peer:1.0.0
  • hyperledger/fabric-ccenv:1.0.0
  • hyperledger/fabric-ca:1.0.0
  • super 账本/fabric-baseos:0.3.1
  • tomcat(docker 容器):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!]

看起来它无法正确创建容器,因为我在主要错误之前收到了 peer chaincode

我的 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"}

如果有人能给我一些指导,我将不胜感激!预先感谢您!

编辑:以下是将链码放在对等点上的方式:

链代码源位于 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),我使用 /etc/hyperledger/chaincode/src/super/test_cc/test_cc.go 命令将其发送给对等点。以下是安装建议的外观以及之后同行的响应的外观:

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:对等点的链代码在 client.sendInstallProposal(installProposalRequest, company.getPeers()); 中找到,但这不在其路径 /var/hyperledger/production/chaincodes/test_cc_go.0.0.1 中。它也不是尝试调用的 /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

最佳答案

原来我的链代码使用了依赖项(在我的例子中是 scrypt),这导致构建失败。该代码将通过单元测试并编译得很好,但因此无法在对等点上运行。 您可能希望将 go 依赖项安装到 ccenv(用于编译链代码)上,或者就我而言,我放弃了它,转而使用 Hyperledger Fabric 1.1 的内置加密支持。

关于java - 向对等方发送 Hyperledger Fabric 的链码实例化请求时出现 OCI 运行时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47593097/

相关文章:

java - 阶乘误差之和

mongodb - mongo-express 不是以 docker-compose 文件开头

java - 如何为 Docker 应用程序的 Jaspersoft 报告设置自定义货币符号

git - 当 GitHub 上的 master 分支更新时,刷新 ubuntu 服务器上的存储库。我怎样才能做到这一点?

java - 为什么Docker有两种类型的Docker Engine

java - 如何设计基于微服务的应用程序,每个微服务都有自己的数据源?

java - 在服务器上检测机器人?

java - 为什么抽象变量需要在 Scala 中进行类型注释?

docker - 如何从 Docker 容器内部拉取到主机剪贴板?

Azure容器实例没有IP