Event Hub has been Shutdown on Fabric Writing your first Application - node.js

I am currently trying to run through the example first application for Hyperledger Fabric here -> http://hyperledger-fabric.readthedocs.io/en/release-1.1/write_first_app.html
I am unable to get past calling node invoke.js
Originally I was getting the same error as this question Error invoking chaincode using Node.js SDK [TypeError: Cannot read property 'getConnectivityState' of undefined]
But after reverting to grpc#1.9.1 I get the following result:
I am able to do everything up to the node query.js method and that returns successfully but can't quite get past this.
Node version: 8.11.1
Docker Version:
fabric client section of package-lock.json
FYI: I am trying to run on Windows 10 mostly using the docker toolbox bash, or a separate git bash CLI.
Last piece of info!
Even though the invoke js command fails with the above error, I can see that the PUT command to couch db does go through and car10 has been successfully added.
If I check the docker logs for peer0.org1.example.com I see the following:
So did it actually work?

Related

Google Cloud Run Second Flask Application - requirements.txt issue

I have a google cloud run flask application named "HelloWorld1" already up and running however i need to create a second flask application. I followed the below steps as per documentation:
1- On "Cloud Shell Editor" clicked "<>Cloud Code" --> "New Application" --> "Cloud Run Application Basic Cloud Run Application .."-->"Python (Flask): Cloud Run", provide and new folder and application is created.
2- When i try to run it using "Run on Cloud Run Emulator" i get the following error:
Starting to run the app using configuration 'Cloud Run: Run/Debug Locally' from .vscode/launch.json...
To view more detailed logs, go to Output channel : "Cloud Run: Run/Debug Locally - Detailed"
Dependency check started
Dependency check succeeded
Starting minikube, this may take a while...................................
minikube successfully started
The minikube profile 'cloud-run-dev-internal' has been scheduled to stop automatically after exiting Cloud Code. To disable this on future deployments, set autoStop to false in your launch configuration /home/mian/newapp/.vscode/launch.json
Update initiated
Update failed with error code DEVINIT_REGISTER_BUILD_DEPS
listing files: file pattern [requirements.txt] must match at least one file
Skaffold exited with code 1.
Cleaning up...
Finished clean up.
I tried following:
1- tried to create different type of application e.g django instead of flask however always getting the same error
2- tried to give full path of [requirements.txt] in docker settings, no luck.
Please if someone help me understanding why i am not able to run a second cloud run Flask app due to this error?
It's likely that your Dockerfile references the 'requirements.txt' file, but that file is not in your local directory. So, it gives the error that it's missing:
listing files: file pattern [requirements.txt] must match at least one file

Not able to start a chaincode in the test-network

I got stuck with the first tutorial for the test-network. I can set up a network and a channel with the network.sh-script, checked it with ‘docker ps -a’.
But trying to start the chaincode with
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go
fails. The console-output complains about inconsistent vendoring and suggests ignoring the vendoring directory:
console output with GOFLAGS='-mod=readonly
If I export ‘-mod=readonly’ before deploying the chaincode the error stays the same, exporting ‘-mod=mod’ produces an error about a failed normalization of the chaincode path:
console output with GOFLAGS='mod=mod'
I’m using linux-mint 20.2 (Uma), the prerequisites are of the following versions:
git 2.25.1
curl 7.68.0
docker 20.10.14
docker-compose 1.25.0 (build unknown)
go 1.13.8
jq 1.6
Setting up the network I once had the monitordocker-skript from the second tutorial running and noticed that it shows a different go-version (1.17.5 but still above the needed 1.13.x). And printing the version of docker-compose in the terminal there are the words “build unknown” behind the version-number, don’t know if that is useful.
Does anyone know why I’m not able to start a chaincode with the test-network?
Tried it with go 1.18, but there's no change.

hyperledger fabric devmode

I am trying to deploy chaincode in devmod on my ubuntu machine. I am following this tutorial.
The issue is when I use this command : CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_ADDRESS=localhost:7052 npm start
it shows the following error:
2018-09-20T16:27:18.292Z ERROR [lib/handler.js] uncaughtException: The "peer.address" program argument must be set to a legitimate value of <host>:<port>
Full logs can be found here:
https://hastebin.com/arerozesad.sql
I am following this tutorial:
https://hyperledger-fabric.readthedocs.io/en/v1.0.6/peer-chaincode-devmode.html
First, I hope you are using Fabric v1.1 or later as Node.js chaincode is not supported in v1.0.x.
The instructions you listed are for running Go chaincode.
For Node.js chaincode, your command should look like
CORE_CHAINCODE_ID_NAME="mycc:v0" node mycc.js --peer.address grpc://localhost:7052
You should be able to replace node mycc.js with npm start as well.
See https://github.com/hyperledger/fabric-chaincode-node#test-nodejs-chaincode for more information.

Launch fails after meteor build

I am creating a build from meteor source in a docker container.
It worked well so far (since last creation 1 or 2 weeks ago) but today an exception raises !
at /home/meteor/build/bundle/programs/server/boot.js:462:11
at /home/meteor/build/bundle/programs/server/boot.js:423:13
at Function.run (/home/meteor/build/bundle/programs/server/profile.js:510:12)
at /home/meteor/build/bundle/programs/server/boot.js:464:5
at Function.time (/home/meteor/build/bundle/programs/server/profile.js:309:28)
TypeError: Object.getOwnPropertyDescriptors is not a function
at insert (packages/mongo/collection.js:435:12)
at packages/autoupdate.js:189:3
at updateVersions (packages/autoupdate.js:125:20)
throw(ex);
/home/meteor/build/bundle/programs/server/node_modules/fibers/future.js:280
NB : log may be not ordered as I use ELK stack to handle it
What happened ? And what to do to solve it ?
FYI: the application works well locally (not builded)
Node 6 is currently default in alpine, that was the issue. I switch to node image which is safer (but bigger).

Error while updating business network in CLI tutorial

I am following along the Getting Started with Fabric Command Line and have run into a error I don't understand how to resolve. Any ideas?
In the section entitled "Update the deployed business network" an exception is thrown. The terminal output is below. The command used:
composer network update --archiveFile digitalproperty-network#0.0.7.bna --enrollId WebAppAdmin --enrollSecret DJY27pEnl16d
Note that the id is different from the tutorial as the 0.0.7 id was reported during the previous step while creating. The output continued...
Deploying business network from archive digitalproperty-network#0.0.7.bna
Business network definition:
Identifier: digitalproperty-network#0.0.7
Description: Digital Property Network
events.js:160
throw er; // Unhandled 'error' event
^
Error
at ClientDuplexStream._emitStatusIfDone (/home/mnjacobs/.nvm/versions/node/v6.9.5/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:189:19)
at ClientDuplexStream._readsDone (/home/mnjacobs/.nvm/versions/node/v6.9.5/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:158:8)
at readCallback (/home/mnjacobs/.nvm/versions/node/v6.9.5/lib/node_modules/composer-cli/node_modules/grpc/src/node/src/client.js:217:12)
I've struggled to get the versions to match the tutorials - they seem inconsistent. Notably, the node (v6.9.5) and nodejs (v6.10.1) versions differ even though node is a symbolic link to nodejs and I notice 6.9.5 is in the stack trace. I'm not sure that difference is relevant to the problem.
Other version information:
Ubuntu 14.04.5
Docker version 17.03.1-ce, build c6d412e (manually installed as auto
install was down level)
docker-compose version 1.12.0-rc2, build 08dc2a4
I've seen exactly that error when Hyperledger Fabric isn't running. If docker ps doesn't show anything, run npm run startHLF in the sample-applications/packages/getting-started directory before trying again.

Resources