samples-java icon indicating copy to clipboard operation
samples-java copied to clipboard

net.corda.client.rpc.RPCException: Cannot connect to server(s)

Open morimora opened this issue 3 years ago • 0 comments

Hi When you create nodes using Cordform, after building the project (through ./gradlew deployNodes) and running nodes (through ./build/nodes/runnodes) you can test APIs by running each server, e,g, runPartyAServer by command ./gradlew runPartyAServer. But if you use Dockerform to create nodes, after building the project (through ./gradlew prepareDockerNodes) and running nodes (through docker-compose up), execution of command ./gradlew runPartyAServer encounters an error like the following:

I 21:36:25 1 RPCClient.logElapsedTime - Failed Startup took 259 msec W 21:36:25 1 AnnotationConfigServletWebServerApplicationContext.refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'controller' defined in file [.../clients/build/classes/java/main/net/corda/samples/example/webserver/Controller.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection': Invocation of init method failed; nested exception is net.corda.client.rpc.RPCException: Cannot connect to server(s). Tried with all available servers.

morimora avatar Apr 11 '21 11:04 morimora