Date   

Re: How to seed a Hyperledger Fabric with 80 million records

Senthil Nathan
 

Hi David,

   I am very curious to understand your scenario. I have the following questions:
  1. Are these 80 million records moved to Fabric from existing databases? If so, what was the database and data model -- JSON, table?
  2. What is the average size of a document? What is the expected storage utilization?
  3. Are you using goLevelDB or CouchDB?
  4. What is your performance expectation after moving to Fabric with 80 million records?
  5. Would blockchain transactions modify these existing records or add new records? In other words, are you going to append more records or modify existing records in the blockchain transactions?
   Your answer might help us to improve Fabric in the long term.

Regards,
Senthil

On Mon, May 4, 2020 at 5:45 PM David Viejo <davidviejopomata@...> wrote:
Hi all,

I'm trying to setup a hyperledger fabric network, but i have already data that i want in the blockchain before going live.

I saw that one way is to create a transaction that loops through all the parameters (should be an array) and then store all the rows in the blockchain. 

Another way would be to pass a zip file, we would have to respect the AbsoluteMaxBytes configuration of the channel, and then create all the rows in the blockchain inside the smart contract.

And the last way would be to call the blockchain individually,  so i would have to do 80 millions calls.

I have yet to test the performance, but is there anyone that have inserted this many records in hyperledger fabric? If so, what problems did you have?

Thanks!!




Re: How to seed a Hyperledger Fabric with 80 million records

Prasanth Sundaravelu
 

Hi David Viejo,

I haven't gone as far as that much, but when testing, I went up to 1 million records. 

I did this in a vm in my personal laptop, had just 1 peer and leveldb. Took several hours (around 8-10) to feed it @40ish TPS (individual transaction for each record).
LevelDB was smooth, no problems. 

On the other hand, CouchDB was troublesome to load large amounts of data. I'm not sure if it is just because of CouchDB's high resource utilization or there were other fundamental issues in itself.
- 1st thing, CouchDB took 10 times as much time to load the same amount of data, when compared to leveldb. 
- After hours and hours of loading, I was able to reach 40k records in it, then all further transactions just failed. I was not able to load data at all after that, something was buggy. I didn't spend much time to identify the issue, since my main focus was on LevelDB.

I would definitely say, sending array of records is the better way for efficient loading and make sure you have enough storage space, to prevent unnecessary troubles on that front.

Apart from these, some other things to look out for:
- MVCC error: Make sure the transactions don't update the same keys in the statedb. 
- Make sure your SDK is tuned for performance. SDK sample in tutorials will fail around 30TPS (depending on the hardware). This may be useful:  https://adlrocha.substack.com/p/adlrocha-performance-best-practices-50a
       - In short, you may want to store sessions in memory for the grpc connections between SDK, peer, and orderer, or else, new grpc connection will be generated for every transaction, which will adversely affect the performance significantly.
- Modify the configtx.yaml to tune the orderer's BatchTimeout and BatchSize. 0.1s BatchTimeout,1024 MaxMessageCount, 100MB AbsoluteMaxBytes worked best for me. Transactions are processed in queues. A large number of transactions in the queue will adversely affect the performance as well.
- Make sure to log only the necessary statements in chaincode - It can also affect performance during high load if not taken care of.

If you want to use leveldb, but using CouchDB only for Rich Queries, you can check this out:
https://github.com/motoreq/istate 

With this, you can perform Rich Queries in leveldb as well, with significant performance increase to CouchDB's queries.  


On Mon, May 4, 2020 at 5:45 PM David Viejo <davidviejopomata@...> wrote:
Hi all,

I'm trying to setup a hyperledger fabric network, but i have already data that i want in the blockchain before going live.

I saw that one way is to create a transaction that loops through all the parameters (should be an array) and then store all the rows in the blockchain. 

Another way would be to pass a zip file, we would have to respect the AbsoluteMaxBytes configuration of the channel, and then create all the rows in the blockchain inside the smart contract.

And the last way would be to call the blockchain individually,  so i would have to do 80 millions calls.

I have yet to test the performance, but is there anyone that have inserted this many records in hyperledger fabric? If so, what problems did you have?

Thanks!!




Re: How to seed a Hyperledger Fabric with 80 million records

David Enyeart
 

If you try to send them all in one transaction you will first hit the 100MB grpc limit, and then likely hit other memory and network issues.
If you send them all individually, it won't be very efficient.
A good middle ground is to batch the requests, for example set 1000 keys per transaction.

Instead of using the out of the box chaincode 'init' for this, add your own custom init logic to the chaincode. For example have a key that tracks whether your custom init is done. After your initial batch entries are done, send a transaction that sets your custom init key to done. The chaincode should fail regular transactions until the custom init key is set.


Dave Enyeart

"David Viejo" ---05/04/2020 08:15:50 AM---Hi all, I'm trying to setup a hyperledger fabric network, but i have already data

From: "David Viejo" <davidviejopomata@...>
To: fabric@...
Date: 05/04/2020 08:15 AM
Subject: [EXTERNAL] [Hyperledger Fabric] How to seed a Hyperledger Fabric with 80 million records
Sent by: fabric@...





Hi all,

I'm trying to setup a hyperledger fabric network, but i have already data that i want in the blockchain before going live.

I saw that one way is to create a transaction that loops through all the parameters (should be an array) and then store all the rows in the blockchain. 

Another way would be to pass a zip file, we would have to respect the AbsoluteMaxBytes configuration of the channel, and then create all the rows in the blockchain inside the smart contract.

And the last way would be to call the blockchain individually,  so i would have to do 80 millions calls.

I have yet to test the performance, but is there anyone that have inserted this many records in hyperledger fabric? If so, what problems did you have?

Thanks!!







Re: #fabric-questions LifecycleEndorsement with signature policy: ENDORSEMENT_FAILURE #fabric-questions

David Enyeart
 

Endorsement is done by the peer that processes the transaction, not the client that submitted the transaction. Therefore in the Endorsement and LifecycleEndorsement policies, you must specify a set of org peers, not org admins.


Dave Enyeart

"Mattia Bolzonella" ---05/04/2020 03:57:47 AM---I've specified a policy for the LifecycleEndorsement in my configtx.yaml and it is: LifecycleEndorse

From: "Mattia Bolzonella" <mattia.bolzonella@...>
To: fabric@...
Date: 05/04/2020 03:57 AM
Subject: [EXTERNAL] [Hyperledger Fabric] #fabric-questions LifecycleEndorsement with signature policy: ENDORSEMENT_FAILURE
Sent by: fabric@...





I've specified a policy for the LifecycleEndorsement in my configtx.yaml and it is:
LifecycleEndorsement:
Type: Signature
Rule: "OR('MyOrgMSP.admin')"

But when I try to commit the chaincode I get ENDORSEMENT_FAILURE in the peer logs because the identity being evaluated is the peer identity. How can I get the admin identity to be evaluated? The cli, from which I execute the commit command, has CORE_PEER_MSPCONFIGPATH set to the org admin folder.
The chaincode is approved only by MyOrg (and I expect that is enough considering the LifecycleEndorsement policy)




How to seed a Hyperledger Fabric with 80 million records

davidviejopomata@...
 

Hi all,

I'm trying to setup a hyperledger fabric network, but i have already data that i want in the blockchain before going live.

I saw that one way is to create a transaction that loops through all the parameters (should be an array) and then store all the rows in the blockchain. 

Another way would be to pass a zip file, we would have to respect the AbsoluteMaxBytes configuration of the channel, and then create all the rows in the blockchain inside the smart contract.

And the last way would be to call the blockchain individually,  so i would have to do 80 millions calls.

I have yet to test the performance, but is there anyone that have inserted this many records in hyperledger fabric? If so, what problems did you have?

Thanks!!




Re: #fabric-questions LifecycleEndorsement with signature policy: ENDORSEMENT_FAILURE #fabric-questions

Nikhil Gupta
 

Hi Mattia,

The chaincode definition approval is stored on your peer. The commit transaction is similar to a chaincode transaction in that it queries your peers to get the required endorsements.

Nik




-----fabric@... wrote: -----
To: fabric@...
From: "Mattia Bolzonella"
Sent by: fabric@...
Date: 05/04/2020 03:57AM
Subject: [EXTERNAL] [Hyperledger Fabric] #fabric-questions LifecycleEndorsement with signature policy: ENDORSEMENT_FAILURE

I've specified a policy for the LifecycleEndorsement in my configtx.yaml and it is:
LifecycleEndorsement:
         Type: Signature
         Rule: "OR('MyOrgMSP.admin')"
 
But when I try to commit the chaincode I get ENDORSEMENT_FAILURE in the peer logs because the identity being evaluated is the peer identity. How can I get the admin identity to be evaluated? The cli, from which I execute the commit command, has CORE_PEER_MSPCONFIGPATH  set to the org admin folder.
The chaincode is approved only by MyOrg (and I expect that is enough considering the LifecycleEndorsement policy)


Re: Performance improvement #fabric-sdk-java #fabric-questions

Marek Malik <info@...>
 

Hi Pras,

This network setup is also working on a 8GB MacBook Pro
😉

This are the docker stats, nothing but the peer two which I’m sending to the query is running -

The setup uses around 8-9 GB of RAM but I’m still, 2-3 GB free so that is not any issue (and I’m running a lot of different tools that consumes ram so I have still some places to work).


I changed the way I persist data, wrapping the collection into a document that is stored, so I’m storing not 150 elements but one big that will have 150 elements inside, with this approach the speed didn’t increased, it took 51 sec to get the data. But with that approach I was able to construct a id key to get a single element, this also took 51 sec.

I have some small problems with configuration of the consortium when trying to setup a single org.


Pozdrawiam
Marek Malik

 

Od: Prasanth Sundaravelu <prasanths96@...>
Data: niedziela, 3 maja 2020 22:55
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] Performance improvement #fabric-sdk-java #fabric-questions

 

Hi Marek,

1. CouchDB's fauxton interface returns paginated results. Check what's your per page results in that, only that many results are being returned and not all 150.
2. Two peers, two CouchDBs, 3 orderers - totally 7 containers. I'd say it is pretty heavy for a MacBook. 
- Try equivalent command for mac as "top" in linux and see how much load is taken when idle. 
- Also do "docker stats" to check the resource usage of each containers individually. Notice which containers take resources when a query call is made. Ideally, one peer, one couchdb only should be using resources. If orders use resources near the end, it means it is still using invoke. 
- Also try querying with 1 peer, 1 couchdb and 1 orderer network, you should probably see a significant difference. 

Regards,
Pras

 

On Sun, May 3, 2020 at 8:13 PM Marek Malik <info@...> wrote:

Hi Prasanth,

So I tested the use-case with `evaluateTransaction` method from the Java SDK which should be doing the query as you suggested.

In the file you will see logs from the peer, the ChaincodeInvocationTask is logging that it received an answer -  after ruffle 55 seconds (around 150 records of 200 in total), the log is printed twice, not sure why.
I think I have something else that is not working as excepted, I’m querying the CouchDB with a very simple query:

{"selector": {"projectId": "339d4be4-ad4e-4c8c-9f8f-0c96750600b3", ”data_type": "debt_service"}, "use_index": ["_design/pocServicesDoc","pocServicesIdx"]}
The index is created. When testing this query on Fauxton the query took 40 ms.

Any ideas ?

I’m running it on a 2018 MacBook Pro (16GB, 6-Core Intel Core i7), so I don’t think there is any limitation with the hardware.

 

Od: Prasanth Sundaravelu <prasanths96@...>
Data: niedziela, 3 maja 2020 08:42
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] Performance improvement #fabric-sdk-java #fabric-questions

 

Hi Marek,

 

What's your hardware specs? 

And make sure you're performing query rather than invoke.

 

 

On Sun, 3 May 2020, 1:00 am Marek Malik, <info@...> wrote:

Hi Alexis, 

This is a fairly old thread but it is directly linked to my current problem. If you could give any feedback on your solution, that would be fantastic. 

Basically, I'm building an API that will be responding with data from the blockchain, I require that the api will be responding rather quick, such that UX will be acceptable. 

The current setup that I have locally is 2 orgs (one peer per organization) and 3 Rafi orderers. When fetching around 150 records from the CouchDB it takes around 15 seconds. I already identified that the db is not the cause of the problem, it fetches the data in around 20ms.

The network setup is the following:
```

Orderer: &OrdererDefaults

  OrdererType: etcdraft

  BatchTimeout: 2s

  BatchSize:

    MaxMessageCount: 2

    AbsoluteMaxBytes: 99 MB

    PreferredMaxBytes: 512 KB

```

How did you guys resolve performance problems? It would seem that 150 small records returned as one collection from the blockchain should not be any problem.


#fabric-questions LifecycleEndorsement with signature policy: ENDORSEMENT_FAILURE #fabric-questions

Mattia Bolzonella
 

I've specified a policy for the LifecycleEndorsement in my configtx.yaml and it is:
LifecycleEndorsement:
         Type: Signature
         Rule: "OR('MyOrgMSP.admin')"
 
But when I try to commit the chaincode I get ENDORSEMENT_FAILURE in the peer logs because the identity being evaluated is the peer identity. How can I get the admin identity to be evaluated? The cli, from which I execute the commit command, has CORE_PEER_MSPCONFIGPATH  set to the org admin folder.
The chaincode is approved only by MyOrg (and I expect that is enough considering the LifecycleEndorsement policy)


Re: Having trouble understanding the configtx file sections #configtxgen

Prasanth Sundaravelu
 

Hi Rui,

1. It is not necessary for an orderer to be another organization since we now have RAFT ordering service. Earlier, when only kafka and solo ordering services were there, it would be little pointless if orderer gets controlled by either of the organizations (but ofcourse it was not that big a problem since these orgs already know and trust each other before forming consortium). Hence, orderer was demonstrated as a third org also showcasing the possibility that orderer can be a separate org.

2. Initially, if 2 orgs only form network, then you can only give these two orgs info in configtx. Later on, new orgs can be added to the network too. 



On Mon, 4 May 2020, 4:22 am Rui M., <rainmanmorais@...> wrote:
Hello everyone,

I'm having some trouble in understanding the sections in configtx file, because the organizations section. If I read the HF documentation glossary it indicates that an "Organization" is a real life corporation or entity that wants to make part of a blockchain network, but in the configtx file from HF samples, I can see being declared "ordererOrg", "org1" and so on, is this simply because this is a POC for demonstration or an orderer node can be considered an organization?

Also, if I want to create a simple network, do I need to declare the organizations, hardcoded and the exact number, in the "Organizations Section"? This is assuming that the answer to the previous question is that "organizations" is referring to real corporations.
What if I'm a enterprise that wants to join an already in production blockchain network, do I need to know how many participants are in that network for the organizations section?, I mean what are the requirements, code and components speaking, that I as a entity joining a network need?

Im sorry, if this is basic questions guys. Thanks in advance


Why is value of ORDERER_GENERAL_TLS_ROOTCAS array?

Abhijeet Bhowmik <abhijeet@...>
 

Hello All,

I asked in my last email about what file to use while making a tls call to orderer and it came to my knowledge that I need to use orderer/ca.crt to do that. So raising another question on that: 

1.Why do we have array against ORDERER_GENERAL_TLS_ROOTCAS
if we are only supposed to use one cert file always to make a tls connection.

2. If we gonna use multiple files, maybe one file for every peer, could someone point me in the right direction where I can find literature about how to do that?


Thanks and Regards
Abhijeet Bhowmik


Having trouble understanding the configtx file sections #configtxgen

Rui M.
 

Hello everyone,

I'm having some trouble in understanding the sections in configtx file, because the organizations section. If I read the HF documentation glossary it indicates that an "Organization" is a real life corporation or entity that wants to make part of a blockchain network, but in the configtx file from HF samples, I can see being declared "ordererOrg", "org1" and so on, is this simply because this is a POC for demonstration or an orderer node can be considered an organization?

Also, if I want to create a simple network, do I need to declare the organizations, hardcoded and the exact number, in the "Organizations Section"? This is assuming that the answer to the previous question is that "organizations" is referring to real corporations.
What if I'm a enterprise that wants to join an already in production blockchain network, do I need to know how many participants are in that network for the organizations section?, I mean what are the requirements, code and components speaking, that I as a entity joining a network need?

Im sorry, if this is basic questions guys. Thanks in advance


Re: Performance improvement #fabric-sdk-java #fabric-questions

Prasanth Sundaravelu
 

Hi Marek,

1. CouchDB's fauxton interface returns paginated results. Check what's your per page results in that, only that many results are being returned and not all 150.
2. Two peers, two CouchDBs, 3 orderers - totally 7 containers. I'd say it is pretty heavy for a MacBook. 
- Try equivalent command for mac as "top" in linux and see how much load is taken when idle. 
- Also do "docker stats" to check the resource usage of each containers individually. Notice which containers take resources when a query call is made. Ideally, one peer, one couchdb only should be using resources. If orders use resources near the end, it means it is still using invoke. 
- Also try querying with 1 peer, 1 couchdb and 1 orderer network, you should probably see a significant difference. 

Regards,
Pras


On Sun, May 3, 2020 at 8:13 PM Marek Malik <info@...> wrote:

Hi Prasanth,

So I tested the use-case with `evaluateTransaction` method from the Java SDK which should be doing the query as you suggested.

In the file you will see logs from the peer, the ChaincodeInvocationTask is logging that it received an answer -  after ruffle 55 seconds (around 150 records of 200 in total), the log is printed twice, not sure why.
I think I have something else that is not working as excepted, I’m querying the CouchDB with a very simple query:

{"selector": {"projectId": "339d4be4-ad4e-4c8c-9f8f-0c96750600b3", ”data_type": "debt_service"}, "use_index": ["_design/pocServicesDoc","pocServicesIdx"]}
The index is created. When testing this query on Fauxton the query took 40 ms.

Any ideas ?

I’m running it on a 2018 MacBook Pro (16GB, 6-Core Intel Core i7), so I don’t think there is any limitation with the hardware.

 

Od: Prasanth Sundaravelu <prasanths96@...>
Data: niedziela, 3 maja 2020 08:42
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] Performance improvement #fabric-sdk-java #fabric-questions

 

Hi Marek,

 

What's your hardware specs? 

And make sure you're performing query rather than invoke.

 

 

On Sun, 3 May 2020, 1:00 am Marek Malik, <info@...> wrote:

Hi Alexis, 

This is a fairly old thread but it is directly linked to my current problem. If you could give any feedback on your solution, that would be fantastic. 

Basically, I'm building an API that will be responding with data from the blockchain, I require that the api will be responding rather quick, such that UX will be acceptable. 

The current setup that I have locally is 2 orgs (one peer per organization) and 3 Rafi orderers. When fetching around 150 records from the CouchDB it takes around 15 seconds. I already identified that the db is not the cause of the problem, it fetches the data in around 20ms.

The network setup is the following:
```

Orderer: &OrdererDefaults

  OrdererType: etcdraft

  BatchTimeout: 2s

  BatchSize:

    MaxMessageCount: 2

    AbsoluteMaxBytes: 99 MB

    PreferredMaxBytes: 512 KB

```

How did you guys resolve performance problems? It would seem that 150 small records returned as one collection from the blockchain should not be any problem.


Re: Performance improvement #fabric-sdk-java #fabric-questions

Marek Malik <info@...>
 

Hi Prasanth,

So I tested the use-case with `evaluateTransaction` method from the Java SDK which should be doing the query as you suggested.

In the file you will see logs from the peer, the ChaincodeInvocationTask is logging that it received an answer -  after ruffle 55 seconds (around 150 records of 200 in total), the log is printed twice, not sure why.
I think I have something else that is not working as excepted, I’m querying the CouchDB with a very simple query:

{"selector": {"projectId": "339d4be4-ad4e-4c8c-9f8f-0c96750600b3", ”data_type": "debt_service"}, "use_index": ["_design/pocServicesDoc","pocServicesIdx"]}
The index is created. When testing this query on Fauxton the query took 40 ms.

Any ideas ?

I’m running it on a 2018 MacBook Pro (16GB, 6-Core Intel Core i7), so I don’t think there is any limitation with the hardware.

 

Od: Prasanth Sundaravelu <prasanths96@...>
Data: niedziela, 3 maja 2020 08:42
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] Performance improvement #fabric-sdk-java #fabric-questions

 

Hi Marek,

 

What's your hardware specs? 

And make sure you're performing query rather than invoke.

 

 

On Sun, 3 May 2020, 1:00 am Marek Malik, <info@...> wrote:

Hi Alexis, 

This is a fairly old thread but it is directly linked to my current problem. If you could give any feedback on your solution, that would be fantastic. 

Basically, I'm building an API that will be responding with data from the blockchain, I require that the api will be responding rather quick, such that UX will be acceptable. 

The current setup that I have locally is 2 orgs (one peer per organization) and 3 Rafi orderers. When fetching around 150 records from the CouchDB it takes around 15 seconds. I already identified that the db is not the cause of the problem, it fetches the data in around 20ms.

The network setup is the following:
```

Orderer: &OrdererDefaults

  OrdererType: etcdraft

  BatchTimeout: 2s

  BatchSize:

    MaxMessageCount: 2

    AbsoluteMaxBytes: 99 MB

    PreferredMaxBytes: 512 KB

```

How did you guys resolve performance problems? It would seem that 150 small records returned as one collection from the blockchain should not be any problem.


Re: Performance improvement #fabric-sdk-java #fabric-questions

Prasanth Sundaravelu
 

Hi Marek,

What's your hardware specs? 
And make sure you're performing query rather than invoke.


On Sun, 3 May 2020, 1:00 am Marek Malik, <info@...> wrote:

Hi Alexis, 

This is a fairly old thread but it is directly linked to my current problem. If you could give any feedback on your solution, that would be fantastic. 

Basically, I'm building an API that will be responding with data from the blockchain, I require that the api will be responding rather quick, such that UX will be acceptable. 

The current setup that I have locally is 2 orgs (one peer per organization) and 3 Rafi orderers. When fetching around 150 records from the CouchDB it takes around 15 seconds. I already identified that the db is not the cause of the problem, it fetches the data in around 20ms.

The network setup is the following:
```

Orderer: &OrdererDefaults

  OrdererType: etcdraft

  BatchTimeout: 2s

  BatchSize:

    MaxMessageCount: 2

    AbsoluteMaxBytes: 99 MB

    PreferredMaxBytes: 512 KB

```

How did you guys resolve performance problems? It would seem that 150 small records returned as one collection from the blockchain should not be any problem.


Re: Performance improvement #fabric-sdk-java #fabric-questions

Marek Malik <info@...>
 

Hi Alexis, 

This is a fairly old thread but it is directly linked to my current problem. If you could give any feedback on your solution, that would be fantastic. 

Basically, I'm building an API that will be responding with data from the blockchain, I require that the api will be responding rather quick, such that UX will be acceptable. 

The current setup that I have locally is 2 orgs (one peer per organization) and 3 Rafi orderers. When fetching around 150 records from the CouchDB it takes around 15 seconds. I already identified that the db is not the cause of the problem, it fetches the data in around 20ms.

The network setup is the following:
```

Orderer: &OrdererDefaults

  OrdererType: etcdraft

  BatchTimeout: 2s

  BatchSize:

    MaxMessageCount: 2

    AbsoluteMaxBytes: 99 MB

    PreferredMaxBytes: 512 KB

```

How did you guys resolve performance problems? It would seem that 150 small records returned as one collection from the blockchain should not be any problem.


Re: Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

Mattia Bolzonella
 

Update: I've delayed the generation of the peer certs and now it starts correctly. Thanks for the help!


Il giorno ven 1 mag 2020 alle ore 22:28 Mattia Bolzonella <mattia.bolzonella@...> ha scritto:
I'm creating the root CA using openssl, so at this point the validity is set at the time of creation the certificate and immediately after that I start the CA server and issue the peer certs. So that's the problem I think.

Il giorno ven 1 mag 2020 alle ore 19:05 Gari Singh <garis@...> ha scritto:
How are you creating the root CA certificate?  Are you having Fabric CA autogenerate it's root or are you generating the root yourself?
Both fabric-ca-server and fabric-ca-client set the validity period to 5 minutes earlier than current time as I recall.

-----------------------------------------
Gari Singh
Distinguished Engineer, CTO - IBM Blockchain
IBM Middleware
550 King St
Littleton, MA 01460
Cell: 978-846-7499
garis@...
-----------------------------------------

-----fabric@... wrote: -----
To: fabric@...
From: "Mattia Bolzonella"
Sent by: fabric@...
Date: 05/01/2020 12:36PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

I've examined the logs of the CA issuing the certificates. For example I can see from the log that the peer is enrolled at 15:34 but the certificate has validity from 15:30. The CA cert validity starts at server start-up time. I can't understand why the peer cert validity starts at 15:30 and not at 15:34
Il giorno ven 1 mag 2020 alle ore 18:13 Mattia Bolzonella <mattia.bolzonella@...> ha scritto:
I've examined the logs of the CA issuing the certificates. For example I can see from the log that the peer is enrolled at 15:34 but the certificate has validity from 15:30. The CA cert validity starts at server start-up time. I can't understand why the peer cert validity starts at 15:30 and not at 15:34


Il giorno ven 1 mag 2020 alle ore 16:36 Mattia Bolzonella <mattia.bolzonella@...> ha scritto:
I see, I'm using a script in ordere to generate all certs (including che CA cert) . Maybe I need some delay between certificates. I'm not sure if this is the problem (the script) but I'll look into it and get back to you, thanks
Il giorno ven 1 mag 2020 alle ore 16:22 Gari Singh <garis@...> ha scritto:
Your certificate

 Common Name: peer0.trustedchain.it
 Issued By: trustedchain.it
 Issuing Certificate: ca.trustedchain.it
 Serial Number: 1283279491DA9E086A360570DBD9C5FC67B61833
 Signature: ecdsa-with-SHA256
 Valid From: 10:32:00 30 Apr 2020
 Valid To: 10:37:00 30 Apr 2021
 Key Usage: Digital Signature
 Basic Constraints: CA:FALSE
 Subject Key Identifier: 32:01:1F:55:01:86:5B:74:B5:D5:7F:4B:09:1D:19:4B:A3:BE:DB:9B
 Authority Key Identifier: keyid:1B:5B:EB:EE:C8:D0:6B:75:C5:F7:C1:B1:F4:7E:27:67:CB:98:B6:B7
 Subject Alternative Names: DNS:peer0.trustedchain.it

 somehow has a validity period which starts before the validity period of the issuer / CA:

 Common Name: ca.trustedchain.it
 Issued By: trustedchain.it
 Issuing Certificate: ca.trustedchain.it
 Serial Number: 8387412C902FBEAC
 Signature: ecdsa-with-SHA256
 Valid From: 10:36:04 30 Apr 2020
 Valid To: 10:36:04 28 Apr 2030
 Key Usage: Certificate Sign, CRL Sign
 Basic Constraints: CA:TRUE, pathlen:1
 Subject Key Identifier: 1B:5B:EB:EE:C8:D0:6B:75:C5:F7:C1:B1:F4:7E:27:67:CB:98:B6:B7
 Authority Key Identifier: DirName:/C=IT/ST=ITALIA/O=trustedchain.it/CN=ca.trustedchain.it serial:83:87:41:2C:90:2F:BE:AC
 Subject Alternative Names: DNS:ca.trustedchain.it


 A certificate cannot have a validity period which starts before the validity period of the issuer.

 -----------------------------------------
 Gari Singh
 Distinguished Engineer, CTO - IBM Blockchain
 IBM Middleware
 550 King St
 Littleton, MA 01460
 Cell: 978-846-7499
 garis@...
 -----------------------------------------

 -----fabric@... wrote: -----
 To: Gari Singh <garis@...>
 From: "Mattia Bolzonella"
 Sent by: fabric@...
 Date: 05/01/2020 10:07AM
 Cc: Yacov Manevich <YACOVM@...>, fabric@...
 Subject: [EXTERNAL] Re: [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

 Thanks for the response, but the CA, ca-client and peer are running on the same system, so I think there should be no problem with the system clock.
 Il giorno gio 30 apr 2020 alle ore 18:08 Gari Singh <garis@...> ha scritto:
 The system clocks across the system running the CA, the system running the fabric-ca-client and the system running the peer are skewed.
  Are you using NTP to sync the times across the various machines?

  -----------------------------------------
  Gari Singh
  Distinguished Engineer, CTO - IBM Blockchain
  IBM Middleware
  550 King St
  Littleton, MA 01460
  Cell: 978-846-7499
  garis@...
  -----------------------------------------

  -----fabric@... wrote: -----
  To: Yacov Manevich <YACOVM@...>
  From: "Mattia Bolzonella"
  Sent by: fabric@...
  Date: 04/30/2020 11:11AM
  Cc: fabric@...
  Subject: [EXTERNAL] Re: [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

  My system has the CEST time zone, so it's different from the UTC used in the peer
  Il giorno gio 30 apr 2020 alle ore 17:07 Yacov Manevich <YACOVM@...> ha scritto:
  is your system clock fine?



  From:        mattia.bolzonella@...
  To:        fabric@...
  Date:        04/30/2020 05:27 PM
  Subject:        [EXTERNAL] [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions
  Sent by:        fabric@...



  Hi, I'm having some troubles starting my fabric peer (version 2.0.1) here's the log:
  ```
  UTC [main] InitCmd -> ERRO 018 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid
  ```
  The certificate is generated using `fabric-ca 1.4.6` and the expiring and validity date seem correct. So I cannot understand what is the real problem.
  Any idea?






  --

    Mattia Bolzonella
  Software Developer
  mattia.bolzonella@...
  Via G. Medici 9/a - 35138 Padova (PD)
  +39 049 500 1 500  www.ifin.it



  IFIN SISTEMI S.R.L. a socio unico
   Via G. Medici 9/a
   35138 Padova


  Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.



 --

   Mattia Bolzonella
 Software Developer
 mattia.bolzonella@...
 Via G. Medici 9/a - 35138 Padova (PD)
 +39 049 500 1 500  www.ifin.it



 IFIN SISTEMI S.R.L. a socio unico
  Via G. Medici 9/a
  35138 Padova


 Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.



--

  Mattia Bolzonella
Software Developer
mattia.bolzonella@...
Via G. Medici 9/a - 35138 Padova (PD)
+39 049 500 1 500  www.ifin.it


--

  Mattia Bolzonella
Software Developer
mattia.bolzonella@...
Via G. Medici 9/a - 35138 Padova (PD)
+39 049 500 1 500  www.ifin.it


--

  Mattia Bolzonella
Software Developer
mattia.bolzonella@...
Via G. Medici 9/a - 35138 Padova (PD)
+39 049 500 1 500  www.ifin.it



IFIN SISTEMI S.R.L. a socio unico
 Via G. Medici 9/a
 35138 Padova


Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.



--

Mattia Bolzonella

Software Developer

mattia.bolzonella@...

Via G. Medici 9/a - 35138 Padova (PD)

+39 049 500 1 500  www.ifin.it
      



--

Mattia Bolzonella

Software Developer

mattia.bolzonella@...

Via G. Medici 9/a - 35138 Padova (PD)

+39 049 500 1 500  www.ifin.it
      



IFIN SISTEMI S.R.L. a socio unico

Via G. Medici 9/a
35138 Padova 


Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.


Re: Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

Mattia Bolzonella
 

I'm creating the root CA using openssl, so at this point the validity is set at the time of creation the certificate and immediately after that I start the CA server and issue the peer certs. So that's the problem I think.


Il giorno ven 1 mag 2020 alle ore 19:05 Gari Singh <garis@...> ha scritto:
How are you creating the root CA certificate?  Are you having Fabric CA autogenerate it's root or are you generating the root yourself?
Both fabric-ca-server and fabric-ca-client set the validity period to 5 minutes earlier than current time as I recall.

-----------------------------------------
Gari Singh
Distinguished Engineer, CTO - IBM Blockchain
IBM Middleware
550 King St
Littleton, MA 01460
Cell: 978-846-7499
garis@...
-----------------------------------------

-----fabric@... wrote: -----
To: fabric@...
From: "Mattia Bolzonella"
Sent by: fabric@...
Date: 05/01/2020 12:36PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

I've examined the logs of the CA issuing the certificates. For example I can see from the log that the peer is enrolled at 15:34 but the certificate has validity from 15:30. The CA cert validity starts at server start-up time. I can't understand why the peer cert validity starts at 15:30 and not at 15:34
Il giorno ven 1 mag 2020 alle ore 18:13 Mattia Bolzonella <mattia.bolzonella@...> ha scritto:
I've examined the logs of the CA issuing the certificates. For example I can see from the log that the peer is enrolled at 15:34 but the certificate has validity from 15:30. The CA cert validity starts at server start-up time. I can't understand why the peer cert validity starts at 15:30 and not at 15:34


Il giorno ven 1 mag 2020 alle ore 16:36 Mattia Bolzonella <mattia.bolzonella@...> ha scritto:
I see, I'm using a script in ordere to generate all certs (including che CA cert) . Maybe I need some delay between certificates. I'm not sure if this is the problem (the script) but I'll look into it and get back to you, thanks
Il giorno ven 1 mag 2020 alle ore 16:22 Gari Singh <garis@...> ha scritto:
Your certificate

 Common Name: peer0.trustedchain.it
 Issued By: trustedchain.it
 Issuing Certificate: ca.trustedchain.it
 Serial Number: 1283279491DA9E086A360570DBD9C5FC67B61833
 Signature: ecdsa-with-SHA256
 Valid From: 10:32:00 30 Apr 2020
 Valid To: 10:37:00 30 Apr 2021
 Key Usage: Digital Signature
 Basic Constraints: CA:FALSE
 Subject Key Identifier: 32:01:1F:55:01:86:5B:74:B5:D5:7F:4B:09:1D:19:4B:A3:BE:DB:9B
 Authority Key Identifier: keyid:1B:5B:EB:EE:C8:D0:6B:75:C5:F7:C1:B1:F4:7E:27:67:CB:98:B6:B7
 Subject Alternative Names: DNS:peer0.trustedchain.it

 somehow has a validity period which starts before the validity period of the issuer / CA:

 Common Name: ca.trustedchain.it
 Issued By: trustedchain.it
 Issuing Certificate: ca.trustedchain.it
 Serial Number: 8387412C902FBEAC
 Signature: ecdsa-with-SHA256
 Valid From: 10:36:04 30 Apr 2020
 Valid To: 10:36:04 28 Apr 2030
 Key Usage: Certificate Sign, CRL Sign
 Basic Constraints: CA:TRUE, pathlen:1
 Subject Key Identifier: 1B:5B:EB:EE:C8:D0:6B:75:C5:F7:C1:B1:F4:7E:27:67:CB:98:B6:B7
 Authority Key Identifier: DirName:/C=IT/ST=ITALIA/O=trustedchain.it/CN=ca.trustedchain.it serial:83:87:41:2C:90:2F:BE:AC
 Subject Alternative Names: DNS:ca.trustedchain.it


 A certificate cannot have a validity period which starts before the validity period of the issuer.

 -----------------------------------------
 Gari Singh
 Distinguished Engineer, CTO - IBM Blockchain
 IBM Middleware
 550 King St
 Littleton, MA 01460
 Cell: 978-846-7499
 garis@...
 -----------------------------------------

 -----fabric@... wrote: -----
 To: Gari Singh <garis@...>
 From: "Mattia Bolzonella"
 Sent by: fabric@...
 Date: 05/01/2020 10:07AM
 Cc: Yacov Manevich <YACOVM@...>, fabric@...
 Subject: [EXTERNAL] Re: [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

 Thanks for the response, but the CA, ca-client and peer are running on the same system, so I think there should be no problem with the system clock.
 Il giorno gio 30 apr 2020 alle ore 18:08 Gari Singh <garis@...> ha scritto:
 The system clocks across the system running the CA, the system running the fabric-ca-client and the system running the peer are skewed.
  Are you using NTP to sync the times across the various machines?

  -----------------------------------------
  Gari Singh
  Distinguished Engineer, CTO - IBM Blockchain
  IBM Middleware
  550 King St
  Littleton, MA 01460
  Cell: 978-846-7499
  garis@...
  -----------------------------------------

  -----fabric@... wrote: -----
  To: Yacov Manevich <YACOVM@...>
  From: "Mattia Bolzonella"
  Sent by: fabric@...
  Date: 04/30/2020 11:11AM
  Cc: fabric@...
  Subject: [EXTERNAL] Re: [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions

  My system has the CEST time zone, so it's different from the UTC used in the peer
  Il giorno gio 30 apr 2020 alle ore 17:07 Yacov Manevich <YACOVM@...> ha scritto:
  is your system clock fine?



  From:        mattia.bolzonella@...
  To:        fabric@...
  Date:        04/30/2020 05:27 PM
  Subject:        [EXTERNAL] [Hyperledger Fabric] Cannot start peer due to "certificate has expired or is not yet valid" but it's not #fabric #fabric-questions
  Sent by:        fabric@...



  Hi, I'm having some troubles starting my fabric peer (version 2.0.1) here's the log:
  ```
  UTC [main] InitCmd -> ERRO 018 Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/fabric/msp: the supplied identity is not valid: x509: certificate has expired or is not yet valid
  ```
  The certificate is generated using `fabric-ca 1.4.6` and the expiring and validity date seem correct. So I cannot understand what is the real problem.
  Any idea?






  --

    Mattia Bolzonella
  Software Developer
  mattia.bolzonella@...
  Via G. Medici 9/a - 35138 Padova (PD)
  +39 049 500 1 500  www.ifin.it



  IFIN SISTEMI S.R.L. a socio unico
   Via G. Medici 9/a
   35138 Padova


  Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.



 --

   Mattia Bolzonella
 Software Developer
 mattia.bolzonella@...
 Via G. Medici 9/a - 35138 Padova (PD)
 +39 049 500 1 500  www.ifin.it



 IFIN SISTEMI S.R.L. a socio unico
  Via G. Medici 9/a
  35138 Padova


 Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.



--

  Mattia Bolzonella
Software Developer
mattia.bolzonella@...
Via G. Medici 9/a - 35138 Padova (PD)
+39 049 500 1 500  www.ifin.it


--

  Mattia Bolzonella
Software Developer
mattia.bolzonella@...
Via G. Medici 9/a - 35138 Padova (PD)
+39 049 500 1 500  www.ifin.it


--

  Mattia Bolzonella
Software Developer
mattia.bolzonella@...
Via G. Medici 9/a - 35138 Padova (PD)
+39 049 500 1 500  www.ifin.it



IFIN SISTEMI S.R.L. a socio unico
 Via G. Medici 9/a
 35138 Padova


Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.



--

Mattia Bolzonella

Software Developer

mattia.bolzonella@...

Via G. Medici 9/a - 35138 Padova (PD)

+39 049 500 1 500  www.ifin.it
      



IFIN SISTEMI S.R.L. a socio unico

Via G. Medici 9/a
35138 Padova 


Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari sopra indicati. La diffusione, la distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. 196/2003 e Regolamento UE 2016/679. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all'indirizzo e-mail del mittente. L’interessato può esercitare tutti i diritti previsti ai sensi degli articoli degli articoli 13, comma 2, lettere (b) e (d), 15-21 del Regolamento UE 2016/679, inviando un messaggio all'indirizzo e-mail del mittente o telefonando allo 049 500 1 500. Si prega di leggere Privacy Policy presente in https://ifin.it/privacy-policy-informativa-sui-cookies.


Re: #couchdb #fabric-chaincode #fabric-sdk-java #couchdb #fabric-chaincode #fabric-sdk-java

info@...
 

I didn’t tested placing the content in the root of the project, as usually the META-INF is placed in the app resource directory (as stated in the initial email).

Remarkably, this actually worked!
I assume that the process of setting up the couch db and any configuration/ doesn’t necessary have anything to do with the actual chain code deployment, it’s just packaged in the root with the code ?

Anyway, Thanks for your suggestion 😊

Best Regards,
Marek

Od: Senthilnathan N <cendhu@...>
Data: piątek, 1 maja 2020 19:32
Do: Marek Malik <info@...>
DW: "fabric@..." <fabric@...>
Temat: Re: [Hyperledger Fabric] #couchdb #fabric-chaincode #fabric-sdk-java

 

Regards,

Senthil

 

 

On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:

https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename 
`pocServicesIdx.json` and content:

```
{
  "index": {
    "fields": [
      "projectId",
      "data_type"
    ]
  },
  "ddoc": "pocServicesDoc",
  "name": "pocServicesIdx",
  "type": "json"
}

```



I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid.
The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?


Unable to create channel on peer

Nidhi Singh
 

Hello,

I am unable to create channel on peer. I am getting error message when executing peer channel create command inside cli.

Error: failed to create deliver client: orderer client failed to connect to orderer1.ucc.com:7060: failed to create new connection: connection error: desc = "transport: authentication handshake failed: remote error: tls: bad certificate"

I have gone through various posts and tried changing the crypto-config.yaml file to include SANS as localhost and 127.0.0.1.
Tried creating the network many times by deleting network and previous volumes.

Also added few environment variables for TLS_CLIENTROOTCAS and others for orderer and peer. No luck.

Thanks ,
Nidhi Singh


Re: #couchdb #fabric-chaincode #fabric-sdk-java #couchdb #fabric-chaincode #fabric-sdk-java

Senthil Nathan
 

Regards,
Senthil


On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.



I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename `pocServicesIdx.json` and content:

```
{ "index": { "fields": [ "projectId", "data_type" ] }, "ddoc": "pocServicesDoc", "name": "pocServicesIdx", "type": "json" }
```




I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid. 

The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?

3341 - 3360 of 11521