Hyperledger网络配置错误

时间:2018-03-13 14:59:34

标签: hyperledger-fabric

我已经在WINDOWS 10 Prof 64 BIT系统上设置了所有先决条件。

我正在尝试运行hyperledger示例“余额转移”。我启动了节点应用程序,当我尝试注册用户时,我收到一条错误消息,后面跟着消息

无法为组织org1注册用户名Paresh :: failed错误:由于缺少配置数据而导致网络配置无效

我不确定我错过了什么。

这是完整的日志:

    [2018-03-13 20:20:04.855] [INFO] SampleWebApp - ****************** SERVER STARTED ************************
[2018-03-13 20:20:04.884] [INFO] SampleWebApp - ***************  http://localhost:4000  ******************
[2018-03-13 20:20:46.938] [DEBUG] SampleWebApp -  ------>>>>>> new request for /users
[2018-03-13 20:20:46.988] [DEBUG] SampleWebApp - End point : /users
[2018-03-13 20:20:46.988] [DEBUG] SampleWebApp - User name : Paresh
[2018-03-13 20:20:46.988] [DEBUG] SampleWebApp - Org name  : org1
[2018-03-13 20:20:46.991] [DEBUG] Helper - getClientForOrg - ****** START org1 undefined
[2018-03-13 20:20:47.013] [DEBUG] Helper - [NetworkConfig101.js]: constructor, network_config: {"name":"balance-transfer","x-type":"hlfv1","description":"Balance Transfer Network","version":"1.0","channels":{"mychannel":{"orderers":["orderer.example.com"],"peers":{"peer0.org1.example.com":{"endorsingPeer":true,"chaincodeQuery":true,"ledgerQuery":true,"eventSource":true},"peer1.org1.example.com":{"endorsingPeer":false,"chaincodeQuery":true,"ledgerQuery":true,"eventSource":false},"peer0.org2.example.com":{"endorsingPeer":true,"chaincodeQuery":true,"ledgerQuery":true,"eventSource":true},"peer1.org2.example.com":{"endorsingPeer":false,"chaincodeQuery":true,"ledgerQuery":true,"eventSource":false}},"chaincodes":["mycc:v0"]}},"organizations":{"Org1":{"mspid":"Org1MSP","peers":["peer0.org1.example.com","peer1.org1.example.com"],"certificateAuthorities":["ca-org1"],"adminPrivateKey":{"path":"artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk"},"signedCert":{"path":"artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"}},"Org2":{"mspid":"Org2MSP","peers":["peer0.org2.example.com","peer1.org2.example.com"],"certificateAuthorities":["ca-org2"],"adminPrivateKey":{"path":"artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk"},"signedCert":{"path":"artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem"}}},"orderers":{"orderer.example.com":{"url":"grpcs://localhost:7050","grpcOptions":{"ssl-target-name-override":"orderer.example.com","grpc-max-send-message-length":15},"tlsCACerts":{"path":"artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"}}},"peers":{"peer0.org1.example.com":{"url":"grpcs://localhost:7051","eventUrl":"grpcs://localhost:7053","grpcOptions":{"ssl-target-name-override":"peer0.org1.example.com"},"tlsCACerts":{"path":"artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"}},"peer1.org1.example.com":{"url":"grpcs://localhost:7056","eventUrl":"grpcs://localhost:7058","grpcOptions":{"ssl-target-name-override":"peer1.org1.example.com"},"tlsCACerts":{"path":"artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"}},"peer0.org2.example.com":{"url":"grpcs://localhost:8051","eventUrl":"grpcs://localhost:8053","grpcOptions":{"ssl-target-name-override":"peer0.org2.example.com"},"tlsCACerts":{"path":"artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"}},"peer1.org2.example.com":{"url":"grpcs://localhost:8056","eventUrl":"grpcs://localhost:8058","grpcOptions":{"ssl-target-name-override":"peer1.org2.example.com"},"tlsCACerts":{"path":"artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"}}},"certificateAuthorities":{"ca-org1":{"url":"https://localhost:7054","httpOptions":{"verify":false},"tlsCACerts":{"path":"artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem"},"registrar":[{"enrollId":"admin","enrollSecret":"adminpw"}],"caName":"ca-org1"},"ca-org2":{"url":"https://localhost:8054","httpOptions":{"verify":false},"tlsCACerts":{"path":"artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem"},"registrar":[{"enrollId":"admin","enrollSecret":"adminpw"}],"caName":"ca-org2"}}}
[2018-03-13 20:20:47.096] [ERROR] Helper - Failed to get registered user: Paresh with error: Error: Invalid network configuration due to missing configuration data
[2018-03-13 20:20:47.097] [DEBUG] SampleWebApp - -- returned from registering the username Paresh for organization org1
[2018-03-13 20:20:47.097] [DEBUG] SampleWebApp - Failed to register the username Paresh for organization org1 with::failed Error: Invalid network configuration due to missing configuration data

1 个答案:

答案 0 :(得分:1)

拼写错误:单位名称应使用PascalCase(Org1而不是org1