hyperledger / cello

Operating System for Enterprise Blockchain
https://wiki.hyperledger.org/display/cello
Apache License 2.0
897 stars 445 forks source link

Can not instantiate a go-ver chaincode #197

Closed lyp830414 closed 3 years ago

lyp830414 commented 3 years ago

Expected Behavior

The go-ver chaincode should be instantiate in succeed.

Current Behavior

Failure as I tried to instantiate a go-ver chaincode.

Possible Solution

Steps to Reproduce

  1. Start the cello in branch release-0.9.0-h3c
  2. Create the fabric network v1.4 (using DOCKER SWARM) under the operator dashboard.
  3. Wait until the network bring up, then create the channel under the user dashboard
  4. Upload my go-ver chaincode zip file (put the *.go into a directory, then package it into a zip file)
  5. Click the instantiate chaincode under the chaincode page from user dashboard.
  6. Then the issue happened, like following

image

Context (Environment)

Detailed Description and log

Possible Implementation

XuHugo commented 3 years ago

You can display the log information of user dashboard。Which chaincode do you use,example02?You can display the initialization page, I want to see your parameters。

lyp830414 commented 3 years ago

Yes, @XuHugo , I uploaded fabric-samples-release-1.4's chaincode-->chaincode_example02-->go ver chancode onto the cello user dashboard( put the go file to a directory, then package it into a zip and upload then). Following lists more details about user dashboard. (The key clue is that I did not use k8s for network model, but choosed the "docker" (docker swarm) on the cello operator to build my chain network)

Here are the user dashboard docker log and all dockers' logs(those generatedfor make logs ) , just coppied after the failure of initialize the go-ver chaincode : docker_logs_for_user_dashboard.txt docker_logs_from_make_logs.txt

And,following are more deatils on my user dashboard.

image

image

image

image

image

image

image

image

image

image

Here is the error content in above error message window.

请求错误 400: http://192.168.1.137:8081/v2/chaincodes/5fd0792f648e8d005cd0d5c7/instantiate 发出的请求有错误,服务器没有进行新建或修改数据的操作。

lyp830414 commented 3 years ago

You can display the log information of user dashboard。Which chaincode do you use,example02?You can display the initialization page, I want to see your parameters。

You can display the log information of user dashboard。Which chaincode do you use,example02?You can display the initialization page, I want to see your parameters。

More information about:
Whatever the chaincode I use with the go-ver chaincode ( any fabric-samples' chaincode with ver1.4 ), it always report the same error message, any no new vm-docker-container was created in the backend. But as I used the java-ver chaincode to choose initialize chaincode, the java's vm-docker-container could be created, but it always stucked in step of initialized the chaincode step in the dashboard, so I cannot see a record was made in the following graph. (But for now, I just want to find why go-ver chaincode could not be initialized under docker swarm network mode) image

I think that should be something wrong with cello platform, or anything wrong with my manual operation's sequences?

lyp830414 commented 3 years ago

This issue was finally solved after try following 2 steps:

  1. I packaged the chaincode_example02.go into "chaincode_example02" folder and zip it. -- For my previous operation, I put the chaincode_example02.go into different folder name: i.e: folder named "test"

  2. I used the wrong ccenv docker image with following clue:

    • a. I watched peer full docker logs and found this issue:

image

Elther wrong operation from 1 and 2 will lead that issue. Now my go-ver chaincode canbe intialized.

I will close this problem. thank you for reponse my issue anyway ! I may need your greatly help for my further cello problems.

lyp830414 commented 3 years ago

This issue has been solved now.