bevel-operator-fabric icon indicating copy to clipboard operation
bevel-operator-fabric copied to clipboard

Cannot connect to a running ccaas (Nodejs) after installing

Open jasonhtpham opened this issue 6 months ago • 3 comments

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 the fabric-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:

failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 10.96.121.26:7052: connect: connection refused"

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 my connection.json and metadata.json files being used when packaging the chaincode.

# connection.json
{
  "address": "asset-ts:7052",
  "dial_timeout": "10s",
  "tls_required": false
}
# metadata.json
{
    "type": "ccaas",
    "label": "asset-ts"
}

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.

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30949
  hostPort: 80
- containerPort: 30950
  hostPort: 443

jasonhtpham avatar Jul 29 '24 13:07 jasonhtpham