This is my first post on Stackoverflow. Please bear with me...
I am new to basically everything around hyperledger-fabric.
While trying to follow the "Writing Your First Application Tutorial" i am unable to generate the genesis block.
I am running:
windows 10
Docker version 18.03.0-ce, build 0520e24302
docker-compose version 1.20.1, build 5d8c71b2
npm 6.1.2
node.js v12.1
python 2.7
I used the curl commands given in the instructions.
When i run
./startFabric.sh javascript
at first everything is going ok. I am getting some warnings but starting the Channel seems to work fine.
In the next few lines however i am getting an error.
Generate CCP files for Org1 and Org2
/c/Users/Jonathan/Hyperledger_Fabric/fabric-samples/bin/configtxgen
Generating Orderer Genesis block
CONSENSUS_TYPE=solo
+ '[' solo == solo ']'
+ configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
2019-11-25 10:35:01.676 CET [common.tools.configtxgen] main -> INFO 001 Loading configuration
2019-11-25 10:35:01.677 CET [common.tools.configtxgen.localconfig] Load -> PANI 002 Error reading configuration: Unsupported Config Type ""
2019-11-25 10:35:01.679 CET [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration: Unsupported Config Type "" [recovered]
panic: Error reading configuration: Unsupported Config Type ""
It seems that the configuration is missing/not the right "type".
I googled my error and came up with people having similar/the same issue but i havent been able to solve my issue by following the advice they were given (hence why i am here).
Similar posts i found:
https://jira.hyperledger.org/browse/FAB-3467
Error cryptogen tool in Hyperledger Fabric
The people responding to the posts above generally seem to think its an issue regarding the path to the config file which apparently can be fixed with
FABRIC_CFG_PATH=$PWD
But that hasnt worked for me.
Full Console Output:
https://pastebin.com/CHxjZ1Uq
Look at the warning at the start: you are missing some prerequisites.
First, use the generate script to generate the crypto-config and artifacts folder.
Once you got your certificates you can start fabric.
You should have a generte.sh script or something like that.
Essentially it runs the certificate generation for your network using cryptogen.
The code is something like this:
which cryptogen
if [ "$?" -ne 0 ]; then
echo "cryptogen tool not found. exiting"
exit 1
fi
if [ -d "crypto-config" ]; then
rm -Rf crypto-config
fi
set -x
cryptogen generate --config=./crypto-config.yaml
Once you generated the certificates, you can now generate the genesis block with something like:
which configtxgen
if [ -d "config" ]; then
rm -Rf config
fi
mkdir config
configtxgen -profile OneOrgOrdererGenesis -outputBlock ./config/genesis.block
configtxgen -profile OneOrgChannel -outputCreateChannelTx ./config/channel.tx -channelID $CHANNEL_NAME
configtxgen -profile OneOrgChannel -outputAnchorPeersUpdate ./config/${MSP_NAME}anchors.tx -channelID $CHANNEL_NAME -asOrg $MSP_NAME
Obviously replacing with your names and variables.
Related
I am relatively new to Arch Linux.
So i have been dealing with this issue for quite a long time now. I got this new RTL8188FTV wireless USB network adapter and i have tried installing the drivers for it with Paru AUR helper. The installation seems to fail, as it throws this error at the end :
==> ERROR: Missing 5.15.70-1-lts kernel modules tree for module 8188fu/r112.89d7288.
I can confirm the wireless adapter is functional, since it works on Windows
Package Name: 8188fu-kelebek333-dkms-git
Is there a way to install this "kernel modules tree" so i could finish the installation?
Thanks!
Edit: back with more errors
Building module:
Cleaning build area...
'make' all KVER=6.0.5-arch1-1.............(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.0.5-arch1-1 (x86_64)
Consult /var/lib/dkms/8188fu/r113.f5df53d/build/make.log for more information.
error: command failed to execute correctly
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Install DKMS modules
==> dkms install --no-depmod 8188fu/r113.f5df53d -k 6.0.5-arch1-1
Error! Bad return status for module build on kernel: 6.0.5-arch1-1 (x86_64)
Consult /var/lib/dkms/8188fu/r113.f5df53d/build/make.log for more information.
==> WARNING: `dkms install --no-depmod 8188fu/r113.f5df53d -k 6.0.5-arch1-1' exited 10
==> ERROR: Missing 5.15.75-1-lts kernel modules tree for module 8188fu/r113.f5df53d.
(3/3) Performing snapper post snapshots for the following configurations...
The command
echo 'alias usb:v0BDApF179d*dc*dsc*dp*icFFiscFFipFFin* rtl8188fu' | sudo tee /etc/modprobe.d/r8188eu-blacklist.conf
doesn't seem to do much.
Installation still fails.
Your on kernel 5.15 so you have to backlist the rl8188eu driver. You can do that with this command
echo 'alias usb:v0BDApF179d*dc*dsc*dp*icFFiscFFipFFin* rtl8188fu' | sudo tee /etc/modprobe.d/r8188eu-blacklist.conf
The code was taken from the same repo the aur package was made from
https://github.com/kelebek333/rtl8188fu
I am new to Fabric 2.0 and recently installed all samples and I was able to run test-network without an issue with 2 orgs. Then I followed the directory on addOrg3 to add 3rd organization and join the channel I created earlier.
Now the fun part came in when I wanted to add 4th organization. What I did was, I copied the addOrg3 folder and renamed almost everything in each file to represent 4th organization. I even assigned new PORT for this organization. However I am seeing the following error.
I've also added the following in Scripts/envVar.sh
export PEER0_ORG4_CA=${PWD}/organizations/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls/ca.crt
And added the following in envVarCLI.sh
elif [ $ORG -eq 4 ]; then
CORE_PEER_LOCALMSPID="Org4MSP"
CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG4_CA
CORE_PEER_ADDRESS=peer0.org4.example.com:12051
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org4.example.com/users/Admin#.../msp
I have also added step1Org4.sh and step2Org4.sh basically following by following addOrg3's structure.
What steps do you follow to add additional organizations ? Please help.
"No such container: Org4cli"
Sorry for the formatting since I wasn't able to put in to coding style but here is the output from running the command "./addOrg4.sh up"
**Add Org4 to channel 'mychannel' with '10' seconds and CLI delay of '3' seconds and using database 'leveldb'
Desktop/blockchain/BSI/fabric-samples/test-network/addOrg4/../../bin/cryptogen
##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
##########################################################
############ Create Org4 Identities ######################
##########################################################
+ cryptogen generate --config=org4-crypto.yaml --output=../organizations
org4.example.com
+ res=0
+ set +x
Generate CCP files for Org4
Desktop/blockchain/BSI/fabric-samples/test-network/addOrg4/../../bin/configtxgen
##########################################################
####### Generating Org4 organization definition #########
##########################################################
+ configtxgen -printOrg Org4MSP
2020-05-29 13:33:04.609 EDT [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-05-29 13:33:04.617 EDT [common.tools.configtxgen.localconfig] LoadTopLevel -> INFO 002 Loaded configuration: /Desktop/blockchain/BSI/fabric-samples/test-network/addOrg4/configtx.yaml
+ res=0
+ set +x
###############################################################
####### Generate and submit config tx to add Org4 #############
###############################################################
Error: No such container: Org4cli
ERROR !!!! Unable to create config tx **
In your addOrg4.sh have condition check like this:
CONTAINER_IDS=$(docker ps -a | awk '($2 ~ /fabric-tools/) {print $1}')
if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" == " " ]; then
echo "Bringing up network"
Org4Up
fi
If you already run addOrg3.sh up, CONTAINER_IDS alway have value (Example: 51b4ad60d812). It is ContainerID of Org3cli. So function Org4Up will never call. Simple way is just comment code like this:
# CONTAINER_IDS=$(docker ps -a | awk '($2 ~ /fabric-tools/) {print $1}')
# if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" == " " ]; then
echo "Bringing up network"
Org4Up
# fi
It will bring up Org4cli you missing.
First check the container is up or not and if it is up then I think the CLI where the command is executed is not bootstrapped with the Org4 details.
I have added the 4th Organization from the three Org Hyperledger Fabric Network .Firstly, you have to create the Org4-artifacts (Crypto.yaml and Org4 docker file including the Org4Cli) and then try to follow the manual (step by step) process to add the new Organization from the official documentation.
https://hyperledger-fabric.readthedocs.io/en/release-2.0/channel_update_tutorial.html
Omit the process of editing scripts (step1 Org3.sh ...) because the workflow for adding the 4th or a new Org is slightly changed.So,you will spend a lot of time in just modifying the scripts.
I will write an article to add a new Org (4th) on medium,will paste the link here too.
I'm following the Getting started tutorial of Sawtooth Seth (https://sawtooth.hyperledger.org/docs/seth/releases/latest/getting_started.html), but I'm not able to set up an account on the network. The network is running properly in another shell. (I've removed the -aes128 flag for simplicity)
lorenzo#MacBook-Air-di-Lorenzo ~ $ cd gitHubRepo/sawtooth-seth/
lorenzo#MacBook-Air-di-Lorenzo ~/gitHubRepo/sawtooth-seth $ docker exec -it seth-cli bash
root#a6caea38a1a8:/project/sawtooth-seth# openssl ecparam -genkey -name secp256k1 | openssl ec -out key-file.pem
read EC key
writing EC key
root#a6caea38a1a8:/project/sawtooth-seth# seth account import key-file.pem myalias
error: Found argument 'myalias' which wasn't expected, or isn't valid in this context
USAGE:
seth account import <key-file> --pass-file <pass-file>
For more information try --help
root#a6caea38a1a8:/project/sawtooth-seth# seth account import key-file.pem --pass-file myalias
Error: No such file or directory (os error 2)
root#a6caea38a1a8:/project/sawtooth-seth# ls
bin cli common contracts key-file.pem protos tests
You ran the seth command in the seth-cli Docker container.
You need to run it in the seth-cli-go container until PR https://github.com/hyperledger/sawtooth-seth/pull/72 is merged.
EDIT: This was merged 2018-11-13.
A good resource for questions like this is also the seth chat channel at
https://chat.hyperledger.org/channel/sawtooth-seth
According to HyperLedger official Tutorial Document
1: http://hyperledger-fabric.readthedocs.io/en/release-1.0/build_network.html, I tried to run ./byfn.sh -m generate but the output consists of errors:
`
configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
2018-06-15 14:28:54.070 +07 [common/configtx/tool] main -> INFO 001 Loading configuration
2018-06-15 14:28:54.101 +07 [common/configtx/tool/localconfig] Load -> CRIT 002 Error unmarshaling config into struct: 4 error(s) decoding:
'' has invalid keys: capabilities
'Profiles[TwoOrgsChannel].Application' has invalid keys: Capabilities
'Profiles[TwoOrgsOrdererGenesis]' has invalid keys: Capabilities
'Profiles[TwoOrgsOrdererGenesis].Orderer' has invalid keys: Capabilities
res=1
set +x
`
I got some error message I feel like I missed some configuration but I had no idea.
Now the error is resolved thanks to suggestion from my senior suggesting that from the documents I should change version of bash
curl -sSL <link-to-file> | bash -s 1.1.0
I was trying to find a way how to build and run my game from a Ubunty-based linux container just using command line. Even though I was able to find few containers on DockerHub, neither of them allowed me to pass license registration stage in 'batch' mode.
https://hub.docker.com/r/eamonwoortman/unity3d/~/dockerfile/
https://hub.docker.com/r/chenjr0719/ubuntu-unity-novnc/
Commands I tried so far:
xvfb-run --auto-servernum /opt/Unity/Editor/Unity -force-free -batchmode -nographics -logFile -username 'xxx' -password xxx -quit
/opt/Unity/Editor/Unity -force-free -batchmode -nographics -logFile -username 'xxx' -password xxx -quit
I'm usually getting following error log from Unity:
mono profile = '/opt/Unity/Editor/Data/Mono/lib/mono/2.0' Initialize
mono Mono path[0] = '/opt/Unity/Editor/Data/Managed' Mono path[1] =
'/opt/Unity/Editor/Data/Mono/lib/mono/2.0' Mono path[2] =
'/opt/Unity/Editor/Data/UnityScript' Mono path[3] =
'/opt/Unity/Editor/Data/Mono/lib/mono/2.0' Mono config path =
'/opt/Unity/Editor/Data/Mono/etc' Using monoOptions
--debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56542
DisplayProgressbar: Unity license Cancelling DisplayDialog: Failed to
activate/update license. Timeout occured while trying to update
license. Please try again later or contact support#unity3d.com This
should not be called in batch mode.
I wonder is someone else had already solved that problem and able to share Dockerfile & proper command lines.
It has been quite a while since the original question, but it took me a lot of time to find the correct answer, so just in case someone else would struggle with this problem - the answer is:
At some point Unity stopped requiring usage of xvfb-run and neatly builds stuff without it. If using xvfb-run - you'll be receiving timeouts (Unity error messages are pretty misleading in this case). I have a pipeline on Jenkins that uses Ubuntu image and these commands work fine for me so far
The trick is in using "-nographics" argument after implementation of which the need in xvfb-run disappeared.
Activate
/opt/unity/Editor/Unity -quit -logFile -batchmode -nographics -username XXXX -password XXXX -serial XXXX
Build
/opt/unity/Editor/Unity -quit -logFile -batchmode -nographics -quit -projectPath . -buildTarget iOS -customBuildTarget iOS -customBuildName XXXX -customBuildPath builds/iOS/ -executeMethod BuildCommand.PerformBuild -logFile /dev/stdout
Return license
/opt/unity/Editor/Unity -quit -logFile -batchmode -nographics -username XXXX -password XXXX -serial XXXX
Hope this saves someone that huge amount of time I wasted on figuring this out ;)