I am trying to run the Token ERC-20 sample chaincode, using the hyperledger fabric binaries I built from source (I am trying to modify the source code, so it defeats the purpose to download pre-built binaries).
The first time I attempted this, everything worked fine. But for some reason, after rebuilding and updating the binaries, channel creation now fails.
Here's what's happening. I run this:
./network.sh up createChannel -ca
And I find the following warnings & errors in the output:
Local fabric-ca binaries and docker images are out of sync. This may cause problems.
and:
Error: Post "https://localhost:7053/participation/v1/channels": dial tcp 127.0.0.1:7053: connect: connection refused
Channel creation failed
Related
I am trying to run the startFabric.sh script but it fails with the following error.
There are already several solutions posted for this problem. I went through almost all of them changing the FABRIC_CFG_PATH variable, running byfn.sh before this etc. etc.
Still can not resolve!!
Can you make sure that you can run
./network.sh up
inside
fabric-samples/test-network/
?
The error you are getting maybe result of one of the followings:
You have an incomplete fabric-samples folder, OR
You do not have appropriate permission to access the folder which has config.yaml file. In this case, it's
fabric-samples/test-network/organizations/ordererOrganizations/example.com/msp
You do not have certificates generated for the orgs.
Please share more info, so it's easier to navigate through the problem
P.S. The fabcar example in Fabric 2.1 uses test-network instead of first-network used in previous versions. So, running byfn.sh would not be of much help.
Use FABRIC_CFG_PATH=$PWD/../config/ with your $PWD set to ~/fabric-samples/fabcar
Also check that configtx.yaml exists in ~/fabric-samples/test-network/configtx
I'm newbie in the HyperLedger Fiber Technology and I'm following this official tutorial to build my first network. I replaced example.com with the domain of my company. After generating certificates I ran the follow command to up my network:
./byfn.sh up -c ttchannel
I get the following error during channel creation:
Error: got unexpected status: FORBIDDEN -- Failed to reach implicit threshold of 1 sub-policies, required 1 remaining: permission denied
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
Then I verified from PEERs containers that peers are already connected with this channel (don't know why and when this connection got established), So, I restarted this network and then got the following error:
Error: failed to create deliver client: failed to load config for OrdererClient: unable to load orderer.tls.rootcert.file: open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/vodworks.com/orderers/orderer.vodworks.com/msp/tlscacerts/tlsca.vodworks.com-cert.pem: no such file or directory
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
And then I verified in the CLI container that crypto directory wasn't accessible so I have to restart that container to make it accessible. but still I was unable to run it.
Can anyone please suggest that what these error means and how can I run my network?
Where exactly did you change "example.com"? I'm pretty sure the setup script also creates all the crypto material based on configtx.yaml file, that has "example.com" as domain everywhere. The docker-compose files then map the created folders as volume into the container (see docker-compose-base.yml):
../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
So the docker-compose file also expects the certs to be in this folders. From your description I would expect that you missed to change the domain at some point.
The Reason of this error was that network was not going down properly. All the peers were connected with the channel already as I verified by running the command peer channel list inside the container of each peer which was resulting in the following output:
Channels peers has joined:
ttchannel
And with this situation, the command peer channel create ... was actually throwing this error. So, I'm able to run the network successfully with the following command:
**./byfn.sh restart -c ttchannel -s couchdb -t 60 -d 10**
Which actually first put the network down and then start it again.
I am trying to create a new identity with this command: composer identity issue -c admin#siemens-network -f administrator1.card -u Administrator1 -a "resource:org.siemens.Administrator#001"
But I get the following output:
Issue identity and create Network Card for: Administrator1
✖ Issuing identity. This may take a few seconds...
Error: fabric-ca request register failed with errors [[{"code":20,"message":"Authorization failure"}]]
Command failed
I already restarted the fabric but it still doesn't work
Please check admin#siemens-network card has existed
composer card list
If you do not have this card, access the folder containing the createPeerAdminCard.sh file and run
./createPeerAdminCard.sh
Hope it helps you.
I deleted all cards, restarted the network and reimported all cards. Now it's working
I am trying to get hyperledger explorer to work with docker-compose, hyperledger blockchain explorer did not connect to the hyperledger blockchain network. It says "Failed to connect client peer, please check the configuration and peer status". However I followed all instructions I could find to get it to connect.
The Hyperledger explorer starts up and I can access it at http://localhost:8090/ but it does not connect to the blockchain.
Here is the github project where it is not working.
https://github.com/contractpendev/hyperledger-basic-network
Blockchain Explorer comes from here.
https://github.com/hyperledger/blockchain-explorer
Finally I think my question is not a good question as no-one else is likely to have this problem anymore.
I would add a comment asking for more info, but since I don´t have enough rep yet to comment, I guess I'll try an answer instead!
All of the following assume that Blockchain Explorer is run in a docker container, using the supplied deploy_explorer.sh script. All examples below should work with the first-network sample network from fabric-samples, assuming that fabric-samples has been cloned to ~/fabric/fabric-samples.
Firstly, are there any more detailed errors reported in either the docker logs (docker logs {container-name}) or the log file in the container (/opt/logs/app/app.log)?
Have you done the following?
Confirm that you are using the correct Blockchain Explorer version for your fabric version - e.g. explorer 3.7 for fabric 1.2.
Clean-up any existing Blockchain Explorer installation - if you had a previous version installed, you should remove it first using the supplied deployment script, i.e.
cd ~/fabric/blockchain-explorer
./deploy_explorer.sh --clean
Clone and/or check-out the correct release of the blockchain explorer repository - e.g.
cd ~/fabric
git clone https://github.com/hyperledger/blockchain-explorer.git
cd blockchain-explorer
git checkout release-3.7
Create a folder under "blockchain-explorer/examples" for your network - e.g.
cd ~/fabric/blockchain-explorer/examples
mkdir first-network
Create a config.json file for your network (in the folder created above). You can take a copy of the sample file from ~/fabric/blockchain-explorer/examples/net1/config.json and modify it accordingly.
Create a symbolic link to crypto-config (in the same folder), e.g.
cd ~/fabric/blockchain-explorer/examples/first-network
ln -fs ~/fabric/fabric-samples/crypto-config crypto
Deploy Blockchain Explorer - specifying the name of the folder containing your config, and the name of your docker network, e.g.
cd ~/fabric/blockchain-explorer
./deploy_explorer.sh first-network net_byfn
You should now be able to connect to explorer at http://localhost:8080/. If the page still doesn't load, check the docker logs for any errors (docker logs blockchain-explorer).
See https://github.com/hyperledger/blockchain-explorer/blob/master/README.md for more details (replacing "master" with the label for release you are using, e.g. "release-3.7").
Also, please note that the port exposed when using deploy_explorer.sh has changed between release-3.7 and release-3.8 from 8080 to 8090. This one caught me out for quite some time!
Booting up a my first Hyperledger Network on OSX with.
I installed the sample files using the script
curl -sSL http://bitlyURLThatStackoverflow won't let me us | bash -s 1.2.1
The ran
./byfn.sh up -c mychannel -s couchdb
To boot up a sample network and got the 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
Pulled the logs from orderer.example.com:7050 and got
config requires unsupported channel capabilities: Channel capability V1_3 is required but not supported: Channel capability V1_3 is required but not supported
Any suggestion on where to start debugging
If you are just getting started, you might want to move to 1.3.0 anyway as it is now generally available.
EDIT: You should now be able to just use 1.2.1 and things should work. I pushed a new v1.2.1 tag for fabric-samples. (read below for explanation).
To answer your question, the way the script works is that it assumes that both the fabric and fabric-samples repositories have tags matching the version specified for download. It turns out that there is 1.2.1 tag for fabric-samples so if you cloned it yourself you'll end up with the default (which is 1.3.0). If you want to use the 1.2.1 images, then you can simply download them and then run git checkout v1.2.0 in your clone of fabric-samples.