Date   

Re: Correct number of anchor peers

Marcos Sarres
 

I suggest at least two anchors per org. It is the connection hub between orgs and orderers, it is important they keep alive with fail tolerance.

Marcos Sarres | CEO | +55 61 98116 7866



-----Mensagem original-----
De: fabric@... <fabric@...> Em nome de Nikos Karamolegkos
Enviada em: terça-feira, 29 de março de 2022 05:44
Para: fabric <fabric@...>
Assunto: [Hyperledger Fabric] Correct number of anchor peers

Hello,

I am building a network with 3 orgs with two peers each one and 1 orderer org with 1 orderer node (for now). Should I add both peers of each org as anchor peers or just one? Specifically, what happens if the anchor peer is dead?

Thank you

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: Trick to verify that endorsement policy is working

Nikos Karamolegkos
 

I will. However, isn't there a faster way? Also, can the TRANSIENT_FAILURE invoke that there is problem with the endorsement policy?


Correct number of anchor peers

Nikos Karamolegkos
 

Hello,

I am building a network with 3 orgs with two peers each one and 1 orderer org with 1 orderer node (for now). Should I add both peers of each org as anchor peers or just one? Specifically, what happens if the anchor peer is dead?

Thank you

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: Trick to verify that endorsement policy is working

Viktor Nikolenko
 

Hi Nikos,

You can write a test chaincode that will be dependent on the current time, or on the org name - so for peers of different orgs/peers the chaincode execution results will be different.

--
Best regards,
Viktor Nikolenko


Re: Enroll user failed with "Code: 20, message: Authentication failure"

Vishal
 

Looks like the CA admin credentials are incorrect.

On Mon, 28 Mar 2022 at 9:38 PM LC <lanting@...> wrote:
Hi all, 

We're trying to enroll a user following the commercial-paper tutorial. We modified enrollUser.js such that it takes in a username from the command line and enrolls that user, instead of using the given username "balaji". We launched the test-network by running ./network.sh up -ca so that it's created with certificate authorities. Here's our version:
LOCAL_VERSION=2.4.2
DOCKER_IMAGE_VERSION=2.4.2
CA_LOCAL_VERSION=1.5.2
CA_DOCKER_IMAGE_VERSION=1.5.2

However, the following authentication failure occurs when we tried to enroll an user:

% node enrollUser.js user1
2022-03-28T17:04:03.555Z - error: [FabricCAClientService.js]: Failed to enroll user1, error:%o message=fabric-ca request enroll failed with errors [[ { code: 20, message: 'Authentication failure' } ]], stack=Error: fabric-ca request enroll failed with errors [[ { code: 20, message: 'Authentication failure' } ]]
    at IncomingMessage.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21), result=, errors=[code=20, message=Authentication failure], messages=[], success=false

Failed to enroll client user user1: Error: fabric-ca request enroll failed with errors [[ { code: 20, message: 'Authentication failure' } ]] 

Here's the docker logs for ca_org1:

2022/03/28 17:04:03 [DEBUG] Received request for /api/v1/enroll

2022/03/28 17:04:03 [DEBUG] ca.Config: &{Version:1.2.0 Cfg:{Identities:{PasswordAttempts:10 AllowRemove:false} Affiliations:{AllowRemove:false}} CA:{Name:ca-org1 Keyfile:/etc/hyperledger/fabric-ca-server/ca-key.pem Certfile:/etc/hyperledger/fabric-ca-server/ca-cert.pem Chainfile:/etc/hyperledger/fabric-ca-server/ca-chain.pem ReenrollIgnoreCertExpiry:false} Signing:0xc00035e930 CSR:{CN:ca.org1.example.com Names:[{C:US ST:North Carolina L:Durham O:org1.example.com OU: SerialNumber:}] Hosts:[localhost org1.example.com] KeyRequest:0xc00026e3a0 CA:0xc00059ea20 SerialNumber:} Registry:{MaxEnrollments:-1 Identities:[{ Name:**** Pass:**** Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.AffiliationMgr:1 hf.GenCRL:1 hf.IntermediateCA:1 hf.Registrar.Attributes:* hf.Registrar.DelegateRoles:* hf.Registrar.Roles:* hf.Revoker:1]  }]} Affiliations:map[org1:[department1 department2] org2:[department1]] LDAP:{ Enabled:false URL:ldap://****:****@<host>:<port>/<base> UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member] [{ }] map[groups:[{ }]]} TLS:{false [] { }}  } DB:{ Type:sqlite3 Datasource:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db TLS:{false [] { }}  } CSP:0xc00059ec30 Client:<nil> Intermediate:{ParentServer:{ URL: CAName:  } TLS:{Enabled:false CertFiles:[] Client:{KeyFile: CertFile:}} Enrollment:{ Name: Secret:**** CAName: AttrReqs:[] Profile: Label: CSR:<nil> Type:x509  }} CRL:{Expiry:24h0m0s} Idemix:{IssuerPublicKeyfile:/etc/hyperledger/fabric-ca-server/IssuerPublicKey IssuerSecretKeyfile:/etc/hyperledger/fabric-ca-server/msp/keystore/IssuerSecretKey RevocationPublicKeyfile:/etc/hyperledger/fabric-ca-server/IssuerRevocationPublicKey RevocationPrivateKeyfile:/etc/hyperledger/fabric-ca-server/msp/keystore/IssuerRevocationPrivateKey RHPoolSize:100 NonceExpiration:15s NonceSweepInterval:15m}}

2022/03/28 17:04:03 [DEBUG] DB: Getting identity user1

2022/03/28 17:04:03 [DEBUG] DB: Login user user1 with max enrollments of -1 and state of 1

2022/03/28 17:04:03 [DEBUG] Incorrect password entered by user 'user1'

2022/03/28 17:04:03 [INFO] 172.18.0.1:60530 POST /api/v1/enroll 401 24 "Login failure: Password mismatch: crypto/bcrypt: hashedPassword is not the hash of the given password"

2022/03/28 17:16:23 [DEBUG] Cleaning up expired nonces for CA 'ca-org1'


Any help would be appreciated! Thanks in advance!

--
Regards Vishal Yadav


Enroll user failed with "Code: 20, message: Authentication failure"

LC
 

Hi all, 

We're trying to enroll a user following the commercial-paper tutorial. We modified enrollUser.js such that it takes in a username from the command line and enrolls that user, instead of using the given username "balaji". We launched the test-network by running ./network.sh up -ca so that it's created with certificate authorities. Here's our version:
LOCAL_VERSION=2.4.2
DOCKER_IMAGE_VERSION=2.4.2
CA_LOCAL_VERSION=1.5.2
CA_DOCKER_IMAGE_VERSION=1.5.2

However, the following authentication failure occurs when we tried to enroll an user:

% node enrollUser.js user1
Wallet path: /Users/lanting/go/src/github.com/Senior-Design/commercial-paper/organization/material-prov/identity/user/user1/wallet
2022-03-28T17:04:03.555Z - error: [FabricCAClientService.js]: Failed to enroll user1, error:%o message=fabric-ca request enroll failed with errors [[ { code: 20, message: 'Authentication failure' } ]], stack=Error: fabric-ca request enroll failed with errors [[ { code: 20, message: 'Authentication failure' } ]]
    at IncomingMessage.<anonymous> (/Users/lanting/go/src/github.com/Senior-Design/commercial-paper/organization/material-prov/application/node_modules/fabric-ca-client/lib/FabricCAClient.js:298:19)
    at IncomingMessage.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21), result=, errors=[code=20, message=Authentication failure], messages=[], success=false

Failed to enroll client user user1: Error: fabric-ca request enroll failed with errors [[ { code: 20, message: 'Authentication failure' } ]] 

Here's the docker logs for ca_org1:

2022/03/28 17:04:03 [DEBUG] Received request for /api/v1/enroll

2022/03/28 17:04:03 [DEBUG] ca.Config: &{Version:1.2.0 Cfg:{Identities:{PasswordAttempts:10 AllowRemove:false} Affiliations:{AllowRemove:false}} CA:{Name:ca-org1 Keyfile:/etc/hyperledger/fabric-ca-server/ca-key.pem Certfile:/etc/hyperledger/fabric-ca-server/ca-cert.pem Chainfile:/etc/hyperledger/fabric-ca-server/ca-chain.pem ReenrollIgnoreCertExpiry:false} Signing:0xc00035e930 CSR:{CN:ca.org1.example.com Names:[{C:US ST:North Carolina L:Durham O:org1.example.com OU: SerialNumber:}] Hosts:[localhost org1.example.com] KeyRequest:0xc00026e3a0 CA:0xc00059ea20 SerialNumber:} Registry:{MaxEnrollments:-1 Identities:[{ Name:**** Pass:**** Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.AffiliationMgr:1 hf.GenCRL:1 hf.IntermediateCA:1 hf.Registrar.Attributes:* hf.Registrar.DelegateRoles:* hf.Registrar.Roles:* hf.Revoker:1]  }]} Affiliations:map[org1:[department1 department2] org2:[department1]] LDAP:{ Enabled:false URL:ldap://****:****@<host>:<port>/<base> UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member] [{ }] map[groups:[{ }]]} TLS:{false [] { }}  } DB:{ Type:sqlite3 Datasource:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db TLS:{false [] { }}  } CSP:0xc00059ec30 Client:<nil> Intermediate:{ParentServer:{ URL: CAName:  } TLS:{Enabled:false CertFiles:[] Client:{KeyFile: CertFile:}} Enrollment:{ Name: Secret:**** CAName: AttrReqs:[] Profile: Label: CSR:<nil> Type:x509  }} CRL:{Expiry:24h0m0s} Idemix:{IssuerPublicKeyfile:/etc/hyperledger/fabric-ca-server/IssuerPublicKey IssuerSecretKeyfile:/etc/hyperledger/fabric-ca-server/msp/keystore/IssuerSecretKey RevocationPublicKeyfile:/etc/hyperledger/fabric-ca-server/IssuerRevocationPublicKey RevocationPrivateKeyfile:/etc/hyperledger/fabric-ca-server/msp/keystore/IssuerRevocationPrivateKey RHPoolSize:100 NonceExpiration:15s NonceSweepInterval:15m}}

2022/03/28 17:04:03 [DEBUG] DB: Getting identity user1

2022/03/28 17:04:03 [DEBUG] DB: Login user user1 with max enrollments of -1 and state of 1

2022/03/28 17:04:03 [DEBUG] Incorrect password entered by user 'user1'

2022/03/28 17:04:03 [INFO] 172.18.0.1:60530 POST /api/v1/enroll 401 24 "Login failure: Password mismatch: crypto/bcrypt: hashedPassword is not the hash of the given password"

2022/03/28 17:16:23 [DEBUG] Cleaning up expired nonces for CA 'ca-org1'


Any help would be appreciated! Thanks in advance!


Trick to verify that endorsement policy is working

Nikos Karamolegkos
 

Hello,

Can you please provide me a method to verify that the endorsement is working as it should. For example in case the policy is set to default (i.e Majority) how can I make the endorsement of transaction to fail? I have tried to kill the peers of an org but the error is TRANSIENT_FAILURE and not directly related with the policy

Thanks

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: Fabric-sdk-jAVA #fabric-sdk-java

Mark Lewis
 

It looks like the client tried to make a service discovery call to a peer, either to obtain information about other network nodes or to obtain an endorsement plan for a given transaction invocation, but was unable to connect to the peer for some reason. You probably need to look at the bits of the exception you've removed to see the endpoint it tried to connect to, and then check that is an endpoint you can really resolve and reach from your client.


Fabric-sdk-jAVA #fabric-sdk-java

jeff.jo95z@...
 

hi,

when i was executing using java sdk,I got the following error:

Results :
 
Tests in error:  
  testFabCar(org.example.ClientTest): org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: java.util.concurrent.ExecutionException: io
.grpc.StatusRuntimeException: UNAVAILABLE: io exception(..)

why this error comes?

Attaching the sdk files for the reference



Re: Error committing chaincode to network with 4 orgs #fabric-chaincode

David Faulstich Diniz Reis
 

It appears that you are trying to commit an not approved definition.

Check the crafted --name parameter on both commands. The checkcommitreadness is using another name definition:

  1. --name material_prov;
  2. --name material_prov_0;
All parameters must be equals on approveformyorg, checkcommitreadiness and commit lifecycle commands.



Best regards.

David



Em qui., 24 de mar. de 2022 às 16:35, LC <lanting@...> escreveu:

Hi all, 

We're trying to deploy our chaincode to the test-network with 4 orgs in it. Following the "Deploy a smart contract to channel" tutorial, we got each org to approve the chaincode definition as confirmed in the following:

$ peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name material_prov --version 1.0 --sequence 1 --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" --output json

{
        "approvals": {
                "Org1MSP": true,
                "Org2MSP": true,
                "Org3MSP": true,
                "Org4MSP": true
        }
}

However, when we try committing the chaincode to the channel, we get an error showing that the chaincode definition is not approved by the org that's currently running the command:

$ peer lifecycle chaincode commit -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --channelID mychannel --name material_prov_0 --version 1.0 --sequence 1 --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" --peerAddresses localhost:11051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" --peerAddresses localhost:13051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls/ca.crt"
 
Error: proposal failed with status: 500 - failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (Org1MSP)

We tried adding a signature policy as mentioned in this post but got the same result. We're running peer version 2.4.2 on macOS11.1 through docker. We added the 3rd and 4th org following the "Adding an org to a channel" tutorial. Any insight would be appreciated. Thanks!





Error committing chaincode to network with 4 orgs #fabric-chaincode

LC
 

Hi all, 

We're trying to deploy our chaincode to the test-network with 4 orgs in it. Following the "Deploy a smart contract to channel" tutorial, we got each org to approve the chaincode definition as confirmed in the following:

$ peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name material_prov --version 1.0 --sequence 1 --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" --output json

{
        "approvals": {
                "Org1MSP": true,
                "Org2MSP": true,
                "Org3MSP": true,
                "Org4MSP": true
        }
}

However, when we try committing the chaincode to the channel, we get an error showing that the chaincode definition is not approved by the org that's currently running the command:

$ peer lifecycle chaincode commit -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --channelID mychannel --name material_prov_0 --version 1.0 --sequence 1 --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" --peerAddresses localhost:11051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" --peerAddresses localhost:13051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org4.example.com/peers/peer0.org4.example.com/tls/ca.crt"
 
Error: proposal failed with status: 500 - failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (Org1MSP)

We tried adding a signature policy as mentioned in this post but got the same result. We're running peer version 2.4.2 on macOS11.1 through docker. We added the 3rd and 4th org following the "Adding an org to a channel" tutorial. Any insight would be appreciated. Thanks!



Re: Fabric-sdk-jAVA #fabric-sdk-java

Mark Lewis
 

The BlockEvent itself has lots of helpful accessor methods to help you navigate to useful data within the block, so you should probably prefer those if they do what you need. getBlock() returns the Block protobuf message, which is defined in the Fabric protocol buffer definitions:

https://github.com/hyperledger/fabric-protos/blob/9f95521bb870cca7b765217c80aeb600e0bd5abf/common/common.proto#L142-L146

The overall structure is quite complex, containing nested serialized protobuf messages. The Block object itself is a Java stub built from the protobuf definitions and contains methods to access data, so there is no need to "decode" it -- that has already been done. The protocol buffer documentation describes how the stubs packaged in fabric-sdk-java relate to the protocol buffer definitions and the API they provide:

https://developers.google.com/protocol-buffers/docs/javatutorial#the-protocol-buffer-api


Fabric-sdk-jAVA #fabric-sdk-java

jeff.jo95z@...
 

Hi All,

How to decode the data from blocklistener? is it possible to decode the output from blockEvent.getBlock() ?
Attaching the file for the reference


Re: Hyperledger Fabric javascript : i need help for using javascript logging in your code assetTransfer.js

MEUNIER Yannick
 

Hello Mattew,

 

Thanks for your answer.

As i am a beginner with nodejs, I’m not sure to understand your comments.

And by searching  in Node.js documentation, I don’t find the solution to my problem.

So I send you 2 files attached to this mail:

  1. assetTransfer.js which is the file coming with your package: I have just added inside CreateAsset function:
  1. console.info(`INFO YAM CreateAsset`); // to try to create a trace on my linux terminal
  2. fs.appendFileSync(`YAM.txt`, `SALUT`) //  to try to create a trace in a new file named YAM.txt
  1. trace-23_03_2022.txt : this is the trace of all my commands I launch to do my test (see lines 771 and 785)

 

My 2 problems are:

  1. I get no log trace `INFO YAM CreateAsset` with console.info on my linux terminal
  2. No trace file  YAM.txt  is created with  fs.appendFileSync  

 

So my question is:

Do I have to add something in my code to make work these 2 kinds of traces (on my terminal and in a trace file)?

 

I hope these elements will help you to solve my 2 problems.

If you need others information’s, please tell me which or what commands you want me to launch in my terminal.

 

Thanks you in advance.

 

Best regards.

 

Yannick.

 

 

De : Matthew White <WHITEMAT@...>
Envoyé : mercredi 23 mars 2022 09:39
À : MEUNIER Yannick via lists.hyperledger.org <yannick.meunier=capgemini.com@...>; fabric@...; fabric+help@...; MEUNIER, Yannick <yannick.meunier@...>
Objet : Re: Hyperledger Fabric javascript : i need help for using javascript logging in your code assetTransfer.js

 

This mail has been sent from an external source

 

 

Hello, just to confirm have you looked in the container that is running the chaincode.   It's a separate docker container.

 

The Winston logger that the chaincode libraries use is also available via the context argument on transaction functions.

 

Check the Node.js API docs for info

 

Matthew


From: fabric@... <fabric@...> on behalf of MEUNIER Yannick via lists.hyperledger.org <yannick.meunier=capgemini.com@...>
Sent: 22 March 2022 10:08
To: fabric@... <fabric@...>; fabric+help@... <fabric+help@...>; MEUNIER, Yannick <yannick.meunier@...>
Subject: [EXTERNAL] [Hyperledger Fabric] Hyperledger Fabric javascript : i need help for using javascript logging in your code assetTransfer.js

 

Hello, I use /fabric-samples/asset-transfer-basic/chaincode-javascript/lib/assetTransfer.js coming from your package But my problem is : The javascript instruction console.info or console.log doesn’t produce any trace on my linux terminal. ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

Hello,

 

I use /fabric-samples/asset-transfer-basic/chaincode-javascript/lib/assetTransfer.js coming from your package

 

But my problem is :

The javascript instruction console.info or console.log doesn’t produce any trace on my linux terminal.

How can I solve this problem please ?

If possible, i'd like also put my code traces in a text file with this instruction console.log, but how do that ?

 

Thanks in advance.

 

yannick.meunier@...

 

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


Re: Chaincode registration failed error

jkneubuh@...
 

Hi Satya,

Fabric has a lot of moving parts, and it can be a real challenge to uncover the root cause of configuration and coding errors.

One way to reduce some of the complexity is to start with a "known good" state when getting started, and build forward from a solid foundation.  This can help isolate logic errors in your code from configuration issues with the platform.

There are some good guidelines available for getting started with the Fabric test network, chaincode (basic-asset-transfer), and Gateway applications at the Running a Fabric Application guide.  Please consider running through this guide to ensure that all the components are working correctly on your development system.  Also double/triple check for any errors in the peer logs, which can be indicators of other issues in the network. 


Re: Chaincode registration failed error - Resolved

Satya
 

I got this problem because I made some changes in the chaincode source code.
After rectifying the same the problem got resolved.

On March 22, 2022 at 3:22 PM Satya <nanduris@...> wrote:
I am getting below error while trying to invoke a transaction on chaincode.
Infact, the chaincode status is being shown as Exited when docker ps -a is
executed.

I have shutdown all my containers and restarted them afresh, even then I am
getting this error.

root@ubuntu:~/cdacblktrg/lab0322/starter# docker logs e6dc2a0b1048
+ CHAINCODE_DIR=/usr/local/src
+ cd /usr/local/src
+ npm start -- --peer.address peer1.org1.example.com:9051

asset-transfer-basic@1.0.0 start /usr/local/src
fabric-chaincode-node start "--peer.address" "peer1.org1.example.com:9051"
fabric-chaincode-node start --peer.address localhost:7051 --chaincode-id-name
mycc

Options:
--help Show help [boolean]
-v, --version Show version number [boolean]
--peer.address [string] [required]
--grpc.max_send_message_length [number] [default: -1]
--grpc.max_receive_message_length [number] [default: -1]
--grpc.keepalive_time_ms [number] [default: 110000]
--grpc.http2.min_time_between_pings_ms [number] [default: 110000]
--grpc.keepalive_timeout_ms [number] [default: 20000]
--grpc.http2.max_pings_without_data [number] [default: 0]
--grpc.keepalive_permit_without_calls [number] [default: 1]
--ssl-target-name-override [string]
--chaincode-id-name [string] [required]
--module-path [string] [default: "/usr/local/src"]

/usr/local/src/index.js:10
# new comment is incouded for generate dpacke id:wq
^

SyntaxError: Invalid or unexpected token
at wrapSafe (internal/modules/cjs/loader.js:1072:16)
at Module._compile (internal/modules/cjs/loader.js:1122:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Function.getInfoFromContract
(/usr/local/src/node_modules/fabric-shim/lib/contract-spi/bootstrap.js:77:23)
at Function.bootstrap
(/usr/local/src/node_modules/fabric-shim/lib/contract-spi/bootstrap.js:54:63)
at Object.exports.handler
(/usr/local/src/node_modules/fabric-shim/lib/cmds/startCommand.js:46:40)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! asset-transfer-basic@1.0.0 start: `fabric-chaincode-node start
"--peer.address" "peer1.org1.example.com:9051"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the asset-transfer-basic@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-22T09_47_47_151Z-debug.log



Regards,
Satya
------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
------------------------------------------------------------------------------------------------------------


Re: Hyperledger Fabric javascript : i need help for using javascript logging in your code assetTransfer.js

Matthew White
 


Hello, just to confirm have you looked in the container that is running the chaincode.   It's a separate docker container.

The Winston logger that the chaincode libraries use is also available via the context argument on transaction functions.

Check the Node.js API docs for info

Matthew

From: fabric@... <fabric@...> on behalf of MEUNIER Yannick via lists.hyperledger.org <yannick.meunier=capgemini.com@...>
Sent: 22 March 2022 10:08
To: fabric@... <fabric@...>; fabric+help@... <fabric+help@...>; MEUNIER, Yannick <yannick.meunier@...>
Subject: [EXTERNAL] [Hyperledger Fabric] Hyperledger Fabric javascript : i need help for using javascript logging in your code assetTransfer.js
 
Hello, I use /fabric-samples/asset-transfer-basic/chaincode-javascript/lib/assetTransfer.js coming from your package But my problem is : The javascript instruction console.info or console.log doesn’t produce any trace on my linux terminal. ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd

Hello,

 

I use /fabric-samples/asset-transfer-basic/chaincode-javascript/lib/assetTransfer.js coming from your package

 

But my problem is :

The javascript instruction console.info or console.log doesn’t produce any trace on my linux terminal.

How can I solve this problem please ?

If possible, i'd like also put my code traces in a text file with this instruction console.log, but how do that ?

 

Thanks in advance.

 

yannick.meunier@...

 

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


Hyperledger Fabric javascript : i need help for using javascript logging in your code assetTransfer.js

MEUNIER Yannick <yannick.meunier@...>
 

Hello,

 

I use /fabric-samples/asset-transfer-basic/chaincode-javascript/lib/assetTransfer.js coming from your package

 

But my problem is :

The javascript instruction console.info or console.log doesn’t produce any trace on my linux terminal.

How can I solve this problem please ?

If possible, i'd like also put my code traces in a text file with this instruction console.log, but how do that ?

 

Thanks in advance.

 

yannick.meunier@...

 

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


Now: Private Chaincode Lab - 03/22/2022 #cal-notice

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

Private Chaincode Lab

When:
03/22/2022
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


Chaincode registration failed error

Satya
 

I am getting below error while trying to invoke a transaction on chaincode.
Infact, the chaincode status is being shown as Exited when docker ps -a is
executed.

I have shutdown all my containers and restarted them afresh, even then I am
getting this error.

root@ubuntu:~/cdacblktrg/lab0322/starter# docker logs e6dc2a0b1048
+ CHAINCODE_DIR=/usr/local/src
+ cd /usr/local/src
+ npm start -- --peer.address peer1.org1.example.com:9051

asset-transfer-basic@1.0.0 start /usr/local/src
fabric-chaincode-node start "--peer.address" "peer1.org1.example.com:9051"
fabric-chaincode-node start --peer.address localhost:7051 --chaincode-id-name
mycc

Options:
--help Show help [boolean]
-v, --version Show version number [boolean]
--peer.address [string] [required]
--grpc.max_send_message_length [number] [default: -1]
--grpc.max_receive_message_length [number] [default: -1]
--grpc.keepalive_time_ms [number] [default: 110000]
--grpc.http2.min_time_between_pings_ms [number] [default: 110000]
--grpc.keepalive_timeout_ms [number] [default: 20000]
--grpc.http2.max_pings_without_data [number] [default: 0]
--grpc.keepalive_permit_without_calls [number] [default: 1]
--ssl-target-name-override [string]
--chaincode-id-name [string] [required]
--module-path [string] [default: "/usr/local/src"]

/usr/local/src/index.js:10
# new comment is incouded for generate dpacke id:wq
^

SyntaxError: Invalid or unexpected token
at wrapSafe (internal/modules/cjs/loader.js:1072:16)
at Module._compile (internal/modules/cjs/loader.js:1122:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Function.getInfoFromContract
(/usr/local/src/node_modules/fabric-shim/lib/contract-spi/bootstrap.js:77:23)
at Function.bootstrap
(/usr/local/src/node_modules/fabric-shim/lib/contract-spi/bootstrap.js:54:63)
at Object.exports.handler
(/usr/local/src/node_modules/fabric-shim/lib/cmds/startCommand.js:46:40)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! asset-transfer-basic@1.0.0 start: `fabric-chaincode-node start
"--peer.address" "peer1.org1.example.com:9051"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the asset-transfer-basic@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional
logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-22T09_47_47_151Z-debug.log



Regards,
Satya
------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
------------------------------------------------------------------------------------------------------------

541 - 560 of 11518