Giter Site home page Giter Site logo

Comments (10)

qiang0723 avatar qiang0723 commented on August 10, 2024

From the error log, seems lack images hyperledger/fabric-ccenv:x86_64-1.0.0-preview, suggest running download_images.sh first.

But from your description, it looks like version conflict.

I test again with fabric-v1.0.0-alpha2, yeasy/hyperledger-fabric:latest, 'hyperledger/fabric-ccenv:x86_64-1.0.0-preview', and do it in orderer as this part describe, no abnormality found, So can you describe your steps?

from docker-compose-files.

myqq0000 avatar myqq0000 commented on August 10, 2024

@qiang0723 I pull the images of hyperledger-fabric-1.0.0-alpha at first.
The images which I pulled are these:

hyperledger/fabric-ca x86_64-1.0.0-alpha 35311d8617b4 2 months ago 240 MB
hyperledger/fabric-couchdb latest f3ce31e25872 2 months ago 1.51 GB
hyperledger/fabric-couchdb x86_64-1.0.0-alpha f3ce31e25872 2 months ago 1.51 GB
hyperledger/fabric-orderer x86_64-1.0.0-alpha 5685fd77ab7c 2 months ago 182 MB
hyperledger/fabric-peer x86_64-1.0.0-alpha 784c5d41ac1d 2 months ago 184 MB
hyperledger/fabric-javaenv latest a08f85d8f0a9 2 months ago 1.42 GB
hyperledger/fabric-javaenv x86_64-1.0.0-alpha a08f85d8f0a9 2 months ago 1.42 GB
hyperledger/fabric-ccenv latest 91792014b61f 2 months ago 1.29 GB
ethereum/client-go latest 39725e8654af 3 months ago 252 MB
hyperledger/fabric-baseimage x86_64-0.3.0 f4751a503f02 3 months ago 1.27 GB
hyperledger/fabric-baseos x86_64-0.3.0 c3a4cf3b3350 3 months ago 161 MB

And then I use the command docker-compose -f docker-compose-dev.yml up to start the dev containers.
Then I can create channel and join it. And I can install chaincode, too.
But when I try to instantiate it, it comes errors.

And I try your advice just now.
I use the command bash scripts/download_images.sh at first.
And then I get some new images like these:

yeasy/hyperledger-fabric latest 068dffce8039 30 hours ago 1.19 GB
hyperledger/fabric-peer latest 885dc22631be 3 days ago 944 MB
yeasy/hyperledger-fabric-peer 0.9.3 885dc22631be 3 days ago 944 MB
hyperledger/fabric-ca latest 10da547accd0 3 days ago 849 MB
yeasy/hyperledger-fabric-ca 0.9.3 10da547accd0 3 days ago 849 MB
hyperledger/fabric-orderer latest 06ae616c02b5 3 days ago 937 MB
yeasy/hyperledger-fabric-orderer 0.9.3 06ae616c02b5 3 days ago 937 MB
hyperledger/fabric-baseos x86_64-1.0.0-alpha 3a66c7c635f0 3 days ago 905 MB
hyperledger/fabric-ccenv x86_64-1.0.0-alpha 3a66c7c635f0 3 days ago 905 MB
yeasy/hyperledger-fabric-base 0.9.3 3a66c7c635f0 3 days ago 905 MB

But when I try to start the dev containers again.
Some errors happen.

➜ 1.0 git:(master) ✗ docker-compose -f docker-compose-dev.yml up
fabric-ca is up-to-date
fabric-orderer0 is up-to-date
fabric-peer0 is up-to-date
Starting fabric-cli

ERROR: for cli Cannot start service cli: oci runtime error: container_linux.go:247: starting container process caused "chdir to cwd ("/go/src/github.com/hyperledger/fabric") set in config.json failed: no such file or directory"
ERROR: Encountered errors while bringing up the project.

Emmm... I don't know what happened. Maybe because of new images which I downloaded just now?

And I try to use docker-compose up to start default channel just now.
It still gets some errors when I try to instantiate chaincode...
And the errors are same.

fabric-peer0 | 2017-05-25 08:08:47.167 UTC [dockercontroller] Start -> DEBU 488 Start container dev-peer0-test_cc-1.0
fabric-peer0 | 2017-05-25 08:08:47.167 UTC [dockercontroller] getDockerHostConfig -> DEBU 489 docker container hostconfig NetworkMode: host
fabric-peer0 | 2017-05-25 08:08:47.168 UTC [dockercontroller] createContainer -> DEBU 48a Create container: dev-peer0-test_cc-1.0
fabric-peer0 | 2017-05-25 08:08:47.170 UTC [dockercontroller] Start -> DEBU 48b start-could not find image ...attempt to recreate image no such image
fabric-peer0 | 2017-05-25 08:08:47.171 UTC [chaincode-platform] generateDockerfile -> DEBU 48c
fabric-peer0 | FROM hyperledger/fabric-baseos:x86_64-0.3.0
fabric-peer0 | ADD binpackage.tar /usr/local/bin
fabric-peer0 | LABEL org.hyperledger.fabric.chaincode.id.name="test_cc"
fabric-peer0 | org.hyperledger.fabric.chaincode.id.version="1.0"
fabric-peer0 | org.hyperledger.fabric.chaincode.type="GOLANG"
fabric-peer0 | org.hyperledger.fabric.version="1.0.0-preview"
fabric-peer0 | org.hyperledger.fabric.base.version="0.3.0"
fabric-peer0 | ENV CORE_CHAINCODE_BUILDLEVEL=1.0.0-preview
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [chaincode-platform] func1 -> ERRO 48d Failed to generate platform-specific docker build: Error creating container: no such image
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [dockercontroller] deployImage -> ERRO 48e Error building images: Failed to generate platform-specific docker build: Error creating container: no such image
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [dockercontroller] deployImage -> ERRO 48f Image Output:
fabric-peer0 | ********************
fabric-peer0 |
fabric-peer0 | ********************
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [container] unlockContainer -> DEBU 490 container lock deleted(dev-peer0-test_cc-1.0)
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [chaincode] Launch -> ERRO 491 launchAndWaitForRegister failed Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [lockbasedtxmgr] Done -> DEBU 492 Done with transaction simulation / query execution [dae575cd-cc87-42b1-ab3b-d8aff4b546ba]
fabric-peer0 | FROM hyperledger/fabric-baseos:x86_64-0.3.0
fabric-peer0 | ADD binpackage.tar /usr/local/bin
fabric-peer0 | LABEL org.hyperledger.fabric.chaincode.id.name="test_cc"
fabric-peer0 | org.hyperledger.fabric.chaincode.id.version="1.0"
fabric-peer0 | org.hyperledger.fabric.chaincode.type="GOLANG"
fabric-peer0 | org.hyperledger.fabric.version="1.0.0-preview"
fabric-peer0 | org.hyperledger.fabric.base.version="0.3.0"
fabric-peer0 | ENV CORE_CHAINCODE_BUILDLEVEL=1.0.0-preview
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [chaincode-platform] func1 -> ERRO 48d Failed to generate platform-specific docker build: Error creating container: no such image
fabric-peer0 | 2017-05-25 08:08:47.174 UTC [dockercontroller] deployImage -> ERRO 48e Error building images: Failed to generate platform-specific docker build: Error creating container: no such image

Thanks a lot!! :)

from docker-compose-files.

qiang0723 avatar qiang0723 commented on August 10, 2024

Your previous operation mixes office images and the operation we provide, obviously wrong.
Although the images we provide is the same as official, still has some different in structure, so if you want to setup up fabric in our way, you must use images we provided.

Second question:
Did you git clone fabric from [official] (https://github.com/hyperledger/fabric)? and put it in
$GOPATH/src/github.com/hyperledger/
This error is because you didn't set env $GOPATH or this env doesn't take effort, or this directory doesn't exist.
suggest set env export $GOPATH=/go and git clone code.

** docker-compose-dev.yml for dev, i suggest use docker-compose.yml first, it's more clear and simple.

from docker-compose-files.

yeasy avatar yeasy commented on August 10, 2024

@myqq0000 First, pls clean ur env by removing all existing docker images, then use the download_images.sh to download necessary images.

from docker-compose-files.

myqq0000 avatar myqq0000 commented on August 10, 2024

@yeasy @qiang0723
Emmm... I remove all images of hyperledger just now.
But there are still the same errors...

root@cli:/go/src/github.com/hyperledger/fabric# peer chaincode instantiate -v 1.0 -n test_cc -c '{"Args":["init","a","100","b","200"]}' -o orderer0:7050
2017-05-25 09:11:42.948 UTC [msp] getMspConfig -> INFO 001 intermediate certs folder not found at [/etc/hyperledger/fabric/msp/intermediatecerts]. Skipping.: [stat /etc/hyperledger/fabric/msp/intermediatecerts: no such file or directory]
2017-05-25 09:11:42.948 UTC [msp] getMspConfig -> INFO 002 crls folder not found at [/etc/hyperledger/fabric/msp/intermediatecerts]. Skipping.: [stat /etc/hyperledger/fabric/msp/crls: no such file or directory]
2017-05-25 09:11:42.967 UTC [msp] GetLocalMSP -> DEBU 003 Returning existing local MSP
2017-05-25 09:11:42.967 UTC [msp] GetDefaultSigningIdentity -> DEBU 004 Obtaining default signing identity
2017-05-25 09:11:42.968 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 005 Using default escc
2017-05-25 09:11:42.969 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 006 Using default vscc
2017-05-25 09:11:42.969 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0AB1080A6908031A0C08CEBF9AC90510...30300A000A04657363630A0476736363
2017-05-25 09:11:42.969 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 103432FEC525EEE7F4621BD95E37789FBF7928D9CDFB85A9D012D2D26F4EF338
Error: Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image
Usage:
peer chaincode instantiate [flags]

Global Flags:
--cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
-C, --chainID string The chain on which this command should be executed (default "testchainid")
-c, --ctor string Constructor message for the chaincode in JSON format (default "{}")
-E, --escc string The name of the endorsement system chaincode to be used for this chaincode
-l, --lang string Language the chaincode is written in (default "golang")
--logging-level string Default logging level and overrides, see core.yaml for full syntax
-n, --name string Name of the chaincode
-o, --orderer string Ordering service endpoint
-p, --path string Path to chaincode
-P, --policy string The endorsement policy associated to this chaincode
--test.coverprofile string Done (default "coverage.cov")
-t, --tid string Name of a custom ID generation algorithm (hashing and decoding) e.g. sha256base64
--tls Use TLS when communicating with the orderer endpoint
-u, --username string Username for chaincode operations when security is enabled
-v, --version string Version of the chaincode specified in install/instantiate/upgrade commands
-V, --vscc string The name of the verification system chaincode to be used for this chaincode

These are my images:

REPOSITORY TAG IMAGE ID CREATED SIZE
hyperledger/fabric-peer latest 885dc22631be 3 days ago 944 MB
yeasy/hyperledger-fabric-peer 0.9.3 885dc22631be 3 days ago 944 MB
hyperledger/fabric-ca latest 10da547accd0 3 days ago 849 MB
yeasy/hyperledger-fabric-ca 0.9.3 10da547accd0 3 days ago 849 MB
hyperledger/fabric-orderer latest 06ae616c02b5 3 days ago 937 MB
yeasy/hyperledger-fabric-orderer 0.9.3 06ae616c02b5 3 days ago 937 MB
hyperledger/fabric-baseos x86_64-1.0.0-alpha 3a66c7c635f0 3 days ago 905 MB
hyperledger/fabric-ccenv x86_64-1.0.0-alpha 3a66c7c635f0 3 days ago 905 MB
yeasy/hyperledger-fabric-base 0.9.3 3a66c7c635f0 3 days ago 905 MB

And these are my containers:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fc5feea61a8b hyperledger/fabric-peer "bash -c 'while tr..." 11 minutes ago Up 11 minutes 7050-7059/tcp fabric-cli
6480a4b88b62 hyperledger/fabric-peer "peer node start -..." 11 minutes ago Up 11 minutes 7050/tcp, 7052-7059/tcp, 0.0.0.0:7051->7051/tcp fabric-peer0
4509ca781d49 hyperledger/fabric-ca "fabric-ca-server ..." 11 minutes ago Up 11 minutes 7054/tcp, 0.0.0.0:8888->8888/tcp fabric-ca
af548164b9d7 hyperledger/fabric-orderer "orderer" 11 minutes ago Up 11 minutes 0.0.0.0:7050->7050/tcp fabric-orderer0

I think maybe it can't solve... Maybe I need to download fabric-1.0.0-preview to have a try?

from docker-compose-files.

qiang0723 avatar qiang0723 commented on August 10, 2024

Actually just need two steps to start a fabric network, no more extra steps or images.

  1. bash download_images.sh
    2.sudo docker-compose up

from docker-compose-files.

myqq0000 avatar myqq0000 commented on August 10, 2024

Uh... I try it again. Remove all images in my docker. And run the command bash download_images.sh to download images.
And then I get some images like these:
image

And in order to prevent the second question which I mentioned previously, I remove the directory of 'fabric', and git clone it again.
But when I run the command peer chaincode instantiate -v 1.0 -n test_cc -c '{"Args":["init","a","100","b","200"]}' -o orderer0:7050
image

It get errors again. And the errors are same...

I don't know why and I can't solve it with myself.
So I maybe try some else way to run a development environment...
Thank you all the way~ :)

http://hyperledger-fabric.readthedocs.io/en/latest/peer-chaincode-devmode.html?highlight=chaincodedev
Maybe I will try to use dev mode to debug my chaincode. I find it in the official document. I think it will be helpful.
Thanks a lot !! :)

from docker-compose-files.

yeasy avatar yeasy commented on August 10, 2024

@myqq0000 No you were not following the script.

In the script, that cannot be any images with the alpha tag, pls do clean all existing images and use the provided latest download_images.sh script. The generated image should look like (now 0.9.3 is the newer one)

hyperledger/fabric-orderer latest d69ce2b6429f 2 weeks ago 935 MB
yeasy/hyperledger-fabric-orderer 0.9.2 d69ce2b6429f 2 weeks ago 935 MB
hyperledger/fabric-peer latest 43e194fff3e7 2 weeks ago 943 MB
yeasy/hyperledger-fabric-peer 0.9.2 43e194fff3e7 2 weeks ago 943 MB
hyperledger/fabric-ca latest 42568aea8465 2 weeks ago 847 MB
yeasy/hyperledger-fabric-ca 0.9.2 42568aea8465 2 weeks ago 847 MB
hyperledger/fabric-ccenv x86_64-1.0.0-preview 3d90ccb29493 2 weeks ago 903 MB
yeasy/hyperledger-fabric-base 0.9.2 3d90ccb29493 2 weeks ago 903 MB
hyperledger/fabric-baseimage latest 3d90ccb29493 2 weeks ago 903 MB
hyperledger/fabric-baseos x86_64-1.0.0-preview 3d90ccb29493 2 weeks ago 903 MB

from docker-compose-files.

myqq0000 avatar myqq0000 commented on August 10, 2024

@yeasy Thanks a lot!!
I delete all images in my docker and run the script again.
And then it download the 1.0.0-preview...

But if I only delete the two 1.0.0-alpha images and run this script, it will still download a 1.0.0-alpha for me...
I don't know why.

Anyway, thanks a lot!!
谢谢大佬辛苦了!:)

from docker-compose-files.

figago84 avatar figago84 commented on August 10, 2024

Hi @myqq0000 , could you solve your problem?? I have the same problem and I cannot solve it. Please, any help will be appreciated.

from docker-compose-files.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.