超级账本网络配置错误

4

我已在WINDOWS 10 prof 64位系统上设置好所有先决条件。

我正在尝试运行Hyperledger示例“余额转移”。 我启动了节点应用程序,但当我尝试注册用户时,返回了一个带有以下消息的错误:

无法使用以下原因为组织org1注册用户名Paresh:失败的错误:由于缺少配置数据而无效的网络配置

我不确定自己漏掉了什么。

这是完整的日志:

    [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

你对这个项目做了任何更改吗?例如在配置文件network-config.yaml中? - ComBin
我因为在Windows上遇到了多个问题,所以转移到了Ubuntu操作系统。在Ubuntu上设置和启动网络非常顺畅! - Paresh Varde
@ComBin 我们应该改变什么? - Tariq
@Tariq,我不知道。我们在过去曾面临这个问题,我只想知道主题发起者在遇到这个问题之前做了什么更改。 - ComBin
1个回答

1

笔误:组织名称应该使用 PascalCase(Org1 而不是 org1


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接