Date   

Re: Organization Without a Peer with Clients Querying Another Organization Peer on Same Channel

David Enyeart
 

The answer needs to be corrected.

After becoming a member of the channel, Org3 client can indeed query chaincode on Org1 peer.  And Org3 client can invoke chaincode and submit transactions, but they will have to invoke on Org1 peer AND Org2 peer in order to meet endorsement policy (in test network the endorsement policy is Majority of orgs, so 2 out of 3 in this example).  The endorsement policy is based on peers endorsing, not the client org who submitted the transaction.

Org1 and Org2 could decide not to allow Org3 clients query/invoke on their peers, either through mutual TLS configuration or an additional validation in chaincode that looks at submitter MSPID, but this is not the default.


Dave Enyeart


"David Faulstich Diniz Reis" ---09/14/2021 04:43:10 PM---No. It is not possible. Org3 users may access only org3 peers using test-network from fabric-samples

From: "David Faulstich Diniz Reis" <davidfdr@...>
To: tomhaszawui@...
Cc: "fabric@..." <fabric@...>
Date: 09/14/2021 04:43 PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Organization Without a Peer with Clients Querying Another Organization Peer on Same Channel
Sent by: fabric@...





No. It is not possible. Org3 users may access only org3 peers using test-network from fabric-samples due to endorsement policies defaults. You will need to change the signature policies under ORG1 and ORG2 in order to permit ORG3 MSP users ZjQcmQRYFpfptBannerStart 
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
No. It is not possible. Org3 users may access only org3 peers using test-network from fabric-samples due to endorsement policies defaults.

You will need to change the signature policies under ORG1 and ORG2 in order to permit ORG3 MSP users run lifecycle chaincode.

Best regards.

David


Em ter., 14 de set. de 2021 às 16:19, Tohmas Zhawui via lists.hyperledger.org <tomhaszawui=yahoo.com@...> escreveu:
    Hello guys,

    I am trying to create a network of three organizations Org1,Org and Org3. Where Org3 does not have any peers, just clients and a CA node. Using this tutorial Adding an Org to a Channel — hyperledger-fabricdocs main documentation, I have created a test network and a channel with two organizations then added the third organization to the channel using the script AddOrg3.sh with the -ca option.

    Adding an Org to a Channel — hyperledger-fabricdocs main documentation

    So far so good, but now I want user1 from Org3 to query the ledger from the peers of Org1 or Org 2 and submit some transactions.
    I am using the JavaScript app app.js.
    Is it possible? 
    If yes how?




--
David Faulstich Diniz Reis
@davidfaulstich (Instagram)
Certified Hyperledger Fabric Administrator
Professional Scrum Master








Re: Organization Without a Peer with Clients Querying Another Organization Peer on Same Channel

HyperFredger
 

PS: Reposted for the group

Thank you David for answering.

I was able to accomplish my goal by:

1) Removing any reference to peer in the AddOrg3.sh script (no crypto, no docker, etc.) 
2) In the application code, I enrolled the Org3 user1 using an Org1 admin and connect to the Gateway using Org3/user1 identity, Org1 connection profile and a specific query handler strategy DefaultQueryHandlerStrategies.PREFER_MSPID_SCOPE_ROUND_ROBIN

So far it seem to work, although I am not sure how understand the low-level details. user3 is able to perform some transactions in channel1.

Cheers,

Tohmas


Hyperledger TSC Election Call for Nominations Ending Soon

David Boswell <dboswell@...>
 

Now is the time to nominate yourself or somebody else for the Technical Steering Committee (TSC) election. The nomination period closes in two days on Friday, Sep 17 at Midnight Pacific Time (-7 GMT) so send in your nominations soon.

To nominate somebody, first ask them to confirm that they would like to be nominated, then use the following email template, with the subject line "TSC election nomination" and send it to election@...:


Dear Election Committee,

I nominate myself/<nominee's name> for the TSC election. My/their email address is <email>.

Thanks,

<your name>


Voting for the TSC election will start on October 1.  To make sure you are eligible to vote, visit the Hyperledger Voter Eligibility Check and check your email address:

https://labs.hyperledger.org/voters/

If the information we have for you is incorrect or if you're not showing up, please email election@... and we will help.

Thanks,
David


Cancelled Event: Fabric Contributor Meeting - Wednesday, September 15, 2021 #cal-cancelled

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Cancelled: Fabric Contributor Meeting

This event has been cancelled.

When:
Wednesday, September 15, 2021
9:00am to 10:00am
(UTC-04:00) America/New York

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer: Dave Enyeart enyeart@...

Description:
For meeting agendas, recordings, and more details, see https://wiki.hyperledger.org/display/fabric/Contributor+Meetings

Join Zoom Meeting
https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09
 
Meeting ID: 518 494 7650
Passcode: 475869


Fabric Contributor Meeting - September 15, 2021 - CANCELLED

David Enyeart
 

The Fabric contributor meeting today is CANCELLED.

The main presenter for the GitHub Actions CI discussion needs to re-schedule.




Hyperledger fabric network DR #hyperledger-fabric

Kumar Shantanu
 

Hello Team, 

I am currently running hyperledger fabric network on AWS and we are exploring the DR(active-standby) option for the same. If anyone of us has done this or knows how to do it properly can you please point me in the right direction? 

Thanks
Shantanu


Re: Organization Without a Peer with Clients Querying Another Organization Peer on Same Channel

David Faulstich Diniz Reis
 

No. It is not possible. Org3 users may access only org3 peers using test-network from fabric-samples due to endorsement policies defaults.

You will need to change the signature policies under ORG1 and ORG2 in order to permit ORG3 MSP users run lifecycle chaincode.

Best regards.

David

Em ter., 14 de set. de 2021 às 16:19, Tohmas Zhawui via lists.hyperledger.org <tomhaszawui=yahoo.com@...> escreveu:

Hello guys,

I am trying to create a network of three organizations Org1,Org and Org3. Where Org3 does not have any peers, just clients and a CA node. Using this tutorial Adding an Org to a Channel — hyperledger-fabricdocs main documentation, I have created a test network and a channel with two organizations then added the third organization to the channel using the script AddOrg3.sh with the -ca option.


So far so good, but now I want user1 from Org3 to query the ledger from the peers of Org1 or Org 2 and submit some transactions.

I am using the JavaScript app app.js.

Is it possible? 
If yes how?




--
David Faulstich Diniz Reis


Organization Without a Peer with Clients Querying Another Organization Peer on Same Channel

HyperFredger
 

Hello guys,

I am trying to create a network of three organizations Org1,Org and Org3. Where Org3 does not have any peers, just clients and a CA node. Using this tutorial Adding an Org to a Channel — hyperledger-fabricdocs main documentation, I have created a test network and a channel with two organizations then added the third organization to the channel using the script AddOrg3.sh with the -ca option.


So far so good, but now I want user1 from Org3 to query the ledger from the peers of Org1 or Org 2 and submit some transactions.

I am using the JavaScript app app.js.

Is it possible? 
If yes how?



Now: Private Chaincode Lab - 09/14/2021 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Private Chaincode Lab

When:
09/14/2021
8:00am to 9:00am
(UTC-07:00) America/Los Angeles

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer: Marcus Brandenburger bur@...

View Event

Description:
Two of the Hyperleger Labs projects (private data objects and private chain code) are collaborating to develop a "private smart contracts" capability.

Join Zoom Meeting https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09 Meeting ID: 518 494 7650 Passcode: 475869


Peer Gossip "reportMembershipChanges" keeps on changing and one of the peers in the network keeps going offline and comes alive again #fabric-peer

Mohammad Ghoneem <mohammad.ghoneem@...>
 

Hello, 

I have a fabric network running in a production environment with 5 organizations participating in this network. Recently I upgraded the network from fabric-1.4.7 to fabric 2.2.  After the upgrade I noticed that one of the peers keeps going offline and comes alive again. This is causing some transactions from other peer to fail when this peer is down, since I have a private data dissemination policy which enforce the data to be disseminated to this peer. Here are the logs of the gossip from other peer nodes in the network: 


2021-08-05 13:07:24.427 UTC [gossip.comm] func1 -> WARN 080 peer0.dcc.com:7051, PKIid:59f9c45bf431c6dcfd9bdd8daabff772f6302a23e1769ef9c740d970c24588f8 isn't responsive: EOF 2021-08-05 13:07:24.427 UTC [gossip.discovery] expireDeadMembers -> WARN 081 Entering [59f9c45bf431c6dcfd9bdd8daabff772f6302a23e1769ef9c740d970c24588f8] 2021-08-05 13:07:24.427 UTC [gossip.discovery] expireDeadMembers -> WARN 082 Closing connection to Endpoint: peer0.dcc.com:7051, InternalEndpoint: , PKI-ID: 59f9c45bf431c6dcfd9bdd8daabff772f6302a23e1769ef9c740d970c24588f8, Metadata: 2021-08-05 13:07:24.427 UTC [gossip.discovery] expireDeadMembers -> WARN 083 Exiting 2021-08-05 13:07:24.625 UTC [gossip.channel] reportMembershipChanges -> INFO 085 [[urchannel] Membership view has changed. peers went offline: [[peer0.dcc.dxb.com:7051 ]] , current view: [[peer0.org1.com:7051 ] [peer0.org2.com:7051 ] [peer0.org3.dxb.com:7051 ]]]



I can see from the logs that the peer is not responsive and then it goes offline and after few seconds it comes up again and then goes offline. The gossiping with this peer is stuck in this loop forever.  Any idea why this is happening ? Any help would be appreciated

 

 


Replacing cryptogen certificates with other certifcates issued by a CA in a production environment

Mohammad Ghoneem <mohammad.ghoneem@...>
 

Hello, 

I have deployed a fabric network in production environment with certificates generated with cryptogen tool. Now I need to replace those certificates with ones which are generated using Fabric-CA or any other CA. What would be the correct approach to achieve this. Is it possible to do a transaction configuration update where I replace the existing Certificates with the new ones and what will happen to the existing transactions (blocks) which are signed by the old certificates (cryptogen certs). Any help would be appreciated.


Re: Does the organization where the orderer belong matters? #fabric-orderer #fabric

Baohua Yang
 

Hi zhuxy

Please see my comments inline. Thanks!

On Sun, Sep 12, 2021 at 10:53 PM <zhuxy0000@...> wrote:
I've noticed that the Orderers are arranged in the same org(called OrdererOrg) in both fabric 1.4 and 2.2. So here's my questions:
- Why the orderers are arranged in OrdererOrg instead of Org1 or Org2 where the peers belong?

Different sections are convenient to have corresponding policy controls on orderer orgs and app orgs. For example, you can set one default policy for orgs providing ordering service, while a different policy for the application orgs.

Besides, typically orderer orgs will provide ordering service, and applications will use the ordering service.
 
- How could I modify the crypto-config and configtx files so that I can let them belong to Org1 or Org2?

Add it under the Application/Organizations section.
 
- What will happen if we arrange them the way I mentioned above?

Then every org will be treated as an application org.
 
Thanks in advance.



--
Best wishes!

Baohua Yang


Virtual meetups this week: Fabric Operations Console and Privacy in Hyperledger Fabric

David Boswell <dboswell@...>
 

I wanted to let people on the Fabric mailing list know about two virtual meetups this week that will be covering technical information related to Fabric.  Since these are virtual events anyone anywhere is able to join.

You can find the dial-in information for both and more details about what will be covered at:


Thursday, September 16 at 15:00 UTC / 17:00 CEST: Hyperledger Frankfurt hosts "Privacy in Hyperledger Fabric"

Thanks,
David


Does the organization where the orderer belong matters? #fabric-orderer #fabric

BigBang019
 

I've noticed that the Orderers are arranged in the same org(called OrdererOrg) in both fabric 1.4 and 2.2. So here's my questions:
- Why the orderers are arranged in OrdererOrg instead of Org1 or Org2 where the peers belong?
- How could I modify the crypto-config and configtx files so that I can let them belong to Org1 or Org2?
- What will happen if we arrange them the way I mentioned above?
Thanks in advance.


Connection profile for hyperledger fabric client app #fabric

neeroz.kumar29@...
 

I have got the hyperledger fabric blockchain deployed on kubernetes in namespace: hfl-fabric and the client app using fabric-sdk-go is in another namespace: hlf-app. I am using the gateway api to connect and invoke the chaincode. I am able to connect to the gateway, but while invoking the transactions and getting the network using gateway.GetNetwork("channel_name"), I am getting the error:

Failed to create new channel client: event service creation failed: could not get chConfig cache reference: QueryBlockConfig failed: QueryBlockConfig failed: queryChaincode failed: Multiple errors occurred: - Transaction processing for endorser [peer1-myorg.hlf-fabric:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer1-myorg.hlf-fabric:7051]: connection is in TRANSIENT_FAILURE - Transaction processing for endorser [peer2-myorg.hlf-fabric:7051]: Endorser Client Status Code: (2) CONNECTION_FAILED. Description: dialing connection on target [peer2-myorg.hlf-fabric:7051]: connection is in TRANSIENT_FAILURE
The connection-profile used by the client app is:
---
name: test-network-MyOrg
version: 1.0.0
client:
  organization: MyOrg
  connection:
    timeout:
      peer:
        endorser: '300'
organizations:
  MyOrg:
    mspid: MyOrgMSP
    peers:
    - peer0-myorg
    - peer1-myorg
    - peer2-myorg
    certificateAuthorities:
    - ca-myorg
peers:
  peer0-myorg:
    url: grpcs://peer0-myorg.hlf-fabric:${P0PORT}
    tlsCACerts:
      pem: |
          ${PEERPEM}
    grpcOptions:
      ssl-target-name-override: peer0-myorg
      hostnameOverride: peer0-myorg
  peer1-myorg:
    url: grpcs://peer1-myorg.hlf-fabric:${P1PORT}
    tlsCACerts:
      pem: |
          ${PEERPEM}
    grpcOptions:
      ssl-target-name-override: peer1-myorg
      hostnameOverride: peer1-myorg
  peer2-myorg:
    url: grpcs://peer2-myorg.hlf-fabric:${P2PORT}
    tlsCACerts:
      pem: |
          ${PEERPEM}
    grpcOptions:
      ssl-target-name-override: peer2-myorg
      hostnameOverride: peer2-myorg
certificateAuthorities:
  ca-myorg:
    url: https://ca-myorg.hlf-fabric:${CAPORT}
    caName: ca-myorg
    tlsCACerts:
      pem: 
        - |
          ${CAPEM}
    httpOptions:
      verify: false
I am able to invoke the chaincode using the cli (in the same namespace as the fabric blockchain namespace: hlf-fabric). 

I guess this issue is related to cross namespace communication in k8s? For this I have used grpcs://<svc-name>.<namespace>:<port>

The last resort, would be to deploy the fabric blockchain and the app in the same namespace. But I would appreciate if anyone could guide me setting up the connection-profile for the client app which can facilitate the cross namespace communications to the blockchain.
 


Re: External chaincode build - package couchdb indexes #fabric #couchdb

neeroz.kumar29@...
 

I figure out the issue with this. If anyone encounter the same problem then this might help.
Make sure that you're copying the META-INF folder in the external build and release scripts. You can refer to the document here


Re: Channel snapshot failed on conclusion

David Faulstich Diniz Reis
 


Good luck.

Carlos, I notice that you work @SERPRO GOV BR. I am from Brazil. Brasília.

Let's exchange some experiences regarding hlf.

Best regards.

David

Em sex., 10 de set. de 2021 às 17:40, Carlos Eduardo Matos Ellery <carlos.ellery@...> escreveu:

Hi David,

Didn't know about this STATE_MAINTENANCE mode, thanks, I will keep this trick up my sleeve. By now, at weekends the network doesn't have any transactions, so we will use this period to take snapshots when needed. In parallell, we will try some configs on CouchDB to keep compaction under control, if possible.

Thanks,
Carlos Eduardo Matos Ellery
Em 10/09/2021 16:54, David Faulstich Diniz Reis escreveu:
Hi Carlos.

You may try to do it putting your network in STATE_MAINTENANCE mode.

Please, let me know when you correct this problem. What was your workaround.


Best regards.

David

David Faulstich Diniz Reis
Certified Hyperledger Fabric Administrator
Certificate ID: LF-wfszprnvxq

Em qua., 8 de set. de 2021 às 16:44, Carlos Eduardo Matos Ellery <carlos.ellery@...> escreveu:
Hello all,

After almost 10 hours of waiting for a snapshot completion, there is this error on the peer log and nothing in 'completed' neither in 'temp' dirs of 'snapshots' folder. During the time it was taking the snapshot, the listpending always returned "Successfully got pending requests: [247663]". Does anyone have an idea of what occurred?

*Additional information: I know that CouchDB was running an automatic compaction task on the DB... could this be the cause? Because of the size of the stateDB, my CouchDB is configured for 16 shards (q=16).

[kvledger] func2 -> ERRO b8efb Failed to generate snapshot channelID=mychannel lastCommittedBlockNumber=247663 error="failed to retrieve the next entry from scanner associated with namespace consortium: error reading response body: unexpected EOF" errorVerbose="unexpected EOF error reading response body github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*couchDatabase).readDocRange /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/couchdb.go:904 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.rangeScanFilterCouchInternalDocs /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:611 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*queryScanner).getNextStateRangeScanResults /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:588 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*queryScanner).next /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:1084 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*dbsScanner).Next /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:1191 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/privacyenabledstate.(*DB).ExportPubStateAndPvtStateHashes /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/privacyenabledstate/snapshot.go:44 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr.(*LockBasedTxMgr).ExportPubStateAndPvtStateHashes /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr/lockbased_txmgr.go:603 github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).generateSnapshot /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/snapshot.go:126 github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).processSnapshotMgmtEvents.func2 /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/snapshot_mgmt.go:199 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1374 failed to retrieve the next entry from scanner associated with namespace mynetwork" Thanks,
-- 
Carlos Eduardo Matos Ellery


Re: Channel snapshot failed on conclusion

Carlos Eduardo Matos Ellery
 

Hi David,

Didn't know about this STATE_MAINTENANCE mode, thanks, I will keep this trick up my sleeve. By now, at weekends the network doesn't have any transactions, so we will use this period to take snapshots when needed. In parallell, we will try some configs on CouchDB to keep compaction under control, if possible.

Thanks,
Carlos Eduardo Matos Ellery
Em 10/09/2021 16:54, David Faulstich Diniz Reis escreveu:

Hi Carlos.

You may try to do it putting your network in STATE_MAINTENANCE mode.

Please, let me know when you correct this problem. What was your workaround.


Best regards.

David

David Faulstich Diniz Reis
Certified Hyperledger Fabric Administrator
Certificate ID: LF-wfszprnvxq

Em qua., 8 de set. de 2021 às 16:44, Carlos Eduardo Matos Ellery <carlos.ellery@...> escreveu:
Hello all,

After almost 10 hours of waiting for a snapshot completion, there is this error on the peer log and nothing in 'completed' neither in 'temp' dirs of 'snapshots' folder. During the time it was taking the snapshot, the listpending always returned "Successfully got pending requests: [247663]". Does anyone have an idea of what occurred?

*Additional information: I know that CouchDB was running an automatic compaction task on the DB... could this be the cause? Because of the size of the stateDB, my CouchDB is configured for 16 shards (q=16).

[kvledger] func2 -> ERRO b8efb Failed to generate snapshot channelID=mychannel lastCommittedBlockNumber=247663 error="failed to retrieve the next entry from scanner associated with namespace consortium: error reading response body: unexpected EOF" errorVerbose="unexpected EOF error reading response body github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*couchDatabase).readDocRange /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/couchdb.go:904 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.rangeScanFilterCouchInternalDocs /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:611 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*queryScanner).getNextStateRangeScanResults /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:588 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*queryScanner).next /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:1084 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*dbsScanner).Next /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:1191 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/privacyenabledstate.(*DB).ExportPubStateAndPvtStateHashes /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/privacyenabledstate/snapshot.go:44 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr.(*LockBasedTxMgr).ExportPubStateAndPvtStateHashes /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr/lockbased_txmgr.go:603 github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).generateSnapshot /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/snapshot.go:126 github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).processSnapshotMgmtEvents.func2 /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/snapshot_mgmt.go:199 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1374 failed to retrieve the next entry from scanner associated with namespace mynetwork" Thanks,
-- 
Carlos Eduardo Matos Ellery


Re: Channel snapshot failed on conclusion

David Faulstich Diniz Reis
 

Hi Carlos.

You may try to do it putting your network in STATE_MAINTENANCE mode.

Please, let me know when you correct this problem. What was your workaround.


Best regards.

David

David Faulstich Diniz Reis
Certified Hyperledger Fabric Administrator
Certificate ID: LF-wfszprnvxq

Em qua., 8 de set. de 2021 às 16:44, Carlos Eduardo Matos Ellery <carlos.ellery@...> escreveu:

Hello all,

After almost 10 hours of waiting for a snapshot completion, there is this error on the peer log and nothing in 'completed' neither in 'temp' dirs of 'snapshots' folder. During the time it was taking the snapshot, the listpending always returned "Successfully got pending requests: [247663]". Does anyone have an idea of what occurred?

*Additional information: I know that CouchDB was running an automatic compaction task on the DB... could this be the cause? Because of the size of the stateDB, my CouchDB is configured for 16 shards (q=16).

[kvledger] func2 -> ERRO b8efb Failed to generate snapshot channelID=mychannel lastCommittedBlockNumber=247663 error="failed to retrieve the next entry from scanner associated with namespace consortium: error reading response body: unexpected EOF" errorVerbose="unexpected EOF error reading response body github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*couchDatabase).readDocRange /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/couchdb.go:904 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.rangeScanFilterCouchInternalDocs /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:611 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*queryScanner).getNextStateRangeScanResults /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:588 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*queryScanner).next /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:1084 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb.(*dbsScanner).Next /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb.go:1191 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/privacyenabledstate.(*DB).ExportPubStateAndPvtStateHashes /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/privacyenabledstate/snapshot.go:44 github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr.(*LockBasedTxMgr).ExportPubStateAndPvtStateHashes /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/txmgr/lockbased_txmgr.go:603 github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).generateSnapshot /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/snapshot.go:126 github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).processSnapshotMgmtEvents.func2 /go/src/github.com/hyperledger/fabric/core/ledger/kvledger/snapshot_mgmt.go:199 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1374 failed to retrieve the next entry from scanner associated with namespace mynetwork" Thanks,
-- 
Carlos Eduardo Matos Ellery


Re: Error while Commit Chaincode (External chaincode) #fabric-kubernetes #fabric-chaincode

David Faulstich Diniz Reis
 

Your endorsement rule:

        LifecycleEndorsement:
            Type: ImplicitMeta
            Rule: "MAJORITY Endorsement"


So, the commit command needs to be submitted to the Majority of peers using --peerAddresses and --tlsRootCertFiles.

peer lifecycle chaincode commit -o orderer1.2e127222c688446eb7c2.centralindia.aksapp.io:443 --tls --cafile /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/orderer/ordererorg/orderer1.ordererorg/msp/tlscacerts/ca.crt -C dev-ind-demo-al-ae -n $chaincodeName --version v1 --sequence 1 --peerAddresses peer1.0f2fb0c3ae804a12b351.centralindia.aksapp.io:443 --tlsRootCertFiles /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/peer1.org3/msp/tlscacerts/ca.crt  --peerAddresses peer1.4bfb93299d6f498d9346.centralindia.aksapp.io:443  --tlsRootCertFiles /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer1.org2/msp/tlscacerts/ca.crt.

With two peers you will reach the majority. You may run this command inside org1 msp / environment.

Best regards.

David

David Faulstich Diniz Reis
Certified Hyperledger Fabric Administrator
Certiicade ID: LF-wfszprnvxq

Em qui., 9 de set. de 2021 às 13:55, Manish <manish.sethi@...> escreveu:

The error seems to be quite self explanatory. Did you get the approvals from enough orgs (default is majority)? 


You can look at some helping commands in the docs - https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerlifecycle.html (particularly, checkcommitreadiness).


Thanks,

Manish


On Thu, Sep 9, 2021 at 10:59 AM <hiteshdutt05@...> wrote:

I am running a network with 

3 peer orgs with two peers each

1 orderer org with 3 orderers

 

PROBLEM FACED

While committing the chaincode getting an error 

txid [cd5f76fc81ae06b655516f3baab642f7cd580eb1ae07eb19fa91c0807ece846a] committed with status (ENDORSEMENT_POLICY_FAILURE) at peer1.4bfb93299d6f498d9346.centralindia.aksapp.io:443. Error: transaction invalidated with status (ENDORSEMENT_POLICY_FAILURE)

 

STEPS DONE FOR CHANNEL CREATION AND CHAINCODE INSTALL, APPROVE AND COMMIT

 

CREATE CHANNEL

 Setup Configtx.yaml file (file attached)

configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/dev-ind-tanla-al-ae.tx -channelID dev-ind-tanla-al-ae

peer channel create -o orderer1.2e127222c688446eb7c2.centralindia.aksapp.io:443 -c dev-ind-tanla-al-ae -f ./channel-artifacts/dev-ind-tanla-al-ae.tx --outputBlock ./channel-artifacts/dev-ind-demo-al-ae.block --tls --cafile /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/orderer/ordererorg/orderer1.ordererorg/msp/tlscacerts/ca.crt

 

Set context for each peer of each org and join channel

JOIN CHANNEL

export CORE_PEER_LOCALMSPID='org1';export CORE_PEER_ADDRESS=peer1.8311494f2d6d47f585d5.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/peer1.org1/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/msp;

peer channel join -b ./channel-artifacts/dev-ind-demo-al-ae.block

 

export CORE_PEER_LOCALMSPID='org1';export CORE_PEER_ADDRESS=peer2.8311494f2d6d47f585d5.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/peer2.org1/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/msp;

peer channel join -b ./channel-artifacts/dev-ind-demo-al-ae.block

 

export CORE_PEER_LOCALMSPID='org2';export CORE_PEER_ADDRESS=peer1.4bfb93299d6f498d9346.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer1.org2/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/msp;

peer channel join -b ./channel-artifacts/dev-ind-demo-al-ae.block

 

export CORE_PEER_LOCALMSPID='org2';export CORE_PEER_ADDRESS=peer2.4bfb93299d6f498d9346.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer2.org2/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/msp;

peer channel join -b ./channel-artifacts/dev-ind-demo-al-ae.block

 

export CORE_PEER_LOCALMSPID='org3';export CORE_PEER_ADDRESS=peer1.0f2fb0c3ae804a12b351.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/peer1.org3/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/msp;

peer channel join -b ./channel-artifacts/dev-ind-demo-al-ae.block

 

export CORE_PEER_LOCALMSPID='org3';export CORE_PEER_ADDRESS=peer2.0f2fb0c3ae804a12b351.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/peer2.org3/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/msp;

peer channel join -b ./channel-artifacts/dev-ind-demo-al-ae.block

 

 

CHAINCODE PACKAGE INSTALL APPROVE AND COMMIT

 

PACKAGE

 

CHAINCODE LOCATION 

COMP_NAME=example

NAMESPACE=hlf1

chaincodeLocation=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/chaincode/

 

Create certificate and key

 

openssl req -nodes -x509 -newkey rsa:4096 -keyout crypto/key1.pem -out crypto/cert1.pem -subj "/C=IN/ST=TS/L=Hyderabad/O=example Inc/OU=Developer/CN=$COMP_NAME.$NAMESPACE/emailAddress=$SUPPORT_EMAIL"

 

Create package

 

Update connection.json [ set root_cert="" (with certificate created) address = "example.hlf1:9999" ]

 

create code.tar.gz

 

tar cfz code.tar.gz connection.json

tar cfz chaincode.tgz metadata.json code.tar.gz

 

package=$chaincodeLocation/chaincode.tgz

 

INSTALL 

export CORE_PEER_LOCALMSPID='org1';export CORE_PEER_ADDRESS=peer1.8311494f2d6d47f585d5.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/peer1.org1/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/msp;

peer lifecycle chaincode install $package #["copy package id, package id to be used during approve"]

 

export CORE_PEER_LOCALMSPID='org1';export CORE_PEER_ADDRESS=peer2.8311494f2d6d47f585d5.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/peer2.org1/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/msp;

peer lifecycle chaincode install $package #["copy package id, package id to be used during approve, packageId is same as packageId from other peer"]

 

export CORE_PEER_LOCALMSPID='org2';export CORE_PEER_ADDRESS=peer1.4bfb93299d6f498d9346.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer1.org2/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/msp;

peer lifecycle chaincode install $package #["copy package id, package id to be used during approve, packageId is same as packageId from other peer"]

 

export CORE_PEER_LOCALMSPID='org2';export CORE_PEER_ADDRESS=peer2.4bfb93299d6f498d9346.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer2.org2/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/msp;

peer lifecycle chaincode install $package #["copy package id, package id to be used during approve, packageId is same as packageId from other peer"]

 

export CORE_PEER_LOCALMSPID='org3';export CORE_PEER_ADDRESS=peer1.0f2fb0c3ae804a12b351.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/peer1.org3/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/msp;

peer lifecycle chaincode install $package #["copy package id, package id to be used during approve, packageId is same as packageId from other peer"]

 

export CORE_PEER_LOCALMSPID='org3';export CORE_PEER_ADDRESS=peer2.0f2fb0c3ae804a12b351.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/peer2.org3/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/msp;

peer lifecycle chaincode install $package #["copy package id, package id to be used during approve, packageId is same as packageId from other peer"]

 

APPROVE

export CORE_PEER_LOCALMSPID='org1';export CORE_PEER_ADDRESS=peer1.8311494f2d6d47f585d5.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/peer1.org1/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org1/msp;

peer lifecycle chaincode approveformyorg -n $chaincodeName -C $channelName -o orderer1.2e127222c688446eb7c2.centralindia.aksapp.io:443 --tls --cafile /mnt/c/workspace/git/Tanla/hlf-artifacts/installpeer/cryptoconfig/orderer/ordererorg/orderer1.ordererorg/msp/tlscacerts/ca.crt --package-id demo_2.0:02904171931c11dc8f36d20d97ca5bc4650aa66ffade9dc303b6100ddd790083 --version v1 --sequence 1 #["package id is used from package id generated during install"]

 

export CORE_PEER_LOCALMSPID='org2';export CORE_PEER_ADDRESS=peer1.4bfb93299d6f498d9346.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer1.org2/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/msp;

peer lifecycle chaincode approveformyorg -n $chaincodeName -C $channelName -o orderer1.2e127222c688446eb7c2.centralindia.aksapp.io:443 --tls --cafile /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/orderer/ordererorg/orderer1.ordererorg/msp/tlscacerts/ca.crt --package-id demo_2.0:02904171931c11dc8f36d20d97ca5bc4650aa66ffade9dc303b6100ddd790083 --version v1 --sequence 1 #["package id is used from package id generated during install"]

 

export CORE_PEER_LOCALMSPID='org3';export CORE_PEER_ADDRESS=peer1.0f2fb0c3ae804a12b351.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/peer1.org3/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org3/msp;

peer lifecycle chaincode approveformyorg -n $chaincodeName -C $channelName -o orderer1.2e127222c688446eb7c2.centralindia.aksapp.io:443 --tls --cafile /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/orderer/ordererorg/orderer1.ordererorg/msp/tlscacerts/ca.crt --package-id demo_2.0:02904171931c11dc8f36d20d97ca5bc4650aa66ffade9dc303b6100ddd790083 --version v1 --sequence 1 #["package id is used from package id generated during install"]

 

COMMIT

export CORE_PEER_LOCALMSPID='org2';export CORE_PEER_ADDRESS=peer2.4bfb93299d6f498d9346.centralindia.aksapp.io:443;export CORE_PEER_TLS_ROOTCERT_FILE=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/peer2.org2/msp/tlscacerts/ca.crt; export CORE_PEER_MSPCONFIGPATH=/mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/peer/org2/msp;

peer lifecycle chaincode commit -o orderer1.2e127222c688446eb7c2.centralindia.aksapp.io:443 --tls --cafile /mnt/c/workspace/git/demo/hlf-artifacts/installpeer/cryptoconfig/orderer/ordererorg/orderer1.ordererorg/msp/tlscacerts/ca.crt -C dev-ind-demo-al-ae -n $chaincodeName --version v1 --sequence 1



PS: IF I USE CONFIGTX.YAML WITH SINGLE PEER ORG (with two peers) AND CREATE A CHANNEL, I AM ABLE TO USE COMMIT CHAINCODE FOR SINGLE ORG ON CHANNEL SCENARIO

1261 - 1280 of 11527