Error creating channel using testnetwork on Hyperledger Fabric - hyperledger-fabric

I am currently learning about hyperledger fabric, and am having issues creating channels on the testnetwork. I am on windows 10 and have the latest version of the fabric and docker.
When I run this command ./network.sh up createChannel in my git bash I get this error
Error on outputChannelCreateTx: could not generate default config template: error parsing configuration:
could not create application group: failed to create application org: 1 - Error loading MSP configuration
for org Org1MSP: could not load a valid ca certificate from directory
C:\fabric-samples\test-network\organizations\peerOrganizations\org1.example.com\msp\cacerts:
CreateFile C:\fabric-samples\test-network\organizations\peerOrganizations\org1.example.com\msp\cacerts:
The system cannot find the file specified.
+ res=1
Failed to generate channel configuration transaction...
Create channel failed
I am unsure as the source of this issue. Do I need to install the samples and binaries again? Is it where I'm running the commands?

I'm pretty sure that you will get more troubles cause you're using Windows 10. Even if you use git-bat (or
Cygwin like, etc), you should aware that most of script was written for linux (especially for ubuntu-based linux). Next step, when you work with chaincode-nodejs, it will install some required libraries, some only works on Linux OS. Please consider switching to Linux
P/s . I'm using ubuntu 20.04 LTS for Fabric 2.2. It works perfect.

Related

error response from daemon container is not running

Im running ubuntu terminal 18.04 on window 10 Pro , Im getting error while running ./startFabric.sh
Error response from daemon: Container d827b753c3fda5ca92ada94c28e6362ebab32960f2af8805b4c9706e0056734d is not running
I have tried all the methods posted previously, can anyone please help me?
I tried removing all the container by using command docker ps -qa | xargs docker rm -f
https://i.imgur.com/NxxVyUn.png
Looks like you are trying to run the Hyperledger Composer simple fabric development server (which is basically a very simple hyperledger fabric environment to help you get started with composer using a hyperledger fabric network) inside a windows subsystem layer for linux environment. This isn't supported on Windows (either in git bash or in windows subsystem layer for linux).
If you are looking to use hyperledger composer then you should use a hypervisor to run a real linux VM such as virtualbox, vmware or hyperv (however it is highly recommended that you now invest time in the new programming models in hyperledger fabric rather than use hyperledger composer)
If you are looking to just using hyperledger fabric then you can start by looking at
https://hyperledger-fabric.readthedocs.io/en/release-1.4/install.html

How to use hyperledger fabric discovery service with CLI

How can I use the discover tool in Hyperledger Fabric 1.2 with CLI? I have the 1.2 binary and fabric files. I tried to execute discover command in the cli container in first-network, but I received an error saying "command not found"
You can build it locally via cloning the repository and running make discover, or download the binaries from nexus.
In the next releases it will be part of the fabric-tools image.

Hyperledger Fabric 1.0 Ubuntu 16.04 Setup issue

Following 2 links to setup Hyperledger Fabric 1.0 in system.
First link Hyperledger-fabric setup
After following commands
cd $GOPATH/src/github.com/hyperledger/fabric/devenv
vagrant up
vagrant ssh
Followed hypeledger latest setup docs
After using
cd $GOPATH/src/github.com/hyperledger/fabric
make dist-clean all
An error occured...
github.com/hyperledger/fabric/vendor/github.com/mattn/go-sqlite3 /usr/bin/ld: cannot find -lrocksdb collect2: error: ld returned 1 exit
status Makefile:137: recipe for target 'build/bin/peer' failed make:
*** [build/bin/peer] Error 2
On Left side my vagrant is running and right side is my Hyperledger Fabric 1.0 Setup command make dist-clean all
To me this seems to be problem of rocksdb, how can I resolve this?
Hyperledger Fabric 1.0 can be installed without having to build from source. The project publishes stable Docker images and binaries for each release. This may be a better approach to installing Fabric and its dependencies.
However, if you want to build from source, note that Vagrant is no longer needed. The build should be capable of running natively on most platforms (Mac, Windows and Ubuntu).
You will need the same prerequisites as for the Getting Started approach above - Docker (preferably the latest release), Go (1.9.x), Python 2.7 and Node 6.9.x (note that we do not yet support Node 7.x).
Occasionally, it has been observed that a fresh build (make all) from scratch may occasionally fail. If so, try running (make all) again.
As for the rocksdb error, Fabric no longer has a dependency on rocksdb and uses leveldb instead. It is entirely likely that because the vagrant environment gets little use of late, that it is not current.
I fond solution in one git hub link.
One can try to resolve this issue by using following commands-
apt-get install librocksdb-dev
apt-get install libsnappy-dev
apt-get install libbz2-dev
After this rockdb error should not be there. Will post more if found any other error and there solutions too.

Hyperledger fabric installation

I have windows 7 machine and RHEL 6.0.
Can we install hyperledger fabric on Windowa 7 and RHEL 6.0 without using vagrant and docker.? If yea, please describe the steps.
Hyperledger Fabric does not deliver a complete set of binaries for all operating systems. There are native binaries for the various tools (configtxgen, cryptogen, configtxlator and peer) available for Windows, MacOSX, and Linux (for X86, ppc and s390 architectures). There are published Docker images for Ubuntu. Building Centos/RHEL images or binaries should be a straight-forward process, but is not presently a tested/supported configuration. The Node and Java SDKs should run just about anywhere.
It should also be noted that you cannot run without Docker, as chaincode is run in independent containers, managed by the peer. Hence, trying to avoid use of Docker is really a forgone conclusion - you cannot.
No.
Here are two walk throughs on how to do it.
https://developer.ibm.com/opentech/2016/07/21/running-hyperledger-fabric-natively-on-windows/
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html
Hyperledger Fabric 1.0.0 requires RHEL 7.3 or CentOS 7.3, gRPC has a dependency on the latest and greatest gnu C libraries.
Will not work on RHEL 6.0 !

Hyperledger Fabric setup

I would like to setup Hyperledger Fabric on an Ubuntu machine with docker (docker-compose up). Is it possible to run the chaincode and nodejs code from another system (Mac system), as I already have Go and nodejs ready on the Mac.
Please help me with this query.
you can use same environment in different systems. This is the main reason to choose docker and docker-compose.
Just follow steps. Please confirm the version of tools.
To run on another system, you only have to simply build the image of your current hyperledger package on current system(Ubuntu). and use this image on another system(MAC).
Yes you can totally do that. Use this example: https://github.com/hyperledger/fabric-sdk-node/tree/master/examples/balance-transfer
Run docker-compose in your ubuntu machine. Update the app config.json and /app/network-config.json with ubuntu machine IP and make sure required ports are opened.
Run app on your mac.

Resources