postfinance / hlfabric-k8scc Goto Github PK
View Code? Open in Web Editor NEWChaincode builder and launcher for Hyperledger Fabric on Kubernetes
License: MIT License
Chaincode builder and launcher for Hyperledger Fabric on Kubernetes
License: MIT License
After the peer starts, the /healthz
endpoint fails with the following error:
{"status":"Service Unavailable","time":"2020-06-24T09:51:14.845961762Z","failed_checks":[{"component":"docker","reason":"failed to ping to Docker daemon: Get \"http://unix.sock/_ping\": dial unix /var/run/docker.sock: connect: no such file or directory"}]}%
The solution is to delete the vm
section in core.yaml
I tried demo, but failed to install node cc package.
Does it support node cc?
hello,
sorry to distrub you in another of your project but I want to know if I can have some help with kubewire (archived project) ?
best
bruno
k8scc-transfer-pv has access mode ReadWriteMany and shared by all peers and chaincode containers. It would make trouble when several peers execute chaincodes at the same time or they execute different chaincodes at the same time. Besides this issue, my k8s cluster does not support ReadWriteMany type PV.
Could it be replaced by temporary volumes? Chaincode container could use emptyDir for its volume and the launcher copy necessary data to the container when the container is available.
Readme.md refers chaincode.json but I'm not sure what it is. I could not find it in example folder.
Another question. One of the features is "The chaincode must be usable without changes", but it does not conform with the document saying the chaincode should be re-written using shim.ChaincodeServer.
The build process is successful but I can't invoke. I see this in the peer logs
2020-06-24 23:50:52.422 UTC [chaincode.externalbuilder] MoveOrCopyDir -> DEBU 0b9 Failed to move /tmp/fabric-fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1276509464/release to /var/hyperledger/production/externalbuilder/builds/fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1/release: rename /tmp/fabric-fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1276509464/release /var/hyperledger/production/externalbuilder/builds/fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1/release: invalid cross-device link, try copy instead
2020-06-24 23:50:52.422 UTC [chaincode.externalbuilder] MoveOrCopyDir -> DEBU 0ba Failed to move /tmp/fabric-fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1276509464/bld to /var/hyperledger/production/externalbuilder/builds/fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1/bld: rename /tmp/fabric-fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1276509464/bld /var/hyperledger/production/externalbuilder/builds/fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1/bld: invalid cross-device link, try copy instead
2020-06-24 23:50:52.477 UTC [chaincode.externalbuilder] PackageMetadata -> DEBU 0bb Walking package release dir '/var/hyperledger/production/externalbuilder/builds/fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1/release'
2020-06-24 23:50:52.478 UTC [chaincode.externalbuilder] func1 -> DEBU 0bc Adding file '/var/hyperledger/production/externalbuilder/builds/fabcar_2-61d813c1700f156bb3b02e8bb16ae605cb15112eb075edeb1d1df36980fd11e1/release' to tar with header name 'META-INF/'
Solves image version problems like #6
Instead of hard coding builder image versions in k8scc.yaml
, we should use the same substitution mechanism as in core.yaml
to set the image version according to the peer version.
Example from core.yaml
:
$(DOCKER_NS)/fabric-ccenv:$(TWO_DIGIT_VERSION)
Something like this, but at runtime. We may need to start the peer binary in order to get the version. And maybe we can also process the core.yaml
and remove the image versions from the k8scc.yaml
.
Function streamPodLogs
should stream the logs while the pod is running. Currently it streams the logs of the pod only when it's finished.
We noticed that it's currently not possible to use CouchDB-Indexes that are located in META-INF
in the chaincode package.
After analysing the output of the chaincode builder I saw that the /var/hyperledger/production/externalbuilder/builds/{chaincode-build-name-with-hash}/release
folder is empty.
But according to the doc (https://hyperledger-fabric.readthedocs.io/en/release-2.2/cc_launcher.html#bin-release) it should contain the statedb/couchdb/indexes/
structure copied from the META-INF
folder in the chaincode package.
So I think there is probably a little bug in the release.go file that we have to fix.
Hi! ๐
First of, thanks for the awesome external builder!
It's not an issue exactly, but more like some enhancement proposal. Since now the builder is creating a single pod, would it make sense to make it a deployment or at least a replica set? In that way the chaincode has at least some restart policies in case of node failing.
When running the demo, network.sh up
, I've been getting handshake errors on the host from the peer
and orderer
Peer0:
2021-10-06 20:51:38.521 UTC [core.comm] ServerHandshake -> ERRO 44a TLS handshake failed with error EOF server=PeerServer remoteaddress=10.3.2.25:55306
2021-10-06 20:51:38.521 UTC [grpc] Warningf -> DEBU 44b grpc: Server.Serve failed to complete security handshake from "10.3.2.25:55306": EOF
2021-10-06 20:51:38.713 UTC [gossip.channel] publishStateInfo -> DEBU 44c Empty membership, no one to publish state info to
2021-10-06 20:51:39.778 UTC [gossip.election] waitForInterrupt -> DEBU 44d d28ac30ece53d355648c15ffcaffb8d494f513a7ef94538ba9868111670a4252 : Exiting
2021-10-06 20:51:39.778 UTC [gossip.election] IsLeader -> DEBU 44e d28ac30ece53d355648c15ffcaffb8d494f513a7ef94538ba9868111670a4252 : Returning true
2021-10-06 20:51:39.779 UTC [gossip.election] waitForInterrupt -> DEBU 44f d28ac30ece53d355648c15ffcaffb8d494f513a7ef94538ba9868111670a4252 : Entering
2021-10-06 20:51:40.467 UTC [gossip.discovery] InitiateSync -> DEBU 450 No peers to send to, aborting membership sync
2021-10-06 20:51:42.523 UTC [gossip.discovery] periodicalSendAlive -> DEBU 451 Empty membership, no one to send a heartbeat to
2021-10-06 20:51:42.523 UTC [gossip.discovery] periodicalSendAlive -> DEBU 452 Sleeping 5s
2021-10-06 20:51:42.713 UTC [gossip.channel] publishStateInfo -> DEBU 453 Empty membership, no one to publish state info to
2021-10-06 20:51:43.521 UTC [core.comm] ServerHandshake -> ERRO 454 TLS handshake failed with error EOF server=PeerServer remoteaddress=10.3.2.25:55386
orderer:
2021-10-06 20:54:21.307 UTC [core.comm] ServerHandshake -> ERRO 9d9 TLS handshake failed with error EOF server=Orderer remoteaddress=10.3.2.25:49092
2021-10-06 20:54:21.307 UTC [grpc] Warningf -> DEBU 9da grpc: Server.Serve failed to complete security handshake from "10.3.2.25:49092": EOF
2021-10-06 20:54:21.470 UTC [orderer.consensus.etcdraft] Check -> DEBU 9db Current active nodes in cluster are: [1] channel=mychannel node=1
2021-10-06 20:54:22.891 UTC [orderer.consensus.etcdraft] Check -> DEBU 9dc Current active nodes in cluster are: [1] channel=system-channel node=1
2021-10-06 20:54:23.470 UTC [orderer.consensus.etcdraft] Check -> DEBU 9dd Current active nodes in cluster are: [1] channel=mychannel node=1
2021-10-06 20:54:24.891 UTC [orderer.consensus.etcdraft] Check -> DEBU 9de Current active nodes in cluster are: [1] channel=system-channel node=1
2021-10-06 20:54:25.470 UTC [orderer.consensus.etcdraft] Check -> DEBU 9df Current active nodes in cluster are: [1] channel=mychannel node=1
2021-10-06 20:54:26.891 UTC [orderer.consensus.etcdraft] Check -> DEBU 9e0 Current active nodes in cluster are: [1] channel=system-channel node=1
2021-10-06 20:54:27.470 UTC [orderer.consensus.etcdraft] Check -> DEBU 9e1 Current active nodes in cluster are: [1] channel=mychannel node=1
2021-10-06 20:54:28.892 UTC [orderer.consensus.etcdraft] Check -> DEBU 9e2 Current active nodes in cluster are: [1] channel=system-channel node=1
2021-10-06 20:54:29.470 UTC [orderer.consensus.etcdraft] Check -> DEBU 9e3 Current active nodes in cluster are: [1] channel=mychannel node=1
2021-10-06 20:54:30.891 UTC [orderer.consensus.etcdraft] Check -> DEBU 9e4 Current active nodes in cluster are: [1] channel=system-channel node=1
2021-10-06 20:54:31.312 UTC [core.comm] ServerHandshake -> ERRO 9e5 TLS handshake failed with error EOF server=Orderer remoteaddress=10.3.2.25:49266
2021-10-06 20:54:31.312 UTC [grpc] Warningf -> DEBU 9e6 grpc: Server.Serve failed to complete security handshake from "10.3.2.25:49266": EOF
10.3.2.25
is the kubernetes host IP.
Why am I getting this error? Any ideas
Handle process signals in order to collect garbage by executing the defers in build.go
and run.go
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.