peer: command not found - hyperledger-fabric

I have been pursuing certification with the Blockchain council, I tried to create channels and join all peers but I keep getting the below error.
./createChannel.sh: line 62: peer: command not found
I tried the solution mentioned in the old post:
docker exec -it cli bash
But I got the error:
Error response from daemon: No such container: cli
I tried to download the .deb file for the container but got the error:
sudo: dpkg.: command not found

Related

Chaincode Argument Error while working with minifab implementation

I am trying to run fabric network locally using minifab tutorial. While making my first transaction, I am encountering following error.
Here is my command
minifab invoke -p '"invoke","a","b","4"'
Error Details
non-zero return code
Error: chaincode argument error: invalid character 'i' looking for beginning of value
Usage:
peer chaincode invoke [flags]
windows version of minifab requires below command(with backslashes)
minifab invoke -p \"invoke\",\"a\",\"b\",\"4\"
This will solve the problem.

Some problems about channel in Fabric python SDK

I try to follow the tutorial of the Hyperledger Fabric python SDK, but get a problem when creating channel. The error I got is shown in the following:
Exception: [status: BAD_REQUEST
info: "error applying config update to existing channel 'businesschannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1"
]
How can I fix it?
The issue is that you didn't remove your previous config before creating a new channel i.e businesschannel. See this line in your error error applying config update to existing channel 'businesschannel. If you are using docker then try below commands:-
docker rm -f $(docker ps -aq)
docker network prune -f
docker volume prune -f

Getting error as ccenv:latest removal from docker hub caused problem for chaincode instantiation

I am trying to init the chaincode on hyperledger fabric 1.4.5 setup with k8s, however getting error as
"Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: API error (404): manifest for hyperledger/fabric-ccenv:latest not found: manifest unknown: manifest unknown
"
Please anybody help me on this issue
latest tag has been deprecated. You can add
CORE_CHAINCODE_BUILDER: hyperledger/fabric-ccenv:your_version
under peer's environment in compose file.
This issue is resolved in Fabric v1.4.8 as it will now look for fabric-ccenv:1.4 by default, instead of fabric-ccenv:latest.
See the v1.4.8 release notes for more details.
The tag was removed. The workaround is to pull the matching version and tag it locally as latest.
docker pull hyperledger/fabric-ccenv:1.4.0
docker tag hyperledger/fabric-ccenv:1.4.0 hyperledger/fabric-ccenv:latest

byfn.sh fails with binaries and docker images out of sync

Following the build your first network tutorial on hyperledger docs when I type
$ ./byfn.sh up
I get following warning
LOCAL_VERSION=1.2.0
DOCKER_IMAGE_VERSION=1.2.1
=================== WARNING ===================
Local fabric binaries and docker images are
out of sync. This may cause problems.
===============================================
and finally the script fails with this error
Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
Restart the bootstrap process by cding into the folder fabric-samples/scripts and run bootstrap.sh again like this
$ ./bootstrap.sh
This made my images to get synced like this in the output
LOCAL_VERSION=1.3.0
DOCKER_IMAGE_VERSION=1.3.0
You need to first delete the existing and then download the higher version of Hyperledger Fabric. You can run the following commands to do this:
cd fabric-samples
rm -Rf bin
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.3.0
./scripts/bootstrap.sh

Hyperledger on IBM Cloud, chaincode launched and waiting for registration

Code
Currently I followed this article to develop my BNA to IBM blockchain cloud platform (started plan). Unluckily, I got the error when I try to run this line of code:
composer network start -c admin#mynetwork-fabric -A admin -C ./creds/admin-pub.pem -f delete.card -n my_network -V 0.0.4
Error
I am very sure that all parameters are good, the full errors are:
Error: Error trying to start business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error: 2 UNKNOWN:
premature execution - chaincode (my_network:0.0.4) launched and
waiting for registration
Or sometimes the error is:
Error: Error trying to start business network. Error: No valid responses
from any peers.
Response from attempted peer comms was an error: Error:
REQUEST_TIMEOUT
I understand sometimes maybe there is a timeout, but I do not really got the launched and waiting for registration error.
P.S.
My hyperledger composer version is 0.19.
I also view this deploying tutorial, there might be some different commands, because of the different versions of Hyperledger Composer. I checked the composer hep to transfer the commands to running on composer 0.19.
Solution:
down grade composer-cli to 0.18.1
change your package.json, composer-cli to 0.18.1
npm install to create new bna
reinstall
restart
If you are using IBM Cloud Starter Plan, then you need to be using v0.18.1 of Composer not v0.19.
Also, this is the doc you should be following:
https://console.bluemix.net/docs/services/blockchain/develop_starter.html#deploying-a-business-networks-on-starter-plan

Resources