Comments (19)
Hi! I didn't face that problem, I set up my own kubernetes cluster and then I used the fabcar 1.0 node SDK example without problem.
I suggest to check the version 1.0 in all components, and set up the fabric-ca properly in enroll and register (using CA1 or CA2 depending on the org):
fabric_ca_client = new Fabric_CA_Client('http://104.197.110.202:30054', tlsOptions , 'CA1', crypto_suite);
Regards!!
from blockchain-network-on-kubernetes.
Hi @alejandrolr thanks, your previous solution worked for me... i was mistakenly enroll with CA instead of CA1 or CA2
Thanks again.
from blockchain-network-on-kubernetes.
@shyrazkhan , I am also hitting the same error. Working on it.
@alejandrolr , as you said before it worked fine for you. Could you please help here.
Enroll and register is working fine but query/invoke is failing with following error:
"Verify() returned x509: certificate signed by unknown authority"
Any idea, how to fix this.
Thanks in advance.
from blockchain-network-on-kubernetes.
@maheshwarishikha , Thanks... I am stuck here from last two weeks still didn't find any solution and I also tried to expose peer port externally but no luck.
from blockchain-network-on-kubernetes.
I think that this problem is caused because you need to indicate the CA name, CA1 or CA2 as I mentioned before.
from blockchain-network-on-kubernetes.
Hi alejandrolr, thanks for your reply. I have tried your solution but still facing the same issue. I am sharing Org1Peer1 logging at the time when facing an exception.
from blockchain-network-on-kubernetes.
Here is logging while admin and user1 enroll and register with CA Server..
from blockchain-network-on-kubernetes.
It's strange... I don't know the reason. It worked fine for me, I used the fabcar-1.0 example:
Change these lines in enroll.js:
fabric_ca_client = new Fabric_CA_Client('http://blockchain-ca:30054', tlsOptions , 'CA1', crypto_suite);
In invoke.js
// setup the fabric network
var channel = fabric_client.newChannel('channel1');
var peer = fabric_client.newPeer('grpc://blockchain.org1peer1:30110');
channel.addPeer(peer);
var order = fabric_client.newOrderer('grpc://blockchain-orderer:31010')
channel.addOrderer(order);
..(more code)..
var request = {
//targets: let default to the peer assigned to the client
chaincodeId: 'yourccName',
fcn: 'yourFuncName',
args: ['arg1','arg2'],
chainId: 'channel1',
txId: tx_id
};
(more...)
event_hub.setPeerAddr('grpc://blockchain-org1peer1:30111');
from blockchain-network-on-kubernetes.
And make sure that you have opened all these ports in your cluster.
from blockchain-network-on-kubernetes.
@alejandrolr , open these ports in cluster -- means create services for these ports...right? or some extra step for that?
from blockchain-network-on-kubernetes.
When you create a kubernetes cluster, it is created in some cloud instances. So if you define a service you have to expose it externally and open ports in your cloud firewall rules. Otherwise, you cannot access to your service even if created.
from blockchain-network-on-kubernetes.
What kind of cloud server are you using?
I've deployed my cluster in google (GKE), so I've created a firewall rule to allow this traffic in my instances in these ports.
Looking at your photos I can see that you are using IBM cloud, so you must have a similar firewall panel on it.
from blockchain-network-on-kubernetes.
@shyrazkhan , Can you please tell me more detail...what change worked for you? It is not working for me.
fabric_ca_client = new Fabric_CA_Client('http://< ip >:30054', tlsOptions , '', crypto_suite); -- it worked for me without CA name. But as you mentioned we need to give CA name, so tried that. But it failed with error saying - "ca1 does not exist".
Then I added ca name as an environment to ca container. After this following command worked:
fabric_ca_client = new Fabric_CA_Client('http://< ip >:30054', tlsOptions , 'CA1', crypto_suite);
But query/invoke is still failing.
from blockchain-network-on-kubernetes.
@maheshwarishikha ... i just passed a parameter value "CA1" instead of " ", then it worked for me..
I am sharing my working code here.
fabric_ca_client = new Fabric_CA_Client('http://ip_address:30818/', tlsOptions , 'CA1', crypto_suite);
Below code to make connection and query to org1peer1...
var channel = fabric_client.newChannel('channel1');
var peer = fabric_client.newPeer('grpc://ip_address:32590');
channel.addPeer(peer);
from blockchain-network-on-kubernetes.
@shyrazkhan , @alejandrolr
very strange..It is still not working for me.:(
Can you please check the attached files...so that if there is something missing or wrong. Steps followed are:
- setup network using the script provided in this repo. (No change in the config provided)
- took fabcar 1.1 samples and modified as attached
- ran commands - a) node enrollAdmin.js b) node registerUser.js c) node query.js
Query is giving error.
Just fyi - I am trying with 1.1 network. You can also check the same if it works for you with 1.1.
Thanks a lot!
from blockchain-network-on-kubernetes.
@shyrazkhan , I notice (in the snapshots provided) that you are using IBM Cloud, did you do any step related to open/expose ports?
from blockchain-network-on-kubernetes.
@maheshwarishikha , Yes I'm using IBM bluemix for kubernetes and yes you need to expose your deployment PORTS externally by using this kubectl command:
kubectl expose deployment/<your_deployment_name> --type=NodeType --port=<your_container_port> --name=<external_service_name> --target-port=<your_container_port>
from blockchain-network-on-kubernetes.
@shyrazkhan , this exposing port is equivalent to create services for those ports as defined in https://github.com/IBM/blockchain-network-on-kubernetes/blob/master/configFiles/blockchain-services.yaml
Right? Are you doing this as an extra step.
When I try the command given by you on commandline, I got -
$ kubectl expose deployment/blockchain-org1peer1 --type=NodePort --port=30110 --name blockchain-org1peer1 --target-port=30110
Error from server (AlreadyExists): services "blockchain-org1peer1" already exists
from blockchain-network-on-kubernetes.
Finally it worked for me as well. Issue was with cacerts. Now it is working, hence closing the issue. Thanks.
from blockchain-network-on-kubernetes.
Related Issues (20)
- chaincodeinstantiate error HOT 2
- when I use hyperledger explorer connect to the network, the channels show [] and the nodes show 2 HOT 2
- Error running docker container.. ${dockerPodStatus} never changed to "Running" while executing setup_blockchainNetwork.sh HOT 3
- Operation not permitted HOT 3
- current deployment is incompatible with IBM IKS version >1.15 HOT 3
- Error: create channel and orderer client failed to connect to blockchain-orderer:31010 HOT 6
- 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 HOT 3
- chaincode_instantiate faild HOT 3
- Error: error getting endorser client for query: endorser client failed to connect to blockchain-org1peer1:30110: failed to create new connection: context deadline exceeded HOT 5
- Is there roadmap for Support for HF 2.1? HOT 3
- Error trying to start business network. Error: No valid responses from any peers - hyperledger-fabric HOT 1
- If restart the pods, lose the shared-pvc volume data HOT 2
- Failed to evaluate transaction: FabricError: No peers available to query. Errors: [] HOT 2
- Can it supports fabric2.2 HOT 3
- Error: failed to create deliver client: orderer client failed to connect to blockchain-orderer HOT 1
- could not launch chaincode 'ibcc:5d0e934e1c508fa8ebf14bacc51c47d92780284ceca7edc0788e3b6ce98d1795': chaincode registration failed: container exited with 0 HOT 1
- How to make copyartifact Pod run HOT 3
- Where can I find public IP of my kubernets cluster account HOT 2
- No more progress after "Waiting for chaincodeinstantiate job to be completed" HOT 1
- + 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
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blockchain-network-on-kubernetes.