hacera / daml-on-fabric

HACERA's work with Digital Asset on enabling DAML applications to run on Hyperledger Fabric
Apache License 2.0
27 stars 5 forks source link

Failed to connect to ledger. #4

Closed anchit93 closed 4 years ago

anchit93 commented 4 years ago

Hello @dasormeter ,

I tried running the Java Quick Start against DAML-on-Fabric as per the instructions, and logs looked fine to me. But when i tried to execute DAML navigator (step 4), i got below error :

daml navigator server localhost 6865 --port 4000
   _  __          _           __
  / |/ /__ __  __(_)__ ____ _/ /____  ____
 /    / _ `/ |/ / / _ `/ _ `/ __/ _ \/ __/
/_/|_/\_,_/|___/_/\_, /\_,_/\__/\___/_/
                 /___/
Version 100.13.36
Frontend running at http://localhost:4000.
Permanently failed to connect to the ledger at localhost:6865. Please fix any issues and restart this application.

Not sure why it is not able to connect to the ledger. I check the fabric containers, and could see them up and running:

image

Is there any way I can check more detailed logs to identify the issue ?

ongkhaiwei commented 4 years ago

I got the same error message as well.

dasormeter commented 4 years ago

Hi @anchit93 and @ongkhaiwei the current daml-on-fabric codebase is functional with SDK version 0.13.12 but not yet the latest 0.13.36 version (navigator version 100.13.36 corresponds to SDK version 0.13.36)

We are working on upgrading this code to work with the latest SDK over the next week, and will advise once this is the case. In the meantime, you can use SDK version 0.13.12 if you want to use DAML together with fabric.

anchit93 commented 4 years ago

Hi @dasormeter ,

Thanks for your inputs. As per your suggestions, i downgraded the DAML sdk version to 0.13.12 and again executed the commands.

After running the below command, I could see some transactions being committed in the ledger (~500 blocks got generated) and the transactions keep on executing in both the terminals.

command: sbt "run --port 6865 --role provision,time,ledger,explorer ../quickstart/.daml/dist/quickstart.dar"

And after running the below command in a new terminal, I was able to access the UI of the app.

Command: daml navigator server localhost 6865 --port 4000

But the issue now is, I am not able to access Fabric block explorer (on port 8080) and DAML ledger endpoint (on port 6865). Although I didn't see any error in the logs.

Output from above command:

WARNING: Using an outdated version of the DAML SDK in project.
To migrate to the latest DAML SDK, please set the sdk-version
field in daml.yaml to 0.13.36

   _  __          _           __
  / |/ /__ __  __(_)__ ____ _/ /____  ____
 /    / _ `/ |/ / / _ `/ _ `/ __/ _ \/ __/
/_/|_/\_,_/|___/_/\_, /\_,_/\__/\___/_/
                 /___/
Version 100.13.12
Frontend running at http://localhost:4000.

Any suggestions ? Also, is there any documentation available for DAML-Fabric project as I wanted to understand how things are connected and working with each other.

Thanks!

blokaly commented 4 years ago

I got the same error, and found out the "quickstart.dar" should be changed to "quickstart-0.0.1.dar". But the fabric explorer is still not accessible.

blokaly commented 4 years ago

I got the same error, and found out the "quickstart.dar" should be changed to "quickstart-0.0.1.dar". But the fabric explorer is still not accessible.

OK, can access these two endpoints: http://localhost:8080/blocks and http://localhost:8080/transactions

dasormeter commented 4 years ago

closing as it is a question of accessing the blocks and transactions endpoints directly