Just now I started learning Corda and I am building my custom Cordapp. The nodes are being deployed properly but when I am trying to run the nodes in my custom cordapp they fail to start and closes. The logs and the error shown are given below:
*RPC admin connection address : localhost:10048
E 13:15:07+0000 [main] internal.Node.run - Exception during node startup {}
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method) ~[?:1.8.0_181]
at sun.nio.ch.Net.bind(Unknown Source) ~[?:1.8.0_181]
at sun.nio.ch.Net.bind(Unknown Source) ~[?:1.8.0_181]
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) ~[?:1.8.0_181]
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:554) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1258) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:980) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:250) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:365) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
at java.lang.Thread.run(Unknown Source) ~[?:1.8.0_1
81]*
My build.graddle file is given below-
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
node {
name "O=Notary,L=London,C=GB"
notary = [validating : false]
p2pPort 10006
cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
}
node {
name "O=PartyA,L=London,C=GB"
p2pPort 10007
rpcSettings {
address("localhost:10008")
adminAddress("localhost:10048")
}
webPort 10009
cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=PartyB,L=New York,C=US"
p2pPort 10010
rpcSettings {
address("localhost:10011")
adminAddress("localhost:10051")
}
webPort 10012
cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
}
node {
name "O=PartyC,L=Paris,C=FR"
p2pPort 10013
rpcSettings {
address("localhost:10014")
adminAddress("localhost:10054")
}
webPort 10015
cordapps = ["$corda_release_group:corda-finance:$corda_release_version"]
rpcUsers = [[user: "user1", "password": "test", "permissions": ["ALL"]]]
}
}
task runExampleClientRPCJava(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'com.example.client.ExampleClientRPC'
args 'localhost:10008'
}
Aucun commentaire:
Enregistrer un commentaire