我正在不同的机器中设置一个具有2个独立对等体的作曲家网络。当我尝试使用我为第二个对等体发出的身份ping网络时,我收到错误消息,说明必须激活身份。我看到&{39; composer identity list
'有一个身份发布和绑定,
作曲家身份列表-c alice-org1 @ bl-security-network✔列出所有 业务网络中的身份 - $ class:org.hyperledger.composer.system.Identity identityId: 5254561bf2038c3f2764785ec6407d5c108b6cb59f9e4df071dd37b83748abe8
姓名:admin issuer:
ac3dbcbe135ba48b29f97665bb103f8260c38d3872473e584314392797c595f3
证书: """ -----开始证书----- MIICATCCAaigAwIBAgIUCMlRQ75ytdGtgVj / O5F6pXgqv9kwCgYIKoZIzj0EAwIw czELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh biBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMT E2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwNTE2MDgxNjAwWhcNMTkwNTE2MDgy MTAwWjAhMQ8wDQYDVQQLEwZjbGllbnQxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZI zj0CAQYIKoZIzj0DAQcDQgAEGcw0GV / K / L5VCmJLS / ngZsR2vq7xrKVhPt5AeoVX Lgjv0aO6IxxTiialnWOdEIpFAlogu1BNSHoGFn8SDryJzaNsMGowDgYDVR0PAQH / BAQDAgeAMAwGA1UdEwEB / wQCMAAwHQYDVR0OBBYEFDt6FVgrod + MFmOf8tdyw6dH a0HKMCsGA1UdIwQkMCKAIFoSZq5xVRFtKJ6 + doWFMgMxQsitU4s7BZ4ST0dpkFLt MAoGCCqGSM49BAMCA0cAMEQCIC9XpIvaw + hnYLTHHYoUjTjrWiRQMD6991EPYZ / 6 v4x1AiAKVVD5T7WXvrm05N4ThdpUS1BeBSCor4Wgm0fQC8ekeg == -----结束证书-----""" state: ACTIVATED participant: resource:org.hyperledger.composer.system.NetworkAdmin#alice-org1
- $ class:org.hyperledger.composer.system.Identity identityId: 6fdff74bf0ada91fb4a095114d8fa2a4547faabf7b2e9580b5d8a1ebb800d13f
姓名:admin issuer:
07290d7a00cf1fca27f0c98491478ecc0c65ced2caedfa6e0c000f80caaf50e4
证书: """ -----开始证书----- MIICAjCCAaigAwIBAgIUNnm7Rls6K5Ay0trODVa8CXQxtyIwCgYIKoZIzj0EAwIw czELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNh biBGcmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMT E2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwNTE2MDgxNjAwWhcNMTkwNTE2MDgy MTAwWjAhMQ8wDQYDVQQLEwZjbGllbnQxDjAMBgNVBAMTBWFkbWluMFkwEwYHKoZI zj0CAQYIKoZIzj0DAQcDQgAE1y8zJ + 6ZjO5VV6 / OG + qCQzGyII62AujhNkyDapp2 TlylMtlDX6VODtLmiXNjdlPi63NKUGYkKqoCAJh3efX866NsMGowDgYDVR0PAQH / BAQDAgeAMAwGA1UdEwEB / wQCMAAwHQYDVR0OBBYEFMDKuUnac7KX / b7qSZ1x9tbD 0EC + MCsGA1UdIwQkMCKAIESSjMUlSEPHYNOLB9sm9pQsNYZzaqm8kY0Qwg47EzSI MAoGCCqGSM49BAMCA0gAMEUCIQCbAYneZofBVmQJHdcyJl0GDTS3FhZ1Zw7 + TO / I NnF2IAIgMBO2zKPCg7ygkIPPrPLVnuJN1f9LmEZQmkXV1xaiqao = -----结束证书-----""" state: BOUND participant: resource:org.hyperledger.composer.system.NetworkAdmin#bob-org2
命令成功
但未激活。我相信我的问题可能出在第二个同伴的连接配置文件中。
以下是我写的连接配置文件。我使用其他计算机的IP地址(20.20.20.23)来运行 docker services 和 localhost '对于在此对等方上运行的服务。以下连接配置文件是否适用于此设置?
{ "name": "my-net", "x-type": "hlfv1", "version": "1.0.0", "client": { "organization": "Org2", "connection": { "timeout": { "peer": { "endorser": "200", "eventHub": "200", "eventReg": "200" }, "orderer": "300" } } }, "channels": { "mychannel": { "orderers": [ "orderer.example.com" ], "peers": { "peer0.org1.example.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer0.org2.example.com": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true } } } }, "organizations": { "Org1": { "mspid": "Org1MSP", "peers": [ "peer0.org1.example.com" ], "certificateAuthorities": [ "ca.org1.example.com" ] }, "Org2": { "mspid": "Org2MSP", "peers": [ "peer0.org2.example.com" ], "certificateAuthorities": [ "ca.org2.example.com" ] } }, "orderers": { "orderer.example.com": { "url": "grpcs://20.20.20.23:7050", "grpcOptions": { "ssl-target-name-override": "orderer.example.com" }, "tlsCACerts": { "pem": "INSERT_ORDERER_CA_CERT" } } }, "peers": { "peer0.org1.example.com": { "url": "grpcs://20.20.20.23:8051", "eventUrl": "grpcs://20.20.20.23:8053", "grpcOptions": { "ssl-target-name-override": "peer0.org1.example.com" }, "tlsCACerts": { "pem": "INSERT_ORG1_CA_CERT" } }, "peer0.org2.example.com": { "url": "grpcs://localhost:9051", "eventUrl": "grpcs://localhost:9053", "grpcOptions": { "ssl-target-name-override": "peer0.org2.example.com" }, "tlsCACerts": { "pem": "INSERT_ORG2_CA_CERT" } } }, "certificateAuthorities": { "ca.org1.example.com": { "url": "https://20.20.20.23:7054", "caName": "ca.example.com", "httpOptions": { "verify": false } }, "ca.org2.example.com": { "url": "https://localhost:8054", "caName": "ca1.example.com", "httpOptions": { "verify": false } } } }
问题也可能在于
我认为我的问题实际上可能在网络启动命令中。在从第二个对等方复制bob-org2的文件后,我(在对等方为admin alice-org1)composer network start -c PeerAdmin@byfn-network-org1 -n bl-security-network -V 0.0.1 -o endorsementPolicyFile=endorsement-policy.json -A alice-org1 -C alice-org1/admin-pub.pem -A bob-org2 -C bob-org2/admin-pub.pem
。我看到网络启动也创建了编写器卡,但这两个卡都继承了PeerAdmin @ byfn-network-org1的连接配置文件,而bob-org2应该具有为Org2定义的连接配置文件。如何为每个管理员指定连接配置文件以使其不同?
答案 0 :(得分:0)
composer的multiorg教程显示了这个命令,用于在org2中为'bob'创建卡片,其中包含org2的特定连接配置文件json。
composer card create -p /tmp/composer/org2/byfn-network-org2.json -u bob -n trade-network -c bob/admin-pub.pem -k bob/admin-priv.pem
连接配置文件看起来没问题 - 我猜你确实插入了证书。
答案 1 :(得分:0)
我现在注意到虽然composer network ping
适用于组织1卡,但它表示即使我更新到0.19.5,运行时版本也是0.19.4。
已成功测试与网络的连接: BL-安全网络 商业网络版:0.0.1 Composer运行时版本:0.19.4 参与者:org.hyperledger.composer.system.NetworkAdmin#alice-org1 身份:org.hyperledger.composer.system.Identity#32d8b7d28410fd200ab329b46fd9cb54e0aadf30d8a7bfc8ec5ddfdd154a37b8
命令成功
如果我为我定义的不同超级分层结构和超级边缘编写器网络运行相同的命令,那么我看到作曲家运行时版本,如果是0.19.5。他怎么会这样?我尝试重新安装composer-cli和其他作曲家组件无济于事....
更新:切换到另一台机器,我设法达到0.19.5。现在我看到安装的是0.19.5,但我仍然收到ACTIVATION_REQUIRED错误......