Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

daml_on_fabric chaincode can not installed #31

Closed
natureoo opened this issue Jun 21, 2020 · 12 comments
Closed

daml_on_fabric chaincode can not installed #31

natureoo opened this issue Jun 21, 2020 · 12 comments

Comments

@natureoo
Copy link

Hello guys,
After start fabric network and run sbt "run --port 6865 --role provision,time,ledger,explorer ../quickstart-120/.daml/dist/quickstart-0.0.1.dar" , it occurs error that could not found daml_on_fabric chaincode, the full error trace as below,
Admin@org1.example.com private key: /Users/chenjian/Documents/chenj/work/workplace/study/blockchain/daml/damlonfabric-test/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv_sk
Admin@org1.example.com sign cert: /Users/chenjian/Documents/chenj/work/workplace/study/blockchain/daml/damlonfabric-test/daml-on-fabric/src/test/fixture/tmp/data/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
[error] (run-main-0) com.daml.FabricContextException: response {
[error] status: 500
[error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found"
[error] }
[error] com.daml.FabricContextException: response {
[error] status: 500
[error] message: "make sure the chaincode daml_on_fabric has been successfully defined on channel mainchannel and try again: chaincode daml_on_fabric not found"
[error] }
[error]
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:578)
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:558)
[error] at com.daml.FabricContext.queryChaincode(FabricContext.java:554)
[error] at com.daml.DAMLKVConnector.getLedgerId(DAMLKVConnector.java:316)
[error] at com.daml.DAMLKVConnector.(DAMLKVConnector.java:90)
[error] at com.daml.DAMLKVConnector.get(DAMLKVConnector.java:30)
[error] at com.daml.DamlOnFabricServer$.delayedEndpoint$com$daml$DamlOnFabricServer$1(DamlOnFabricServer.scala:61)
[error] at com.daml.DamlOnFabricServer$delayedInit$body.apply(DamlOnFabricServer.scala:44)
[error] at scala.Function0.apply$mcV$sp(Function0.scala:39)
[error] at scala.Function0.apply$mcV$sp$(Function0.scala:39)
[error] at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
[error] at scala.App.$anonfun$main$1$adapted(App.scala:80)
[error] at scala.collection.immutable.List.foreach(List.scala:392)
[error] at scala.App.main(App.scala:80)
[error] at scala.App.main$(App.scala:78)
[error] at com.daml.DamlOnFabricServer$.main(DamlOnFabricServer.scala:44)
[error] at com.daml.DamlOnFabricServer.main(DamlOnFabricServer.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] Nonzero exit code: 1
[error] (Compile / run) Nonzero exit code: 1
[error] Total time: 23 s, completed 2020-6-21 15:23:52
MayI know what's the problem, I see the daml_on_fabric is on src/github.com/digital-a
sset/daml-on-fabric.
Many thanks!

@natureoo
Copy link
Author

find the root cause and solved. thx

@Privet-mir
Copy link

Hi, I'm facing the same issue can you tell me what was the root cause for this.

@HarshMultani
Copy link

HarshMultani commented Dec 11, 2020

Hi @natureoo, @digitalasset-cla, @jberthold-da, @stefanobaghino-da . Can anyone explain why this error pops up. I was able to run it successfully for 2,3 days. But again, this error has popped up.

@dasormeter
Copy link
Collaborator

Hi @natureoo, @digitalasset-cla, @jberthold-da, @stefanobaghino-da . Can anyone explain why this error pops up. I was able to run it successfully for 2,3 days. But again, this error has popped up.

Hi @HarshMultani I think this may have been the publicly published digitalasset/daml-on-fabric image on DockerHub clashing with your local version

I've unpublished the public one until we identify why it is misbehaving -- suggest you delete your daml-on-fabric docker image locally and try a rebuild

@dasormeter dasormeter reopened this Dec 11, 2020
@HarshMultani
Copy link

HarshMultani commented Dec 14, 2020

Hi @dasormeter. I was pulling the docker image :- https://hub.docker.com/r/digitalasset/daml-on-fabric, using the command
"docker pull digitalasset/daml-on-fabric". But it is giving me the "manifest unknown error". This, I think so is due to the tags, also there was not any list of tags given in the link that I shared. Can you give a solution to this, Or is there any other image that I need to pull.

@HarshMultani
Copy link

Hi @dasormeter. To give more clarity

I have cloned the github repo :- git clone https://github.com/digital-asset/daml-on-fabric.git

And then from <DAML_ON_FABRIC_FOLDER>/daml-on-fabric/src/test/fixture, I am running the "./gen.sh" and then "./restart_fabric.sh" - to generate certificates and then to restart fabric.

And then in another terminal from <DAML_ON_FABRIC>/daml-on-fabric, when I am running - sbt "run --port 6865 --role provision"..

This is when the error comes that the chaincode cannot be found..

@tankerwng
Copy link

Hi, I'm facing the same issue can you tell me what was the root cause for this.

@dasormeter
Copy link
Collaborator

hi @tankerwng / @HarshMultani believe we found out the root cause

Enabling the experimental setting Use gRPC FUSE for file sharing does not play nicely with Fabric's gRPC communications
docker/for-mac#4955

So to fix make sure you uncheck the Docker desktop experimental features, most acutely the Use gRPC FUSE one

image

@HarshMultani
Copy link

HarshMultani commented Dec 18, 2020

Hi @dasormeter, thanks for the answer. But this, I think so would work only for docker desktop for mac, whereas the linux binaries don't use gRPCFuse.

For more info :- docker/for-linux#1168

@HarshMultani
Copy link

Hi @dasormeter. Any update on this.
It still does not work on linux (ubuntu 18.04).

@dasormeter
Copy link
Collaborator

@HarshMultani this does work on linux in CI and on mac osx : what is the issue you are having on ubuntu?

@HarshMultani
Copy link

Hi @dasormeter. It is working fine now from some days. But earlier the same issue was occuring as natureoo has mentioned in the first comment while opening this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants