Giter VIP home page Giter VIP logo

ibm / blockchain-network-on-kubernetes Goto Github PK

View Code? Open in Web Editor NEW
314.0 33.0 183.0 6.76 MB

Demonstrates the steps involved in setting up your business network on Hyperledger Fabric using Kubernetes APIs on IBM Cloud Kubernetes Service.

Home Page: https://developer.ibm.com/patterns/deploy-hyperledger-fabric-network-on-ibm-cloud/

License: Apache License 2.0

Shell 76.70% Go 23.30%
blockchain blockchain-network blockchain-platform kubernetes-cluster kubernetes containers cloud hyperledger-fabric hyperledger-fabric-network

blockchain-network-on-kubernetes's Introduction

Deploy Hyperledger Fabric network on IBM Cloud

Set up your business network using Kubernetes APIs on IBM Cloud Container Service

Read this in other languages: 한국어.

Blockchain is a shared, immutable ledger for recording the history of transactions. The Linux Foundation’s Hyperledger Fabric, the software implementation of blockchain IBM is committed to, is a permissioned network. For developing any blockchain use-case, the very first thing is to have a development environment for Hyperledger Fabric to create and deploy the application. Hyperledger Fabric network can be setup in multiple ways.

This code pattern demonstrates the steps involved in setting up your business network on Hyperledger Fabric using Kubernetes APIs on IBM Cloud Kubernetes Service.

Hosting the Hyperledger Fabric network on IBM Cloud provides you many benefits like multiple users can work on the same setup, the setup can be used for different blockchain applications, the setup can be reused and so on. Please note that the blockchain network setup on Kubernetes is good to use for demo scenarios but for production, it is recommended to use IBM Blockchain Platform hosted on IBM Cloud.

Kubernetes Cluster

IBM Cloud Kubernetes Service allows you to create a free cluster that comes with 2 CPUs, 4 GB memory, and 1 worker node. It allows you to get familiar with and test Kubernetes capabilities. However they lack capabilities like persistent NFS file-based storage with volumes.

To setup your cluster for maximum availability and capacity, IBM Cloud allows you to create a fully customizable, production-ready cluster called standard cluster. Standard clusters allow highly available cluster configurations such as a setup with two clusters that run in different regions, each with multiple worker nodes. Please see https://cloud.ibm.com/docs/containers?topic=containers-cs_ov#cluster_types to review other options for highly available cluster configurations.

This pattern uses a free cluster provided by IBM Cloud and it can be used for proof-of-concept purpose. This pattern provides you the scripts to automate the process for setting up Hyperledger Fabric network using Kubernetes APIs on IBM Cloud.

When the reader has completed this pattern, they will understand how to:

  • modify configuration files according to their network topology
  • deploy the hyperledger fabric network on Kubernetes cluster

Flow

  1. Log in to IBM Cloud CLI and initialize IBM Cloud Kubernetes Service plugin.
  2. Set context for Kubernetes cluster using CLI and download Kubernetes configuration files. After downloading configuration files, set KUBECONFIG environment variable.
  3. Run script to deploy your hyperledger fabric network on Kubernetes cluster.
  4. Access Kubernetes dashboard.

Included components

  • Hyperledger Fabric: Hyperledger Fabric is a platform for distributed ledger solutions underpinned by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility and scalability.

  • IBM Cloud Kubernetes Service: IBM Kubernetes Service enables the orchestration of intelligent scheduling, self-healing, and horizontal scaling.

Featured technologies

  • Blockchain: A blockchain is a digitized, decentralized, public ledger of all transactions in a network.

  • Kubernetes Cluster: In Kubernetes Engine, a container cluster consists of at least one cluster master and multiple worker machines called nodes. A container cluster is the foundation of Kubernetes Engine.

Watch the Video

Kubernetes Concepts Used

  • Kubernetes Pods - Pods represent the smallest deployable units in a Kubernetes cluster and are used to group containers that must be treated as a single unit.
  • Kubernetes Jobs - A job creates one or more pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the job tracks the successful completions.
  • Kubernetes Deployment - A deployment is a Kubernetes resource where you specify your containers and other Kubernetes resources that are required to run your app, such as persistent storage, services, or annotations.
  • Kubernetes Services - A Kubernetes service groups a set of pods and provides network connection to these pods for other services in the cluster without exposing the actual private IP address of each pod.
  • Kubernetes Persistent Volumes (PV) - PersistentVolumes are a way for users to claim durable storage such as NFS file storage.

Prerequisites

Steps

Follow these steps to setup and run this code pattern.

  1. Create a Kubernetes Cluster on IBM Cloud
  2. Setting up CLIs
  3. Gain access to your Kubernetes Cluster
  4. Deploy Hyperledger Fabric Network into Kubernetes Cluster
  5. Test the deployed network
  6. View the Kubernetes Dashboard
  7. Connect the network using client SDK

1. Create a Kubernetes Cluster on IBM Cloud

  • Create a Kubernetes cluster with IBM Cloud Kubernetes Service using GUI. This pattern uses the free cluster.

    Note: It can take up to 15 minutes for the cluster to be set up and provisioned.

2. Setting up CLIs

  • Install IBM Cloud CLI. The prefix for running commands by using the Bluemix CLI is ibmcloud.

  • Install Kubernetes CLI. The prefix for running commands by using the Kubernetes CLI is kubectl.

  • Install the kubernetes service plugin using the following command ibmcloud plugin install container-service -r Bluemix

3. Gain access to your Kubernetes Cluster

Access the IBM Cloud Dashboard. Choose the same cloud foundry org and cloud foundry space where cluster is created.

  • Check the status of your cluster IBM Cloud Dashboard -> <your cluster> -> Worker Nodes. If status is not normal, then you need to wait for some more time to proceed further.

  • Once your cluster is ready, open the access tab IBM Cloud Dashboard -> <your cluster> -> Access as shown in snapshot.

  • Perform the steps provided under the section Gain access to your cluster.

  • Verify that the kubectl commands run properly with your cluster by checking the Kubernetes CLI server version.

    $ kubectl version  --short
    Client Version: v1.14.6
    Server Version: v1.16.8+IKS
    

4. Deploy Hyperledger Fabric Network into Kubernetes Cluster

Understand the network topology

This pattern provides a script which automatically provisions a sample Hyperledger Fabric network consisting of four organizations, each maintaining one peer node, and a 'solo' ordering service. Also, the script creates a channel named as channel1, joins all peers to the channel channel1, install chaincode on all peers and instantiate chaincode on channel. The pattern also helps to drive execution of transactions against the deployed chaincode.

Copy Kubernetes configuration scripts

Clone or download the Kubernetes configuration scripts to your user home directory.

$ git clone https://github.com/IBM/blockchain-network-on-kubernetes

Navigate to the source directory

$ cd blockchain-network-on-kubernetes
$ ls

In the source directory,

  • configFiles contains Kubernetes configuration files
  • artifacts contains the network configuration files
  • *.sh scripts to deploy and delete the network

Modify the Kubernetes configuration scripts

If there is any change in network topology, need to modify the configuration files (.yaml files) appropriately. The configuration files are located in artifacts and configFiles directory. For example, if you decide to increase/decrease the capacity of persistent volume then you need to modify createVolume.yaml.

The Kubernetes Server version v1.11.x or above uses containerd as its container runtime therefore using docker.sock of the worker node is not possible. You need to deploy and use a Docker daemon in a container. In case, your Kubernetes server version is smaller than 1.11.x then you need to modify the configFiles/peersDeployment.yaml file to point to a Docker service. Change instances of tcp://docker:2375 to unix:///host/var/run/docker.sock with a text editor.

Run the script to deploy your Hyperledger Fabric Network

Once you have completed the changes (if any) in configuration files, you are ready to deploy your network.

Check your kubectl CLI version as:

$ kubectl version --short

This command will give you Client Version and Server Version. If the Client version > v1.11.x i.e. 1.12.x or more then use setup_blockchainNetwork_v2.sh to set up the network. Run the following command:

cp setup_blockchainNetwork_v2.sh setup_blockchainNetwork.sh

If the Client version <= v1.11.x then use setup_blockchainNetwork_v1.sh to setup the network. Copy the script as shown.

cp setup_blockchainNetwork_v1.sh setup_blockchainNetwork.sh

Now execute the script to deploy your hyperledger fabric network.

$ chmod +x setup_blockchainNetwork.sh
$ ./setup_blockchainNetwork.sh

If you are using a Standard IKS cluster with multiple workers nodes, do ./setup_blockchainNetwork.sh --paid so that the shared volume of the blockchain containers would work properly.

Note: Before running the script, please check your environment. You should able to run kubectl commands properly with your cluster as explained in step 3.

Delete the network

If required, you can bring your hyperledger fabric network down using the script deleteNetwork.sh. This script will delete all your pods, jobs, deployments etc. from your Kubernetes cluster.

$ chmod +x deleteNetwork.sh
$ ./deleteNetwork.sh

5. Test the deployed network

After successful execution of the script setup_blockchainNetwork.sh, check the status of pods.

$ kubectl get pods
NAME                                    READY     STATUS    RESTARTS   AGE
blockchain-ca-7848c48d64-2cxr5          1/1       Running   0          4m
blockchain-orderer-596ccc458f-thdgn     1/1       Running   0          4m
blockchain-org1peer1-747d6bdff4-4kzts   1/1       Running   0          4m
blockchain-org2peer1-7794d9b8c5-sn2qf   1/1       Running   0          4m
blockchain-org3peer1-59b6d99c45-dhtbp   1/1       Running   0          4m
blockchain-org4peer1-6b6c99c45-wz9wm    1/1       Running   0          4m

As mentioned above, the script joins all peers on one channel channel1, install chaincode on all peers and instantiate chaincode on channel. It means we can execute an invoke/query command on any peer and the response should be same on all peers. Please note that in this pattern tls certs are disabled to avoid complexity. In this pattern, the CLI commands are used to test the network. For running a query against any peer, need to get into a bash shell of a peer, run the query and exit from the peer container.

Use the following command to get into a bash shell of a peer:

$ kubectl exec -it <blockchain-org1peer1 pod name> bash

And the command to be used to exit from the peer container is:

# exit

Note: Stay logged into your peer to complete these commands.

Query

Chaincode was instantiated with the values as { a: 100, b: 200 }. Let’s query to org1peer1 for the value of a to make sure the chaincode was properly instantiated.

peer chaincode query -C channel1 -n cc -c '{"Args":["query","a"]}'

Invoke

Now let’s submit a request to org2peer1 to move 20 from a to b. A new transaction will be generated and upon successful completion of transaction, state will get updated.

peer chaincode invoke -o blockchain-orderer:31010 -C channel1 -n cc -c '{"Args":["invoke","a","b","20"]}'

Query

Let’s confirm that our previous invocation executed properly. We initialized the key a with a value of 100 and just removed 20 with our previous invocation. Therefore, a query against a should show 80 and a query against b should show 220. Now issue the query request to org3peer1 and org4peer1 as shown.

peer chaincode query -C channel1 -n cc -c '{"Args":["query","a"]}'
peer chaincode query -C channel1 -n cc -c '{"Args":["query","b"]}'

6. View the Kubernetes Dashboard

Go to the IBM Cloud dashboard -> Clusters -> <Your Kubernetes cluster>

Click on the button entitled Kubernetes Dashboard,

you will see the dashboard as shown.

The hyperledger fabric network is ready to use. You can start developing your blockchain applications using node sdk for this deployed network.

7. Connect the network using client SDK

To develop your blockchain application on this deployed network, you need to connect to this network using client SDK. To connect to the network:

  • Get the public IP of your kubernetes cluster from IBM Cloud Dashboard.
  • Connect using this public IP and the ports exposed using services. For example: The node port for CA is 30054 hence CA Client url will be http://< public IP of your cluster >:30054/

In this way, the CA client using node SDK can be created as:

fabric_ca_client = new Fabric_CA_Client('http://< public IP of your cluster >:30054/', tlsOptions , 'CA1', crypto_suite);

Similarly the following code can be used to setup the fabric network.

// setup the fabric network
var fabric_client = new Fabric_Client();

var channel = fabric_client.newChannel('channel1');
var peer = fabric_client.newPeer('grpc://< public IP of your cluster >:30110');
channel.addPeer(peer);
var order = fabric_client.newOrderer('grpc://< public IP of your cluster >:31010')
channel.addOrderer(order);

Troubleshooting

See DEBUGGING.md.

Reference Links

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

blockchain-network-on-kubernetes's People

Contributors

anthonyamanse avatar dolph avatar erjanmx avatar hisunah avatar imgbotapp avatar kant avatar ljbennett62 avatar maheshwarishikha avatar mirrdhyn avatar shikhamahe avatar stevemart avatar vksuktha avatar wwalisa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockchain-network-on-kubernetes's Issues

createchannel pod Error reading configuration Unsupported Config Type ""

Please check this issue during deployment

Similar issue found: https://jira.hyperledger.org/browse/FAB-15582 and refers to variable FABRIC_CFG_PATH

How deployment performed:
cp setup_blockchainNetwork_v2.sh setup_blockchainNetwork.sh

./setup_blockchainNetwork.sh

Deployment ends with error

...
...
Waiting for createchannel job to be completed
Waiting for createchannel job to be completed
Waiting for createchannel job to be completed
Waiting for createchannel job to be completed
Create Channel Failed

K8s version

k version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:13:54Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.6+IKS", GitCommit:"44b769243cf9b3fe09c1105a4a8749e8ff5f4ba8", GitTreeState:"clean", BuildDate:"2019-08-21T12:48:49Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

PODs status

kubectl get pods                                                    ltop: Fri Sep 27 17:02:13 2019

NAME                                    READY   STATUS      RESTARTS   AGE
blockchain-ca-886988b8b-rxlfz           1/1     Running     0          4m50s
blockchain-orderer-6db47d79c5-mjkhc     1/1     Running     0          4m50s
blockchain-org1peer1-66d79b769c-s922r   1/1     Running     0          4m49s
blockchain-org2peer1-64c85fd696-tfdm5   1/1     Running     0          4m49s
blockchain-org3peer1-75f44fcbcb-wdg8c   1/1     Running     0          4m49s
blockchain-org4peer1-5fbc796dfb-pd4qz   1/1     Running     0          4m49s
copyartifacts-n9sw9                     0/1     Completed   0          5m19s
createchannel-x2hh7                     1/2     Error       0          4m30s
docker-dind-6d74f44c75-84xtt            1/1     Running     0          5m31s
utils-56fd4                             0/2     Completed   0          4m57s

Error:

k logs -f createchannel-p7fwx createchanneltx 
/shared
bootstrap
keepalived
systemd-private-b1e7ce2665e74f0ba199a5978a3e93de-ntp.service-bZ8Odk
systemd-private-b1e7ce2665e74f0ba199a5978a3e93de-systemd-resolved.service-5oUCv1
2019-09-27 15:29:53.338 UTC [common.tools.configtxgen] main -> INFO 001 Loading configuration
2019-09-27 15:29:53.338 UTC [common.tools.configtxgen.localconfig] Load -> PANI 002 Error reading configuration:  Unsupported Config Type ""
2019-09-27 15:29:53.338 UTC [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 ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00011bc30, 0x0, 0x0, 0x0)
	/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000ac240, 0xc0001a3804, 0xc0000f0d00, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc0000ac240, 0xc0000f0d00, 0x38, 0x0, 0x0, 0x0)
	/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc0000ac248, 0xc0001a3908, 0x1, 0x1)
	/opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75
main.main.func1()
	/opt/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:260 +0x1a9
panic(0xd62c40, 0xc00009f9c0)
	/opt/go/src/runtime/panic.go:513 +0x1b9
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00011bc30, 0x0, 0x0, 0x0)
	/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000ac220, 0xc0001a3c04, 0xc0000f0c00, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc0000ac220, 0xc0000f0c00, 0x38, 0x0, 0x0, 0x0)
	/opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc0000ac228, 0xc0001a3d88, 0x2, 0x2)
	/opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7ffe691e4f6b, 0xf, 0x0, 0x0, 0x0, 0xc00018b9e0)
	/opt/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:276 +0x41f
main.main()
	/opt/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:271 +0xce0

peer chaincode query -C channel1 -n cc -c '{"Args":["query","a"]}'^C
...
...
2019-09-27 14:00:21.689 UTC [msp] Validate -> DEBU 035 MSP Org1MSP validating identity
2019-09-27 14:00:21.690 UTC [grpc] DialContext -> DEBU 036 parsed scheme: ""
2019-09-27 14:00:21.690 UTC [grpc] DialContext -> DEBU 037 scheme "" not registered, fallback to default scheme
2019-09-27 14:00:21.690 UTC [grpc] watcher -> DEBU 038 ccResolverWrapper: sending new addresses to cc: [{blockchain-org1peer1:30110 0  <nil>}]
2019-09-27 14:00:21.690 UTC [grpc] switchBalancer -> DEBU 039 ClientConn switching balancer to "pick_first"
2019-09-27 14:00:21.690 UTC [grpc] HandleSubConnStateChange -> DEBU 03a pickfirstBalancer: HandleSubConnStateChange: 0xc0003f2630, CONNECTING
2019-09-27 14:00:21.695 UTC [grpc] HandleSubConnStateChange -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc0003f2630, READY
2019-09-27 14:00:21.695 UTC [grpc] DialContext -> DEBU 03c parsed scheme: ""
2019-09-27 14:00:21.695 UTC [grpc] DialContext -> DEBU 03d scheme "" not registered, fallback to default scheme
2019-09-27 14:00:21.696 UTC [grpc] watcher -> DEBU 03e ccResolverWrapper: sending new addresses to cc: [{blockchain-org1peer1:30110 0  <nil>}]
2019-09-27 14:00:21.696 UTC [grpc] switchBalancer -> DEBU 03f ClientConn switching balancer to "pick_first"
2019-09-27 14:00:21.696 UTC [grpc] HandleSubConnStateChange -> DEBU 040 pickfirstBalancer: HandleSubConnStateChange: 0xc000455eb0, CONNECTING
2019-09-27 14:00:21.700 UTC [grpc] HandleSubConnStateChange -> DEBU 041 pickfirstBalancer: HandleSubConnStateChange: 0xc000455eb0, READY
2019-09-27 14:00:21.704 UTC [msp] GetDefaultSigningIdentity -> DEBU 042 Obtaining default signing identity
2019-09-27 14:00:21.705 UTC [msp.identity] Sign -> DEBU 043 Sign: plaintext: 0AA4070A6408031A0C08F5ABB8EC0510...120263631A0A0A0571756572790A0161 
2019-09-27 14:00:21.705 UTC [msp.identity] Sign -> DEBU 044 Sign: digest: CE7327A88C6BEF47C34483617ACF351E9BFAE295DB3D70F744B71EFD8A670D0F 
Error: error endorsing query: rpc error: code = Unknown desc = access denied: channel [channel1] creator org [Org1MSP] - proposal response: <nil>

composer

so how can i connect the pod with hyper composer(i have so enter all pod for get ca and write connection.yaml for it ?) and exposer api rest ? so can u add a connection.yaml for this repo?

Namespaces

I'd like the option to deploy into a separate namespace on the kube I am using. PR coming momentarily.

Initantiate chaincode error with k8s-1.15.0 and fabric-1.4.1

I use k8s-1.15.0 to depoy fabric-1.4.1 with raft mode,all pods status is ok. When I run fabric-samples/first-network/scripts/script.sh in org1 cli container,instantiate chaincode on peer0.org2 error:【 could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 0

FYI:
all pods status:

allPods

cli logs:

cliLog

peer0.org2 logs and env:

peerLog

orderer logs and env:

ordererLog

But on single machine with similar config, I use docker-compose or k8s, no errors occurred
pls, give me some suggestions

Panic: runtime error: invalid memory address or nil pointer dereference while setting up fabric env

Hi Team,

While setting up the Fabric Env. on Kubernetes.

Cryptogen Starts
total 20
drwxr-xr-x. 3 1001 99 4096 Nov 3 12:55 chaincode
-rw-r--r--. 1 1001 99 7827 Nov 3 12:45 configtx.yaml
-rw-r--r--. 1 1001 99 4433 Nov 3 12:44 crypto-config.yaml
org1.main.tcloud.kpn.org
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6a2280]

Can you please guide here.

Error in Update Chaincode

hello
i am try to change chaincode and try to make sum updated but it will install everything look good and fine but when i query the older chaincode will response no new function where visible

Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: cannot connect to Docker endpoint

running in IBM container cloud ,
getting :
error on the chaincodeinstantiate pods:

kubectl get pods
NAME READY STATUS RESTARTS AGE
blockchain-ca-645b8f67fc-jrg5n 1/1 Running 0 48m
blockchain-orderer-b5679c968-dvm4f 1/1 Running 0 48m
blockchain-org1peer1-54c689bbd5-kqbqm 1/1 Running 0 48m
blockchain-org2peer1-7768db4f98-qnfhd 1/1 Running 0 48m
blockchain-org3peer1-56ff98b9d6-t4shb 1/1 Running 0 48m
blockchain-org4peer1-7cf44cb7bb-9flzk 1/1 Running 0 48m
chaincodeinstall-tn74d 0/4 Completed 0 48m
chaincodeinstantiate-gqlcr 0/1 Error 0 23m
chaincodeinstantiate-vmz2x 0/1 Error 0 23m
copyartifacts-fg9ql 0/1 Completed 0 53m
createchannel-jnbmb 0/2 Completed 0 48m
joinchannel-d4pjn 0/4 Completed 0 48m
utils-w5fnq 0/2 Completed 0 51m

kubectl logs chaincodeinstantiate-gqlcr
2018-11-14 19:47:34.091 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-11-14 19:47:34.092 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: cannot connect to Docker endpoint

Failed to evaluate transaction: FabricError: No peers available to query. Errors: []

I've ran setup_blockchainNetwork_v2.sh, installed, queried, invoked fabcar chaincode succesfully within peer bash sheel. I've received admin and user identities via 'fabric-ca-client' using enrolAdmin.js and registerUser.js .
I'm using IBM free kubernetes cluster, Hyperledger Fabric 1.4 and following Hyperledger Fabcar tutorial steps.

But when I ran query.js I've got the following error

error: [SingleQueryHandler]: evaluate: message=No peers available to query. Errors: [], stack=FabricError: No peers available to query. Errors: [] at SingleQueryHandler.evaluate (/home/ubuntu/Fabric-Ex/fabcar/javascript/node_modules/fabric-network/lib/impl/query/singlequeryhandler.js:44:17) at Transaction.evaluate (/home/ubuntu/Fabric-Ex/fabcar/javascript/node_modules/fabric-network/lib/transaction.js:323:29) at Contract.evaluateTransaction (/home/ubuntu/Fabric-Ex/fabcar/javascript/node_modules/fabric-network/lib/contract.js:173:39) at main (/home/ubuntu/Fabric-Ex/fabcar/javascript/query.js:41:39) at <anonymous>, name=FabricError Failed to evaluate transaction: FabricError: No peers available to query. Errors: []

Connection profile as follows
`

"name": "channel1",
"version": "1.0.0",
"client": {
    "organization": "Org1MSP"      
},
"organizations": {
    "Org1MSP": {
        "mspid": "Org1MSP",
        "peers": [
            "org1peer1",
            "org2peer1"                           
        ],
        "certificateAuthorities": [
            "ca"
        ]           
    }
},
"orderers": {
    "orderer": {
        "url":"grpc://184.172.233.104:31010"
    }
},
"peers": {
    "org1peer1": {
        "url": "grpc://184.172.233.104:30110"
      
    },
    "org2peer1": {
        "url": "grpc://184.172.233.104:30210"
    }
},
"certificateAuthorities": {
    "ca": {
        "url": "http://184.172.233.104:30054",
        "caName": "CA1"           
    }
}

`
Please let me know if you have any ideas how to fix this issue.

Where can I find public IP of my kubernets cluster account

I've completed the first 6 steps of documentation without any error. Could you please help me in completing the 7th step as I'm unable to find the public IP of my kubernetes cluster and please let me know where the piece of code at the end of step-7 is supposed to be. Thankyou.

failed to execute transaction: timeout expired while executing transaction

I try to run this project by using minikube.

I just have made my minikube cluster, and I ran the codes line by line.

when ./setup_blockchainNetwork.sh start to join channel.

It just comes out Waiting for chaincodeinstantiatejob to be completed in terminal like infinite loop.

and I enter minikube dashboard and I found Job categories, my 'joinchannel' job doesn't work well.

log is written like Error: Error endorsing chaincode: rpc error: code = Unknown desc = failed to execute transaction: timeout expired while executing transaction.

How can I solve my issues? does anyone know about it?

+ peer lifecycle chaincode approveformyorg -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /home/piyush/go/src/github.com/blockchain/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --channelID mychannel --name basic --version 1.0.1 --package-id basic_1.0.1:64eec36e606e7179bda8fd53f5b296e4675b3bb10dcf9a3dfc78e43346aa3eb5 --sequence 1 + res=1 Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to redefine uncommitted sequence (1) for namespace basic with unchanged content Chaincode definition approved on peer0.org1 on channel 'mychannel' failed Deploying chaincode failed

  • peer lifecycle chaincode approveformyorg -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile /home/piyush/go/src/github.com/blockchain/fabric-samples/test-network/organizations/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem --channelID mychannel --name basic --version 1.0.1 --package-id basic_1.0.1:64eec36e606e7179bda8fd53f5b296e4675b3bb10dcf9a3dfc78e43346aa3eb5 --sequence 1
  • res=1
    Error: proposal failed with status: 500 - failed to invoke backing implementation of 'ApproveChaincodeDefinitionForMyOrg': attempted to redefine uncommitted sequence (1) for namespace basic with unchanged content
    Chaincode definition approved on peer0.org1 on channel 'mychannel' failed
    Deploying chaincode failed

Error: error getting endorser client for query: endorser client failed to connect to blockchain-org1peer1:30110: failed to create new connection: context deadline exceeded

@maheshwarishikha - Hi, I hava the same problem #63. Thanks.

# ./setup_blockchainNetwork_v2.sh

system info

# cat /etc/issue

Ubuntu 16.04.6 LTS

k8s info

 # kubectl version  --short

Client Version: v1.18.2
Server Version: v1.18.2

pods info

# kubectl get pods
NAME                                    READY   STATUS      RESTARTS   AGE
blockchain-ca-65c9975447-g5lnc          1/1     Running     0          90m
blockchain-orderer-6bd99d866b-rmgf5     1/1     Running     0          90m
blockchain-org1peer1-597f6cb7b8-4bhhg   1/1     Running     0          90m
blockchain-org2peer1-5bdf556465-jm984   1/1     Running     0          90m
blockchain-org3peer1-5878fbdb5f-x6nzr   1/1     Running     0          90m
blockchain-org4peer1-6869bc469c-277s8   1/1     Running     0          90m
chaincodeinstall-fsffh                  0/4     Completed   0          86m
chaincodeinstantiate-gh2j2              0/1     Completed   0          83m
copyartifacts-rp8zc                     0/1     Completed   0          92m
createchannel-tjttw                     0/2     Completed   0          89m
docker-dind-86f654dbdf-vvmwk            1/1     Running     0          92m
joinchannel-txz9f                       0/4     Completed   0          88m
utils-62fs8                             0/2     Completed   0          91m

orderer error log

# kubectl logs  blockchain-orderer-6bd99d866b-rmgf5
2020-05-03 15:41:22.375 UTC [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
2020-05-03 15:41:22.386 UTC [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:
	General.LedgerType = "file"
	General.ListenAddress = "0.0.0.0"
	General.ListenPort = 31010
	General.TLS.Enabled = false
	General.TLS.PrivateKey = "/etc/hyperledger/fabric/tls/server.key"
	General.TLS.Certificate = "/etc/hyperledger/fabric/tls/server.crt"
	General.TLS.RootCAs = [/etc/hyperledger/fabric/tls/ca.crt]
	General.TLS.ClientAuthRequired = false
	General.TLS.ClientRootCAs = []
	General.Cluster.ListenAddress = ""
	General.Cluster.ListenPort = 0
	General.Cluster.ServerCertificate = ""
	General.Cluster.ServerPrivateKey = ""
	General.Cluster.ClientCertificate = ""
	General.Cluster.ClientPrivateKey = ""
	General.Cluster.RootCAs = []
	General.Cluster.DialTimeout = 5s
	General.Cluster.RPCTimeout = 7s
	General.Cluster.ReplicationBufferSize = 20971520
	General.Cluster.ReplicationPullTimeout = 5s
	General.Cluster.ReplicationRetryTimeout = 5s
	General.Cluster.ReplicationBackgroundRefreshInterval = 5m0s
	General.Cluster.ReplicationMaxRetries = 12
	General.Cluster.SendBufferSize = 10
	General.Cluster.CertExpirationWarningThreshold = 168h0m0s
	General.Cluster.TLSHandshakeTimeShift = 0s
	General.Keepalive.ServerMinInterval = 1m0s
	General.Keepalive.ServerInterval = 2h0m0s
	General.Keepalive.ServerTimeout = 20s
	General.ConnectionTimeout = 0s
	General.GenesisMethod = "file"
	General.GenesisProfile = "initial"
	General.SystemChannel = "test-system-channel-name"
	General.GenesisFile = "/shared/genesis.block"
	General.Profile.Enabled = false
	General.Profile.Address = "0.0.0.0:6060"
	General.LocalMSPDir = "/shared/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp"
	General.LocalMSPID = "OrdererMSP"
	General.BCCSP.ProviderName = "SW"
	General.BCCSP.SwOpts.SecLevel = 256
	General.BCCSP.SwOpts.HashFamily = "SHA2"
	General.BCCSP.SwOpts.Ephemeral = false
	General.BCCSP.SwOpts.FileKeystore.KeyStorePath = "/shared/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore"
	General.BCCSP.SwOpts.DummyKeystore =
	General.BCCSP.SwOpts.InmemKeystore =
	General.BCCSP.PluginOpts =
	General.Authentication.TimeWindow = 15m0s
	General.Authentication.NoExpirationChecks = false
	FileLedger.Location = "/shared/ledger/orderer"
	FileLedger.Prefix = "hyperledger-fabric-ordererledger"
	RAMLedger.HistorySize = 1000
	Kafka.Retry.ShortInterval = 5s
	Kafka.Retry.ShortTotal = 10m0s
	Kafka.Retry.LongInterval = 5m0s
	Kafka.Retry.LongTotal = 12h0m0s
	Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
	Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
	Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
	Kafka.Retry.Metadata.RetryMax = 3
	Kafka.Retry.Metadata.RetryBackoff = 250ms
	Kafka.Retry.Producer.RetryMax = 3
	Kafka.Retry.Producer.RetryBackoff = 100ms
	Kafka.Retry.Consumer.RetryBackoff = 2s
	Kafka.Verbose = false
	Kafka.Version = 0.10.2.0
	Kafka.TLS.Enabled = false
	Kafka.TLS.PrivateKey = ""
	Kafka.TLS.Certificate = ""
	Kafka.TLS.RootCAs = []
	Kafka.TLS.ClientAuthRequired = false
	Kafka.TLS.ClientRootCAs = []
	Kafka.SASLPlain.Enabled = false
	Kafka.SASLPlain.User = ""
	Kafka.SASLPlain.Password = ""
	Kafka.Topic.ReplicationFactor = 3
	Debug.BroadcastTraceDir = ""
	Debug.DeliverTraceDir = ""
	Consensus = map[SnapDir:/var/hyperledger/production/orderer/etcdraft/snapshot WALDir:/var/hyperledger/production/orderer/etcdraft/wal]
	Operations.ListenAddress = "127.0.0.1:8443"
	Operations.TLS.Enabled = false
	Operations.TLS.PrivateKey = ""
	Operations.TLS.Certificate = ""
	Operations.TLS.RootCAs = []
	Operations.TLS.ClientAuthRequired = false
	Operations.TLS.ClientRootCAs = []
	Metrics.Provider = "disabled"
	Metrics.Statsd.Network = "udp"
	Metrics.Statsd.Address = "127.0.0.1:8125"
	Metrics.Statsd.WriteInterval = 30s
	Metrics.Statsd.Prefix = ""
2020-05-03 15:41:22.403 UTC [orderer.common.server] extractSysChanLastConfig -> INFO 003 Bootstrapping because no existing channels
2020-05-03 15:41:22.409 UTC [fsblkstorage] newBlockfileMgr -> INFO 004 Getting block information from block storage
2020-05-03 15:41:22.434 UTC [orderer.commmon.multichannel] Initialize -> INFO 005 Starting system channel 'testchainid' with genesis block hash 3c989d872f20391a04651faa68e1c3d51d1a3d232f2889a7185a734a2b81be0a and orderer type solo
2020-05-03 15:41:22.434 UTC [orderer.common.server] Start -> INFO 006 Starting orderer:
 Version: 1.4.6
 Commit SHA: 635fa7bc8
 Go version: go1.12.12
 OS/Arch: linux/amd64
2020-05-03 15:41:22.434 UTC [orderer.common.server] Start -> INFO 007 Beginning to serve requests
2020-05-03 15:42:45.740 UTC [comm.grpc.server] 1 -> INFO 008 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=10.88.0.1:25079 grpc.code=OK grpc.call_duration=10.721732ms
2020-05-03 15:42:45.743 UTC [fsblkstorage] newBlockfileMgr -> INFO 009 Getting block information from block storage
2020-05-03 15:42:45.762 UTC [orderer.commmon.multichannel] newChain -> INFO 00a Created and starting new chain channel1
2020-05-03 15:42:45.770 UTC [comm.grpc.server] 1 -> INFO 00b streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=10.88.0.1:33828 grpc.code=OK grpc.call_duration=42.091946ms
2020-05-03 15:43:25.643 UTC [common.deliver] Handle -> WARN 00c Error reading from 10.88.0.1:38063: rpc error: code = Canceled desc = context canceled
2020-05-03 15:43:25.643 UTC [comm.grpc.server] 1 -> INFO 00d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=10.88.0.1:38063 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=4.784783ms
2020-05-03 15:44:02.965 UTC [common.deliver] Handle -> WARN 00e Error reading from 10.88.0.1:17772: rpc error: code = Canceled desc = context canceled
2020-05-03 15:44:02.965 UTC [comm.grpc.server] 1 -> INFO 00f streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=10.88.0.1:17772 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.627753ms
2020-05-03 15:44:39.009 UTC [common.deliver] Handle -> WARN 010 Error reading from 10.88.0.1:13906: rpc error: code = Canceled desc = context canceled
2020-05-03 15:44:39.009 UTC [comm.grpc.server] 1 -> INFO 011 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=10.88.0.1:13906 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=3.877903ms
2020-05-03 15:45:12.060 UTC [common.deliver] Handle -> WARN 012 Error reading from 10.88.0.1:11435: rpc error: code = Canceled desc = context canceled
2020-05-03 15:45:12.060 UTC [comm.grpc.server] 1 -> INFO 013 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Deliver grpc.peer_address=10.88.0.1:11435 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.891811ms
2020-05-03 15:48:23.694 UTC [orderer.common.broadcast] Handle -> WARN 014 Error reading from 10.88.0.1:28198: rpc error: code = Canceled desc = context canceled
2020-05-03 15:48:23.694 UTC [comm.grpc.server] 1 -> INFO 015 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=10.88.0.1:28198 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=656.821784ms

blockchain-org1peer1 error log

# kubectl exec -it blockchain-org1peer1-597f6cb7b8-4bhhg -- /bin/bash

# peer chaincode query -C channel1 -n cc -c '{"Args":["query","a"]}'
root@blockchain-org1peer1-597f6cb7b8-4bhhg:/#  peer chaincode query -C channel1 -n cc -c '{"Args":["query","a"]}'
2020-05-03 16:31:12.129 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2020-05-03 16:31:12.129 UTC [viperutil] unmarshalJSON -> DEBU 002 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-05-03 16:31:12.129 UTC [viperutil] getKeysRecursively -> DEBU 003 Found real value for peer.BCCSP.Default setting to string SW
2020-05-03 16:31:12.130 UTC [viperutil] getKeysRecursively -> DEBU 004 Found map[string]interface{} value for peer.BCCSP.SW
2020-05-03 16:31:12.130 UTC [viperutil] getKeysRecursively -> DEBU 005 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2020-05-03 16:31:12.130 UTC [viperutil] unmarshalJSON -> DEBU 006 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2020-05-03 16:31:12.130 UTC [viperutil] getKeysRecursively -> DEBU 007 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2020-05-03 16:31:12.130 UTC [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-05-03 16:31:12.130 UTC [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2020-05-03 16:31:12.130 UTC [viperutil] unmarshalJSON -> DEBU 00a Unmarshal JSON: value is not a string: 256
2020-05-03 16:31:12.130 UTC [viperutil] getKeysRecursively -> DEBU 00b Found real value for peer.BCCSP.SW.Security setting to int 256
2020-05-03 16:31:12.131 UTC [viperutil] getKeysRecursively -> DEBU 00c Found map[string]interface{} value for peer.BCCSP.PKCS11
2020-05-03 16:31:12.131 UTC [viperutil] getKeysRecursively -> DEBU 00d Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2020-05-03 16:31:12.131 UTC [viperutil] unmarshalJSON -> DEBU 00e Unmarshal JSON: value is not a string: <nil>
2020-05-03 16:31:12.131 UTC [viperutil] getKeysRecursively -> DEBU 00f Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2020-05-03 16:31:12.132 UTC [viperutil] unmarshalJSON -> DEBU 010 Unmarshal JSON: value is not a string: <nil>
2020-05-03 16:31:12.132 UTC [viperutil] getKeysRecursively -> DEBU 011 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2020-05-03 16:31:12.132 UTC [viperutil] unmarshalJSON -> DEBU 012 Unmarshal JSON: value is not a string: <nil>
2020-05-03 16:31:12.132 UTC [viperutil] getKeysRecursively -> DEBU 013 Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2020-05-03 16:31:12.132 UTC [viperutil] unmarshalJSON -> DEBU 014 Unmarshal JSON: value is not a string: <nil>
2020-05-03 16:31:12.133 UTC [viperutil] getKeysRecursively -> DEBU 015 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2020-05-03 16:31:12.133 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2020-05-03 16:31:12.133 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2020-05-03 16:31:12.133 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value is not a string: <nil>
2020-05-03 16:31:12.134 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2020-05-03 16:31:12.134 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[Default:SW PKCS11:map[FileKeyStore:map[KeyStore:<nil>] Hash:<nil> Label:<nil> Library:<nil> Pin:<nil> Security:<nil>] SW:map[FileKeyStore:map[KeyStore:] Hash:SHA2 Security:256]]]
2020-05-03 16:31:12.134 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore]...done
2020-05-03 16:31:12.134 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/[email protected]
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/intermediatecerts
2020-05-03 16:31:12.134 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/intermediatecerts]. Skipping. [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/intermediatecerts: no such file or directory]
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlsintermediatecerts
2020-05-03 16:31:12.134 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlsintermediatecerts]. Skipping. [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlsintermediatecerts: no such file or directory]
2020-05-03 16:31:12.134 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/crls
2020-05-03 16:31:12.135 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/crls]. Skipping. [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/crls: no such file or directory]
2020-05-03 16:31:12.135 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/config.yaml]: [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/config.yaml: no such file or directory]
2020-05-03 16:31:12.135 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2020-05-03 16:31:12.135 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2020-05-03 16:31:12.135 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2020-05-03 16:31:12.135 UTC [msp] Setup -> DEBU 02f Setting up MSP instance Org1MSP
2020-05-03 16:31:12.135 UTC [msp.identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICUTCCAfigAwIBAgIRAPgCz5f+hIaAfOjRDbeZHv8wCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjAwNTAzMTUzNTAwWhcNMzAwNTAxMTUzNTAw
WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE
AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
BNZg+CCkkBnVtenfH0sFxY+C236MjcWE8sMxdVgT8lktpaeAokX4SkdhhDJQ6CGx
e1qAxojJOQonvfjGUQzeaDGjbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU
BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg
p+JYggxgYeEm5Bjh3W+Zf5I0jV88jvZiFJgYkpE5ZkUwCgYIKoZIzj0EAwIDRwAw
RAIgdvnkA7MWIfEO15OC0MbodPXBjF1mhAOe1XAOFvTwMmoCIFdenvJfghRdzVZs
vfkNwzYPd2CyC988A6ANa8qr4w6f
-----END CERTIFICATE-----
2020-05-03 16:31:12.136 UTC [msp.identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICGjCCAcCgAwIBAgIRALN5CAYRoRK3vTNkWqnvYxswCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjAwNTAzMTUzNTAwWhcNMzAwNTAxMTUzNTAw
WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMS5leGFtcGxlLmNvbTBZ
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABNCYc4K9MRMjVi+5YfYF058bDh4FTg51
TyOg3UZdT6cFVSN8MGSZ9sYGnLmYfrIagkUNqH4vNX/FnB+uZdADNzKjTTBLMA4G
A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfiWIIMYGHh
JuQY4d1vmX+SNI1fPI72YhSYGJKROWZFMAoGCCqGSM49BAMCA0gAMEUCIQDrnfKp
9rIA9/AdEYc2OslZy7ZK4eZAMKaApjUEbYFdfAIgBVXsSXJUxrMXDYnmXHu0V++4
DWCf8ukaog2o+POne4o=
-----END CERTIFICATE-----
2020-05-03 16:31:12.136 UTC [msp.identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICGjCCAcCgAwIBAgIRALN5CAYRoRK3vTNkWqnvYxswCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjAwNTAzMTUzNTAwWhcNMzAwNTAxMTUzNTAw
WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMS5leGFtcGxlLmNvbTBZ
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABNCYc4K9MRMjVi+5YfYF058bDh4FTg51
TyOg3UZdT6cFVSN8MGSZ9sYGnLmYfrIagkUNqH4vNX/FnB+uZdADNzKjTTBLMA4G
A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfiWIIMYGHh
JuQY4d1vmX+SNI1fPI72YhSYGJKROWZFMAoGCCqGSM49BAMCA0gAMEUCIQDrnfKp
9rIA9/AdEYc2OslZy7ZK4eZAMKaApjUEbYFdfAIgBVXsSXJUxrMXDYnmXHu0V++4
DWCf8ukaog2o+POne4o=
-----END CERTIFICATE-----
2020-05-03 16:31:12.136 UTC [msp] setupSigningIdentity -> DEBU 033 Signing identity expires at 2030-05-01 15:35:00 +0000 UTC
2020-05-03 16:31:12.137 UTC [msp.identity] newIdentity -> DEBU 034 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICGjCCAcCgAwIBAgIRAKGoWQuOcqR9mo0GKeBok0gwCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjAwNTAzMTUzNTAwWhcNMzAwNTAxMTUzNTAw
WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABFs5LutL94bm2/ki0eVryPt4kWYrBdFt
QbfUPfL9xebUdpgg2jT8qjV667gdHjo70kNQ9s9PG5px1py5jkJs1QGjTTBLMA4G
A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfiWIIMYGHh
JuQY4d1vmX+SNI1fPI72YhSYGJKROWZFMAoGCCqGSM49BAMCA0gAMEUCIQCO7x2J
H3tPChia2D5RnEbgpFrD8y6gOBg0F7rb5GrkYQIgRkkeKWmC9C8WdOkjJFYpaX9J
ecdLVfbeGOjU/ifQBNQ=
-----END CERTIFICATE-----
2020-05-03 16:31:12.137 UTC [msp] Validate -> DEBU 035 MSP Org1MSP validating identity
2020-05-03 16:31:12.138 UTC [grpc] DialContext -> DEBU 036 parsed scheme: ""
2020-05-03 16:31:12.138 UTC [grpc] DialContext -> DEBU 037 scheme "" not registered, fallback to default scheme
2020-05-03 16:31:12.138 UTC [grpc] watcher -> DEBU 038 ccResolverWrapper: sending new addresses to cc: [{blockchain-org1peer1:30110 0  <nil>}]
2020-05-03 16:31:12.138 UTC [grpc] switchBalancer -> DEBU 039 ClientConn switching balancer to "pick_first"
2020-05-03 16:31:12.138 UTC [grpc] HandleSubConnStateChange -> DEBU 03a pickfirstBalancer: HandleSubConnStateChange: 0xc000231a10, CONNECTING
Error: error getting endorser client for query: endorser client failed to connect to blockchain-org1peer1:30110: failed to create new connection: context deadline exceeded

How to make copyartifact Pod run

While following the steps, I got this issue stating "Waiting for container of copy artifact pod to run. Current status of copyartifacts is Succeeded". Please suggest me the solution for this issue.
WhatsApp Image 2021-05-11 at 4 21 55 PM

could not launch chaincode 'ibcc:5d0e934e1c508fa8ebf14bacc51c47d92780284ceca7edc0788e3b6ce98d1795': chaincode registration failed: container exited with 0

peer logs
2021-03-29 06:08:28.712 UTC [endorser] SimulateProposal -> ERRO 048 failed to invoke chaincode ibcc, error: container exited with 0
github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1

when i invoke the transaction
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction 7c38e2f08ce510395540a94a3174fb7d6585f55a03e847dbc0188fbbe495d0e4: could not launch chaincode ibcc:5d0e934e1c508fa8ebf14bacc51c47d92780284ceca7edc0788e3b6ce98d1795: chaincode registration failed: container exited with 0"

chaincodeinstantiate error

Hi, when I run setup_blockchainNetwork_v2.sh,at last step , chaincodeinstantiate pod can't startup and occur some error :

�[34m2020-01-10 05:34:37.212 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001�[0m Using default escc
�[34m2020-01-10 05:34:37.212 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002�[0m Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: cannot connect to Docker endpoint

chaincode_instantiate faild

I can run setup_blockchainNetwork_v2.sh success,and in docker-dind I can find chaincode images.
docker
But in org1peer1,when I query chaincode,is error
cc
Thanks!

How to enable couch DB?

I have used this open source project to implement a blockchain network on Kubernetes. Could you please let me know how to enable couch DB for this network so that I can perform some rich Queries?

Not able to instantiate chaincode

Hello everybody,

NOTE: The network works perfectly all the way through my API interacting with a working network in docker-compose. The network seems to work perfectly with no errors up until attempting to instantiate the chaincode.

I've been trying to build a kubernetes cluster with hyperledger and everything works great except I can't seem to instantiate my chaincode. At first it was saying there wasn't a /var/run/docker.sock available so I added a docker container via your example and now I'm getting the following errors

Docker Container

time="2019-05-06T06:12:47.167226478Z" level=warning msg="Your kernel does not support swap limit capabilities,or the cgroup is not mounted. Memory limited without swap."
time="2019-05-06T06:13:01.521766588Z" level=info msg="Attempting next endpoint for pull after error: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524"
time="2019-05-06T06:13:02.803021651Z" level=info msg="Pull session cancelled"
time="2019-05-06T06:13:03.233898331Z" level=error msg="Not continuing with pull after error: context canceled"
time="2019-05-06T06:13:03.273022662Z" level=warning msg="could not write error response: write tcp 100.96.29.99:2375->100.96.24.40:52048: write: broken pipe"

Peer Container

2019-05-06 06:08:34.181 UTC [comm.grpc.server] 1 -> INFO 06c unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=100.96.29.104:39364 grpc.code=OK grpc.call_duration=14.250358185s
2019-05-06 06:12:47.083 UTC [endorser] callChaincode -> INFO 06d [mainchannel][ad343f9a] Entry chaincode: name:"lscc" 
2019-05-06 06:12:47.176 UTC [chaincode.platform.golang] GenerateDockerBuild -> INFO 06e building chaincode with ldflagsOpt: '-ldflags "-linkmode external -extldflags '-static'"'
2019-05-06 06:13:01.524 UTC [chaincode.platform] func1 -> ERRO 06f Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524
2019-05-06 06:13:01.524 UTC [dockercontroller] deployImage -> ERRO 070 Error building image: Post http://dev-docker:2375/build?t=dev-org1-peer0-assets-0-8c640fcda93c23e81c240e2f05a89be99b81bfc3bdcdb03dd0a0f40319242665: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524
2019-05-06 06:13:01.524 UTC [dockercontroller] deployImage -> ERRO 071 Build Output:
********************

********************
2019-05-06 06:13:01.538 UTC [endorser] callChaincode -> INFO 072 [mainchannel][ad343f9a] Exit chaincode: name:"lscc"  (14455ms)
2019-05-06 06:13:01.538 UTC [endorser] SimulateProposal -> ERRO 073 [mainchannel][ad343f9a] failed to invoke chaincode name:"lscc" , error: Post http://dev-docker:2375/build?t=dev-org1-peer0-assets-0-8c640fcda93c23e81c240e2f05a89be99b81bfc3bdcdb03dd0a0f40319242665: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524

Command line where I'm running the command

root@dev-cli-org1-peer0-deployment-fcb494b55-5wwrm:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -C mainchannel -n assets -v 0 -c '{"Args":[]}' -o dev-orderer0:7050 --tls --cafile=/etc/hyperledger/orderers/msp/tlscacerts/localhost-7300.pem
2019-05-06 06:12:47.080 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-05-06 06:12:47.080 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Post http://dev-docker:2375/build?t=dev-org1-peer0-assets-0-8c640fcda93c23e81c240e2f05a89be99b81bfc3bdcdb03dd0a0f40319242665: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: errno 524

I'm assuming that it has something to do with either the cli container not being able to start a chaincode container and/or the docker container not being able to do it. Is there something I'm doing wrong? I can provide all the files but there are a ton and I didn't want to post all that here. I could really use some help here. Thanks!

  • Nick

instantiate chaincode error

Execute the script to deploy hyperledger fabric network.

./setup_blockchainNetwork.sh

When the script is executed to instantiate the chain code,There is an error here.
image

Execute

kubectl get pod

image
Execute

peer chaincode list -C channel1  --installed

image

chmod: changing permissions of '/shared/leapd': Operation not permitted

When running setup_blockchainNetworks, It breaks down in Kubernetes on my Docker Desktop and comes out Error like this. It seems the permissions in container is not permitted. And can see logs in sh terminal like this:
image
Wating for container of copy artifact pod to run. Current status of copyartifacts-9fjh2 is Succeeded
image
image

No more progress after "Waiting for chaincodeinstantiate job to be completed"

First of all, thank you for providing this useful tutorial.
I have a problem with joining IBM cloud, so I am following this tutorial in my macbook pro(Intel Core i5) by minikube.
However, I faced no progress after "Waiting for chaincodeinstantiate job to be completed" on my shell.
What should I do? Should I change hyperledger/fabric-tools image to another?

Error: failed to create deliver client: orderer client failed to connect to blockchain-orderer

The configuration works fine on single node Kubernetes cluster. I am having a problem while working with multiple Kubernetes cluster. I have to mention the cluster IP of each services as below:

hostAliases:
- ip: "xx.xxx.xx.xxx"
         hostnames:
         - "blockchain-orderer"

Then only it's able to connect to the service. Is the way of doing this correct? Or am I missing something on Kubernetes itself? How does my services know which IP to use?

README-cn.md is so outdated ! 中文文档过期了!

Hi there,
Thanks for this amazing project and I can easily learn how to deploy fabric into a k8s cluster, even in microk8s at my local machine.

At first I was following README-cn.md as instruction and I had so many troubles in deploying the samples. Until I got back to the README.md which is in English and kept updated, I have found light.

So, just in case if someone else would like to try this project out, and doesn't have to waste valuable time as I did, PLEASE DON'T REFER TO README-cn.md UNTIL IT'S UPDATED.

Also it will be wonderful if you see this and update cn.md , or if you have to, delete it as good as well.

Thanks a lot for your time,
Merry Chrismas and Happy New Year!
David


中文文档过期了! 不要参照!

hyperledger-fabric: error: [client-utils.js]: sendPeersProposal

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority.

Facing this issue while accessing chaincode on kubernetes via nodejs api.

var fabric_client = new Fabric_Client();

// setup the fabric network
var channel = fabric_client.newChannel('channel1');
var peer = fabric_client.newPeer('grpc://184.172.247.100:30317');
channel.addPeer(peer);

const request = {
chaincodeId: 'tunacc',
txId: tx_id,
fcn: 'queryAllTuna',
args: ['']
};

// send the query proposal to the peer
return channel.queryByChaincode(request); //this line through an exception.

when i can execute chaincode within org1peer1 container it is working fine. but through node.js api it wont work.kubernetes services working snapshot https://i.stack.imgur.com/B187L.png

Files in persistent volumes disappear

At various points at the execution, it seems like the files in the persistent volumes disappear, leading to issues mainly in create channel and join channel. When these issues arise, a "describe pod" call for the respective job almost always contains the line "Pod sandbox changed, it will be killed and recreated." Here is the output of "kubectl describe utils" (the generateartifacts job):

Events:
Type Reason Age From Message


Normal SuccessfulMountVolume 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 MountVolume.SetUp succeeded for volume "shared-pv"
Normal SuccessfulMountVolume 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 MountVolume.SetUp succeeded for volume "dockersocket"
Normal SuccessfulMountVolume 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 MountVolume.SetUp succeeded for volume "default-token-g8n9w"
Normal Scheduled 1m default-scheduler Successfully assigned utils-ljqvg to gke-cluster-1-default-pool-49fc0de8-5sp6
Normal Pulling 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 pulling image "hyperledger/fabric-tools:x86_64-1.0.4"
Normal Created 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Created container
Normal Pulled 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Successfully pulled image "hyperledger/fabric-tools:x86_64-1.0.4"
Normal Created 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Created container
Normal Started 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Started container
Normal Pulled 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Successfully pulled image "hyperledger/fabric-tools:x86_64-1.0.4"
Normal Pulling 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 pulling image "hyperledger/fabric-tools:x86_64-1.0.4"
Normal Started 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Started container
Normal Pulling 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 pulling image "hyperledger/fabric-tools:x86_64-1.0.4"
Normal Pulled 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Successfully pulled image "hyperledger/fabric-tools:x86_64-1.0.4"
Normal Created 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Created container
Normal Started 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Started container
Normal SandboxChanged 1m kubelet, gke-cluster-1-default-pool-49fc0de8-5sp6 Pod sandbox changed, it will be killed and re-created.

What causes the collapse of the sandbox, and how can I fix this issue?

Error: create channel and orderer client failed to connect to blockchain-orderer:31010

k8s version: v1.15.10+IKS

Please let me know if you have any ideas how to fix this issue.

After running a setup script:

k get pods -n blockchaintest
NAME                           READY   STATUS      RESTARTS   AGE
copyartifacts-kp6t7            0/1     Completed   0          8m9s
createchannel-456c5            0/2     Error       0          7m
createchannel-9mnhl            0/2     Error       0          6m49s
docker-dind-5649d57cc9-q9xmv   1/1     Running     0          8m21s
utils-cdh82                    0/2     Completed   0          7m49s
k get jobs -n blockchaintest 
NAME            COMPLETIONS   DURATION   AGE
copyartifacts   1/1           19s        8m26s
createchannel   0/1           7m17s      7m17s
utils           1/1           32s        8m6s

Error:

k logs -f createchannel-456c5 -n blockchaintest createchannel
2020-03-17 10:41:51.598 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2020-03-17 10:41:51.598 UTC [viperutil] getKeysRecursively -> DEBU 002 Found map[string]interface{} value for peer.BCCSP.SW
2020-03-17 10:41:51.599 UTC [viperutil] unmarshalJSON -> DEBU 003 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-03-17 10:41:51.599 UTC [viperutil] getKeysRecursively -> DEBU 004 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2020-03-17 10:41:51.599 UTC [viperutil] unmarshalJSON -> DEBU 005 Unmarshal JSON: value is not a string: 256
2020-03-17 10:41:51.599 UTC [viperutil] getKeysRecursively -> DEBU 006 Found real value for peer.BCCSP.SW.Security setting to int 256
2020-03-17 10:41:51.599 UTC [viperutil] getKeysRecursively -> DEBU 007 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2020-03-17 10:41:51.599 UTC [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2020-03-17 10:41:51.599 UTC [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string 
2020-03-17 10:41:51.599 UTC [viperutil] getKeysRecursively -> DEBU 00a Found map[string]interface{} value for peer.BCCSP.PKCS11
2020-03-17 10:41:51.599 UTC [viperutil] unmarshalJSON -> DEBU 00b Unmarshal JSON: value is not a string: <nil>
2020-03-17 10:41:51.599 UTC [viperutil] getKeysRecursively -> DEBU 00c Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2020-03-17 10:41:51.600 UTC [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil>
2020-03-17 10:41:51.600 UTC [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2020-03-17 10:41:51.600 UTC [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil>
2020-03-17 10:41:51.600 UTC [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2020-03-17 10:41:51.600 UTC [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil>
2020-03-17 10:41:51.600 UTC [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2020-03-17 10:41:51.601 UTC [viperutil] unmarshalJSON -> DEBU 013 Unmarshal JSON: value is not a string: <nil>
2020-03-17 10:41:51.601 UTC [viperutil] getKeysRecursively -> DEBU 014 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2020-03-17 10:41:51.601 UTC [viperutil] getKeysRecursively -> DEBU 015 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2020-03-17 10:41:51.601 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2020-03-17 10:41:51.601 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2020-03-17 10:41:51.601 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2020-03-17 10:41:51.601 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.Default setting to string SW
2020-03-17 10:41:51.601 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[Default:SW PKCS11:map[FileKeyStore:map[KeyStore:<nil>] Hash:<nil> Label:<nil> Library:<nil> Pin:<nil> Security:<nil>] SW:map[FileKeyStore:map[KeyStore:] Hash:SHA2 Security:256]]]
2020-03-17 10:41:51.601 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore]...done
2020-03-17 10:41:51.602 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/[email protected]
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/intermediatecerts
2020-03-17 10:41:51.602 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/intermediatecerts]. Skipping. [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/intermediatecerts: no such file or directory]
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlsintermediatecerts
2020-03-17 10:41:51.602 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlsintermediatecerts]. Skipping. [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlsintermediatecerts: no such file or directory]
2020-03-17 10:41:51.602 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/crls
2020-03-17 10:41:51.602 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/crls]. Skipping. [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/crls: no such file or directory]
2020-03-17 10:41:51.602 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/config.yaml]: [stat /shared/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/config.yaml: no such file or directory]
2020-03-17 10:41:51.602 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2020-03-17 10:41:51.602 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2020-03-17 10:41:51.602 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2020-03-17 10:41:51.602 UTC [msp] Setup -> DEBU 02f Setting up MSP instance Org1MSP
2020-03-17 10:41:51.602 UTC [msp.identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
<removed>
-----END CERTIFICATE-----
2020-03-17 10:41:51.603 UTC [msp.identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE-----
<removed>
-----END CERTIFICATE-----
2020-03-17 10:41:51.603 UTC [msp.identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE-----
<removed>
-----END CERTIFICATE-----
2020-03-17 10:41:51.603 UTC [msp] setupSigningIdentity -> DEBU 033 Signing identity expires at 2030-03-15 10:36:00 +0000 UTC
2020-03-17 10:41:51.603 UTC [msp.identity] newIdentity -> DEBU 034 Creating identity instance for cert -----BEGIN CERTIFICATE-----
<removed>
-----END CERTIFICATE-----
2020-03-17 10:41:51.603 UTC [msp] Validate -> DEBU 035 MSP Org1MSP validating identity
2020-03-17 10:41:51.604 UTC [msp] GetDefaultSigningIdentity -> DEBU 036 Obtaining default signing identity
2020-03-17 10:41:51.604 UTC [grpc] DialContext -> DEBU 037 parsed scheme: ""
2020-03-17 10:41:51.604 UTC [grpc] DialContext -> DEBU 038 scheme "" not registered, fallback to default scheme
2020-03-17 10:41:51.604 UTC [grpc] watcher -> DEBU 039 ccResolverWrapper: sending new addresses to cc: [{blockchain-orderer:31010 0  <nil>}]
2020-03-17 10:41:51.604 UTC [grpc] switchBalancer -> DEBU 03a ClientConn switching balancer to "pick_first"
2020-03-17 10:41:51.604 UTC [grpc] HandleSubConnStateChange -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc0002a3a00, CONNECTING
Error: failed to create deliver client: orderer client failed to connect to blockchain-orderer:31010: failed to create new connection: context deadline exceeded

peer channel create job just hangs forever for fabric 1.0.4 and gives error on 1.1.0 and later...

peer channel create just hangs forever for fabric 1.0.4 and gives error on 1.1.0 and later...

2018-05-23 19:18:52.118 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-05-23 19:18:52.118 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-05-23 19:18:52.120 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-05-23 19:18:52.121 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2018-05-23 19:18:52.121 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2018-05-23 19:18:52.122 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2018-05-23 19:18:52.122 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2018-05-23 19:18:52.122 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A9E060A074F7267314D53501292062D...53616D706C65436F6E736F727469756D
2018-05-23 19:18:52.122 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: 70ABD09EB62D294FEDB727E4DBBFF9837F5ECC5A0D6180340931908C91536084
2018-05-23 19:18:52.122 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2018-05-23 19:18:52.122 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2018-05-23 19:18:52.122 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2018-05-23 19:18:52.122 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2018-05-23 19:18:52.122 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AD4060A1408021A06089CFD96D80522...4B9F7EAB5AB343105BEAD649C93DF0C1
2018-05-23 19:18:52.122 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 076AC02346FBC2BAE90236DBBEDF4607FB1A12F7FB8CC433F683CE1E53790126
Error: rpc error: code = Unavailable desc = transport is closing
Usage:
peer channel create [flags]
Flags:
-c, --channelID string In case of a newChain command, the channel ID to create.
-f, --file string Configuration transaction file generated by a tool such as configtxgen for submitting to orderer
-t, --timeout int Channel creation timeout (default 5)
Global Flags:
--cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
--certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
--clientauth Use mutual TLS when communicating with the orderer endpoint
--keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
--logging-level string Default logging level and overrides, see core.yaml for full syntax
-o, --orderer string Ordering service endpoint
--ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer.
--tls Use TLS when communicating with the orderer endpoint
-v, --version Display current version of fabric peer server

How do I connect different physical computers?

I try to run this project by using minikube.

I can run this project with own my computer.

but there is one thing I want to ask. I want to connect 6 physical computers(which will be org1, org2, .. org6).

If I want to run this project using 6 physical computers? How can I do? like.. changing ports or change configtx.yaml something like that.

Please let me know. Thanks for helping me, in advance.

Unable to create channel due to context deadline exceeded

I am trying to create channel using the create_channel.yaml given in github. Do I need to add/change any configuration related to CORE_PEER_LISTENADDRESS ?

kubectl logs createchannel-c8rvs createchannel

2019-05-06 06:54:04.609 UTC [msp] setupSigningIdentity -> DEBU 034 Signing identity expires at 2029-05-03 06:49:00 +0000 UTC
2019-05-06 06:54:04.609 UTC [msp] Validate -> DEBU 035 MSP Org1MSP validating identity
2019-05-06 06:54:04.609 UTC [msp] GetDefaultSigningIdentity -> DEBU 036 Obtaining default signing identity
2019-05-06 06:54:04.610 UTC [grpc] DialContext -> DEBU 037 parsed scheme: ""
2019-05-06 06:54:04.610 UTC [grpc] DialContext -> DEBU 038 scheme "" not registered, fallback to default scheme
2019-05-06 06:54:04.610 UTC [grpc] watcher -> DEBU 039 ccResolverWrapper: sending new addresses to cc: [{blockchain-orderer:31010 0 }]
2019-05-06 06:54:04.610 UTC [grpc] switchBalancer -> DEBU 03a ClientConn switching balancer to "pick_first"
2019-05-06 06:54:04.610 UTC [grpc] HandleSubConnStateChange -> DEBU 03b pickfirstBalancer: HandleSubConnStateChange: 0xc0002afe50, CONNECTING
Error: failed to create deliver client: orderer client failed to connect to blockchain-orderer:31010: failed to create new connection: context deadline exceeded

Plans on moving to fabric 1.4.x?

Hyperledger fabric has published v1.3, v1.4.0, v.1.4.1 & v2.0. This repository is still using the fabric version v1.2.1.

Are there any plans to upgrade this repository to move to the latest fabric versions?

Adding new organisation

How can I add a new organisation to the network. Is there a automatic script to add or remove orgs from the network.

Error while interacting with the peers

I have deployed the entire network properly (using minikube), but when I access to one peer (example org1peer1) I get this error while interacting with the blockchain:

~/kubernetes_fabric/blockchain-network-on-kubernetes$ kubectl exec -it blockchain-org1peer1-74f9fb4b8f-6ql84 bash

root@blockchain-org1peer1-74f9fb4b8f-6ql84:/# peer chaincode query -C channel1 -n cc -c '{"Args":["query","a"]}'
Error: Error getting endorser client chaincode: PER:404 - Error trying to connect to local peer
/opt/gopath/src/github.com/hyperledger/fabric/peer/common/common.go:116 github.com/hyperledger/fabric/peer/common.GetEndorserClient
/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/common.go:240 github.com/hyperledger/fabric/peer/chaincode.InitCmdFactory
/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/query.go:57 github.com/hyperledger/fabric/peer/chaincode.chaincodeQuery
/opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/query.go:35 github.com/hyperledger/fabric/peer/chaincode.queryCmd.func1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute
/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:118 main.main
/opt/go/src/runtime/proc.go:192 runtime.main
/opt/go/src/runtime/asm_amd64.s:2087 runtime.goexit
Caused by: context deadline exceeded
2018-03-08 11:20:47.536 UTC [grpc] Printf -> DEBU 001 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 10.102.98.21:30110: operation was canceled"; Reconnecting to {blockchain-org1peer1:30110 <nil>}
Usage:
  peer chaincode query [flags]
... (CONTINUE THE HELP)

Do you know a possible reason of getting this issue?

Thank you!!

Waiting for chaincodeinstantiate job to be completed ::

The step to point to tcp://docker:2375 was performed

Linux

$ sed -i s#unix:///host/var/run/docker.sock#tcp://docker:2375# configFiles/peersDeployment.yaml

ubuntu@ip-xxxxxxxxxxxxx~/blockchain-network-on-kubernetes$ cat configFiles/peersDeployment.yaml | grep tcp://docker:2375
value: tcp://docker:2375
value: tcp://docker:2375
value: tcp://docker:2375
value: tcp://docker:2375

Client Version: v1.13.8
Server Version: v1.13.8+IKS

NAME READY STATUS RESTARTS AGE
blockchain-ca-54d7b4ddfc-jxrzh 1/1 Running 0 14m
blockchain-orderer-67c9ff777d-mpdqm 1/1 Running 0 14m
blockchain-org1peer1-7bd4879446-mqm52 1/1 Running 0 14m
blockchain-org2peer1-8fc4fbcfc-grk2t 1/1 Running 0 14m
blockchain-org3peer1-6cf5d4875f-jn776 1/1 Running 0 14m
blockchain-org4peer1-68699bdd8f-l5dhp 1/1 Running 0 14m
chaincodeinstall-49nq2 0/4 Completed 0 14m
chaincodeinstantiate-5llqr 0/1 Error 0 14m
chaincodeinstantiate-gnhpg 0/1 Error 0 14m

copyartifacts-dtblm 0/1 Completed 0 15m
createchannel-dwvrl 0/2 Completed 0 14m
docker-dind-545d6b5986-2l7cz 1/1 Running 0 15m
joinchannel-dh8s6 0/4 Completed 0 14m
utils-l6s97 0/2 Completed 0 15m

ubuntu@ip-xxx-xx-x-xx:~/blockchain-network-on-kubernetes$ kubectl logs chaincodeinstantiate-5llqr
2019-07-29 20:36:56.351 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2019-07-29 20:36:56.351 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: cannot connect to Docker endpoint

From what I've seen in other older issues, substitution should have helped. But apparently not in my case.

Not able to perform invoke operations from API

Hi!!
I've deployed this example in a kubernetes cluster and it worked perfectly. If I perform some invokes/queries inside one peer it works fine.

However, if I try to perform an invoke operation using the fabcar Node SDK example (https://github.com/hyperledger/fabric-samples/tree/release-1.1/fabcar), configuring properly the peers/orderer/CA directions and chancodes requests, I'm not able to perform invokes (it is strange).
Although I can enroll, register and query without problem.

Have you tried to use this network using the Node SDK to perform invokes?

Regards!!

Connecting REST Service

Hello everybody. Really nice resource. I have successfully deployed the network on Kubernetes. I would like to connect my REST service to communicate with the peers in the cluster. Do you have any idea of how I could do this?

If restart the pods, lose the shared-pvc volume data

To test my persistent data, I rebooted my kubernates service and after that, I lost all my data in shared-pvc volume claim.

`root@blockchain-org1peer1-7fddb4c66f-249wj:/# cd /shared/

root@blockchain-org1peer1-7fddb4c66f-249wj:/shared# ls -lah

total 36K

drwxrwxrwt 9 root root 4.0K Jul 21 18:30 .

drwxr-xr-x 1 root root 4.0K Jul 21 18:29 ..

drwxrwxrwt 2 root root 4.0K Jul 21 18:23 .ICE-unix

drwxrwxrwt 2 root root 4.0K Jul 21 18:23 .Test-unix

drwxrwxrwt 2 root root 4.0K Jul 21 18:23 .X11-unix

drwxrwxrwt 2 root root 4.0K Jul 21 18:23 .XIM-unix

drwxrwxrwt 2 root root 4.0K Jul 21 18:23 .font-unix

drwx------ 3 root root 4.0K Jul 21 18:23 systemd-private-28177ba8811e43d490782af54178f0ce-systemd-resolved.service-sZkfkl

drwx------ 3 root root 4.0K Jul 21 18:23 systemd-private-28177ba8811e43d490782af54178f0ce-systemd-timesyncd.service-vA7pNs
`

Operation not permitted

$ ./setup_blockchainNetwork_v2.sh
...
Generating the required artifacts for Blockchain network
Running: kubectl create -f /Users/kylehz/Downloads/blockchain-network-on-kubernetes/configFiles/generateArtifactsJob.yaml
job.batch/utils created
Waiting for generateArtifacts job to complete
...
Waiting for generateArtifacts job to complete
There is an error in utils job. Please check logs.

$ kubectl get jobs --watch
NAME            COMPLETIONS   DURATION   AGE
copyartifacts   1/1           32s        9m34s
utils           0/1           9m1s       9m1s

$ kubectl get pods | grep utils
utils-95mjv                   1/2     Error       0          9m55s

$ kubectl logs utils-95mjv -c cryptogen
/shared/crypto-config/peerOrganizations/org4.example.com/users/[email protected]/msp/keystore/0b6f282d23e0b34db1302d9cf707a944e88b341c6205443f745242463e58e132_sk
/shared/crypto-config/peerOrganizations/org4.example.com/users/[email protected]/msp/keystore
find: ‘/shared/Proxifier-Euz62I’: Permission denied
chmod: changing permissions of '/shared': Operation not permitted
chmod: changing permissions of '/shared/Proxifier-Euz62I': Operation not permitted

$ kubectl version --short
Client Version: v1.15.5
Server Version: v1.17.3

when I use hyperledger explorer connect to the network, the channels show [] and the nodes show 2

@maheshwarishikha
when I use hyperledger explorer connect to the network, the channels show [] and the nodes show 2,.
the right result should be channels = ['channel1'] and nodes number = 4?


  1. get channels
    /api/channels/info ->

{
"status": 200,
"channels": [] // should be ['channel1']
}

2)get nodes number
api/status/ ->

{
"chaincodeCount": "1",
"txCount": "2",
"latestBlock": "2",
"peerCount": "2" // should be 4
}

Error trying to start business network. Error: No valid responses from any peers - hyperledger-fabric

I am new to hyperledger and try to start network using below commend.

  1. composer archive create -t dir -n .
    successfull

  2. composer network install --card PeerAdmin@hlfv1 --archiveFile [email protected]
    successfull

  3. composer network start --networkName flightoperations --networkVersion 0.0.5 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card

Error:

Starting business network flightoperations at version 0.0.5

Processing these Network Admins:
userName: admin

✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: failed to execute transaction 0f5bdde7d55439863c41b93be0bd2388b371bb86d43c0542b59b77959ceeb902: error starting container: error starting container: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: API error (500): Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 127.0.1.1:53: read udp 127.0.0.1:34408->127.0.1.1:53: i/o timeout
Command failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.