fabric-sdk-java实例化收到提案验证成功,但发送给orderer时,报错 Cause: UNSUCCESSFUL
版本:
fabric-java-sdk 1.0.0
Fabric 1.0.0
Ubuntu18.04
IDEA2019.2
感觉很奇怪的问题:
创建通道时用的函数newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures)
,之后加入节点,事件,设置监听,初始化,安装链码都没问题,到实例化链码时,构建提案,发送提案,验证回复信息,这些也没问题,之后就是发送给orderer,sendTransaction(Collection<ProposalResponse> proposalResponses)
,一直报错:
java.util.concurrent.ExecutionException: java.lang.Exception: Channel mychannel failed to place transaction 073b532a28788aa325e20ecc51f7d629eb90f5f09865748f51212278a55f94b4 on Orderer. Cause: UNSUCCESSFUL
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at config.ChaincodeOperation.analysisResponse(ChaincodeOperation.java:436)
at config.ChaincodeOperation.instantiateChaincode(ChaincodeOperation.java:251)
at Main.main(Main.java:88)
Caused by: java.lang.Exception: Channel mychannel failed to place transaction 073b532a28788aa325e20ecc51f7d629eb90f5f09865748f51212278a55f94b4 on Orderer. Cause: UNSUCCESSFUL
at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2183)
at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2087)
at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2073)
... 3 more
打开orderer日志:
2019-04-30 04:52:24.302 UTC [orderer/main] Broadcast -> DEBU 8aa Starting new Broadcast handler
2019-04-30 04:52:24.302 UTC [orderer/common/broadcast] Handle -> DEBU 8ab Starting new broadcast loop
2019-04-30 04:52:24.302 UTC [orderer/common/broadcast] Handle -> DEBU 8ac [channel: mychannel] Broadcast is filtering message of type ENDORSER_TRANSACTION
2019-04-30 04:52:24.302 UTC [policies] GetPolicy -> DEBU 8ad Returning policy Writers for evaluation
2019-04-30 04:52:24.302 UTC [cauthdsl] func1 -> DEBU 8ae 0xc420172018 gate 1556599944302568647 evaluation starts
2019-04-30 04:52:24.302 UTC [cauthdsl] func2 -> DEBU 8af 0xc420172018 signed by 0 principal evaluation starts (used [false])
2019-04-30 04:52:24.302 UTC [cauthdsl] func2 -> DEBU 8b0 0xc420172018 processing identity 0 with bytes of 0a074f7267314d53501292062d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949434744434341622b67417749424167495159424a4f4a77584d453237734c6a766b66634155686a414b42676771686b6a4f50515144416a427a4d5173770a435159445651514745774a56557a45544d4245474131554543424d4b5132467361575a76636d3570595445574d4251474131554542784d4e5532467549455a790a5957356a61584e6a627a455a4d4263474131554543684d5162334a6e4d53356c654746746347786c4c6d4e76625445634d426f474131554541784d54593245750a62334a6e4d53356c654746746347786c4c6d4e7662544165467730784f5441304d6a49784d4449304d444e61467730794f5441304d546b784d4449304d444e610a4d467378437a414a42674e5642415954416c56544d524d77455159445651514945777044595778705a6d3979626d6c684d5259774641594456515148457731540a59573467526e4a68626d4e7063324e764d523877485159445651514444425a425a473170626b4276636d63784c6d56345957317762475575593239744d466b770a457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414564597a50516436594d6964324e792f727a5344566a5541562f584a53373859370a6c6b6f34384e6468494b447541796553736379414631345346616179745453773337676d614a333336702f6159614c43774245717a614e4e4d457377446759440a565230504151482f42415144416765414d41774741315564457745422f7751434d4141774b7759445652306a42435177496f416779796351436944665a6a30520a6b4b4c414e664c55596d484c45524d3630365754757674564a41644d62663077436759494b6f5a497a6a3045417749445277417752414967425266325a4d76650a4348323637674853577949494d445a336f696a413970613975502f6852304b49414c6f4349474a515673553639312f75506a33503254796e53646175613763300a6b757479534f384f507a7a5631304e6f0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a
2019-04-30 04:52:24.302 UTC [msp/identity] newIdentity -> DEBU 8b1 Creating identity instance for ID &{Org1MSP dafc5798132b6ce5dfada38d501feef6be5b8c9d350b151bf40fb13e9ad90863}
2019-04-30 04:52:24.302 UTC [msp] SatisfiesPrincipal -> DEBU 8b2 Checking if identity satisfies MEMBER role for Org1MSP
2019-04-30 04:52:24.302 UTC [msp] Validate -> DEBU 8b3 MSP Org1MSP validating identity
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8b4 0xc420172018 principal matched by identity 0
2019-04-30 04:52:24.303 UTC [msp/identity] Verify -> DEBU 8b5 Verify: digest = 00000000 b6 2c ce 42 01 bc 46 8b 7b 9c 2a 60 86 f3 ee ef |.,.B..F.{.*`....|
00000010 26 04 67 af 2e af ee 9e 1a 40 81 a7 fe 90 34 71 |&.g......@....4q|
2019-04-30 04:52:24.303 UTC [msp/identity] Verify -> DEBU 8b6 Verify: sig = 00000000 30 44 02 20 40 7a 22 bf 39 6d 40 b5 10 35 53 f8 |0D. @z".9m@..5S.|
00000010 81 de 39 03 f3 35 75 7c 54 05 8a 64 49 82 7f 18 |..9..5u|T..dI...|
00000020 7b 77 ad 43 02 20 0a 5b 39 66 49 a1 9b 34 ea c5 |{w.C. .[9fI..4..|
00000030 e0 63 c4 45 80 55 6a fe 8c c3 bd ae 14 42 0f 1a |.c.E.Uj......B..|
00000040 38 76 29 b6 23 fa |8v).#.|
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8b7 0xc420172018 signature for identity 0 is invalid: The signature is invalid
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8b8 0xc420172018 principal evaluation fails
2019-04-30 04:52:24.303 UTC [cauthdsl] func1 -> DEBU 8b9 0xc420172018 gate 1556599944302568647 evaluation fails
2019-04-30 04:52:24.303 UTC [cauthdsl] func1 -> DEBU 8ba 0xc420172018 gate 1556599944303242385 evaluation starts
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8bb 0xc420172018 signed by 0 principal evaluation starts (used [false])
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8bc 0xc420172018 processing identity 0 with bytes of 0a074f7267314d53501292062d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949434744434341622b67417749424167495159424a4f4a77584d453237734c6a766b66634155686a414b42676771686b6a4f50515144416a427a4d5173770a435159445651514745774a56557a45544d4245474131554543424d4b5132467361575a76636d3570595445574d4251474131554542784d4e5532467549455a790a5957356a61584e6a627a455a4d4263474131554543684d5162334a6e4d53356c654746746347786c4c6d4e76625445634d426f474131554541784d54593245750a62334a6e4d53356c654746746347786c4c6d4e7662544165467730784f5441304d6a49784d4449304d444e61467730794f5441304d546b784d4449304d444e610a4d467378437a414a42674e5642415954416c56544d524d77455159445651514945777044595778705a6d3979626d6c684d5259774641594456515148457731540a59573467526e4a68626d4e7063324e764d523877485159445651514444425a425a473170626b4276636d63784c6d56345957317762475575593239744d466b770a457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414564597a50516436594d6964324e792f727a5344566a5541562f584a53373859370a6c6b6f34384e6468494b447541796553736379414631345346616179745453773337676d614a333336702f6159614c43774245717a614e4e4d457377446759440a565230504151482f42415144416765414d41774741315564457745422f7751434d4141774b7759445652306a42435177496f416779796351436944665a6a30520a6b4b4c414e664c55596d484c45524d3630365754757674564a41644d62663077436759494b6f5a497a6a3045417749445277417752414967425266325a4d76650a4348323637674853577949494d445a336f696a413970613975502f6852304b49414c6f4349474a515673553639312f75506a33503254796e53646175613763300a6b757479534f384f507a7a5631304e6f0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a
2019-04-30 04:52:24.303 UTC [msp/identity] newIdentity -> DEBU 8bd Creating identity instance for ID &{Org1MSP dafc5798132b6ce5dfada38d501feef6be5b8c9d350b151bf40fb13e9ad90863}
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8be 0xc420172018 identity 0 does not satisfy principal: The identity is a member of a different MSP (expected Org2MSP, got Org1MSP)
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8bf 0xc420172018 principal evaluation fails
2019-04-30 04:52:24.303 UTC [cauthdsl] func1 -> DEBU 8c0 0xc420172018 gate 1556599944303242385 evaluation fails
2019-04-30 04:52:24.303 UTC [cauthdsl] func1 -> DEBU 8c1 0xc420172018 gate 1556599944303492774 evaluation starts
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8c2 0xc420172018 signed by 0 principal evaluation starts (used [false])
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8c3 0xc420172018 processing identity 0 with bytes of 0a074f7267314d53501292062d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949434744434341622b67417749424167495159424a4f4a77584d453237734c6a766b66634155686a414b42676771686b6a4f50515144416a427a4d5173770a435159445651514745774a56557a45544d4245474131554543424d4b5132467361575a76636d3570595445574d4251474131554542784d4e5532467549455a790a5957356a61584e6a627a455a4d4263474131554543684d5162334a6e4d53356c654746746347786c4c6d4e76625445634d426f474131554541784d54593245750a62334a6e4d53356c654746746347786c4c6d4e7662544165467730784f5441304d6a49784d4449304d444e61467730794f5441304d546b784d4449304d444e610a4d467378437a414a42674e5642415954416c56544d524d77455159445651514945777044595778705a6d3979626d6c684d5259774641594456515148457731540a59573467526e4a68626d4e7063324e764d523877485159445651514444425a425a473170626b4276636d63784c6d56345957317762475575593239744d466b770a457759484b6f5a497a6a3043415159494b6f5a497a6a3044415163445167414564597a50516436594d6964324e792f727a5344566a5541562f584a53373859370a6c6b6f34384e6468494b447541796553736379414631345346616179745453773337676d614a333336702f6159614c43774245717a614e4e4d457377446759440a565230504151482f42415144416765414d41774741315564457745422f7751434d4141774b7759445652306a42435177496f416779796351436944665a6a30520a6b4b4c414e664c55596d484c45524d3630365754757674564a41644d62663077436759494b6f5a497a6a3045417749445277417752414967425266325a4d76650a4348323637674853577949494d445a336f696a413970613975502f6852304b49414c6f4349474a515673553639312f75506a33503254796e53646175613763300a6b757479534f384f507a7a5631304e6f0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a
2019-04-30 04:52:24.303 UTC [msp/identity] newIdentity -> DEBU 8c4 Creating identity instance for ID &{Org1MSP dafc5798132b6ce5dfada38d501feef6be5b8c9d350b151bf40fb13e9ad90863}
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8c5 0xc420172018 identity 0 does not satisfy principal: The identity is a member of a different MSP (expected OrdererMSP, got Org1MSP)
2019-04-30 04:52:24.303 UTC [cauthdsl] func2 -> DEBU 8c6 0xc420172018 principal evaluation fails
2019-04-30 04:52:24.303 UTC [cauthdsl] func1 -> DEBU 8c7 0xc420172018 gate 1556599944303492774 evaluation fails
2019-04-30 04:52:24.303 UTC [orderer/common/broadcast] Handle -> WARN 8c8 [channel: mychannel] Rejecting broadcast message because of filter error: Rejected by rule: *sigfilter.sigFilter
2019-04-30 04:52:24.303 UTC [orderer/main] func1 -> DEBU 8c9 Closing Broadcast stream
相关部分就只有倒数第二行,报了个警告,但是,,这个怎么解决呢?
重新启动程序,使用newChannel(String name)
,一路下来,没有发生错误;
使用newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures)
创建通道,在安装链码,然后停止程序,使用newChannel(String name)
创建通道,实例化链码,这也没发生错误!
折腾了两天了,还是没有解决,求帮助。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该是channel中的orderer没有指定