Corda V1.0公证群集问题与Gradle

时间:2017-10-17 05:49:09

标签: corda

我使用下面的config来构建Notary Cluster并启动它们。我在V14版本中使用了这种类似的脚本,这很好。但是在V1中弹出那个错误。请帮我检查一下。

任务deployNodesRAFT(类型:net.corda.plugins.Cordform,dependsOn:[' jar']){

directory "./build/nodes"
networkMap "C=CH,L=Zurich,O=NotaryService0"

node {
    name "C=CH,L=Zurich,O=NotaryService0"
    advertisedServices = ["corda.notary.validating.raft|C=CH,L=Zurich,O=Raft,CN=corda.notary.validating.raft"]
    p2pPort 10002
    rpcPort 10003
    notaryNodePort 10001
    cordapps = []
}
node {
    name "C=CH,L=Zurich,O=NotaryService1"
    advertisedServices = ["corda.notary.validating.raft|C=CH,L=Zurich,O=Raft,CN=corda.notary.validating.raft"]
    p2pPort 10091
    rpcPort 10092
    cordapps = []
    notaryNodePort 10093
    notaryClusterAddresses = ["localhost:10001"]
}
node {
    name "C=CH,L=Zurich,O=NotaryService2"
    advertisedServices = ["corda.notary.validating.raft|C=CH,L=Zurich,O=Raft,CN=corda.notary.validating.raft"]
    p2pPort 10094
    rpcPort 10095
    cordapps = []
    notaryNodePort 10096
    notaryClusterAddresses = ["localhost:10001"]
}

日志: [错误] 2017-10-17T05:42:31,180Z [main] identity.PersistentIdentityService.verifyAndRegisterIdentity - 名称约束检查失败 [ERROR] 2017-10-17T05:42:31,181Z [main] identity.PersistentIdentityService.verifyAndRegisterIdentity - Path = [ERROR] 2017-10-17T05:42:31,181Z [main] identity.PersistentIdentityService.verifyAndRegisterIdentity - CN = Corda Node Root CA,O = R3,OU = corda,L = London,C = UK [ERROR] 2017-10-17T05:42:31,182Z [main] identity.PersistentIdentityService.verifyAndRegisterIdentity - CN = Corda Node Intermediate CA,O = R3,OU = corda,L = London,C = UK [ERROR] 2017-10-17T05:42:31,184Z [main] identity.PersistentIdentityService.verifyAndRegisterIdentity - C = CH,L = Zurich,O = NotaryService0,CN = Corda Client CA Certificate [ERROR] 2017-10-17T05:42:31,185Z [main] identity.PersistentIdentityService.verifyAndRegisterIdentity - C = CH,L = Zurich,O = Raft,CN = corda.notary.validating.raft [ERROR] 2017-10-17T05:42:31,189Z [main] internal.Node.run - 节点启动时的异常 rx.exceptions.OnErrorNotImplementedException:名称约束检查失败     at rx.internal.util.InternalObservableUtils $ ErrorNotImplementedAction.call(InternalObservableUtils.java:386)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.util.InternalObservableUtils $ ErrorNotImplementedAction.call(InternalObservableUtils.java:383)〜[rxjava-1.2.4.jar:1.2.4]     在rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44)〜[rxjava-1.2.4.jar:1.2.4]     在rx.observers.SafeSubscriber._onError(SafeSubscriber.java:153)〜[rxjava-1.2.4.jar:1.2.4]     在rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)〜[rxjava-1.2.4.jar:1.2.4]     at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:216)~ [rxjava-1.2.4.jar:1.2.4]     在rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)〜[rxjava-1.2.4.jar:1.2.4]     在rx.observers.Subscribers $ 5.onNext(Subscribers.java:235)〜[rxjava-1.2.4.jar:1.2.4]     at net.corda.node.utilities.DatabaseTransactionWrappingSubscriber $ onNext $ 1.invoke(CordaPersistence.kt:159)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.DatabaseTransactionWrappingSubscriber $ onNext $ 1.invoke(CordaPersistence.kt:143)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.DatabaseTransactionWrappingSubscriber $ forEachSubscriberWithDbTx $ 1.invoke(CordaPersistence.kt:150)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.DatabaseTransactionWrappingSubscriber $ forEachSubscriberWithDbTx $ 1.invoke(CordaPersistence.kt:143)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:84)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.CordaPersistence.transaction(CordaPersistence.kt:75)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.CordaPersistence.transaction(CordaPersistence.kt:65)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.DatabaseTransactionWrappingSubscriber.forEachSubscriberWithDbTx(CordaPersistence.kt:148)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.DatabaseTransactionWrappingSubscriber.onNext(CordaPersistence.kt:159)〜[corda-node-1.0.0.jar:?]     at rx.subjects.PublishSubject $ PublishSubjectProducer.onNext(PublishSubject.java:304)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.PublishSubject $ PublishSubjectState.onNext(PublishSubject.java:219)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.PublishSubject.onNext(PublishSubject.java:72)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.util.ObserverSubscriber.onNext(ObserverSubscriber.java:34)〜[rxjava-1.2.4.jar:1.2.4]     在rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)〜[rxjava-1.2.4.jar:1.2.4]     在rx.observers.Subscribers $ 5.onNext(Subscribers.java:235)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.UnicastSubject $ State.replay(UnicastSubject.java:295)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.UnicastSubject $ State.request(UnicastSubject.java:237)〜[rxjava-1.2.4.jar:1.2.4]     在rx.Subscriber.setProducer(Subscriber.java:209)〜[rxjava-1.2.4.jar:1.2.4]     在rx.Subscriber.setProducer(Subscriber.java:205)〜[rxjava-1.2.4.jar:1.2.4]     在rx.Subscriber.setProducer(Subscriber.java:205)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.UnicastSubject $ State.call(UnicastSubject.java:252)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.UnicastSubject $ State.call(UnicastSubject.java:115)〜[rxjava-1.2.4.jar:1.2.4]     在rx.Observable.unsafeSubscribe(Observable.java:10142)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.operators.OnSubscribeDelaySubscriptionOther $ 1.onCompleted(OnSubscribeDelaySubscriptionOther.java:74)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.operators.OnSubscribeDelaySubscriptionOther $ 1.onNext(OnSubscribeDelaySubscriptionOther.java:53)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.producers.SingleProducer.request(SingleProducer.java:65)〜[rxjava-1.2.4.jar:1.2.4]     在rx.Subscriber.setProducer(Subscriber.java:209)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.operators.OperatorSingle $ ParentSubscriber.onCompleted(OperatorSingle.java:110)~ [rxjava-1.2.4.jar:1.2.4]     在rx.internal.operators.OperatorTake $ 1.onNext(OperatorTake.java:80)〜[rxjava-1.2.4.jar:1.2.4]     at rx.internal.operators.OnSubscribeFilter $ FilterSubscriber.onNext(OnSubscribeFilter.java:76)〜[rxjava-1.2.4.jar:1.2.4]     at rx.subjects.PublishSubject $ PublishSubjectProducer.onNext(PublishSubject.java:304)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.PublishSubject $ PublishSubjectState.onNext(PublishSubject.java:219)〜[rxjava-1.2.4.jar:1.2.4]     在rx.subjects.PublishSubject.onNext(PublishSubject.java:72)〜[rxjava-1.2.4.jar:1.2.4]     at rx.observers.SerializedObserver.onNext(SerializedObserver.java:91)〜[rxjava-1.2.4.jar:1.2.4]     at rx.subjects.SerializedSubject.onNext(SerializedSubject.java:67)〜[rxjava-1.2.4.jar:1.2.4]     at net.corda.node.utilities.DatabaseTransaction.close(DatabaseTransactionManager.kt:60)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.CordaPersistence.inTopLevelTransaction(CordaPersistence.kt:100)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.CordaPersistence.transaction(CordaPersistence.kt:75)〜[corda-node-1.0.0.jar:?]     at net.corda.node.utilities.CordaPersistence.transaction(CordaPersistence.kt:65)〜[corda-node-1.0.0.jar:?]     在net.corda.node.services.network.PersistentNetworkMapCache.addNode(PersistentNetworkMapCache.kt:163)〜[corda-node-1.0.0.jar:?]     at net.corda.node.internal.AbstractNode.registerWithNetworkMapIfConfigured(AbstractNode.kt:511)〜[corda-node-1.0.0.jar:?]     at net.corda.node.internal.AbstractNode.start(AbstractNode.kt:220)〜[corda-node-1.0.0.jar:?]     在net.corda.node.internal.Node.start(Node.kt:312)〜[corda-node-1.0.0.jar:?]     在net.corda.node.internal.NodeStartup.startNode(NodeStartup.kt:95)〜[corda-node-1.0.0.jar:?]     at net.corda.node.internal.NodeStartup.run(NodeStartup.kt:74)[corda-node-1.0.0.jar:?]     在net.corda.node.Corda.main(Corda.kt:11)[corda-node-1.0.0.jar:?] 引起:java.security.cert.CertPathValidatorException:名称约束检查失败

1 个答案:

答案 0 :(得分:0)

正如您在第二条评论中提到的,节点配置很好,但您尚未生成distributedService证书。

要自动生成此证书,请查看此处定义的Gradle任务,该任务为您创建RAFT公证集群:https://github.com/corda/corda/blob/release-V1/samples/notary-demo/src/main/kotlin/net/corda/notarydemo/RaftNotaryCordform.kt。共享证书在第65行生成。