0
votes

I am using corda_release_version = 'corda-3.1-snapshot'.

Web server not started when we specify RPC permissions Security Management configuration in node.conf file.

Below are the details.

[INFO ] 2018-03-19T04:16:44,202Z [main] Main.main - Starting as webserver on localhost:10007 {} [INFO ] 2018-03-19T04:16:44,453Z [main] BasicInfo.logAndMaybePrint - Starting as webserver: localhost:10007 {} [ERROR] 2018-03-19T04:16:44,609Z [main] internal.NodeWebServer.retryConnectLocalRpc - Cannot start WebServer {} java.lang.IllegalArgumentException: The node config has not specified any RPC users at net.corda.webserver.internal.NodeWebServer.connectLocalRpcAsNodeUser(NodeWebServer.kt:192) ~[corda-webserver-impl-corda-3.1-snapshot.jar:?] at net.corda.webserver.internal.NodeWebServer.retryConnectLocalRpc(NodeWebServer.kt:172) [corda-webserver-impl-corda-3.1-snapshot.jar:?] at net.corda.webserver.internal.NodeWebServer.start(NodeWebServer.kt:45) [corda-webserver-impl-corda-3.1-snapshot.jar:?] at net.corda.webserver.WebServer.main(WebServer.kt:64) [corda-webserver-impl-corda-3.1-snapshot.jar:?] [ERROR] 2018-03-19T04:16:44,609Z [main] Main.main - Exception during node startup {}

Below is my node.conf for PartyA node :-

myLegalName="O=PartyA,L=London,C=GB"
p2pAddress="localhost:10005"
rpcSettings {
    address="localhost:10006"
    adminAddress="localhost:10046"
}

webAddress="localhost:10007"

rpcUsers=[]
security = {
    authService = {
        dataSource = {
            type = "DB",
            passwordEncryption = SHIRO_1_CRYPT,
            connection = {
                jdbcUrl = "jdbc:postgresql://localhost:5432/r3users"
                username = "postgres"
                password = "root"
                driverClassName = "org.postgresql.Driver"
            }
        }
        options = {
            cache = {
                expireAfterSecs = 2
                maxEntries = 10000
            }
        }
    }
}
1
I think you need to create an RPC user to log into the webserver. Are you using deployNodes to create the nodes you're running? If so, could you add your deployNodes block to the answer? - Joel
Joel, As I mentioned I am accessing User permissions using 'security' configuration in node.conf, and we know that we need to remove 'rpcUsers' entry from deployNodes task. So deos it mean that the Web server is tighly coupled with 'rpcUsers' in deployNodes task? If so How to resolve this? - Jayant
please check I added the node.conf details. - Jayant

1 Answers

1
votes

In Corda 3, configuring the built-in webserver using external credentials is not supported.

In Corda 4, the built-in webserver will have a separate configuration file where you can configure the credentials to be used by the webserver.