我正在尝试通过NodeSDK将组织动态添加到渠道。我已按照以下步骤操作: -提取返回到原始缓冲区的通道配置 -将其转换为json以便读取 -修改json -将其编码到原型缓冲区 -调用库的updateChannel方法
所有步骤都成功执行,但是在调用updateChannel方法时,它给了我策略错误。 请在下面查看订购者的日志:
2019-02-20 13:28:28.470 UTC [策略]评估-> DEBU a2f == 评估* cauthdsl.policy策略/ Channel / Application / Org1MSP / Admins == 2019-02-20 13:28:28.470 UTC [cauthdsl] func1-> DEBU a30 0xc0002afd50门1550669308470922609评估开始于2019-02-20 13:28:28.470 UTC [cauthdsl] func2-> DEBU a31 0xc0002afd50由0签名 主要评估开始(使用过(false))2019-02-20 13:28:28.470 UTC [cauthdsl] func2-> DEBU a32 0xc0002afd50处理身份0 a0af20的字节2019-02-20 13:28:28.470 UTC [msp] 满足PrincipalInternalPreV13-> DEBU a33检查身份 满足Org1MSP的ADMIN角色2019-02-20 13:28:28.470 UTC [cauthdsl] func2-> DEBU a34 0xc0002afd50主体匹配 身份0 2019-02-20 13:28:28.471 UTC [msp.identity]验证-> DEBU a35验证:摘要= 00000000 b7 4c c6 c7 b4 e4 45 34 00 61 4b 80 51 3d 96 07 | .L .... E4.aK.Q = .. | 00000010 3f 6f 28 73 99 44 01 d4 44 8a 84 70 27 06 e5 08 |?o(s.D..D..p'... | 2019-02-20 13:28:28.471 UTC [msp.identity]验证-> DEBU a36验证:sig = 00000000 30 44 02 20 24 a7 07 ba c9 d7 4b 0d 60 95 eb c1 | 0D。 $ ..... K.` ... | 00000010 96 d5 43 eb 3c fa 95 4f ce 44 2e 24 cd 2b d6 9b | ..C。<.. O.D。$。+ .. | 00000020 51 81 a6 cd 02 20 1f aa 81 d9 d7 d5 64 b4 36 54 | Q .... ...... d.6T | 00000030 cf 6b 4b d7 eb 42 51 b3 43 cf 07 99 18 3d 97 6d | .kK..BQ.C .... =。m | 00000040 31 97 94 07 70 c0 | 1 ... p。| 2019-02-20 13:28:28.471 UTC [cauthdsl] func2-> DEBU a37 0xc0002afd50主体 身份评估成功0 2019-02-20 13:28:28.471 UTC [cauthdsl] func1-> DEBU a38 0xc0002afd50门1550669308470922609 评估成功2019-02-20 13:28:28.471 UTC [政策]评估-> DEBU a39签名集符合政策 / Channel / Application / Org1MSP / Admins 2019-02-20 13:28:28.471 UTC [政策]评估-> DEBU a3a ==完成评估* cauthdsl.policy 策略/渠道/应用程序/ Org1MSP /管理员2019-02-20 13:28:28.471 UTC [政策]评估-> DEBU a3b ==评估* cauthdsl.policy政策 / Channel / Application / Org2MSP / Admins == 2019-02-20 13:28:28.471 UTC [cauthdsl] func1-> DEBU a3c 0xc00047c690门1550669308471165309 评估开始于2019-02-20 13:28:28.471 UTC [cauthdsl] func2-> DEBU 由0个主体评估签名的a3d 0xc00047c690开始使用 [false])2019-02-20 13:28:28.471 UTC [cauthdsl] func2-> DEBU a3e 0xc00047c690处理标识0,字节为a0af20 2019-02-20 13:28:28.471 UTC [cauthdsl] func2-> DEBU a3f 0xc00047c690身份0 不满足委托人:身份是其他成员 MSP(预期Org2MSP,获得Org1MSP)2019-02-20 13:28:28.471 UTC [cauthdsl] func2-> DEBU a40 0xc00047c690主体评估失败 2019-02-20 13:28:28.471 UTC [cauthdsl] func1-> DEBU a41 0xc00047c690 门1550669308471165309评估失败2019-02-20 13:28:28.471 UTC [政策]评估-> DEBU a42签名集不符合政策 / Channel / Application / Org2MSP / Admins 2019-02-20 13:28:28.471 UTC [政策]评估-> DEBU a43 ==完成评估* cauthdsl.policy 策略/频道/应用程序/ Org2MSP /管理员2019-02-20 13:28:28.471 UTC [策略] func1-> DEBU a44评估失败:仅1个策略 满意,但需要[Org1MSP.Admins Org2MSP.Admins]中的2个 2019-02-20 13:28:28.471 UTC [策略]评估-> DEBU a45签名 设置不符合政策/ Channel / Application / Admins 2019-02-20 13:28:28.471 UTC [策略]评估-> DEBU a46 ==完成评估 * policies.implicitMetaPolicy政策/ Channel / Application / Admins 2019-02-20 13:28:28.471 UTC [orderer.common.broadcast] ProcessMessage -> WARN a47 [channel:mychannel]由于错误而拒绝从192.168.64.1:47666广播配置消息:授权更新的错误: 验证DeltaSet时出错:[Group] / Channel / Application的策略不正确 满意:未能达到2个子策略的隐式阈值, 需要1剩余的2019-02-20 13:28:28.471 UTC [orderer.common.server] func1-> DEBU a48关闭广播流 2019-02-20 13:28:28.471 UTC [comm.grpc.server] 1-> INFO a49流 通话已完成{“ grpc.start_time”:“ 2019-02-20T13:28:28.469Z”, “ grpc.service”:“ orderer.AtomicBroadcast”,“ grpc.method”:“广播”, “ grpc.peer_address”:“ 192.168.64.1:47666”,“ grpc.code”:“ OK”, “ grpc.call_duration”:“ 2.221942ms”} 2019-02-20 13:28:30.655 UTC [grpc] infof-> DEBU a4a传输:loopyWriter.run返回。连接 错误:desc =“运输正在关闭”
请帮助我解决我的配置中缺少的内容。.........
答案 0 :(得分:0)
最后,当文档显示时,签署并提交配置更新 您还需要同时由org2签名org3_update_in_envelope.pb文件。
因此,像这样设置org2的环境变量:
export CORE_PEER_LOCALMSPID="Org2MSP"
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp
export CORE_PEER_ADDRESS=peer0.org2.example.com:7051
并再次为org2运行此命令
peer channel signconfigtx -f org3_update_in_envelope.pb