2017-11-07 4 views
0

Hyperledger Fabricビジネスネットワーク用にNode.js SDKを実装しようとしています。私のネットワークには、1つの組織、4つのピア、1つのチャネル、ソロのオーダーと1つのCAがあります。Node.js SDKを使用してチェーンコードを呼び出す際にエラーが発生しました

私は、Jimとorg1のユーザー組織のJWT IDを発行することに成功しました。

私が使用してchaincodeを起動しようとすると:

curl -s -X POST \ 
    http://localhost:4000/channels/c1/chaincodes/txman \ 
    -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MTAwODIyNzMsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE1MTAwNDYyNzN9.NTDYky6jj_y1COP163Z_HA6q4v7S1_jN6BxL00Bo-Xo" \ 
    -H "content-type: application/json" \ 
    -d '{ 
    "fcn":"queryTx", 
    "args":["TX0"] 
}' 

を私は次のエラーを取得しています:

2017-11-07 11:18:34.286] [DEBUG] SampleWebApp - Decoded from JWT token: username - Jim, orgname - org1 
[2017-11-07 11:18:34.287] [DEBUG] SampleWebApp - ==================== INVOKE ON CHAINCODE ================== 
[2017-11-07 11:18:34.287] [DEBUG] SampleWebApp - USERNAME: Jim 
[2017-11-07 11:18:34.287] [DEBUG] SampleWebApp - ORGNAME: org1 
[2017-11-07 11:18:34.287] [DEBUG] SampleWebApp - channelName : c1 
[2017-11-07 11:18:34.288] [DEBUG] SampleWebApp - chaincodeName : txman 
[2017-11-07 11:18:34.288] [DEBUG] SampleWebApp - fcn : queryTx 
[2017-11-07 11:18:34.288] [DEBUG] SampleWebApp - args : TX0 
[2017-11-07 11:18:34.292] [DEBUG] invoke-chaincode - 
============ invoke transaction on organization org1 ============ 

[2017-11-07 11:18:34.292] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore.js - constructor 
[2017-11-07 11:18:34.293] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue 
[2017-11-07 11:18:34.298] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - start 
[2017-11-07 11:18:34.298] [DEBUG] Helper - [crypto_ecdsa_aes]: importKey - have the key [Circular] 
[2017-11-07 11:18:34.300] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store 
[2017-11-07 11:18:34.300] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: c3cd1a318e957b0200852e4ed6c9601eadc8225eb9f79acc11b1c65df142446a 
[2017-11-07 11:18:34.300] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: f7bbe9fd43eaae1a0a1d2eb3024ecd79bd63c39a8d1b3b978bc8b4a652d0ef63 
[2017-11-07 11:18:34.301] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue 
[2017-11-07 11:18:34.303] [DEBUG] Helper - [utils.CryptoKeyStore]: _getKeyStore resolving store 
[2017-11-07 11:18:34.303] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- getValue 
[2017-11-07 11:18:34.304] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: c3cd1a318e957b0200852e4ed6c9601eadc8225eb9f79acc11b1c65df142446a 
[2017-11-07 11:18:34.304] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: f7bbe9fd43eaae1a0a1d2eb3024ecd79bd63c39a8d1b3b978bc8b4a652d0ef63 
[2017-11-07 11:18:34.305] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: c3cd1a318e957b0200852e4ed6c9601eadc8225eb9f79acc11b1c65df142446a 
[2017-11-07 11:18:34.306] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: f7bbe9fd43eaae1a0a1d2eb3024ecd79bd63c39a8d1b3b978bc8b4a652d0ef63 
[2017-11-07 11:18:34.308] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param X: c3cd1a318e957b0200852e4ed6c9601eadc8225eb9f79acc11b1c65df142446a 
[2017-11-07 11:18:34.308] [DEBUG] Helper - [ecdsa/key.js]: ECDSA curve param Y: f7bbe9fd43eaae1a0a1d2eb3024ecd79bd63c39a8d1b3b978bc8b4a652d0ef63 
[2017-11-07 11:18:34.309] [DEBUG] Helper - [FileKeyValueStore.js]: FileKeyValueStore -- setValue 
[2017-11-07 11:18:34.309] [INFO] Helper - Successfully loaded member from persistence 
[2017-11-07 11:18:34.313] [DEBUG] invoke-chaincode - Sending transaction "{"_nonce":{"type":"Buffer","data":[218,130,209,154,87,123,73,36,118,155,194,91,27,250,14,216,117,202,164,5,16,237,96,208]},"_transaction_id":"dba107be47745c51eb75b6a927d68f0afd58b325c5e36326b40a729f9d858f43"}" 
[2017-11-07 11:18:34.341] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { 
    r: <BN: cf5e0aaef0fd10d9abf468e025c6f6c1e8991d0dcddf5f5aa6b285ebdcd920ad>, 
    s: <BN: 8de356dcfda3ba3fb0d6decfc0e43995b3297bc7037fd3997bfba561e6d626d>, 
    recoveryParam: 0 } 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com") 
    at /home/brankoterzic/Desktop/devGC/txman/node_modules/grpc/src/client.js:554:15 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com") 
    at /home/brankoterzic/Desktop/devGC/txman/node_modules/grpc/src/client.js:554:15 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com") 
    at /home/brankoterzic/Desktop/devGC/txman/node_modules/grpc/src/client.js:554:15 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com") 
    at /home/brankoterzic/Desktop/devGC/txman/node_modules/grpc/src/client.js:554:15 
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com") 
    at /home/brankoterzic/Desktop/devGC/txman/node_modules/grpc/src/client.js:554:15 
[2017-11-07 11:18:34.400] [ERROR] invoke-chaincode - transaction proposal was bad 
[2017-11-07 11:18:34.401] [ERROR] invoke-chaincode - transaction proposal was bad 
[2017-11-07 11:18:34.401] [ERROR] invoke-chaincode - transaction proposal was bad 
[2017-11-07 11:18:34.401] [ERROR] invoke-chaincode - transaction proposal was bad 
[2017-11-07 11:18:34.401] [ERROR] invoke-chaincode - transaction proposal was bad 
[2017-11-07 11:18:34.401] [ERROR] invoke-chaincode - Failed to send Proposal or receive valid response. Response null or status is not 200. exiting... 
[2017-11-07 11:18:34.401] [ERROR] invoke-chaincode - Failed to order the transaction. Error code: undefined 

私はバランス転送の例をNode.jsの次ました:https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer

ありがとうございました!

答えて

0

私は、ドッキングウィンドウ-コン-base.yaml ENV変数に

FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/361a9254173cb1a97c057432094a20db9578ca69a152725f96323e00379c5ad6_sk

にCA

crypto-config/peerOrganizations/org1.example.com/ca/361a9254173cb1a97c057432094a20db9578ca69a152725f96323e00379c5ad6_sk

用に生成された暗号化を設定することでこれを解決してきました。

関連する問題