Bump -- anyone???
Is there any documentation for mac / linux that clearly describes how to install fabric and fabric-ca without having to install fabric-samples?
IOW, something that describes exactly:
-- what preqs are needed;
-- where it has to be installed (that pesky gopath issue);
-- what directory structures need to be in place for orgs, chaincode, etc.;
-- what needs to be built / made and how
in order to install a fresh fabric so one can build a POC but without all the fabric-samples, BYFN, first-network baggage? Please? Thanks.
By adding -d -s in the curl statement which fabric documentation has for installing fabric images and samples
-s by-passes fabric samples
-d by-passes docker images
Its better just to use -s
statement would be like
curl -sSL link -s -- -d -s
Related
When i run ./byfn.sh up send me this error.
LOCAL_VERSION=1.4.3
DOCKER_IMAGE_VERSION=2.3.3
=================== WARNING ===================
Local fabric binaries and docker images are
out of sync. This may cause problems.
===============================================
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "scripts/script.sh": stat scripts/script.sh: no such file or directory: unknown
ERROR !!!! Test failed.
I see the LOCAL_VERSION is different to DOCKER_IMAGE_VERSION. How could i change that? Well... I think thats the problem roght?
Thank you.
your bin folder in fabric-samples has binaries of version 1.4.3 where as docker images version is 2.2.3.
docker images to list the images in the system.
The latest fabric-samples doesn't have the BYFN it now works around test-network with 2 organizations and 1 peer each. download the latest fabric-samples and binaries with the curl command curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s it will download the latest samples and binaries and the docker images if you need of specific version like 2.2.3 then
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.2.3 1.5.2
you can find more details here in this link for getting latest samples and binaries https://hyperledger-fabric.readthedocs.io/en/release-2.2/install.html#install-samples-binaries-and-docker-images
I ran the script ./network.sh deployCC, then its not able to deploy it on the network(Fabric 2.0), this is the error:
deploying chaincode on channel 'mychannel'
Vendoring Go dependencies ...
~/Desktop/Fabric/fabric-samples/chaincode/fabcar/go
~/Desktop/Fabric/fabric-samples/test-network
go: unknown subcommand "mod"
Run 'go help' for usage.
~/Desktop/Fabric/fabric-samples/test-network
Finished vendoring Go dependencies
Using organization 1
++ peer lifecycle chaincode package fabcar.tar.gz --path
../chaincode/fabcar/go/ --lang golang --label fabcar_1
++ res=1
++ set +x
Error: error getting chaincode bytes: listing deps for pacakge
../chaincode/fabcar/go/ failed: exit status 2
!!!!!!!!!!!!!!! Chaincode packaging on peer0.org1 has failed
!!!!!!!!!!!!!!!!
ERROR !!! Deploying chaincode failed
The issue is with the Go package you installed.Which version you have installed?
The ideal way to install the latest Go is from here.Go
And if your using ubuntu don't go with the apt installation.
First remove apt installed go
$ sudo apt-get remove go
Download the tar file for linux from the site https://golang.org/dl/
450
Execute the command $ sudo tar -C /usr/local -xzf
As previous answer suggest: previous go lang version causes this issue
so first remove previous go : (suggested answers doesn't remove go so i added it here)
sudo apt-get remove golang-go
sudo apt-get remove --auto-remove golang-go
sudo apt-get purge golang-go
download latest go and add go/bin path to environment variable
I agree, this looks like a Go version issue. Fabric 2.0 has a prerequisite of Go version 1.13
Before 1.11 Go did not have the mod command(I think). So if you did install Go version 1.13, maybe you didn't remove the older version and its still pointing to the older version of Go.
Do a
peer version
in the same terminal where you ran the ./network.sh deployCC command and check the version of Golang that was being used. If you do see 1.10 being used then, you need to upgrade Golang.
Take a look at the install instructions at https://golang.org/doc/install
and follow the uninstall steps for the old version and the install steps for the new version and also ensure you have the Path Variables set for Fabric
I am trying to add a new peer to a SOLO hyperledger setup. I used hyperledger composer. I updated the crypto-config.yaml file to make the count for peers to 2 and also other changes. But when I try to run this command under hlfv1/composer cryptogen generate --config=./crypto-config.yaml, I get this error Cryptogen command not found. How to I fix that? I used the fabric-dev-servers scripts from the link https://hyperledger.github.io/composer/latest/installing/development-tools.html to setup my development environment.
Please help.
You will need to install Hyperledger Fabric native binaries. The Composer playground does not use these for their sample.
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.2.0 1.2.0 0.4.10 -s -d
This will download the binaries for Hyperledger Fabric 1.2 and place them in a directory named bin in your current working directory. It will also create a config directory with the default config files for the Hyperledger Fabric sample applications. To download version 1.1 binaries.
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.1.1 1.1.0 0.4.7 -s -d
I'm trying to upgrade to 1.2. I follow the documentation "Upgrade your components network" using byfn. (https://hyperledger-fabric.readthedocs.io/en/release-1.2/upgrading_your_network_tutorial.html#launch-a-v1-1-network)
When I run : ./byfn.sh up -t 3000 -i 1.1.0
I got this error :
LOCAL_VERSION=1.1.0-alpha
DOCKER_IMAGE_VERSION=1.1.0
=================== WARNING ===================
Local fabric binaries and docker images are
out of sync. This may cause problems.
===============================================
ERROR! Local Fabric binary version of 1.1.0-alpha does not match this newer version of BYFN and is unsupported. Either move to a later version of Fabric or checkout an earlier version of fabric-samples.
The documentation says that I have to clean up images and run the example again. So I did, I removed all images with docker rmi -f $(docker images -a -q) and I run the example again.
Images have been downloaded again and I still got this error about the 1.1.0-alpha version.
Obvisously, I am missing something...
Does someone have any clue ?
The issue is that you have the alpha version of the binaries used by the sample.
I'd suggest deleting the "fabric-samples/bin" directory and then downloading v1.1.0 again:
cd fabric-samples
rm -Rf bin
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.1.0
I am following the tutorial to build the first network at Building your first network. When in fabric-samples/first-network, I run the command:
./byfn.sh -m generate
two peers, channel, chaincode, orderer genesis block and cryptogen are created successfully. But when I run the command:
./byfn.sh -m up
I get the error "line 159: docker compose: command not found. ERROR!!! Undable to start network."
I have made a new clean Ubuntu 16.04 and installed everything to make sure everything is clean. But again I get the same error. When I nano ./byfn.sh, line 159 is as follows:
IMAGE_TAG=$IMAGETAG docker-compose -f $COMPOSE_FILE up -d 2>&1
And when I run:
./byfn.sh -m up -l node
I am getting the same error. The error message is shown in the image below:
When I run:
./byfn.sh -m down
I get a different error. This time the error is at lines 235 and 236; result of nano is as follows:
docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH down --volumes
docker-compose -f $COMPOSE_FILE down –volumes
I have added go to path as shown in installation guide. version of node is also compatible as mentioned v9.x is not supported yet, I have installed v8.
Should I make changes to liens 159, 235 and 236 of ./byfn.sh? If so, how should I change it? Or ahve I done some setup incorrectly?! I appreciate your help.
Thank you.
docker-compose is another software package that has to be installed (it is a tool for defining and running multi-container Docker applications) and you didn't installed it.
To install docker-compose run these commands:
sudo apt-get update
sudo apt-get install docker-compose
Then run the byfn file.
Reference:https://docs.docker.com/compose/overview/