hyperledgerhandson / trade-network Goto Github PK
View Code? Open in Web Editor NEWHyperledger Hands-On second edition - Scripts to deploy the trade network
License: Apache License 2.0
Hyperledger Hands-On second edition - Scripts to deploy the trade network
License: Apache License 2.0
Hi,
I install the trade network in my Mac Book Pro with M1. At Chapter 9, page 406 "Deploying a contract in one step", when I run the below command:
./trade.sh installcontract -c tradechannel -p trade -o 3
There is error in network-cli.log as:
...
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Failed to pull hyperledger/fabric-nodeenv:2.2: no matching manifest for linux/arm64/v8 in the manifest list entries
!!!!!!!!!!!!!!! Failed to install chaincode on peer0.exporterorg.trade.com for channel 'tradechannel' !!!!!!!!!!!!!!!!
========= ERROR !!! FAILED to execute Chaincode Installation Scenario ===========
Any idea how to fix this?
Thx in advance,
Trung
Hey, when I depoly this program locally and open"localhost:7054", broworse tell me "Client sent an HTTP request to an HTTPS server."
What's happend?
In the book, in Chapter 4, the utils
(https://github.com/HyperledgerHandsOn/trade-network/tree/master/bash/utils) directory is referenced as scripts
.
The instructions as provided in the book do not work on M1 Macs.
The Issues appear to arrive with the inclusion of fabric-ca. Is it possible to run the project without this requirement?
In Chapter 4, at "Creating and connecting to a Fabric environment in VS Code",when I try to connect to Trade Network, the following message appears:
[ERROR] Error connecting to Environment Trade Network : Error querying channels: Could not get all channel names,received 2 UNKOWN :error validating proposal: access denied : channel [] create org [CarrierOrgMSP ]
Hello,
I started reading the Book and am now at the point where I try to install the sample project. Unfortunarly I am hung at point 2, where is written cd fabric && make docker
. The first problem I face is, that there is no fabric
dir, but I guess its just the hyperledger directory, which contains the build file. When trying to make
(tried several options including in WSL, with mingw64, with chocolately make), everything fails.
However, HyperLedger fabric IS working in Windows, since I could sucessfully spin it up using VS Code with the IBM Blockchain Extension.
Is there a way to make this work?
Also note, that the given hint at the beginning using Virtual Box is not actually working for everyone, since Docker/WSL 2 and Virtual Box cannot be run simultaneously on a windows machine, which complicates the usage.
Edit: Tried also to install VMWare now instead of Virtual Box. But it is the same issue as with VBox: Hyper-V is not compatible with the virtualization. But it is required for docker. That makes it just not possible to run.
Hello I am currently in the section 'Deploying a contract in the testing environment' of Chapter 5. I was successful from steps 1-5, in step 6 to 'Submit Transaction' on the 'init' function, I am unable to see the function listed under the smart contract in VS code. I have attached the image for reference.
EDIT-1 : I have attached the [WARNING] I have received in the output in VS code.
EDIT-2 : The warning in output terminal is -
Could not get metadata for smart contract trade. The smart contract may not have been developed with the programming model delivered in Hyperledger Fabric v1.4+ for Java, JavaScript and TypeScript. Error: Transaction function "org.hyperledger.fabric:GetMetadata" returned an error: Query failed. Errors: ["Peer org1peer-api.127-0-0-1.nip.io:8080: error in simulation: failed to execute transaction fc8980f9c74acc6ec164d0c51ba5e8cfed70812b22f50fe27a8d91495f6c269c: could not launch chaincode trade_1.0.0:1dfbb3c99cdc2da327a7faeff4758801b42bb46b9525201d52a1609b4b28faca: chaincode registration failed: container exited with 0"]
System configurations:
Ubuntu 20.04 on WSL 2, Windows 11 OS
Docker version: 20.10.17
Docker compose version: 2.6.1
Node version: 16.17.0
npm version: 8.15.0
Visual Studio Code version: 1.70.2
I just change all "trade" ”Exporter“ to some other names. Then I cant build the environment successful. And I got this: Error connecting to environment test: Error querying channels: Could not get all channel names, received: Failed to connect before the deadline on Endorser- name: peer0.thuorg.review.com, url:grpcs://localhost:8051, connected:false, connectAttempted:true.
I'm sure I didnt use sample node. And I cant finger out what happended a week. Can you give me a hint what should I do.
I'm trying to deploy the smart contracts on the Trade Network using the vs-code IBP extension. Unfortunately when I connect to it the Channel section is not shown what it prevents to deploy the contract on the channels. Is this the expected behaviour? If so, how could I deploy the smart contract?
Many thanks
[8/8/2021 10:24:06 PM] [ERROR] Error connecting to environment Trade Network: Error: Error querying channels: Could not get all channel names, received: Failed to connect before the deadline on Endorser- name: peer0.carrierorg.trade.com, url:grpcs://localhost:9051, connected:false, connectAttempted:true
I am getting the above error when I follow the steps in the v2 of the book while trying to connect to the Trade Network. Any suggestions on how to fix this?
I hope someone can help me with this. Thanks!
I followed the instruction up to step 6, page 129, $cd fabric-ca $make docker
(after cloning fabric-ca release-1.4 to go/src/github.com/hyperledger/
) to build docker image. I'm getting error:
dev@ubuntusx2004:~/go/src/github.com/hyperledger/fabric-ca$ make docker
Building build/docker/bin/fabric-ca-client
Unable to find image 'hyperledger/fabric-baseimage:arm64-0.4.21' locally
docker: Error response from daemon: manifest for hyperledger/fabric-baseimage:arm64-0.4.21 not found: manifest unknown: manifest unknown.
See 'docker run --help'.
make: *** [Makefile:124: build/docker/bin/fabric-ca-client] Error 125
Below are $PATH, and Docker version and images on my system
Path
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/deve/go/bin:/home/deve/go/src/github.com/hyperledger/fabric/build/bin:/opt/jdk-17/bin
Docker
Docker version 20.10.14, build a224086
Docker Images on the system
REPOSITORY TAG IMAGE ID CREATED SIZE
hyperledger/fabric-tools 2.2 f9a652b12c24 9 hours ago 439MB
hyperledger/fabric-tools 2.2.5 f9a652b12c24 9 hours ago 439MB
hyperledger/fabric-tools arm64-2.2.5-snapshot-4ab905936 f9a652b12c24 9 hours ago 439MB
hyperledger/fabric-tools latest f9a652b12c24 9 hours ago 439MB
<none> <none> ab23e83b7078 9 hours ago 780MB
<none> <none> e29d6fb8cce3 9 hours ago 704MB
hyperledger/fabric-peer 2.2 ad4c26b64b24 9 hours ago 51.9MB
hyperledger/fabric-peer 2.2.5 ad4c26b64b24 9 hours ago 51.9MB
hyperledger/fabric-peer arm64-2.2.5-snapshot-4ab905936 ad4c26b64b24 9 hours ago 51.9MB
hyperledger/fabric-peer latest ad4c26b64b24 9 hours ago 51.9MB
<none> <none> 0ec779e71ead 9 hours ago 625MB
hyperledger/fabric-orderer 2.2 552df759ab58 9 hours ago 33.4MB
hyperledger/fabric-orderer 2.2.5 552df759ab58 9 hours ago 33.4MB
hyperledger/fabric-orderer arm64-2.2.5-snapshot-4ab905936 552df759ab58 9 hours ago 33.4MB
hyperledger/fabric-orderer latest 552df759ab58 9 hours ago 33.4MB
hyperledger/fabric-ccenv 2.2 71d2203495c9 9 hours ago 512MB
hyperledger/fabric-ccenv 2.2.5 71d2203495c9 9 hours ago 512MB
hyperledger/fabric-ccenv arm64-2.2.5-snapshot-4ab905936 71d2203495c9 9 hours ago 512MB
hyperledger/fabric-ccenv latest 71d2203495c9 9 hours ago 512MB
hyperledger/fabric-baseos 2.2 faf4c9cedc23 9 hours ago 6.66MB
hyperledger/fabric-baseos 2.2.5 faf4c9cedc23 9 hours ago 6.66MB
hyperledger/fabric-baseos arm64-2.2.5-snapshot-4ab905936 faf4c9cedc23 9 hours ago 6.66MB
hyperledger/fabric-baseos latest faf4c9cedc23 9 hours ago 6.66MB
alpine 3.14 ac73e934f311 9 days ago 5.34MB
golang 1.17.5-alpine3.14 5d548a459734 4 months ago 312MB
golang 1.17.5-alpine 939b513d7ff8 4 months ago 313MB
The trade.sh script does not recognized the reset command. I think that the problem is located in the section "Parse commandline args" (line 1348) because the reset command is not parsed there.
if [ "$MODE" == "up" ]; then
EXPMODE="Starting network"
elif [ "$MODE" == "down" ]; then
EXPMODE="Stopping network"
elif [ "$MODE" == "restart" ]; then
EXPMODE="Restarting network"
elif [ "$MODE" == "clean" ]; then
EXPMODE="Cleaning network and channel configurations"
...
[8/8/2021 10:24:06 PM] [ERROR] Error connecting to environment Trade Network: Error: Error querying channels: Could not get all channel names, received: Failed to connect before the deadline on Endorser- name: peer0.carrierorg.trade.com, url:grpcs://localhost:9051, connected:false, connectAttempted:true
I am getting the following error when I follow the steps in the v2 of the book while trying to connect to the Trade Network. Any suggestions on how to fix this ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.