HyperledgerHandsOn/trade-finance-logistics

Issue while running network in dev mode

Closed this issue · 14 comments

Hello Experts,

I am referring to the book "Hands-On Blockchain with Hyperledger" (By Nitin Gaur, Salman Baset etc) to create a sample trade finance logistic network as given in the ebook.

I am able to run the below commands and start the network

./trade.sh up

docker ps -a will list below containers

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4e636f0054fc hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.carrierorg.trade.com
28c18b76dbe8 hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.importerorg.trade.com
9308ad203362 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se..." 3 minutes ago Up 3 minutes 0.0.0.0:7054->7054/tcp ca_peerExporterOrg
754018a3875e hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se..." 3 minutes ago Up 3 minutes 0.0.0.0:8054->7054/tcp ca_peerImporterOrg
09a45eca60d5 hyperledger/fabric-orderer:latest "orderer" 3 minutes ago Up 3 minutes 0.0.0.0:7050->7050/tcp orderer.trade.com
f86e50e6fc76 hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.exporterorg.trade.com
986c478a522a hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se..." 3 minutes ago Up 3 minutes 0.0.0.0:9054->7054/tcp ca_peerCarrierOrg
66f90036956a hyperledger/fabric-peer:latest "peer node start" 3 minutes ago Up 3 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer0.regulatororg.trade.com
a6478cd2ba6f hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se..." 3 minutes ago Up 3 minutes 0.0.0.0:10054->7054/tcp ca_peerRegulatorOrg

But when I run it in Dev network I am not getting any list of containers.

$ ./trade.sh up -d true

docker ps -a will return an empty list

Even I also run clean command (./trade.sh clean -d true) but still, no container created. Please let me know where is the issue.

Its a blocker for me. Request all to help me on this. Even I raised this in below link 3 months back, but no help.
https://lists.hyperledger.org/g/fabric/topic/issue_while_running_network/27566382?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,120,27566382

I don't really keep an eye on the Hyperledger list, so putting a query here is more likely to get my attention.

Just curious, do you have any experience with docker, or containerization? FYI, you'll need to know at least the basics of creating, running, and stopping, docker containers to effectively use this material.

You did not say exactly what sequence of steps you followed. Did you clean up all the running containers and volumes from the first ./trade.sh command before you ran the second one? Did you create the artifacts for the dev network before you ran the up command (i.e., ./trade.sh generate -c tradechannel -d true)?

Thanks Rama for reply. Yes I followed all the steps. Yes i cleaned all the containers. Request you to look into the snapshot link here. Let me know what i am missing.
https://github.com/abhaypsoni/repository/blob/master/Steps.docx

It looks like you are using the latest release of Fabric (1.4). The code and instructions in the book were created for the release-1.1 branch, so you'll need to clone that branch of Fabric and Fabric-CA, build the tools and images, and then run this application.

The initial print of the book did not state this version requirement clearly. But we soon noticed the omission and added the constraint in the errata page on the Pack website as well as on the README here (it's the first thing you'll see.)

Every new iteration of Fabric produces some incompatibilities (usually minor, but ones that prevent an application from running without slight modifications.) We did port to 1.2 (this repo has a release-1.2 branch), but not to 1.4 yet (we have day jobs that keep us busy, so we maintain this project on a best effort basis.)

Thank you Rama for response. I checked the version, I am using Fabric 1.3. May be that is the issue. I will downgrade to Fabric 1.2 and use the Trade-Finance release 1.2 and will again check it. Hopefully it should work. I will use the below link code
https://github.com/HyperledgerHandsOn/trade-finance-logistics/tree/release-1.2

I got a comment from you in my email, but it seems to be missing here. Did you delete it?

Check out the network log to see why the containers aren't starting up. By default they should be in network/logs/network.log.

Yes Rama, I deleted it. Actually container creation took few minutes in dev mode after running the dev mode startup. Finally container got created after waiting for a minute and i am able to install and invoke chaincode. Till now no issues. Thanks for your help.

Yes Rama, I deleted it. Actually container creation took few minutes in dev mode after running the dev mode startup. Finally container got created after waiting for a minute and i am able to install and invoke chaincode. Till now no issues. Thanks for your help.

Hi, I am having an error in building and running the chain code in the command "CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=tw:0 ./trade_workflow_v1"
The error is as shown in the snapshot. Can you please help me with this?
chaincode_error

Peer container doesn't seem to be running. Please clean up your environment (use down and clean with trade.sh) and retry. If you follow the instructions and you are using the right versions of Fabric and Fabric-CA, you should get the applications up and running.

Peer container doesn't seem to be running. Please clean up your environment (use down and clean with trade.sh) and retry. If you follow the instructions and you are using the right versions of Fabric and Fabric-CA, you should get the applications up and running.

I tried executing the ./trade.sh down and ./trade.sh clean commands. I am getting some warnings here and it seems as the required task isn't working out. I had also installed everything as guided.
The snapshot is attached below.
warning

No, there's nothing wrong. You can ignore the warning.

You'll need to look at the container logs. If the peer container crashed, run docker logs <peer-container-ID> to see why.