hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
668 stars 735 forks source link

`Time out error when running Java Samples #934

Closed pradeeppadmarajaiah closed 6 years ago

pradeeppadmarajaiah commented 6 years ago

TimeoutException occurs when running the java samples on windows. What value do I need to change for Test pool IP and nodes Teutopolip points to 127.0.0.1 nodes point to 0.0.0.0

Anoncreds sample -> started Exception in thread "main" java.util.concurrent.ExecutionException: org.hyperledger.indy.sdk.ledger.TimeoutException: Timeout happens for ledger operation. at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999) at Anoncreds.demo(Anoncreds.java:30) at Main.main(Main.java:4) Caused by: org.hyperledger.indy.sdk.ledger.TimeoutException: Timeout happens for ledger operation. at org.hyperledger.indy.sdk.IndyException.fromSdkError(IndyException.java:117) at org.hyperledger.indy.sdk.IndyJava$API.checkCallback(IndyJava.java:90) at org.hyperledger.indy.sdk.pool.Pool.access$100(Pool.java:20) at org.hyperledger.indy.sdk.pool.Pool$1.callback(Pool.java:52) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520) at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)

pradeeppadmarajaiah commented 6 years ago

Changed the node ip from 0.0.0.0 to 127.0.0.1.Able to run successfully with the fresh setup.

Amze commented 6 years ago

HI Pradeep, I am also trying out Hyperledger indy test network.. I am getting the same error mentioned in this page..CAn you please tell the fix in detail.. Where and how did you change the node ip from 0.0.0.0 to 127.0.0.1.?

Thanks, Tulika

jovfer commented 6 years ago

@Amze I suggest to follow https://github.com/hyperledger/indy-sdk#1-starting-the-test-pool-on-localhost on windows This option will start docker container with nodes (configured to 127.0.0.1) and required ports will be forwarded to your host windows

Amze commented 6 years ago

Thanks, yes starting the nodes on localhost solved - >docker run -itd -p 127.0.0.1:9701-9708:9701-9708 indy_pool

Amze commented 6 years ago

Hi.. I wanted to learn about the architecture of INdy.. Please point any good documentation .. where I can understand the same.. I read https://github.com/hyperledger/indy-sdk/blob/master/doc/getting-started/getting-started.md, but found it little confusing..