Open jasonhtpham opened 4 months ago
This is the logs inside the typescript chain code's pod:
> asset-transfer@1.0.0 start:server-nontls
> set -x && fabric-chaincode-node server --chaincode-address=$CHAINCODE_SERVER_ADDRESS --chaincode-id=$CHAINCODE_ID
+ fabric-chaincode-node server --chaincode-address=0.0.0.0:7052 --chaincode-id=asset-ts:a77e7e965465fac5806373c77bdb349c0af7568612482ca38fca9dc27f687219
2024-07-29T12:58:40.963Z info [c-api:./lib/annotations/object.js] @Object args: Target -> %s "Function"
2024-07-29T12:58:41.004Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> CreateAsset, Param Name -> assetObj, Param Type -> Asset, Description -> Part formed JSON of Asset,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.011Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> CreateAsset, Commit -> true,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.032Z info [c-api:./lib/annotations/transaction.js] @Returns args: ", Property Key -> ReadAsset, Return Type -> Asset,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.034Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> ReadAsset, Commit -> false,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.062Z info [c-api:./lib/annotations/transaction.js] @Param args: "Property Key -> UpdateAsset, Param Name -> assetObj, Param Type -> Asset, Description -> Part formed JSON of Asset,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.063Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> UpdateAsset, Commit -> true,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.071Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> DeleteAsset, Commit -> true,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.073Z info [c-api:./lib/annotations/transaction.js] @Returns args: ", Property Key -> AssetExists, Return Type -> boolean,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.080Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> AssetExists, Commit -> false,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.084Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> TransferAsset, Commit -> true,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.091Z info [c-api:./lib/annotations/transaction.js] @Returns args: ", Property Key -> GetAllAssets, Return Type -> string,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.093Z info [c-api:./lib/annotations/transaction.js] @Transaction args: "Property Key -> GetAllAssets, Commit -> false,","Target ->","AssetTransferContract"
2024-07-29T12:58:41.097Z info [c-api:./lib/annotations/info.js] @Info args: "Info -> [object Object],","Target ->","AssetTransferContract"
2024-07-29T12:58:41.294Z info [c-api:contracts-spi/bootstrap.js] No metadata file supplied in contract, introspection will generate all the data
2024-07-29T12:58:41.748Z info [c-api:fabric-shim/cli] Bootstrap process completed
Based on the logs, I guess it is running well. The only concern is the address. If this is the problem, how could I setup the right connection?
check the chaincode's kuberentes service and verify if the port 7052 is configured properly.
I followed the guidelines closely, so I found nothing wrong with the port. However, after a few times just trying again and again. I managed to get it to work without really knowing why.
What happened?
I have been following this guideline to create a platform for my research. I tried to find out how to package a developed chain code and Dockerize it to be used as a ccaas just like this example.
I normally develop chain codes using javascript or typescript. So, I took the
asset-transfer-basic-ts
sample from thefabric-samples
repo, packaged, dockerized and tried to use the same methods in the example to have a ccaas ready. However, it does not work. It keeps returning this error:I guess it is either because of the incorrect dockerization or incorrect setup of addresses when packaging the chain code. So, I tried a number of changes but still could not make it work. I even tried to use the
kfsoftware/asset-transfer-ts:latest
image, but there is still no luck. These are myconnection.json
andmetadata.json
files being used when packaging the chaincode.What did you expect to happen?
I expect the chaincode is invocable after successful installation and commitment from the peers just like in this sample.
How can we reproduce it (as minimally and precisely as possible)?
If you follow the guideline at: https://hyperledger.github.io/bevel-operator-fabric/docs/getting-started. Then, at the step "Deploy chaincode container on cluster", instead of using the provided image, if we try to use the
kfsoftware/asset-transfer-ts:latest
image. Then, when we invoke the chain code, the issue will appear.Anything else we need to know?
No response
Kubernetes version
This is the config file of my cluster. All details of the setup can be found in the guidelines mentioned above.