通用名称公证问题

时间:2017-11-23 03:07:13

标签: corda

使用节点驱动程序启动公证时,我遇到了一个问题。我遇到的问题是,当我定义没有通用名称(val NOTARY = CordaX500Name("Notary Service","Zurich","CH"))的公证人时,节点在启动时因错误而失败

java.lang.IllegalArgumentException: Common name in 'C=CH,L=Zurich,O=Notary Service' must not be null for notary service, use service type id as common name.
    at net.corda.node.internal.AbstractNode.getNotaryIdentity(AbstractNode.kt:437) ~[corda-node-1.0.0.jar:?]
    at net.corda.node.internal.AbstractNode.makeInfo(AbstractNode.kt:422) ~[corda-node-1.0.0.jar:?]
    at net.corda.node.internal.AbstractNode.makeServices(AbstractNode.kt:388) ~[corda-node-1.0.0.jar:?]
    at net.corda.node.internal.AbstractNode.access$makeServices(AbstractNode.kt:98) ~[corda-node-1.0.0.jar:?]
    at net.corda.node.internal.AbstractNode$start$startedImpl$1.invoke(AbstractNode.kt:184) ~[corda-node-1.0.0.jar:?]

如果我继续使用其通用名称定义公证人作为服务类型id(val NOTARY = CordaX500Name("Corda.notary.validating","Notary Service","Zurich","CH")),我会收到以下错误,导致节点无法启动。

Caused by: java.lang.IllegalArgumentException: Common name must be null: C=CH,L=Zurich,O=Notary Service,CN=Corda.notary.validating
    at net.corda.node.services.config.FullNodeConfiguration.<init>(NodeConfiguration.kt:82) ~[corda-node-1.0.0.jar:?]
    at net.corda.node.services.config.FullNodeConfiguration.<init>(NodeConfiguration.kt:71) ~[corda-node-1.0.0.jar:?]
    ... 19 more

我认为这可能与v1.0 - commonName in a legalName to create node有关,Dataframe file df表示为V1创建了一个反向端口,当节点使用公共名称时会抛出错误。有没有办法解决这个问题,还是有更好的方式来定义公证人?

1 个答案:

答案 0 :(得分:0)

使用驱动程序启动公证节点,如下所示:

startNode(
    providedName = CordaX500Name("Controller", "London", "GB"), 
    advertisedServices = setOf(ServiceInfo(ValidatingNotaryService.type))
)