Giter VIP home page Giter VIP logo

Comments (19)

alejandrolr avatar alejandrolr commented on June 17, 2024 1

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.

shyrazkhan avatar shyrazkhan commented on June 17, 2024 1

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.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

@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.

shyrazkhan avatar shyrazkhan commented on June 17, 2024

@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.

alejandrolr avatar alejandrolr commented on June 17, 2024

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.

shyrazkhan avatar shyrazkhan commented on June 17, 2024

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.

image

from blockchain-network-on-kubernetes.

shyrazkhan avatar shyrazkhan commented on June 17, 2024

Here is logging while admin and user1 enroll and register with CA Server..

image

image

from blockchain-network-on-kubernetes.

alejandrolr avatar alejandrolr commented on June 17, 2024

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.

alejandrolr avatar alejandrolr commented on June 17, 2024

And make sure that you have opened all these ports in your cluster.

from blockchain-network-on-kubernetes.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

@alejandrolr , open these ports in cluster -- means create services for these ports...right? or some extra step for that?

from blockchain-network-on-kubernetes.

alejandrolr avatar alejandrolr commented on June 17, 2024

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.

alejandrolr avatar alejandrolr commented on June 17, 2024

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.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

@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.

shyrazkhan avatar shyrazkhan commented on June 17, 2024

@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.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

@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.

test.zip

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.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

@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.

shyrazkhan avatar shyrazkhan commented on June 17, 2024

@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.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

@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.

maheshwarishikha avatar maheshwarishikha commented on June 17, 2024

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)

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.