Deploying Chaincode Failed - hyperledger-fabric

I was following the tutorial of hyperledger fabric "Using the Fabric Test Network", ang upon deploying the chaincode to the channel I encountered errors that I don't know what's the problem with it. I tried everything I have searched so far but no luck on fixing it. I tried uninstalling everything, and starting from the beginning of the installation but again no luck. I am new to this blockchain platform and is an aspiring developer for it. Anyone Please help.
Here is the result upon running the chaincode deployment :
Please do note that I tried installing golang (go1.13.x versions, go1.18.x and go1.19.x)but none solved the problem, anybody please help.

The screenshot shows that you don't have golang on the path. You need to ensure your $PATH variable includes the directory where the go binary is installed. However a further issue is you must ensure that the correct version of Go is installed that matches the version of Hyperledger Fabric you are using. Refer to the release notes of Hyperledger Fabric found here https://github.com/hyperledger/fabric/releases for your version to determine the appropriate version of golang to use.
A simpler option would be to install the javascript chaincode rather than the Go chaincode as this doesn't require any language support to be installed
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript -ccl javascript

I see this error in your screenshot:
go: command not found
Check you can run go from your shell:
go version
You likely need to add the go executable to your shell's PATH, as described in the Go installation instructions.

Related

Error when trying to bring up the test network

I trying to follow tutorials and develope on Ubuntu. Then get an error when comes to "Bring up the test network" part. I successfully run the following command to print the script help text of the test network.
./network.sh -h
When I want to run the next command to bring up the network
./network.sh up
I get the message as follow
Starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb' with crypto from 'cryptogen'
ERROR! Peer binary and configuration files not found..
May somebody tells me what's happened? Kindly helps.
I had the same issue, looks like you need to fetch system specific binaries:
https://hyperledger-fabric.readthedocs.io/en/release-2.2/test_network.html
I ran the curl command in the root dir without specifying the versions.
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s
Make sure you add the ./bin to .gitignore
Be sure to use
./network.sh up
from the test network folder and that test network folder is contained in fabric samples, because it could use binaries from different directories contained inside fabric samples and moving it could cause your error.
Also try to set this environment variable
FABRIC_CFG_PATH=$PWD
to force Fabric to be launched in your test network folder
first bring down the network to clean up
cd test-network
./network.sh down
start the network agian
./network.sh up
Before you can deploy the test network, you need to follow the instructions to Install the Samples, Binaries and Docker Images in the Hyperledger Fabric documentation.

Installing Hyperledger Fabric as normal user in Linux throws the error

I refered link
https://github.com/jollen/Hyperledger-Fabric-Install
as I started installing hyperledger fabric on commmand "make configtxgen" it throws me the error
Makefile:66: *** "No go in PATH: Check dependencies". Stop.
You do not have the Go compiler installed and/or located in your PATH. There is a section on the link you referenced about installing Go, adding it to your profile and then sourcing the profile. If you don't do this in the current terminal session, Go will not be found in your PATH. (logging in and out will also make it available).
FYI - The link you referenced is pretty old ... if you are in fact just trying to install and get up and running with Fabric I'd suggest you actually use the Fabric getting started documentation ( http://hyperledger-fabric.readthedocs.io/en/release-1.2/getting_started.html ).

Issue bringing up Hyperledger Fabric "Building Your First Network" sample

while I am running this command from my terminal
sudo ./byfn.sh -m up
I am getting below error:
Starting with channel 'my-channel' and CLI timeout of '10' seconds
and CLI delay of '3' seconds Continue (y/n)? y proceeding ...
Pulling orderer.example.com (hyper-ledger/fabric-orderer:latest)...
ERROR: manifest for hyper-ledger/fabric-orderer:latest not found
ERROR !!!! Unable to start network Error response from daemon: No
such container: cli
How do I resolve this please?
You need to download platform specific binaries, please see how to do it here in the following tutorial. Please also make sure you have all per-requisites, you can find more about what needed here.
Ideally, you should download the platform binaries and images as given in the Fabric documentation - Install Binaries and Docker Images
Or
You should make sure that your terminal has internet access & not behind any corporate proxy. Whatever is needed would be pulled by docker anyway. I am guessing that hyperledger/fabric-baseos image is not pulled by the script above.
If you don't find hyperledger/fabric-baseos:latest,then either docker pull hyperledger/fabric-baseos:tag depends on the fabric version on your own
Or, the chaincode instantiate process in byfn- end to end CLI would do it for you.
I had the same issue. Turns out it was just a broken docker-compose installation. I simply figured it out typing docker-compose in my terminal, and I ran into ImportError: No module named ssl_match_hostname
With a clean docker compose install, I got it to work.

Error while running gnome-music using jhbuild

I'm using jhbuild to build and run gnome-music.
I'm having a successful build but when I run the command
jhbuild run gnome-music
I get the following error
One of the errors is
1.GstTag was imported without specifying a version first
The rest are in the link above.
I'm not sure how to proceed further,can someone help me out?(I'm using Ubuntu 17.04).
I'm following the steps given on:
https://github.com/GNOME/gnome-music
Gst just warns you against not mentioning a version number. Hence, that's not the error.
The error you are facing is regarding Tracker. As you are on Ubuntu distribution, you should know that Ubuntu disables Tracker by default. Hence jhbuild run gnome-music refuses to start. Tracker is a file-indexing service based on file's metadata.
However, Ubuntu is deciding to enable Tracker by default as many GNOME's core apps relies on it. Read here.
Enable Tracker and jhbuild will pick it up from the host system.

gcloud deploy issue - boot2docker 1.3.1

This is a follow on from the question here:
gcloud deploy error: Image with tag google/docker-registry was not found which is based on the post here http://www.incrediblemolk.com/running-node-js-on-google-app-engine-managed-vms/ .
I've followed the steps in the second link and succeeded in getting gcloud and docker to run the github project https://github.com/GoogleCloudPlatform/appengine-nodejs-quickstart locally. However I am stuck on deployment.
After downloading the docker-registry container, I found that I had the 'insecure registry' issue, so I followed the steps in the top rated answer in the stack overflow question linked above. However when I tried to restart the daemon, I received a 'Tls message' as follows:
docker#boot2docker:/mnt/sda1/var/lib/boot2docker$ sudo /etc/init.d/docker restart
Need TLS certs for boot2docker,127.0.0.1,10.0.2.15,192.168.59.103
I was wondering if there is something that I need to do, or if this is a boot2docker issue? I noticed that in the boot2docker project on github, people mentioned 'workarounds' for disabling tls, which I managed to do by adding a line
DOCKER_TLS=no
to my /var/lib/boot2docker/profile file within the VM, and this did enable me to restart the docker daemon, however "gcloud preview app deploy --server preview.appengine.google.com ." requires that tls is enabled. So I feel like I'm untying one hand from behind my back and replacing it with the other in this instance!
Is there some fix required for this, or am I missing something important? If so, do I need to use boot2docker 1.3.0 as opposed to 1.3.1?
If anyone could help me in this matter that would be greatly appreciated.
Otherwise, my strategy I think would be to wait for these tools to mature a bit more, as I am after all using the preview version of gcloud, and I think TLS support in boot2docker is relatively new.
Yes, 1.3.1 is not compatible with our SDK. Plese use the latest (as of today) 1.3.2 or 1.3.0.

Resources