markparz (Thu, 02 Feb 2017 23:29:52 GMT):
Discuss Java SDK

donjohnny (Thu, 02 Feb 2017 23:39:41 GMT):
Has joined the channel.

C0rWin (Fri, 03 Feb 2017 00:11:52 GMT):
Has joined the channel.

salmanbaset (Fri, 03 Feb 2017 01:21:10 GMT):
Has joined the channel.

tuand (Fri, 03 Feb 2017 02:08:08 GMT):
Has joined the channel.

grapebaba (Fri, 03 Feb 2017 06:29:09 GMT):
Has joined the channel.

frbrkoala (Fri, 03 Feb 2017 07:02:31 GMT):
Has joined the channel.

nvlasov (Fri, 03 Feb 2017 07:13:51 GMT):
Has joined the channel.

ryokawajp (Fri, 03 Feb 2017 07:50:57 GMT):
Has joined the channel.

jdockter (Fri, 03 Feb 2017 11:39:50 GMT):
Has joined the channel.

silliman (Fri, 03 Feb 2017 13:57:41 GMT):
Has joined the channel.

gormand (Fri, 03 Feb 2017 14:43:53 GMT):
Has joined the channel.

kletkeman (Fri, 03 Feb 2017 15:20:26 GMT):
Has joined the channel.

danacr (Fri, 03 Feb 2017 15:24:20 GMT):
Has joined the channel.

ssaddem (Fri, 03 Feb 2017 15:52:43 GMT):
Has joined the channel.

rickr (Fri, 03 Feb 2017 17:24:54 GMT):
Has joined the channel.

rickr (Fri, 03 Feb 2017 17:25:15 GMT):
First one here :) ?

tuand (Fri, 03 Feb 2017 17:39:07 GMT):
wrong

rickr (Fri, 03 Feb 2017 17:39:43 GMT):
wrong ?

karkal (Fri, 03 Feb 2017 19:55:52 GMT):
Has joined the channel.

ericmvaughn (Fri, 03 Feb 2017 22:06:37 GMT):
Has joined the channel.

Pardha (Sat, 04 Feb 2017 01:31:47 GMT):
Has joined the channel.

bfuentes@fr.ibm.com (Sat, 04 Feb 2017 09:20:39 GMT):
Has joined the channel.

yury (Sat, 04 Feb 2017 11:45:24 GMT):
Has joined the channel.

Basug (Sun, 05 Feb 2017 03:02:58 GMT):
Has joined the channel.

Basug (Sun, 05 Feb 2017 03:03:42 GMT):
Hello

smfaizalkhan (Sun, 05 Feb 2017 05:23:37 GMT):
Has joined the channel.

smfaizalkhan (Sun, 05 Feb 2017 06:59:39 GMT):
Hello All

ruslan.kryukov (Sun, 05 Feb 2017 12:36:48 GMT):
Has joined the channel.

schwentker2 (Sun, 05 Feb 2017 15:50:10 GMT):
Has joined the channel.

Honglei (Sun, 05 Feb 2017 23:56:56 GMT):
Has joined the channel.

malik-altaf (Mon, 06 Feb 2017 04:39:48 GMT):
Has joined the channel.

ankitkamra (Mon, 06 Feb 2017 05:25:56 GMT):
Has joined the channel.

ankitkamra (Mon, 06 Feb 2017 05:26:30 GMT):
Hi all, i am trying to deploy chaincode using java sdk when i deploy chaincode with noops it successfully gets deployed, but when i try it with pbft it does not get deploy can anyone please help me to resolve the problem ?

yury (Mon, 06 Feb 2017 08:50:46 GMT):
do you try to deploy java chaincode?

ankitkamra (Mon, 06 Feb 2017 08:53:18 GMT):
yes

ankitkamra (Mon, 06 Feb 2017 08:54:08 GMT):
@yury i have tried to deploy java chaincode

yury (Mon, 06 Feb 2017 09:03:53 GMT):
https://jira.hyperledger.org/browse/FAB-1407

yury (Mon, 06 Feb 2017 09:04:31 GMT):
on the current moment we have task

pd93 (Mon, 06 Feb 2017 09:27:53 GMT):
Has joined the channel.

Jonas.Hedin (Mon, 06 Feb 2017 09:47:06 GMT):
Has joined the channel.

david.peyronnin (Mon, 06 Feb 2017 09:53:50 GMT):
Has joined the channel.

ankitkamra (Mon, 06 Feb 2017 09:54:59 GMT):
ohh that means i can't do the same in v0.6

klorenz (Mon, 06 Feb 2017 16:06:27 GMT):
Has joined the channel.

pschnap (Mon, 06 Feb 2017 18:54:19 GMT):
Has joined the channel.

weeds (Mon, 06 Feb 2017 20:28:05 GMT):
Has joined the channel.

AlexeyZavyalov (Mon, 06 Feb 2017 21:48:54 GMT):
Has joined the channel.

liutc (Tue, 07 Feb 2017 01:04:43 GMT):
Has joined the channel.

tarima (Tue, 07 Feb 2017 01:10:08 GMT):
Has joined the channel.

ArnabChatterjee (Tue, 07 Feb 2017 03:11:48 GMT):
Has joined the channel.

mbaizan (Tue, 07 Feb 2017 07:45:14 GMT):
Has joined the channel.

zlliu (Tue, 07 Feb 2017 08:18:44 GMT):
Has joined the channel.

Rymd (Tue, 07 Feb 2017 09:29:53 GMT):
Has joined the channel.

choojoyq (Tue, 07 Feb 2017 09:36:46 GMT):
Has joined the channel.

brianeno (Tue, 07 Feb 2017 10:48:52 GMT):
Has joined the channel.

nickmelis (Tue, 07 Feb 2017 12:59:02 GMT):
Has joined the channel.

shsedghi (Tue, 07 Feb 2017 14:21:35 GMT):
Has joined the channel.

ardashev120101 (Tue, 07 Feb 2017 14:59:42 GMT):
Has joined the channel.

cbf (Tue, 07 Feb 2017 15:15:47 GMT):
Has joined the channel.

mihaig (Tue, 07 Feb 2017 15:18:27 GMT):
Has joined the channel.

umasuthan (Tue, 07 Feb 2017 16:05:01 GMT):
Has joined the channel.

isramos (Tue, 07 Feb 2017 16:05:11 GMT):
Has joined the channel.

HieuDoan (Tue, 07 Feb 2017 16:07:02 GMT):
Has joined the channel.

robear (Tue, 07 Feb 2017 16:33:57 GMT):
Has joined the channel.

jworthington (Tue, 07 Feb 2017 16:45:22 GMT):
Has joined the channel.

adrianhopebailie (Tue, 07 Feb 2017 19:05:29 GMT):
Has joined the channel.

tbrooke (Tue, 07 Feb 2017 20:20:19 GMT):
Has joined the channel.

beauson45 (Tue, 07 Feb 2017 20:59:33 GMT):
Has joined the channel.

mwall (Tue, 07 Feb 2017 21:15:23 GMT):
Has joined the channel.

mgk (Tue, 07 Feb 2017 22:07:44 GMT):
Has joined the channel.

jimthematrix (Wed, 08 Feb 2017 02:37:47 GMT):
Has joined the channel.

jimthematrix (Wed, 08 Feb 2017 02:42:33 GMT):
@rickr @Pardha @malik-altaf is java chaincode support working currently in v1.0? community member is reporting a timeout error from the peer when waiting for java chaincode docker to register (image seems to have been built successfully and launched)

malik-altaf (Wed, 08 Feb 2017 02:44:59 GMT):
@jimthematrix Last thing I know is that satheesh was working on fixing some shim stuff for v1.0 (before the hackfest). @Pardha might be able to provide an update on that fix

jimthematrix (Wed, 08 Feb 2017 02:47:50 GMT):
thanks Altaf, do you know if there's a JIRA for the work Satheesh is doing or the nature of the fix?

Hangyu (Wed, 08 Feb 2017 02:49:15 GMT):
Has joined the channel.

rickr (Wed, 08 Feb 2017 02:50:50 GMT):
@Pardha mentioned to me he expected a patch by tomorrow

Andy Zhang (Wed, 08 Feb 2017 03:00:38 GMT):
Has joined the channel.

ArulmuruganS (Wed, 08 Feb 2017 03:49:28 GMT):
Has joined the channel.

Ashish (Wed, 08 Feb 2017 04:43:10 GMT):
Has joined the channel.

satheeshk (Wed, 08 Feb 2017 09:58:10 GMT):
Has joined the channel.

satheeshk (Wed, 08 Feb 2017 09:59:25 GMT):
I will submit a patch by this evening guys for java chaincode

satheeshk (Wed, 08 Feb 2017 10:01:41 GMT):
@ankitkamra If you are trying to deploy it on v0.6, can you please upload the peer logs

satheeshk (Wed, 08 Feb 2017 10:01:41 GMT):
@ankitkamra If you are trying to deploy it on v0.6, can you please upload the peer logs ?

ankitkamra (Wed, 08 Feb 2017 10:34:08 GMT):
@satheeshk i had deployed chaincode but there was no errors in logs, docker images is not created if i have enabled consensus

Percival Lucena (Wed, 08 Feb 2017 11:37:51 GMT):
Has joined the channel.

Basug (Wed, 08 Feb 2017 12:25:51 GMT):
Hi All - are there steps on how to deploy chain code and test with java sdk ?

Basug (Wed, 08 Feb 2017 12:26:25 GMT):
I have the setup running with docker as detailed in https://hyperledger-fabric.readthedocs.io/en/latest/gettingstarted/

Basug (Wed, 08 Feb 2017 12:35:39 GMT):
I have got 0.6 working fine, but for my use case want to do eventing and wanted to try java sdk

jimthematrix (Wed, 08 Feb 2017 12:46:04 GMT):
@satheeshk thanks, can you post here once the java chaincode patch is ready for review?

satheeshk (Wed, 08 Feb 2017 13:17:30 GMT):
Sure

jadhavajay (Wed, 08 Feb 2017 13:18:26 GMT):
Has joined the channel.

rickr (Wed, 08 Feb 2017 13:40:05 GMT):
Hi @satheeshk Can you please make sure the End2endJavaChaincodeIT.java Integration testcase is running with your fix. FYI Best to look at the README.md for levels of fabric and fabric_ca that we know we work with.

rickr (Wed, 08 Feb 2017 13:41:23 GMT):
On about line 34 there is currently an @Ignore that skips this test.

satheeshk (Wed, 08 Feb 2017 13:46:25 GMT):
ok @rickr , I will include that test to run removing the 'ignore'

kushnir.grigoriy (Wed, 08 Feb 2017 13:49:31 GMT):
Has joined the channel.

Basug (Wed, 08 Feb 2017 14:02:51 GMT):
@satheeshk - are there any instructions for building docker images that work with java sdk ?

rickr (Wed, 08 Feb 2017 14:05:53 GMT):
From what I understand the direction is to not send a Dockerfile at all. In fact we have a todo to remove it from the sending it in the examples.

Basug (Wed, 08 Feb 2017 14:07:31 GMT):
@rickr - so we use dev env setup instructions to build one ?

Basug (Wed, 08 Feb 2017 14:08:25 GMT):
I am wanting to setup one that works with latest version of fabric (the commit level that is specified in readme). Will have to build it for a POC, so was wondering how to do it

tuand (Wed, 08 Feb 2017 14:14:02 GMT):
@elast , any luck pushing your register user code to gerrit ?

elast (Wed, 08 Feb 2017 14:14:02 GMT):
Has joined the channel.

s0rins (Wed, 08 Feb 2017 14:21:07 GMT):
Has joined the channel.

pmcosta1 (Wed, 08 Feb 2017 14:21:56 GMT):
Has joined the channel.

o_drugan (Wed, 08 Feb 2017 14:27:21 GMT):
Has joined the channel.

aybekbuka (Wed, 08 Feb 2017 16:00:29 GMT):
Has joined the channel.

anilmuppalla (Wed, 08 Feb 2017 16:13:58 GMT):
Has joined the channel.

rickr (Wed, 08 Feb 2017 16:37:38 GMT):
Any reason to keep around fabric_v1 and WIP_fabric_v1 ?

choojoyq (Wed, 08 Feb 2017 17:46:12 GMT):
hi, does someone get such error in End2endIT.java test during sending proposal request to endorser?

choojoyq (Wed, 08 Feb 2017 17:46:15 GMT):
Caused by: io.grpc.StatusRuntimeException: UNKNOWN: The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority

rickr (Wed, 08 Feb 2017 18:08:26 GMT):
My sdk code is uptodate and End2endIT works. My fabric is at the level of the specified in the README.md fabric_ca is later also with patches but unrelated .

choojoyq (Wed, 08 Feb 2017 21:06:06 GMT):
thanks, i reconfigured environment following instructions from README.md and now it works fine

zhoupeiwen (Thu, 09 Feb 2017 03:21:25 GMT):
Has joined the channel.

xiejunxi (Thu, 09 Feb 2017 03:26:12 GMT):
Has joined the channel.

Ch3ck (Thu, 09 Feb 2017 12:45:39 GMT):
Has joined the channel.

MustafaOzturk (Thu, 09 Feb 2017 21:37:08 GMT):
Has joined the channel.

MustafaOzturk (Thu, 09 Feb 2017 21:38:29 GMT):
Hello, it seems like there is a bug in the java sdk (version 0.6), where during deploy the function name is not prepended to the ChaincodeInput argument list (the hfc does this right). This causes the init function called during deployment to receive one less argument than what the client sent. How does one contribute a bug fix?

tuand (Thu, 09 Feb 2017 21:43:06 GMT):
@MustafaOzturk you can open a JIRA issue and submit a changeset to gerrit ... gerrit.hyperledger.org and clone project fabric-sdk-java

MustafaOzturk (Thu, 09 Feb 2017 21:44:13 GMT):
how do I submit a changeset to gerrit?

MustafaOzturk (Thu, 09 Feb 2017 21:45:23 GMT):
Also, do I need to be invited to gerrit?

rickr (Thu, 09 Feb 2017 21:46:10 GMT):
Use Linux Fondation ID probably the same you use here

MustafaOzturk (Thu, 09 Feb 2017 21:47:00 GMT):
I logged in here using my google id

tuand (Thu, 09 Feb 2017 21:50:45 GMT):
@MustafaOzturk you need a linux foundation id. log off rocket.chat, go back in and click the big blue bar that says lfid

mdozturk (Thu, 09 Feb 2017 21:59:33 GMT):
Has joined the channel.

mdozturk (Thu, 09 Feb 2017 22:06:40 GMT):
per @greg.haskins, it seems like v0.6 will not be patched anymore. The bug seems to be fixed in the master branch of the sdk (DeploymentProposalBuilder.java line 228)

greg.haskins (Thu, 09 Feb 2017 22:06:40 GMT):
Has joined the channel.

greg.haskins (Thu, 09 Feb 2017 22:07:17 GMT):
to be clear, that is by no means authoritative: that is just my understanding

greg.haskins (Thu, 09 Feb 2017 22:07:35 GMT):
(the freeze on v0.6 I mean)

mdozturk (Thu, 09 Feb 2017 22:08:40 GMT):
Too late, it's set in stone ;)

greg.haskins (Thu, 09 Feb 2017 22:09:16 GMT):
I just didnt want the above to be interpreted as my opinion on the matter ;)

lfeagan (Fri, 10 Feb 2017 03:33:27 GMT):
Has joined the channel.

carlosarturoq (Fri, 10 Feb 2017 05:04:22 GMT):
Has joined the channel.

mastersingh24 (Fri, 10 Feb 2017 11:03:09 GMT):
Has joined the channel.

knagware9 (Fri, 10 Feb 2017 11:06:26 GMT):
Has joined the channel.

ylsGit (Fri, 10 Feb 2017 11:16:08 GMT):
Has joined the channel.

zerppen (Fri, 10 Feb 2017 11:16:29 GMT):
Has joined the channel.

mwall (Fri, 10 Feb 2017 12:11:53 GMT):
Hello! Is there any way to setup ChainCodeID manually and do not use hash code as a chaincodeID in fabric-java-sdk v0.6?

tsnyder (Fri, 10 Feb 2017 13:32:54 GMT):
Has joined the channel.

tsnyder (Fri, 10 Feb 2017 13:42:54 GMT):
Question - Since th registration for events goes through the SDK I thought I would ask the question here. Are rejected trasactions included within the Block Event or do we need to register for them separately?

rickr (Fri, 10 Feb 2017 15:22:18 GMT):
You'll get events for all transaction

tsnyder (Fri, 10 Feb 2017 18:03:50 GMT):
Thanks Rick

tuand (Fri, 10 Feb 2017 18:18:23 GMT):
@elast @rickr updated fabric-ca swagger file https://gerrit.hyperledger.org/r/#/c/5851/2

satheeshk (Fri, 10 Feb 2017 18:31:26 GMT):
@jimthematrix @Pardha @malik-altaf I have submitted the patch for the java chaincode changes here, https://gerrit.hyperledger.org/r/#/c/5859/1

macribas (Sat, 11 Feb 2017 16:54:33 GMT):
Has joined the channel.

Basug (Sun, 12 Feb 2017 18:21:46 GMT):
All - is there a way to listen to events in java , while transactions are submitted by node js application

Basug (Sun, 12 Feb 2017 18:29:37 GMT):
trying to create a client, which listens to transactions happening, without itself having to create deploy/invoke/query

Basug (Sun, 12 Feb 2017 19:27:51 GMT):
nm - figured it out

Basug (Sun, 12 Feb 2017 20:24:31 GMT):
`Common.Payload payload = Common.Payload.parseFrom(envelope.getPayload());`

Basug (Sun, 12 Feb 2017 20:24:43 GMT):
any idea how to extract data from this signed content ?

zerppen (Mon, 13 Feb 2017 04:06:36 GMT):
hi, I am a freshman who want to contribute fabric-sdk-java,could you do me a favor about how to start my task

eheads (Mon, 13 Feb 2017 05:54:29 GMT):
Has joined the channel.

zerppen (Mon, 13 Feb 2017 06:03:32 GMT):
@all

grapebaba (Mon, 13 Feb 2017 06:04:17 GMT):
do you have a LF ID yet?

zerppen (Mon, 13 Feb 2017 06:04:28 GMT):
yeah

grapebaba (Mon, 13 Feb 2017 06:05:09 GMT):
https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-java

zerppen (Mon, 13 Feb 2017 06:05:22 GMT):
thanks

grapebaba (Mon, 13 Feb 2017 06:06:29 GMT):
use 'clone with commit msg hook' to clone the code

zerppen (Mon, 13 Feb 2017 06:08:30 GMT):
I have cloned by git

zerppen (Mon, 13 Feb 2017 06:09:02 GMT):
It's different?

grapebaba (Mon, 13 Feb 2017 06:10:48 GMT):
you mean github?

zerppen (Mon, 13 Feb 2017 06:11:26 GMT):
yeah

grapebaba (Mon, 13 Feb 2017 06:12:17 GMT):
that is a read only mirror

grapebaba (Mon, 13 Feb 2017 06:12:47 GMT):
you should could see the description there

zerppen (Mon, 13 Feb 2017 06:13:59 GMT):
I created a fork,so I can pull my code to github I think

grapebaba (Mon, 13 Feb 2017 06:14:22 GMT):
no

zerppen (Mon, 13 Feb 2017 06:14:33 GMT):
I can push my code?

grapebaba (Mon, 13 Feb 2017 06:14:55 GMT):
hyperledger projects use gerrit for development and code review

zerppen (Mon, 13 Feb 2017 06:15:03 GMT):
ok

zerppen (Mon, 13 Feb 2017 06:15:23 GMT):
u speak Chinese?

grapebaba (Mon, 13 Feb 2017 06:15:37 GMT):
yeah

grapebaba (Mon, 13 Feb 2017 06:15:51 GMT):
you can go to #twg-china

grapebaba (Mon, 13 Feb 2017 06:15:55 GMT):
channel

zerppen (Mon, 13 Feb 2017 06:16:09 GMT):
thanks

Basug (Mon, 13 Feb 2017 11:29:23 GMT):
Getting this error while trying to parse Proposal Response ```com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type. at com.google.protobuf.InvalidProtocolBufferException.invalidWireType(InvalidProtocolBufferException.java:111) at com.google.protobuf.CodedInputStream$ArrayDecoder.skipField(CodedInputStream.java:590) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.(FabricProposalResponse.java:2183) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.(FabricProposalResponse.java:2150) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload$1.parsePartialFrom(FabricProposalResponse.java:2724) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload$1.parsePartialFrom(FabricProposalResponse.java:2719) at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:105) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:125) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:130) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.parseFrom(FabricProposalResponse.java:2340)```

Basug (Mon, 13 Feb 2017 11:29:38 GMT):
```com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type. at com.google.protobuf.InvalidProtocolBufferException.invalidWireType(InvalidProtocolBufferException.java:111) at com.google.protobuf.CodedInputStream$ArrayDecoder.skipField(CodedInputStream.java:590) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.(FabricProposalResponse.java:2183) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.(FabricProposalResponse.java:2150) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload$1.parsePartialFrom(FabricProposalResponse.java:2724) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload$1.parsePartialFrom(FabricProposalResponse.java:2719) at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:105) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:125) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:130) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.parseFrom(FabricProposalResponse.java:2340)```

Basug (Mon, 13 Feb 2017 11:30:25 GMT):
All - getting the error below while trying to parse Proposal Response

Basug (Mon, 13 Feb 2017 11:30:33 GMT):
```com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type. at com.google.protobuf.InvalidProtocolBufferException.invalidWireType(InvalidProtocolBufferException.java:111) at com.google.protobuf.CodedInputStream$ArrayDecoder.skipField(CodedInputStream.java:590) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.(FabricProposalResponse.java:2183) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.(FabricProposalResponse.java:2150) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload$1.parsePartialFrom(FabricProposalResponse.java:2724) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload$1.parsePartialFrom(FabricProposalResponse.java:2719) at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:105) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:125) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:130) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49) at org.hyperledger.fabric.protos.peer.FabricProposalResponse$ProposalResponsePayload.parseFrom(FabricProposalResponse.java:2340)```

Basug (Mon, 13 Feb 2017 11:53:06 GMT):
nm it was issue on my side... it works fine

zwsyjj (Mon, 13 Feb 2017 13:00:30 GMT):
Has joined the channel.

Basug (Mon, 13 Feb 2017 13:34:06 GMT):
If any one wants to write their own BlockListener to listen on events

Basug (Mon, 13 Feb 2017 13:34:14 GMT):
```import org.hyperledger.fabric.protos.common.Common; import org.hyperledger.fabric.protos.peer.Chaincodeevent; import org.hyperledger.fabric.protos.peer.FabricProposal; import org.hyperledger.fabric.protos.peer.FabricProposalResponse; import org.hyperledger.fabric.protos.peer.FabricTransaction; import org.hyperledger.fabric.sdk.events.BlockListener; import org.hyperledger.fabric.sdk.security.CryptoPrimitives; /** * Created by basu on 2/12/17. */ public class MyBlockListener implements BlockListener { CryptoPrimitives cryptoPrimitives; public MyBlockListener(CryptoPrimitives cryptoPrimitives) { this.cryptoPrimitives = cryptoPrimitives; } @Override public void received(Common.Block block) { try { Common.BlockData data = block.getData(); Common.Envelope env = Common.Envelope.parseFrom(data.getDataList().get(0)); Common.Payload payload = Common.Payload.parseFrom(env.getPayload()); FabricTransaction.Transaction transaction = FabricTransaction.Transaction.parseFrom(payload.getData()); FabricTransaction.ChaincodeActionPayload chaincodeActionPayload = FabricTransaction.ChaincodeActionPayload.parseFrom(transaction.getActionsList().get(0).getPayload()); FabricProposalResponse.ProposalResponsePayload proposalResponsePayload = FabricProposalResponse.ProposalResponsePayload.parseFrom(chaincodeActionPayload.getAction().getProposalResponsePayload()); FabricProposal.ChaincodeAction chaincodeAction = FabricProposal.ChaincodeAction.parseFrom(proposalResponsePayload.getExtension()); Chaincodeevent.ChaincodeEvent chaincodeEvent = Chaincodeevent.ChaincodeEvent.parseFrom(chaincodeAction.getEvents()); System.out.println("ChainCodeID : "+chaincodeEvent.getChaincodeID()); System.out.println("EventName : "+chaincodeEvent.getEventName()); System.out.println("TransactionId : "+chaincodeEvent.getTxID()); System.out.println("Payload : "+chaincodeEvent.getPayload().toStringUtf8()); } catch (Exception ex) { ex.printStackTrace(); } } }```

dayubian (Tue, 14 Feb 2017 02:21:44 GMT):
Has joined the channel.

coolsvap (Tue, 14 Feb 2017 13:02:34 GMT):
Has joined the channel.

eddie.allen (Tue, 14 Feb 2017 18:35:26 GMT):
Has joined the channel.

isramos (Tue, 14 Feb 2017 20:30:37 GMT):
I deployed using node.js "chaincodeID" = "mycc", how to use the running "mycc" in java sdk? *queryProposalRequest.setChaincodeID(chainCodeID)* does not support chaincodeID in string format

rickr (Tue, 14 Feb 2017 20:36:43 GMT):
We'll need to add that . Can you open a JIRA bug for this ? Or would you prefer I do ?

isramos (Tue, 14 Feb 2017 20:39:52 GMT):
thanks @rickr - please open the JIRA bug. I'm not too familiar with that yet.

rickr (Tue, 14 Feb 2017 20:40:08 GMT):
Ok will do

suryalanka (Tue, 14 Feb 2017 21:12:49 GMT):
Has joined the channel.

satheeshk (Wed, 15 Feb 2017 05:11:44 GMT):
@malik-altaf Hi Altaf, I have updated the change set addressing your comments. Thanks

donaldsbell (Wed, 15 Feb 2017 14:43:42 GMT):
Has joined the channel.

zerppen (Wed, 15 Feb 2017 14:55:38 GMT):
May I ask a question?java-chaincode how to use method setEvent of chaincodeEvent like go-chaincode SetEvent v0.6

pschnap (Wed, 15 Feb 2017 15:45:52 GMT):
are there any examples yet for using the Java SDK?

tuand (Wed, 15 Feb 2017 15:57:11 GMT):
@pschnap , take a look at the end2endIT test case

pschnap (Wed, 15 Feb 2017 15:57:31 GMT):
thanks @tuand !

pschnap (Wed, 15 Feb 2017 16:18:46 GMT):
hm, there doesn't appear to be any license on that file

tuand (Wed, 15 Feb 2017 16:27:09 GMT):
you're right , prolog is missing in some of the JUnit tests ... would you mind opening a JIRA issue ?

pschnap (Wed, 15 Feb 2017 16:31:38 GMT):
what project should I put it under, Fabric?

pschnap (Wed, 15 Feb 2017 16:32:41 GMT):
(I'm very new to the project)

tuand (Wed, 15 Feb 2017 16:35:54 GMT):
component `fabri-sdk-java`

tuand (Wed, 15 Feb 2017 16:35:54 GMT):
component `fabric-sdk-java`

pschnap (Wed, 15 Feb 2017 16:41:47 GMT):
What should I file it as, Bug?

pschnap (Wed, 15 Feb 2017 16:41:51 GMT):
Task?

pschnap (Wed, 15 Feb 2017 16:48:21 GMT):
Created as task

pschnap (Wed, 15 Feb 2017 16:48:22 GMT):
https://jira.hyperledger.org/browse/FAB-2252

pschnap (Wed, 15 Feb 2017 16:49:14 GMT):
@tuand ^

rameshthoomu (Wed, 15 Feb 2017 18:29:35 GMT):
Has joined the channel.

liutc (Thu, 16 Feb 2017 07:12:36 GMT):
@tuand the Java SDK example you mentioned, is it for v0.6 or v1.0?

Eagel (Thu, 16 Feb 2017 08:33:37 GMT):
Has joined the channel.

Eagel (Thu, 16 Feb 2017 08:45:14 GMT):
I saw there are two branch "WIP_fabric_v1" and "fabric_v1". Which one is for "v1.0.0-preview"?

Eagel (Thu, 16 Feb 2017 08:48:09 GMT):
The fabric "v1.0.0-preview"

wutongtree (Thu, 16 Feb 2017 09:58:29 GMT):
Has joined the channel.

tuand (Thu, 16 Feb 2017 12:06:16 GMT):
The `master` branch is for v1.0 work. There is no preview or alpha branch.

ercw (Thu, 16 Feb 2017 12:09:49 GMT):
Has joined the channel.

Eagel (Thu, 16 Feb 2017 12:15:51 GMT):
Thanks

rickr (Thu, 16 Feb 2017 12:51:42 GMT):
Hi @malik-altaf @Pardha @satheeshk I plan by tomorrow to delete the WIP_fabric_v and fabric_v1 unless I hear from you any good reason to keep them.

rrader (Thu, 16 Feb 2017 15:10:06 GMT):
Has joined the channel.

pschnap (Thu, 16 Feb 2017 19:17:49 GMT):
fyi: just posted https://jira.hyperledger.org/browse/FAB-2273

bobbiejc (Thu, 16 Feb 2017 20:57:00 GMT):
Has joined the channel.

mcoblenz (Thu, 16 Feb 2017 21:00:30 GMT):
Has joined the channel.

mcoblenz (Thu, 16 Feb 2017 21:03:48 GMT):
Has left the channel.

RajkumarNatarajan (Fri, 17 Feb 2017 03:56:42 GMT):
Has joined the channel.

RajkumarNatarajan (Fri, 17 Feb 2017 04:07:59 GMT):
Hi guys

RajkumarNatarajan (Fri, 17 Feb 2017 04:08:04 GMT):
I am rajkumar

RajkumarNatarajan (Fri, 17 Feb 2017 04:08:36 GMT):
I want to work with this team and contribute to fabric-sdk-java

RajkumarNatarajan (Fri, 17 Feb 2017 04:09:46 GMT):
Can anyone hep me with Jira access and github access

rameshthoomu (Fri, 17 Feb 2017 04:12:35 GMT):
@RajkumarNatarajan I would suggest you to go through this doc and create a LFID to get access to Gerrit and JIRA http://hyperledger-fabric.readthedocs.io/en/latest/Gerrit/lf-account/

RajkumarNatarajan (Fri, 17 Feb 2017 04:12:59 GMT):
@rameshthoomu

RajkumarNatarajan (Fri, 17 Feb 2017 04:13:07 GMT):
Thanks

RajkumarNatarajan (Fri, 17 Feb 2017 04:13:23 GMT):
I will go through it nad get back if I need any help

rameshthoomu (Fri, 17 Feb 2017 04:14:11 GMT):
sure

mwall (Fri, 17 Feb 2017 16:52:25 GMT):
Hello! How can I handle this `panic: Own checkpoint for seqNo 30 (CAsSQIpPFvKebFWy+m2TAdP7aTd81EC3AJo6sSU5TgG4xq3+bH74yJxkYDZzHQmQEpyl9hTrtl6Uqa004oFNTZtFG0AaQMcwvg2v92PjvmzVXH3KoPBNvGnPJAeBbivC6EKWSWQIVfTcJUAf1v+AkBxX77MQetWpLWTvx7riohEPPuhOOHk=) different from weak checkpoint certificate (CAsSQAlFXxAlQbHSQicJBptYJQTa2pgfTRuP5cPMbPY8hmNAlIMDj9kRgouWRddx7AAryuf92OD4QoC/gAxnlsxnx+MaQOYL4z+XcjXGbTCxcmAcd2XPFOK1sQHDTm1FJinLjmIeWEt+xlTspwUXhUGrG5AhzmXBsW39rDBqmouHoYfg84o=)`

rickr (Fri, 17 Feb 2017 16:56:33 GMT):
@mwall V.6 ?

tuand (Fri, 17 Feb 2017 16:59:19 GMT):
@mwall `weak checkpoint cert` points to v0.6 consensus ... I see you're already on #fabric-consensus

mwall (Fri, 17 Feb 2017 16:59:39 GMT):
yep, v.6

mwall (Fri, 17 Feb 2017 17:00:10 GMT):
okey, will try to find solution in fabric-consensus

harrijk (Fri, 17 Feb 2017 19:34:20 GMT):
Has joined the channel.

andyz (Sat, 18 Feb 2017 11:28:39 GMT):
Has joined the channel.

RajkumarNatarajan (Sun, 19 Feb 2017 01:44:02 GMT):
Hi Team

RajkumarNatarajan (Sun, 19 Feb 2017 01:44:31 GMT):
I am going through http://hyperledger-fabric.readthedocs.io/en/latest/Gerrit/lf-account/ to set up account

RajkumarNatarajan (Sun, 19 Feb 2017 01:44:55 GMT):

Message Attachments

RajkumarNatarajan (Sun, 19 Feb 2017 01:45:05 GMT):
I am getting error the above error

RajkumarNatarajan (Sun, 19 Feb 2017 01:45:57 GMT):
I am able to login https://gerrit.hyperledger.org/ with the userid/password

RajkumarNatarajan (Sun, 19 Feb 2017 01:46:07 GMT):
but checkout code is giving error

RajkumarNatarajan (Sun, 19 Feb 2017 01:48:21 GMT):
Also I have added ssh public key to my gerrit profile

rameshthoomu (Sun, 19 Feb 2017 02:04:42 GMT):
@RajkumarNatarajan : clone project with `clone with commit msg-hook` and choose `ssh` option

rameshthoomu (Sun, 19 Feb 2017 02:05:45 GMT):

Message Attachments

RajkumarNatarajan (Sun, 19 Feb 2017 02:09:48 GMT):
kool

RajkumarNatarajan (Sun, 19 Feb 2017 02:09:58 GMT):
Thanks @rameshthoomu

RajkumarNatarajan (Sun, 19 Feb 2017 02:10:11 GMT):
it worked :thumbsup:

jimthematrix (Mon, 20 Feb 2017 02:52:35 GMT):
@satheeshk @rickr @greg.haskins can I ask the current state of things with the java chaincode? if I want to deploy java chaincode, is there any remaining work in the peer and docker build to support this? how does the SDK package up the chaincode source files?

ascatox (Mon, 20 Feb 2017 10:17:51 GMT):
Has joined the channel.

yury (Mon, 20 Feb 2017 12:38:15 GMT):
hi, why I can not call 'qscc' from java sdk? I get following error: "chainID qscc provided for a chainless syscc"

kleman (Mon, 20 Feb 2017 13:40:08 GMT):
Has joined the channel.

rickr (Mon, 20 Feb 2017 13:47:53 GMT):
FYI Gerrit patches Verify are now being tested with full End2endIT test being done. Big thanks to @rameshthoomu ! There are some kinks where we are seeing false postives so its probably *always* good pratice for the final merge to check the console log for a `Query payload of b returned 300` The Fabric and Fabric_ca commit levels that are tested against are in src/test/fabric_test_commitlevel.sh. This should match what we document in the README.md

rrader (Mon, 20 Feb 2017 14:34:52 GMT):
https://github.com/hyperledger/fabric-sdk-java#using-the-sdk `Chain testChain = new Chain("chain1");` It says "Chain is not public", can you fix that on github please, and change how it must be

rickr (Mon, 20 Feb 2017 17:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y5N8FigtXRY4c8TsF) @jimthematrix @sanchezl is going to look at trying this out on the latest Gerrit patch that submitted. @Satheesh Kathamuthu can you work on this too ?

rickr (Mon, 20 Feb 2017 17:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y5N8FigtXRY4c8TsF) @jimthematrix @sanchezl is going to look at trying this out on the latest Gerrit patch https://gerrit.hyperledger.org/r/#/c/6073/ that submitted. @Satheesh Kathamuthu can you work on this too ?

rickr (Mon, 20 Feb 2017 17:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y5N8FigtXRY4c8TsF) @jimthematrix @sanchezl is going to look at trying this out on the latest Gerrit patch https://gerrit.hyperledger.org/r/#/c/6073/ that submitted. @Satheesh Kathamuthu can you work on this too ?

rickr (Mon, 20 Feb 2017 17:52:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y5N8FigtXRY4c8TsF) @jimthematrix @sanchezl is going to look at trying this out on the latest Gerrit patch https://gerrit.hyperledger.org/r/#/c/6073/ that submitted. @satheeshk can you work on this too ?

sanchezl (Mon, 20 Feb 2017 17:52:00 GMT):
Has joined the channel.

jimthematrix (Mon, 20 Feb 2017 17:55:14 GMT):
thanks Rick

jimthematrix (Mon, 20 Feb 2017 17:56:02 GMT):
we need to get this sorted out in the next couple of days, thanks @sanchezl for help

jimthematrix (Mon, 20 Feb 2017 18:07:54 GMT):
please give @Ratnakar a heads up

Ratnakar (Mon, 20 Feb 2017 18:07:54 GMT):
Has joined the channel.

jimthematrix (Mon, 20 Feb 2017 18:08:12 GMT):
so his sample app can be modified accordingly

Ying (Tue, 21 Feb 2017 02:05:43 GMT):
Has joined the channel.

Ying (Tue, 21 Feb 2017 02:43:50 GMT):
hi, I'm trying java sdk and run into maven dependencies conflict. Any suggestions? Thanks. Failed to execute goal on project fabric-sdk-java: Could not resolve dependencies for project org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.0-SNAPSHOT: Failed to collect dependencies at io.grpc:grpc-netty:jar:1.0.3 -> io.grpc:grpc-core:jar:[1.0.3]

zerppen (Tue, 21 Feb 2017 06:24:38 GMT):
io.grpc grpc-netty ${grpc.version} io.grpc grpc-protobuf ${grpc.version} io.grpc grpc-stub ${grpc.version}

zerppen (Tue, 21 Feb 2017 06:24:57 GMT):
0.15.0

zerppen (Tue, 21 Feb 2017 06:25:16 GMT):
@Ying try using this

rrader (Tue, 21 Feb 2017 08:07:27 GMT):
Why `Chain` https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/Chain.java don't have public constructor? How to create a `Chain` object?

kleman (Tue, 21 Feb 2017 09:14:39 GMT):
in V1, you can try this :

kleman (Tue, 21 Feb 2017 09:14:43 GMT):
```HFClient hfclient = null; Chain testChain = null; hfclient = HFClient.createNewInstance(); testChain = hfclient.newChain(CHAIN_NAME); ```

kleman (Tue, 21 Feb 2017 09:19:54 GMT):
Hi, i'm trying to deploy java chaincode to IBM bluemix running fabric v0,6 but the fabric sdk java seems not support grpcS used by the Membership Services, any workaround ?

kleman (Tue, 21 Feb 2017 09:19:54 GMT):
Hi, i'm trying to deploy java chaincode to IBM bluemix running fabric v0,6 but the fabric sdk java seems not supported grpcS used by the Membership Services, any workaround ?

rrader (Tue, 21 Feb 2017 09:21:32 GMT):
I am also trying `testChain.setMemberServicesUrl("grpc://localhost:7054", null);` and get *java.net.MalformedURLException: unknown protocol: grpc*

kleman (Tue, 21 Feb 2017 09:21:54 GMT):
in V1 or v0,6 ?

rrader (Tue, 21 Feb 2017 09:22:26 GMT):
V1

kleman (Tue, 21 Feb 2017 09:26:03 GMT):
i do not have this issue using this dependency instead of those listed upper

kleman (Tue, 21 Feb 2017 09:26:06 GMT):
``` io.grpc grpc-all 1.1.2 ```

rrader (Tue, 21 Feb 2017 09:31:06 GMT):
I am using gradle, and I have `compile group: 'io.grpc', name: 'grpc-all', version: '1.1.2'` in dependencies

kleman (Tue, 21 Feb 2017 09:32:47 GMT):
ok, if you're also using "shim-client" as dependency maybe there is a dependency conflict

kleman (Tue, 21 Feb 2017 09:32:58 GMT):
it was my problem

rrader (Tue, 21 Feb 2017 09:33:44 GMT):
no, I only have 2 dependencies ``` compile group: 'io.grpc', name: 'grpc-all', version: '1.1.2' compile group: 'org.hyperledger.fabric-sdk-java', name: 'fabric-sdk-java', version: '1.0-SNAPSHOT' ```

kleman (Tue, 21 Feb 2017 09:34:54 GMT):
ok

kleman (Tue, 21 Feb 2017 09:35:22 GMT):
maybe try to add the memberserviceurl like this :

kleman (Tue, 21 Feb 2017 09:35:26 GMT):
``` MemberServices memberServices = new MemberServicesFabricCAImpl("https://d279de66429f4c0e8ab63572b0f2cf94-ca.us.blockchain.ibm.com:30001", null); testChain.setMemberServices(memberServices);```

kleman (Tue, 21 Feb 2017 09:36:48 GMT):
my bad, grpcs seems to work with v1.0

kleman (Tue, 21 Feb 2017 09:38:36 GMT):
but the sdk v1 is still unachieved, i have th following issue when i try to enroll : `at org.hyperledger.fabric.sdk.MemberServicesFabricCAImpl.enroll(MemberServicesFabricCAImpl.java:289) => org.hyperledger.fabric.sdk.exception.RegistrationException: TODO`

kleman (Tue, 21 Feb 2017 09:38:36 GMT):
but the sdk v1 is still unachieved, i have th following issue when i try to enroll : `org.hyperledger.fabric.sdk.MemberServicesFabricCAImpl.enroll(MemberServicesFabricCAImpl.java:289) => org.hyperledger.fabric.sdk.exception.RegistrationException: TODO`

kleman (Tue, 21 Feb 2017 09:41:38 GMT):
my bad with grpcs => java.net.MalformedURLException: unknown protocol: grpcs

rrader (Tue, 21 Feb 2017 09:42:14 GMT):
yeap, I got this exception too

kleman (Tue, 21 Feb 2017 09:43:13 GMT):
same issue with grpc

Ying (Tue, 21 Feb 2017 09:43:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=M6nqTP2MJYqAf6fBf) @zerppen Tried, with maven cache cleared, but still stuck.

kleman (Tue, 21 Feb 2017 09:44:58 GMT):
@Ying have you try this one : ``` io.grpc grpc-all 1.1.2 ```

kleman (Tue, 21 Feb 2017 09:44:58 GMT):
@Ying have you try this one : ``` io.grpc grpc-all 1.1.2 ```

Ying (Tue, 21 Feb 2017 09:48:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=r7Nwums6NbzsYCFzN) @kleman Yes, but not work. Thanks kleman

kleman (Tue, 21 Feb 2017 09:50:48 GMT):
@Ying have you rebuild the sdk using theses dependencies ?

Ying (Tue, 21 Feb 2017 09:52:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=X2E2TnPcgvvh66X9t) @kleman I did: modify pom file, then delete maven cache, then update project

kleman (Tue, 21 Feb 2017 09:55:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ipL3jL6k7xHNH79yg) it was looking for version [1.0.3] but he code submited by zerppen is 0.15.0

kleman (Tue, 21 Feb 2017 09:55:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ipL3jL6k7xHNH79yg) it was looking for version [1.0.3] but the code submited by zerppen is 0.15.0

kleman (Tue, 21 Feb 2017 09:55:37 GMT):
maybe try ths ``` 1.0.3 ```

kleman (Tue, 21 Feb 2017 09:55:37 GMT):
maybe try ths ```1.0.3```

kleman (Tue, 21 Feb 2017 09:55:37 GMT):
maybe try ths `1.0.3`

kleman (Tue, 21 Feb 2017 09:55:53 GMT):
``` io.grpc grpc-netty ${grpc.version} io.grpc grpc-protobuf ${grpc.version} io.grpc grpc-stub ${grpc.version} ````

kleman (Tue, 21 Feb 2017 09:55:53 GMT):
``` io.grpc grpc-netty ${grpc.version} io.grpc grpc-protobuf ${grpc.version} io.grpc grpc-stub ${grpc.version} ```

Ying (Tue, 21 Feb 2017 09:57:55 GMT):
Doesn't change?

kleman (Tue, 21 Feb 2017 09:59:54 GMT):
grpc version is not the same

kleman (Tue, 21 Feb 2017 10:00:39 GMT):
an other solution is maybe to build using gradle instead of maven

Ying (Tue, 21 Feb 2017 10:06:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZjMtW3pEm3cEbWm2L) @kleman got it, thanks

kleman (Tue, 21 Feb 2017 10:07:23 GMT):
you're welcome

rrader (Tue, 21 Feb 2017 12:36:04 GMT):
Where I can open an issue?

rrader (Tue, 21 Feb 2017 12:36:04 GMT):
Where can I open an issue?

rickr (Tue, 21 Feb 2017 12:37:23 GMT):
https://jira.hyperledger.org

psa (Wed, 22 Feb 2017 15:56:55 GMT):
Has joined the channel.

sloveland (Wed, 22 Feb 2017 16:21:26 GMT):
Has joined the channel.

Ying (Thu, 23 Feb 2017 07:38:09 GMT):
Has left the channel.

Jonas.Hedin (Thu, 23 Feb 2017 09:56:02 GMT):
Has left the channel.

uber.twin (Thu, 23 Feb 2017 14:35:27 GMT):
Has joined the channel.

uber.twin (Thu, 23 Feb 2017 14:43:21 GMT):
hi, is there a tutorial showing how to deploy and invoke chaincode using the java sdk, similarly to what is presented here, using nodejs: https://hyperledger-fabric.readthedocs.io/en/latest/asset_sdk/

rickr (Thu, 23 Feb 2017 14:44:46 GMT):
which version ?

rrader (Thu, 23 Feb 2017 14:49:51 GMT):
v1

uber.twin (Thu, 23 Feb 2017 15:05:23 GMT):
it seems my java sdk has (at least) an unresolved import statement i.e. : import org.hyperledger.fabric.protos...

uber.twin (Thu, 23 Feb 2017 15:06:16 GMT):
might anybody have an idea about which dependency I'm missing?

rickr (Thu, 23 Feb 2017 15:08:03 GMT):
have you followed the README.md ?

uber.twin (Thu, 23 Feb 2017 15:17:27 GMT):
doesn't seem relevant given the context

uber.twin (Thu, 23 Feb 2017 15:20:06 GMT):
it ain't addressing my question:)

rickr (Thu, 23 Feb 2017 15:20:27 GMT):
missing imports ?

uber.twin (Thu, 23 Feb 2017 15:20:44 GMT):
yes

rickr (Thu, 23 Feb 2017 15:21:05 GMT):
what happens when you run mvn install ?

uber.twin (Thu, 23 Feb 2017 15:22:15 GMT):
it downloaded lots of jar in my local repository but seems like none of them contains such package(org.hyperledger.fabric.protos)

rickr (Thu, 23 Feb 2017 15:23:40 GMT):
Do you have now target/generated-sources/protobuf/java/org/hyperledger/fabric/protos ?

uber.twin (Thu, 23 Feb 2017 15:23:52 GMT):
oh actually there might by one, sorry

uber.twin (Thu, 23 Feb 2017 15:24:03 GMT):
than the classpath is no good

uber.twin (Thu, 23 Feb 2017 15:24:37 GMT):
alright, thanks

uber.twin (Thu, 23 Feb 2017 15:37:00 GMT):
I just expected that the project's standard maven dependencies to implicitly include this package

uber.twin (Thu, 23 Feb 2017 15:39:29 GMT):
my /target/generated-sources/protobuf is still empty but I got them in .m2/repository/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0-SNAPSHOT

uber.twin (Thu, 23 Feb 2017 15:46:57 GMT):
and that was because I ran "mvn" instead of "mvn install":)

rickr (Thu, 23 Feb 2017 18:28:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=W2Cz4wHy5ap4L6Zqh) @uber.twin what is in the README.md under comiling ?

rickr (Thu, 23 Feb 2017 18:28:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=W2Cz4wHy5ap4L6Zqh) @uber.twin what is in the README.md under compiling ?

ianj_mitchell@uk.ibm.com (Thu, 23 Feb 2017 20:55:38 GMT):
Has joined the channel.

rnair@itbit.com (Thu, 23 Feb 2017 21:50:25 GMT):
Has joined the channel.

CarlXK (Fri, 24 Feb 2017 02:04:41 GMT):
Has joined the channel.

pd93 (Fri, 24 Feb 2017 10:16:26 GMT):
Has left the channel.

nickmelis (Fri, 24 Feb 2017 11:50:45 GMT):
using v0.6, it looks like if I try to enroll a user with the wrong secret, I'm then not able to re-enroll it with the right one anymore. Is that the case?

nickmelis (Fri, 24 Feb 2017 12:05:08 GMT):
sorry let me rephrase, if I enroll a user with the right key, I can't re-enroll it without getting an error. So how long does the enrollment last for?

nickmelis (Fri, 24 Feb 2017 12:08:09 GMT):
that means if for any reason the enrollment in the test.properties is misplaced, I will never be able to enroll again until I reset the ledger

nickmelis (Fri, 24 Feb 2017 12:17:39 GMT):
and it looks like there's no way to "un-enroll" too

rickr (Fri, 24 Feb 2017 13:15:18 GMT):
q

uber.twin (Fri, 24 Feb 2017 13:43:43 GMT):
@rickr hi, any advice on this error?

uber.twin (Fri, 24 Feb 2017 13:43:44 GMT):
Running org.hyperledger.fabric.sdk.End2endIT log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Feb 24, 2017 3:39:36 PM io.grpc.internal.ManagedChannelImpl INFO: [ManagedChannelImpl@5bb21b69] Created with target localhost:8051 Feb 24, 2017 3:39:37 PM io.grpc.internal.ManagedChannelImpl INFO: [ManagedChannelImpl@6950ed69] Created with target localhost:8053 Creating deployment proposal Deploying chain code with a and b set to 100 and 200 respectively Received 1 deployment proposal responses. Successful+verified: 0 . Failed: 1 Caught an exception java.lang.Exception: Not enough endorsers :0. Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP DEFAULT is unknown, cause=null} at org.hyperledger.fabric.sdk.End2endIT.setup(End2endIT.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

rickr (Fri, 24 Feb 2017 13:45:11 GMT):
are you using the fabric level in the README.md ?

uber.twin (Fri, 24 Feb 2017 13:49:08 GMT):
probably not, I was trying to reuse same platform installed by the docker compose from here curl -L https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sfhackfest/sfhackfest.tar.gz -o sfhackfest.tar.gz 2> /dev/null; tar -xvf sfhackfest.tar.gz

uber.twin (Fri, 24 Feb 2017 13:52:13 GMT):
so it's a compatibility issue than?

rickr (Fri, 24 Feb 2017 13:53:14 GMT):
Only version we've tested what's in master is what's documneted in the README.md

uber.twin (Fri, 24 Feb 2017 13:56:30 GMT):
ok, thanks, I'll try to build a dedicated platform for java-sdk, I thought I could reuse what I already had tested with the node sdk

uber.twin (Fri, 24 Feb 2017 15:36:10 GMT):
the routine for build a fabric environment doesn't seem very straight forward

uber.twin (Fri, 24 Feb 2017 15:36:22 GMT):
isn't there a docker-compose spec which gets whats needed just as the docker-compose-gettingstarted.yml in the sfhackfest setup does for node sdk?

rickr (Fri, 24 Feb 2017 15:51:33 GMT):
No not at the moment.

RajkumarNatarajan (Sun, 26 Feb 2017 20:29:35 GMT):
hi team

RajkumarNatarajan (Sun, 26 Feb 2017 20:29:44 GMT):
I am using eclipse IDE

RajkumarNatarajan (Sun, 26 Feb 2017 20:29:54 GMT):
and I am getting compilation errors

RajkumarNatarajan (Sun, 26 Feb 2017 20:30:23 GMT):

Message Attachments

RajkumarNatarajan (Sun, 26 Feb 2017 20:30:51 GMT):
but when I compile using `mvn clean compile test`

RajkumarNatarajan (Sun, 26 Feb 2017 20:31:04 GMT):
the compilation and unit tests are running fine

RajkumarNatarajan (Sun, 26 Feb 2017 20:31:18 GMT):
Any idea/suggesstion

RajkumarNatarajan (Sun, 26 Feb 2017 20:31:18 GMT):
Any idea/suggesstion?

RajkumarNatarajan (Sun, 26 Feb 2017 20:31:18 GMT):
?

tuand (Mon, 27 Feb 2017 02:35:50 GMT):
@RajkumarNatarajan it looks like you're missing the step that generates the java protobuf files ... You should import as a maven project and run `mvn install` ... the README.md describes what you need to get going

RajkumarNatarajan (Mon, 27 Feb 2017 02:36:21 GMT):
thanks @tuand

RajkumarNatarajan (Mon, 27 Feb 2017 02:36:29 GMT):
let me try this

RajkumarNatarajan (Mon, 27 Feb 2017 02:52:21 GMT):
@tuand It solved the eclipse problem

RajkumarNatarajan (Mon, 27 Feb 2017 02:52:25 GMT):
thanks alot

RajkumarNatarajan (Mon, 27 Feb 2017 02:52:25 GMT):
thanks a lot

RajkumarNatarajan (Mon, 27 Feb 2017 02:53:33 GMT):
one more question

RajkumarNatarajan (Mon, 27 Feb 2017 02:53:39 GMT):
I am setting up my local

RajkumarNatarajan (Mon, 27 Feb 2017 02:53:52 GMT):
as mentioned in link https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devenv.md

RajkumarNatarajan (Mon, 27 Feb 2017 02:54:28 GMT):
the below command is failing

RajkumarNatarajan (Mon, 27 Feb 2017 02:55:22 GMT):

Message Attachments

RajkumarNatarajan (Mon, 27 Feb 2017 02:55:47 GMT):
pip install -I flask==0.10.1 python-dateutil==2.2 pytz==2014.3 pyyaml==3.10 couchdb==1.0 flask-cors==2.0.1 requests==2.4.3 pyOpenSSL==16.2.0 sha3==0.2.1

RajkumarNatarajan (Mon, 27 Feb 2017 02:56:12 GMT):
the above command is failing with error in screenshot

RajkumarNatarajan (Mon, 27 Feb 2017 02:56:27 GMT):
I am using Fedora 25 OS

rickr (Mon, 27 Feb 2017 02:58:07 GMT):
What were you doing there ?

rickr (Mon, 27 Feb 2017 02:59:23 GMT):
If that's building the fabric it self you should ask on the fabric-dev-env channel

RajkumarNatarajan (Mon, 27 Feb 2017 03:08:47 GMT):
@rickr I am sorry

RajkumarNatarajan (Mon, 27 Feb 2017 03:08:54 GMT):
I resolved the issue

RajkumarNatarajan (Mon, 27 Feb 2017 03:09:10 GMT):
I should have googled a bit before posted that question

RajkumarNatarajan (Mon, 27 Feb 2017 03:09:27 GMT):
I was missing some redhat depnedencies

hyp0th3rmi4 (Mon, 27 Feb 2017 07:49:54 GMT):
Has joined the channel.

zerppen (Mon, 27 Feb 2017 08:12:43 GMT):
Excuse,me.I created two fabric v0.6 environments.Firstly,I excuted "make peer" and "SimpleSample chaincode" refering to JAVAChaincode.md successfully for two.i changed one of them(I added some methods like setEvent,getRows) Java-shim(fabric/core/chaincode/shim/java for my Chaincode,another is original.All "make peer" successfully.But when I tested the SimpleSample ,the first one show that " [chaincode] Launch -> ERRO 01a launchAndWaitForRegister failed Timeout expired while starting chaincode " .I noticed that the first one lost a step of "[genesis] funcl -> INFO 00f Creating genesis bock"when I excuted "peer node start" after raising startuptimeout and deploytimeout for serveral times.So,it is a bug?

Rymd (Mon, 27 Feb 2017 08:22:03 GMT):
I'm getting an error when running End2endIT.java test. ```Creating install proposal 2017-02-27 09:17:20 ERROR Chain:791 - Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=invalid function to lccc install, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: invalid function to lccc install at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:791) at org.hyperledger.fabric.sdk.Chain.sendInstallProposal(Chain.java:662) at org.hyperledger.fabric.sdk.End2endIT.setup(End2endIT.java:111)``` What is wrong?

rickr (Tue, 28 Feb 2017 13:15:59 GMT):
*FYI* Commited change that upped V1.0's fabric version.

Jonas.Hedin (Tue, 28 Feb 2017 14:30:54 GMT):
Has joined the channel.

rickr (Wed, 01 Mar 2017 01:57:39 GMT):
Had @rjones add a gerrit group `cr-fabric-sdk-java` if you put that into the reviewers it will add all the maintainer in one shot.

rjones (Wed, 01 Mar 2017 01:57:39 GMT):
Has joined the channel.

rickr (Wed, 01 Mar 2017 01:59:09 GMT):

Message Attachments

rickr (Wed, 01 Mar 2017 01:59:53 GMT):

Message Attachments

Sky (Wed, 01 Mar 2017 06:45:02 GMT):
Has joined the channel.

Rymd (Wed, 01 Mar 2017 09:40:49 GMT):
why doesn't install work with lccc. Im using the same commit levels in `src/test/fabric_test_commitlevel.sh`?

suganuma (Wed, 01 Mar 2017 14:17:59 GMT):
Has joined the channel.

rickr (Wed, 01 Mar 2017 15:21:29 GMT):
FYI Change was introduced that affects api. Best to sync that change

rickr (Wed, 01 Mar 2017 15:21:29 GMT):
FYI Change was introduced that affects api. Best to sync to that change

Donald Liu (Thu, 02 Mar 2017 01:27:57 GMT):
Has joined the channel.

zhaochy (Thu, 02 Mar 2017 05:26:06 GMT):
Has joined the channel.

zhaochy (Thu, 02 Mar 2017 05:29:40 GMT):
hi team, I'm trying the fabric-sdk-java with fabric v1.0 preview, I tried the branch master and fabric_v1, but both get error. It seems the org.hyperledger.fabric.sdk.Chain doesn't have a public constructor.

bh4rtp (Thu, 02 Mar 2017 06:22:59 GMT):
Has joined the channel.

lohitkrishnan (Thu, 02 Mar 2017 09:33:23 GMT):
Has joined the channel.

aghaneka (Thu, 02 Mar 2017 14:20:09 GMT):
Has joined the channel.

aghaneka (Thu, 02 Mar 2017 14:23:21 GMT):
Why org.hyperledger.fabric.sdk.PeerClientTest is not compiling? I wanted to try deploy and query of chaincode.

rickr (Thu, 02 Mar 2017 14:35:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iX9LEFe3SbanNZB65) README.md *Using the SDK* will help

rickr (Thu, 02 Mar 2017 14:35:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iX9LEFe3SbanNZB65) README.md *Using the SDK* will help see example code

rickr (Thu, 02 Mar 2017 14:40:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=a9R8evehJpnEqgXDE) Did you do the steps in README.md *Compiling* section ? I assume yes, can paste us some output of that to help us out ?

rickr (Thu, 02 Mar 2017 14:41:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=a9R8evehJpnEqgXDE) Did you follow the steps in READM.md *Compiling* I'll assume yes. Could you paste some how that failed here so we might help?

rickr (Thu, 02 Mar 2017 14:41:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=a9R8evehJpnEqgXDE) Did you follow the steps in READM.md *Compiling* I'll assume yes. Could you paste how that failed here so we might help?

rickr (Thu, 02 Mar 2017 14:41:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=a9R8evehJpnEqgXDE) Did you follow the steps in READM.md *Compiling* I'll assume yes. Could you paste it here so we might help?

aghaneka (Thu, 02 Mar 2017 15:32:53 GMT):
@rickr Thanks for your help. I will get back to you.

rickr (Thu, 02 Mar 2017 15:38:40 GMT):
*FYI* Latest code updates includes creating an new Channel (aka Chain) . Joining Peers to the Channel. Currently chain creation is limited to only creating chains to a single organization . End2endIT.java has been updated to demo this.

zerppen (Thu, 02 Mar 2017 16:25:32 GMT):
Hi,guys. On line 248 of User.java of master branch,the memberServices should be MemberServicesFabricCAImpl?

rickr (Thu, 02 Mar 2017 16:32:56 GMT):
Old code from v.6 Please look at End2EndIT.java how to enroll .. it may change in up coming days too.

zerppen (Thu, 02 Mar 2017 16:34:54 GMT):
ok...

zerppen (Thu, 02 Mar 2017 16:35:14 GMT):
thanks

rickr (Thu, 02 Mar 2017 16:36:43 GMT):
Also at the moment we don't support register so only the Admin who is already registered can actually enroll ... great security feature :) We hope to have register implemented in the coming days so the admin can register other users .. who can then enroll

zerppen (Thu, 02 Mar 2017 16:37:51 GMT):
Enrollment enrollment = null; //need access in test env.

zerppen (Thu, 02 Mar 2017 16:37:59 GMT):
I noticed

zerppen (Thu, 02 Mar 2017 16:40:09 GMT):
so we should enroll each time

rickr (Thu, 02 Mar 2017 16:47:09 GMT):
users enrolled state is kept in a key store .. If you look at End2endIt.java we wipe that out so it does an enroll each time

zerppen (Thu, 02 Mar 2017 16:53:52 GMT):
File fileStore = new File(System.getProperty("user.home") + "/test.properties"); if (fileStore.exists()) { fileStore.delete(); }

zerppen (Thu, 02 Mar 2017 16:54:40 GMT):
but the key store file will be deleted

rickr (Thu, 02 Mar 2017 16:55:10 GMT):
For that test

zerppen (Thu, 02 Mar 2017 16:55:24 GMT):
yeah

rickr (Fri, 03 Mar 2017 01:04:28 GMT):
@malik-altaf @Pardha @satheeshk I'm starting to look at registration. I'm considering on moving all the enrollment and registration out of the sdk.. This should be done between the application and the member services implementation outside of the sdk. The sdk will still cache user context in the file store. If a user context is missing an enrollment which is really all we need it can look in the store to retrieve it. If not there or not provided the sdk will throw exception. This is close what the Node sdk is doing. . Not seeing why the sdk needs to be a _shim_ between application and member services implementation. The sdk will still have an _optional_ tcert provider interface for getting tcerts. The service member implementation can implement that and set it on the sdk. If provided, the sdk ll get tcerts, if not it will use ecerts.

rickr (Fri, 03 Mar 2017 01:04:28 GMT):
@malik-altaf @Pardha @satheeshk I'm starting to look at registration. I'm considering on moving all the enrollment and registration out of the sdk.. This should be done between the application and the member services implementation outside of the sdk. The sdk will still cache user context in the file store. If a user context is missing an enrollment which is really all we need it can look in the store to retrieve it. If not there or not provided the sdk will throw exception. This is close what the Node sdk is doing. . Not seeing why the sdk needs to be a _shim_ between application and member services implementation. The sdk will still have an _optional_ tcert provider interface for getting tcerts. The service member implementation can implement that and set it on the sdk client. If provided, the sdk ll get tcerts, if not it will use ecerts.

rickr (Fri, 03 Mar 2017 01:04:28 GMT):
@malik-altaf @Pardha @satheeshk I'm starting to look at registration. I'm considering on moving all the enrollment and registration out of the sdk.. This should be done between the application and the member services implementation outside of the sdk. The sdk will still cache user context in the file store. If a user context is missing an enrollment which is really all we need it can look in the store to retrieve it. If not there or not provided the sdk will throw exception. This is close what the Node sdk is doing. . Not seeing why the sdk needs to be a _shim_ between application and member services implementation. The sdk client will still have an _optional_ tcert provider interface for getting tcerts. The service member implementation can implement that and set it on the sdk client. If provided, the sdk ll get tcerts, if not it will use ecerts.

rickr (Fri, 03 Mar 2017 01:04:28 GMT):
@malik-altaf @Pardha @satheeshk I'm starting to look at registration. I'm considering on moving all the enrollment and registration out of the sdk.. This should be done between the application and the member services implementation outside of the sdk. The sdk will still cache user context in the file store. If a user context is missing an enrollment which is really all we need it can look in the store to retrieve it. If not there or not provided the sdk will throw exception. This is close what the Node sdk is doing. . Not seeing why the sdk needs to be a _shim_ between application and member services implementation. The sdk client will still have an _optional_ tcert provider interface for getting tcerts. The service member implementation can implement that and set it on the sdk client. If provided, the sdk will get tcerts, if not it will use ecerts.

rickr (Fri, 03 Mar 2017 01:07:52 GMT):
@jimthematrix ^^

Willson (Fri, 03 Mar 2017 03:02:39 GMT):
Has joined the channel.

jimthematrix (Fri, 03 Mar 2017 03:06:19 GMT):
yes that's what node sdk is structured, one package (fabric-client) responsible for communicating with peers and orderers, and another (fabric-ca-client) for member services. this allows the flexibility of either using fabric-ca or any other "standard" ca to issue certs and that is transparent to the main sdk client (fabric-client). node sdk doesn't have tcert support yet but what Rick said makes sense: that it'll be managed through a minimal interface without specifically requiring fabric-ca-client

jimthematrix (Fri, 03 Mar 2017 03:06:19 GMT):
yes that's how node sdk is structured, one package (fabric-client) responsible for communicating with peers and orderers, and another (fabric-ca-client) for member services. this allows the flexibility of either using fabric-ca or any other "standard" ca to issue certs and that is transparent to the main sdk client (fabric-client). node sdk doesn't have tcert support yet but what Rick said makes sense: that it'll be managed through a minimal interface without specifically requiring fabric-ca-client

zerppen (Fri, 03 Mar 2017 07:39:38 GMT):
Hi,I have no idea that I need run new Peer(String url,String pem) from Peer.java,this method will invoke EndorserClient(ManagedChannelBuilder channelBuilder) from EndorserClient.java that import org.hyperledger.fabric.protos.peer.EndorserGrpc I can't find

zerppen (Fri, 03 Mar 2017 07:41:21 GMT):
It's renamed?

ssaddem (Fri, 03 Mar 2017 08:29:26 GMT):
hi in v0.6 when i try to query block chain i got this error org.hyperledger.fabric.sdk.exception.ChainCodeException: Missing Transaction Certificate. Pom dependency org.hyperledger.fabric-sdk-java fabric-sdk-java 0.6

Julien0 (Fri, 03 Mar 2017 09:27:03 GMT):
Has joined the channel.

Willson (Fri, 03 Mar 2017 10:09:35 GMT):
Hello guys, I have a problem. When I use mvn failsafe:integration-test -DskipITs=false to run the End2endIT.java, I got an error with this: Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chainID not provided for chaincode lccc ,anybody know why?

Rymd (Fri, 03 Mar 2017 11:32:46 GMT):
Why isn't InstallProposalRequest public?

rickr (Fri, 03 Mar 2017 12:07:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y6jyPH84njAMvNTpQ) @Willson Are you running the git commit levels listed in the README.md for fabric and fabric_ca ?

rickr (Fri, 03 Mar 2017 12:10:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YrKoK77tP8nxmvikh) @Rymd _mea culpa_ :flushed:I'll look into this immediately.

Rymd (Fri, 03 Mar 2017 12:14:50 GMT):
same with InstantiateProposalRequest

rickr (Fri, 03 Mar 2017 12:18:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cTtYKtvsZfZrHzn2i) @zerppen Is this V1.0 ? If yes, There is a complete example listed in README.md on running chaincode and how to set that up. There should be no direct usage Peer.java

ssaddem (Fri, 03 Mar 2017 13:15:04 GMT):
hi in v0.6 when i try to query block chain i got this error org.hyperledger.fabric.sdk.exception.ChainCodeException: Missing Transaction Certificate. Pom dependency org.hyperledger.fabric-sdk-java fabric-sdk-java 0.6

ssaddem (Fri, 03 Mar 2017 13:55:33 GMT):
plz any solution ?

ruslan.kryukov (Fri, 03 Mar 2017 14:07:32 GMT):
why when I call method .sendTransaction and try to call method get of 'Future-object', Get method returns nothing and throws timeout error?

ruslan.kryukov (Fri, 03 Mar 2017 14:07:32 GMT):
why when I call method .sendTransaction and try to call method get of 'Future-object', Get-method returns nothing and throws timeout error?

ruslan.kryukov (Fri, 03 Mar 2017 14:08:18 GMT):
`CompletableFuture transactionRespFuture = chain.sendTransaction(successful, chain.getOrderers());`

ruslan.kryukov (Fri, 03 Mar 2017 14:08:46 GMT):
network is working, all orderers are alive

ruslan.kryukov (Fri, 03 Mar 2017 14:10:37 GMT):
also I have another problem

ruslan.kryukov (Fri, 03 Mar 2017 14:12:23 GMT):
I'm doing stress test, I have 50 threads and 5000 invoke-tasks for this threads. When I run test, it is failed after some successful invokes with error: ``` Exception in thread "grpc-default-executor-11" java.lang.NullPointerException: channel at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228) at io.grpc.netty.WriteQueue.(WriteQueue.java:76) at io.grpc.netty.NettyClientHandler.startWriteQueue(NettyClientHandler.java:225) at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:172) at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:45) at io.grpc.internal.TransportSet.startNewTransport(TransportSet.java:222) at io.grpc.internal.TransportSet.obtainActiveTransport(TransportSet.java:192) at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:651) at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:592) at io.grpc.DummyLoadBalancerFactory$DummyLoadBalancer$1.get(DummyLoadBalancerFactory.java:135) at io.grpc.internal.DelayedClientTransport$2.run(DelayedClientTransport.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ```

ruslan.kryukov (Fri, 03 Mar 2017 14:13:10 GMT):
I've noticed that if I set 2k invoke tasks, they ended successfuly

ruslan.kryukov (Fri, 03 Mar 2017 14:13:36 GMT):
but if I set more then 2k, when sdk client throws this error

ruslan.kryukov (Fri, 03 Mar 2017 14:15:28 GMT):
invoke task is simple: ``` Zip2, Collection> zip2Responses = client.invoke(chaincodeName, "foo-method", new String[]{ID, item}); ```

ruslan.kryukov (Fri, 03 Mar 2017 14:15:28 GMT):
'invoke task' is simple: ``` Zip2, Collection> zip2Responses = client.invoke(chaincodeName, "foo-method", new String[]{ID, item}); ```

ruslan.kryukov (Fri, 03 Mar 2017 14:15:28 GMT):
'invoke-task' is simple: ``` Zip2, Collection> zip2Responses = client.invoke(chaincodeName, "foo-method", new String[]{ID, item}); ```

ssaddem (Fri, 03 Mar 2017 15:18:44 GMT):
can any one here help ?

weeds (Fri, 03 Mar 2017 15:36:08 GMT):
@dave.enyeart Hi Dave - can you help @ssaddem please?

dave.enyeart (Fri, 03 Mar 2017 15:36:08 GMT):
Has joined the channel.

ssaddem (Fri, 03 Mar 2017 15:36:39 GMT):
hi weeds thnx

ssaddem (Fri, 03 Mar 2017 15:36:43 GMT):
in v0.6 when i try to query block chain i got this error org.hyperledger.fabric.sdk.exception.ChainCodeException: Missing Transaction Certificate. Pom dependency org.hyperledger.fabric-sdk-java fabric-sdk-java 0.6

suganuma (Fri, 03 Mar 2017 15:50:02 GMT):
Hi, I'm trying to run End2endIT.java with TLS enabled (in fabric-ca/cmd/fabric-ca-server/config.go). I got an enrollment exception as follows. '2017-03-03 14:39:10 ERROR MemberServicesFabricCAImpl:322 - Failed to enroll user admin org.hyperledger.fabric.sdk.exception.EnrollmentException: Failed to enroll user admin at org.hyperledger.fabric.sdk.MemberServicesFabricCAImpl.enroll(MemberServicesFabricCAImpl.java:321) at org.hyperledger.fabric.sdk.User.enroll(User.java:248) at org.hyperledger.fabric.sdk.HFClient.enroll(HFClient.java:303) at org.hyperledger.fabric.sdk.End2endIT.setup(End2endIT.java:92)'

dave.enyeart (Fri, 03 Mar 2017 15:50:56 GMT):
@ssaddem I actually don't have experience with the 0.6 sdk APIs, maybe @mlishok has some insight?

mlishok (Fri, 03 Mar 2017 15:50:56 GMT):
Has joined the channel.

suganuma (Fri, 03 Mar 2017 15:51:41 GMT):
Here is the log message in fabric-ca. ```2017/03/03 09:30:46 http: TLS handshake error from 172.17.0.1:38634: tls: oversized record received with length 21536'

suganuma (Fri, 03 Mar 2017 15:51:59 GMT):
Any idea on what's wrong?

ssaddem (Fri, 03 Mar 2017 15:53:20 GMT):
@dave.enyeart thx

rickr (Fri, 03 Mar 2017 15:55:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NZeGg4js2Ds5JXvb5) @suganuma Hi we have an open JIRA open for this. Needs to be investigated on how to set this up and documented.

ssaddem (Fri, 03 Mar 2017 16:37:53 GMT):
@mlishok please can you help me ? in v0.6 when i try to query block chain i got this error org.hyperledger.fabric.sdk.exception.ChainCodeException: Missing Transaction Certificate. Pom dependency org.hyperledger.fabric-sdk-java fabric-sdk-java 0.6

mlishok (Fri, 03 Mar 2017 16:46:56 GMT):
@ssaddem thats not something I have seen, but I have not used the java SDK that much on 0.6, as it was just barely getting started at that point I believe.

mlishok (Fri, 03 Mar 2017 16:47:21 GMT):
where is this 0.6 network? docker? starter plan?

ssaddem (Fri, 03 Mar 2017 16:47:46 GMT):
ok thx :)

ssaddem (Fri, 03 Mar 2017 16:47:55 GMT):
on docker yes

ssaddem (Fri, 03 Mar 2017 16:48:19 GMT):
no not starter plan

ssaddem (Fri, 03 Mar 2017 16:48:29 GMT):
i can connect with node but not on java

mlishok (Fri, 03 Mar 2017 16:50:12 GMT):
4 node or 1 node network?

ssaddem (Fri, 03 Mar 2017 16:50:25 GMT):
4 nodes

ssaddem (Fri, 03 Mar 2017 16:50:58 GMT):
the problem i guess is the java not use certificate

mlishok (Fri, 03 Mar 2017 16:51:12 GMT):
there is definitely a limitation with 0.6 java that security cannot be on.

mlishok (Fri, 03 Mar 2017 16:51:21 GMT):
is security on the network?

ssaddem (Fri, 03 Mar 2017 16:52:39 GMT):
yes

rickr (Fri, 03 Mar 2017 16:52:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YrKoK77tP8nxmvikh) @Rymd fix has been pushed to master

mlishok (Fri, 03 Mar 2017 16:53:20 GMT):
@ssaddem https://developer.ibm.com/answers/questions/342814/java-secured-support-on-bluemix-blockchain/

ssaddem (Fri, 03 Mar 2017 16:53:52 GMT):
nop it's not my problem

ssaddem (Fri, 03 Mar 2017 16:54:06 GMT):
my chain code is with go

ssaddem (Fri, 03 Mar 2017 16:54:20 GMT):
but i would like to querry it with java sdk

ssaddem (Fri, 03 Mar 2017 16:54:26 GMT):
i can connect with node js

ManjeetGambhir (Fri, 03 Mar 2017 16:56:49 GMT):
Has joined the channel.

ssaddem (Fri, 03 Mar 2017 17:05:17 GMT):
the resp is 17:04:00.662 [peer] ProcessTransaction -> ERRO 4b5 ProcessTransaction failed to verify transaction Missing Transaction Certificate.

mlishok (Fri, 03 Mar 2017 17:24:41 GMT):
@ssaddem the queries require a transaction certificate too, so if java-sdk cant handle security properly it will still be an issue.

mlishok (Fri, 03 Mar 2017 17:24:50 GMT):
Let me try to get more info.

ssaddem (Fri, 03 Mar 2017 17:28:56 GMT):
ok thx

wlahti (Fri, 03 Mar 2017 21:31:19 GMT):
Has joined the channel.

zerppen (Sun, 05 Mar 2017 15:24:44 GMT):
Hi,rickr @rickr U r online?

zerppen (Sun, 05 Mar 2017 15:36:16 GMT):
I noticed maven building fabric-sdk-java cannot find org.apache.maven.plugins:maven-source-plugin:2.2.1/org.apache.maven.plugins:maven-gpg-plugin:1.5/org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7/maven-assembly-plugin:2.3.By CLI run mvn install,showing source not found. I used Intellij idea building 3 times but showing plugin not found.

zerppen (Sun, 05 Mar 2017 15:57:45 GMT):
2017-03-05 23:54:57 ERROR CryptoPrimitives:203 - Cannot verify signature. Error is: Could not parse certificate: java.io.IOException: Empty input Certificate (PEM, hex): 00 java.security.cert.CertificateException: Could not parse certificate: java.io.IOException: Empty input 2017-03-05 23:54:57 ERROR CryptoPrimitives:207 - Cannot verify. Signature algorithm is invalid. Error is: Could not verify signature java.security.SignatureException: Could not verify signature at sun.security.ec.ECDSASignature.engineVerify(ECDSASignature.java:320) Caused by: java.security.SignatureException: Could not decode signature at sun.security.ec.ECDSASignature.decodeSignature(ECDSASignature.java:386) at sun.security.ec.ECDSASignature.engineVerify(ECDSASignature.java:317) ... 30 more Caused by: java.io.IOException: Encoding bytes too short

zerppen (Sun, 05 Mar 2017 15:57:54 GMT):
Here is logs

tuand (Sun, 05 Mar 2017 20:01:27 GMT):
@zerppen , is that `ERROR CryptoPrimitives ...` coming out of the mvn install ? The unit tests exercise the signing/verification error paths so you will see many exceptions like that during the build. What's the end result of your mvn install ? Your log should look something like this ```[INFO] --- maven-failsafe-plugin:2.13:verify (failsafe-integration-tests) @ fabric-sdk-java --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ fabric-sdk-java --- [INFO] Installing /Users/ttd/work/src/github.com/hyperledger/fabric-sdk-java/target/fabric-sdk-java-1.0-SNAPSHOT.jar to /Users/ttd/.m2/repository/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0-SNAPSHOT/fabric-sdk-java-1.0-SNAPSHOT.jar [INFO] Installing /Users/ttd/work/src/github.com/hyperledger/fabric-sdk-java/pom.xml to /Users/ttd/.m2/repository/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0-SNAPSHOT/fabric-sdk-java-1.0-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9.297 s [INFO] Finished at: 2017-03-05T14:50:43-05:00 [INFO] Final Memory: 35M/615M [INFO] ------------------------------------------------------------------------```

obernin (Sun, 05 Mar 2017 21:01:02 GMT):
Has joined the channel.

gauthampamu (Mon, 06 Mar 2017 00:17:59 GMT):
Has joined the channel.

gauthampamu (Mon, 06 Mar 2017 00:21:14 GMT):
Is support for java sdk targeted for v1.0 ? Where can I find documentation on how to use the java sdk ?

rickr (Mon, 06 Mar 2017 00:36:18 GMT):
https://github.com/hyperledger/fabric-sdk-java Scroll down to read the README.md Read through it _thoroughly_ at least once. IMO will save you a lot of time in the long run. You can clone that git rep. Look over the *End2endIT.java* code it points to. It's a complete example of deploying chain code.

rickr (Mon, 06 Mar 2017 00:36:18 GMT):
https://github.com/hyperledger/fabric-sdk-java Scroll down to read the README.md Read through it _thoroughly_ at least once. IMO will save you a lot of time in the long run. You can clone that git repo. Look over the *End2endIT.java* code it points to. It's a complete example of deploying chain code.

rjones (Mon, 06 Mar 2017 03:39:31 GMT):
rickr

rpbarnes (Mon, 06 Mar 2017 06:49:09 GMT):
Has joined the channel.

rpbarnes (Mon, 06 Mar 2017 06:52:22 GMT):
Hi, I notice that protocols such as Chain.sendInstallProposal and sendInstantiationProposal take as their arguments proposal request classes which are package-private. It's not clear to me how I am supposed to write client code using the SDK api. Am I missing something? thanks

kelvinzhong (Mon, 06 Mar 2017 07:19:06 GMT):
Has joined the channel.

ruslan.kryukov (Mon, 06 Mar 2017 09:06:52 GMT):
I have found bug in sdk

ruslan.kryukov (Mon, 06 Mar 2017 09:07:02 GMT):
Sdk doesn't close connections

ruslan.kryukov (Mon, 06 Mar 2017 09:07:24 GMT):
when we use it a long time, we get connections limit

ruslan.kryukov (Mon, 06 Mar 2017 09:07:48 GMT):
And finally we have a exception of netty Exception in thread "grpc-default-executor-11" java.lang.NullPointerException: channel at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228) at io.grpc.netty.WriteQueue.(WriteQueue.java:76) at io.grpc.netty.NettyClientHandler.startWriteQueue(NettyClientHandler.java:225) at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:172) at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:45) at io.grpc.internal.TransportSet.startNewTransport(TransportSet.java:222) at io.grpc.internal.TransportSet.obtainActiveTransport(TransportSet.java:192) at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:651) at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:592) at io.grpc.DummyLoadBalancerFactory$DummyLoadBalancer$1.get(DummyLoadBalancerFactory.java:135) at io.grpc.internal.DelayedClientTransport$2.run(DelayedClientTransport.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ```

ruslan.kryukov (Mon, 06 Mar 2017 09:08:55 GMT):
for example I use sdk by sending 2100 invoke proposals: ``` [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 312 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 651 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 916 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 1195 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 1487 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 1761 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 1990 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 0 [root@docker0 opt]# lsof -Pan -p 7730 -i | wc -l lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. 0 [root@docker0 opt]# ```

ruslan.kryukov (Mon, 06 Mar 2017 09:09:18 GMT):
The number is count of active connections for sdk app

ruslan.kryukov (Mon, 06 Mar 2017 09:09:18 GMT):
The number is a count of active connections for sdk app

ruslan.kryukov (Mon, 06 Mar 2017 09:14:22 GMT):
``` java 7925 root 1625u IPv6 2818050 0t0 TCP :38742->:38740->:38762->:38750->:38744->:38754->:38764->:38752->:38746->:38766->:38770->

ruslan.kryukov (Mon, 06 Mar 2017 09:14:57 GMT):
Connections to orderer are not closed

vitaly.ilinykh (Mon, 06 Mar 2017 09:27:59 GMT):
Has joined the channel.

kleman (Mon, 06 Mar 2017 09:48:25 GMT):
a factory ?

Rymd (Mon, 06 Mar 2017 11:27:11 GMT):
the recent commit made them public

rpbarnes (Mon, 06 Mar 2017 11:34:35 GMT):
Ah, thanks! I'm probably a day or two behind. And BTW, I'm finding End2endIT extremely useful as an example of writing client-side code so thanks to all involved with that.

rickr (Mon, 06 Mar 2017 11:58:00 GMT):
@rpbarnes from all of us, you're welcome! Nice to hear some positive feedback!

ManjeetGambhir (Mon, 06 Mar 2017 13:24:02 GMT):
@rickr getting error on identity on default setting of fabric, fabric ca images ?

ManjeetGambhir (Mon, 06 Mar 2017 13:24:19 GMT):
Did you get chance to look into it

ManjeetGambhir (Mon, 06 Mar 2017 13:24:55 GMT):
@ I have posted error on fabric-ci channel

rickr (Mon, 06 Mar 2017 13:38:20 GMT):
My first take on this is it's some environment error. For that it's best that @rameshthoomu looking into this.

rameshthoomu (Mon, 06 Mar 2017 13:40:25 GMT):
@ManjeetGambhir did you change image reference in docker compose file? I think ccenv image is not tagged properly..

ManjeetGambhir (Mon, 06 Mar 2017 13:48:35 GMT):
@rameshthoomu yes @rahulhegde from my company changed it.even though getting error

rahulhegde (Mon, 06 Mar 2017 13:48:35 GMT):
Has joined the channel.

rameshthoomu (Mon, 06 Mar 2017 13:49:09 GMT):
ok

rickr (Mon, 06 Mar 2017 14:48:26 GMT):
@rameshthoomu Please get @ManjeetGambhir working with MSPID as "DEFAULT". I've opened a JIRA https://jira.hyperledger.org/browse/FAB-2656 to look at supporting multiple MSPIDs

simsc (Mon, 06 Mar 2017 14:59:35 GMT):
Has joined the channel.

jimthematrix (Mon, 06 Mar 2017 15:52:00 GMT):
@rickr for java sdk to support the multi-org setup, here are the two relevant CRs in node sdk as reference: - https://gerrit.hyperledger.org/r/#/c/6653/ - gets the chain's config block from the orderer, parses it and inits the verifying MSPs in the chain object - https://gerrit.hyperledger.org/r/#/c/6869/, https://gerrit.hyperledger.org/r/#/c/6881/ - creates the default endorsement policy that makes uses of the verifying msps initialized above

ManjeetGambhir (Mon, 06 Mar 2017 15:57:29 GMT):
@rameshthoomu can we have images

ManjeetGambhir (Mon, 06 Mar 2017 15:59:17 GMT):
@rameshthoomu where we can work with default identity by java sdk

jimthematrix (Mon, 06 Mar 2017 16:07:39 GMT):
@ManjeetGambhir also make sure when you launch the network, that you don't override the `LocalMSPID` values for either the orderer or the peers

jimthematrix (Mon, 06 Mar 2017 16:08:04 GMT):
the best way to launch a network that works with the sdk is to use the docker-compose.yaml in test/fixtures/src folder

jimthematrix (Mon, 06 Mar 2017 16:08:04 GMT):
the best way to launch a network that works with the sdk is to use the docker-compose.yaml in test/fixture/src folder

jimthematrix (Mon, 06 Mar 2017 16:09:29 GMT):
my guess is that you either used a docker-compose.yaml from a different source or have modified it yourself

simsc (Mon, 06 Mar 2017 18:07:29 GMT):
@ManjeetGambhir are you running end to end now?

ManjeetGambhir (Mon, 06 Mar 2017 22:00:23 GMT):
@rickr I am trying to depoy my chaincode and corrected chain-code name , but still getting below error while deploying :Sending instantiateProposalRequest code with a and b set to 100 and 200 respectively java.lang.Exception: Not enough endorsers for instantiate :0. Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=Error starting container: API error (500): {"message":"Error parsing reference: \"dev-vp0-ClsPublicCC.go-1.0\" is not a valid repository/tag: repository name must be lowercase"} , cause=null}. Was verified:false

ManjeetGambhir (Mon, 06 Mar 2017 22:00:49 GMT):
how to remove previous incorrected name chaincode from repository

ManjeetGambhir (Mon, 06 Mar 2017 22:02:22 GMT):
@rickr stopped network , docker rm -f${docker ps -aq}

ManjeetGambhir (Mon, 06 Mar 2017 22:03:19 GMT):
ignore "Sending instantiateProposalRequest code with a and b set to 100 and 200 respectivel" just sysout

muralisr (Mon, 06 Mar 2017 22:06:28 GMT):
Has joined the channel.

muralisr (Mon, 06 Mar 2017 22:07:42 GMT):
@ManjeetGambhir do you have peer side log by any chance ?

muralisr (Mon, 06 Mar 2017 22:07:55 GMT):
I see "\." in the name

muralisr (Mon, 06 Mar 2017 22:08:12 GMT):
can to try without the `.`

muralisr (Mon, 06 Mar 2017 22:08:12 GMT):
can you to try without the `.`

muralisr (Mon, 06 Mar 2017 22:09:57 GMT):
also try lower case name... although we should have caught and converted

muralisr (Mon, 06 Mar 2017 22:11:23 GMT):
(I think the case is the culprit)

ManjeetGambhir (Mon, 06 Mar 2017 22:14:49 GMT):
@muralisr after twice restarting working fine

muralisr (Mon, 06 Mar 2017 22:15:06 GMT):
I assume it was the lowercase ?

ManjeetGambhir (Mon, 06 Mar 2017 22:15:14 GMT):
I did lowercase

muralisr (Mon, 06 Mar 2017 22:15:18 GMT):
ok

ManjeetGambhir (Mon, 06 Mar 2017 22:15:31 GMT):
and tried to redeploy and deleted all container

muralisr (Mon, 06 Mar 2017 22:15:35 GMT):
ok

ManjeetGambhir (Mon, 06 Mar 2017 22:15:47 GMT):
never mind

ManjeetGambhir (Mon, 06 Mar 2017 22:15:52 GMT):
now its working

muralisr (Mon, 06 Mar 2017 22:16:01 GMT):
ok

ManjeetGambhir (Mon, 06 Mar 2017 22:41:24 GMT):
@muralisr do chaincode file name should be lowercase?

muralisr (Mon, 06 Mar 2017 22:42:48 GMT):
@ManjeetGambhir the docker image does not like uppercase.. we had a filter that converted to names to be dockerfriendly but my guess is that's not in the code path for some reason

ManjeetGambhir (Tue, 07 Mar 2017 03:55:51 GMT):
@rickr do you know how to get read,write set and proposalrequest in BlockEvent by blocklistener? I can not see from blockevent ,any api to directly get mentioned above

ManjeetGambhir (Tue, 07 Mar 2017 04:01:09 GMT):
@jimthematrix Jim, BlockEvent has read,write and proposal data ?

jimthematrix (Tue, 07 Mar 2017 04:29:43 GMT):
@ManjeetGambhir correct, readset, writeset, and proposal

ManjeetGambhir (Tue, 07 Mar 2017 04:31:14 GMT):
@jimthematrix is there direct api to get all mentioned above ?

ManjeetGambhir (Tue, 07 Mar 2017 04:31:40 GMT):
I am trying to get read ,write and proposal but can not see

ManjeetGambhir (Tue, 07 Mar 2017 04:32:54 GMT):
iterating over List transactionEvents = blockEvent.getTransactionEvents();

jimthematrix (Tue, 07 Mar 2017 04:34:10 GMT):
I don't think the BlockEvent wrapper class has been enhanced to support accessing those fields yet

ManjeetGambhir (Tue, 07 Mar 2017 04:35:48 GMT):
I thought last discussion with sharon and clayton, it looked like it will be available now

jimthematrix (Tue, 07 Mar 2017 04:36:04 GMT):
if you have to get that right now, you can getBlock() and use the protobuf classes to parse the original block object

jimthematrix (Tue, 07 Mar 2017 04:36:22 GMT):
let me double check

ManjeetGambhir (Tue, 07 Mar 2017 04:36:38 GMT):
but I can not see

ManjeetGambhir (Tue, 07 Mar 2017 04:41:23 GMT):
ok waiting on you

ManjeetGambhir (Tue, 07 Mar 2017 04:44:10 GMT):
Actually our whole business logic is based on those..without that it will be very difficult to integrate business pieces we developed so ar

ManjeetGambhir (Tue, 07 Mar 2017 04:44:14 GMT):
far*

jimthematrix (Tue, 07 Mar 2017 04:47:48 GMT):
yes understood, i know Rick told me Tuan has been working on that (enhancing the block wrapper class), so it may well be still work in progress

ManjeetGambhir (Tue, 07 Mar 2017 04:49:01 GMT):
Any ETA ?

ManjeetGambhir (Tue, 07 Mar 2017 04:50:03 GMT):
This piece is highest priority for us ..see if it can available soon

ManjeetGambhir (Tue, 07 Mar 2017 04:50:26 GMT):
we can live without other features for few days..

jimthematrix (Tue, 07 Mar 2017 04:51:41 GMT):
i don't know the latest progress on that, @rickr would have to provide that

jimthematrix (Tue, 07 Mar 2017 04:51:41 GMT):
i don't know the latest progress on that, @rickr would have to provide an ETA

ManjeetGambhir (Tue, 07 Mar 2017 04:52:11 GMT):
ok Thanks Jim..you are always helpful..Will check Rick tomm

jimthematrix (Tue, 07 Mar 2017 04:52:21 GMT):
sounds good

lehors (Tue, 07 Mar 2017 12:51:39 GMT):
Has joined the channel.

ElliScharlin (Tue, 07 Mar 2017 12:52:08 GMT):
Has joined the channel.

ElliScharlin (Tue, 07 Mar 2017 12:52:13 GMT):
Hey guys

ElliScharlin (Tue, 07 Mar 2017 12:52:28 GMT):
I have this when trying to enroll a user using the java sdk

ElliScharlin (Tue, 07 Mar 2017 12:53:59 GMT):
``` Connected to the target VM, address: '127.0.0.1:64422', transport: 'socket' Exception in thread "main" org.hyperledger.fabric.sdk.exception.EnrollmentException: Failed to enroll user at org.hyperledger.fabric.sdk.MemberServicesImpl.enroll(MemberServicesImpl.java:219) at org.hyperledger.fabric.sdk.Member.enroll(Member.java:212) at org.hyperledger.fabric.sdk.Chain.enroll(Chain.java:300) at JavaHyperledgerSample.main(JavaHyperledgerSample.java:28) Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:151) at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:128) at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:117) at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:88) at io.grpc.netty.NettyChannelBuilder.createProtocolNegotiator(NettyChannelBuilder.java:259) at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(NettyChannelBuilder.java:314) at io.grpc.internal.AbstractManagedChannelImplBuilder$AuthorityOverridingTransportFactory.newClientTransport(AbstractManagedChannelImplBuilder.java:235) at io.grpc.internal.TransportSet$1.call(TransportSet.java:215) at io.grpc.internal.TransportSet$1.call(TransportSet.java:203) at io.grpc.internal.TransportSet.obtainActiveTransport(TransportSet.java:175) at io.grpc.internal.ManagedChannelImpl$3.getTransport(ManagedChannelImpl.java:381) at io.grpc.SimpleLoadBalancerFactory$SimpleLoadBalancer.pickTransport(SimpleLoadBalancerFactory.java:97) at io.grpc.internal.ManagedChannelImpl$1.get(ManagedChannelImpl.java:135) at io.grpc.internal.ClientCallImpl.start(ClientCallImpl.java:206) at io.grpc.stub.ClientCalls.startCall(ClientCalls.java:245) at io.grpc.stub.ClientCalls.asyncUnaryRequestCall(ClientCalls.java:225) at io.grpc.stub.ClientCalls.futureUnaryCall(ClientCalls.java:186) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:132) at org.hyperledger.protos.ECAPGrpc$ECAPBlockingStub.createCertificatePair(ECAPGrpc.java:211) at org.hyperledger.fabric.sdk.MemberServicesImpl.enroll(MemberServicesImpl.java:191) ... 3 more Disconnected from the target VM, address: '127.0.0.1:64422', transport: 'socket' Process finished with exit code 1 ```

ElliScharlin (Tue, 07 Mar 2017 12:54:29 GMT):
Any thoughts would be greatly appreciated! :)

iscy (Tue, 07 Mar 2017 17:30:50 GMT):
Has joined the channel.

mdozturk (Tue, 07 Mar 2017 20:42:32 GMT):
Hi everybody, I'm playing around with hyperledger fabric 0.6 and created some simple chaincode where when initialize my environment and run my application, an entity is created on the chaincode.

mdozturk (Tue, 07 Mar 2017 20:43:02 GMT):
When I rerun my application, my application tries to create the same entity it just created and as per the chaincode rules the creation fails (as expected)

mdozturk (Tue, 07 Mar 2017 20:43:31 GMT):
However I noticed the java sdk hangs while the invoke is being processed by the fabric

mdozturk (Tue, 07 Mar 2017 20:44:25 GMT):
checking the logs, it seems like after the error the validator sends an event to the sdk to inform of the error, however the message sent ("block") contains no information about which transaction failed

mdozturk (Tue, 07 Mar 2017 20:45:00 GMT):
Is this by design?

tuand (Tue, 07 Mar 2017 21:09:39 GMT):
@mdozturk suggest you move to the V1.0 fabric and sdk-java code ... I don't know what shape the V0.6 sdk-java is in but we're all concentrating on V1.0 right now

mdozturk (Tue, 07 Mar 2017 21:18:34 GMT):
Is there a document describing how to migrate

mdozturk (Tue, 07 Mar 2017 21:18:36 GMT):
?

mdozturk (Tue, 07 Mar 2017 21:18:55 GMT):
I barely have a handle on v0.6 :)

tuand (Tue, 07 Mar 2017 21:22:21 GMT):
there is no migration from V0.6 to V1.0 ... take a look on the wiki, in particular http://hyperledger-fabric.readthedocs.io/en/latest/ and https://wiki.hyperledger.org/community/fabric-design-docs

tuand (Tue, 07 Mar 2017 21:22:56 GMT):
once you've cloned fabric-sdk-java, take a look at the README as well

mdozturk (Tue, 07 Mar 2017 21:35:06 GMT):
cool tnanks

kletkeman (Wed, 08 Mar 2017 01:51:05 GMT):
@mdozturk Fabric v0.5 had serious problems with storing non-deterministic errors into blocks (e.g. network timeouts, etc.) and so bluemix based v0.5 fabrics became unstable quickly as one or more peers would diverge their block hash and that was that. The fix in v0.6 was to stop storing sucj errors in the block, but the baby was thrown out with the bath water in this instance as legitimate failures (chaincode errors such as yours) were also not stored. Thus, the block event is no longer useful for both. If I recall, the rejection event is sent out, so you can listen for both. I implemented my own event in my IoT Contract Platform (it works for any contract, but is oriented to the performance requirements of IoT) in all cases. Peculiarly, v0.6 does store the event in a parallel array with transactions, and so by emitting a success or failure event, I can listen for my own events and know every transaction's fate. And I can display blocks correctly by grabbing the event and then filling in the rest of the info from the transaction array for those transactions that succeeded. Funky, but it works. I have an event listener that I derived from the sample block listener that is able to catch every event that our contracts can emit (we have several). The listener code is at https://github.com/ibm-watson-iot/blockchain-samples/tree/master/applications/event_listener. I have our platform and samples ported to v1, however the cli remains elusive for external chaincode (any chaincode not copied into the fabric name space) and going to the SDK from REST is exactly as much fun as you might expect.

Willson (Wed, 08 Mar 2017 02:46:14 GMT):
Hello guys, when I use the newest fabric-sdk-java and correspond commitlevel fabrci and fabric-ca to run the "mvn failsafe:integration-test -DskipITs=false", I got and error like this ERROR Chain:164 - New chain foo error. StatusValue 400. Status BAD_REQUEST.Anybody can tell me why and how to solute it? Thanks

rickr (Wed, 08 Mar 2017 02:57:20 GMT):
How are you starting your Peers and Orderer .. the docker-compose.yml ?

Willson (Wed, 08 Mar 2017 02:58:22 GMT):
Yes,the docker-compose.yml that in the fixture

rickr (Wed, 08 Mar 2017 02:58:55 GMT):
in Vagrant ?

Willson (Wed, 08 Mar 2017 02:59:05 GMT):
yes

rickr (Wed, 08 Mar 2017 02:59:47 GMT):
double check your Vagrant files host native port settings

rickr (Wed, 08 Mar 2017 03:00:21 GMT):
at the moment that's the only thing that come to mind

Willson (Wed, 08 Mar 2017 03:02:29 GMT):

Message Attachments

Willson (Wed, 08 Mar 2017 03:03:06 GMT):
is right?

rickr (Wed, 08 Mar 2017 03:05:08 GMT):
y

Willson (Wed, 08 Mar 2017 03:06:21 GMT):
@rickr Are there any other suggestions?

rickr (Wed, 08 Mar 2017 03:08:16 GMT):
you know how to print the orderer logs from docker ?

rickr (Wed, 08 Mar 2017 03:09:01 GMT):
docker logs container

Willson (Wed, 08 Mar 2017 03:18:58 GMT):
er

Willson (Wed, 08 Mar 2017 03:19:20 GMT):
2017-03-08 02:59:55.858 UTC [configtx/tool/localconfig] Load -> INFO 001 Checking for configtx.yaml at: /etc/hyperledger/fabric 2017-03-08 02:59:55.859 UTC [configtx/tool/localconfig] Load -> INFO 002 Checking for configtx.yaml at: 2017-03-08 02:59:55.880 UTC [viperutil] EnhancedExactUnmarshal -> INFO 003 map[orderer:map[Kafka:map[Brokers:[127.0.0.1:9092]] Organizations: OrdererType:solo Addresses:[127.0.0.1:7050] BatchTimeout:10s BatchSize:map[MaxMessageCount:10 AbsoluteMaxBytes:99 MB PreferredMaxBytes:512 KB]] application:map[Organizations:] profiles:map[SampleInsecureKafka:map[Application:map[Organizations:] Orderer:map[Organizations: OrdererType:kafka Addresses:[127.0.0.1:7050] BatchTimeout:10s BatchSize:map[MaxMessageCount:10 AbsoluteMaxBytes:99 MB PreferredMaxBytes:512 KB] Kafka:map[Brokers:[127.0.0.1:9092]]]] SampleSingleMSPSolo:map[Orderer:map[BatchSize:map[PreferredMaxBytes:512 KB MaxMessageCount:10 AbsoluteMaxBytes:99 MB] Kafka:map[Brokers:[127.0.0.1:9092]] Organizations:[map[MSPDir:msp/sampleconfig BCCSP:map[Default:SW SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]]] AnchorPeers:[map[Host:127.0.0.1 Port:7051]] Name:SampleOrg ID:DEFAULT]] OrdererType:solo Addresses:[127.0.0.1:7050] BatchTimeout:10s] Application:map[Organizations:[map[Name:SampleOrg ID:DEFAULT MSPDir:msp/sampleconfig BCCSP:map[Default:SW SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]]] AnchorPeers:[map[Host:127.0.0.1 Port:7051]]]]]] SampleInsecureSolo:map[Orderer:map[OrdererType:solo Addresses:[127.0.0.1:7050] BatchTimeout:10s BatchSize:map[PreferredMaxBytes:512 KB MaxMessageCount:10 AbsoluteMaxBytes:99 MB] Kafka:map[Brokers:[127.0.0.1:9092]] Organizations:] Application:map[Organizations:]]] organizations:[map[BCCSP:map[SW:map[Hash:SHA2 Security:256 FileKeyStore:map[KeyStore:]] Default:SW] AnchorPeers:[map[Host:127.0.0.1 Port:7051]] Name:SampleOrg ID:DEFAULT MSPDir:msp/sampleconfig]]] 2017-03-08 02:59:55.885 UTC [orderer/multichain] NewManagerImpl -> INFO 004 Starting with system channel: testchainid and orderer type solo 2017-03-08 02:59:55.885 UTC [orderer/main] NewServer -> INFO 005 Starting orderer 2017-03-08 02:59:55.885 UTC [orderer/main] main -> INFO 006 Beginning to serve requests 2017-03-08 03:00:36.814 UTC [orderer/multichain] newChain -> INFO 007 Created and starting new chain foo 2017-03-08 03:00:38.886 UTC [orderer/common/deliver] Handle -> ERRO 008 Error reading from stream: stream error: code = 1 desc = "context canceled"

bh4rtp (Wed, 08 Mar 2017 03:27:45 GMT):
Has left the channel.

rickr (Wed, 08 Mar 2017 03:30:59 GMT):
the last ERROR is not an issue it looks like it created the foo chain .. if you recycle your docker down ... up and rerun this consistently happens ?

Willson (Wed, 08 Mar 2017 03:35:39 GMT):
yes, i had use docker kill $(docker ps -qa) to kill the containers and restart

Basug (Wed, 08 Mar 2017 03:39:36 GMT):
How would I include any additional jar files that might be needed for my application.

Basug (Wed, 08 Mar 2017 03:40:44 GMT):
I want to write chaincode in java & have it use some third party libraries, do these need to be included in docker image ?

rickr (Wed, 08 Mar 2017 03:40:49 GMT):
Wilson -- I think you may have an older SDK toolkit

rickr (Wed, 08 Mar 2017 03:41:50 GMT):
Basug please take that fabric-java-chaincode

Basug (Wed, 08 Mar 2017 03:42:29 GMT):
Ok will do - looks like not much activity in there, asked that question there this morning

Willson (Wed, 08 Mar 2017 03:42:41 GMT):
ok, i clone it again, thanks

rickr (Wed, 08 Mar 2017 03:42:41 GMT):
Basug -- also I know at the moment java chain code in v1 is broken but it's actively being worked on.

Basug (Wed, 08 Mar 2017 03:43:00 GMT):
ok, thank you

rickr (Wed, 08 Mar 2017 03:43:15 GMT):
Sorry folks need to break away for now

Willson (Wed, 08 Mar 2017 04:38:28 GMT):
@rickr I had clone the newest sdk of master branch and the error is still exist

Willson (Wed, 08 Mar 2017 04:54:38 GMT):
2017-03-08 04:46:37.286 UTC [orderer/main] main -> INFO 006 Beginning to serve requests 2017-03-08 04:46:37.831 UTC [orderer/common/deliver] Handle -> ERRO 007 Error reading from channel, cause was: NOT_FOUND 2017-03-08 04:46:38.184 UTC [orderer/common/deliver] Handle -> ERRO 008 Error reading from channel, cause was: NOT_FOUND 2017-03-08 04:48:21.938 UTC [orderer/multichain] newChain -> INFO 009 Created and starting new chain foo 2017-03-08 04:48:22.685 UTC [orderer/common/deliver] Handle -> ERRO 00a Error reading from stream: stream error: code = 1 desc = "context canceled"

Willson (Wed, 08 Mar 2017 07:32:16 GMT):
Guys,there is a new error like this: ERROR Chain:306 - org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to chain foo failed. Status FAILURE, details: Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null}..What caused it?

icordoba (Wed, 08 Mar 2017 11:17:43 GMT):
Has joined the channel.

rickr (Wed, 08 Mar 2017 11:32:30 GMT):
This is one step past the previous error can you share how that was fixed ?

Suma (Wed, 08 Mar 2017 15:44:29 GMT):
Has joined the channel.

dknochen (Wed, 08 Mar 2017 16:13:27 GMT):
Has joined the channel.

Basug (Thu, 09 Mar 2017 01:13:58 GMT):
All - In End2EndIT.java it deploys go chain code, is it possible to write chaincode in java like in 0.6 ?

Basug (Thu, 09 Mar 2017 01:16:23 GMT):
Looks like there is SimpleSample.java in tests - will try it out

Willson (Thu, 09 Mar 2017 01:22:00 GMT):
@rickr After reclone the sdk,the former error has disappeared,but the later error is appearing

rickr (Thu, 09 Mar 2017 01:24:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Mn4voi3L2zqgfEf3g) Not going to work :) It's broken but actively being worked on.

Basug (Thu, 09 Mar 2017 01:24:33 GMT):
ok.

Basug (Thu, 09 Mar 2017 01:25:28 GMT):
@rickr - looks like most of the imports for chaincode itself come from shim, would it be possible I write chain code in java, but deploy using node api ?

rickr (Thu, 09 Mar 2017 01:26:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=o8vQdbfR33tsc3vs8) No. Its not the deployment its the shim and or the fabric ...

Basug (Thu, 09 Mar 2017 01:27:21 GMT):
ah ok.I guess I will have to wait :)

rickr (Thu, 09 Mar 2017 01:37:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3ShK24r5Q9v3sdqHP) in vagrant at the fabric directory `docker-compose down; rm -rf /var/hyperledger/*; docker-compose up --force-recreate`

rickr (Thu, 09 Mar 2017 01:37:49 GMT):
then run the `mvn failsafe:integration-test -DskipITs=false`

rickr (Thu, 09 Mar 2017 01:38:02 GMT):
Kinda running out of ideas

rickr (Thu, 09 Mar 2017 01:39:03 GMT):
and in that directory you have docker-compose.yml that's in the java sdk

Willson (Thu, 09 Mar 2017 01:43:16 GMT):
thanks, let me try it again

Willson (Thu, 09 Mar 2017 02:08:41 GMT):
it is still not working

Basug (Thu, 09 Mar 2017 02:12:10 GMT):
@rickr - while discussing with @sanchezl yesterday he mentioned that I should be able to atleast deploy and initialize . Is that broken too ?

Basug (Thu, 09 Mar 2017 02:12:29 GMT):
`2017-03-08 21:10:35 ERROR Chain:164 - New chain foo error. StatusValue 400. Status BAD_REQUEST`

rickr (Thu, 09 Mar 2017 02:51:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=em29jbFfGYruMvQoR) @Basug Well that's a pretty low bar ... but if it's working and suits your needs.... by all means go for it :)

Basug (Thu, 09 Mar 2017 02:54:44 GMT):
@rickr - that wouldn't be enough for my POC - I am hoping by the time I need it (March 15th of so, it would all work end to end). I am using some 3rd party libraries and if it initializes, I know they are loaded fine. Getting it to do other things wont be an issue, as I have had go chain code working for my needs.

rickr (Thu, 09 Mar 2017 02:56:36 GMT):
+

rickr (Thu, 09 Mar 2017 03:03:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pYXQ9rL97C7veC43v) What os are you on ?

Willson (Thu, 09 Mar 2017 03:27:19 GMT):
The vagrant runs a CentOS

rickr (Thu, 09 Mar 2017 03:27:45 GMT):
client ?

Willson (Thu, 09 Mar 2017 03:27:46 GMT):
The vagrant runs a CentOS7 and the sdk runs on Win10

icordoba (Thu, 09 Mar 2017 09:44:18 GMT):
Hello, anybody has any code example of how to deploy chain code and execute a method in a contract using GRPC in Java? (For org.hyperledger.fabric-sdk-java:fabric-sdk-java:0.6 or 1.0 version)

icordoba (Thu, 09 Mar 2017 09:44:18 GMT):
Hello, anybody has any code example of how to deploy chain code and execute a method in a contract using GRPC in Java? (For org.hyperledger.fabric-sdk-java:fabric-sdk-java:0.6 version)

rickr (Thu, 09 Mar 2017 13:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q78KabffbCCsYcSh2) @Willson Thinking now may be windows bugs we have. you could try running from your vagrant shell restart the fabric with the docker-compose.. in another terminal . ```vagrant ssh sudo apt-get update sudo apt-get install -y default-jdk maven sudo unlink /usr/share/maven/plexus-classworlds-2.x.jar git clone http://gerrit.hyperledger.org/r/fabric-sdk-java cd fabric-sdk-java mvn install mvn failsafe:integration-test -DskipITs=false ```

rickr (Thu, 09 Mar 2017 13:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q78KabffbCCsYcSh2) @Willson Thinking now may be windows bugs we have. you could try running from your vagrant shell restart the fabric with the docker-compose.. in another terminal . ```vagrant ssh sudo apt-get update sudo apt-get install -y default-jdk maven sudo unlink /usr/share/maven/boot/plexus-classworlds-2.x.jar git clone http://gerrit.hyperledger.org/r/fabric-sdk-java cd fabric-sdk-java mvn install mvn failsafe:integration-test -DskipITs=false ```

rickr (Thu, 09 Mar 2017 13:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q78KabffbCCsYcSh2) @Willson Thinking now may be windows bugs we have. you could try running from your vagrant shell restart the fabric with the docker-compose.. in another terminal . ```vagrant ssh sudo apt-get update sudo apt-get install -y default-jdk maven sudo unlink /usr/share/maven/boot/plexus-classworlds-2.x.jar git clone http://gerrit.hyperledger.org/r/fabric-sdk-java cd fabric-sdk-java mvn install mvn failsafe:integration-test -DskipITs=false ```

rickr (Thu, 09 Mar 2017 13:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q78KabffbCCsYcSh2) @Willson Thinking now may be windows bugs we have. you could try running from your vagrant shell restart the fabric with the docker-compose.. in another terminal . ```vagrant ssh sudo apt-get update sudo apt-get install -y default-jdk maven sudo unlink /usr/share/maven/boot/plexus-classworlds-2.x.jar git clone http://gerrit.hyperledger.org/r/fabric-sdk-java cd fabric-sdk-java mvn install GOPATH=/opt/gopath/src/github.com/hyperledger/fabric/fabric-sdk-java/src/test/fixture mvn failsafe:integration-test -DskipITs=false ```

rickr (Thu, 09 Mar 2017 13:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q78KabffbCCsYcSh2) @Willson Thinking now may be windows bugs we have. you could try running from your vagrant shell restart the fabric with the docker-compose.. in another terminal . ```vagrant ssh sudo apt-get update sudo apt-get install -y default-jdk maven sudo unlink /usr/share/maven/boot/plexus-classworlds-2.x.jar git clone http://gerrit.hyperledger.org/r/fabric-sdk-java cd fabric-sdk-java mvn install export GOPATH=/opt/gopath/src/github.com/hyperledger/fabric/fabric-sdk-java/src/test/fixture mvn failsafe:integration-test -DskipITs=false ```

mdozturk (Thu, 09 Mar 2017 13:33:36 GMT):
@icordoba check the test scripts included in the package

mdozturk (Thu, 09 Mar 2017 13:34:24 GMT):
@icordoba https://github.com/hyperledger/fabric-sdk-java/blob/v0.6/src/test/java/org/hyperledger/fabric/sdk/PeerClientTest.java

aberfou (Thu, 09 Mar 2017 13:48:31 GMT):
Has joined the channel.

rehmke (Thu, 09 Mar 2017 15:02:02 GMT):
Has joined the channel.

kletkeman (Thu, 09 Mar 2017 16:33:55 GMT):
@here Can I get a read on the status of the Java SDK w.r.t. maturity and stability? Also w.r.t. completeness as compared with the node sdk? The reason I ask is that we are porting two applications to v1, one in JavaScript and one in Java. Many thanks.

weeds (Thu, 09 Mar 2017 16:54:32 GMT):
@icordoba I would go here for now- https://jenkins.hyperledger.org and look under the fabric tab to see what all they have. I also know that they are working on updating documentation

ManjeetGambhir (Thu, 09 Mar 2017 18:45:27 GMT):
@rickr after leaving eventlister opened for long time ..seeing below error ERROR EventHub:77 - Error in stream: UNAVAILABLE

ManjeetGambhir (Thu, 09 Mar 2017 18:47:13 GMT):
@rickr and eventlistener doesnt receive any event

rickr (Thu, 09 Mar 2017 19:07:16 GMT):
@ManjeetGambhir open a JIRA need logs for client and orderer and peer

bmos299 (Thu, 09 Mar 2017 19:34:41 GMT):
Has joined the channel.

bmos299 (Thu, 09 Mar 2017 19:42:35 GMT):
@ManjeetGambhir if you want to post your information on the fabric-quality channel we can work with you and discuss your setup.

isramos (Thu, 09 Mar 2017 21:39:07 GMT):
I'm looking for a sample JAVA app, similar to the "Asset Transfer with SDK" demo for Node.js? (https://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html) Anyone has that?

isramos (Thu, 09 Mar 2017 21:39:07 GMT):
I'm looking for a sample JAVA app, similar to the "Asset Transfer with SDK" demo for Node.js (https://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html) Anyone has that?

Willson (Fri, 10 Mar 2017 01:21:44 GMT):
@rickr ok,thanks

imherro (Fri, 10 Mar 2017 08:10:43 GMT):
Has joined the channel.

imherro (Fri, 10 Mar 2017 08:11:00 GMT):
I'm looking for a sample JAVA app, similar to the "Asset Transfer with SDK" demo for Node.js (https://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html) Anyone has that?

ikruiper (Fri, 10 Mar 2017 11:01:21 GMT):
Has joined the channel.

anrodon (Fri, 10 Mar 2017 11:26:47 GMT):
Has joined the channel.

anrodon (Fri, 10 Mar 2017 11:27:36 GMT):
Getting this using the SDK: Caught an exception org.hyperledger.fabric.sdk.exception.EnrollmentException: Failed to enroll user user_type1_0 at org.hyperledger.fabric.sdk.MemberServicesFabricCAImpl.enroll(MemberServicesFabricCAImpl.java:312) at org.hyperledger.fabric.sdk.User.enroll(User.java:238) at org.hyperledger.fabric.sdk.Chain.enroll(Chain.java:553) at org.hyperledger.fabric.sdkexample.End2EndSample.setup(End2EndSample.java:53) at org.hyperledger.fabric.sdkexample.End2EndSample.main(End2EndSample.java:25) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Caused by: java.lang.Exception: POST request to https://378348750a38463d9fe6980153f24650-vp0.us.blockchain.ibm.com:5002/api/v1/cfssl/enroll failed with status code: 404. Response: {"Error":"Openchain endpoint not found."} Any thoughs?

rickr (Fri, 10 Mar 2017 12:00:29 GMT):
@anrodon edit the docker-compose.yml under services->cop->command change that line to add a `-d` Should look like this: `sh -c 'fabric-ca-server start -b admin:adminpw -d'` now restart all your docker containers recreate the issue pipe the output to a file post it to a utility like `justpaste.` and report it in the fabric_ca channel.

anrodon (Fri, 10 Mar 2017 12:00:58 GMT):
I'm using the Bluemix platform :sweat:

anrodon (Fri, 10 Mar 2017 12:01:30 GMT):
should I contact them?

rickr (Fri, 10 Mar 2017 12:02:30 GMT):
that was with V1 client ?

anrodon (Fri, 10 Mar 2017 12:04:17 GMT):
yes

anrodon (Fri, 10 Mar 2017 12:05:06 GMT):
I can send you the logs if you want

rickr (Fri, 10 Mar 2017 12:07:48 GMT):
that's .6 version I'm pretty sure so you need to use that client at least

tenshun (Fri, 10 Mar 2017 13:08:33 GMT):
Has joined the channel.

anrodon (Fri, 10 Mar 2017 13:09:15 GMT):
okay thanks :D

anrodon (Fri, 10 Mar 2017 14:17:32 GMT):
anyone has a sample example of working with the 0.6 sdk and bluemix? Thanks

anrodon (Fri, 10 Mar 2017 14:17:47 GMT):
Also without google should be good too

anrodon (Fri, 10 Mar 2017 14:17:47 GMT):
Also without bluemix should be good too

JatinderBali (Fri, 10 Mar 2017 15:46:36 GMT):
Has joined the channel.

Willson (Fri, 10 Mar 2017 15:49:08 GMT):
@rickr How can i get back the chain that had deployed on the network after restart the SdkClient to invoke a transaction?

Willson (Fri, 10 Mar 2017 15:51:00 GMT):
I did't find the API

rickr (Fri, 10 Mar 2017 15:52:44 GMT):
WIP At the moment its not persisted you can have to reconstructed it.

Willson (Fri, 10 Mar 2017 15:59:21 GMT):
are you meanting that everytime i want to invoke a invoke method in the chaincode i must reconstructed the chain?

tuand (Fri, 10 Mar 2017 16:03:38 GMT):
no, only when you restart your client app that uses the SDK

rickr (Fri, 10 Mar 2017 16:05:33 GMT):
At the moment you do.

Willson (Fri, 10 Mar 2017 16:09:59 GMT):
It seems to produce error when i deployed a with the same name repeatedly

Willson (Fri, 10 Mar 2017 16:10:27 GMT):
It seems to produce error when i deployed a chain with the same name repeatedly

Willson (Fri, 10 Mar 2017 16:19:43 GMT):
and the data that in last chain will be lost after reconstructing the chain, is not it?

rickr (Fri, 10 Mar 2017 16:20:25 GMT):
not tested ... but try this... ``` private static Chain reconstructChain(String name, HFClient client) throws Exception { //////////////////////////// TODo Needs to be made out of bounds and here chain just retrieved //Construct the chain // Chain newChain = client.newChain(name); int i = 0; for (String peerloc : PEER_LOCATIONS) { Peer peer = client.newPeer(peerloc); newChain.addPeer(peer); peer.setName("peer_" + i); } for (String orderloc : ORDERER_LOCATIONS) { Orderer orderer = client.newOrderer(orderloc); newChain.addOrderer(orderer); } for (String eventHubLoc : EVENTHUB_LOCATIONS) { EventHub eventHub = client.newEventHub(eventHubLoc); newChain.addEventHub(eventHub); } return newChain; }```

Willson (Fri, 10 Mar 2017 16:36:11 GMT):
It does not working org.hyperledger.fabric.sdk.exception.ProposalException: sendInstallProposal on chain not initialized.

rickr (Fri, 10 Mar 2017 16:38:43 GMT):
what if before that newChain .. it does newChain.initialize();

Willson (Fri, 10 Mar 2017 16:48:17 GMT):
sorry, i can't understand what you are meaning

rickr (Fri, 10 Mar 2017 17:14:37 GMT):
``` newChain.initialize() return newChain; ```

rickr (Fri, 10 Mar 2017 17:15:31 GMT):
BTW how'd you get up and running ?

rickr (Fri, 10 Mar 2017 17:58:32 GMT):
@jimthematrix @tuand After looking at this some I'm wondering why the SDK is on the hook for saving user/userContexts The User should have been just an interface for the things the SDK needed. The application using the SDK should have implemented it and storing / retrieving/registering/enrolling should have been the responsibility of the application

rickr (Fri, 10 Mar 2017 18:19:35 GMT):
Another related thought is the use of GOPATH env var I don't think the SDK ought use that as a `hidden` source for the GO source. The source should always be specifically specified by the application it self. If it wants it can use the GOPATH env var as the source location it can . In light of supporting multiple _usercontexts_ (ie users ) what would GOPATH env var really mean ? I doubt that multiple users would be using the very same source location referred to by a single env var (GOPATH)

tuand (Fri, 10 Mar 2017 19:41:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NxmPZ3CtBnRFGprrX) @rickr i see the User object as a container for the key/cert ... how the user is created/managed should be outside the sdk, especially given that there's no requirement to use fabric-ca

rickr (Fri, 10 Mar 2017 19:46:55 GMT):
Yeah I think I'm leaning to refactor it that way unless I see an issue or someone give me a strong enough argument against taking that approach

rickr (Fri, 10 Mar 2017 19:46:55 GMT):
Yeah I think I'm leaning to refactor it that way unless I see an issue or someone gives me a strong enough argument against taking that approach

Basug (Fri, 10 Mar 2017 20:23:57 GMT):
@rickr - any idea what this would mean `2017-03-10 15:23:06 ERROR Chain:1012 - Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=Block number should have been 1 but was 0, cause=null}`

Basug (Fri, 10 Mar 2017 20:24:08 GMT):
Running End2EndIT.java

Basug (Fri, 10 Mar 2017 20:24:48 GMT):
`org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to chain foo failed. Status FAILURE, details: Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=Block number should have been 1 but was 0, cause=null} `

rickr (Fri, 10 Mar 2017 20:27:50 GMT):
That's coming from the Fabric side we're just the _bearer_ of bad news. Best to ask on the fabric channel

Basug (Fri, 10 Mar 2017 20:28:13 GMT):
:-)

rickr (Fri, 10 Mar 2017 20:29:16 GMT):
That's at least where I'd start

Basug (Fri, 10 Mar 2017 20:50:38 GMT):
@rickr - I am able to make more progress.. This is the new one I am getting

Basug (Fri, 10 Mar 2017 20:51:32 GMT):
```Creating install proposal Successful install proposal response Txid: e2eadf4380e9152faab0ae0e7019ca2fc1e57380bf737a168c5218d0fdeaac91 Successful install proposal response Txid: e2eadf4380e9152faab0ae0e7019ca2fc1e57380bf737a168c5218d0fdeaac91 Received 2 install proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiateProposalRequest code with a and b set to 100 and 200 respectively 2017-03-10 15:49:28 ERROR Chain:1012 - Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image

rickr (Fri, 10 Mar 2017 21:04:53 GMT):
Is this the End2endIT test out of the box ? no modifications ?

Basug (Fri, 10 Mar 2017 21:06:54 GMT):
yeah no modifications

Basug (Fri, 10 Mar 2017 21:07:05 GMT):
I am sure I am missing a step somewhere..

rickr (Fri, 10 Mar 2017 21:07:41 GMT):
Looks to me like something went wrong in building your fabric side

Basug (Fri, 10 Mar 2017 21:07:54 GMT):
ok, will take a look

tuand (Fri, 10 Mar 2017 21:14:48 GMT):
@basug, I ran into that `platform-specific docker build` not too long ago ... I rebuilt vagrant ( halt, destroy then up ) to clear it

Basug (Fri, 10 Mar 2017 23:24:01 GMT):
thanks @tuand

Basug (Fri, 10 Mar 2017 23:24:27 GMT):
is it possible to run SimpleSample.java or right now go is the only option ?

icordoba (Fri, 10 Mar 2017 23:41:25 GMT):
Hello, I am following https://github.com/hyperledger/fabric-sdk-java . I hace successfully made fabric-ca and fabric "docker" builds, and launched them with the docker-compose.yml as described but when I execute the tests I get Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/fe80:0:0:0:0:0:0:1%1:5151 error

icordoba (Fri, 10 Mar 2017 23:42:18 GMT):
I see that OrdererTest.java file points to port 5151. Should just change it to 7050 in the java source code or I am missing a docker that should listen to 5151 ?

rickr (Fri, 10 Mar 2017 23:44:57 GMT):
That test is checking out an error case id doesn't expect to see anything there

icordoba (Fri, 10 Mar 2017 23:45:58 GMT):
You mean there should be nothing listening to port 5151 and that OrdererTest is supposed to fail?

rickr (Fri, 10 Mar 2017 23:46:12 GMT):
y

rickr (Fri, 10 Mar 2017 23:47:09 GMT):
mvn clean

rickr (Fri, 10 Mar 2017 23:47:15 GMT):
mvn install

rickr (Fri, 10 Mar 2017 23:47:36 GMT):
do you see an BUILD SUCCESS ?

icordoba (Fri, 10 Mar 2017 23:47:47 GMT):
let me check...

Basug (Fri, 10 Mar 2017 23:48:53 GMT):
@rickr - are we at a stage where I can run Java Chaincode ? or only go chain code works ?

icordoba (Fri, 10 Mar 2017 23:48:58 GMT):
yes, I just see many test errors also so I though they were not meant to occur, like so many connection attempts to 5151 port.

icordoba (Fri, 10 Mar 2017 23:48:58 GMT):
@rickr yes, I just see many test errors also so I though they were not meant to occur, like so many connection attempts to 5151 port.

rickr (Fri, 10 Mar 2017 23:50:35 GMT):
At the moment I've not heard that Java chain code is running ..

rickr (Fri, 10 Mar 2017 23:52:32 GMT):
But you're asking on the wrong channel

Basug (Fri, 10 Mar 2017 23:52:43 GMT):
oh, which is the right one ?

Basug (Fri, 10 Mar 2017 23:52:49 GMT):
fabric ?

rickr (Fri, 10 Mar 2017 23:53:37 GMT):
fabric-java-chaincode When it gets fixed I'm sure it will be announced there

icordoba (Fri, 10 Mar 2017 23:55:06 GMT):
@rickr So this fabric-sdk-java can only be used to deploy GO chaincode in this versions 1.0 and v0.6.1 dockers are still needed to deploy java chaincode ? (hyperledger/fabric-peer:x86_64-0.6.1-preview and hyperledger/fabric-javaenv:x86_64-0.6.1-preview )

icordoba (Fri, 10 Mar 2017 23:55:36 GMT):
Oops, I'll ask there.

icordoba (Sat, 11 Mar 2017 00:00:30 GMT):
@rickr can this fabric-sdk-java client work with the 0.6.1 fabric (hyperledger/fabric-peer:x86_64-0.6.1-preview and hyperledger/fabric-peer:x86_64-0.6.1-preview) dockers via REST or GRPC or it only works with new 1.0 ones?

rickr (Sat, 11 Mar 2017 00:01:02 GMT):
Strictly V1.0

rickr (Sat, 11 Mar 2017 00:02:36 GMT):
master branch ofJava SDK is V1.0 and only works with Fabric V1.0 version

rickr (Sat, 11 Mar 2017 02:15:21 GMT):
@jimthematrix https://gerrit.hyperledger.org/r/#/c/6941/

icordoba (Sat, 11 Mar 2017 13:02:38 GMT):
Hello, I am trying to run the v0.6 tests of fabric-sdk-java with 0.61 version dockers and I've sorted out some problems. I am now getting this error:

icordoba (Sat, 11 Mar 2017 13:02:46 GMT):
Caused by: io.grpc.StatusRuntimeException: UNKNOWN: sql: no rows in result set

icordoba (Sat, 11 Mar 2017 13:03:48 GMT):
As explained in the doc I delete the /var/hyperledger/production directory but I am not sure if I should delete anything else (the link in that doc is not working anymore

Willson (Sat, 11 Mar 2017 14:17:55 GMT):
Guys,I created a chain code configuration file integralchain.configtx via running the command that "./configtxgen -outputCreateChannelTx integralchain.configtx -profile SampleSingleMSPSolo -channelID integralchain".The chain was created successfully by running initialize() and the sendInstallProposal() return a successful respond.But when I invoke the method that sendInstantiationProposal(), it return an error like this:Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP DEFAULT is unknown, cause=null}.What's wrong with this?

rickr (Sat, 11 Mar 2017 14:20:19 GMT):
Was the peer joined to the that new Channel ?

Willson (Sat, 11 Mar 2017 14:21:12 GMT):
Yeah ,

Willson (Sat, 11 Mar 2017 14:21:15 GMT):
public void constructChain() { Chain chain = null; try { String[] orderArray = orders.split(","); String[] peerArray = peers.split(","); String[] eventhubArray = eventhubs.split(","); ChainConfiguration chainConfiguration = new ChainConfiguration(new File("src/main/resources/" + chainName + ".configtx")); chain = client.newChain(chainName, client.newOrderer(orderArray[0]), chainConfiguration); for (String orderLocation : orderArray) { Orderer orderer = client.newOrderer(orderLocation); chain.addOrderer(orderer); } for (String eventhubLocation : eventhubArray) { EventHub eventHub = client.newEventHub(eventhubLocation); chain.addEventHub(eventHub); } int i = 0; for (String peerLocation : peerArray) { Peer peer = client.newPeer(peerLocation); peer.setName("peer_" + i); chain.addPeer(peer); i++; } chain.setInvokeWaitTime(invokeWAitTime); chain.setDeployWaitTime(deployWAitTime); chain.initialize(); Collection chainPeers = chain.getPeers(); } catch (Exception e) { e.printStackTrace(); }

rickr (Sat, 11 Mar 2017 14:22:49 GMT):
no doesn't look to me like it was joined

Willson (Sat, 11 Mar 2017 14:23:36 GMT):
And i have modifed the configrx.yaml like this : AnchorPeers: # AnchorPeers defines the location of peers which can be used # for cross org gossip communication. Note, this value is only # encoded in the genesis block in the Application section context. - Host: vp0 Port: 7051 - Host: vp1 Port: 7051 Addresses: - orderer:7050

Willson (Sat, 11 Mar 2017 14:24:33 GMT):
What should i do?

rickr (Sat, 11 Mar 2017 14:24:56 GMT):
join the peer instead of adding it

Willson (Sat, 11 Mar 2017 14:28:35 GMT):
Can you elaborate on it? I can't get the sample in the sdk.Thank you!

rickr (Sat, 11 Mar 2017 14:30:50 GMT):
~chain.addPeer(peer);~ chain.joinPeer(peer);

rickr (Sat, 11 Mar 2017 14:31:09 GMT):
why can't you get the sample ?

Willson (Sat, 11 Mar 2017 14:33:49 GMT):
I was careless, sorry!:cold_sweat:

anrodon (Sat, 11 Mar 2017 20:37:55 GMT):
Hey guys

anrodon (Sat, 11 Mar 2017 20:38:04 GMT):
I'm using the 0.6 SDK

anrodon (Sat, 11 Mar 2017 20:38:09 GMT):
with this code

anrodon (Sat, 11 Mar 2017 20:38:19 GMT):
```` public static void main(String[] args) throws CertificateException, EnrollmentException { chain = new Chain(chainId); chain.setMemberServicesUrl(memberServicesUrl, null); chain.setKeyValStore(new FileKeyValStore(System.getProperty("user.home")+"/test.properties")); chain.addPeer(peerUrl, null); Member member = chain.getMember(userId); if (!member.isEnrolled()) { member = chain.enroll(userId, userPsswd); } System.out.println(member); } `````

anrodon (Sat, 11 Mar 2017 20:39:04 GMT):
What happens is that when it tries to enroll the user, the program hangs in this state: Mar 11, 2017 9:33:36 PM io.grpc.internal.TransportSet$1 call INFO: Created transport io.grpc.netty.NettyClientTransport@285c08c8(378348750a38463d9fe6980153f24650-ca.us.blockchain.ibm.com/169.47.55.104:30002) for 378348750a38463d9fe6980153f24650-ca.us.blockchain.ibm.com/169.47.55.104:30002 Mar 11, 2017 9:33:37 PM io.grpc.internal.TransportSet$TransportListener transportShutdown INFO: Transport io.grpc.netty.NettyClientTransport@285c08c8(378348750a38463d9fe6980153f24650-ca.us.blockchain.ibm.com/169.47.55.104:30002) for 378348750a38463d9fe6980153f24650-ca.us.blockchain.ibm.com/169.47.55.104:30002 is being shutdown

anrodon (Sat, 11 Mar 2017 20:42:16 GMT):
Anyone here knows what could be happening?

anrodon (Sat, 11 Mar 2017 20:43:06 GMT):
I don't know if it helps, but the program was telling, ALPN is not well configured and I solved it including jettty-alpn-boot as a classpath

rickr (Sun, 12 Mar 2017 00:01:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q78KabffbCCsYcSh2) @Willson So I finally got to trying the SDK on Window's (7) and everything ran OK. You never did tell me how you got around the issues you were seeing.

JasonD (Sun, 12 Mar 2017 06:14:10 GMT):
Has joined the channel.

Willson (Sun, 12 Mar 2017 07:06:27 GMT):
Yeah, when i reinstall me os, everything is ok. Maybe there are some wrong settings in my system.

Willson (Sun, 12 Mar 2017 07:06:48 GMT):
Yeah, when i reinstall my os, everything is ok. Maybe there are some wrong settings in my system.

Willson (Sun, 12 Mar 2017 13:34:20 GMT):
@rickr Hello guy, after operating newChain.addEventHub(eventHub); , how can we listen the blockevent and recieve the block data from the channel?

tuand (Sun, 12 Mar 2017 13:42:16 GMT):
@willson check in Chain.java for how `registerBlockListener` and `registerTransactionListerner` are used

Willson (Sun, 12 Mar 2017 13:46:29 GMT):
ok thanks

Willson (Sun, 12 Mar 2017 14:00:44 GMT):
@tuand I am sorry? There is no a method named registerTransactionListerner or registerTransactionListerner in the Chain.java even in the sdk.Has not yet been submitted to github?

Willson (Sun, 12 Mar 2017 14:08:19 GMT):
oh sorry, I get them.thanks

rickr (Sun, 12 Mar 2017 18:37:09 GMT):
@jimthematrix @tuand @Pardha @malik-altaf @satheeshk Let me first state I'm not one for creating Java Interface just for the sake of Interfaces :) However, the more I think about it the more I feel the SDK public facing classes should be all Interfaces :( Keep clean what classes we expect users to use in the SDK and those not to use and produce a clean Javadoc of just those interfaces. Thoughts ?

anrodon (Mon, 13 Mar 2017 08:45:15 GMT):
how do I specify the client-config for the ca?

o.o. (Mon, 13 Mar 2017 09:49:13 GMT):
Has joined the channel.

Basug (Mon, 13 Mar 2017 11:13:09 GMT):
Getting this error with 0.6 , what could be causing this ?

Basug (Mon, 13 Mar 2017 11:13:12 GMT):
```java.lang.IllegalStateException: Cannot put state in query context at org.hyperledger.java.shim.Handler.handlePutState(Handler.java:541) at org.hyperledger.java.shim.ChaincodeStub.putState(ChaincodeStub.java:69)

Basug (Mon, 13 Mar 2017 12:03:22 GMT):
nm - got it working

rickr (Mon, 13 Mar 2017 12:04:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fvLRB6J3G3QL3vWNm) v1.0? Certificate authority ?

tuand (Mon, 13 Mar 2017 13:13:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=K4TZ2dPmoaWvKNujq) @rickr on first thought, I'd say we have the "possible multiple implementations" objects like user, crypto, CA and the fabric specific objects like channel, block, envelope, event. What's your scenario ?

dorrakhribi (Mon, 13 Mar 2017 13:14:32 GMT):
Has joined the channel.

rickr (Mon, 13 Mar 2017 13:23:45 GMT):
Scenario is providing user's only the Interfaces we expect them use with only the methods they should invoke. This can then produce clean Javadoc something we should be providing. It allows the implementation more freedom in organizing the code in different packages. Most of the classes that need to be interfaces for the embedding application will be addressed in FAB-1204

rickr (Mon, 13 Mar 2017 13:29:24 GMT):
FYI I went through the existing open JIRAs and marked those _I think_ with are *must haves* as highest priority. *run ats* as higher anything else is _icing on the cake_

rickr (Mon, 13 Mar 2017 13:29:24 GMT):
FYI I went through the existing open JIRAs and marked those _I think_ are *must haves* as highest priority. *run ats* as higher anything else is _icing on the cake_

rickr (Mon, 13 Mar 2017 13:29:24 GMT):
FYI I went through the existing open JIRAs and marked those _I think_ are *must haves* as highest priority. *run ats* as higher anything else is _icing on the cake_ for V1

harsha (Mon, 13 Mar 2017 14:13:18 GMT):
Has joined the channel.

eric.wall (Mon, 13 Mar 2017 14:42:25 GMT):
Has joined the channel.

tsnyder (Mon, 13 Mar 2017 15:38:03 GMT):
Eventing Question - If a client goes down for awhile, when it comes back up what is the process for resync'ing the interim missing Block Events? Does the client need to track the last Block Event that it has processed? For each channel? Do the interim Block Events need to be requested or are they auto (magically) sent? How does the Peer's Event Hub differentiate Block Events across multiple channels / Ledgers? Is there a way for the Client to send in - this is the last Block Event I received and for the Peer to start sending all Block Events across all channels in time order irrespective of channel? I am trying to determine the recovery process for a Client application.

rickr (Mon, 13 Mar 2017 15:48:46 GMT):
I think there's one answer for most of the above.. There are no plans for the SDK to preserve any state (aka persistence). .The event hub listener only provides events for that chain. We don't plan on having a "starting" point for the Blocklistener. We would have to hold off all the block events coming in till the ones the application consumed that it wanted from previously. I don't see the SDK doing this.

rickr (Mon, 13 Mar 2017 15:58:33 GMT):
We don't have a query to get block ranges ... but that might be a reasonable request.

tsnyder (Mon, 13 Mar 2017 17:14:23 GMT):
@rickr - Thanks for the response. So via the SDK we need to register to a peer for every channel we want to receive the Block Events on - correct? And this is a separate listener instance, presumably, or could it be the same instance across channels? (Probably not important but options are good things.) The key is that the client itself that the SDK is part of needs to keep track of the last Block Event that it has processed for each channel it is authorized to. On restart after being down, it needs to be able to query the Block Events for each of the channels up to the point that it becomes current. It could then register a listener with each channel to start receiving them automatically from that point on. Is this how you would envision it working?

rickr (Mon, 13 Mar 2017 17:39:10 GMT):
Right now it's a instance per channel. Yes about the restart. I would assume, in any production environment you would really want to keep that state of where you're at in the blockchain in a database or process the blocs themselves in a consumer producer via MQ or Kafka if you really wanted that type of reliability.. @jimthematrix did something really interesting work based on V.6 that is close to what I think you asking about. Feel free to take a look :) https://github.com/jimthematrix/blockchain-features

rickr (Mon, 13 Mar 2017 18:11:55 GMT):
@tsnyder I got to thinking that starting off the EH from a specific starting point might be an easier task for the Fabric side to handle as an option the SDK would just pass them (_how's that for just passing the buck!_ :) ). Talking to those developers it didn't seem out of the realm of possibilities. I suggest you open a JIRA for an improvement for them to evaluate.

tsnyder (Mon, 13 Mar 2017 20:25:35 GMT):
Added JIRA 2770

wisam.mohammed (Mon, 13 Mar 2017 21:01:22 GMT):
Has joined the channel.

Basug (Mon, 13 Mar 2017 22:17:33 GMT):
with 0.6 can I listen to transaction events ?

Basug (Mon, 13 Mar 2017 22:17:40 GMT):
in Java

Basug (Mon, 13 Mar 2017 22:19:22 GMT):
I see EventHub in 0.6 branch as well, I guess it works ?

kletkeman (Mon, 13 Mar 2017 22:25:38 GMT):
@basug Event listening in Go works perfectly. So if the Java SDK is able to connect, you will get events.

zhoupeiwen (Tue, 14 Mar 2017 02:06:33 GMT):
hi , I just run the testing java sdk 1.0 End2endIT, fabric and ca is installed in another machine, got the exception "org.hyperledger.fabric.sdk.exception.TransactionException: New chain foo error. StatusValue 400. Status BAD_REQUEST", anything I missed?

Willson (Tue, 14 Mar 2017 02:31:33 GMT):
Maybe you did not reset the commitlevel of fabric and fabtic-ca

yoheiueda (Tue, 14 Mar 2017 07:47:54 GMT):
Has joined the channel.

ruslan.kryukov (Tue, 14 Mar 2017 08:42:07 GMT):
``` public String getMSPID() { return "DEFAULT"; //TODO what will this be ? } ```

ruslan.kryukov (Tue, 14 Mar 2017 08:43:35 GMT):
Is there task for this problem?

sachikoy (Tue, 14 Mar 2017 10:21:39 GMT):
Has joined the channel.

rickr (Tue, 14 Mar 2017 11:00:34 GMT):
Addressed in this pending cs https://gerrit.hyperledger.org/r/#/c/6797/

zerppen (Tue, 14 Mar 2017 13:34:39 GMT):
Hi, rickr @rickr go-chaincode can get all table information using GetRows when parameter key is nil,while java-chaincode method getRows in ChaincodeStub.java from branch v0.6 can't deal with the Null parameter key but get NullPointException

rickr (Tue, 14 Mar 2017 13:35:46 GMT):
I'm not working on .6

zerppen (Tue, 14 Mar 2017 13:35:51 GMT):
And I have changed the method getRows like go-chaincode v0.6

zerppen (Tue, 14 Mar 2017 13:36:29 GMT):
I wanner push this but I can't get a way

zerppen (Tue, 14 Mar 2017 13:40:16 GMT):
ok..

zerppen (Tue, 14 Mar 2017 13:42:39 GMT):
I commited it then pushed but got error"error: failed to push some refs to 'ssh://zerppen@gerrit.hyperledger.org:29418/fabric-sdk-java"

zerppen (Tue, 14 Mar 2017 13:43:00 GMT):
Could u do me a favor? @rickr

rickr (Tue, 14 Mar 2017 13:43:45 GMT):
for .6 get in contact with @satheeshk

zerppen (Tue, 14 Mar 2017 13:44:43 GMT):
ok,thanks

moriohara (Tue, 14 Mar 2017 14:45:08 GMT):
Has joined the channel.

moriohara (Tue, 14 Mar 2017 15:00:45 GMT):
1732

lignyxg (Tue, 14 Mar 2017 17:26:24 GMT):
Has joined the channel.

ManjeetGambhir (Wed, 15 Mar 2017 02:30:08 GMT):
2017-03-14 22:17:51 ERROR Chain:1012 - Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=failed to obtain cds for publiccc - transaction not found publiccc/bar, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for publiccc - transaction not found publiccc/bar Any idea about this error ? I am trying to create separate program for creating chain -- got success install and instantiate after loading chain ---got success ..can see container for publiccc but when I trying to invoke transaction getting above error ..any idea

rickr (Wed, 15 Mar 2017 02:32:07 GMT):
Are you running more than one Peer ?

ManjeetGambhir (Wed, 15 Mar 2017 02:32:59 GMT):
Yes

ManjeetGambhir (Wed, 15 Mar 2017 02:33:03 GMT):
Two peer

ManjeetGambhir (Wed, 15 Mar 2017 02:34:54 GMT):
If I create chain and install and instantiate in one step ,theninvoke transaction works

rickr (Wed, 15 Mar 2017 02:35:06 GMT):
For now try this _work around_ put a 5 second sleep before you send the invoke proposal

ManjeetGambhir (Wed, 15 Mar 2017 02:35:15 GMT):
ok

ManjeetGambhir (Wed, 15 Mar 2017 02:35:24 GMT):
let me try

ManjeetGambhir (Wed, 15 Mar 2017 02:40:21 GMT):
no luck ..

rickr (Wed, 15 Mar 2017 02:41:28 GMT):
does it succeed on one peer but fails on the other ?

rickr (Wed, 15 Mar 2017 02:42:23 GMT):
are you waiting for the instantiate transaction to complete ?

ManjeetGambhir (Wed, 15 Mar 2017 02:44:56 GMT):
Yes

ManjeetGambhir (Wed, 15 Mar 2017 02:45:11 GMT):
I can see docker container for publiccc

ManjeetGambhir (Wed, 15 Mar 2017 02:45:17 GMT):
running

rickr (Wed, 15 Mar 2017 02:45:39 GMT):
can you try for now with one peer ?

ManjeetGambhir (Wed, 15 Mar 2017 02:46:09 GMT):
I removed one peer and try same result

ManjeetGambhir (Wed, 15 Mar 2017 02:46:12 GMT):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4699ba73ec9a dev-vp0-publiccc-1.0 "chaincode -peer.a..." 7 minutes ago Up 7 minutes dev-vp0-publiccc-1.0 23d624451cdb dev-vp1-publiccc-1.0 "chaincode -peer.a..." 7 minutes ago Up 7 minutes dev-vp1-publiccc-1.0 a

ManjeetGambhir (Wed, 15 Mar 2017 02:47:32 GMT):
no luck

ManjeetGambhir (Wed, 15 Mar 2017 02:48:03 GMT):
do you want me do above process with one peer

rickr (Wed, 15 Mar 2017 02:48:04 GMT):
if you're run with one peer and the eventhub is to that same peer can you see if it reproduces ?

rickr (Wed, 15 Mar 2017 02:48:11 GMT):
yes

rickr (Wed, 15 Mar 2017 02:50:36 GMT):
have to go now tell me if it helped any

ManjeetGambhir (Wed, 15 Mar 2017 02:52:11 GMT):
Not worked same erorr ..tried with single peer

ManjeetGambhir (Wed, 15 Mar 2017 02:52:56 GMT):
nothing got changed ..same error coming if I load chain and call invoke

rickr (Wed, 15 Mar 2017 02:55:19 GMT):
@muralisr ^^^ Error seems to be not just isolated to multiple peers

ManjeetGambhir (Wed, 15 Mar 2017 02:56:36 GMT):
murali will suggest ?

muralisr (Wed, 15 Mar 2017 03:11:09 GMT):
@ManjeetGambhir do you have the peer logs ?

ManjeetGambhir (Wed, 15 Mar 2017 03:13:43 GMT):
I have to rerun scenario..let me do it

ManjeetGambhir (Wed, 15 Mar 2017 03:22:34 GMT):

Message Attachments

ManjeetGambhir (Wed, 15 Mar 2017 03:22:54 GMT):
@muralisr uploaded logs

muralisr (Wed, 15 Mar 2017 03:32:46 GMT):
@ManjeetGambhir I don't see publiccc but see some other activity

muralisr (Wed, 15 Mar 2017 03:32:57 GMT):
are you sure this is the right log ?

ManjeetGambhir (Wed, 15 Mar 2017 03:33:27 GMT):
Yes ..lets do it tomm..

muralisr (Wed, 15 Mar 2017 03:33:43 GMT):
let me make sure I was looking at the right download...

muralisr (Wed, 15 Mar 2017 03:34:53 GMT):
never mind, my mistake... I was looking at the wrong file

muralisr (Wed, 15 Mar 2017 03:39:46 GMT):
I see the chaincode was successfully started and instantiated

muralisr (Wed, 15 Mar 2017 03:40:02 GMT):
however, I don't see a Commit message

muralisr (Wed, 15 Mar 2017 03:40:55 GMT):
which basically says the transaction flow did not complete post endorsement

muralisr (Wed, 15 Mar 2017 03:41:06 GMT):
do you have orderer logs ?

ManjeetGambhir (Wed, 15 Mar 2017 03:55:24 GMT):
@muralisr I will rerun this scenario tomm and provide you orderer details

muralisr (Wed, 15 Mar 2017 03:55:47 GMT):
sure, I was going to suggest we take this up tomorrow too

muralisr (Wed, 15 Mar 2017 03:56:35 GMT):
please use ORDERER_GENERAL_LOGLEVEL=debug flag to capture debug on orderer

Xie.YZ (Wed, 15 Mar 2017 08:13:43 GMT):
Has joined the channel.

ruslan.kryukov (Wed, 15 Mar 2017 08:44:13 GMT):
When I run sdk with only invoke function, I have error: Bad last configuation block type 3, expected 1

ruslan.kryukov (Wed, 15 Mar 2017 08:44:43 GMT):
I send invoke to own channel (not testchainid) and this channel exists

ruslan.kryukov (Wed, 15 Mar 2017 08:45:05 GMT):
also chaincode exists too

ruslan.kryukov (Wed, 15 Mar 2017 08:45:50 GMT):
but if I start with all lifecycle functions (install, instantiate, invoke), all works good

karumbas (Wed, 15 Mar 2017 11:49:19 GMT):
Has joined the channel.

rickr (Wed, 15 Mar 2017 12:03:38 GMT):
ok will have to try that

balashevich (Wed, 15 Mar 2017 12:34:17 GMT):
Has joined the channel.

rickr (Wed, 15 Mar 2017 12:40:12 GMT):
FYI Last night changes were submitted that will most likely break any existing code based on the SDK. To summarize: Certificate authority and Block chain /code management functionality have been separated more cleanly into two separate clients. HFCAClient to handle certificate authority and HFClient to manage channels and chain code. The only linkage between them at the moment is a certificate authority needs to implement the HFClient's Enrollment interface. The next change is the HFClient User is now an interface instead of a class. Most embedding application have some concept of a user already and forcing them to use the SDK's User class seemed too tightly coupled. An interface allows for more easily integration in other persistence technologies like JDO and reuse of existing application classes by just implementing the SDK User's interface. Lastly the SDK no longer use's the GOPATH environment variable for finding GO application source. In a multiuser context this does not seem realistic and not something the SDK should force on the embedding application. The embedding application is free to implement by setting the setChaincodeSourceLocation on InstallProposalRequest to the GOPATH environment variable. The update also now allows a user with an admin role to register and enroll additional users to use the SDK. The End2endIT.java sample has been refactored to show how this all can work together.

kleman (Wed, 15 Mar 2017 16:53:30 GMT):
:thumbsup:

tuand (Wed, 15 Mar 2017 17:04:47 GMT):
all ... https://gerrit.hyperledger.org/r/#/c/7027/ is now merged into the V1.0 master branch ... this change set add methods to Chain to invoke the Query System Chain Code , i.e queryBlockChainInfo, queryBlockByHash/Number, queryTxByID

Xie.YZ (Thu, 16 Mar 2017 07:10:43 GMT):
@tuand chinese?

ruslan.kryukov (Thu, 16 Mar 2017 10:11:12 GMT):
What if multiple users want to work with HFClient?

ruslan.kryukov (Thu, 16 Mar 2017 10:11:29 GMT):
We need to create multiple instances too?

ruslan.kryukov (Thu, 16 Mar 2017 10:12:53 GMT):
because there is no another way due to HFCClient has only one user context: ``` /** * Set the User context for this client. * * @param userContext */ public void setUserContext(User userContext) throws InvalidArgumentException ```

ruslan.kryukov (Thu, 16 Mar 2017 10:12:53 GMT):
because there is no another way due to HFClient has only one user context: ``` /** * Set the User context for this client. * * @param userContext */ public void setUserContext(User userContext) throws InvalidArgumentException ```

ruslan.kryukov (Thu, 16 Mar 2017 10:14:31 GMT):
it's not suitable for using sdk by this way because HFC client is heavy (in my opinion)

ruslan.kryukov (Thu, 16 Mar 2017 10:14:31 GMT):
it's not suitable for using sdk by this way because HFClient is heavy (in my opinion)

bh4rtp (Thu, 16 Mar 2017 10:18:00 GMT):
Has joined the channel.

ruslan.kryukov (Thu, 16 Mar 2017 10:20:44 GMT):
I was noticed that we get userContext when construct TransactionContext in install/instantiate/send methods. What if we just pass userContext in this methods instead of storing user in HFClient?

ruslan.kryukov (Thu, 16 Mar 2017 10:20:44 GMT):
I'm noticed that we get userContext when construct TransactionContext in install/instantiate/send methods. What if we just pass userContext in this methods instead of storing user in HFClient?

ruslan.kryukov (Thu, 16 Mar 2017 10:20:44 GMT):
I'm noticed that we get userContext when construct TransactionContext in install/instantiate/send methods. What if we just pass userContext in Request-object to this methods instead of storing user in HFClient?

ruslan.kryukov (Thu, 16 Mar 2017 10:20:58 GMT):
for example

ruslan.kryukov (Thu, 16 Mar 2017 10:22:52 GMT):
We can place UserContext in TransactionRequest, InstantiateProposalRequest, InstallProposalRequest

ruslan.kryukov (Thu, 16 Mar 2017 10:23:16 GMT):
and when we create requests to fabric, we assign user to request

ruslan.kryukov (Thu, 16 Mar 2017 10:24:32 GMT):
But then there's the problem where we need to store userContext between requests

ruslan.kryukov (Thu, 16 Mar 2017 10:25:09 GMT):
I see that we have org.hyperledger.fabric.sdkintegration.SampleStore class

ruslan.kryukov (Thu, 16 Mar 2017 10:25:29 GMT):
this class represents key value store for members

ruslan.kryukov (Thu, 16 Mar 2017 10:26:31 GMT):
we can use it for store users between requests and fetch target user by name when we need to send request to fabric

ruslan.kryukov (Thu, 16 Mar 2017 10:30:34 GMT):
for example we have: `InstallProposalRequest installProposalRequest = client.newInstallProposalRequest();` it can be changed to: `InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(userContext);'

ruslan.kryukov (Thu, 16 Mar 2017 10:30:34 GMT):
for example we have: `InstallProposalRequest installProposalRequest = client.newInstallProposalRequest();` it can be changed to: `InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(userContext);`

ruslan.kryukov (Thu, 16 Mar 2017 10:30:52 GMT):
and so on

rickr (Thu, 16 Mar 2017 11:29:11 GMT):
We plan to allow switching users in the userContext but that's not there right now. Probably many cases where work is done in the context of a single user. If there just a few they can create an client instance for each.

anrodon (Thu, 16 Mar 2017 12:29:02 GMT):
Hey guys which is the best way to ask for old states of a chaincode? I want to build a ui where see all the logs and states from every object

tuand (Thu, 16 Mar 2017 12:45:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oDA6mcM3cLzrzBaCe) @Xie.YZ vietnamese :)

karumbas (Thu, 16 Mar 2017 13:09:05 GMT):
Hi everyone... I am running the End2endIT test but getting the following error

karumbas (Thu, 16 Mar 2017 13:09:06 GMT):
Failed tests: End2endIT.setup:175 New chain foo error. StatusValue 404. Status NOT_FOUND

karumbas (Thu, 16 Mar 2017 13:09:26 GMT):
Tests run: 2, Failures: 1, Errors: 0, Skipped: 1

karumbas (Thu, 16 Mar 2017 13:09:56 GMT):
What am I doing wrong?

pschnap (Thu, 16 Mar 2017 13:17:05 GMT):
I've been asked to do a code review on https://gerrit.hyperledger.org/r/#/c/7249/ and am in a quandary: the "name" parameter has been switched to "grpcUrl", which is a URL as I'd thought it should be, but the naming used in the class is inconsistent now: "url" vs "grpcUrl". Should I request they change it to just "url" to be consistent with the rest of the class?

rickr (Thu, 16 Mar 2017 13:21:45 GMT):
I'm looking at it now .. This method should not be exposed .. and won't be. It should have the public removed. I can accept the change but it's not something as an enduser should be exposed to.

rickr (Thu, 16 Mar 2017 13:23:05 GMT):
BTW you need to add reviewers to your submitted patches

rickr (Thu, 16 Mar 2017 13:24:29 GMT):
Type the Add then the letter c ... you see a sdk java group

rickr (Thu, 16 Mar 2017 13:24:29 GMT):
By Reviewers click Add.. then the letter c ... you see a sdk java group

pschnap (Thu, 16 Mar 2017 13:30:19 GMT):
Thanks rickr, I added the group. This is the first time I've submitted a bug to an OSS project so I'm not familiar w/ the workflow

rickr (Thu, 16 Mar 2017 13:30:44 GMT):
np -- thx for helping out

rickr (Thu, 16 Mar 2017 13:31:24 GMT):
I've commented on your change address and I'll submitt

pschnap (Thu, 16 Mar 2017 13:31:25 GMT):
(I also removed myself as a reviewer)

pschnap (Thu, 16 Mar 2017 13:36:14 GMT):
(I only submitted the bug, not the patch; Cong Honglei will have to change it I guess)

pschnap (Thu, 16 Mar 2017 13:36:38 GMT):
Thanks again, rickr !

andrea.turli (Thu, 16 Mar 2017 13:53:41 GMT):
Has joined the channel.

andrea.turli (Thu, 16 Mar 2017 13:57:25 GMT):
hi @here, thanks for the java-sdk, I found it today and I'm trying to use starting from `End2endIT` I'd like to replace this `mockUserContext` https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L124 with something real, where should I get it from membershipService maybe? thanks!

andrea.turli (Thu, 16 Mar 2017 13:57:25 GMT):
hi @here, thanks for the java-sdk, I found it today and I'm trying to use it starting from `End2endIT` I'd like to replace this `mockUserContext` https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L124 with something real, where should I get it from membershipService maybe? thanks!

rickr (Thu, 16 Mar 2017 14:07:51 GMT):
The User is an interface you can create any User class you like as long as it implements that interface

andrea.turli (Thu, 16 Mar 2017 14:14:11 GMT):
thank @rickr shoudn't a user be memeber of the mernershipService?

tuand (Thu, 16 Mar 2017 14:24:38 GMT):
no , membership services give you a certificate signed by the correct CA, it does not keep track of users. You can implement users however you like as long as it follows the User interface

andrea.turli (Thu, 16 Mar 2017 14:29:09 GMT):
thanks @tuand that makes sense. so starting from this class https://github.com/hyperledger/fabric-sdk-java/blob/2d5629cca2dba95274ab70dba34e9d86e1092e0e/src/test/java/org/hyperledger/fabric/sdk/TestHFClient.java#L36-L36 which are the relevant bit I need to set on the HFClient to target my environment?

andrea.turli (Thu, 16 Mar 2017 14:47:34 GMT):
@rickr and @tuand I'd appreciate a simple example on how to configure a real world HFClient, if you can, thanks!

rickr (Thu, 16 Mar 2017 14:49:02 GMT):
Implement the User interface in your application follow the End2endIT example

andrea.turli (Thu, 16 Mar 2017 14:52:44 GMT):
and for https://github.com/hyperledger/fabric-sdk-java/blob/f101e665dfc7478b9ea965389c630e25b0491c88/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L117-L117, do I need that?

cshields (Thu, 16 Mar 2017 15:07:17 GMT):
Has joined the channel.

rickr (Thu, 16 Mar 2017 15:07:37 GMT):
For now yes. This may change it the future .. The only need for registering a CA with the SDK is to provide optionally Tcerts. and the interface would most likely be different . Just growing pains :)

tuand (Thu, 16 Mar 2017 15:08:28 GMT):
you do ... you start fresh everytime you run end2endit so you need to register and enroll users

andrea.turli (Thu, 16 Mar 2017 15:09:24 GMT):
ok I wll try to understand better why it is failing for me, do you have a simple sequence of this call that needs to happen to have an HFClient properly configured?

andrea.turli (Thu, 16 Mar 2017 15:11:30 GMT):
for example `HFCAClient` deals with `http/s` but my `membershipServicesUrl` looks like `grpc://localhost:7054`

andrea.turli (Thu, 16 Mar 2017 15:12:07 GMT):
do you have another impl for grpc ?

o.o. (Thu, 16 Mar 2017 15:18:19 GMT):
If I understand correctly the responses we get when running an invoke from the java client come from the endorsers. The committing peers may then still mark the transactions as invalid later on (say if the read/write-sets collide). Is there some event or response that would tell us whether the transaction were accepted by committers or not? What function can we use to check this otherwise?

rickr (Thu, 16 Mar 2017 15:21:30 GMT):
If the transaction is marked bad the future will not complete successfully .. It will falling into the ``` }).exceptionally(e -> { System.err.println("Bad status value for proposals transaction: " + e.getMessage()); if (e instanceof TransactionEventException) { BlockEvent.TransactionEvent te = ((TransactionEventException) e).getTransactionEvent(); if (te != null) { fail(format("Transaction with txid %s failed. %s", te.getTransactionID(), e.getMessage())); } } fail(format("Transaction failed %s", e.getMessage())); return null;```

tuand (Thu, 16 Mar 2017 15:26:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x7vesn8xqyHSHToJJ) @andrea.turli are you running with Fabric v0.6 ? we're all working on v1.0, no guarantees if you run with v0.6

andrea.turli (Thu, 16 Mar 2017 15:27:55 GMT):
yes running on v0.6 at the moment, I understand there are no guarantees - any ideas on https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x7vesn8xqyHSHToJJ ?

andrea.turli (Thu, 16 Mar 2017 15:28:32 GMT):
or you are telling me that v1.0 will not support grpc ?

tuand (Thu, 16 Mar 2017 15:30:04 GMT):
fabric-ca ( the replacement for memberservices ) uses a rest api. comms between sdk/peer/orderer use grpc

andrea.turli (Thu, 16 Mar 2017 15:31:14 GMT):
got it @tuand I've still a lot to learn + so many moving parts :D

tuand (Thu, 16 Mar 2017 15:31:33 GMT):
also, fabric-ca is now decentralized ... there is one fabric-ca per organization participating in the blockchain

andrea.turli (Thu, 16 Mar 2017 15:32:17 GMT):
ok so maybe I should re-start from https://github.com/hyperledger/fabric-sdk-java#working-with-the-fabric-vagrant-environment

andrea.turli (Thu, 16 Mar 2017 15:32:31 GMT):
and create a v1.0 env, would that help @tuand ?

rickr (Thu, 16 Mar 2017 15:33:07 GMT):
Please follow the README.md

tuand (Thu, 16 Mar 2017 15:33:17 GMT):
also https://wiki.hyperledger.org/community/fabric-design-docs

andrea.turli (Thu, 16 Mar 2017 15:34:59 GMT):
thanks @rickr and @tuand much appreciated!

o.o. (Thu, 16 Mar 2017 15:36:37 GMT):
Ok, so the future needs the transaction to be completely accepted. Nice! Thanks rickr!

samdeir (Thu, 16 Mar 2017 16:49:08 GMT):
Has joined the channel.

dejan.milosavljevic (Thu, 16 Mar 2017 19:26:02 GMT):
Has joined the channel.

bh4rtp (Fri, 17 Mar 2017 02:11:38 GMT):
@rickr hi, i have already read java sdk. it seems to be developing as source codes are not formatted yet. would you please tell me which files implement gRPC? i only see the proto definition files.

Willson (Fri, 17 Mar 2017 03:34:08 GMT):
Hello guys,there is an error when i reconstruct the Chain like this:org.hyperledger.fabric.sdk.exception.TransactionException: Bad last configuation block type 3, expected 1 anybody can tell me why?thank you

RahulBagaria (Fri, 17 Mar 2017 04:00:24 GMT):
Has joined the channel.

zhoupeiwen (Fri, 17 Mar 2017 09:11:19 GMT):
@Willson I just met the same problem, I think it's because every time you call the chain.initialize, the sdk will get the config block first ,but the code get the latest block not the latest config block ,this raise the exception.

Willson (Fri, 17 Mar 2017 09:41:10 GMT):
@zhoupeiwen oh,thanks

andrea.turli (Fri, 17 Mar 2017 12:24:26 GMT):
hi @here I'm following the README to install Fabric Vagrant Environment ``` Step 14/15 : RUN core/chaincode/shim/java/javabuild.sh ---> Running in 8ba6461bbb15 FAILURE: Build failed with an exception. * Where: Build file '/root/core/chaincode/shim/java/build.gradle' line: 30 * What went wrong: Error resolving plugin [id: 'com.google.protobuf', version: '0.8.0'] > Could not GET 'https://plugins.gradle.org/api/gradle/2.12/plugin/use/com.google.protobuf/0.8.0'. > Connect to 10.0.2.2:443 [/10.0.2.2] failed: Connection refused (Connection refused) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. The command '/bin/sh -c core/chaincode/shim/java/javabuild.sh' returned a non-zero code: 1 ``` when: ``` ssh into vagrant, go to $GOPATH/src/github.com/hyperledger/fabric run make docker to create the docker images for peer and orderer ```

andrea.turli (Fri, 17 Mar 2017 12:24:34 GMT):
any idea?

greg.haskins (Fri, 17 Mar 2017 12:26:00 GMT):
@andrea.turli you seem to have connectivity problems to https://plugins.gradle.org, check your proxy settings

andrea.turli (Fri, 17 Mar 2017 12:26:40 GMT):
could it be a misconfigured vagrant-proxyconf @greg.haskins ?

Basug (Fri, 17 Mar 2017 12:29:18 GMT):
hi @here I see 0.6 has Event listener. Is there a test/sample on how to use it ?

greg.haskins (Fri, 17 Mar 2017 12:30:19 GMT):
@andrea.turli could be

Basug (Fri, 17 Mar 2017 12:30:20 GMT):
sorry EventHub

greg.haskins (Fri, 17 Mar 2017 12:30:36 GMT):
it looks like its trying to connect to 10.0.2.2

andrea.turli (Fri, 17 Mar 2017 12:30:53 GMT):
ok I'll remove that vagrant plugin and restarted

andrea.turli (Fri, 17 Mar 2017 12:30:53 GMT):
ok I'll remove that vagrant plugin and restart

andrea.turli (Fri, 17 Mar 2017 12:32:43 GMT):
that was it, thanks @greg.haskins -- build passed that step

andrea.turli (Fri, 17 Mar 2017 12:39:41 GMT):
next up, according to https://github.com/hyperledger/fabric-sdk-java#working-with-the-fabric-vagrant-environment I should `vagrant ssh` and go to $GOPATH/src/github/hyperledger/fabric-ca

andrea.turli (Fri, 17 Mar 2017 12:39:46 GMT):
but that path is not in that VM

greg.haskins (Fri, 17 Mar 2017 12:40:15 GMT):
@Basug the nodesdk v0.6.5 supports registering for events

Basug (Fri, 17 Mar 2017 12:40:58 GMT):
@greg.haskins thank you, will take a look

andrea.turli (Fri, 17 Mar 2017 12:42:27 GMT):
@greg.haskins ops I've not cloned `fabric-ca` locally

andrea.turli (Fri, 17 Mar 2017 12:42:31 GMT):
need to restart again :(

andrea.turli (Fri, 17 Mar 2017 12:58:18 GMT):
now the fabric looks ok but the endToEnd test in java sdk fails because of ``` 2017-03-17 13:56:44,127 ERROR Bad newest block expected status 200 got 404, Chain test org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 404, Chain test at org.hyperledger.fabric.sdk.Chain.getLatestBlock(Chain.java:939) [fabric-sdk-java-1.0-SNAPSHOT.jar:na] 13:56:44.127 brooklyn-execmanager-oUz5c9JI-7 org.hyperledger.fabric.sdk.Chain Bad newest block expected status 200 got 404, Chain test org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 404, Chain test at org.hyperledger.fabric.sdk.Chain.getLatestBlock(Chain.java:939) [fabric-sdk-java-1.0-SNAPSHOT.jar:na] at org.hyperledger.fabric.sdk.Chain.getConfigurationBlock(Chain.java:775) [fabric-sdk-java-1.0-SNAPSHOT.jar:na] at org.hyperledger.fabric.sdk.Chain.parseConfigBlock(Chain.java:718) [fabric-sdk-java-1.0-SNAPSHOT.jar:na] at org.hyperledger.fabric.sdk.Chain.initialize(Chain.java:456) [fabric-sdk-java-1.0-SNAPSHOT.jar:na]org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 404, Chain test ```

andrea.turli (Fri, 17 Mar 2017 12:58:25 GMT):
any idea?

andrea.turli (Fri, 17 Mar 2017 13:51:45 GMT):
@here ^^

andrea.turli (Fri, 17 Mar 2017 14:22:36 GMT):
@tuand and/or @greg.haskins do you have any idea?

rickr (Fri, 17 Mar 2017 15:03:47 GMT):
@jimthematrix @tuand Real simply review https://gerrit.hyperledger.org/r/#/c/7311/ fix not getting last config block

rickr (Fri, 17 Mar 2017 15:50:09 GMT):
@Willson @zhoupeiwen Getting Bad config block error should be fixed with the very latest HLJSDK

Willson (Sat, 18 Mar 2017 08:39:06 GMT):
@rickr thanks

dorrakhribi (Sun, 19 Mar 2017 00:04:16 GMT):
hi everyone, who succeded to deploy a chaincode suing fabric java sdk

dorrakhribi (Sun, 19 Mar 2017 00:04:44 GMT):
i'm getting this error the deploy request is submitted, but is not completed

tuand (Sun, 19 Mar 2017 00:11:49 GMT):
@dorrakhribi , follow the sdk-java README , the end2endIT test deploys a chaincode

dorrakhribi (Sun, 19 Mar 2017 00:12:20 GMT):
thanks @tuand i'll take a look .

dorrakhribi (Sun, 19 Mar 2017 00:27:08 GMT):
the problem is that i'm working with fabric java sdk 0.6, so i didn't find any example to follow and i couldn't figure out if there's an error in my code or not

dorrakhribi (Sun, 19 Mar 2017 23:00:07 GMT):
hi , how can i start a non-validating peer on docker-compose ?

zhoupeiwen (Mon, 20 Mar 2017 01:41:50 GMT):
hi, I have installed the example_cc using the script in fabric and I can invoke and query it using the script successfully, but when i use sdk to call the invoke method, exception "failed to obtain cds for mycc - transaction not found mycc/mychannel" . Any idea for this?

tuand (Mon, 20 Mar 2017 01:56:21 GMT):
@zhoupeiwen , check this discussion https://chat.hyperledger.org/channel/fabric-peer-endorser-committer?msg=6uoGLRtJjpGRejYpX

zhoupeiwen (Mon, 20 Mar 2017 01:56:43 GMT):
thank you @tuand

xf891220 (Mon, 20 Mar 2017 06:43:50 GMT):
Has joined the channel.

liuzhudong (Mon, 20 Mar 2017 09:34:39 GMT):
Has joined the channel.

liuzhudong (Mon, 20 Mar 2017 09:37:06 GMT):
code `mychannel.initialize();` run error: `org.hyperledger.fabric.sdk.exception.CryptoException: Unable to converts byte array to certificate. error : Extensions not allowed in v2 certificate`

ruslan.kryukov (Mon, 20 Mar 2017 10:00:15 GMT):
Hello guys, I have found that ca-folder path is hardcoded: `File certsFolder = new File("cacerts").getAbsoluteFile();` Maybe make it configurable ?

Willson (Mon, 20 Mar 2017 10:02:28 GMT):
Maybe you can override that and install the jar, I did that

ruslan.kryukov (Mon, 20 Mar 2017 11:12:19 GMT):
yep, but it more useful to select custom location also I need a constructor for TLS Orderer. Now there is only one constructor: ``` public Orderer newOrderer(String grpcURL) throws InvalidArgumentException { return Orderer.createNewInstance(grpcURL, null); } ``` Maybe Do I create task for it?

ruslan.kryukov (Mon, 20 Mar 2017 11:12:51 GMT):
or just use Orderer.createNewInstance(grpcURL, null)

ruslan.kryukov (Mon, 20 Mar 2017 11:12:52 GMT):
hmmmm

ruslan.kryukov (Mon, 20 Mar 2017 11:13:14 GMT):
okay I select second, fine

Rymd (Mon, 20 Mar 2017 11:14:08 GMT):
```2017-03-20 12:11:16 ERROR HFCAClient:269 - org.glassfish.json.JsonStringImpl cannot be cast to javax.json.JsonObject java.lang.ClassCastException: org.glassfish.json.JsonStringImpl cannot be cast to javax.json.JsonObject at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonObject(JsonObjectBuilderImpl.java:184) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:255) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:135)``` help!

ruslan.kryukov (Mon, 20 Mar 2017 11:15:32 GMT):
just update fabric-ca

ruslan.kryukov (Mon, 20 Mar 2017 11:15:55 GMT):
pull updates and rebuild by calling make docker

Rymd (Mon, 20 Mar 2017 11:37:15 GMT):
doesn't work

rickr (Mon, 20 Mar 2017 11:50:56 GMT):
@ruslan.kryukov TLS support is in the works

ruslan.kryukov (Mon, 20 Mar 2017 11:52:02 GMT):
oh, well

rickr (Mon, 20 Mar 2017 11:53:41 GMT):
The hardcoded cacerts will go away entirely when we get the multiple org support

Rymd (Mon, 20 Mar 2017 11:58:53 GMT):
```REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/fabric-ca latest 7853ed27cdaa 10 seconds ago 237 MB hyperledger/fabric-ca x86_64-1.0.0-snapshot-894b7e4 7853ed27cdaa 10 seconds ago 237 MB hyperledger/fabric-buildenv latest b9010e506d0c About a minute ago 1.31 GB hyperledger/fabric-buildenv x86_64-1.0.0-snapshot-22c1a1f b9010e506d0c About a minute ago 1.31 GB hyperledger/fabric-orderer latest 9e82dd6767f4 About a minute ago 182 MB hyperledger/fabric-orderer x86_64-1.0.0-snapshot-22c1a1f 9e82dd6767f4 About a minute ago 182 MB hyperledger/fabric-peer latest 21a205b05c2f About a minute ago 184 MB hyperledger/fabric-peer x86_64-1.0.0-snapshot-22c1a1f 21a205b05c2f About a minute ago 184 MB hyperledger/fabric-javaenv latest df722624b4f8 About a minute ago 1.42 GB hyperledger/fabric-javaenv x86_64-1.0.0-snapshot-22c1a1f df722624b4f8 About a minute ago 1.42 GB hyperledger/fabric-ccenv latest c3671b3fb3d9 2 minutes ago 1.29 GB hyperledger/fabric-ccenv x86_64-1.0.0-snapshot-22c1a1f c3671b3fb3d9 2 minutes ago 1.29 GB hyperledger/fabric-baseimage x86_64-0.3.0 f4751a503f02 7 weeks ago 1.27 GB hyperledger/fabric-baseos x86_64-0.3.0 c3a4cf3b3350 7 weeks ago 161 MB``` Should these images work?

Rymd (Mon, 20 Mar 2017 13:16:30 GMT):
ok now it works

tuand (Mon, 20 Mar 2017 13:33:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tLjiqiAXbPxp9XQwW) @ruslan.kryukov `cacerts` is a temporary thing ... it will go away as soon as sdk can parse the real genesis block.

ruslan.kryukov (Mon, 20 Mar 2017 13:34:58 GMT):
okay great!

Rymd (Mon, 20 Mar 2017 15:19:17 GMT):
How do i authorize my client for my chain? I get this error: ```2017-03-20 16:17:27 ERROR Chain:879 - Bad newest block expected status 200 got 403, Chain mychannel0 org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 403, Chain mychannel0 at org.hyperledger.fabric.sdk.Chain.getLatestBlock(Chain.java:938) at org.hyperledger.fabric.sdk.Chain.getConfigurationBlock(Chain.java:775) at org.hyperledger.fabric.sdk.Chain.parseConfigBlock(Chain.java:718) at org.hyperledger.fabric.sdk.Chain.initialize(Chain.java:456) at org.hyperledger.fabric.sdkintegration.End2endIT.reconstructChain(End2endIT.java:571) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:165)```

Rymd (Mon, 20 Mar 2017 15:20:04 GMT):
and the orderer logs this;: `2017-03-20 15:17:27.123 UTC [orderer/common/deliver] Handle -> WARN 3bb Received unauthorized deliver request for channel mychannel0`

donaldsbell (Mon, 20 Mar 2017 17:10:11 GMT):
Sanity check question: I have read so many different versions of the documents I have confused myself. I am not getting any compile errors, but I am getting a NoSuchMethod exception when I execute Chain.setMemberServicesUrl(String). Does the v0.6 version of the Java SDK actually work (I've seen reports that only v1.0 works)?

zerppen (Tue, 21 Mar 2017 06:40:33 GMT):
Hi,rickr @rickr I am testing java-Chaincode v0.6 . I merged and tested all methods in fabric-sdk-java about chaincode, most of them are good except setEvent. Satheesh @satheeshk said that can't merge here https://gerrit.hyperledger.org/r/#/c/2975 but I really want to test event for sending event to app,especially in v1.0 .But I can't find setEvent solved,anybody can do me a favor? Thanks

yury (Tue, 21 Mar 2017 13:20:47 GMT):
please see my PR https://gerrit.hyperledger.org/r/#/c/7363/

yury (Tue, 21 Mar 2017 13:20:47 GMT):
please check my PR https://gerrit.hyperledger.org/r/#/c/7363/

rickr (Tue, 21 Mar 2017 13:40:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GhNTegzwb5gZ3AjaF) @zerppen This change set is really old. It needs updating if it's even applicable any more. @sanchezl ^^^

rickr (Tue, 21 Mar 2017 13:40:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GhNTegzwb5gZ3AjaF) @zerppen This change set is really old. It needs updating if it's even applicable any more. @sanchezl vvv

rickr (Tue, 21 Mar 2017 13:48:15 GMT):
https://gerrit.hyperledger.org/r/#/c/7361/ @rameshthoomu @jimthematrix

sanchezl (Tue, 21 Mar 2017 14:13:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GhNTegzwb5gZ3AjaF) @zerppen Please go ahead and open a Jira item and assign it to me.

vasiledirla (Tue, 21 Mar 2017 15:01:00 GMT):
Has joined the channel.

vasiledirla (Tue, 21 Mar 2017 15:01:13 GMT):
Hi

vasiledirla (Tue, 21 Mar 2017 15:01:28 GMT):
I get this error Status{code=UNKNOWN, description=Identity or token does not match., cause=null}

vasiledirla (Tue, 21 Mar 2017 15:01:34 GMT):
while try to enroll a user

vasiledirla (Tue, 21 Mar 2017 15:02:26 GMT):
do you have any idea what's happening? (maybe for someone rings a bell when see this error message)

vasiledirla (Tue, 21 Mar 2017 15:04:29 GMT):
I use the docker version: x86_64-0.6.1-preview

vasiledirla (Tue, 21 Mar 2017 15:05:27 GMT):
and the error i get is when I run the MemberTest from fabric-sdk-java

vasiledirla (Tue, 21 Mar 2017 15:06:12 GMT):
registrar = testChain.enroll("admin", "Xurw3yU9zI0l");

vasiledirla (Tue, 21 Mar 2017 15:09:47 GMT):
that's the fabric-sdk-java version i use: a8940f20523fb08580285aafee49c2d8af8c9ccc (v0.6)

icordoba (Tue, 21 Mar 2017 21:35:45 GMT):
Hello, when I deploy java chain code using fabric-sdk-java info a peer in Docker (vp0...), I do deployRequest.setChaincodePath(). This path should be the path where the java project is visible to the application running fabric-sdk-java (usually my workspace path) or to the mounted volume of that workspace path in the docker where the chaincode will be deployed?

andrea.turli (Tue, 21 Mar 2017 23:02:22 GMT):
hi @here anyone has seen this before https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6oGYbZKJbapZ6aoiX ?

zerppen (Wed, 22 Mar 2017 02:14:31 GMT):
@rickr @sanchezl Ok~ and thanks

zerppen (Wed, 22 Mar 2017 02:53:25 GMT):
Here is the issue https://jira.hyperledger.org/browse/FAB-2852

ersudiplama (Wed, 22 Mar 2017 04:55:30 GMT):
Has joined the channel.

andrea.turli (Wed, 22 Mar 2017 08:36:46 GMT):
hi @here following the README I can't run `make docker` command on fabric project ``` $ make docker Building build/docker/bin/peer mkdir -p build/image/peer/payload cp build/docker/bin/peer peer/core.yaml build/msp-sampleconfig.tar.bz2 common/configtx/tool/configtx.yaml build/image/peer/payload mkdir -p build/image/ccenv/payload cp build/docker/gotools/bin/protoc-gen-go build/bin/chaintool build/goshim.tar.bz2 build/image/ccenv/payload mkdir -p build/image/javaenv/payload cp build/javashim.tar.bz2 build/protos.tar.bz2 settings.gradle build/image/javaenv/payload mkdir -p build/image/orderer/payload cp build/docker/bin/orderer build/msp-sampleconfig.tar.bz2 orderer/orderer.yaml common/configtx/tool/configtx.yaml build/image/orderer/payload mkdir -p build/image/testenv/payload cp build/docker/bin/orderer orderer/orderer.yaml common/configtx/tool/configtx.yaml build/docker/bin/peer peer/core.yaml build/msp-sampleconfig.tar.bz2 images/testenv/install-softhsm2.sh build/image/testenv/payload Building docker testenv-image docker build -t hyperledger/fabric-testenv build/image/testenv Sending build context to Docker daemon 43.97 MB Step 1/16 : FROM hyperledger/fabric-buildenv:x86_64-0.7.0-snapshot-96b1b90 repository hyperledger/fabric-buildenv not found: does not exist or no pull access make: *** [build/image/testenv/.dummy-x86_64-1.0.0-snapshot-0ef3510] Error 1 ```

andrea.turli (Wed, 22 Mar 2017 08:37:13 GMT):
what's the 'hyperldger/fabric-buildenv` ?

andrea.turli (Wed, 22 Mar 2017 08:37:13 GMT):
what's the `hyperldger/fabric-buildenv` ?

yhelal (Wed, 22 Mar 2017 08:52:33 GMT):
Has joined the channel.

magg (Wed, 22 Mar 2017 09:15:03 GMT):
Has joined the channel.

magg (Wed, 22 Mar 2017 09:15:42 GMT):
@tuand i have some questions regarding the youtube tutotial

Willson (Wed, 22 Mar 2017 10:02:24 GMT):
@tuand Hello tuand, i launch the fabric network via the docker-compose.yaml which in the directory fixture/e2e-2Orgs and enable the TLS.When i invoke the client1.newChain(), there is an error at orderer log like that: Server.Serve failed to complete security handshake from "10.0.2.2:50776": tls: first record does not look like a TLS handshake what's wrong?

icordoba (Wed, 22 Mar 2017 10:10:59 GMT):
Hello, I am getting this error when executing Chain.setMemberServicesUrl() in a WebApp inside Liberty server. I have included dependencies. Can anybody post here exact jar versions required for favric-sdk-java 0.6.6 so I can make sure my gradle is getting them right? thanks

icordoba (Wed, 22 Mar 2017 10:11:00 GMT):
Caused by: java.lang.NoSuchMethodError: io.grpc.protobuf.ProtoUtils.marshaller(Lcom/google/protobuf/Message;)Lio/grpc/MethodDescriptor$Marshaller; at org.hyperledger.protos.ECAAGrpc.(ECAAGrpc.java:40) at org.hyperledger.fabric.sdk.MemberServicesImpl.(MemberServicesImpl.java:81) at org.hyperledger.fabric.sdk.Chain.setMemberServicesUrl(Chain.java:136) at com.vetchain.madrid.ChainView.postConstruct(ChainView.java:48) ... 62 more

magg (Wed, 22 Mar 2017 10:20:04 GMT):
@tuand https://gist.github.com/magg/78a01bab26d63e627a28aab0e2289239 i get this error while running integration tests.... what branch should I use, im using master

harsha (Wed, 22 Mar 2017 10:35:04 GMT):
@andrea.turli Perhaps, try `make docker-clean` and try `make docker` ?

andrea.turli (Wed, 22 Mar 2017 11:07:43 GMT):
thanks @harsha looks like docker-clean did the right incantation

yhelal (Wed, 22 Mar 2017 11:14:59 GMT):
hi, there is an sdk java for v1.0 ??

icordoba (Wed, 22 Mar 2017 11:53:40 GMT):
Hello, I am getting this exception when trying to enrol a user for first time: (Security disabled):

icordoba (Wed, 22 Mar 2017 11:53:40 GMT):
Caused by: java.security.spec.InvalidKeySpecException: key spec not recognised at org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGeneratePublic(Unknown Source) at org.bouncycastle.jcajce.provider.asymmetric.ec.KeyFactorySpi.engineGeneratePublic(Unknown Source) at java.security.KeyFactory.generatePublic(KeyFactory.java:328) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.eciesDecrypt(CryptoPrimitives.java:165) ... 67 more

icordoba (Wed, 22 Mar 2017 11:53:46 GMT):
Thanks for any help

Willson (Wed, 22 Mar 2017 12:02:41 GMT):
@yhelal https://github.com/hyperledger/fabric-sdk-java

andrea.turli (Wed, 22 Mar 2017 14:53:53 GMT):
@harsha do you know how to solve https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6J6mZC4mpJ7jKTNiS or what I can try?

andrea.turli (Wed, 22 Mar 2017 14:54:09 GMT):
I think it is the same with `End2EndIT` test

rickr (Wed, 22 Mar 2017 15:21:37 GMT):
how are you running end2end ?

agiledeveloper (Wed, 22 Mar 2017 15:48:39 GMT):
Has joined the channel.

sanchezl (Wed, 22 Mar 2017 21:04:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pTBoMWLmPobumzvbt) @uber.twin Did you ever get past this error? I'm seeing it myself and haven't figured out why.

xiangyw (Thu, 23 Mar 2017 02:34:19 GMT):
Has joined the channel.

zhoupeiwen (Thu, 23 Mar 2017 05:23:56 GMT):
hi ,running the End2enIT test,i got the following exception:Caught an exception while invoking chaincode java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID : c776f2099d1dab1f62604265875cdf5e04c00d8a278027c7210addde7b9af81c at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at org.hyperledger.fabric.sdkintegration.End2endIT.lambda$runChain$0(End2endIT.java:352) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962)

zhoupeiwen (Thu, 23 Mar 2017 05:25:33 GMT):
hi I got the following exception while running the end2endit test:Caught an exception while invoking chaincode java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID : c776f2099d1dab1f62604265875cdf5e04c00d8a278027c7210addde7b9af81c at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at org.hyperledger.fabric.sdkintegration.End2endIT.lambda$runChain$0(End2endIT.java:352) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) any config i missed?

zhoupeiwen (Thu, 23 Mar 2017 05:36:42 GMT):
and I checked the logs in peer0:2017-03-23 05:19:59.865 UTC [txvalidator] VSCCValidateTx -> ERRO 008 VSCC check failed for transaction txid=77db77e000485582656d34da59b72b3e80cd0c44da019fb9a8e14102d9e17419, error VSCC error: policy evaluation failed, err Failed to authenticate policy

zhoupeiwen (Thu, 23 Mar 2017 06:10:52 GMT):
I guess it's because I used "Org0MSP" rather than "DEFAULT" for the MSPID, but how can i change the policyBitsAdmin file?

Willson (Thu, 23 Mar 2017 06:12:38 GMT):
@zhoupeiwen follow this https://jira.hyperledger.org/browse/FAB-2376

zhoupeiwen (Thu, 23 Mar 2017 06:44:08 GMT):
thanks @Willson

sitomani (Thu, 23 Mar 2017 08:12:09 GMT):
Has joined the channel.

anik (Thu, 23 Mar 2017 08:51:00 GMT):
Has joined the channel.

xuzhao103389 (Thu, 23 Mar 2017 10:39:02 GMT):
Has joined the channel.

xuzhao103389 (Thu, 23 Mar 2017 10:40:21 GMT):
Is there any document that I can start to build and test the SDK? thanks

xuzhao103389 (Thu, 23 Mar 2017 10:40:59 GMT):
For hyperledger V1.0

imherro (Thu, 23 Mar 2017 11:59:55 GMT):
end2endit.java User 'user1' is already registered . any thoughts?

ersudiplama (Thu, 23 Mar 2017 13:30:38 GMT):
Hi I show a video about fabric-sdk-java in youtube ( https://www.youtube.com/watch?v=qxfuWVz7jRA ). Could anyone please share the code and docker-compose file or steps to create the network that was used in video?

rickr (Thu, 23 Mar 2017 14:30:33 GMT):
Have you looked at the fabric sdk java README.md ?

rickr (Thu, 23 Mar 2017 14:30:48 GMT):
probably a good place to start

ersudiplama (Thu, 23 Mar 2017 15:13:20 GMT):
Ya i look at https://github.com/hyperledger/fabric-sdk-java/blob/master/README.md but when i press link to setup development environment it throws 404

ersudiplama (Thu, 23 Mar 2017 15:17:37 GMT):
And it couldnt find the java class which access the chaincode as shown in the video. so Anyone who can help me to find the steps to configure the network and executed java-sdk.

ersudiplama (Thu, 23 Mar 2017 15:17:43 GMT):
Thanks in Advance

ersudiplama (Thu, 23 Mar 2017 15:17:58 GMT):
:relaxed:

magg (Thu, 23 Mar 2017 15:36:58 GMT):
can the java SDK be used with Java chaincode? and how?

magg (Thu, 23 Mar 2017 15:36:58 GMT):
can the Java SDK be used with Java chaincode? and how?

rickr (Thu, 23 Mar 2017 15:39:36 GMT):
Any means to deploy and exercise chain code should work with any supported chain code GO or Java . But at the moment Java CC is broken awaiting a fix

magg (Thu, 23 Mar 2017 15:40:14 GMT):
oh :(

rickr (Thu, 23 Mar 2017 15:41:47 GMT):
If you have specific question for Java CC that should be addressed in java-chaincode channel

magg (Thu, 23 Mar 2017 15:41:56 GMT):
thanks

shsedghi (Thu, 23 Mar 2017 15:49:29 GMT):
I cloned sdk but my mvn install -DskipTests fails with: [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile (default) on project fabric-sdk-java: An IO error occured: /Users/xyz/workspaces/javasdk/fabric-sdk-java/target/protoc-dependencies/68c4b793d3558a08db1ed377969ae022/google/protobuf/any.proto (No such file or directory) -> [Help 1]

andrea.turli (Thu, 23 Mar 2017 16:16:07 GMT):
hi

andrea.turli (Thu, 23 Mar 2017 16:16:29 GMT):
I've set up a fabric using

andrea.turli (Thu, 23 Mar 2017 16:16:29 GMT):
I've set up a fabric using docker compose

andrea.turli (Thu, 23 Mar 2017 16:16:52 GMT):
here my yaml

icordoba (Thu, 23 Mar 2017 16:16:55 GMT):
@tuand I am reproducing your video Fabric end to end scenario and I am getting 2017-03-23 17:12:20 ERROR Chain:1508 - Sending proposal to peer failed because of gRPC failure=Status{code=UNIMPLEMENTED, description=unknown service protos.Endorser, cause=null} when executing End2endIT.java as Test. Any idea why? Thanks.

andrea.turli (Thu, 23 Mar 2017 16:17:05 GMT):
``` version: '2.0' services: ca: image: hyperledger/fabric-ca:x86_64-1.0.0-alpha ports: - "7054:7054" command: sh -c 'fabric-ca-server start -b admin:adminpw -d' container_name: ca orderer: image: hyperledger/fabric-orderer:x86_64-1.0.0-alpha environment: - ORDERER_GENERAL_LOGLEVEL=debug - ORDERER_GENERAL_LEDGERTYPE=ram - ORDERER_GENERAL_BATCHTIMEOUT=10s - ORDERER_GENERAL_MAXMESSAGECOUNT=10 - ORDERER_GENERAL_MAXWINDOWSIZE=1000 - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_RAMLEDGER_HISTORY_SIZE=100 - ORDERER_GENERAL_ORDERERTYPE=solo working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer command: orderer ports: - 7050:7050 vp0: image: hyperledger/fabric-peer:x86_64-1.0.0-alpha environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} - CORE_NEXT=true - CORE_PEER_ENDORSER_ENABLED=true - CORE_PEER_ID=vp0 - CORE_PEER_PROFILE_ENABLED=false - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 volumes: - /var/run/:/host/var/run/ command: peer node start links: - orderer ports: - 7051:7051 - 7053:7053 depends_on: - orderer vp1: image: hyperledger/fabric-peer:x86_64-1.0.0-alpha environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} - CORE_NEXT=true - CORE_PEER_ENDORSER_ENABLED=true - CORE_PEER_ID=vp1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 volumes: - /var/run/:/host/var/run/ command: peer node start links: - orderer - vp0 ports: - 7056:7051 depends_on: - orderer ```

andrea.turli (Thu, 23 Mar 2017 16:17:17 GMT):
but when I try this java code

andrea.turli (Thu, 23 Mar 2017 16:17:29 GMT):
``` Chain chain = client.newChain(name); for (String peerloc : PEER_LOCATIONS) { Peer peer = client.newPeer(peerloc); peer.setName("peer1"); chain.addPeer(peer); } for (String orderloc : ORDERER_LOCATIONS) { Orderer orderer = client.newOrderer(orderloc); chain.addOrderer(orderer); } for (String eventHub : EVENTHUB_LOCATIONS) { EventHub orderer = client.newEventHub(eventHub); chain.addEventHub(orderer); } chain.setInvokeWaitTime(1000); chain.setDeployWaitTime(12000); chain.initialize(); ```

andrea.turli (Thu, 23 Mar 2017 16:17:38 GMT):
I get this exception

andrea.turli (Thu, 23 Mar 2017 16:17:50 GMT):
``` org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 404, Chain test at org.hyperledger.fabric.sdk.Chain.getLatestBlock(Chain.java:939) at org.hyperledger.fabric.sdk.Chain.getConfigurationBlock(Chain.java:775) at org.hyperledger.fabric.sdk.Chain.parseConfigBlock(Chain.java:718) at org.hyperledger.fabric.sdk.Chain.initialize(Chain.java:456) at io.brooklyn.hyperledger.fabric.location.HyperledgerFabricLocation.instantiateChaincode(HyperledgerFabricLocation.java:178) at io.brooklyn.hyperledger.fabric.location.HyperledgerFabricLocation.createHyperledgerFabricLocation(HyperledgerFabricLocation.java:119) at io.brooklyn.hyperledger.fabric.location.HyperledgerFabricLocation.obtain(HyperledgerFabricLocation.java:104) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ObtainLocationTask.call(MachineLifecycleEffectorTasks.java:443) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ObtainLocationTask.call(MachineLifecycleEffectorTasks.java:433) at org.apache.brooklyn.util.core.task.Tasks.withBlockingDetails(Tasks.java:106) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ProvisionMachineTask.call(MachineLifecycleEffectorTasks.java:414) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ProvisionMachineTask.call(MachineLifecycleEffectorTasks.java:390) at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359) at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:522) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) org.hyperledger.fabric.sdk.exception.ProposalException: sendInstallProposal on chain not initialized. at org.hyperledger.fabric.sdk.Chain.sendInstallProposal(Chain.java:1050) at io.brooklyn.hyperledger.fabric.location.HyperledgerFabricLocation.instantiateChaincode(HyperledgerFabricLocation.java:200) at io.brooklyn.hyperledger.fabric.location.HyperledgerFabricLocation.createHyperledgerFabricLocation(HyperledgerFabricLocation.java:119) at io.brooklyn.hyperledger.fabric.location.HyperledgerFabricLocation.obtain(HyperledgerFabricLocation.java:104) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ObtainLocationTask.call(MachineLifecycleEffectorTasks.java:443) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ObtainLocationTask.call(MachineLifecycleEffectorTasks.java:433) at org.apache.brooklyn.util.core.task.Tasks.withBlockingDetails(Tasks.java:106) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ProvisionMachineTask.call(MachineLifecycleEffectorTasks.java:414) at org.apache.brooklyn.entity.software.base.lifecycle.MachineLifecycleEffectorTasks$ProvisionMachineTask.call(MachineLifecycleEffectorTasks.java:390) at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359) at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:522) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ```

andrea.turli (Thu, 23 Mar 2017 16:18:01 GMT):
where line 178 is `chain.initialize()

magg (Thu, 23 Mar 2017 16:20:12 GMT):
I also cant reproduce the youtube video... the end-to end test does not work

magg (Thu, 23 Mar 2017 16:21:38 GMT):
```Running org.hyperledger.fabric.sdkintegration.End2endIT 2017-03-23 17:21:22 ERROR HFCAClient:343 - POST request to http://localhost:7054/api/v1/cfssl/register failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"User 'user1' is already registered"}],"messages":[]} ```

magg (Thu, 23 Mar 2017 16:28:07 GMT):
here is another error i get

magg (Thu, 23 Mar 2017 16:28:19 GMT):
``` mvn failsafe:integration-test -DskipITs=false [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: linux [INFO] os.detected.arch: x86_64 [INFO] os.detected.release: ubuntu [INFO] os.detected.release.version: 16.10 [INFO] os.detected.release.like.ubuntu: true [INFO] os.detected.release.like.debian: true [INFO] os.detected.classifier: linux-x86_64 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building fabric-java-sdk 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-failsafe-plugin:2.13:integration-test (default-cli) @ fabric-sdk-java --- [INFO] Failsafe report directory: /home/magg/fabric-sdk-java/target/failsafe-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.hyperledger.fabric.sdkintegration.End2endIT Mar 23, 2017 5:27:28 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-1] Created with target localhost:7050 Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl maybeTerminateChannel INFO: [io.grpc.internal.ManagedChannelImpl-1] Terminated Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-6] Created with target localhost:7050 Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-11] Created with target localhost:7051 Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-16] Created with target localhost:7056 Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-21] Created with target localhost:7050 Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-25] Created with target localhost:7050 Mar 23, 2017 5:27:29 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-30] Created with target localhost:7053 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.813 sec <<< FAILURE! setup(org.hyperledger.fabric.sdkintegration.End2endIT) Time elapsed: 2.55 sec <<< ERROR! java.lang.Error: Unresolved compilation problems: The method getProposalResponse() from the type ProposalResponse refers to the missing type ProposalResponse The method getValidationCode() from the type TransactionInfo refers to the missing type TxValidationCode at org.hyperledger.fabric.sdkintegration.End2endIT.runChain(End2endIT.java:401) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:165) Running org.hyperledger.fabric.sdkintegration.End2endJavaChaincodeIT Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec Results : Tests in error: End2endIT.setup:165->runChain:401 Unresolved compilation problems: The meth... Tests run: 2, Failures: 0, Errors: 1, Skipped: 1 [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.958 s [INFO] Finished at: 2017-03-23T17:27:29+01:00 [INFO] Final Memory: 10M/212M ```

rickr (Thu, 23 Mar 2017 16:28:21 GMT):
each time you run that testcase make sure you restart both fabric and fabric ca

magg (Thu, 23 Mar 2017 16:29:08 GMT):
@rickr i rebuilt the containers from scratch and get this second error

rickr (Thu, 23 Mar 2017 16:31:19 GMT):
mvn clean install results ?

icordoba (Thu, 23 Mar 2017 16:34:13 GMT):
Anybody has been able to reproduce that video? What are the previous installation steps to have the Test case configured in Eclipse? I get gRPC failure=Status{code=UNIMPLEMENTED, description=unknown service protos.Endorser, cause=null} when executing the Test case using Run as JUnit Test. But the guy in the video already has the test case in a Menu. Maybe a special config is needed.

icordoba (Thu, 23 Mar 2017 16:34:13 GMT):
Anybody has been able to reproduce that video? What are the previous installation steps to have the Test case configured in Eclipse? I get gRPC failure=Status{code=UNIMPLEMENTED, description=unknown service protos.Endorser, cause=null} when executing the End2endIT.java Test case using Run as JUnit Test. But the guy in the video already has the test case in a Menu. Maybe a special config is needed.

rickr (Thu, 23 Mar 2017 16:38:03 GMT):
My recommendation is not to follow a video. Read through the README.md FULLY once .. (need to fix one broken link :( )

ersudiplama (Thu, 23 Mar 2017 17:04:34 GMT):
@rickr Which README.md you are talking. Could you please share the link of that README.md? As i access this https://github.com/hyperledger/fabric-sdk-java/blob/master/README.md and When I click link to stepup the environment it throws 404

rickr (Thu, 23 Mar 2017 17:05:28 GMT):
That's the broken link I referred to . I'm look for they moved it

ersudiplama (Thu, 23 Mar 2017 17:05:28 GMT):

Message Attachments

ersudiplama (Thu, 23 Mar 2017 17:05:34 GMT):
Thank you in advance

ersudiplama (Thu, 23 Mar 2017 17:06:59 GMT):
Could you please share the link for setup the network and java-sdk that support V1.

ersudiplama (Thu, 23 Mar 2017 17:07:05 GMT):
Thank you in advance

Wenyang Liu (Thu, 23 Mar 2017 18:11:28 GMT):
Has joined the channel.

rickr (Thu, 23 Mar 2017 18:12:10 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html once ssh'ed into Vagrant make docker after all that's done cd $GOPATH/src/github.com/hyperledger git clone http://gerrit.hyperledger.org/r/fabric-ca cd fabric-ca make docker

rickr (Thu, 23 Mar 2017 18:12:10 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html once ssh'ed into Vagrant make docker after all that's done cd $GOPATH/src/github.com/hyperledger git clone http://gerrit.hyperledger.org/r/fabric-ca cd fabric-ca make docker

rickr (Thu, 23 Mar 2017 18:12:10 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html once ssh'ed into Vagrant make docker after all that's done cd $GOPATH/src/github.com/hyperledger git clone http://gerrit.hyperledger.org/r/fabric-ca cd fabric-ca make docker

rickr (Thu, 23 Mar 2017 18:12:10 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html once ssh'ed into Vagrant make docker after all that's done cd $GOPATH/src/github.com/hyperledger git clone http://gerrit.hyperledger.org/r/fabric-ca cd fabric-ca make docker

rickr (Thu, 23 Mar 2017 18:12:10 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html once ssh'ed into Vagrant make docker after all that's done cd $GOPATH/src/github.com/hyperledger git clone http://gerrit.hyperledger.org/r/fabric-ca cd fabric-ca make docker

rickr (Thu, 23 Mar 2017 18:12:58 GMT):

ersudiplama (Thu, 23 Mar 2017 18:16:22 GMT):
Thank you

ersudiplama (Thu, 23 Mar 2017 18:16:26 GMT):
@rickr

ersudiplama (Thu, 23 Mar 2017 18:16:35 GMT):
I will try and let you know.

rjones (Thu, 23 Mar 2017 18:16:55 GMT):
Has left the channel.

JaemanHong (Fri, 24 Mar 2017 01:46:39 GMT):
Has joined the channel.

Eagel (Fri, 24 Mar 2017 05:52:34 GMT):
I saw the fabric v1.0.0-alpha released. Is there any plan for java SDK?

ranjan008 (Fri, 24 Mar 2017 06:42:32 GMT):
Has joined the channel.

ranjan008 (Fri, 24 Mar 2017 06:42:43 GMT):
hi i am trying to deploy the example_cc chaincode through fabric-sdk-java but it is giving following error -- use of vendored package not allowed

zhoupeiwen (Fri, 24 Mar 2017 07:51:58 GMT):
Hi , is there any way to upgrade Chain code using java sdk?

icordoba (Fri, 24 Mar 2017 08:42:54 GMT):
Is fabric-sdk-java allowing (or will allow) not only a deployment path but for example a InputStream so you can have chaincode packed somewhere and use it and not an O.S. filesystem path? Thanks

anik (Fri, 24 Mar 2017 09:15:18 GMT):
hi can i run java sdk on windows ? my download failed as some of the file name are too long for windows

ruslan.kryukov (Fri, 24 Mar 2017 09:21:19 GMT):
When I try to initialize chain object, I get an error: ``` org.hyperledger.fabric.sdk.exception.TransactionException: Bad last configuation block type 3, expected 1 ```

ruslan.kryukov (Fri, 24 Mar 2017 09:21:41 GMT):
Chain is already exists, I've created it with genesis block in orderer

ruslan.kryukov (Fri, 24 Mar 2017 09:26:30 GMT):
I've found that if I initialize chain without install&instantiate any chaincode with cli, initialization ends successfully, but if I install and instantiate chaincode in the beginning and then try to initialize chain, I am getting this the error

ruslan.kryukov (Fri, 24 Mar 2017 09:27:16 GMT):
initialize by calling chain.initialize()

ruslan.kryukov (Fri, 24 Mar 2017 09:27:43 GMT):
maybe am I doing something wrong?

ruslan.kryukov (Fri, 24 Mar 2017 09:37:27 GMT):
Oh, great, I just should to update project, @rickr has fixed this error

rickr (Fri, 24 Mar 2017 12:09:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yuugF5FGqjrFJGcHQ) @ranjan008 V1.0 ?

ranjan008 (Fri, 24 Mar 2017 12:10:31 GMT):
yes

rickr (Fri, 24 Mar 2017 12:14:23 GMT):
That's odd because Vendored package is the recommended way from what I know. This is not an error produced from the JDK so it's the Fabric itself that is responding like that. I'd open a JIRA show your file structure via `tree` show where your source location is and chain code path values are. See if there is any error on the server fabric side (see docker output )

ranjan008 (Fri, 24 Mar 2017 12:17:33 GMT):
and also is it required to run the docker through vagrant only i guess using vagrant is not recommended right

rickr (Fri, 24 Mar 2017 12:18:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=m4W4Sqwjq6qgWeA9J) @zhoupeiwen Hi once https://jira.hyperledger.org/browse/FAB-2752 gets done .. I just started it.

ruslan.kryukov (Fri, 24 Mar 2017 12:20:49 GMT):
Howto deploy chaincode on peers which are assigned to different organisations?

ruslan.kryukov (Fri, 24 Mar 2017 12:21:11 GMT):
fabric throws error that I sent him incorrect msp id

ruslan.kryukov (Fri, 24 Mar 2017 12:21:30 GMT):
cuz I can choose only one msp id but peers have different msp ids

ruslan.kryukov (Fri, 24 Mar 2017 12:23:04 GMT):
suppose I have two peers with msp_id FOO and BAR, I create instantiate request and set msp id FOO on my HFClient, now I send request and second peer throws error that he is BAR, not FOO

rickr (Fri, 24 Mar 2017 12:23:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BqhTixtvpc4a93Ryc) @icordoba I thought that should something we should support. The only reservation is the sdk can only support the format that the fabric supports which for now is just zip compressed tar tgz I don't think the SDK is going to get in to format conversions. Open this as a JIRA improvement

rickr (Fri, 24 Mar 2017 12:23:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BqhTixtvpc4a93Ryc) @icordoba I thought that should be something we should support. The only reservation is the sdk can only support the format that the fabric supports which for now is just zip compressed tar tgz I don't think the SDK is going to get in to format conversions. Open this as a JIRA improvement

ruslan.kryukov (Fri, 24 Mar 2017 12:24:05 GMT):
Should I send instantiate request separately?

rickr (Fri, 24 Mar 2017 12:28:51 GMT):
Not sure of your scenario. We just updated the SDK showing an example mulit org chain scenario

rickr (Fri, 24 Mar 2017 12:30:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cjjG8HQSstkCAdj7f) @anik yes you should. Can you say which files it complains on show the exact error

ruslan.kryukov (Fri, 24 Mar 2017 12:40:12 GMT):
@rickr I've checked End2End again and found it, but because of what we have `client.setUserContext(sampleOrg.getAdmin());`, we can work with different organisations consistently only... yes?

anik (Fri, 24 Mar 2017 12:59:29 GMT):

Message Attachments

agiledeveloper (Fri, 24 Mar 2017 13:17:44 GMT):
Hi, I am getting below exception when I send post to http://localhost:7050/chaincode

agiledeveloper (Fri, 24 Mar 2017 13:18:08 GMT):

Message Attachments

rickr (Fri, 24 Mar 2017 13:25:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rhjRgxDb6pP25LK8R) @anik Can you open a JIRA defect on this ?

rickr (Fri, 24 Mar 2017 13:25:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rhjRgxDb6pP25LK8R) @anik Can you open a JIRA defect on this ? This isn't really the SDK. Those are created with the crypto tooling so it's that tool that needs to be fixed

cgrecu (Fri, 24 Mar 2017 14:44:53 GMT):
Has joined the channel.

cgrecu (Fri, 24 Mar 2017 14:56:54 GMT):
@rickr do you happen to know if the e2e tests work with IBM JVM ? Do i need to change the certs or it should work out of the box ?

rickr (Fri, 24 Mar 2017 15:22:39 GMT):
I know of no specific reasons it would not but I don't test for specific JVMs

rickr (Fri, 24 Mar 2017 15:22:39 GMT):
I know of no specific reasons it would not but I don't test for specific JVMs or OSs

cgrecu (Fri, 24 Mar 2017 17:01:41 GMT):
i am a bit confused admin functionality of the sdk. It seems to be capable to create channels & deploy chaincode but ... how are the roles being enforced here? fabric-ca can give certs associated with certain roles, but how would a peer enforce them? From what i have seen so far , a peer has its own MSP with org certs, ie. no role information

cgrecu (Fri, 24 Mar 2017 17:01:41 GMT):
i am a bit confused about admin functionality of the sdk. It seems to be capable to create channels & deploy chaincode but ... how are the roles being enforced here? fabric-ca can give certs associated with certain roles, but how would a peer enforce them? From what i have seen so far , a peer has its own MSP with org certs, ie. no role information

cgrecu (Fri, 24 Mar 2017 17:01:41 GMT):
i am a bit confused about admin functionality of the sdk. It seems to be capable of creating channels & deploy chaincode but ... how are the roles being enforced here? fabric-ca can give certs associated with certain roles, but how would a peer enforce them? From what i have seen so far , a peer has its own MSP with org certs, ie. no role information

cgrecu (Fri, 24 Mar 2017 17:27:34 GMT):
while looking at the src/test/fixture/sdkintegration test i realized that TLS is turned off. Was that because it did not work with the sdk? The fabric e2e works with tls no problem

dhwang (Fri, 24 Mar 2017 17:39:06 GMT):
Has joined the channel.

rickr (Fri, 24 Mar 2017 18:02:59 GMT):
There's no claim that the SDK is at e2e level. It's still alpha and work in progress. Support is not there and coming .. It will also not be available in the test/sample code till https://jira.hyperledger.org/browse/FAB-2855 gets addressed .. if it's important to you please give them a patch :)

akashmar (Fri, 24 Mar 2017 19:16:39 GMT):
Has joined the channel.

akashmar (Fri, 24 Mar 2017 19:19:14 GMT):
When I develop java chaincode, am I supposed to use hyperledger/fabric-sdk-java or the java package under hyperledger/fabric/core/chaincode/shim?

akashmar (Fri, 24 Mar 2017 19:19:28 GMT):
There seems to be duplicate code there

shaileshrl (Fri, 24 Mar 2017 20:15:06 GMT):
Has joined the channel.

GaneshBagalur (Fri, 24 Mar 2017 20:15:47 GMT):
Has joined the channel.

ranjan008 (Sat, 25 Mar 2017 05:27:57 GMT):
@rickr hi i tried to run the End2End class I am getting this error what could be the mistake ERROR Chain:169 - Bad deliver expected status 200 got 403, Chain foo

ranjan008 (Sat, 25 Mar 2017 05:31:33 GMT):
the error came from orderer

icordoba (Sat, 25 Mar 2017 10:50:16 GMT):
Thanks, I did: https://jira.hyperledger.org/browse/FAB-2881 (My first entry in hyperledger Jira. Sorry if I missed anything there. I will also have a look at code should consider accepting a Pull Request/Patch. Thanks) [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WCeajeamkxXuqvKmm) @rickr

rickr (Sat, 25 Mar 2017 12:47:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eiY2rRYhSPZcgmnfo) @ranjan008 How are you running the test ? When you get that error what is the output (logs) from the Orderer ?

conor (Mon, 27 Mar 2017 00:38:11 GMT):
Has joined the channel.

t-watana (Mon, 27 Mar 2017 09:51:27 GMT):
Has joined the channel.

xuanyue202 (Mon, 27 Mar 2017 11:29:39 GMT):
Has joined the channel.

magg (Mon, 27 Mar 2017 11:29:53 GMT):
i'm trying to run the End2End too without luck... i'm using the docker compose file in fabric-sdk-java/src/test/fixture/sdkintegration I modified the compose file because the images were throwing an error so i added ":x86_64-1.0.0-alpha" to all images. Then i do `mvn clean install` and `mvn failsafe:integration-test -DskipITs=false`

xuanyue202 (Mon, 27 Mar 2017 11:30:30 GMT):
Hi guys, do you have plans on publish a new version to the Maven Central?

magg (Mon, 27 Mar 2017 11:32:19 GMT):
here is the error output: https://pastebin.com/b8qrhyt7

magg (Mon, 27 Mar 2017 11:32:27 GMT):
can you help me?

rickr (Mon, 27 Mar 2017 11:35:05 GMT):
We don't test with alpha level .. we have running test that check end2endit quite regularly and we also run it locally. My advise is to follow the README.md closely.

rickr (Mon, 27 Mar 2017 11:35:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=AFL7kMvdS4TFxpbiq) @xuanyue202 Sure someday :)

xuanyue202 (Mon, 27 Mar 2017 11:37:08 GMT):
Cool. Is there a expected date?

rickr (Mon, 27 Mar 2017 11:37:51 GMT):
No

magg (Mon, 27 Mar 2017 11:37:54 GMT):
ok @rickr

rickr (Mon, 27 Mar 2017 11:39:15 GMT):
https://chat.hyperledger.org/channel/fabric-maintainers?msg=XeNfnapGTiZMsraGL

cgrecu (Mon, 27 Mar 2017 13:41:01 GMT):
hey guys, i am having a bit of a trouble understanding e2e_2Orgs crypto-config structure. From the cryto-config dir, there are two categories of participants, orderers and peers. Since there are two peer orgs listed there, does that not mean there are 3 organizations involved in this scenario (the ordered org and the two peers orgs) ? A diff between orderer pem files and peer files revealed that the certs were different.

cgrecu (Mon, 27 Mar 2017 13:44:19 GMT):
also following up to my previous question, each peer and orderer config dif has a 'ca' directory. Does that mean that each org has its own fabric-ca? Docker-compose file instantiates two fabric-ca containers, from /crypto-config/peerOrganizations/peerOrg1/ca/ and /crypto-config/peerOrganizations/peerOrg2/ca/, respectively. Looks like the orderer 'ca' config is not used

tuand (Mon, 27 Mar 2017 13:53:18 GMT):
@cgrecu the ordering service can be set up by a separate org ( subject to out-of-band approval by the orgs participating in the fabric network ) or each org can contribute one or more orderer nodes. In the e2e example, it's separated out because it's simpler to see what's going on and easier to configure

tuand (Mon, 27 Mar 2017 13:56:22 GMT):
each peer org has its own fabric-ca because we want to show new users being registered via fabric-ca. Note that it's not required that a peer org go through fabric-ca. An org can create and sign its certificates using any mechanism it wants. Again, for orderer, it was just easier to configure before hand

cgrecu (Mon, 27 Mar 2017 14:23:02 GMT):
@tuand thanks. More questions if you don't mind ... in crypto-config dir, each organization has its own 'ca' directory, its own 'msp' directory and finally its own list of dirs that contain a similar to msp structure (have an additional keystore dir). What is the meaning of 'msp' directories ? They do not seem to be used.

tuand (Mon, 27 Mar 2017 14:43:29 GMT):
I think you're referring to, for example, `peerOrganizations/peerOrg1/peers/peerOrg1Peer1` ? I believe those are mapped to a peer's "local" MSP ... Also, this is very much an internal fabric peer configuration and since we're an sdk client , we don't care :D ... seriously though, it's a matter of re-using the `cryptogen` output and taking advantage of a working fabric environment. You should take a look at hyperledger/fabric/examples/e2e_cli to understand why the config is described in more detail

mwall (Mon, 27 Mar 2017 16:32:08 GMT):
`Mar 27, 2017 7:31:30 PM org.hyperledger.fabric.sdk.EndorserClient sendProposal WARNING: RPC failed: Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP DEFAULT is unknown, cause=null} Exception in thread "main" org.hyperledger.fabric.sdk.exception.PeerException: Sending transaction to peer failed at org.hyperledger.fabric.sdk.EndorserClient.sendProposal(EndorserClient.java:59) at org.hyperledger.fabric.sdk.Peer.sendProposal(Peer.java:128) at org.hyperledger.fabric.sdk.Chain.sendDeploymentProposal(Chain.java:625) at uk.dsxt.fabric.FabricManagerOne.main(FabricManagerOne.java:58) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err MSP DEFAULT is unknown at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:230) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:211) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:144) at org.hyperledger.fabric.protos.peer.EndorserGrpc$EndorserBlockingStub.processProposal(EndorserGrpc.java:135) at org.hyperledger.fabric.sdk.EndorserClient.sendProposal(EndorserClient.java:55) ... 3 more`

mwall (Mon, 27 Mar 2017 16:33:36 GMT):
Hello! Can you help me to fix it https://pastebin.com/qugANTMz ?

mwall (Mon, 27 Mar 2017 16:33:36 GMT):
Hello! Can you help me to fix it https://pastebin.com/qugANTMz ? I'm using fabric_v1

mwall (Mon, 27 Mar 2017 16:33:36 GMT):
Hello! Can you help me to fix it https://pastebin.com/qugANTMz ? I'm using fabric_v1.

mwall (Mon, 27 Mar 2017 16:33:36 GMT):
@here Hello! Can you help me to fix it https://pastebin.com/qugANTMz ? I'm using fabric_v1.

tuand (Mon, 27 Mar 2017 17:14:38 GMT):
@mwall, it looks like you're using the wrong identity to sign the proposal messages ... take a look at the README, the End2EndIT.java code and the hyperledger/fabric/examples/e2e_cli code and follow how the peer Orgs are set up.

mwall (Mon, 27 Mar 2017 17:18:03 GMT):
@tuand ok, thank you, will try out

AvN (Mon, 27 Mar 2017 19:25:24 GMT):
Has joined the channel.

AvN (Mon, 27 Mar 2017 19:42:18 GMT):
So I am using docker and referring to the latest images (x86_64-1.0.0-alpha) published to the repo: https://hub.docker.com/u/hyperledger/ Here is my config file ``` version: '2.0' services: ca: image: hyperledger/fabric-ca:x86_64-1.0.0-alpha ports: - "7054:7054" command: sh -c 'fabric-ca-server start -b admin:adminpw -d' container_name: ca orderer: image: hyperledger/fabric-orderer:x86_64-1.0.0-alpha environment: - ORDERER_GENERAL_LOGLEVEL=debug - ORDERER_GENERAL_LEDGERTYPE=ram - ORDERER_GENERAL_BATCHTIMEOUT=10s - ORDERER_GENERAL_MAXMESSAGECOUNT=10 - ORDERER_GENERAL_MAXWINDOWSIZE=1000 - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_RAMLEDGER_HISTORY_SIZE=100 - ORDERER_GENERAL_ORDERERTYPE=solo working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer command: orderer ports: - 7050:7050 vp0: image: hyperledger/fabric-peer:x86_64-1.0.0-alpha environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} - CORE_NEXT=true - CORE_PEER_ENDORSER_ENABLED=true - CORE_PEER_ID=vp0 - CORE_PEER_PROFILE_ENABLED=false - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 volumes: - /var/run/:/host/var/run/ command: peer node start links: - orderer ports: - 7051:7051 - 7053:7053 depends_on: - orderer vp1: image: hyperledger/fabric-peer:x86_64-1.0.0-alpha environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_NETWORKID=${CORE_PEER_NETWORKID} - CORE_NEXT=true - CORE_PEER_ENDORSER_ENABLED=true - CORE_PEER_ID=vp1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_COMMITTER_LEDGER_ORDERER=orderer:7050 - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 volumes: - /var/run/:/host/var/run/ command: peer node start links: - orderer - vp0 ports: - 7056:7051 depends_on: - orderer ``` And when I try to run the End2endIT test, I get the following error

AvN (Mon, 27 Mar 2017 19:42:57 GMT):
``` 2017-03-27 12:41:45 ERROR HFCAClient:343 - POST request to http://localhost:7054/api/v1/cfssl/register failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"User 'user1' is already registered"}],"messages":[]} 2017-03-27 12:41:45 ERROR HFCAClient:183 - POST request to http://localhost:7054/api/v1/cfssl/register failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"User 'user1' is already registered"}],"messages":[]} java.lang.Exception: POST request to http://localhost:7054/api/v1/cfssl/register failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"User 'user1' is already registered"}],"messages":[]} ```

rickr (Mon, 27 Mar 2017 19:59:32 GMT):
so user 1 is already registered

rickr (Mon, 27 Mar 2017 19:59:57 GMT):
have you tried restarting your docker compose

AvN (Mon, 27 Mar 2017 22:47:23 GMT):
So I ran the docker-compose in fabric-sdk-java/src/test/fixture/sdkintegration. Had to remove the references to couchdb. After starting the docker container, you should see the following nodes running hyperledger/fabric-peer:x86_64-1.0.0-alpha hyperledger/fabric-peer:x86_64-1.0.0-alpha hyperledger/fabric-peer:x86_64-1.0.0-alpha hyperledger/fabric-peer:x86_64-1.0.0-alpha hyperledger/fabric-ca:x86_64-1.0.0-alpha hyperledger/fabric-ca:x86_64-1.0.0-alpha hyperledger/fabric-orderer:x86_64-1.0.0-alpha AFter running the End2endIT, am seeing the following errors ``` Running Chain foo Sending install proposal Successful install proposal response Txid: fc6a518fcccaf46f714913a955a9fb5debcabf0475390ac6be86075622452bbe from peer peer0 Successful install proposal response Txid: fc6a518fcccaf46f714913a955a9fb5debcabf0475390ac6be86075622452bbe from peer peer1 Received 2 install proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively 2017-03-27 15:33:30 ERROR Chain:1511 - Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:1511) at org.hyperledger.fabric.sdk.Chain.sendInstantiationProposal(Chain.java:1031) at org.hyperledger.fabric.sdkintegration.End2endIT.runChain(End2endIT.java:269) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image at io.grpc.Status.asRuntimeException(Status.java:539) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:422) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:74) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:508) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:425) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:540) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ```

rickr (Mon, 27 Mar 2017 22:49:55 GMT):
Have not tried to run with alpha

rickr (Mon, 27 Mar 2017 22:51:12 GMT):
that looks like the runtimes are missing

AvN (Tue, 28 Mar 2017 03:59:44 GMT):
I am using the docker.yml under the sdkintegration folder. I had to modify it to pick up the latest docker images. The other ones were uploaded around 6 months back

AvN (Tue, 28 Mar 2017 04:00:47 GMT):
And when running the Integration test, I get the error Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image

rickr (Tue, 28 Mar 2017 07:44:30 GMT):
I would highly recommend reading the README.md fully and follow the step it lays out.

karumbas (Tue, 28 Mar 2017 08:50:03 GMT):
@tuan @rickr Hi, I am getting this error https://pastebin.com/9G63A01y when creating newChain The orderer show the error below orderer0 | 2017-03-28 08:26:47.700 UTC [common/configtx] addToMap -> DEBU 580 Adding to config map: [Policy] /Channel/AcceptAllPolicy orderer0 | 2017-03-28 08:26:47.700 UTC [orderer/common/broadcast] Handle -> WARN 581 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Values] /Channel/Orderer/ChannelRestrictions to version 0, but key is at version 0 Could you please help fix it?

karumbas (Tue, 28 Mar 2017 08:50:03 GMT):
@tuand @rickr Hi, I am getting this error https://pastebin.com/9G63A01y when creating newChain The orderer show the error below orderer0 | 2017-03-28 08:26:47.700 UTC [common/configtx] addToMap -> DEBU 580 Adding to config map: [Policy] /Channel/AcceptAllPolicy orderer0 | 2017-03-28 08:26:47.700 UTC [orderer/common/broadcast] Handle -> WARN 581 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Values] /Channel/Orderer/ChannelRestrictions to version 0, but key is at version 0 Could you please help fix it?

cgrecu (Tue, 28 Mar 2017 15:12:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gPoaaCb7RxnotSscs) @AvN did you change the parent directory where docker compose file was? It could also be that the container you are trying to bring up does not see the fabric containers because of a different network. If you change the parent dir, docker-compose creates a different default network with the name yourparentdir_default.

rickr (Wed, 29 Mar 2017 00:35:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uiuJ4xSqogXpRvEde) @karumbas Never seen that error before. Were you just running the E2EIT ? No changes ?

xiangyw (Wed, 29 Mar 2017 01:52:39 GMT):

Message Attachments

dorrakhribi (Wed, 29 Mar 2017 10:17:16 GMT):
have any one display the history of transactions done by a specific peer ?

karumbas (Wed, 29 Mar 2017 12:45:23 GMT):
@rick yes was running E2EIT, there were no changes. On first run i got this error https://pastebin.com/mRNWzrEP then the error above.

karumbas (Wed, 29 Mar 2017 12:45:23 GMT):
@rickr yes was running E2EIT, there were no changes. On first run i got this error https://pastebin.com/mRNWzrEP then the error above.

karumbas (Wed, 29 Mar 2017 12:45:23 GMT):
@rickr yes, I was running E2EIT and there were no changes. On first run i got this error https://pastebin.com/mRNWzrEP then the error above.

anrodon (Wed, 29 Mar 2017 13:56:08 GMT):
http://area51.stackexchange.com/proposals/107923/hyperledger?referrer=uwBppPb347ObXyZLiQ6nVQ2

dorrakhribi (Wed, 29 Mar 2017 15:16:24 GMT):
hi, i've been working with fabric 0.6 and i've been disabling the security env_variable because i've been told that the java chaincode does not work with security anbled , now i'm starting to read about fabric 1.0 , i want to know if the java chaincode support security and if i am able to work with certificates

rickr (Wed, 29 Mar 2017 15:23:01 GMT):
Right now fix for Java chain code is not in. I would direct your questions to fabric-java-chaincode channel

dorrakhribi (Wed, 29 Mar 2017 15:36:18 GMT):
alright, thanks @rickr , is the fabric 1.0 still under development or it is the final release ?

rickr (Wed, 29 Mar 2017 15:38:37 GMT):
I'd ask that on the fabric channel. I don't want to speak for them :) As for the Java SDK it is alpha work in progress.

dorrakhribi (Wed, 29 Mar 2017 16:27:55 GMT):
thank you @rickr for your answer :)

ManjeetGambhir (Wed, 29 Mar 2017 18:49:17 GMT):
@suryalanka FO: [io.grpc.internal.ManagedChannelImpl-1] Created with target 10.34.32.144:9050 2017-03-29 13:33:37 ERROR OrdererClient:104 - sendTransaction error Send transactions failed. Reason: INTERNAL org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: INTERNAL at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:103) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:102) at org.hyperledger.fabric.sdk.Chain.(Chain.java:157)

ArnabChatterjee (Thu, 30 Mar 2017 05:31:07 GMT):
Hello everyone. Can you please confirm if I can mix query and invoke calls in a single chaincode invocation? Unlike in v0.6, where we could not commit a txn in a query call. Or cannot return data in an invoke call. Now in v1.0, is this feasible?

Willson (Thu, 30 Mar 2017 06:50:53 GMT):
Hello @rickr , the ca0 and ca1 can't start after setting the "ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS=--tls.enabled", i found that a directory called cas should be contained at src/test/fixture/sdkintegration/e2e-2Orgs/tls/ which contains the cert.pem of peerOrg1 and peerOrg2, but i can't find the cas, how can i get it?

rickr (Thu, 30 Mar 2017 09:51:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ShdntbosqMYdvzxSR) @ArnabChatterjee You can now return values from invokes if that helps

rickr (Thu, 30 Mar 2017 09:55:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bGDH39rKkMoq2H8Wg) @Willson At the _current time_ if TLS is important for you'll need to create them.

Willson (Thu, 30 Mar 2017 11:47:07 GMT):
yeah, i am learning how to create it. any suggestion for that? thanks

rickr (Thu, 30 Mar 2017 11:52:16 GMT):
cfssl openssh. If you see in the README.md cryptogen once I see it's fixed. You can try that if it works we'll welcome a patch :wink:

rickr (Thu, 30 Mar 2017 11:52:16 GMT):
cfssl openssh. If you see in the README.md cryptogen once I see it's fixed. You can try that if it works we'll welcome a patch :wink: For the Fabric I don't think it's as easy as just generating the certs. They have to be from common CA. On shaky ground as far as my knowledge on this but I think the peers in the org may have to be cross certified.

Willson (Thu, 30 Mar 2017 12:02:36 GMT):
thanks, let me try it

ManjeetGambhir (Thu, 30 Mar 2017 14:48:25 GMT):
@rickr try to install chaincode using java alpha commit level and fabric alpha release , image is installed and can see custom chain-code image and container but in couchdb I can not see lscc entry ..

rickr (Thu, 30 Mar 2017 14:50:21 GMT):
I have not tried with alpha

ManjeetGambhir (Thu, 30 Mar 2017 14:50:28 GMT):
@rickr can no see any error in orderer and peer logs ...only getting timeout exception in java client..I am using compose file of java sdk alpha release

ManjeetGambhir (Thu, 30 Mar 2017 14:51:03 GMT):
do you know who can help

rickr (Thu, 30 Mar 2017 14:51:07 GMT):
I don't know of any java sdk alpha compose

rickr (Thu, 30 Mar 2017 14:51:38 GMT):
What wrong with following the the README.md ?

rickr (Thu, 30 Mar 2017 14:51:57 GMT):
I think others here have gotten it to work with that

ManjeetGambhir (Thu, 30 Mar 2017 14:52:26 GMT):
Can not take fabric and fabric-ca commit level of fabric ca

ManjeetGambhir (Thu, 30 Mar 2017 14:53:04 GMT):
that mentioned in readme file..need to integrated with alpha release

ManjeetGambhir (Thu, 30 Mar 2017 14:53:21 GMT):
because chaincodes are tested on alpha

ManjeetGambhir (Thu, 30 Mar 2017 14:53:39 GMT):
that's the guidelines we are following

rickr (Thu, 30 Mar 2017 14:54:16 GMT):
I don't have any experience at getting that DC running with alpha

rickr (Thu, 30 Mar 2017 14:55:08 GMT):
I run with the latest .. as I need to test with that

rickr (Thu, 30 Mar 2017 15:07:47 GMT):
As far as I know chaincode is being continuously tested

rickr (Thu, 30 Mar 2017 16:33:03 GMT):
@Ratnakar can you help Manjeet I think you had some experience with the Node SDK on alpha

Ratnakar (Thu, 30 Mar 2017 17:06:03 GMT):
@rickr sure I will be working with @ManjeetGambhir , Howeve he is dealing with Java SDk not the Node sdk

rickr (Thu, 30 Mar 2017 17:31:31 GMT):
Yeah it much better :smile:

anrodon (Thu, 30 Mar 2017 19:56:04 GMT):
http://area51.stackexchange.com/proposals/107923/hyperledger

icordoba (Thu, 30 Mar 2017 22:56:13 GMT):
Hi... I was going to add users to my network using sdk-java. I see that RegistrationRequest class has no enrollmentPWD property. How can set the password for a user if I register it this way? (not using memberrvc.yaml) thanks!

rickr (Thu, 30 Mar 2017 23:01:48 GMT):
End2endIT ``` SampleUser user = sampleStore.getMember(TESTUSER_1_NAME, sampleOrg.getName()); if (!user.isRegistered()) { // users need to be registered AND enrolled RegistrationRequest rr = new RegistrationRequest(user.getName(), "org1.department1"); user.setEnrollmentSecret(ca.register(rr, admin)); }``` your given a pw set in the users setEnrollmentSecret

icordoba (Thu, 30 Mar 2017 23:02:01 GMT):
OOOps. thanks.

rickr (Thu, 30 Mar 2017 23:03:05 GMT):
np

icordoba (Thu, 30 Mar 2017 23:07:12 GMT):
@rickr so the memberServices(RegistrationRequest, Member) method, the Member parameter is not the registrar (the one registering users) but the user being registered? I should set the user.setEnrollmentSecret to that object, am I right?

icordoba (Thu, 30 Mar 2017 23:07:23 GMT):
(I am using 0.6... maybe that's my problem)

rickr (Thu, 30 Mar 2017 23:09:23 GMT):
Not down to speed with v.6 :(

icordoba (Thu, 30 Mar 2017 23:11:51 GMT):
@rickr I do want to move to 1.0 but I have read here it is still not running Java chain code... too bad, for me.... anyway, I'm browsing 1.0 code now... I think I was wrong in something: I can't set the secret when I register a user. I just should pass the RegistrationRequest and the HFCAClient returns the secret for that user, am I right?

ManjeetGambhir (Fri, 31 Mar 2017 01:11:34 GMT):
@rickr while reconstructing chain getting org.hyperledger.fabric.sdk.exception.TransactionException: Bad last configuation block type 3, expected 1 at org.hyperledger.fabric.sdk.Chain.getConfigurationBlock(Chain.java:855) at org.hyperledger.fabric.sdk.Chain.parseConfigBlock(Chain.java:718) at org.hyperledger.fabric.sdk.Chain.initialize(Chain.java:456) at org.hyperledger.fabric.sdkintegration.End2endIT.reconstructChain(End2endIT.java:935)

rickr (Fri, 31 Mar 2017 01:12:19 GMT):
An old problem need to move to latest code

ManjeetGambhir (Fri, 31 Mar 2017 01:13:00 GMT):
if I move to latest does it work with alpha release

rickr (Fri, 31 Mar 2017 01:15:41 GMT):
Work with commit levels in the README.md

ManjeetGambhir (Fri, 31 Mar 2017 01:16:48 GMT):
can you post commit

ManjeetGambhir (Fri, 31 Mar 2017 01:16:58 GMT):
I can not open link

rickr (Fri, 31 Mar 2017 01:18:04 GMT):
you can't get to https://github.com/hyperledger/fabric-sdk-java ?

ManjeetGambhir (Fri, 31 Mar 2017 01:18:55 GMT):
ohhk..I thought you are specifying

ManjeetGambhir (Fri, 31 Mar 2017 01:19:02 GMT):
something specific

Willson (Fri, 31 Mar 2017 03:28:50 GMT):
@rickr Unfortunately, i created the private key and cert by openssl and can connect to the ca by tls, but when constructing the chain, there is an error: 2017-03-31 10:53:58 ERROR CryptoPrimitives:169 - Unable to converts byte array to certificate. error : Extensions not allowed in v2 certificate 2017-03-31 10:53:58 ERROR Endpoint:100 - Error getting Subject CN from certificate. Try setting it specifically with hostnameOverride property. Unable to converts byte array to certificate. error : Extensions not allowed in v2 certificate 2017-03-31 10:53:58 ERROR Chain:161 - Jetty ALPN/NPN has not been properly configured. i try to solve it but fail. have some suggestions?

Willson (Fri, 31 Mar 2017 08:09:38 GMT):
Till now, i recreate the root cacert, private keys and certs of orderer and peers, and set the VM option "-Xbootclasspath/p", the sdk have been started up, but there is a new error appearing while connecting to the orderer: org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: UNAVAILABLE: Channel closed while performing protocol negotiation i track the logs of the orderer, it shows that: grpc: Server.Serve failed to complete security handshake from "192.168.216.1:55665": EOF do my certs illegal?

rickr (Fri, 31 Mar 2017 12:17:52 GMT):
If you're using alpn the bootclasspath is in the pom.xml for the failsafe plugin. Your certs will need a CN that matches the alias for the services in the docker-compose.yaml (ca0, ca1, orderer0 ) if you're using the one we provided. Since most likely your DNS will not match that you'll need to use the `trustServerCertificate` property or `hostnameOverride` on the orderer, peer and eventhubs

Willson (Fri, 31 Mar 2017 12:54:37 GMT):
thanks, where and hwo to set the `trustServerCertificate` property or `hostnameOverride`?

rickr (Fri, 31 Mar 2017 12:56:01 GMT):
look for examples in TestConfig.java

rickr (Fri, 31 Mar 2017 12:56:25 GMT):
its a property like the pemFile

Willson (Fri, 31 Mar 2017 12:58:01 GMT):
ok, let me try it

rickr (Fri, 31 Mar 2017 13:16:08 GMT):
How'd you get past the `r : Extensions not allowed in v2 certificate`

rickr (Fri, 31 Mar 2017 13:17:08 GMT):
I used cfssl and the certs it produced seemed to be ok. Did you use that ?

Willson (Fri, 31 Mar 2017 13:25:45 GMT):
Maybe i was using the v3, after i recreate the root cacerts, it worked

Rymd (Fri, 31 Mar 2017 13:26:15 GMT):
If i use cryptogen tool to generate cryptografic artifacts do i need to create new certificates for my java client? I'm getting this error `Sending proposal to peer failed because of gRPC failure=Status{code=UNKNOWN, description=The creator certificate is not valid, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null}` when i'm sending an InstallProposalRequest

Rymd (Fri, 31 Mar 2017 13:26:28 GMT):
or is it something wrong with my network setup

allenc2016 (Fri, 31 Mar 2017 13:41:33 GMT):
Has joined the channel.

Willson (Fri, 31 Mar 2017 13:42:03 GMT):
You no need

Willson (Fri, 31 Mar 2017 13:45:35 GMT):
Most likely for you error is that you did not reset the commitlevel

Willson (Fri, 31 Mar 2017 13:55:45 GMT):
@rickr Setting ·properties.setProperty("trustServerCertificate", "true")· does not seem to work

Willson (Fri, 31 Mar 2017 13:56:22 GMT):
@rickr Setting `properties.setProperty("trustServerCertificate", "true")` does not seem to work

rickr (Fri, 31 Mar 2017 13:57:45 GMT):
in your certs did you have the CN matching the yaml service alias ?

Willson (Fri, 31 Mar 2017 13:58:34 GMT):
Maybe not

bh4rtp (Fri, 31 Mar 2017 14:37:08 GMT):
hi, does the latest fabric-sdk-java run junit-test ok? i launch src/test/fixture/sdkintegration/docker-compose.yaml. and run sdk junit-test, there are a number of errors.

bh4rtp (Fri, 31 Mar 2017 14:41:37 GMT):
2017-03-31 07:39:12 ERROR OrdererClient:104 - sendTransaction error Send transactions failed. Reason: UNAVAILABLE

bh4rtp (Fri, 31 Mar 2017 14:42:15 GMT):
2017-03-31 07:39:13 ERROR CryptoPrimitives:425 - Cannot validate certificate. Error is: Path does not chain with any of the trust anchors

bh4rtp (Fri, 31 Mar 2017 14:42:56 GMT):
2017-03-31 07:39:13 ERROR CryptoPrimitives:229 - Cannot verify. Signature algorithm is invalid. Error is: Could not verify signature

rickr (Fri, 31 Mar 2017 14:46:26 GMT):
They are continuously run and run each time code is delivered and merged

bh4rtp (Fri, 31 Mar 2017 14:56:50 GMT):
Yes, End2endIT.java runs ok.

o.o. (Fri, 31 Mar 2017 16:09:04 GMT):
@Rymd: Vadim has the answers https://chat.hyperledger.org/channel/fabric-crypto?msg=zdDgp4ebPSNxENTbG

rickr (Fri, 31 Mar 2017 16:18:32 GMT):
If you have the certs/cas to make the End2end flow work .. contributions are welcome :)

ManjeetGambhir (Sat, 01 Apr 2017 16:33:03 GMT):
itrying to run docker compose file provided by java sdk commit level mentioned "315420e" ,but ca server is not coming up showing error sh: 1: fabric-ca-server: not found

ManjeetGambhir (Sat, 01 Apr 2017 16:33:37 GMT):
@rickr trying to run docker compose file provided by java sdk commit level mentioned "315420e" ,but ca server is not coming up showing error sh: 1: fabric-ca-server: not found

ManjeetGambhir (Sat, 01 Apr 2017 16:34:47 GMT):
ca0: image: hyperledger/fabric-ca environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server ports: - "7054:7054" # ca_PeerOrg1 uses the key of peerOrg1 so any new registration is automatically included in peerOrg1 command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc310894150908b90f05e9179556a_sk -b admin:adminpw ${ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS} --tls.certfile /etc/hyperledger/tls/cas/peerOrg1/cert.pem --tls.keyfile /etc/hyperledger/tls/cas/peerOrg1/key.pem -d' volumes: - ./e2e-2Orgs/crypto-config/peerOrganizations/peerOrg1/ca/:/etc/hyperledger/fabric-ca-server-config - ./e2e-2Orgs/tls:/etc/hyperledger/tls container_name: ca_peerOrg1

ManjeetGambhir (Sat, 01 Apr 2017 16:38:13 GMT):
ignore

ManjeetGambhir (Sat, 01 Apr 2017 16:38:15 GMT):
it

ManjeetGambhir (Sat, 01 Apr 2017 17:32:32 GMT):
@rickr Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively 2017-04-01 13:11:49 ERROR Chain:1664 - Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image

ManjeetGambhir (Sat, 01 Apr 2017 17:32:49 GMT):
with new images .getting above error

ManjeetGambhir (Sat, 01 Apr 2017 17:33:04 GMT):
using E2EIt

ManjeetGambhir (Sat, 01 Apr 2017 17:41:54 GMT):
though I can see chaincode is installed

ManjeetGambhir (Sat, 01 Apr 2017 17:55:11 GMT):
but not created images

ManjeetGambhir (Sat, 01 Apr 2017 17:55:27 GMT):
for sample chaincode

rameshthoomu (Sun, 02 Apr 2017 15:03:52 GMT):
@ManjeetGambhir It seem you don't have ccenv image..

rameshthoomu (Sun, 02 Apr 2017 15:04:17 GMT):
try to pull ccenv image and re-run the tests..

ManjeetGambhir (Sun, 02 Apr 2017 15:05:25 GMT):
Ok sure

reoim10 (Tue, 04 Apr 2017 01:19:03 GMT):
Has joined the channel.

reoim10 (Tue, 04 Apr 2017 01:21:13 GMT):
Hi guys, just have a quick question. Is fabric-sdk-java v1.0 is stable enough or is it still under development?

dharmjit (Tue, 04 Apr 2017 03:44:04 GMT):
Has joined the channel.

ranjan008 (Tue, 04 Apr 2017 07:36:01 GMT):
@rickr in java sdk test classes we are using pre-defined config files for channel configuration and chaincode endorsement policy can we define those things programmatically??

rickr (Tue, 04 Apr 2017 08:35:47 GMT):
There is a change coming that will let you define the CC EP via a yaml file. The channel configuration is very involved and doing it programmatic I feel it's understatement to say it's not for the faint of heart

rohitbordia (Tue, 04 Apr 2017 22:01:39 GMT):
Has joined the channel.

rohitbordia (Tue, 04 Apr 2017 22:02:17 GMT):
Hi Guys, was trying to run sdk-java test and getting following error

rohitbordia (Tue, 04 Apr 2017 22:02:28 GMT):
ava.lang.ClassCastException: org.glassfish.json.JsonStringImpl cannot be cast to javax.json.JsonObject

rohitbordia (Tue, 04 Apr 2017 22:02:41 GMT):
017-04-04 14:45:12 ERROR HFCAClient:305 - org.glassfish.json.JsonStringImpl cannot be cast to javax.json.JsonObject java.lang.ClassCastException: org.glassfish.json.JsonStringImpl cannot be cast to javax.json.JsonObject at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getJsonObject(JsonObjectBuilderImpl.java:184) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:292)

rohitbordia (Tue, 04 Apr 2017 22:02:49 GMT):
anyone encountered this error

rickr (Tue, 04 Apr 2017 22:03:17 GMT):
is this a fresh git pull ?

rickr (Tue, 04 Apr 2017 22:03:23 GMT):
no changes ?

rickr (Tue, 04 Apr 2017 22:04:06 GMT):
I've not seen anyone come across that

rickr (Tue, 04 Apr 2017 22:04:10 GMT):
1.0 ?

rickr (Tue, 04 Apr 2017 22:04:22 GMT):
has to be :)

rickr (Tue, 04 Apr 2017 22:05:10 GMT):
more likely a commit level issue

rickr (Tue, 04 Apr 2017 22:05:22 GMT):
are you using what's in the README.md

rohitbordia (Tue, 04 Apr 2017 22:06:31 GMT):
yes , I did the fresh git pull this afternoon

rickr (Tue, 04 Apr 2017 22:07:23 GMT):
of the HLJSDK and do your fabric_ca commit levels match the README.md

rohitbordia (Tue, 04 Apr 2017 22:07:28 GMT):
https://github.com/hyperledger/fabric-sdk-java .. just did git pull .. did setup ca, peers and started to run End2endIT

rohitbordia (Tue, 04 Apr 2017 22:07:36 GMT):
let me check

rohitbordia (Tue, 04 Apr 2017 22:08:29 GMT):
I did setup fabric, ca server using docker

rickr (Tue, 04 Apr 2017 22:09:03 GMT):
did you build the docker images ?

rohitbordia (Tue, 04 Apr 2017 22:10:02 GMT):
when building : image: hyperledger/fabric-ca .. i was getting docker error that no Manifest found

rohitbordia (Tue, 04 Apr 2017 22:10:23 GMT):
so, i build using sfhackfest22017/fabric-ca:x86_64-0.7.0-snapshot-6294c57

rickr (Tue, 04 Apr 2017 22:10:38 GMT):
theres your problme

rickr (Tue, 04 Apr 2017 22:12:01 GMT):
ask on the fabric-ca about your build issue

rohitbordia (Tue, 04 Apr 2017 22:12:07 GMT):
ok

rohitbordia (Tue, 04 Apr 2017 22:15:37 GMT):
thanks rick

rickr (Tue, 04 Apr 2017 22:16:05 GMT):
yw

rohitbordia (Tue, 04 Apr 2017 22:54:22 GMT):
solved the problem by loading latest fabric code

rohitbordia (Tue, 04 Apr 2017 22:56:16 GMT):
but now getting

rohitbordia (Tue, 04 Apr 2017 22:56:18 GMT):
ERROR HFCAClient:554 - POST request to http://localhost:7054/api/v1/cfssl/register failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"User 'user1' is already registered"}],"messages":[]}

rickr (Tue, 04 Apr 2017 22:56:50 GMT):
restart DC

rohitbordia (Tue, 04 Apr 2017 22:57:04 GMT):
you mean docker/

rickr (Tue, 04 Apr 2017 22:57:17 GMT):
docker compose

rohitbordia (Tue, 04 Apr 2017 22:57:20 GMT):
ok

rickr (Tue, 04 Apr 2017 22:57:21 GMT):
down up

rohitbordia (Tue, 04 Apr 2017 22:59:39 GMT):
org.apache.http.conn.HttpHostConnectException: Connect to localhost:8054 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused

rohitbordia (Tue, 04 Apr 2017 23:00:39 GMT):
I was looking around and in TestConfig has peerOrg2.ca_location for 8054

rickr (Tue, 04 Apr 2017 23:01:21 GMT):
ok

rohitbordia (Tue, 04 Apr 2017 23:03:58 GMT):
if , I remove that config i get some other exceptions

rickr (Tue, 04 Apr 2017 23:05:05 GMT):
i suggest you follow the readme.md not change a thing get that working then go from there

rohitbordia (Tue, 04 Apr 2017 23:05:15 GMT):
ok

nickmelis (Wed, 05 Apr 2017 09:48:56 GMT):
does anyone know what causes this error (running with HL & sdk 0.6)? Error:Failed to execute transaction or query(Error sending QUERY: txid:fd9989456b6d30e9b9be4282b5ab4ce3c51be4d8ec997e2bd07b679f2ecc7aaf exists)

nickmelis (Wed, 05 Apr 2017 09:50:25 GMT):
the txid value is my chaincode ID (and I don't understand why it's being used as txid)

mmani99 (Wed, 05 Apr 2017 12:49:45 GMT):
Has joined the channel.

rliu (Wed, 05 Apr 2017 13:14:58 GMT):
Has joined the channel.

rohitbordia (Wed, 05 Apr 2017 18:32:38 GMT):
after making all changes as per readme.md from sdk , after running end2end test , I get Bad deliver expected status 200 got 403

rohitbordia (Wed, 05 Apr 2017 18:33:01 GMT):
017-04-04 16:16:29 ERROR Chain:665 - Bad deliver expected status 200 got 403, Chain foo org.hyperledger.fabric.sdk.exception.TransactionException: Bad deliver expected status 200 got 403, Chain foo at org.hyperledger.fabric.sdk.Chain.getGenesisBlock(Chain.java:631)

rickr (Wed, 05 Apr 2017 18:57:05 GMT):
Can you restart your docker containers and see what output there is on the orderer

rohitbordia (Wed, 05 Apr 2017 19:42:57 GMT):
ok

rohitbordia (Wed, 05 Apr 2017 19:54:20 GMT):
orderer_1 | 2017-04-05 19:53:54.240 UTC [orderer/main] Deliver -> DEBU 3e2 Starting new Deliver handler orderer_1 | 2017-04-05 19:53:54.240 UTC [orderer/common/deliver] Handle -> DEBU 3e3 Starting new deliver loop orderer_1 | 2017-04-05 19:53:54.240 UTC [orderer/common/deliver] Handle -> DEBU 3e4 Attempting to read seek info message orderer_1 | 2017-04-05 19:53:54.241 UTC [common/policies] GetPolicy -> DEBU 3e5 Returning policy Readers for evaluation orderer_1 | 2017-04-05 19:53:54.241 UTC [cauthdsl] func1 -> DEBU 3e6 Gate evaluation starts: (&{N:1 policies: }) orderer_1 | 2017-04-05 19:53:54.241 UTC [cauthdsl] func2 -> DEBU 3e7 Principal evaluation starts: (&{%!s(int32=0)}) (used [%!s(bool=false)]) orderer_1 | 2017-04-05 19:53:54.241 UTC [msp] newIdentity -> DEBU 3e8 Creating identity instance for ID &{Org1MSP DEFAULT} orderer_1 | 2017-04-05 19:53:54.241 UTC [cauthdsl] func2 -> DEBU 3e9 Principal evaluation fails: (&{%!s(int32=0)})%!(EXTRA []bool=[false]) orderer_1 | 2017-04-05 19:53:54.241 UTC [cauthdsl] func1 -> DEBU 3ea Gate evaluation fails: (&{N:1 policies: }) orderer_1 | 2017-04-05 19:53:54.241 UTC [cauthdsl] func1 -> DEBU 3eb Gate evaluation starts: (&{N:1 policies: }) orderer_1 | 2017-04-05 19:53:54.241 UTC [cauthdsl] func2 -> DEBU 3ec Principal evaluation starts: (&{%!s(int32=0)}) (used [%!s(bool=false)]) orderer_1 | 2017-04-05 19:53:54.241 UTC [msp] newIdentity -> DEBU 3ed Creating identity instance for ID &{Org1MSP DEFAULT} orderer_1 | 2017-04-05 19:53:54.241 UTC [msp] Validate -> INFO 3ee MSP Org1MSP validating identity orderer_1 | 2017-04-05 19:53:54.242 UTC [cauthdsl] func2 -> DEBU 3ef Principal evaluation fails: (&{%!s(int32=0)})%!(EXTRA []bool=[false]) orderer_1 | 2017-04-05 19:53:54.242 UTC [cauthdsl] func1 -> DEBU 3f0 Gate evaluation fails: (&{N:1 policies: }) orderer_1 | 2017-04-05 19:53:54.242 UTC [cauthdsl] func1 -> DEBU 3f1 Gate evaluation starts: (&{N:1 policies: }) orderer_1 | 2017-04-05 19:53:54.242 UTC [cauthdsl] func2 -> DEBU 3f2 Principal evaluation starts: (&{%!s(int32=0)}) (used [%!s(bool=false)]) orderer_1 | 2017-04-05 19:53:54.242 UTC [msp] newIdentity -> DEBU 3f3 Creating identity instance for ID &{Org1MSP DEFAULT} orderer_1 | 2017-04-05 19:53:54.242 UTC [cauthdsl] func2 -> DEBU 3f4 Principal evaluation fails: (&{%!s(int32=0)})%!(EXTRA []bool=[false]) orderer_1 | 2017-04-05 19:53:54.242 UTC [cauthdsl] func1 -> DEBU 3f5 Gate evaluation fails: (&{N:1 policies: }) orderer_1 | 2017-04-05 19:53:54.242 UTC [orderer/common/deliver] Handle -> WARN 3f6 Received unauthorized deliver request for channel foo vp1_1 | 2017-04-05 19:53:55.999 UTC [gossip/discovery#172.24.0.5:7051] periodicalSendAlive -> DEBU 8a7 Sleeping 5s vp0_1 | 2017-04-05 19:53:55.999 UTC [gossip/discovery#172.24.0.4:7051] periodicalSendAlive -> DEBU 8a6 Sleeping 5s

rohitbordia (Wed, 05 Apr 2017 19:54:59 GMT):
looks like this is the error WARN 3f6 Received unauthorized deliver request for channel foo

rickr (Wed, 05 Apr 2017 20:07:47 GMT):
this is with no changes ?

rohitbordia (Wed, 05 Apr 2017 20:09:28 GMT):
no change.. as it is from README and running the test

rickr (Wed, 05 Apr 2017 20:10:00 GMT):
are you running this in vagrant ?

rohitbordia (Wed, 05 Apr 2017 20:10:28 GMT):
yes on macbook

rickr (Wed, 05 Apr 2017 20:11:26 GMT):
you CD to sdkintegration dir and start your DC from there

rohitbordia (Wed, 05 Apr 2017 20:12:18 GMT):
no I went to src/test/fixture/src as per the youtube video from tuand

rickr (Wed, 05 Apr 2017 20:12:37 GMT):
does the README.md say that ?

rohitbordia (Wed, 05 Apr 2017 20:13:01 GMT):
aah missed that

rohitbordia (Wed, 05 Apr 2017 20:13:15 GMT):
sorry let me running from sdk

rohitbordia (Wed, 05 Apr 2017 20:17:03 GMT):
Hi Rick, what is the best way to understand how hyperledger is working

rohitbordia (Wed, 05 Apr 2017 20:17:36 GMT):
like, ca, orderer is there any document or video I should look for?

rohitbordia (Wed, 05 Apr 2017 20:19:10 GMT):
with sdkintegration it works perfect

rickr (Wed, 05 Apr 2017 20:19:32 GMT):
https://wiki.hyperledger.org/ starter

rohitbordia (Wed, 05 Apr 2017 20:20:54 GMT):
thanks for your help, Im able to run java sdk and its example

rickr (Wed, 05 Apr 2017 20:21:15 GMT):
sure glad to hear it

AvN (Wed, 05 Apr 2017 21:06:55 GMT):
Is the latest build broken ?

AvN (Wed, 05 Apr 2017 21:07:37 GMT):
git clone http://gerrit.hyperledger.org/r/fabric-sdk-java mvn clean install gives the following errors fabric-sdk-java/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java:[30,57] package org.hyperledger.fabric.protos.common.MspPrincipal does not exist

rickr (Wed, 05 Apr 2017 21:29:43 GMT):
there's a bending fix

rickr (Wed, 05 Apr 2017 21:30:14 GMT):
I think it's now merged .. do a refresh

AvN (Wed, 05 Apr 2017 21:36:40 GMT):
Build is fixed. But I am still not able to run the End2End test java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:1972) at org.hyperledger.fabric.sdk.Chain.sendInstantiationProposal(Chain.java:1142) at org.hyperledger.fabric.sdkintegration.End2endIT.runChain(End2endIT.java:271) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Error creating container: no such image

rickr (Wed, 05 Apr 2017 21:38:17 GMT):
you have fabric/ca build at the readme.md level ?

AvN (Wed, 05 Apr 2017 23:15:00 GMT):
I am not familiar with vagrant. I am using the docker file in fabric-sdk-java/src/test/fixture/sdkintegration

rickr (Wed, 05 Apr 2017 23:23:05 GMT):
Are you building the docker images ?

rickr (Wed, 05 Apr 2017 23:23:20 GMT):
both fabric and fabric-ca ?

ranjan008 (Thu, 06 Apr 2017 07:41:38 GMT):
@rickr one fabric internal ques if you don't mind .... Is sbft works along with kafka and zookeerper or it is a different ordering algorithm as a whole ?

rickr (Thu, 06 Apr 2017 11:47:52 GMT):
sbft :confused:

rickr (Thu, 06 Apr 2017 11:47:52 GMT):
sbft :confused: The HLJSKD should work with any ordering system solo, kafak et al. If you have a fabric side question the best channel to probably ask that on is #fabric

shsedghi (Thu, 06 Apr 2017 15:06:49 GMT):
[10 7 79 114 103 50 77 83 80 18 197 5 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 66 51 106 67 67 65 89 83 103 65 119 73 66 65 103 73 85 67 73 86 108 85 115 84 76 77 57 48 55 77 47 48 55 77 74 76 117 47 47 76 71 85 76 52 119 67 103 89 73 75 111 90 73 122 106 48 69 65 119 73 119 10 89 68 69 76 77 65 107 71 65 49 85 69 66 104 77 67 86 86 77 120 69 122 65 82 66 103 78 86 66 65 103 84 67 107 78 104 98 71 108 109 98 51 74 117 97 87 69 120 70 106 65 85 66 103 78 86 66 65 99 84 68 86 78 104 10 98 105 66 71 99 109 70 117 89 50 108 122 89 50 56 120 69 84 65 80 66 103 78 86 66 65 111 84 67 72 66 108 90 88 74 80 99 109 99 121 77 82 69 119 68 119 89 68 86 81 81 68 69 119 104 119 90 87 86 121 84 51 74 110 10 77 106 65 101 70 119 48 120 78 122 65 48 77 68 85 121 77 68 65 50 77 68 66 97 70 119 48 120 79 68 65 122 77 68 85 119 78 68 65 50 77 68 66 97 77 66 65 120 68 106 65 77 66 103 78 86 66 65 77 84 66 87 70 107 10 98 87 108 117 77 70 107 119 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 78 43 89 117 106 99 86 118 108 97 57 74 79 47 120 85 104 84 79 104 102 73 113 122 10 77 97 54 48 73 89 74 83 77 73 47 109 83 57 43 65 97 75 108 81 57 117 103 77 68 100 106 114 97 65 74 85 53 67 48 49 81 115 70 71 71 88 78 70 118 97 79 57 76 53 90 106 78 86 52 57 99 84 100 76 102 54 78 115 10 77 71 111 119 68 103 89 68 86 82 48 80 65 81 72 47 66 65 81 68 65 103 73 69 77 65 119 71 65 49 85 100 69 119 69 66 47 119 81 67 77 65 65 119 72 81 89 68 86 82 48 79 66 66 89 69 70 71 76 71 82 72 49 104 10 86 47 54 77 53 81 83 111 88 57 101 112 49 68 55 122 66 108 117 86 77 67 115 71 65 49 85 100 73 119 81 107 77 67 75 65 73 74 97 57 116 88 57 79 43 57 122 121 65 97 74 112 105 90 54 48 102 105 112 122 43 55 99 111 10 114 104 84 85 102 81 49 97 43 51 88 100 54 110 72 101 77 65 111 71 67 67 113 71 83 77 52 57 66 65 77 67 65 48 103 65 77 69 85 67 73 81 68 84 89 47 77 104 88 77 77 53 105 82 80 74 81 70 79 67 98 76 82 121 10 109 51 103 47 116 53 53 122 112 111 89 85 66 84 113 47 107 119 49 103 77 81 73 103 79 47 105 114 115 51 119 111 51 87 48 74 47 76 48 54 90 115 54 67 54 118 89 90 85 116 104 51 84 105 49 117 110 108 73 120 112 106 90 75 10 56 112 77 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10]

rickr (Thu, 06 Apr 2017 15:16:47 GMT):
@shsedghi please delete ^^^

shsedghi (Thu, 06 Apr 2017 17:51:57 GMT):
sorry did not know when this happend

rickr (Thu, 06 Apr 2017 17:56:20 GMT):
np

AvN (Thu, 06 Apr 2017 23:07:24 GMT):
image: hyperledger/fabric-peer:x86_64-1.0.0-alpha image: hyperledger/fabric-couchdb:x86_64-1.0.0-alpha image: hyperledger/fabric-orderer:x86_64-1.0.0-alpha image: hyperledger/fabric-ca:x86_64-1.0.0-alpha

AvN (Thu, 06 Apr 2017 23:07:47 GMT):
These are the docker images I am using. The latest docker images dont seem to work

AvN (Thu, 06 Apr 2017 23:08:31 GMT):
I am using the ones published to the public repository https://hub.docker.com/u/hyperledger/

rohitbordia (Thu, 06 Apr 2017 23:25:00 GMT):
AvN, did you took the docker images using the script

rohitbordia (Thu, 06 Apr 2017 23:25:27 GMT):
I downloaded all images from : https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/download-dockerimages.sh

rohitbordia (Thu, 06 Apr 2017 23:26:15 GMT):
then ran : fabric-sdk-java/src/test/fixture/sdkintegration , docker-compose -f docker-compose.yaml up

rohitbordia (Thu, 06 Apr 2017 23:26:49 GMT):
and Ran end2End test and it worked

xiangyw (Fri, 07 Apr 2017 01:30:33 GMT):
@rickr hi rickr, i am test End2endIT with docker-compose.yaml under fabric-sdk-java/src/test/fixture/sdkintegration, all images are x86_64-1.0.0-alpha, 2 install requests are Successful+verified until now, but instantiateProposalRequest timeout, i saw the following error in chaincode container's logs, can you give me some suggestion?

xiangyw (Fri, 07 Apr 2017 01:30:45 GMT):

Message Attachments

xiangyw (Fri, 07 Apr 2017 01:31:48 GMT):

Message Attachments

rickr (Fri, 07 Apr 2017 01:32:15 GMT):
I don't run with alpha. I never have. Please follow the readme.md or maybe someone else here can help you.

xiangyw (Fri, 07 Apr 2017 01:33:15 GMT):
thanks anyway

rickr (Fri, 07 Apr 2017 01:34:57 GMT):
I think most people have been able to follow it and get it to work.

xuanyue202 (Fri, 07 Apr 2017 02:16:22 GMT):
Hi guys, is this sdk for both application and chaincode?

rickr (Fri, 07 Apr 2017 02:21:15 GMT):
The first paragraph of the README.md may help -- get back if it doesn't

AvN (Fri, 07 Apr 2017 03:30:44 GMT):
If you dont want to build fabric, and instead want to rely on the fabric images, whatever Rohit suggested works fine. https://github.com/hyperledger/fabric/blob/master/examples/e2e_cli/download-dockerimages.sh sh download-dockerimages.sh Will download all the necessary docker images and tag them as the latest. docker-compose up --force-recreate should start the peers and orderers

xiangyw (Fri, 07 Apr 2017 03:31:11 GMT):

Message Attachments

JayXie (Fri, 07 Apr 2017 03:38:42 GMT):
Has joined the channel.

kaz (Fri, 07 Apr 2017 04:00:57 GMT):
Has joined the channel.

xuanyue202 (Fri, 07 Apr 2017 06:29:09 GMT):
@rickr but when I try to use the sdk to write chaincode and run, it throws the err: "Sent GOAWAY: lastStreamId '0', errorCode '1', debugData 'First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002'. Forcing shutdown of the connection." I am using the lastest commit of fabric-sdk-java master, and recommended commit of fabric in README.md

o.o. (Fri, 07 Apr 2017 07:48:36 GMT):
Does someone know what `Sending proposal to peer_0 failed because of gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP Org1MSP is unknown, cause=null}` means. It happens as I try to do a _init_ instantiateproposal. I have an MSP with id _Org1MSP, and I set this as mspid for the user so that enrolling works (admin user).

o.o. (Fri, 07 Apr 2017 07:48:36 GMT):
Does someone know what `Sending proposal to peer_0 failed because of gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP Org1MSP is unknown, cause=null}` means. It happens as I try to do a _init_ instantiateproposal. I have an MSP with id _Org1MSP_, and I set this as mspid for the user so that enrolling works (admin user).

o.o. (Fri, 07 Apr 2017 07:52:10 GMT):
Should the user not have just a string with the MSP definition ID?

o.o. (Fri, 07 Apr 2017 07:52:10 GMT):
Should the user not have just a string as mspid with the MSP definition ID?

o.o. (Fri, 07 Apr 2017 07:52:10 GMT):
Should the user not have just a string as mspid with the MSP definition ID?

sangramkhaire (Fri, 07 Apr 2017 08:28:30 GMT):
Has joined the channel.

gujx (Fri, 07 Apr 2017 10:22:49 GMT):
Has joined the channel.

o.o. (Fri, 07 Apr 2017 11:02:19 GMT):
I might have used the wrong one of `join/addPeer` when doing construct-chain; or perhaps used the wrong files as genesis .block and channel .tx.

rickr (Fri, 07 Apr 2017 12:26:53 GMT):
ok so it sounds like you resolve your issue.

rickr (Fri, 07 Apr 2017 12:26:53 GMT):
ok so it sounds like you resolved your issue.

rickr (Fri, 07 Apr 2017 12:32:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xpDZ8GKmxPaHfJQgp) @xuanyue202 I have never seen that msg before. Did you first try to run the end2endIIT test as suggested in the readme.md to see if your setup is working ? I would recommend always doing that each time anyone gets the sdk to make sure your env. is ok and then move on to writing your own chain code

o.o. (Fri, 07 Apr 2017 16:16:16 GMT):
How do I parse the large box of hex number pairs in a thing that looks like `Peer Identity [0a 07 4f ... ]`?

o.o. (Fri, 07 Apr 2017 16:16:16 GMT):
How do I parse the large box of hex number pairs in a thing that looks like `Peer Identity [0a 07 4f ... ]`? (As given in peer logging)

rohitbordia (Fri, 07 Apr 2017 18:32:50 GMT):
@rick: If i deploy the README to a unix box

rohitbordia (Fri, 07 Apr 2017 18:33:52 GMT):
what changes wil i need to do make to run test from my machine to the containers running in unix box

ibmmqmet (Sat, 08 Apr 2017 11:10:25 GMT):
Has joined the channel.

rickr (Sat, 08 Apr 2017 12:55:00 GMT):
If you're asking how you can get the test to run against another system then look at the `defaultProperty ` in `src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java`

rickr (Sat, 08 Apr 2017 12:55:00 GMT):
If you're asking how you can get the test to run against another system then look at the `defaultProperty ` in `src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java` probably all the localhost references will need changing

Adeel Qureshi (Sat, 08 Apr 2017 15:12:48 GMT):
Has joined the channel.

king3000 (Mon, 10 Apr 2017 01:52:56 GMT):
Has joined the channel.

peter.kalambet (Mon, 10 Apr 2017 11:06:47 GMT):
Has joined the channel.

kimmokh (Mon, 10 Apr 2017 11:36:41 GMT):
Has joined the channel.

zian (Mon, 10 Apr 2017 14:02:25 GMT):
Has joined the channel.

in0rdr (Mon, 10 Apr 2017 14:25:22 GMT):
Has joined the channel.

clempo (Mon, 10 Apr 2017 15:33:42 GMT):
Has joined the channel.

clempo (Mon, 10 Apr 2017 15:35:04 GMT):
I am trying to start the environment to be able to run the end2end integration tests.cp10710@devdc2:/opt/gopath/src/github.com/hyperledger/fabric-sdk-java/src/test/fixture/sdkintegration$ docker-compose up

clempo (Mon, 10 Apr 2017 15:35:49 GMT):
and I get this error ERROR: for couchdb Cannot create container for service couchdb: Conflict. The container name "/couchdb" is already in use by container aced3b3753c2ad34ff121184c9dac42048d067983d95aa081842fd85cf09ff7f. You have to remove (or rename) that container to be able to reuse that name.

clempo (Mon, 10 Apr 2017 15:36:44 GMT):
I downloaded the images with /opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/download-dockerimages.sh

rickr (Mon, 10 Apr 2017 15:38:30 GMT):
I'd recommend following the readme.md never worked with script

clempo (Mon, 10 Apr 2017 15:39:27 GMT):
I am not familiar with vagrant. Isn't vagrant supposed to be deprecated in v1.0

clempo (Mon, 10 Apr 2017 15:43:08 GMT):
alright then, how do I clean up my environment so I can start again from the readme

clempo (Mon, 10 Apr 2017 15:46:50 GMT):
Do I need to run build/bin/configtxgen the first time I run the tests, or that's just when I create a new channel for my work?

rickr (Mon, 10 Apr 2017 15:47:14 GMT):
No -- you really don't strictly need vagrant if you can build it natively

clempo (Mon, 10 Apr 2017 15:47:39 GMT):
I did rebuild all of fabric

rickr (Mon, 10 Apr 2017 15:47:43 GMT):
And no v1.0 still and will support vagarant buidl

clempo (Mon, 10 Apr 2017 15:48:09 GMT):
it complained about the "latest" image

clempo (Mon, 10 Apr 2017 15:48:22 GMT):
still learning docker, so I found that script that also did it for me

clempo (Mon, 10 Apr 2017 15:51:46 GMT):
Do you plan to make the integration tests self-contained instead of relying on a pre-existing environment?

rickr (Mon, 10 Apr 2017 15:53:57 GMT):
The `integration` tests rely on a fabric and fabric_ca they are also fairly complete examples of using the sdk. So I see no change in that

clempo (Mon, 10 Apr 2017 15:55:02 GMT):
That's unfortunate. I find the java sdk easy to learn but setting up a running fabric environment very difficult

rickr (Mon, 10 Apr 2017 15:55:45 GMT):
Well what would you do with the SDK with without anything to run it against ?

clempo (Mon, 10 Apr 2017 15:56:19 GMT):
I would have the tests start the environment it needs

clempo (Mon, 10 Apr 2017 15:57:01 GMT):
That would give an example to build upon

rickr (Mon, 10 Apr 2017 16:00:36 GMT):
If someone is committed to doing they're welcome to give it a shot.

rickr (Mon, 10 Apr 2017 16:03:37 GMT):
The direction will probably be more like publishing fabric/fabric_ca images to docker that we know works with the sdk that have past the integration test along with snapshot images of the sdk to maven

clempo (Mon, 10 Apr 2017 16:10:12 GMT):
This page explains how to solve my problem with the zombie container http://www.dedoimedo.com/computers/docker-create-remove-named-container-fix.html

clempo (Mon, 10 Apr 2017 16:10:22 GMT):
docker rm

clempo (Mon, 10 Apr 2017 16:10:34 GMT):
now I can start the environment

clempo (Mon, 10 Apr 2017 16:19:15 GMT):
and the integration tests ran successfully

rohitbordia (Mon, 10 Apr 2017 17:55:40 GMT):
@rickr: thanks, I ran docker-compose in another system .. Didnt change anything the container can be accessed by localhost

rohitbordia (Mon, 10 Apr 2017 17:56:03 GMT):
Im thinking I need to add host in docker-compose so that it uses system port

pschnap (Mon, 10 Apr 2017 18:07:31 GMT):
It looks like to build the SDK you have to have exactly v3.0.0 of protoc?

pschnap (Mon, 10 Apr 2017 19:30:23 GMT):
protoc does not seem to be running to generate the java code form the proto stuff, how can I get it to generate these files?

rickr (Mon, 10 Apr 2017 19:31:39 GMT):
what's the command you're using

pschnap (Mon, 10 Apr 2017 19:32:45 GMT):
I'm not calling it manually, I thought the mvn stuff was supposed to take care of that (correct me if I'm wrong); I had to change the dependency on protoc to 3.2 since that's what I have installed and that seemed to work, but after I cleaned it went back to not finding (some of?) the generated files

pschnap (Mon, 10 Apr 2017 19:33:26 GMT):
I was just calling mvn install but that's erroring on the tests, I don't know if that affects anything

rickr (Mon, 10 Apr 2017 19:33:51 GMT):
should not have to change anything to first run the integration tests

pschnap (Mon, 10 Apr 2017 19:34:16 GMT):
the orderer/peer need to be running for the tests to complete, I assume?

rickr (Mon, 10 Apr 2017 19:34:57 GMT):
for the integration test .. have read over the readme.md .. ?

pschnap (Mon, 10 Apr 2017 19:36:18 GMT):
weird, the "readme.md" link sent me to some weird site

rickr (Mon, 10 Apr 2017 19:36:51 GMT):
should be on your disk

pschnap (Mon, 10 Apr 2017 19:37:08 GMT):
I read some of the readme on github but did only skim a majority of it

pschnap (Mon, 10 Apr 2017 19:37:29 GMT):
I'm running my peer inside an ubuntu VM, not using the std vagrant environment

rickr (Mon, 10 Apr 2017 19:37:40 GMT):
that should be ok

rickr (Mon, 10 Apr 2017 19:38:09 GMT):
have you built the fabric and fabric_ca creating the docker images ?

rickr (Mon, 10 Apr 2017 19:39:04 GMT):
without changing a single thing if you in the sdk directory do `mvn clean install` what happens

pschnap (Mon, 10 Apr 2017 19:39:05 GMT):
haven't built the fabric_ca

pschnap (Mon, 10 Apr 2017 19:39:41 GMT):
the fabric seems to fail at some point due to incompatible docker-compose versions, though I can still run the orderer and peer

pschnap (Mon, 10 Apr 2017 19:40:43 GMT):
`mvn clean install` succeeded even though a bunch of exception traces were shown

rickr (Mon, 10 Apr 2017 19:40:55 GMT):
y normal

rickr (Mon, 10 Apr 2017 19:41:51 GMT):
next step is to build the fabric and ca ..

pschnap (Mon, 10 Apr 2017 19:42:27 GMT):
ok, I'll work on that; thank you very much for your help @rickr !

rickr (Mon, 10 Apr 2017 19:43:31 GMT):
others have been able to pull the images from somewhere wo building if you read back.. but you're own your own

rickr (Mon, 10 Apr 2017 19:43:31 GMT):
others have been able to pull the images from somewhere wo building if you read back.. but you're on your own

pschnap (Mon, 10 Apr 2017 19:43:56 GMT):
hm, hadn't though of that

pschnap (Mon, 10 Apr 2017 19:44:12 GMT):
may give it a try

pschnap (Mon, 10 Apr 2017 19:44:17 GMT):
thanks!

rohitbordia (Tue, 11 Apr 2017 00:02:30 GMT):
has anyone came across this error

rohitbordia (Tue, 11 Apr 2017 00:02:30 GMT):
Fatal error when setting up MSP from directory /etc/hyperledger/msp/peer/: err Could not load a valid signer certificate from directory /etc/hyperledger/msp/peer/signcerts, err Could not read directory open /etc/hyperledger/msp/peer/signcerts: no such file or directory, err /etc/hyperledger/msp/peer/signcerts

rickr (Tue, 11 Apr 2017 00:17:13 GMT):
the setup of the docker-compose in the sdk mounts directory that map to the msp needed. That should be there if you have the whole sdkintegration directory with it's docker-compose and you're starting it from there.

rickr (Tue, 11 Apr 2017 00:18:15 GMT):
by _whole_ it should in include all it sub directories too.

medlahbib (Tue, 11 Apr 2017 11:23:52 GMT):
Has joined the channel.

medlahbib (Tue, 11 Apr 2017 11:24:31 GMT):
hi , I am trying to work with Java Sdk but when i was trying to build the Java SDK project i have this error with all classes inside `org.hyperledger.fabric.protos` they doesn't even exist in my project `The import org.hyperledger.fabric.protos cannot be resolved`

nickmelis (Tue, 11 Apr 2017 12:37:58 GMT):
have you tried to build the SDK first?

nickmelis (Tue, 11 Apr 2017 13:12:19 GMT):
does anyone know if Java SDK 0.6 works with SSL?

nickmelis (Tue, 11 Apr 2017 13:12:29 GMT):
and if not, will it be supported by 1.0?

rickr (Tue, 11 Apr 2017 13:17:26 GMT):
TLS is working with v1.0 of the sdk. Generally it's not enabled if you just run the integration suite but during our verify builds we do it have it enabled

nickmelis (Tue, 11 Apr 2017 13:27:49 GMT):
great news @rickr. Do you have any idea if it was supported in v0.6 too?

rickr (Tue, 11 Apr 2017 13:36:48 GMT):
Wasn't on board then.

nickmelis (Tue, 11 Apr 2017 13:58:43 GMT):
ah right ok! thanks for the info!

clempo (Tue, 11 Apr 2017 15:37:55 GMT):
I am studying End2endAndBackAgainIT to learn how to create a ChainCodeID. In the file org.hyperledger.fabric.protos.peer.ChainCode, it says

clempo (Tue, 11 Apr 2017 15:37:56 GMT):
*ChaincodeID contains the path as specified by the deploy transaction *that created it as well as the hashCode that is generated by the *system for the path. From the user level (ie, CLI, REST API and so on) *deploy transaction is expected to provide the path and other requests *are expected to provide the hashCode. The other value will be ignored. *Internally, the structure could contain both values. For instance, the *hashCode will be set when first generated using the path

clempo (Tue, 11 Apr 2017 15:38:22 GMT):
In the sample, it sets both the name and the path and the name does not like a hash

clempo (Tue, 11 Apr 2017 15:38:31 GMT):
which one is more correct?

clempo (Tue, 11 Apr 2017 15:39:13 GMT):
This is what it says for getName

clempo (Tue, 11 Apr 2017 15:39:14 GMT):
*all other requests will use the name (really a hashcode) generated by *the deploy transaction * * * optional string name = 2; */ public java.lang.String getName() {

rickr (Tue, 11 Apr 2017 15:39:38 GMT):
where is that it state that about the hash ..I think that's out of date

rickr (Tue, 11 Apr 2017 15:40:00 GMT):
I suggest to follow the End2endIT example

rickr (Tue, 11 Apr 2017 15:40:05 GMT):
what really works

clempo (Tue, 11 Apr 2017 15:43:23 GMT):
End2EndAndBackAgainIT is better for me because I do not want to install a new chaincode. I'm really grateful the two use cases are there.

rickr (Tue, 11 Apr 2017 15:44:26 GMT):
can you tell me where that hash statement came from so I can if necessary clean it up

clempo (Tue, 11 Apr 2017 15:44:44 GMT):
>>> In the file org.hyperledger.fabric.protos.peer.ChainCode

clempo (Tue, 11 Apr 2017 15:45:00 GMT):
That file resides in target/generated-sources

clempo (Tue, 11 Apr 2017 15:46:21 GMT):
Can the name and path of a chain code ID be arbitrary values, or they need to match something with the actual chain code

rickr (Tue, 11 Apr 2017 15:47:00 GMT):
In general unless your doing a real deepdive into hyperledger I would recommend staying away from proto or generated code ... The SDK tries to hide that complexitiy .. and to be honest the proto description are not up to date

clempo (Tue, 11 Apr 2017 15:48:08 GMT):
OK, but the layer in the SDK was not informative what the name and path should be

clempo (Tue, 11 Apr 2017 15:48:26 GMT):
For example, my first question was whether I needed a copy of the chain code source code in every caller

clempo (Tue, 11 Apr 2017 15:48:36 GMT):
the proto layer seems to say no

clempo (Tue, 11 Apr 2017 15:49:33 GMT):
and the path does not seem related to the source code path since that's a different field

rickr (Tue, 11 Apr 2017 15:50:47 GMT):
``` InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chainCodeID); ////For GO language and serving just a single user, chaincodeSource is mostly likely the users GOPATH installProposalRequest.setChaincodeSourceLocation(new File(TEST_FIXTURES_PATH + "/sdkintegration/gocc/sample1")); installProposalRequest.setChaincodeVersion(CHAIN_CODE_VERSION);`` ``

clempo (Tue, 11 Apr 2017 15:51:20 GMT):
yes, that's where I discovered the path and source path are not the same thing

clempo (Tue, 11 Apr 2017 15:51:31 GMT):
this is not obvious at first

rickr (Tue, 11 Apr 2017 15:52:06 GMT):
the Chaincode ID can be any thing but I'd stick to alphanumerics same with version

clempo (Tue, 11 Apr 2017 15:52:43 GMT):
I assume the convention will be to use domain names as part of the path like Java does for packages

clempo (Tue, 11 Apr 2017 15:52:52 GMT):
part -> path

clempo (Tue, 11 Apr 2017 15:56:04 GMT):
ignore the mistyped "part -> path"

rickr (Tue, 11 Apr 2017 15:56:34 GMT):
at the moment Java chain is not working .. once it does I'll have an update that will show how to deploy it.

clempo (Tue, 11 Apr 2017 15:58:32 GMT):
Nice to know. I'm working on the client side for now. Any chaincode will do. So I'm fine.

rickr (Tue, 11 Apr 2017 15:59:25 GMT):
for GO the sourcelocation will be the root where we tar from. But only files in that are tared up are chaincodeSourceLocation /chainCodeID.path any libraries needed have to be vendorized

clempo (Tue, 11 Apr 2017 16:01:31 GMT):
OK. I'm not there yet. I figured out the ChainCodeID. Next is to figure out which parms I need to configure a User. I'll study this more and come back if I need help.

clempo (Tue, 11 Apr 2017 16:01:33 GMT):
Thanks

rickr (Tue, 11 Apr 2017 16:02:20 GMT):
IMO best look at both samples see what they do look at how the CC is layed out too

rohitbordia (Tue, 11 Apr 2017 17:13:07 GMT):
does anyone know why we need hyperledger/fabric-baseos:x86_64-0.3.0

rohitbordia (Tue, 11 Apr 2017 17:13:48 GMT):
while running the test case from sdkintegration , I see my test case is failing 2017-04-11 17:10:42.579 UTC [dockercontroller] deployImage -> ERRO 642 Image Output: peer0 | ******************** peer0 | Step 1/3 : FROM hyperledger/fabric-baseos:x86_64-0.3.0 peer0 | peer0 | ********************

samdeir (Tue, 11 Apr 2017 17:24:04 GMT):
why when i pull the SDK its full of compile errors!

rickr (Tue, 11 Apr 2017 17:24:49 GMT):
how'd you compile it ?

samdeir (Tue, 11 Apr 2017 17:24:56 GMT):
lot of imports are not there

samdeir (Tue, 11 Apr 2017 17:25:07 GMT):
i use intillij

samdeir (Tue, 11 Apr 2017 17:25:09 GMT):
maven

samdeir (Tue, 11 Apr 2017 17:25:19 GMT):
it worked like 2 weeks ago

rickr (Tue, 11 Apr 2017 17:25:36 GMT):
what are the errors ?

rickr (Tue, 11 Apr 2017 17:25:51 GMT):
There have been breaking updates

samdeir (Tue, 11 Apr 2017 17:26:18 GMT):
import org.hyperledger.fabric.protos.msp.Identities; import org.hyperledger.fabric.protos.peer.Chaincode; import org.hyperledger.fabric.protos.peer.FabricProposal; import org.hyperledger.fabric.protos.peer.FabricProposalResponse;

samdeir (Tue, 11 Apr 2017 17:26:25 GMT):
on many files

samdeir (Tue, 11 Apr 2017 17:26:51 GMT):
it seems the protos package is gone

rickr (Tue, 11 Apr 2017 17:27:00 GMT):
from the sdk directory what happens if you do a mvn clean install

rickr (Tue, 11 Apr 2017 17:27:38 GMT):
is there finally a build success msg ?

samdeir (Tue, 11 Apr 2017 17:28:28 GMT):
[INFO] 31 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.277 s [INFO] Finished at: 2017-04-11T13:27:41-04:00 [INFO] Final Memory: 29M/592M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project fabric-sdk-java: Compilation failure: Compilation failure: [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[49,22] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[54,28] package ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[65,49] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[108,26] package FabricProposal does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[115,83] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[115,27] package FabricProposal does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[159,76] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[159,115] package ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[159,13] cannot find symbol [ERROR] symbol: class ChaincodeInvocationSpec [ERROR] location: class org.hyperledger.fabric.sdk.transaction.ProposalBuilder [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[223,48] package ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[54,56] package ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[93,40] package Chaincode.ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[93,76] package Chaincode.ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[118,9] cannot find symbol [ERROR] symbol: class ChaincodeHeaderExtension [ERROR] location: class org.hyperledger.fabric.sdk.transaction.ProposalBuilder [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-

samdeir (Tue, 11 Apr 2017 17:30:55 GMT):
[ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[49,22] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[54,28] package ChaincodeSpec does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[65,49] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[108,26] package FabricProposal does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[115,83] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[115,27] package FabricProposal does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[159,76] package Chaincode does not exist [ERROR] /home/ubuntub/IdeaProjects/fabric-sdk-java-new/src/main/java/org/hyperledger/fabric/sdk/transaction/ProposalBuilder.java:[159,115] package ChaincodeSpec does not exist

rickr (Tue, 11 Apr 2017 17:31:51 GMT):
can you download a fresh copy from git and and do that ?

samdeir (Tue, 11 Apr 2017 17:32:36 GMT):
i just did that 30 min ago, is there a newer one?

rickr (Tue, 11 Apr 2017 17:32:41 GMT):
no

samdeir (Tue, 11 Apr 2017 17:32:54 GMT):
then this is the latest

samdeir (Tue, 11 Apr 2017 17:33:31 GMT):
just downloaded the latest and compiled and that what i have

samdeir (Tue, 11 Apr 2017 17:33:46 GMT):
i'm still working on an old one that works fine

rickr (Tue, 11 Apr 2017 17:37:36 GMT):
not sure what's going on in your environment .. Just to make sure I just did a fresh git clone from github and it built ok

rickr (Tue, 11 Apr 2017 17:38:05 GMT):
right now you're the only one I know of that's reporting this

samdeir (Tue, 11 Apr 2017 17:38:22 GMT):
are you using this git https://github.com/hyperledger/fabric-sdk-java.git

rickr (Tue, 11 Apr 2017 17:39:00 GMT):
$git clone git@github.com:hyperledger/fabric-sdk-java.git

rickr (Tue, 11 Apr 2017 17:46:01 GMT):
http://www.heypasteit.com/clip/02RDXB

rickr (Tue, 11 Apr 2017 17:46:50 GMT):
src/main find -type f | xargs sum

rickr (Tue, 11 Apr 2017 17:52:02 GMT):
build failed https://gerrit.hyperledger.org/r/#/c/7933/

samdeir (Tue, 11 Apr 2017 17:59:14 GMT):
Thanks

samdeir (Tue, 11 Apr 2017 17:59:36 GMT):
i'll get new Vm and clone the code on it

rickr (Tue, 11 Apr 2017 18:00:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iDPWRXo53hA68DJ6J) Just to be clear that was on a development build .. not what's in github Actually posted it in the wrong chat. Too many balls up in the air

samdeir (Tue, 11 Apr 2017 18:06:49 GMT):
got it, for some reason it didn't generate the sources

samdeir (Tue, 11 Apr 2017 18:06:54 GMT):
not it works fine

samdeir (Tue, 11 Apr 2017 18:07:04 GMT):
thanks for clearing things up

clempo (Tue, 11 Apr 2017 19:00:39 GMT):
User.getAccount() is never called, is that a bug in the User interface or in the rest of the SDK?

clempo (Tue, 11 Apr 2017 19:01:10 GMT):
I found this comment in PeerClientTest

clempo (Tue, 11 Apr 2017 19:01:12 GMT):
128: // //registrationRequest.setAccount(); TODO setAccount missing from registrationRequest?

rickr (Tue, 11 Apr 2017 19:05:16 GMT):
The SDK is still WIP :) That will come into play when we support Tcerts. Are you experiencing a bug with that

clempo (Tue, 11 Apr 2017 19:06:37 GMT):
no bug, more a documentation bug

clempo (Tue, 11 Apr 2017 19:06:51 GMT):
what is the affiliation and account used for

clempo (Tue, 11 Apr 2017 19:07:05 GMT):
I have not seen those in typical User ifaces

rickr (Tue, 11 Apr 2017 19:07:13 GMT):
as I said above

clempo (Tue, 11 Apr 2017 19:08:25 GMT):
still confused, what is the affiliation and account used for in Tcert support

rickr (Tue, 11 Apr 2017 19:08:33 GMT):
y

clempo (Tue, 11 Apr 2017 19:09:02 GMT):
I have to expose parameters to let my users make chaincode call

clempo (Tue, 11 Apr 2017 19:09:09 GMT):
what do I tell them these are for?

clempo (Tue, 11 Apr 2017 19:09:53 GMT):
so they know how to fill it in

rickr (Tue, 11 Apr 2017 19:10:30 GMT):
Right now just view them as optional that should not set/use

clempo (Tue, 11 Apr 2017 19:10:54 GMT):
ok, I will not expose them for now

rickr (Tue, 11 Apr 2017 19:11:12 GMT):
name and enrollement is what's important at this moment

clempo (Tue, 11 Apr 2017 19:11:33 GMT):
yes, I will assume my users are already registered

clempo (Tue, 11 Apr 2017 19:11:50 GMT):
the user gets the enrollment from the sys admin?

rickr (Tue, 11 Apr 2017 19:13:56 GMT):
Look at the flow from End2endIt ... admin can register other users with FabricCA ... the user then enrolls that gets him an Enrollement

clempo (Tue, 11 Apr 2017 19:14:33 GMT):
yes, I saw that, but that's within a single program acting as many participants

clempo (Tue, 11 Apr 2017 19:14:48 GMT):
in real life, there is a human user in a separate client program

clempo (Tue, 11 Apr 2017 19:15:01 GMT):
where does the human get the enrollment from?

clempo (Tue, 11 Apr 2017 19:15:15 GMT):
that looks like a long password that he can't remember

rickr (Tue, 11 Apr 2017 19:16:12 GMT):
We're just the messenger :) :

clempo (Tue, 11 Apr 2017 19:16:53 GMT):
I expected you would it is the app responsibility, but I would appreciate guidance

clempo (Tue, 11 Apr 2017 19:17:07 GMT):
is the enrollment typable or it's binary?

clempo (Tue, 11 Apr 2017 19:17:28 GMT):
would -> would say

clempo (Tue, 11 Apr 2017 19:18:00 GMT):
surely, you have something in mind how this is supposed to be used in real life

clempo (Tue, 11 Apr 2017 19:18:08 GMT):
like, should I store this in ldap

clempo (Tue, 11 Apr 2017 19:18:39 GMT):
should I recompute it each time? query it from the fabric_ca?

clempo (Tue, 11 Apr 2017 19:19:08 GMT):
store it in an encrypted file

clempo (Tue, 11 Apr 2017 19:19:52 GMT):
I assume a user would prefer to type a username/password than a username/enrollment

clempo (Tue, 11 Apr 2017 19:22:41 GMT):
I guess it could be treated like a private key

clempo (Tue, 11 Apr 2017 19:23:01 GMT):
but I'd like to do the same thing the standard fabric GUIs do it

rickr (Tue, 11 Apr 2017 19:23:36 GMT):
you're free to persist for user Enrollment any way you wish. Give a user a username/password to a retrieve it

rickr (Tue, 11 Apr 2017 19:24:45 GMT):
but yes there are security implications it has certs and private keys

clempo (Tue, 11 Apr 2017 19:25:41 GMT):
didn't know it had internal structure

clempo (Tue, 11 Apr 2017 19:25:48 GMT):
probably not accessible

clempo (Tue, 11 Apr 2017 19:26:37 GMT):
are there fabric tools that take enrollment as parameter?

rickr (Tue, 11 Apr 2017 19:27:18 GMT):
Yes and no

clempo (Tue, 11 Apr 2017 19:29:28 GMT):
an enrollment clearly expires if it contains certs

rickr (Tue, 11 Apr 2017 19:29:34 GMT):
EVERYTHING needs to be signed by the user.. all Proposals .. transactions. The SDK does that AND validates responses

clempo (Tue, 11 Apr 2017 19:29:59 GMT):
can you update a user without making it completely new user?

rickr (Tue, 11 Apr 2017 19:30:02 GMT):
are signed by the organizations for that chang

rickr (Tue, 11 Apr 2017 19:30:02 GMT):
are signed by the organizations for that chain

clempo (Tue, 11 Apr 2017 19:31:14 GMT):
for now, I'll ask my users to tell the path to a file that contains the enrollment, we may improve that later

clempo (Tue, 11 Apr 2017 19:32:02 GMT):
is it possible to update the keys of a user when his cert expires?

clempo (Tue, 11 Apr 2017 19:32:55 GMT):
what happens to the old stuff he signed?

rickr (Tue, 11 Apr 2017 19:35:01 GMT):
org/hyperledger/fabric_ca/sdkintegration/HFCAClientEnrollIT.java ?

clempo (Tue, 11 Apr 2017 19:35:17 GMT):
I'll take a look

clempo (Tue, 11 Apr 2017 19:37:04 GMT):
looks like reenroll should do it

rickr (Tue, 11 Apr 2017 19:37:44 GMT):
If you specific question the details of enrollments and user the experts are on the fabric-ca channel

clempo (Tue, 11 Apr 2017 19:38:19 GMT):
I'll take note of that

clempo (Tue, 11 Apr 2017 19:40:22 GMT):
to reconstruct a chain, the code needs to know a lot about the network, peers, orderers...

clempo (Tue, 11 Apr 2017 19:40:39 GMT):
compare that to bittorrent that figures all of it

clempo (Tue, 11 Apr 2017 19:41:10 GMT):
I'm struggling to figure out how to let my users configure all this

clempo (Tue, 11 Apr 2017 19:41:24 GMT):
is there a discovery protocol or one that is planned?

rickr (Tue, 11 Apr 2017 19:41:56 GMT):
more of a question for fabric channel

clempo (Tue, 11 Apr 2017 19:42:32 GMT):
no problem

Lin-YiTang (Tue, 11 Apr 2017 21:20:27 GMT):
Has joined the channel.

karumbas (Wed, 12 Apr 2017 09:54:39 GMT):
Hi @rickr, for each proposal request its required that you setChaiCodeID which is of type ChainCodeID. Previously in fabric 0.6 deploying a chaincode emitted a hash string such that when doing future transaction you reference the hash. Is there such a provision for transaction request to setChainCodeID as a hash string instead of an object which can be saved and reference latter?

karumbas (Wed, 12 Apr 2017 09:54:39 GMT):
Hi @rickr @tuand , for each proposal request its required that you setChaiCodeID which is of type ChainCodeID. Previously in fabric 0.6 deploying a chaincode emitted a hash string such that when doing future transaction you reference the hash. Is there such a provision for transaction request to setChainCodeID as a hash string instead of an object which can be saved and reference latter?

rickr (Wed, 12 Apr 2017 12:02:54 GMT):
The hashing is gone. All you need is name and version. I you like hashing you always have your application do the hashing and use that as the name.

clempo (Wed, 12 Apr 2017 14:24:53 GMT):
I think it would be better if the User iface would return List instead of the concrete List ArrayList

clempo (Wed, 12 Apr 2017 14:24:55 GMT):
ArrayList getRoles();

clempo (Wed, 12 Apr 2017 14:25:09 GMT):
Is there a reason for the concrete type?

ruslan.kryukov (Wed, 12 Apr 2017 14:27:33 GMT):
Hello, I try to create new channel with fabric-sdk but get error: orderer-xxx | 2017-04-12 14:26:03.876 UTC [orderer/common/broadcast] Handle -> WARN 005 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Policy] /Channel/Application/Writers to version 0, but key is at version 0

ruslan.kryukov (Wed, 12 Apr 2017 14:27:33 GMT):
Hello, I try to create new channel with fabric-sdk but get error: ``` orderer-xxx | 2017-04-12 14:26:03.876 UTC [orderer/common/broadcast] Handle -> WARN 005 Rejecting CONFIG_UPDATE because: Error validating DeltaSet: Attempt to set key [Policy] /Channel/Application/Writers to version 0, but key is at version 0 ```

ruslan.kryukov (Wed, 12 Apr 2017 14:29:05 GMT):
I've created channelTx file with configtxgen tool, and I had created genesis-block which assign to orderer

ruslan.kryukov (Wed, 12 Apr 2017 14:29:39 GMT):
- ORDERER_GENERAL_GENESISFILE=/opt/genesis/block.dat - ORDERER_GENERAL_GENESISMETHOD=file

ruslan.kryukov (Wed, 12 Apr 2017 14:30:14 GMT):
but when I call sdk method client.newChain(channelID, orderer, chainConfiguration); it fails

ruslan.kryukov (Wed, 12 Apr 2017 14:30:35 GMT):
channeltx file is created without errors

rickr (Wed, 12 Apr 2017 14:30:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=XJwbk9M5bK2cGHSFT) @clempo sure

clempo (Wed, 12 Apr 2017 14:31:33 GMT):
Do you need a Jira or you can do it on the side?

rickr (Wed, 12 Apr 2017 14:32:12 GMT):
I'll see it gets changed think it should be a Set

swettdj (Wed, 12 Apr 2017 14:59:25 GMT):
Has joined the channel.

clempo (Wed, 12 Apr 2017 16:37:03 GMT):
The SDK expects the user instance to contain the Enrollment, not the enrollment secret.

clempo (Wed, 12 Apr 2017 16:37:16 GMT):
I see no way to retrieve that value after the fact.

clempo (Wed, 12 Apr 2017 16:37:30 GMT):
I could call reenroll() but that creates a new cert

clempo (Wed, 12 Apr 2017 16:38:08 GMT):
The way the integration test suite makes it work is by serializing it into the store

rickr (Wed, 12 Apr 2017 16:38:25 GMT):
ok

clempo (Wed, 12 Apr 2017 16:38:48 GMT):
This is not practical in real life

clempo (Wed, 12 Apr 2017 16:39:07 GMT):
Let's say my customer already has his user and he needs to work with my app from now on

rickr (Wed, 12 Apr 2017 16:39:15 GMT):
you want the to keep the enrollement you need to to persist it

clempo (Wed, 12 Apr 2017 16:40:12 GMT):
that's unfortunate

clempo (Wed, 12 Apr 2017 16:40:31 GMT):
so I can't use an existing user, I have to recreate it

clempo (Wed, 12 Apr 2017 16:40:38 GMT):
at least once

clempo (Wed, 12 Apr 2017 16:41:39 GMT):
that also assumes the user will always be created in Java

clempo (Wed, 12 Apr 2017 16:42:04 GMT):
that's a serious limitation

clempo (Wed, 12 Apr 2017 16:42:58 GMT):
let's assume the other sdk's have that same limitation

clempo (Wed, 12 Apr 2017 16:43:06 GMT):
so a user is bound to a single sdk?

clempo (Wed, 12 Apr 2017 16:44:03 GMT):
if I reenroll(), I bet that revokes the previous cert in the other sdk

clempo (Wed, 12 Apr 2017 16:48:11 GMT):
do you know what the other sdk's are doing? I only know (part of) the Java sdk

rickr (Wed, 12 Apr 2017 16:55:57 GMT):
The Node sdk has an interface that essentialy will call the application back if to store the user .. I don't see a need for that

clempo (Wed, 12 Apr 2017 17:04:23 GMT):
I am not sure I understand their solution. So what is your solution in the Java SDK?

clempo (Wed, 12 Apr 2017 17:04:57 GMT):
Let's say I have apps in Node sdk and Java sdk and I want to use the same user?

clempo (Wed, 12 Apr 2017 17:05:14 GMT):
let's assume the node sdk created the user already

rickr (Wed, 12 Apr 2017 17:18:12 GMT):
Override the node sdk interface to store the certs,keys,username to a file. then Have your java application read that file

clempo (Wed, 12 Apr 2017 17:24:47 GMT):
Are we allowed to unpack an enrollment into its constituents and recreate it?

rickr (Wed, 12 Apr 2017 17:25:31 GMT):
ah it's an interface

clempo (Wed, 12 Apr 2017 17:28:47 GMT):
that would work if the sdk never down casts

rickr (Wed, 12 Apr 2017 17:29:05 GMT):
?

clempo (Wed, 12 Apr 2017 17:29:41 GMT):
that means I could have my own implementation as long as the SDK always refers to it as an iface

clempo (Wed, 12 Apr 2017 17:30:19 GMT):
which is almost certainly what it does

rickr (Wed, 12 Apr 2017 17:30:55 GMT):
really ? where ?

clempo (Wed, 12 Apr 2017 17:31:27 GMT):
I'm saying I don't expect that it casts

clempo (Wed, 12 Apr 2017 17:31:39 GMT):
is HFCAEnrollment a public API?

rickr (Wed, 12 Apr 2017 17:33:47 GMT):
shouldnt need to tamper with it

clempo (Wed, 12 Apr 2017 17:34:16 GMT):
that's the point, can I reuse it

clempo (Wed, 12 Apr 2017 17:34:57 GMT):
some SDK say some classes are there but should be ignored because they are part of the private implementation

rickr (Wed, 12 Apr 2017 17:35:42 GMT):
not tried this but create another object foobar that implements enrollment in the end2endIt ... then copy the need parts to it and run the tests

rickr (Wed, 12 Apr 2017 17:36:00 GMT):
if it breaks I'd be interested

rickr (Wed, 12 Apr 2017 17:37:08 GMT):
have to break off for today .. too many other task at hand

clempo (Wed, 12 Apr 2017 17:37:26 GMT):
alright

rohitbordia (Wed, 12 Apr 2017 20:58:38 GMT):
has anyone tried installing docker images on swarm cluster

rohitbordia (Wed, 12 Apr 2017 20:58:58 GMT):
of fabric, orderer and peer

Gua (Thu, 13 Apr 2017 01:11:18 GMT):
Has joined the channel.

xiangyw (Thu, 13 Apr 2017 03:03:57 GMT):

Message Attachments

xiangyw (Thu, 13 Apr 2017 03:06:39 GMT):
@rickr do you have an idea for this scenario

xiangyw (Thu, 13 Apr 2017 03:14:16 GMT):
revoke my question,i am not update code, there is a example here

o.o. (Thu, 13 Apr 2017 08:53:31 GMT):
Hello! Is there some way to access and modify the _transient_ field of a proposal from the java-sdk?

rickr (Thu, 13 Apr 2017 12:05:56 GMT):
Still a to do

achraf17 (Thu, 13 Apr 2017 12:50:07 GMT):
Has joined the channel.

clempo (Thu, 13 Apr 2017 13:11:13 GMT):
Can you make the HFCAEnrollment constructor public?

clempo (Thu, 13 Apr 2017 13:11:30 GMT):
or it is intentionally package private?

rickr (Thu, 13 Apr 2017 13:24:01 GMT):
intentionally

jimthematrix (Thu, 13 Apr 2017 19:28:29 GMT):
@rickr @sanchezl can you take a look at this one that @Satheesh Kathamuthu submitted to add chaincode event support to the shim? I just checked the current shim still doesn't seem to have chaincode event support. if that's indeed the case, we need to revive this changeset and finish the work

jimthematrix (Thu, 13 Apr 2017 19:28:57 GMT):
(this came about from a ping by @cbf on cleaning up)

sanchezl (Thu, 13 Apr 2017 21:01:25 GMT):
I got that on my list

sanchezl (Thu, 13 Apr 2017 21:01:25 GMT):
I have that on my list

kelvinzhong (Fri, 14 Apr 2017 03:06:00 GMT):
well, i have implement the deserialization of read write set in fabric-sdk-java. if it's needed i could try to find out how to commit the code

zerppen (Fri, 14 Apr 2017 03:26:25 GMT):
Hi, ChaincodeEndorsementPolicy.java import MspPrincipa there is not a class called MspPrincipal in org.hyperledger.fabric.protos.msp,but in org.hyperledger.fabric.protos.common.It is the same class?

zerppen (Fri, 14 Apr 2017 03:30:11 GMT):
Fabric-sdk-java-1.0-SNAPSHOT.jar where the .class file is automatically generated by the grpc protocol or written by the developer If the agreement is automatically generated, then the agreement documents which jar package did not see the corresponding agreement documents. If it is prepared by the developer, that can show the design documents? I think I can do something for javaSDK

king3000 (Fri, 14 Apr 2017 07:13:15 GMT):
Hi, everyone. I have tried the example of sdk-Node. But, I'm not familiar with node.js ,so come to try sdk-java. And I find that "the very latest Hyperledger Fabric builds may not work with this sdk" in the webpage of github of sdk-java. So, how about the progress of sdk-java? And with the release plan SDK-java can has some big progress?

ivanm (Fri, 14 Apr 2017 09:10:28 GMT):
Has joined the channel.

kelvinzhong (Fri, 14 Apr 2017 09:45:39 GMT):
eh... i found an issue in JIRA "FAB-2810 Use proto messages for trasnaction read-write set" and it's marked as done, but seems it's not merged to the master branch yet, and wasted my time to decode it

xuzhao103389 (Fri, 14 Apr 2017 10:09:42 GMT):
Hi

xuzhao103389 (Fri, 14 Apr 2017 10:09:46 GMT):
I am following https://github.com/hyperledger/fabric-sdk-java

xuzhao103389 (Fri, 14 Apr 2017 10:09:59 GMT):
I need to use Project Commit level Date fabric 7eb2cf966f68ac8259357f294d9c8787cec8617b Mar 31 15:59:03 2017 +0000 fabric-ca bad855205b9c9365508965931fc35988eea1a1fd Mar 29 19:28:33 2017 +0000

xuzhao103389 (Fri, 14 Apr 2017 10:10:06 GMT):
but I got error

xuzhao103389 (Fri, 14 Apr 2017 10:10:17 GMT):
[root@xuzhao fabric-ca]# git checkout bad855205b9c9365508965931fc35988eea1a1fd fatal: reference is not a tree: bad855205b9c9365508965931fc35988eea1a1fd [root@xuzhao fabric-ca]#

xuzhao103389 (Fri, 14 Apr 2017 10:10:29 GMT):
who can tell why is this failing

xuzhao103389 (Fri, 14 Apr 2017 10:10:30 GMT):
?

xuzhao103389 (Fri, 14 Apr 2017 10:13:33 GMT):
I have resolved this issue

xuzhao103389 (Fri, 14 Apr 2017 10:13:35 GMT):
thanks

rickr (Fri, 14 Apr 2017 10:55:02 GMT):
``` git clone git@github.com:hyperledger/fabric.git cd fabric git reset --hard 7eb2cf966f68ac8259357f294d9c8787cec8617b ``` ?

xuzhao103389 (Fri, 14 Apr 2017 11:02:09 GMT):
yes

xuzhao103389 (Fri, 14 Apr 2017 11:02:12 GMT):
that is try

xuzhao103389 (Fri, 14 Apr 2017 11:02:15 GMT):
true

xuzhao103389 (Fri, 14 Apr 2017 11:09:08 GMT):
I am using fabric-ca 7eb2cf966f68ac8259357f294d9c8787cec8617b , when doing unit test , failed

xuzhao103389 (Fri, 14 Apr 2017 11:09:17 GMT):
2017/04/14 11:08:12 [INFO] Listening at http://0.0.0.0:7095 FAIL coverage: 91.9% of statements FAIL github.com/hyperledger/fabric-ca/cmd/fabric-ca-server 0.860s error: exit status 1 panic: EOF goroutine 1 [running]: panic(0x4daca0, 0xc42000a1a0) /opt/go/src/runtime/panic.go:500 +0x1a1 main.main() /opt/gopath/src/github.com/AlekSi/gocov-xml/gocov-xml.go:60 +0x15fd *** END FAILURES *** Makefile:144: recipe for target 'unit-tests' failed make: *** [unit-tests] Error 1

xuzhao103389 (Fri, 14 Apr 2017 11:09:51 GMT):
sorry the fabric-ca is bad855205b9c9365508965931fc35988eea1a1fd

xuzhao103389 (Fri, 14 Apr 2017 11:10:13 GMT):
and when I am using fabric commit 7eb2cf966f68ac8259357f294d9c8787cec8617b

xuzhao103389 (Fri, 14 Apr 2017 11:10:18 GMT):
the make behave failed

rickr (Fri, 14 Apr 2017 11:10:57 GMT):
all you need to do is make docker

rickr (Fri, 14 Apr 2017 11:11:02 GMT):
on each of them

xuzhao103389 (Fri, 14 Apr 2017 11:11:08 GMT):
really

xuzhao103389 (Fri, 14 Apr 2017 11:11:12 GMT):
only make docker

xuzhao103389 (Fri, 14 Apr 2017 11:11:16 GMT):
thanks

xuzhao103389 (Fri, 14 Apr 2017 11:11:19 GMT):
let me try

zerppen (Fri, 14 Apr 2017 11:19:26 GMT):
@rickr Fabric-sdk-java-1.0-SNAPSHOT.jar where the .class file is automatically generated by the grpc protocol or written by the developer If the agreement is automatically generated, then the agreement documents which jar package did not see the corresponding agreement documents. If it is prepared by the developer, that can show the design documents? I think I can do something for javaSDK

rickr (Fri, 14 Apr 2017 11:25:45 GMT):
I'm not following your question. The grpc protos are from the fabric with some very minor changes for java. The to interface to them is generated

zerppen (Fri, 14 Apr 2017 11:27:20 GMT):
So there is no design documents?

rickr (Fri, 14 Apr 2017 11:27:39 GMT):
The comments that are in the proto :)

zerppen (Fri, 14 Apr 2017 11:28:19 GMT):
In the fabric-sdk-java-1.0-SNAPSHOT.jar?

zerppen (Fri, 14 Apr 2017 11:28:58 GMT):
Like common.proto?

rickr (Fri, 14 Apr 2017 11:31:06 GMT):
src/main/proto that's the interface between the client and server. Not sure if that's what you want. I'm still uncertain what it is your asking about

zerppen (Fri, 14 Apr 2017 11:32:45 GMT):
It is the same as i noticed in fabric-sdk-java-1.0-SNAPSHOT.jar

zerppen (Fri, 14 Apr 2017 11:33:21 GMT):
But I don't think the proto match the .class

rickr (Fri, 14 Apr 2017 11:34:19 GMT):
the protos are being included in the jar by accident . I just noticed that a day ago should be removed

zerppen (Fri, 14 Apr 2017 11:36:29 GMT):
For example,there are only 164 lines in src/main/proto/common.proto,but there are 6598 lines in common.class of the sdk.jar

rickr (Fri, 14 Apr 2017 11:37:35 GMT):
the protos only generate code after that nothing uses them

zerppen (Fri, 14 Apr 2017 11:39:31 GMT):
But it is not easy to read the generate code without any annotation

rickr (Fri, 14 Apr 2017 11:40:35 GMT):
There's no reason to read the generated code. The SDK should hide most of that. With maybe a few exceptions

rickr (Fri, 14 Apr 2017 11:40:35 GMT):
There's no reason to read the generated code. The SDK should hide most of that with maybe a few exceptions

rickr (Fri, 14 Apr 2017 11:41:28 GMT):
FYI I'm going to be gone pretty much till Mon so won't be too active here

zerppen (Fri, 14 Apr 2017 11:43:23 GMT):
We need invoke the generated code if we improve the SDK,right?

zerppen (Fri, 14 Apr 2017 11:44:27 GMT):
I mean we need invoke methods of the generated code if we decide to improve the SDK,ringht?

rickr (Fri, 14 Apr 2017 11:46:02 GMT):
one of the purposes of the SDK is so users don't have to do that. If your developing the SDK itself then yes you need write code to the classes it generates

zerppen (Fri, 14 Apr 2017 11:48:32 GMT):
maybe we got misunderstanding.

zerppen (Fri, 14 Apr 2017 11:52:38 GMT):
In my opinion,firstly the .class files of the sdk.jar are writtern by developers,it's proofed that I am wrong,right?

zerppen (Fri, 14 Apr 2017 11:54:29 GMT):
Then if I want to improve the SDK project with all of u, I need know and invoke the methods of the sdk.jar,it's right?

zerppen (Fri, 14 Apr 2017 12:01:32 GMT):
So,the conclusion is our team wrote or improved code to the classes it generates,right?

xuzhao103389 (Fri, 14 Apr 2017 12:56:47 GMT):
for the SDK dependencies

xuzhao103389 (Fri, 14 Apr 2017 12:57:03 GMT):
mvn dependency:list [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.448 s [INFO] Finished at: 2017-04-14T12:56:37+00:00 [INFO] Final Memory: 8M/106M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:list (default-cli): Goal requires a project to execute but there is no POM in this directory (/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration). Please verify you invoked Maven from the correct directory. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

xuzhao103389 (Fri, 14 Apr 2017 12:57:20 GMT):
so how to resolve the dependencies?

zerppen (Fri, 14 Apr 2017 15:36:02 GMT):
Hi rickr @rickr u r online?

xuzhao103389 (Fri, 14 Apr 2017 20:16:14 GMT):
Hi I got a new error

xuzhao103389 (Fri, 14 Apr 2017 20:16:15 GMT):
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building java-SimpleSample-example 1.0 [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.hyperledger:shim-client:jar:1.0 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.600 s [INFO] Finished at: 2017-04-14T20:15:16+00:00 [INFO] Final Memory: 8M/106M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project chaincode-SimpleSample: Could not resolve dependencies for project example:chaincode-SimpleSample:jar:1.0: Failure to find org.hyperledger:shim-client:jar:1.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

xuzhao103389 (Fri, 14 Apr 2017 20:16:30 GMT):
the example:chaincode-SimpleSample:jar:1.0 can not be found

xuzhao103389 (Fri, 14 Apr 2017 20:16:38 GMT):
who can tell me why is that ?

xuzhao103389 (Fri, 14 Apr 2017 20:20:12 GMT):
how to update the pom.xml

sanchezl (Fri, 14 Apr 2017 21:06:22 GMT):
@xuzhao103389 , what are you trying to do / how did you get the error?

kmadala (Fri, 14 Apr 2017 21:33:24 GMT):
Has joined the channel.

kmadala (Fri, 14 Apr 2017 21:34:47 GMT):
Hi, can someone point me documentation for Java-SDK for Fabric 1.0 release?

munireddya (Sat, 15 Apr 2017 07:10:59 GMT):
Has joined the channel.

xuzhao103389 (Sat, 15 Apr 2017 19:43:04 GMT):
Hi

xuzhao103389 (Sat, 15 Apr 2017 19:43:25 GMT):
I want to query where is the file target/fabric-sdk-java-1.0-SNAPSHOT.jar ?

xuzhao103389 (Sat, 15 Apr 2017 19:43:34 GMT):
I can not find this file

xuzhao103389 (Sat, 15 Apr 2017 19:47:31 GMT):
now I got it thanks

xuzhao103389 (Sat, 15 Apr 2017 19:49:31 GMT):
When I do "mvn test", I got lots of failures

xuzhao103389 (Sat, 15 Apr 2017 19:50:00 GMT):
[INFO] [INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ fabric-sdk-java --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ fabric-sdk-java --- ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.hyperledger.fabric.sdk.BlockEventTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.971 sec - in org.hyperledger.fabric.sdk.BlockEventTest Running org.hyperledger.fabric.sdk.EndpointTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.093 sec - in org.hyperledger.fabric.sdk.EndpointTest Running org.hyperledger.fabric.sdk.PeerTest java.io.NotSerializableException: org.hyperledger.fabric.sdk.TestHFClient$1 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at org.hyperledger.fabric.sdkintegration.SampleUser.saveState(SampleUser.java:177) at org.hyperledger.fabric.sdkintegration.SampleUser.setEnrollment(SampleUser.java:230) at org.hyperledger.fabric.sdk.TestHFClient.newInstance(TestHFClient.java:53) at org.hyperledger.fabric.sdk.PeerTest.setupClient(PeerTest.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.88 sec - in org.hyperledger.fabric.sdk.PeerTest Running org.hyperledger.fabric.sdk.helper.ConfigTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 sec - in org.hyperledger.fabric.sdk.helper.ConfigTest Running org.hyperledger.fabric.sdk.ChaincodeEndorsementPolicyTest Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.316 sec - in org.hyperledger.fabric.sdk.ChaincodeEndorsementPolicyTest Running org.hyperledger.fabric.sdk.OrdererTest

xuzhao103389 (Sat, 15 Apr 2017 19:51:49 GMT):
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in org.hyperledger.fabric.sdk.ChainTest Running org.hyperledger.fabric.sdk.ClientTest java.io.NotSerializableException: org.hyperledger.fabric.sdk.TestHFClient$1 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at org.hyperledger.fabric.sdkintegration.SampleUser.saveState(SampleUser.java:177) at org.hyperledger.fabric.sdkintegration.SampleUser.setEnrollment(SampleUser.java:230) at org.hyperledger.fabric.sdk.TestHFClient.newInstance(TestHFClient.java:53) at org.hyperledger.fabric.sdk.ClientTest.setupClient(ClientTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in org.hyperledger.fabric.sdk.ClientTest Results : Tests run: 66, Failures: 0, Errors: 0, Skipped: 2 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 25.538 s [INFO] Finished at: 2017-04-15T19:51:15+00:00 [INFO] Final Memory: 25M/342M [INFO] ------------------------------------------------------------------------

xuzhao103389 (Sat, 15 Apr 2017 19:52:45 GMT):
@sanchezl can you help take a look , thanks :)

xuzhao103389 (Sat, 15 Apr 2017 20:39:44 GMT):
FYI: I am doing then unit test Running the unit tests To run the unit tests, please use mvn test or mvn install which will run the unit tests and build the jar file. You must be running a local peer and orderer to be able to run the unit tests.

rickr (Sat, 15 Apr 2017 20:50:29 GMT):
looks to be a kv_rwset

xuzhao103389 (Sat, 15 Apr 2017 20:50:41 GMT):
sorry

xuzhao103389 (Sat, 15 Apr 2017 20:50:53 GMT):
I can run the integration test all good

xuzhao103389 (Sat, 15 Apr 2017 20:50:59 GMT):
but the unit tests failed

xuzhao103389 (Sat, 15 Apr 2017 20:51:10 GMT):
another thing is that I can not see sdkintegration/End2endIT.java

xuzhao103389 (Sat, 15 Apr 2017 20:51:44 GMT):
vagrant@hyperledger-devenv:v0.3.0-51b7e85:/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration$ ll total 40 drwxr-xr-x 1 vagrant vagrant 4096 Apr 14 09:56 ./ drwxr-xr-x 1 vagrant vagrant 4096 Apr 14 11:24 ../ -rw-r--r-- 1 vagrant vagrant 731 Apr 14 09:56 chaincodeendorsementpolicy.yaml -rw-r--r-- 1 vagrant vagrant 9755 Apr 14 09:56 docker-compose.yaml drwxr-xr-x 1 vagrant vagrant 4096 Apr 14 09:56 e2e-2Orgs/ -rw-r--r-- 1 vagrant vagrant 271 Apr 14 09:56 .env drwxr-xr-x 1 vagrant vagrant 4096 Apr 14 09:56 gocc/ drwxr-xr-x 1 vagrant vagrant 4096 Apr 14 09:56 javacc/

Dpkkmr (Sun, 16 Apr 2017 14:54:43 GMT):
Has joined the channel.

msoumeit (Sun, 16 Apr 2017 18:35:02 GMT):
Has joined the channel.

rogeriofza (Sun, 16 Apr 2017 22:59:49 GMT):
Has joined the channel.

xiangyw (Mon, 17 Apr 2017 08:29:02 GMT):

Message Attachments

xiangyw (Mon, 17 Apr 2017 08:29:44 GMT):
@rickr ByteString s=returnedBlock.getBlock().getMetadata().getMetadata(0); the metadata is transaction info?

xiangyw (Mon, 17 Apr 2017 08:32:47 GMT):
how can i parse a transaction to clear text as bluemix showing

zerppen (Mon, 17 Apr 2017 09:52:23 GMT):
Hi tuand @tuand I am watching https://jira.hyperledger.org/browse/FAB-1830 Could u get in touch with me when u r open

net0410 (Mon, 17 Apr 2017 13:32:47 GMT):
Has joined the channel.

NpraveeN (Mon, 17 Apr 2017 13:33:43 GMT):
Has joined the channel.

sanchezl (Mon, 17 Apr 2017 14:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LL4AqnqSTHnidRHdY) @xiangyw ``` final Block block = returnedBlock.getBlock(); for(final ByteString envelopeBytes: block.getData().getDataList()) { final Envelope envelope = Envelope.parseFrom(envelopeBytes); final Payload payload = Payload.parseFrom(envelope.getPayload()); // etc... } ```

sanchezl (Mon, 17 Apr 2017 14:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LL4AqnqSTHnidRHdY) @xiangyw ``` final Block block = returnedBlock.getBlock(); for(final ByteString envelopeBytes: block.getData().getDataList()) { final Envelope envelope = Envelope.parseFrom(envelopeBytes); final Payload payload = Payload.parseFrom(envelope.getPayload()); // etc... } ```

sanchezl (Mon, 17 Apr 2017 14:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LL4AqnqSTHnidRHdY) @xiangyw ``` final Block block = returnedBlock.getBlock(); for(final ByteString envelopeBytes: block.getData().getDataList()) { final Envelope envelope = Envelope.parseFrom(envelopeBytes); final Payload payload = Payload.parseFrom(envelope.getPayload()); // etc... } ```

dhuseby (Mon, 17 Apr 2017 14:40:00 GMT):
Has joined the channel.

Willson (Mon, 17 Apr 2017 15:37:42 GMT):
hello @rickr Have u ever met this error? `orderer0 | 2017-04-17 15:29:08.637 UTC [orderer/common/deliver] Handle -> WARN 43f Received unauthorized deliver request for channel foo`

Willson (Mon, 17 Apr 2017 15:40:04 GMT):
and the sdk side is that : ``` org.hyperledger.fabric.sdk.exception.TransactionException: Bad deliver expected status 200 got 403, Chain foo at org.hyperledger.fabric.sdk.Chain.getGenesisBlock(Chain.java:631) at org.hyperledger.fabric.sdk.Chain.(Chain.java:170) at org.hyperledger.fabric.sdk.Chain.createNewInstance(Chain.java:1084) at org.hyperledger.fabric.sdk.HFClient.newChain(HFClient.java:117) at org.hyperledger.fabric.sdkintegration.MyEnd2endIT.constructChain(MyEnd2endIT.java:472) at org.hyperledger.fabric.sdkintegration.MyEnd2endIT.setup(MyEnd2endIT.java:150) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) ```

rickr (Mon, 17 Apr 2017 15:52:37 GMT):
If you're running the standard end2end are you starting your docker the sdkintegration directory ?

Willson (Mon, 17 Apr 2017 15:53:08 GMT):
yes

Willson (Mon, 17 Apr 2017 15:53:18 GMT):
but running with tls

giridharg (Mon, 17 Apr 2017 17:18:43 GMT):
Has joined the channel.

net0310 (Mon, 17 Apr 2017 23:54:13 GMT):
Has joined the channel.

YoungHoonKim (Tue, 18 Apr 2017 00:40:48 GMT):
Has joined the channel.

xiangyw (Tue, 18 Apr 2017 01:12:14 GMT):
@sanchezl thank you very much

Willson (Tue, 18 Apr 2017 02:15:29 GMT):
Fortunately @rickr ,the error nothing to do with tls. it is worked after i regenarate the twoorgs.orderer.block.

Willson (Tue, 18 Apr 2017 02:18:05 GMT):
however it can install and instantiate the chaincode, when sending a transactionProposal to peers, it cause an error: ``` ```

Willson (Tue, 18 Apr 2017 02:18:42 GMT):
however it can install and instantiate the chaincode, when sending a transactionProposal to peers, it cause an error: ``` 2017-04-18 10:11:21 ERROR Chain:1972 - Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=failed to obtain cds for example_cc_go - transaction not found example_cc_go/foo, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for example_cc_go - transaction not found example_cc_go/foo at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:1972) at org.hyperledger.fabric.sdk.Chain.sendProposal(Chain.java:1911) at org.hyperledger.fabric.sdk.Chain.sendTransactionProposal(Chain.java:1853) at org.hyperledger.fabric.sdkintegration.MyEnd2endIT.lambda$runChain$0(MyEnd2endIT.java:297) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at org.hyperledger.fabric.sdk.Chain$TL.lambda$fire$1(Chain.java:2407) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ```

Willson (Tue, 18 Apr 2017 02:19:27 GMT):
however it can install and instantiate the chaincode, when sending a transactionProposal to peers, it cause an error: ```2017-04-18 10:11:21 ERROR Chain:1972 - Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=failed to obtain cds for example_cc_go - transaction not found example_cc_go/foo, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for example_cc_go - transaction not found example_cc_go/foo at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:1972) at org.hyperledger.fabric.sdk.Chain.sendProposal(Chain.java:1911) at org.hyperledger.fabric.sdk.Chain.sendTransactionProposal(Chain.java:1853) at org.hyperledger.fabric.sdkintegration.MyEnd2endIT.lambda$runChain$0(MyEnd2endIT.java:297) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at org.hyperledger.fabric.sdk.Chain$TL.lambda$fire$1(Chain.java:2407) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)```

rickr (Tue, 18 Apr 2017 06:31:10 GMT):
Try this ... stop all the containers docker-compose down docker ps -a make sure all containers are stopped remove ALL chainccode containers should look like `dev-peer3-example_cc_go-*` docker rm -f .... docker images likewise remove all the images too docker rmi -f enable tls for them as you probable have already done via the two env vars once all the chaincode images are gone restart your docker `docker-compose up --force-recreate` then rerun the tests

Willson (Tue, 18 Apr 2017 06:58:27 GMT):
it does not work. the peer0 is ok ,but the peer1 get a error while instantiate the chaincode : `2017-04-18 06:54:48.951 UTC [lccc] Invoke -> ERRO 448 ChaincodeId: example_cc_go does not exist on channel: foo(err:chaincode not found example_cc_go)`

Halminhu (Tue, 18 Apr 2017 08:44:13 GMT):
Has joined the channel.

shibo.lin (Tue, 18 Apr 2017 09:13:39 GMT):
Has joined the channel.

zerppen (Tue, 18 Apr 2017 10:20:00 GMT):
@rickr Maybe it's stupid,but I never use git pull code to gerrit. Firstly,i excuted git clone ssh://zerppen@gerrit.hyperledger.org:29418/fabric-sdk-java,then I excuted git checkout FAB-3211 So,i finished the task FAB-3211 and tested good.Then I excuted git commit -a -s,wrote something in the opening file when I excuted git review,it showed that No '.gitreview' file found in this repository. We don't know where your gerrit is. Please manually create a remote named "gerrit" and try again. So I should excute git remote add gerrit ssh://zerppen@gerrit.hyperledger.org:29418/fabric-sdk-java?

zerppen (Tue, 18 Apr 2017 10:20:00 GMT):
@rickr I have tested the task FAB-3211 and review it please..

zerppen (Tue, 18 Apr 2017 10:22:34 GMT):
@jimthematrix can u give me some advice

smithbk (Tue, 18 Apr 2017 11:43:17 GMT):
Has joined the channel.

rickr (Tue, 18 Apr 2017 12:30:11 GMT):
zerppen See you found out how to do that so need to reply

rickr (Tue, 18 Apr 2017 12:32:24 GMT):
@Willson Do you see the same issues w/o TLS ? I don't think it can be the issue but just making sure. BTW you need to do that procedure I stated if you move back and forth between TLS/non-TLS

o.o. (Tue, 18 Apr 2017 13:09:02 GMT):
> o.o. 10:53 AM > Hello! > Is there some way to access and modify the _transient_ field of a proposal from the java-sdk? > > rickr 2:05 PM > Still a to do Any idea of the timeline for this? Saw that there are also TODO's for T-cert batches, are these related?

rickr (Tue, 18 Apr 2017 13:11:25 GMT):
no timelines Can you please open a Jira for this ... thanks

o.o. (Tue, 18 Apr 2017 13:44:41 GMT):
I'm sorry; should ofcourse check there first! Found https://jira.hyperledger.org/browse/FAB-2119 > User should be able to specify transient field while creating the proposal when deploying/invoking the chaincode. For more details, see https://gerrit.hyperledger.org/r/#/c/5091/ We need to add this in the SDK Design Spec as well so that other SDKs can implement this as well. That has been set to _done_,

o.o. (Tue, 18 Apr 2017 13:44:41 GMT):
I'm sorry; should ofcourse check there first! Found https://jira.hyperledger.org/browse/FAB-2119 > User should be able to specify transient field while creating the proposal when deploying/invoking the chaincode. For more details, see https://gerrit.hyperledger.org/r/#/c/5091/ > We need to add this in the SDK Design Spec as well so that other SDKs can implement this as well. That has been set to _done_, What does this mean?

ssaddem (Tue, 18 Apr 2017 15:24:23 GMT):
hi guys there is any artifact on maven for v1 ?

rickr (Tue, 18 Apr 2017 15:25:16 GMT):
There is but it's already out of date

ssaddem (Tue, 18 Apr 2017 15:25:50 GMT):
yes i found this https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java but is on v0.6

ssaddem (Tue, 18 Apr 2017 15:26:50 GMT):
already i use v1.0.0-alpha for fabric

rickr (Tue, 18 Apr 2017 15:27:16 GMT):
it won't be there till we GA what's there will be SNAPSHOT images but I don't think they show up in maven .. not sure

rickr (Tue, 18 Apr 2017 15:27:47 GMT):
We're trying to automate

ssaddem (Tue, 18 Apr 2017 15:28:45 GMT):
ok if i wanna query v1.0.0-alpha what tag i should use ?

ssaddem (Tue, 18 Apr 2017 15:29:56 GMT):
for this docker image hyperledger/fabric-peer:x86_64-1.0.0-alpha

rickr (Tue, 18 Apr 2017 15:31:16 GMT):
There's nothing I know of that works with it

ssaddem (Tue, 18 Apr 2017 15:31:28 GMT):
ok thx :)

pschnap (Tue, 18 Apr 2017 17:55:55 GMT):
HFCAClient looks for a "pemFile" property; what is this supposed to point to?

pschnap (Tue, 18 Apr 2017 18:15:34 GMT):
also, what version/commit of the java SDK should I be using?

pschnap (Tue, 18 Apr 2017 18:15:43 GMT):
(to test against v1 alpha of the fabric)

pschnap (Tue, 18 Apr 2017 18:20:02 GMT):
should I be using the fabric_v1 branch?

pschnap (Tue, 18 Apr 2017 20:12:44 GMT):
nvm, got it connecting with the latest master

venky.bandaru (Tue, 18 Apr 2017 21:39:14 GMT):
Has joined the channel.

Willson (Wed, 19 Apr 2017 01:18:04 GMT):
thanks @rickr

Willson (Wed, 19 Apr 2017 02:33:03 GMT):
It is working fine without TLS,

zhoupeiwen (Wed, 19 Apr 2017 02:41:41 GMT):
hi I update the sdk today , run the test ,got the following error:2017-04-19 10:37:40 ERROR Chain:2041 - Sending proposal to peer0 failed because of gRPC failure=Status{code=UNKNOWN, description=failed to obtain cds for lscc - transaction not found lscc/mychannel, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for lscc - transaction not found lscc/mychannel any idea for this error?

rickr (Wed, 19 Apr 2017 02:43:41 GMT):
yes -- bad timing on your part :) They updated the Fabric that broke the SDK.. I think if you get the latest SDK AND the Fabric that's now in the README.md that should be fixed

zhoupeiwen (Wed, 19 Apr 2017 02:44:46 GMT):
OK, I'll try it..

Willson (Wed, 19 Apr 2017 02:50:56 GMT):
@rickr there is a WARN at peer1's logs : `WARN 317 Deep probe of peer0:7051 failed: Remote peer 172.18.0.6:7051 didn't send TLS certificate`

rickr (Wed, 19 Apr 2017 02:59:04 GMT):
You'd be better off taking that to the fabric channel where the experts on that side can better understand what's happening with that

Willson (Wed, 19 Apr 2017 03:12:48 GMT):
ok. thanks

rickr (Wed, 19 Apr 2017 03:34:47 GMT):
Just curious is that the SDKs end2endIT and docker compose unchanged `out of the box` ? And you're seeing those errors just when you enable TLS ? Or are you trying something different ? While I don't run with TLS locally it's enabled on all our verify and FIT tests and run each time code is sent to gerrit for review and also when it's merged into master so I have to think it's working

Willson (Wed, 19 Apr 2017 03:38:58 GMT):
Just enable the tls, nothing change.

Willson (Wed, 19 Apr 2017 03:41:34 GMT):
i think there are some problems about my tls certs, i am trying other ways

rickr (Wed, 19 Apr 2017 03:42:01 GMT):
so those are your own certs ?

Willson (Wed, 19 Apr 2017 03:42:15 GMT):
yeap

rickr (Wed, 19 Apr 2017 03:42:31 GMT):
your not using the ones pre setup with the end2end

Willson (Wed, 19 Apr 2017 03:47:23 GMT):
sorry, i use a former version of fabric and sdk that without your cas directory. i found it has been upgrate today. i remakeing the fabric now

rickr (Wed, 19 Apr 2017 03:49:41 GMT):
If you have the latest SDK and you'll need get the fabric updated too. You just need to set two env vars export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS=--tls.enabled

rickr (Wed, 19 Apr 2017 03:49:41 GMT):
If you have the latest SDK and you'll need get the fabric updated too. You just need to set two env vars export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS=--tls.enabled

rickr (Wed, 19 Apr 2017 03:50:48 GMT):
set those before starting the docker-compose and when you run the sdk

Willson (Wed, 19 Apr 2017 03:53:48 GMT):
ok thanks

Willson (Wed, 19 Apr 2017 04:36:24 GMT):
@rickr it is working fine both you certs and my certs at latest version :grin:

king3000 (Wed, 19 Apr 2017 09:17:29 GMT):
@zhoupeiwen I had this same problem. Then I git pull in fabric project and make, using new docker images I run End2endIT.java succeeded.

king3000 (Wed, 19 Apr 2017 09:17:59 GMT):
RUNNING: End2endIT. Constructing chain foo Created chain foo Peer peer1 joined chain foo queryBlockByHash returned block with blockNumber 1 queryBlockByTxID returned block with blockNumber 2 QueryTransactionByID returned TransactionInfo: txID 2150a9390e33fb2dc552fbd1090215c5638740b2c394c27c323164a8d58489c6 validation code 0 Running for Chain bar done That's all folks!

choas (Wed, 19 Apr 2017 10:02:53 GMT):
Has joined the channel.

jongeun.park (Wed, 19 Apr 2017 10:35:58 GMT):
Has joined the channel.

rickr (Wed, 19 Apr 2017 10:45:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LJyJ9kDPYRmeXMdtB) Glad to hear something works :) Can you say how you fixed the issue so that others may benefit ?

Willson (Wed, 19 Apr 2017 12:33:29 GMT):
i just remake the fabric and reclone the sdk, everything is fine after i do that

pschnap (Wed, 19 Apr 2017 15:10:04 GMT):
What version of the SDK should I be using to communicate with Bluemix?

pschnap (Wed, 19 Apr 2017 15:10:32 GMT):
I'm getting an EOF error on the orderer side of things when trying to commit an endorsed transaction

pschnap (Wed, 19 Apr 2017 15:15:18 GMT):
```2017-04-19 15:04:04.067 UTC [msp] Validate -> INFO 0f4 MSP OrdererMSP validating identity 2017-04-19 15:05:18.294 UTC [msp] Validate -> INFO 0f5 MSP PeerOrg1 validating identity 2017-04-19 15:05:18.413 UTC [orderer/common/deliver] Handle -> WARN 0f6 Error reading from stream: EOF 2017-04-19 15:05:18.422 UTC [msp] Validate -> INFO 0f7 MSP PeerOrg1 validating identity 2017-04-19 15:05:18.544 UTC [orderer/common/deliver] Handle -> WARN 0f8 Error reading from stream: EOF 2017-04-19 15:13:58.697 UTC [msp] Validate -> INFO 0f9 MSP OrdererMSP validating identity 2017-04-19 15:13:58.897 UTC [orderer/common/deliver] Handle -> WARN 0fa Error reading from stream: stream error: code = 1 desc = "context canceled" 2017-04-19 15:13:59.270 UTC [msp] Validate -> INFO 0fb MSP OrdererMSP validating identity 2017-04-19 15:13:59.483 UTC [orderer/common/deliver] Handle -> WARN 0fc Error reading from stream: stream error: code = 1 desc = "context canceled" 2017-04-19 15:14:00.521 UTC [msp] Validate -> INFO 0fd MSP OrdererMSP validating identity 2017-04-19 15:14:00.543 UTC [msp] Validate -> INFO 0fe MSP OrdererMSP validating identity```

pschnap (Wed, 19 Apr 2017 15:15:30 GMT):
not sure if this is an SDK or orderer problem

pschnap (Wed, 19 Apr 2017 16:05:14 GMT):
this is using v1.0 btw

rickr (Wed, 19 Apr 2017 16:06:01 GMT):
v1.0 sdk does not work with bluemix

pschnap (Wed, 19 Apr 2017 16:07:25 GMT):
I'm using it against the HSBN v1.0 beta on Bluemix

pschnap (Wed, 19 Apr 2017 16:07:36 GMT):
(hyperledger 1.0 on bluemix)

pschnap (Wed, 19 Apr 2017 16:09:55 GMT):
@rickr the v1.0 SDK won't work against v1.0 hyperledger on Bluemix?

pschnap (Wed, 19 Apr 2017 16:09:55 GMT):
@rickr you're saying the v1.0 SDK won't work against v1.0 hyperledger on Bluemix?

pschnap (Wed, 19 Apr 2017 16:30:18 GMT):
it should work against all v1 alpha installs, right?

rickr (Wed, 19 Apr 2017 17:24:13 GMT):
The latest surely won't I'm not sure what they're running in bluemix

pschnap (Wed, 19 Apr 2017 18:49:02 GMT):
@rickr seems to be working now, had to add an eventhub to the peer

pschnap (Wed, 19 Apr 2017 18:49:23 GMT):
the version I'm using was from a few days to a week ago

pschnap (Wed, 19 Apr 2017 18:49:23 GMT):
the version of the SDK I'm using was from a few days to a week ago

dklesev (Wed, 19 Apr 2017 22:17:15 GMT):
Has joined the channel.

ada-wang (Thu, 20 Apr 2017 01:56:46 GMT):
Has joined the channel.

zhangmenghang (Thu, 20 Apr 2017 02:05:28 GMT):
Has joined the channel.

zhangmenghang (Thu, 20 Apr 2017 02:08:32 GMT):
Hi guys, anyone knows the difference between java sdk and fabric's cli container? I was using java sdk and I find sometimes java sdk can't find channel in fabric when invoke but invoke in cli container is ok.

zhangmenghang (Thu, 20 Apr 2017 02:10:47 GMT):
I was using fabric-alpha and java sdk in my application, all is ok in the beginning. But I found several days later, java sdk can't find channel when connecting to fabric, but channel is there! when I invoke through container cli, all is ok. When I recompose fabric network , java sdk connected to fabric successfully. Anyone suffered the same problem ?

leoleo (Thu, 20 Apr 2017 05:18:52 GMT):
Has joined the channel.

Souvik.Dey (Thu, 20 Apr 2017 06:36:45 GMT):
Has joined the channel.

cophey (Thu, 20 Apr 2017 07:35:29 GMT):
Has joined the channel.

AER_IoT (Thu, 20 Apr 2017 09:38:48 GMT):
Has joined the channel.

kelvinzhong (Thu, 20 Apr 2017 10:26:41 GMT):
hi, I wonder what would be the proper max num of the channel that a peer could join?

seand20tech (Thu, 20 Apr 2017 12:20:08 GMT):
Has joined the channel.

SotirisAlfonsos (Thu, 20 Apr 2017 14:24:40 GMT):
Has joined the channel.

zerppen (Fri, 21 Apr 2017 06:35:34 GMT):
@zhangmenghang u can put issues into JIRA

ryokawajp (Fri, 21 Apr 2017 07:36:22 GMT):
Hi everyone. Does anyone know whether there is a release plan or release strategy of fabric-sdk-java for v1.0 GA?

ada-wang (Fri, 21 Apr 2017 07:39:10 GMT):
hello guys. today I pull latest code and run End2endIT.java , got error

ada-wang (Fri, 21 Apr 2017 07:39:32 GMT):
2017-04-21 15:36:57 ERROR EventHub:206 - EventHub:peer1 terminated is false shutdown is false has error UNKNOWN: Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)" org.hyperledger.fabric.sdk.exception.EventHubException: io.grpc.StatusRuntimeException: UNKNOWN: Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)"

ada-wang (Fri, 21 Apr 2017 07:40:27 GMT):
In docker container's log

ada-wang (Fri, 21 Apr 2017 07:40:28 GMT):
peer1 | 2017-04-21 07:36:57.796 UTC [eventhub_producer] Chat -> ERRO 02f Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)" peer0 | 2017-04-21 07:36:57.825 UTC [eventhub_producer] Chat -> ERRO 030 Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)"

EricM (Fri, 21 Apr 2017 08:53:08 GMT):
Has joined the channel.

EricM (Fri, 21 Apr 2017 08:53:32 GMT):
Hey everyone, I am working on a property management application and need help with Java SDK calls to chaincode.

EricM (Fri, 21 Apr 2017 08:53:45 GMT):
We have already implemented and deployed our chaincode using HL v 0.6. We are now working on the Application server calls to chaincode, using Java SDK. The particular function I’d like help with is is getNextFeasibleActions. My question is, does any one have good example code of how to actually extract the list of next feasible actions?

EricM (Fri, 21 Apr 2017 08:54:43 GMT):
I have seen an example elsewhere that returns a DeferredResult object, and I’m wondering how to get the names of actions from that. Or any other ways of doing it

SotirisAlfonsos (Fri, 21 Apr 2017 15:49:33 GMT):
Hello everyone. I have set fabric v1.0 and fabric-ca on a remote server. I have everything set up running on docker containers. I want to download the java-sdk on my local machine and connect it to the dockers running on the server.

SotirisAlfonsos (Fri, 21 Apr 2017 15:49:33 GMT):
Hello everyone. I have set fabric v1.0 and fabric-ca on a remote server. I have everything set up running on docker containers. I want to download the java-sdk on my local machine and connect it to the dockers running on the server. First of all. Is the current version of java-sdk compatible with fabric v1.0 Also, could someone provide any pointers on how to make the sdk connect to the docker components on the server?

indefire (Fri, 21 Apr 2017 18:26:57 GMT):
Has joined the channel.

indefire (Fri, 21 Apr 2017 18:28:09 GMT):
SampleUser fails in the test case because Enrollment and Set does not implement serializable. Should I submit a bug for this?

indefire (Fri, 21 Apr 2017 18:29:45 GMT):
Yes, Sotiris, the current java-sdk is compatible with fabric v1.0

clempo (Fri, 21 Apr 2017 20:31:23 GMT):
In End2endAndBackAgainIT.reconstructChain(), why do I need to run as admin to reconstruct the chain? I need to write client code that calls the chain just like End2EndAndBackAgainIT but with regular user credentials.

rickr (Fri, 21 Apr 2017 20:33:56 GMT):
Should be able to do that . But that code will also install new chain code which you'll have change to admin

rickr (Fri, 21 Apr 2017 20:34:18 GMT):
at least that's what that scenario does

clempo (Fri, 21 Apr 2017 20:35:54 GMT):
My code will reuse an existing chain, so that should work.

clempo (Fri, 21 Apr 2017 20:36:41 GMT):
I am getting this error, do you have a suggestion how to debug it

clempo (Fri, 21 Apr 2017 20:36:42 GMT):
ERROR (XDLog4J) W.file_fabric.1: [Chain - getConfigurationBlock()] - Bad newest block expected status 200 got 403, Chain foo org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 403, Chain foo

clempo (Fri, 21 Apr 2017 20:37:42 GMT):
I changed the IntegrationSuite to only run End2EndIT and my code is supposed to act like End2EndAndBackAgainIT

clempo (Fri, 21 Apr 2017 20:38:17 GMT):
I run End2EndIT, then create a user3 manually in one of the ca containers, then move the cert and privkey to my client machine

clempo (Fri, 21 Apr 2017 20:38:24 GMT):
and then run my code

clempo (Fri, 21 Apr 2017 20:38:35 GMT):
do I have to give user3 perm to the chain?

clempo (Fri, 21 Apr 2017 20:41:22 GMT):
The point of my code is to replace the SampleStore with my own Enrollment built from the cert and priv key

rickr (Fri, 21 Apr 2017 20:43:11 GMT):
user 3 has to registered by the admin for the foo chain

rickr (Fri, 21 Apr 2017 20:43:34 GMT):
at the very least

clempo (Fri, 21 Apr 2017 20:44:59 GMT):
I had to enroll the admin on the command line

clempo (Fri, 21 Apr 2017 20:45:13 GMT):
maybe that's the problem

clempo (Fri, 21 Apr 2017 20:45:46 GMT):
how could I run CLI commands as the admin after I run End2EndIT?

clempo (Fri, 21 Apr 2017 20:45:54 GMT):
without reenrolling

clempo (Fri, 21 Apr 2017 20:48:32 GMT):
I looked for the msp dir of an admin in the test fixtures and I could not find it

clempo (Fri, 21 Apr 2017 20:51:41 GMT):
It would be a more realistic test if the admin user was pre-enrolled too

clempo (Fri, 21 Apr 2017 20:53:14 GMT):
Either that, or I write a program to reconstruct the msp from the admin user in the SampleStore

clempo (Fri, 21 Apr 2017 20:54:07 GMT):
or I write a program to load the sample store and create user3, then I output the cert and privkey

clempo (Fri, 21 Apr 2017 20:56:40 GMT):
but if I do the last thing, I might as well reuse user1 or user2

clempo (Fri, 21 Apr 2017 20:58:17 GMT):
403 suggests the server knows my user but he does not have perms

clempo (Fri, 21 Apr 2017 20:58:50 GMT):
I agree with you the creation of user3 is wrong

rickr (Fri, 21 Apr 2017 21:00:56 GMT):
why not in end2end register user3 save his secret .. then go to the other machine and use the secret to enroll

clempo (Fri, 21 Apr 2017 21:06:18 GMT):
because that requires admin creds

clempo (Fri, 21 Apr 2017 21:06:32 GMT):
or does it

clempo (Fri, 21 Apr 2017 21:06:52 GMT):
sorry, register needs admin, not enroll

rickr (Fri, 21 Apr 2017 21:07:00 GMT):
y

clempo (Fri, 21 Apr 2017 21:07:01 GMT):
yeah, that's easier

clempo (Fri, 21 Apr 2017 21:10:49 GMT):
Is it possible to do all the admin tasks of End2EndIT with the CLI or a GUI?

clempo (Fri, 21 Apr 2017 21:11:08 GMT):
obviously we can use CLI to manager users

clempo (Fri, 21 Apr 2017 21:12:08 GMT):
can you create a chain and install chaincode with CLI or a GUI?

clempo (Fri, 21 Apr 2017 21:15:00 GMT):
https://jira.hyperledger.org/browse/FAB-2587 seems relevant

clempo (Fri, 21 Apr 2017 21:16:24 GMT):
I have enough to progress, thanks

EricM (Fri, 21 Apr 2017 21:39:37 GMT):
Hey everyone, I am working on a property management application and need help with Java SDK calls to chaincode. We have already implemented and deployed our chaincode using HL v 0.6. We are now working on the Application server calls to chaincode, using Java SDK. The particular function I’d like help with is is getNextFeasibleActions. My question is, does any one have good example code of how to actually extract the list of next feasible actions? I have seen an example elsewhere that returns a DeferredResult object, and I’m wondering how to get the names of actions from that. Or any other ways of doing it

jimthematrix (Sat, 22 Apr 2017 21:32:11 GMT):
@rickr note https://gerrit.hyperledger.org/r/#/c/8173/ was merged that changed fabric-ca's REST API root

jimthematrix (Sat, 22 Apr 2017 21:32:40 GMT):
also for the admin policy update for the node SDK: https://gerrit.hyperledger.org/r/#/c/8011/

jimthematrix (Sun, 23 Apr 2017 19:39:24 GMT):
@Satheesh Kathamuthu @sanchezl https://gerrit.hyperledger.org/r/#/c/2975/ - can either of you rebase this so i can be reviewed and merged? missing chaincode events is pretty bad

jimthematrix (Sun, 23 Apr 2017 19:39:24 GMT):
@Satheesh Kathamuthu @sanchezl https://gerrit.hyperledger.org/r/#/c/2975/ - can either of you rebase this so i can be reviewed and merged? missing chaincode events is pretty bad

jimthematrix (Sun, 23 Apr 2017 19:39:24 GMT):
@satheeshk @sanchezl https://gerrit.hyperledger.org/r/#/c/2975/ - can either of you rebase this so i can be reviewed and merged? missing chaincode events is pretty bad

rickr (Sun, 23 Apr 2017 19:42:23 GMT):
No -- chain code shim has been removed from java sdk that CR is obsolete

rickr (Sun, 23 Apr 2017 19:44:58 GMT):
I thought @sanchezl was addressing it in fabric java shim

rickr (Sun, 23 Apr 2017 19:44:58 GMT):
I thought @sanchezl was addressing events in fabric java shim

sanchezl (Sun, 23 Apr 2017 20:27:44 GMT):
Its been addressed. That changeset should be abandoned.

rickr (Sun, 23 Apr 2017 20:41:05 GMT):
@satheeshk Can you please abandon

xiangyw (Mon, 24 Apr 2017 09:06:38 GMT):

Message Attachments

xiangyw (Mon, 24 Apr 2017 09:13:39 GMT):
@sanchezl can you help me?

xiangyw (Mon, 24 Apr 2017 09:15:42 GMT):
i want a small part of payload data like following picture

xiangyw (Mon, 24 Apr 2017 09:15:57 GMT):

Message Attachments

clempo (Mon, 24 Apr 2017 16:09:05 GMT):
@rickr, I did what you suggested to create user3. I am still getting the same TransactionException expecting 200 got 403. That occurs when initializing the chain, in Chain.getLatestBlock() when inspecting the DeliverResponse from the orderer. How do I debug this?

clempo (Mon, 24 Apr 2017 16:09:44 GMT):
The log in the docker-compose window has scrolled too much, in any case it scrolls too fast

clempo (Mon, 24 Apr 2017 16:13:51 GMT):
I tried entering the orderer container to find its log, but I can't find it.

clempo (Mon, 24 Apr 2017 16:13:52 GMT):
docker exec -i -t orderer0 bash

rickr (Mon, 24 Apr 2017 16:20:01 GMT):
Was the chain already created by the admin ?

clempo (Mon, 24 Apr 2017 16:20:17 GMT):
yes, I ran End2endIT

clempo (Mon, 24 Apr 2017 16:20:34 GMT):
and stopped there without running the other integration tests

rickr (Mon, 24 Apr 2017 16:22:23 GMT):
Can you try and see if the it's the Admin in the second process if it works to isolate if it's a permission issue ?

clempo (Mon, 24 Apr 2017 16:22:59 GMT):
I'm sorry, I don't understand what you mean

clempo (Mon, 24 Apr 2017 16:23:05 GMT):
which second process

rickr (Mon, 24 Apr 2017 16:23:38 GMT):
You were try to connect to the channel from another process or system right ?

clempo (Mon, 24 Apr 2017 16:23:48 GMT):
yes, from my app

rickr (Mon, 24 Apr 2017 16:24:04 GMT):
so what if that's admin

clempo (Mon, 24 Apr 2017 16:24:18 GMT):
how do I get the cert and the key of the admin

rickr (Mon, 24 Apr 2017 16:24:50 GMT):
you could just copy the property file it writes to right ?

clempo (Mon, 24 Apr 2017 16:25:07 GMT):
you mean reuse the SampleStore?

rickr (Mon, 24 Apr 2017 16:25:14 GMT):
y

clempo (Mon, 24 Apr 2017 16:25:32 GMT):
OK, I can write a program to read the store and give me the cert and key

clempo (Mon, 24 Apr 2017 16:25:53 GMT):
it's the point of the my app to try to run without the sample store

clempo (Mon, 24 Apr 2017 16:26:29 GMT):
Ideally, I would like to run with users created from the CLI

clempo (Mon, 24 Apr 2017 16:26:41 GMT):
or whatever admin GUI there is for the CA

rickr (Mon, 24 Apr 2017 16:27:16 GMT):
can you quickly change the end2endandbackAgain so its the user the initialize .. might be quciker

clempo (Mon, 24 Apr 2017 16:27:26 GMT):
sure

rickr (Mon, 24 Apr 2017 16:29:46 GMT):
remember ONLY the admin can create the chain and join the peers so you'll to have done that first. Then try and go to your app and see if it works.. If you bring down/up your docker image because it's not a persistent store the chain will be gone

clempo (Mon, 24 Apr 2017 16:30:58 GMT):
my use case assumes the admin tasks are already done, my app is just a regular client

clempo (Mon, 24 Apr 2017 16:31:09 GMT):
I am not running under docker

rickr (Mon, 24 Apr 2017 16:31:17 GMT):
k just making sure

clempo (Mon, 24 Apr 2017 16:31:33 GMT):
I'll try it after lunch and report back

clempo (Mon, 24 Apr 2017 16:31:42 GMT):
thanks

rickr (Mon, 24 Apr 2017 16:37:47 GMT):
IMO I'd also try running this first with docker supplied and see if it goes as expecting or not ... then move on from there ... just a thought

clempo (Mon, 24 Apr 2017 18:15:59 GMT):
End2endAndBackAgain works when user1 reconstructs the chain

clempo (Mon, 24 Apr 2017 18:16:32 GMT):
I will extract the cert and key of user1 from the sample store and try with that in my app

clempo (Mon, 24 Apr 2017 19:19:36 GMT):
My implementation of Enrollment.getPublicKey() returned it in PEM format but the format is different in the integration test

clempo (Mon, 24 Apr 2017 19:19:43 GMT):
what is the format of the public key?

clempo (Mon, 24 Apr 2017 19:19:56 GMT):
Why not return it as a POJO PublicKey?

clempo (Mon, 24 Apr 2017 19:20:39 GMT):
This is what the integration test is using: user1 pubkey:3059301306072a8648ce3d020106082a8648ce3d0301070342000404b33edb3ebc66d92b4c31b411b2e38e43d082ebdd7568475f72e4ad6b20edc04572feb48fab2218c0ca052efa9612da49347a4041adf87b5508e6b64e959241

clempo (Mon, 24 Apr 2017 19:21:02 GMT):
how do I encode the binary data after pubkey:?

rickr (Mon, 24 Apr 2017 19:33:45 GMT):
for now you should be just save that read it back in as string

clempo (Mon, 24 Apr 2017 19:41:25 GMT):
to be clear, the pubkey: prefix is part of my output, not part of the value

clempo (Mon, 24 Apr 2017 19:41:53 GMT):
your suggestion obviously works but it is not a step towards making this work with a user created on the CLI

clempo (Mon, 24 Apr 2017 19:42:13 GMT):
you are basically saying you are documenting how to implement Enrollment

clempo (Mon, 24 Apr 2017 19:42:18 GMT):
are -> are not

clempo (Mon, 24 Apr 2017 19:43:06 GMT):
it is not practical to force everyone to create their users in Java

rickr (Mon, 24 Apr 2017 19:46:17 GMT):
I have not looked at interoperablity between the various toolkit .

clempo (Mon, 24 Apr 2017 19:46:36 GMT):
that's fair, but the CLI is not another toolkit

clempo (Mon, 24 Apr 2017 19:47:22 GMT):
creating a user in an admin tool then referring to that existing user in your Java app is a common scenario

clempo (Mon, 24 Apr 2017 19:47:46 GMT):
I can probably try a few things to create the public key string

clempo (Mon, 24 Apr 2017 19:48:09 GMT):
I'm stressing the point because your answer should be in the comments of the Enrollment iface

rickr (Mon, 24 Apr 2017 19:50:54 GMT):
that's hex encoded pem you should be able to read it in as such. I'd like to try that scenario if I had the bandwidth .. bigger issues. If you can get something to work with that I'd appreciate contributing it back .. even in the sample That key is a hex encoded pemfile If you get the cli prublic key and read it in convert it. I think it would work

clempo (Mon, 24 Apr 2017 19:51:38 GMT):
pem is a text format

clempo (Mon, 24 Apr 2017 19:51:48 GMT):
maybe you mean simply pem encoded file

clempo (Mon, 24 Apr 2017 19:51:53 GMT):
pem already looks like hex

clempo (Mon, 24 Apr 2017 19:52:21 GMT):
cli produces a pem cert and a pem private key

clempo (Mon, 24 Apr 2017 19:52:32 GMT):
that's why I got the pub key wrong

clempo (Mon, 24 Apr 2017 19:52:46 GMT):
you have to extract the pub key from the cert

clempo (Mon, 24 Apr 2017 19:53:08 GMT):
it appears the priv key is actually a key pair, but without doc I could not be sure it was always the case

clempo (Mon, 24 Apr 2017 19:55:32 GMT):
maybe that's always true of RSA private keys

clempo (Mon, 24 Apr 2017 19:55:46 GMT):
again, not sure if only RSA is supported

clempo (Mon, 24 Apr 2017 19:56:08 GMT):
not that important for now since I have access through the cert

rickr (Mon, 24 Apr 2017 19:56:33 GMT):
I don't think at the moment we use the public key at all. I think it's a left over from the 0.6 - but not sure .. I think for now you'll be ok just setting to anything other than null or an empty string .. Feel free to open a Jira to clean that up

rickr (Mon, 24 Apr 2017 19:56:59 GMT):
I'd give that a shot

clempo (Mon, 24 Apr 2017 19:57:15 GMT):
that would mean my theory why this fails is moot

clempo (Mon, 24 Apr 2017 19:57:28 GMT):
I hope you are wrong and the public key is used

clempo (Mon, 24 Apr 2017 19:58:06 GMT):
a Jira to clean what exactly?

rickr (Mon, 24 Apr 2017 19:58:26 GMT):
remove the public key

clempo (Mon, 24 Apr 2017 19:59:07 GMT):
I don't think I know enough to request that change

clempo (Mon, 24 Apr 2017 19:59:24 GMT):
I don't know if it's used or not

clempo (Mon, 24 Apr 2017 19:59:31 GMT):
let me check in eclipse

clempo (Mon, 24 Apr 2017 20:00:02 GMT):
it is accessed in reenroll

clempo (Mon, 24 Apr 2017 20:00:42 GMT):
that probably means my pub key is not used in my app

clempo (Mon, 24 Apr 2017 20:00:57 GMT):
I will need to find another culprit

clempo (Mon, 24 Apr 2017 20:01:35 GMT):
any hint on where to see the log of the orderer?

rickr (Mon, 24 Apr 2017 20:02:29 GMT):
should be a log4j.properties you can set the sdk level there

clempo (Mon, 24 Apr 2017 20:03:56 GMT):
maybe there is only a console appender, that would explain the lack of a log file

clempo (Mon, 24 Apr 2017 20:04:07 GMT):
I'll take a look

clempo (Mon, 24 Apr 2017 20:04:16 GMT):
I need to step out.

clempo (Mon, 24 Apr 2017 20:04:18 GMT):
Thanks again

rickr (Mon, 24 Apr 2017 20:05:04 GMT):
sure --- WIP a lot of rough edges that need smoothing out --

clempo (Mon, 24 Apr 2017 21:00:35 GMT):
I found another potential diff between my app and the integration suite

clempo (Mon, 24 Apr 2017 21:00:51 GMT):
what value should I use for the MSPID?

clempo (Mon, 24 Apr 2017 21:21:10 GMT):
Clearly, I don't understand what is an MSPID

clempo (Mon, 24 Apr 2017 21:21:25 GMT):
It appears that value is constant for one particular organization

clempo (Mon, 24 Apr 2017 21:21:53 GMT):
but I thought an organization is a concept of the SampleStore only

clempo (Mon, 24 Apr 2017 21:22:00 GMT):
or the TestConfig

clempo (Mon, 24 Apr 2017 21:22:32 GMT):
seems like it is needed to get the genesis block

rickr (Mon, 24 Apr 2017 21:22:36 GMT):
yes -- it's just something you need to know .. I'm on thin ice but basically it like your org

clempo (Mon, 24 Apr 2017 21:23:09 GMT):
in the integration suite, it is poked on the SampleUser after it is enrolled

clempo (Mon, 24 Apr 2017 21:23:45 GMT):
does it have to show up in the cert?

rickr (Mon, 24 Apr 2017 21:23:55 GMT):
no

clempo (Mon, 24 Apr 2017 21:24:32 GMT):
I will hardcode it on my user in my app tomorrow

clempo (Mon, 24 Apr 2017 21:24:43 GMT):
so far, I was using the user name

clempo (Mon, 24 Apr 2017 21:24:49 GMT):
as the value of the mspid

clempo (Mon, 24 Apr 2017 21:25:35 GMT):
I also noticed we don't need any roles to make it work

clempo (Mon, 24 Apr 2017 21:25:54 GMT):
is that because authorization is turned off in your sample CAs?

rickr (Mon, 24 Apr 2017 21:27:52 GMT):
IMO when give the user their secret for enrollment probably should include their MSPID .. assume the admin knows this.

FengChen_1982 (Tue, 25 Apr 2017 02:00:21 GMT):
Has joined the channel.

FengChen_1982 (Tue, 25 Apr 2017 05:37:50 GMT):
Hello, To to the following operations: deploy&invoke the chaincode, proposal, transaction query, etc. I can use REST API in Fabric 0.6, but will have to use SDK now in Fabric 1.0 only, right?

bh4rtp (Tue, 25 Apr 2017 07:12:44 GMT):
the tls configuration of java sdk is different from fabric e2e_cli.

bh4rtp (Tue, 25 Apr 2017 07:13:28 GMT):
End2endIT.java cannot run correctly now.

rickr (Tue, 25 Apr 2017 11:58:22 GMT):
I think the Node sdk may have a REST wrapper around their sdk you might want ask on that channel

rickr (Tue, 25 Apr 2017 11:59:50 GMT):
Code was changed on the Fabric side that has caused end2endIt to break. Make sure for now that you are using the level that is in the README.md.

rickr (Tue, 25 Apr 2017 11:59:50 GMT):
**************************** *Code was changed on the Fabric side that has caused end2endIt to break. Make sure for now that you are using the level that is in the README.md.* ****************************

rickr (Tue, 25 Apr 2017 11:59:50 GMT):
**************************** *Code was changed on the Fabric side that has caused end2endIt to break. Make sure for now that you are using the level that is in the README.md.* ****************************

HubertYoung (Tue, 25 Apr 2017 15:06:08 GMT):
Has joined the channel.

HubertYoung (Tue, 25 Apr 2017 15:29:21 GMT):
I run the end2endit example,so the chain is initialized.How can i get the chain in java after that?

HubertYoung (Tue, 25 Apr 2017 15:31:30 GMT):
It seems HFClient only provides methods to new chain but no query or get chain.

pschnap (Tue, 25 Apr 2017 16:02:41 GMT):
Is there any way I can retrieve the transaction call that was made from BlockInfo after querying by transaction ID?

clempo (Tue, 25 Apr 2017 16:03:38 GMT):
@HubertYoung Check the End2endAndBackAgain sample. The sample uses an admin to recreate the chain but the user does not have to be admin.

pschnap (Tue, 25 Apr 2017 16:24:05 GMT):
hm, seems the transaction call is part of the payload of a processed transaction. Is there anyway to extract the call and arguments from that into a nice Java object?

zemtsov (Tue, 25 Apr 2017 19:53:49 GMT):
Has joined the channel.

chunhui (Wed, 26 Apr 2017 02:11:24 GMT):
Has joined the channel.

HubertYoung (Wed, 26 Apr 2017 03:33:36 GMT):
@clempo Thanks.

gujx (Wed, 26 Apr 2017 07:58:03 GMT):
hey guys, recently I've built the source code of fabric-sdk-java by maven and came across 'java.lang.NoSuchMethodError: io.grpc.protobuf.ProtoUtils.marshaller(Lcom/google/protobuf/Message;)Lio/grpc/MethodDescriptor$Marshaller;' when creating chain by HFClient. The class invoking this method is 'org.hyperledger.fabric.protos.orderer.AtomicBroadcastGrpc'. It seems that the code genereated by protobuf does not match the dependencies of fabric-sdk-java. Any ideas?

gujx (Wed, 26 Apr 2017 09:07:16 GMT):
Seems that the shim client I built dependends on the wrong version of grpc... It disappeared after I fix the version

hayato (Wed, 26 Apr 2017 10:43:40 GMT):
Has joined the channel.

HubertYoung (Wed, 26 Apr 2017 11:38:39 GMT):
I enable the tls option,then i get a timeout error.

HubertYoung (Wed, 26 Apr 2017 11:39:09 GMT):
2017-04-26 19:00:46 ERROR Chain:2041 - Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=Timeout expired while starting chaincode example_cc_go:1(networkid:dev,peerid:peer1,tx:c7927024fd914d06e0a90fc78a315d019488a9f9b9c4156a886c91ad325b61c4), cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Timeout expired while starting chaincode example_cc_go:1(networkid:dev,peerid:peer1,tx:c7927024fd914d06e0a90fc78a315d019488a9f9b9c4156a886c91ad325b61c4) at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:2041) at org.hyperledger.fabric.sdk.Chain.sendInstantiationProposal(Chain.java:1162) at org.hyperledger.fabric.sdkintegration.End2endIT.runChain(End2endIT.java:276) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:175) at org.hyperledger.fabric.sdkintegration.End2endIT.main(End2endIT.java:85) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Timeout expired while starting chaincode example_cc_go:1(networkid:dev,peerid:peer1,tx:c7927024fd914d06e0a90fc78a315d019488a9f9b9c4156a886c91ad325b61c4) at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:428) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:514) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:431) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:546) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

HubertYoung (Wed, 26 Apr 2017 11:39:15 GMT):
Any ideas?

HubertYoung (Wed, 26 Apr 2017 12:04:13 GMT):
Another question.The end2end example runs correctly,but there are some errors in log.

HubertYoung (Wed, 26 Apr 2017 12:04:15 GMT):
2017-04-26 11:43:42.624 UTC [eventhub_producer] Chat -> ERRO 03d Error during Chat, stopping handler: stream error: code = 1 desc = "context canceled"

rickr (Wed, 26 Apr 2017 12:05:38 GMT):
Try docker-comopose down . Do a docker ps -a . Clean up all containers that have the chaincode name in them. Do do the same for: docker images then restart your services and run again

HubertYoung (Wed, 26 Apr 2017 12:52:31 GMT):
@rickr I tried again and its the same.

HubertYoung (Wed, 26 Apr 2017 12:53:12 GMT):
as the you told

clempo (Wed, 26 Apr 2017 15:26:32 GMT):
@rickr, I got a transaction and a query to work for user1 using a rebuilt user and enrollment. The cert and key were read from files in the same format produced by fabric-ca-client.

clempo (Wed, 26 Apr 2017 15:27:12 GMT):
It took me a long time to figure out how to create the pem files and how to read them.

clempo (Wed, 26 Apr 2017 15:28:06 GMT):
I think the samples should at least read the enrollment for the admin

clempo (Wed, 26 Apr 2017 15:28:13 GMT):
instead of renrolling

clempo (Wed, 26 Apr 2017 15:29:05 GMT):
Recreating your admin in your client app would not work in real life

clempo (Wed, 26 Apr 2017 15:29:45 GMT):
I have a question regarding making a query

clempo (Wed, 26 Apr 2017 15:29:59 GMT):
What does it mean if I have multiple peers for a query?

clempo (Wed, 26 Apr 2017 15:30:13 GMT):
should I limit it to just one peer?

clempo (Wed, 26 Apr 2017 15:30:41 GMT):
Should I validate I get the same response?

clempo (Wed, 26 Apr 2017 15:30:54 GMT):
from all the peers

tsnyder (Wed, 26 Apr 2017 20:01:54 GMT):
When the chain's registered event listener receive method is invoked on a particular chain / channel, does the next invocation wait until the receive method returns, or are multiple parallel invocations possible?

rickr (Wed, 26 Apr 2017 20:49:07 GMT):
totally async

rickr (Wed, 26 Apr 2017 20:52:52 GMT):
@clempo In the real world I would think that to be a bogus check. There's no guarantee by the time you've your invocation starts to query for a value some other chaincode has not already changed it again. Probably if all you want to know is the value of something querying one peer I would think is fine

clempo (Wed, 26 Apr 2017 21:04:23 GMT):
Can you explain the purpose of the event hubs in the integration tests? Are the End2end sample apps actually affected by events?

clempo (Wed, 26 Apr 2017 21:05:03 GMT):
Would my app still be production quality if I recreate the chain without event hubs and attempted to query or invoke the chain?

rickr (Wed, 26 Apr 2017 21:11:55 GMT):
If you don't care when your change actually gets written to the ledger you probably wouldn't need any evenhubs

clempo (Wed, 26 Apr 2017 21:27:37 GMT):
would I know if the transaction succeeded without event hubs?

clempo (Wed, 26 Apr 2017 21:28:53 GMT):
Are you saying I need an event hub to know when my transaction is finished?

clempo (Wed, 26 Apr 2017 21:29:26 GMT):
is that why the samples have long sleeps instead of a more deterministic approach?

rickr (Wed, 26 Apr 2017 21:35:12 GMT):
There should be no sleep in the latest

rohitbordia (Thu, 27 Apr 2017 00:12:56 GMT):
Does any one know why in the java sample we have 1 instance of couchDB?

rohitbordia (Thu, 27 Apr 2017 00:13:54 GMT):
even though we have multiple peers .. shouldn't each peer have its own copy of couhDB

Willson (Thu, 27 Apr 2017 07:43:58 GMT):
hello @rickr , at chain.java 2122 i notice that the transactionBuilder just simply collects all endorsements and one responsePayload of the proposalResponses, how about the proposalResponses have a different payload? how can it determine which one is correct? ``` List ed = new LinkedList<>(); FabricProposal.Proposal proposal = null; ByteString proposalResponsePayload = null; String proposalTransactionID = null; for (ProposalResponse sdkProposalResponse : proposalResponses) { ed.add(sdkProposalResponse.getProposalResponse().getEndorsement()); if (proposal == null) { proposal = sdkProposalResponse.getProposal(); proposalTransactionID = sdkProposalResponse.getTransactionID(); proposalResponsePayload = sdkProposalResponse.getProposalResponse().getPayload(); } } ```

Willson (Thu, 27 Apr 2017 07:43:58 GMT):
hello @rickr , at chain.java 2122 i notice that the transactionBuilder just simply collects all endorsements and one responsePayload of the proposalResponses, how about the proposalResponses have a different payload? how can it determine which one is correct? ``` List ed = new LinkedList<>(); FabricProposal.Proposal proposal = null; ByteString proposalResponsePayload = null; String proposalTransactionID = null; for (ProposalResponse sdkProposalResponse : proposalResponses) { ed.add(sdkProposalResponse.getProposalResponse().getEndorsement()); if (proposal == null) { proposal = sdkProposalResponse.getProposal(); proposalTransactionID = sdkProposalResponse.getTransactionID(); proposalResponsePayload = sdkProposalResponse.getProposalResponse().getPayload(); } } ```

john2000 (Thu, 27 Apr 2017 07:54:24 GMT):
Has joined the channel.

bh4rtp (Thu, 27 Apr 2017 08:10:30 GMT):
@rohitbordia i don't know why have only one couchdb instance. but i remember when 1.0.0 alpha was released, it must configure one couchdb for each peer.

bh4rtp (Thu, 27 Apr 2017 08:51:33 GMT):
@rohitbordia the couchdb in java sample is only a demo and not really used by peers. i just tested, one couchdb must be configured for each peer.

kelvinzhong (Thu, 27 Apr 2017 09:22:34 GMT):

Message Attachments

kelvinzhong (Thu, 27 Apr 2017 09:23:48 GMT):
hi all, i have switch the project to this commit level, but it would return an error while sending the instantiateProposalRequest, and return "UNKNOWN: Transaction returned with failure: Failed extracting proposal fields. [Could not extract the channel header from the proposal: UnmarshalChannelHeader failed, err proto: bad wiretype for field common.ChannelHeader.Type: got wiretype 2, want 0]"

kelvinzhong (Thu, 27 Apr 2017 09:24:04 GMT):
any idea?

yecineoueslati (Thu, 27 Apr 2017 13:27:16 GMT):
Has joined the channel.

yecineoueslati (Thu, 27 Apr 2017 13:39:19 GMT):
hello everybody, i m trying to run the End to end test scenario.

yecineoueslati (Thu, 27 Apr 2017 13:43:34 GMT):

Message Attachments

yecineoueslati (Thu, 27 Apr 2017 13:45:32 GMT):
hello everybody,

yecineoueslati (Thu, 27 Apr 2017 13:47:16 GMT):
Hello everybody, I am trying to run the End to end test scenario. But i am getting this exception.

yecineoueslati (Thu, 27 Apr 2017 13:47:30 GMT):

Message Attachments

yecineoueslati (Thu, 27 Apr 2017 13:49:10 GMT):

Message Attachments

yecineoueslati (Thu, 27 Apr 2017 13:50:43 GMT):
and thanks

tsnyder (Thu, 27 Apr 2017 14:29:01 GMT):
@rickr - In reviewing the code for chain.java the sendTransaction method returns a CompletableFuture. Following this through the code it appears that the CompletableFuture is satisfied when the transaction is included within a BlockEvent. Is this correct? It was my initial thinking that the CompletableFuture was satisfied once the Orderer accepted responsibility for the transaction to put it into a Block. Was my thinking about this wrong?

rickr (Thu, 27 Apr 2017 14:37:02 GMT):
yes :)

rickr (Thu, 27 Apr 2017 14:37:02 GMT):
yes :) When the eventhubs that are listening for events have all received that block associated with transaction have been received AND they are marked as valid

rickr (Thu, 27 Apr 2017 14:37:02 GMT):
yes :) When the eventhubs that are listening for events have all received that block associated with transaction have been received AND they the transaction is marked as valid

rickr (Thu, 27 Apr 2017 14:37:02 GMT):
yes :) When the eventhubs that are listening for events have all received that block associated with transaction have been received AND t the transaction is marked as valid

tsnyder (Thu, 27 Apr 2017 14:47:33 GMT):
@rickr - Is there a way of determining when the Orderer has successfully received the sendTransaction, and thus it is its responsibility to include it in a Block?

rickr (Thu, 27 Apr 2017 14:52:32 GMT):
AFAIK The orderer call to put the transaction in a batch for processing is synchronize so if I'm understanding your question that should be when get returned back from invoking the call. I don't think there's anyway of knowing when that batch/block is starting to be processed by the endorsers if that's what's your asking.

rickr (Thu, 27 Apr 2017 14:52:32 GMT):
AFAIK The orderer call to put the transaction in a batch for processing is synchronize so if I'm understanding your question that should be when get returned back from invoking the call. That happens in my experience almost _relativiely_ nstantly. I don't think there's anyway of knowing when that batch/block is starting to be processed by the endorsers if that's what's your asking.

tsnyder (Thu, 27 Apr 2017 14:54:19 GMT):
No - what I was asking is about the Orderer guarantee that it has the transaction and in some way persisted it. Meaning that the transaction will not be dropped or lost within the Orderer.

rickr (Thu, 27 Apr 2017 14:56:09 GMT):
I'm fairly certain that if we get back a 200 from the orderer it will be on it's queue to do

tsnyder (Thu, 27 Apr 2017 14:56:31 GMT):
Good. Thanks, that is what I needed to know.

rohitbordia (Thu, 27 Apr 2017 16:05:39 GMT):
@rickr : for the sdk example can we deploy that on a swarm cluster

rohitbordia (Thu, 27 Apr 2017 16:05:48 GMT):
@bh4rtp : ok, thanks

rickr (Thu, 27 Apr 2017 16:35:48 GMT):
I have no experience with running the sdk on a swarm cluster . The first issue I could imagine is sharing the user enrollements .

yecineoueslati (Thu, 27 Apr 2017 16:41:05 GMT):
it worked thx everybody

yecineoueslati (Thu, 27 Apr 2017 16:41:14 GMT):

Message Attachments

rohitbordia (Thu, 27 Apr 2017 16:49:02 GMT):
im keeping away fabric-ca sep

rohitbordia (Thu, 27 Apr 2017 16:49:20 GMT):
so only orderer and peers are in swarm cluster

rickr (Thu, 27 Apr 2017 16:52:54 GMT):
that's a different question :) Whats there now doesn't persist anything for Fabric .. You'd need to move to Kafka for consensus and make the ledger write to a real database

rickr (Thu, 27 Apr 2017 16:53:33 GMT):
that's just for starters

rohitbordia (Thu, 27 Apr 2017 16:53:41 GMT):
ok

rohitbordia (Thu, 27 Apr 2017 16:54:15 GMT):
I'm trying to install peer , orderer, kafka, couchdb on swarm cluster

rohitbordia (Thu, 27 Apr 2017 16:54:34 GMT):
but, didnt understand how they will sync

rickr (Thu, 27 Apr 2017 16:55:23 GMT):
For those questions you'll much better response on the fabric channel

rohitbordia (Thu, 27 Apr 2017 16:55:34 GMT):
just fabric

clempo (Thu, 27 Apr 2017 19:43:00 GMT):
The version should be updated in the sdk readme

clempo (Thu, 27 Apr 2017 19:43:06 GMT):
... The sdk jar is in target/fabric-sdk-java-1.0-SNAPSHOT.jar ...

clempo (Thu, 27 Apr 2017 19:43:14 GMT):
you now use 1.0.0

clempo (Thu, 27 Apr 2017 19:50:21 GMT):
I updated to the latest code, making sure to reset to the documented commitlevels

clempo (Thu, 27 Apr 2017 19:50:46 GMT):
I'm getting this error when I try to run the integration tests

clempo (Thu, 27 Apr 2017 19:50:52 GMT):
2017-04-27 15:47:58 ERROR HFCAClient:527 - POST request to http://localhost:7054/api/v1/enroll failed with status code: 404. Response: 404 page not found

clempo (Thu, 27 Apr 2017 19:51:19 GMT):
I rebuilt fabric and fabric-ca

clempo (Thu, 27 Apr 2017 19:51:50 GMT):
I got my docker images with

clempo (Thu, 27 Apr 2017 19:51:51 GMT):
cd /opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli

clempo (Thu, 27 Apr 2017 19:52:00 GMT):
. download-dockerimages.sh

clempo (Thu, 27 Apr 2017 19:53:24 GMT):
I know the latest fabric broke the sdk not long ago

clempo (Thu, 27 Apr 2017 19:54:21 GMT):
That's why I was careful with the commit levels

clempo (Thu, 27 Apr 2017 19:54:57 GMT):
but I don't know how that relates to the docker images I downloaded

clempo (Thu, 27 Apr 2017 19:55:44 GMT):
how do I fix this?

HubertYoung (Fri, 28 Apr 2017 03:14:51 GMT):
I use fabric-sdk-java to submit 20 transactions at the same.But only one transaction commit successfully.Any ideas?Here is the log.

HubertYoung (Fri, 28 Apr 2017 03:14:51 GMT):
I use fabric-sdk-java to submit 20 transactions at the same time.But only one transaction commit successfully.Any ideas?Here is the log.

HubertYoung (Fri, 28 Apr 2017 03:14:52 GMT):
2017-04-28 03:08:16.005 UTC [kvledger] Commit -> INFO 19f Channel [foo]: Created block [29] with 10 transaction(s) 2017-04-28 03:08:18.271 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 1a0 Block [30] Transaction index [1] TxId [d38ae316767f61502417ea2681c2c7d7fbf3898897bac14edcab2cd5df28362f] marked as invalid by state validator. Reason code [11]

HubertYoung (Fri, 28 Apr 2017 03:15:51 GMT):
2017-04-28 03:08:18.272 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 1a1 Block [30] Transaction index [2] TxId [8aad508c2a92a093fc471ef9424a27dee8055eb72947a40296e03a31c0d262e6] marked as invalid by state validator. Reason code [11] 2017-04-28 03:08:18.272 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 1a2 Block [30] Transaction index [3] TxId [aa0382a5a8021d35f871a7367ccc67e4771665066843f8a5eaa7365155ace1c3] marked as invalid by state validator. Reason code [11]

Willson (Fri, 28 Apr 2017 03:28:24 GMT):
your transactions operate the same key i guess

Willson (Fri, 28 Apr 2017 03:28:24 GMT):
your transactions operate with the same key i guess

HubertYoung (Fri, 28 Apr 2017 03:36:08 GMT):
The chaincode is the example in end2endIT ,github.com/example_cc.

HubertYoung (Fri, 28 Apr 2017 03:36:22 GMT):
What do you mean by the same key?

Willson (Fri, 28 Apr 2017 03:37:24 GMT):
like this `transactionProposalRequest.setArgs(new String[] {"move", "a", "b", "100"});` the key are a and b

HubertYoung (Fri, 28 Apr 2017 03:42:05 GMT):
I see.They are all the same key.What to do i want to send tx with the same key in my scenario?Is there some configuration?

HubertYoung (Fri, 28 Apr 2017 03:42:05 GMT):
I see.They are all the same key.What to do if i want to send tx with the same key in my scenario?Is there some configuration?

HubertYoung (Fri, 28 Apr 2017 03:43:51 GMT):
For example,batch transfer from A to B

Willson (Fri, 28 Apr 2017 03:52:15 GMT):
perhaps you can get a professional responce at fabric-consensus channel

Willson (Fri, 28 Apr 2017 03:55:41 GMT):
and get some information form http://fabric-rtd.readthedocs.io/en/latest/readwrite.html

HubertYoung (Fri, 28 Apr 2017 04:30:49 GMT):
Thanks.

Willson (Fri, 28 Apr 2017 04:37:21 GMT):
yw

wsh_bob (Fri, 28 Apr 2017 08:10:49 GMT):
Has joined the channel.

dorrakhribi (Fri, 28 Apr 2017 08:33:58 GMT):
hello, i'm trying to run the fabric sdk but i keep getting the following error:"failed to get a new tcert" can ony one help me please ?

Willson (Fri, 28 Apr 2017 09:38:20 GMT):
@Here can anybody clear me fot that ? thx, it puzzle me a lot [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TocAoLZjHQuqqjjtK)

Willson (Fri, 28 Apr 2017 09:39:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TocAoLZjHQuqqjjtK) @Here can anybody clear me fot that ? thx, it puzzle me a lot

clempo (Fri, 28 Apr 2017 14:00:37 GMT):
@dorrakhribi, not sure if that's still true, but the readme says: Known limitations •TCerts are not supported: JIRA FAB-1401

clempo (Fri, 28 Apr 2017 14:09:23 GMT):
I am still looking for help to make the integration tests run again after I upgraded to the latest commit levels

clempo (Fri, 28 Apr 2017 14:09:45 GMT):
Is this a known issue: 2017-04-27 15:47:58 ERROR HFCAClient:527 - POST request to http://localhost:7054/api/v1/enroll failed with status code: 404. Response: 404 page not found

clempo (Fri, 28 Apr 2017 14:10:31 GMT):
latest commit levels -> latest recommended commit levels

clempo (Fri, 28 Apr 2017 14:33:33 GMT):
I rebuilt the docker images with make docker in $GOPATH/src/github.com/hyperledger/fabric

clempo (Fri, 28 Apr 2017 14:33:56 GMT):
I tried make docker in fabric-ca but it same there was nothing to build

clempo (Fri, 28 Apr 2017 14:34:14 GMT):
now I get: org.hyperledger.fabric.sdk.exception.EventHubException: io.grpc.StatusRuntimeException: UNKNOWN: Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)"

yecineoueslati (Fri, 28 Apr 2017 16:23:06 GMT):
@clempo are you running inside vagrant?

clempo (Fri, 28 Apr 2017 16:41:47 GMT):
no, I was able to run with just docker before

clempo (Fri, 28 Apr 2017 16:42:17 GMT):
the e2e_cli runs fine without vagrant

clempo (Fri, 28 Apr 2017 16:43:00 GMT):
I would like to know if the integration tests are passing

clempo (Fri, 28 Apr 2017 16:43:13 GMT):
if they are, this is obviously something wrong with my environment

clempo (Fri, 28 Apr 2017 16:43:41 GMT):
I'm not sure how to prove I'm running the right docker images

clempo (Fri, 28 Apr 2017 16:44:28 GMT):
Is there documentation somewhere that would explain why we need vagrant to run docker containers?

clempo (Fri, 28 Apr 2017 16:44:53 GMT):
isn't that a vm technology used to run another vm technology?

clempo (Fri, 28 Apr 2017 16:45:46 GMT):
In any case, my problems appear to be protocol errors, not incomplete file systems in the containers

yecineoueslati (Fri, 28 Apr 2017 17:08:57 GMT):
i posted the same issue yesterday 2017-04-27 14:36:05 ERROR HFCAClient:527 - POST request to http://localhost:7054/api/v1/enroll failed with status code: 404. Response: 404 page not found and i was able to make it work with vagrant

yecineoueslati (Fri, 28 Apr 2017 17:09:09 GMT):

Message Attachments

yecineoueslati (Fri, 28 Apr 2017 17:11:36 GMT):
there is envirement variables who are present in vagrant config for exemple - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/tls/key.pem /etc/hyperledger/tls/key.pem do not exist in non vagrant config

yecineoueslati (Fri, 28 Apr 2017 17:12:40 GMT):
this is picked from docker-compose file in sdkintegration

yecineoueslati (Fri, 28 Apr 2017 17:14:20 GMT):
and finally i am not an expert maybe what i say is not correct

yecineoueslati (Fri, 28 Apr 2017 17:17:54 GMT):
i satrted playing with fabric last week i try to help with what i know

clempo (Fri, 28 Apr 2017 17:20:34 GMT):
@yecineoueslati where did you get your docker images?

clempo (Fri, 28 Apr 2017 17:21:50 GMT):
the link in the readme to setup the development environment is broken

clempo (Fri, 28 Apr 2017 17:30:17 GMT):
I don't understand the instructions to edit Vagrantfile

clempo (Fri, 28 Apr 2017 17:30:23 GMT):
what am I supposed to do with that line

clempo (Fri, 28 Apr 2017 17:30:24 GMT):
***config.vm.synced_folder "/home/user/fabric-sdk-java/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration"***

clempo (Fri, 28 Apr 2017 21:00:26 GMT):
I would like to know if working with vagrant is required for the sdk, because the readme suggests you don't need to. Should the readme be changed?

Yiiinsh (Sat, 29 Apr 2017 14:23:55 GMT):
Has joined the channel.

Yiiinsh (Sat, 29 Apr 2017 14:26:55 GMT):
Hello , I have successfully build the e2e environment.I want to use the HFClient as a query & invoke client and I skip the join peer & instantiate process.When I add an EventHub and initialize the client, I got the ERROR from peer:2017-04-29 14:08:42.539 UTC [eventhub_producer] Chat -> ERRO b5b Error during Chat, stopping handler: stream error: code = 13 desc = "grpc: failed to unmarshal the received message proto: peer.Register: illegal tag 0 (wire type 2)"

Yiiinsh (Sat, 29 Apr 2017 14:28:44 GMT):
Chain chain = client.newChain(getConfig(TEST_CHAIN_NAME_KEY)); chain.addOrderer(client.newOrderer(getConfig(TEST_ORDERER_NAME_KEY), getConfig(TEST_ORDERER_LOCATION_KEY))); config.getList(String.class, TEST_PEERS_NAME_KEY).stream().forEach((peer) -> { try { chain.addPeer(client.newPeer(peer, getConfig(TEST_PEERS_LOCATION_PREFIX + peer + TEST_PEERS_LOCATION_SUFFIX))); chain.addEventHub(client.newEventHub(peer, getConfig(TEST_PEERS_LOCATION_PREFIX + peer + TEST_EVENTHUB_SUFFIX))); } catch (Exception e) { logger.error("[queryTest][add peer][fail]Peer:{}", peer, e); fail(); } }); chain.initialize();

Yiiinsh (Sat, 29 Apr 2017 14:32:55 GMT):
BTW, the query and invoke works fine, but I cannot get the return value for `BlockEvent.TransactionEvent res = client.getChain(getConfig(TEST_CHAIN_NAME_KEY)).sendTransaction(transactionResponses).get();` and I think this has something to do with the eventhub

svasilyev (Sat, 29 Apr 2017 14:39:15 GMT):
Has joined the channel.

clempo (Sat, 29 Apr 2017 16:50:11 GMT):
I got the same error yesterday. I'm interested if you find the solution.

rickr (Mon, 01 May 2017 12:02:53 GMT):
Ran a test build at levels in the readme.md and all tests passed. If you running exactly the same to check out your install and it fails fairly certain it's something in your setup.

rickr (Mon, 01 May 2017 12:04:19 GMT):
Vagrant is not needed it's just a vm. However it's the lowest common denominator that all platforms should be able to use and eliminates some os dependencies.

clempo (Mon, 01 May 2017 13:55:05 GMT):
I am working on learning git and vagrant to become productive.

clempo (Mon, 01 May 2017 13:55:50 GMT):
Can you repair this link in the readme. It leads to a 404.

clempo (Mon, 01 May 2017 13:55:51 GMT):
•Follow the instructions here to setup the development environment.

clempo (Mon, 01 May 2017 13:57:12 GMT):
Is it supposed to point here? https://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devenv.html

MrBuggySan (Mon, 01 May 2017 20:19:06 GMT):
Has joined the channel.

wwendy (Tue, 02 May 2017 03:38:47 GMT):
Has joined the channel.

chaitanya (Tue, 02 May 2017 08:42:59 GMT):
Has joined the channel.

Aleks-visser (Tue, 02 May 2017 09:11:02 GMT):
Has joined the channel.

chaitanya (Tue, 02 May 2017 09:29:05 GMT):
I've been trying to deploy a chaincode using the Java-SDK, but I'm getting the following error: `java.lang.Exception: Not enough endorsers for invoke(move a,b,100):2 endorser error: Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=, cause=null}. Was verified: false` This is despite me deploying a different chaincode altogether. Any thoughts on why `description=` blank?

kelvinzhong (Tue, 02 May 2017 11:12:01 GMT):
hi @rickr ,is the genesisBlock not the first block of the ledge? which the genesisBlock is nothing to do with the ledge, right?

kelvinzhong (Tue, 02 May 2017 11:12:01 GMT):
the genesisBlock is about the msp config, am i right?

Aleks-visser (Tue, 02 May 2017 11:30:48 GMT):
Hey is the sdk in java cmpatable with the dev version of fabric

rickr (Tue, 02 May 2017 11:47:58 GMT):
@chaitanya In many cases the error's don't come back to the sdk. Try to look at the peer or orderer logs from the docker containers to see if there's any hint to the issue. Also look at logs the chaincode container and see if there are any hints there.

rickr (Tue, 02 May 2017 11:48:58 GMT):
The genesis block is on the ledger its the first block in the chain

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create build environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker```

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create build environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker```

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create build environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker``` If your OS supports docker and you have all the needed requirements installed you can buildrun without vagrant. The steps are pretty much the same excluding the vagrant specific steps above.

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create build environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker``` If your OS supports docker and you have all the needed requirements installed you can buildrun without vagrant. The steps are pretty much the same excluding the vagrant specific steps above.

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create Fabric environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker``` If your OS supports docker and you have all the needed requirements installed you can buildrun without vagrant. The steps are pretty much the same excluding the vagrant specific steps above.

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create Fabric environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker``` If your OS supports docker and you have all the needed requirements installed you can buildrun without vagrant. The steps are pretty much the same excluding the vagrant specific steps above.

rickr (Tue, 02 May 2017 12:03:07 GMT):
To create Fabric environment with vagrant : ************************************** ``` git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv/ change the Vagrant file as suggested in the readme.md vagrant up vagrant ssh make docker cd ../fabric-ca make docker``` If your OS supports docker and you have all the needed requirements installed you can buildrun without vagrant. The steps are pretty much the same excluding the vagrant specific steps above.

rickr (Tue, 02 May 2017 12:08:38 GMT):

rickr (Tue, 02 May 2017 12:10:43 GMT):

jingge (Tue, 02 May 2017 13:19:13 GMT):
Has joined the channel.

FengChen_1982 (Tue, 02 May 2017 13:55:16 GMT):
unlike Node SDK, java sdk is still not ready, right?

FengChen_1982 (Tue, 02 May 2017 14:07:29 GMT):
I'm the documents.

FengChen_1982 (Tue, 02 May 2017 14:07:45 GMT):
I mean the document level.

clempo (Tue, 02 May 2017 15:08:27 GMT):
I found this in the fabric devenv documentation.

clempo (Tue, 02 May 2017 15:08:30 GMT):
>> While we still maintain a Vagrant based approach that can be used for older versions of macOS and Windows that Docker does not support, we strongly encourage that the non-Vagrant development setup be used.

clempo (Tue, 02 May 2017 15:09:05 GMT):
This is the reason why I thought vagrant was unnecessary

clempo (Tue, 02 May 2017 15:09:53 GMT):
@rickr, are you able to make it work without vagrant as you suggest above?

rickr (Tue, 02 May 2017 15:52:42 GMT):
I always use vagrant because it allows me to more quickly switch between versions of the Fabric. The verify and merge builds do not use Vagrant. and Vagrant will be supported for some time to come probably always

clempo (Tue, 02 May 2017 15:58:40 GMT):
I don't have anything against vagrant. In fact, I find it pretty cool when it runs setup.sh and everything is installed.

clempo (Tue, 02 May 2017 15:59:36 GMT):
The reason I stress the point of vagrant is because the readmes told me not to use it and that cost me days in productivity

clempo (Tue, 02 May 2017 15:59:44 GMT):
In fact, I'm still down.

clempo (Tue, 02 May 2017 15:59:55 GMT):
This is costing my company money.

clempo (Tue, 02 May 2017 16:00:44 GMT):
I would prefer if the java sdk readme said: forget what the devenv readme says, use vagrant because that's the only thing we promise will work

clempo (Tue, 02 May 2017 16:01:34 GMT):
If we keep the readmes as is, then it should work as promised too.

clempo (Tue, 02 May 2017 16:03:03 GMT):
I am not complaining about my devenv setup. I'm trying to save days to all the other developers following me

cshields (Tue, 02 May 2017 17:18:08 GMT):
I've followed the instructions in https://github.com/hyperledger/fabric-sdk-java/blob/master/README.md When I run 'docker-compose up -d --force-recreate' I get the following: ubuntu@hyperledger-devenv:b2a2b3b:/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration$ docker-compose up -d --force-recreate Pulling ca1 (hyperledger/fabric-ca:latest)... ERROR: manifest for hyperledger/fabric-ca:latest not found Do you have any suggestions as to the cause of this?

clempo (Tue, 02 May 2017 17:25:13 GMT):
@cshields, did you "make docker" as rickr explained at 8:10 above

clempo (Tue, 02 May 2017 17:25:55 GMT):
I'm not there yet, I'm still trying to fix my Vagrantfile

clempo (Tue, 02 May 2017 17:28:26 GMT):
@rickr, why are there stars around this line in the readme?

clempo (Tue, 02 May 2017 17:28:28 GMT):
***config.vm.synced_folder "/home/user/fabric-sdk-java/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration"***

rickr (Tue, 02 May 2017 17:29:50 GMT):
Don't recall maybe it was an attempt to make it bold

clempo (Tue, 02 May 2017 17:30:38 GMT):
so the stars don't belong there, and the line must be added to Vagrantfile?

cshields (Tue, 02 May 2017 17:42:34 GMT):
@clempo I had run make docker for fabric-ca but got the following: ubuntu@hyperledger-devenv:b2a2b3b:/opt/gopath/src/github.com/hyperledger/fabric-ca$ make docker make: Nothing to be done for 'docker'. I've now run 'make clean' followed by 'make docker' and it's fixed the problem, thanks.

clempo (Tue, 02 May 2017 17:45:14 GMT):
I've had that message before. Nice to know the fix.

clempo (Tue, 02 May 2017 17:45:40 GMT):
My vagrant VM is still booting. Takes a while to provision the first time.

clempo (Tue, 02 May 2017 17:45:48 GMT):
I'll reach your point soon.

rickr (Tue, 02 May 2017 18:19:27 GMT):
no stars all that line does is map a mount to the sdkintegration directory and then you can easily in vagrant go to fabric/sdkintegration and you should have your docker-compose file and all the files it needs

rohitbordia (Tue, 02 May 2017 23:34:58 GMT):
Im getting this error : network sdkintegration_default not manually attachable

rohitbordia (Wed, 03 May 2017 01:43:51 GMT):
how to solve this

rohitbordia (Wed, 03 May 2017 01:43:52 GMT):
2017-05-02 18:42:38 ERROR Chain:1972 - Sending proposal to peer1 failed because of gRPC failure=Status{code=UNKNOWN, description=Timeout expired while starting chaincode example_cc_go:1(networkid:dev,peerid:peer1,tx:f4d624042db69eb9b463a86b6727e80121bd2444de1d89d69c27a98d07dffbc5), cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Timeout expired while starting chaincode example_cc_go:1(networkid:dev,peerid:peer1,tx:f4d624042db69eb9b463a86b6727e80121bd2444de1d89d69c27a98d07dffbc5) at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:1972)

rohitbordia (Wed, 03 May 2017 01:45:47 GMT):

Message Attachments

kelvinzhong (Wed, 03 May 2017 03:48:20 GMT):
@rohitbordia if u r using vm make sure the port redirection is set properly

kelvinzhong (Wed, 03 May 2017 03:48:49 GMT):
also the eventhub using different port for communicate

clempo (Wed, 03 May 2017 04:05:16 GMT):
@rohitbordia, the java sdk readme tells you which line to manually add to your Vagrantfile to configure the port redirection. The readme says vagrant is optional, but the instructions to run without it are not available, so might as well run with vagrant. I learned that the hard way.

albert.lacambra (Wed, 03 May 2017 06:21:54 GMT):
Has joined the channel.

xuanyue202 (Wed, 03 May 2017 07:34:56 GMT):
Hi, I noticed that currently the organization of a user will not be passed to the fabric-ca in a RegistrationRequest. Why is that?

bh4rtp (Wed, 03 May 2017 08:21:06 GMT):
hi, does anyone pass End2endIT.java test using the latest built fabric images? i face this issue. `ERROR OrdererClient:129 - sendTransaction error Send transactions failed. Reason: UNAVAILABLE`

kelvinzhong (Wed, 03 May 2017 08:22:01 GMT):
@bh4rtp check this https://github.com/hyperledger/fabric-sdk-java

bh4rtp (Wed, 03 May 2017 08:54:31 GMT):
@kelvinzhong i recloned java sdk, changed configtx.yaml, regenerated foo.tx, bar.tx and twoorgs.orderer.block. but End2endIT.java still cannot run correctly.

bh4rtp (Wed, 03 May 2017 08:54:31 GMT):
@kelvinzhong i recloned java sdk, modified configtx.yaml, regenerated foo.tx, bar.tx and twoorgs.orderer.block. but End2endIT.java still cannot run correctly.

kelvinzhong (Wed, 03 May 2017 08:56:52 GMT):

Message Attachments

kelvinzhong (Wed, 03 May 2017 08:57:04 GMT):
what's the error, have u use the proper images?

kelvinzhong (Wed, 03 May 2017 08:59:04 GMT):
but why u modified the configtx.yaml and the gensis block, it could run properly set as default in sdk

xixuejia (Wed, 03 May 2017 08:59:25 GMT):
Has joined the channel.

kelvinzhong (Wed, 03 May 2017 09:02:01 GMT):
i suggest u can use the v1.0 image publish by fabric

kelvinzhong (Wed, 03 May 2017 09:02:01 GMT):
i suggest u can use the v1.0 image published by fabric

bh4rtp (Wed, 03 May 2017 09:19:08 GMT):
@kelvinzhong got it. i used the latest fabric and ca images built from the latest committed sources.

kelvinzhong (Wed, 03 May 2017 09:24:49 GMT):
lol, u might ask rickr catch up to work with the latest build of fabric

mvkmvk (Wed, 03 May 2017 11:16:23 GMT):
Has joined the channel.

john2000 (Wed, 03 May 2017 13:11:36 GMT):
java.io.NotSerializableException: org.hyperledger.fabric.sdk.TestHFClient$1 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at org.hyperledger.fabric.sdkintegration.SampleUser.saveState(SampleUser.java:180) at org.hyperledger.fabric.sdkintegration.SampleUser.setEnrollment(SampleUser.java:264) at org.hyperledger.fabric.sdk.TestHFClient.newInstance(TestHFClient.java:51) at org.hyperledger.fabric.sdk.ChainTest.setupClient(ChainTest.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

john2000 (Wed, 03 May 2017 13:14:30 GMT):
i run "mvn test" everything is ok, just this

john2000 (Wed, 03 May 2017 13:15:04 GMT):
the result is "Tests run: 66, Failures: 0, Errors: 0, Skipped: 2 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:32.940s [INFO] Finished at: Wed May 03 15:06:43 CEST 2017 [INFO] Final Memory: 25M/94M [INFO] ------------------------------------------------------------------------"

rohitbordia (Wed, 03 May 2017 13:16:27 GMT):
@kelvinzhong / @clempo : i have set forwarding port in my files

rohitbordia (Wed, 03 May 2017 13:16:28 GMT):
manager.vm.network :forwarded_port, guest: 7051, host: 7051 manager.vm.network :forwarded_port, guest: 7056, host: 7056 manager.vm.network :forwarded_port, guest: 7054, host: 7054 manager.vm.network :forwarded_port, guest: 7050, host: 7050 manager.vm.network :forwarded_port, guest: 7053, host: 7053

clempo (Wed, 03 May 2017 13:18:41 GMT):
@rohitbordia, do you get any calls going, or it times out on the first call?

rohitbordia (Wed, 03 May 2017 13:19:12 GMT):
I have this working

rohitbordia (Wed, 03 May 2017 13:19:12 GMT):
Running Chain foo Creating install proposal Sending install proposal Successful install proposal response Txid: 762c380646a5c17d4d9eb3728490e3b031dd06ed2ec8671a54bfc33d34284ccf from peer peer0 Successful install proposal response Txid: 762c380646a5c17d4d9eb3728490e3b031dd06ed2ec8671a54bfc33d34284ccf from peer peer1

rohitbordia (Wed, 03 May 2017 13:19:36 GMT):
sendign instantiateProposalRequest , thats when it dies

clempo (Wed, 03 May 2017 13:20:34 GMT):
Did you reboot your vagrant after the first run?

clempo (Wed, 03 May 2017 13:20:40 GMT):
My motd said to reboot

rohitbordia (Wed, 03 May 2017 13:21:10 GMT):
yes

rohitbordia (Wed, 03 May 2017 13:21:16 GMT):
im trying to run in peer in multiple machines..

rohitbordia (Wed, 03 May 2017 13:22:15 GMT):
I have seen this same here error but no resolution : http://stackoverflow.com/questions/41011379/launchandwaitforregister-failed-timeout-expired-while-starting-chaincode

clempo (Wed, 03 May 2017 13:26:11 GMT):
do you mean run peers in multiple virtual machines, or multiple physical machines

rohitbordia (Wed, 03 May 2017 13:27:01 GMT):
multiple virtual machines

clempo (Wed, 03 May 2017 13:27:19 GMT):
your list of forwarded ports is too short

clempo (Wed, 03 May 2017 13:27:31 GMT):
did you add the lines the readme tell you to add

rohitbordia (Wed, 03 May 2017 13:28:12 GMT):
yes, I have all the ports from 7050 to 8056

rohitbordia (Wed, 03 May 2017 13:28:24 GMT):
8058 also

rohitbordia (Wed, 03 May 2017 13:28:44 GMT):
i have manager node, 2 worker connected using docker

clempo (Wed, 03 May 2017 13:29:42 GMT):
is this repeatable at the same spot? Is your host busy? Does it have enough RAM?

rohitbordia (Wed, 03 May 2017 13:30:15 GMT):
I have provided 4 gb ram.. yes after running 3-4 times its the same place same error

clempo (Wed, 03 May 2017 13:32:43 GMT):
Are you saying your physical host has 4GB or RAM?

clempo (Wed, 03 May 2017 13:32:50 GMT):
or -> of

clempo (Wed, 03 May 2017 13:33:06 GMT):
isn't that tiny to run so many VMs?

rohitbordia (Wed, 03 May 2017 13:35:31 GMT):
4 GB RAM for each VM

clempo (Wed, 03 May 2017 13:35:32 GMT):
@john2000 I get exceptions too when I run the integration tests. I always thought they were negative tests but I never confirmed.

clempo (Wed, 03 May 2017 13:36:15 GMT):
My only theory so far is your host is thrashing or not powerful enough

rohitbordia (Wed, 03 May 2017 13:40:41 GMT):
@clempo : did you check this URL : http://stackoverflow.com/questions/41011379/launchandwaitforregister-failed-timeout-expired-while-starting-chaincode

clempo (Wed, 03 May 2017 13:44:12 GMT):
That provides more help than I can offer. I'm just a noobie like you

clempo (Wed, 03 May 2017 13:45:57 GMT):
Do you have the recommended commit levels for fabric and fabric-ca?

rohitbordia (Wed, 03 May 2017 13:49:49 GMT):
yes , I did updated with those.. but seems like in comment they say : if you're doing with with straight-up docker/swarm, I had to patch the base-image with the hyperledger codebase (including core.yaml) to get it to work.

rohitbordia (Wed, 03 May 2017 13:49:55 GMT):
which I don't get it

clempo (Wed, 03 May 2017 13:50:13 GMT):
I gave up trying to run with just docker

clempo (Wed, 03 May 2017 13:50:33 GMT):
the sdk lead only works with vagrant

clempo (Wed, 03 May 2017 13:51:27 GMT):
I made it work once without vagrant by luck and lost 1w trying to get it back to work after I pulled the latest code

clempo (Wed, 03 May 2017 13:52:39 GMT):
if you are studying how to make new channels, then you are ahead of me

clempo (Wed, 03 May 2017 13:54:23 GMT):
I saw it work with vagrant yesterday.

clempo (Wed, 03 May 2017 13:55:17 GMT):
to get rid of vagrant you could study setup.sh and do the equivalent on your host

clempo (Wed, 03 May 2017 13:55:41 GMT):
I hope to do that one day, but for now having it run was more important

john2000 (Wed, 03 May 2017 14:20:10 GMT):
i try to use ide "idea" run "End2endIT" test , but face this error "404 http://localhost:7050". vagrant config:" config.vm.network "forwarded_port", guest: 7050, host: 7050, host_ip: "127.0.0.1"

john2000 (Wed, 03 May 2017 14:24:09 GMT):
i see the same erro,in ssh"wget http://localhost:7050"

john2000 (Wed, 03 May 2017 14:25:52 GMT):
i had download images using "/apps/svr/golang/src/github.com/hyperledger/fabric/examples/e2e_cli/download-dockerimages.sh" docker ps -a show like this:

john2000 (Wed, 03 May 2017 14:26:05 GMT):
e05c9c88d29f hyperledger/fabric-peer "peer node start -..." 22 seconds ago Up 19 seconds 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer3 0b4bceff6f7e hyperledger/fabric-peer "peer node start -..." 22 seconds ago Up 19 seconds 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1 527e0bf4f52b hyperledger/fabric-peer "peer node start -..." 25 seconds ago Up 22 seconds 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0 13ee2944c747 hyperledger/fabric-peer "peer node start -..." 25 seconds ago Up 22 seconds 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer2 6ca968bb78ee hyperledger/fabric-ca "sh -c 'fabric-ca-..." 30 seconds ago Up 26 seconds 0.0.0.0:8054->7054/tcp ca_peerOrg2 b28b9f7a07d5 hyperledger/fabric-orderer "orderer" 30 seconds ago Up 25 seconds 0.0.0.0:7050->7050/tcp orderer0 4aff0336a3be couchdb "tini -- /docker-e..." 30 seconds ago Up 26 seconds 0.0.0.0:5984->5984/tcp couchdb f72d6ab717d0 hyperledger/fabric-ca "sh -c 'fabric-ca-..." 30 seconds ago Up 26 seconds 0.0.0.0:7054->7054/tcp ca_peerOrg1

clempo (Wed, 03 May 2017 14:26:41 GMT):
yeah, I once did that and got it to work, but not since then

clempo (Wed, 03 May 2017 14:26:54 GMT):
it's hard to prove the commit level of those images

clempo (Wed, 03 May 2017 14:27:34 GMT):
I suggest you use vagrant like the readme and rebuild the images following the instructions there

clempo (Wed, 03 May 2017 14:27:46 GMT):
don't forget to make clean before make docker

clempo (Wed, 03 May 2017 14:35:23 GMT):
@rickr, can you fix the typo with the extra e: getTransactioneWaitTime()

rohitbordia (Wed, 03 May 2017 16:39:02 GMT):
@clempo : i ditched vagrant and did setup swarm on vm's and it worked

clempo (Wed, 03 May 2017 21:05:31 GMT):
Can someone explain how to change docker-compose.yaml and the fabric-sdk-java pom to only listen on SSL?

rickr (Wed, 03 May 2017 22:34:31 GMT):
For the services look at the .env file in the same directory as docker-comp.yaml . reverse the comments. For the SDK tests define a env var ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true

rickr (Wed, 03 May 2017 22:34:31 GMT):
For the services look at the .env file in the same directory as docker-comp.yaml . reverse the comments. For the SDK tests define a env var ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true When switch between TLS/nonTLS make sure you remove all docker containers that are chaincode deployments

rickr (Wed, 03 May 2017 22:34:31 GMT):
For the services look at the .env file in the same directory as docker-comp.yaml . reverse the comments. For the SDK tests define a env var ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true When switching between TLS/nonTLS make sure to remove all docker containers that are chaincode deployments

kelvinzhong (Thu, 04 May 2017 02:01:28 GMT):
@rohitbordia check the TestConfig.class, default port setting, and remember to restart ur vm after modify the vagrantfile!

tsnyder (Thu, 04 May 2017 10:15:48 GMT):
I have gone through the TestConfig.java setup. Is it a fair statement that the property information contained within it is the responsibility of the client app to persist and provide the SDK? Examples would be the Peer information on the network (or associated with a channel), User Context, Enrollment Cert, channels authorized to?

rickr (Thu, 04 May 2017 10:53:28 GMT):
There is no persistence in the JDK

rickr (Thu, 04 May 2017 10:53:28 GMT):
There is no persistence in the JDK . Consider it like an http client except it forms request to Fabric blockchain.

rickr (Thu, 04 May 2017 10:53:28 GMT):
There is no persistence in the JDK . Consider it like an http client except it forms request to Fabric blockchain. Stated in the READM.md if you haven't taken a look

rickr (Thu, 04 May 2017 10:53:28 GMT):
There is no persistence in the JDK . Consider it like an http client except it forms request to Fabric blockchain. Stated in the READM.md

rickr (Thu, 04 May 2017 12:37:12 GMT):
The SampleOrg SampleStore SampleUser provide a reasonable starting point. End2endIT and End2endAndBackAgainIT try to demonstrate. Embedding apps can have numerous requirements for their persistence and this allows the maximum flexibility

clempo (Thu, 04 May 2017 20:15:02 GMT):
@rickr, I followed the instructions to turn on SSL. Now I'm getting a timeout. Took minutes to timeout so it's not the timeout value.

clempo (Thu, 04 May 2017 20:15:03 GMT):
java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Timeout expired while starting chaincode example_cc_go:1(networkid:dev,peerid:peer1,tx:e802e38cfb6c28496fdd06791a22a3b390dba272957b0cc37221757cf5e28b29) at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:2041)

clempo (Thu, 04 May 2017 20:26:23 GMT):
Are the prebuilt ssl artifacts enough to run the testsuite or I need to regenerate them?

clempo (Thu, 04 May 2017 20:46:24 GMT):
is it possible the peers listen to different ports when SSL is turned on?

clempo (Thu, 04 May 2017 20:46:55 GMT):
I would need to tell vagrant in the Vagrantfile

rickr (Thu, 04 May 2017 21:06:10 GMT):
Should have to nothing the run the standard tests

rickr (Thu, 04 May 2017 21:06:10 GMT):
Should have to do nothing the run the standard tests

rickr (Thu, 04 May 2017 21:08:13 GMT):
There has just been code merged in about an hour ago where the certs don't match. Something I'm actively working on.

rickr (Thu, 04 May 2017 21:10:25 GMT):
You need to remove with docker all containers AND their docker images that are deployed chaincode. If you don't you'll most likely see a timeout

greg.haskins (Fri, 05 May 2017 02:28:56 GMT):
did the need to run "gulp watch" go away recently?

greg.haskins (Fri, 05 May 2017 02:29:37 GMT):
no matter what/where I try, I am seeing this all of a sudden

greg.haskins (Fri, 05 May 2017 02:29:41 GMT):
```ubuntu@hyperledger-devenv:ea91a99:/local-dev/git/fabric-sdk-node/fabric-client$ gulp watch [02:28:32] Local gulp not found in /local-dev/git/fabric-sdk-node [02:28:32] Try running: npm install gulp```

greg.haskins (Fri, 05 May 2017 02:30:33 GMT):
oops apologies folks...thought I clicked on the sdk-node channel

kelvinzhong (Fri, 05 May 2017 02:35:05 GMT):
lol

ayinde (Fri, 05 May 2017 02:36:14 GMT):
Has joined the channel.

PushpalathaHiremath (Fri, 05 May 2017 07:55:08 GMT):
Has joined the channel.

PushpalathaHiremath (Fri, 05 May 2017 07:58:54 GMT):

Message Attachments

PushpalathaHiremath (Fri, 05 May 2017 07:58:58 GMT):
Hi All : I'm following the https://github.com/hyperledger/fabric-sdk-java documentation to set up java sdk. When i execute the integration tests i get :

PushpalathaHiremath (Fri, 05 May 2017 07:58:58 GMT):
Hi All : I'm following the https://github.com/hyperledger/fabric-sdk-java documentation to set up java sdk. When i execute the integration tests i get above error. Can anyone help me get a clue.. Thank you

PushpalathaHiremath (Fri, 05 May 2017 07:58:58 GMT):
Hi All : I'm following the https://github.com/hyperledger/fabric-sdk-java documentation to set up java sdk. When i execute the integration tests i get above error. In the maven dependency report i see there are some " Used but undeclared dependencies" Do we need to add these jars separately? Can anyone help me get a clue.. Thank you

tom.appleyard (Fri, 05 May 2017 09:55:21 GMT):
Has joined the channel.

rickr (Fri, 05 May 2017 11:21:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=98qrsaxSYxxXf5fME) @greg.haskins Just tell those Node guys the need to fix their pom.xml LOL :)

rickr (Fri, 05 May 2017 11:33:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=FjXqcPzvahBxjTne3) @PushpalathaHiremath Nothing to add or remove. If you follow the README the integration test should all pass

clempo (Fri, 05 May 2017 14:34:05 GMT):
@PushpalathaHiremath, I got the same error trying to use docker directly. It worked when I used vagrant.

pschnap (Fri, 05 May 2017 15:06:14 GMT):
Did the CA interface change recently in the SDK? I'm trying the latest master against an earlier 1.0 alpha on Bluemix and it's erroring with a 404

szoghybe (Fri, 05 May 2017 15:42:29 GMT):
Has joined the channel.

clempo (Fri, 05 May 2017 15:54:55 GMT):
>>>You need to remove with docker all containers AND their docker images that are deployed chaincode. If you don't you'll most likely see a timeout

clempo (Fri, 05 May 2017 15:54:57 GMT):
I stopped docker, removed the containers, make clean, make docker, and I still get a timeout.

clempo (Fri, 05 May 2017 15:55:23 GMT):
also did rm -rf /var/hyperledger/*

clempo (Fri, 05 May 2017 15:55:39 GMT):
what's the trick to make it work with ssl?

clempo (Fri, 05 May 2017 15:56:15 GMT):
To remove the containers, I did docker rm $(docker ps -aq)

clempo (Fri, 05 May 2017 18:47:44 GMT):
Most likely my problem is due to this warning

clempo (Fri, 05 May 2017 18:47:45 GMT):
2017-05-05 18:47:08 WARN MacAddressUtil:139 - Failed to find a usable hardware address from the network interfaces; using random bytes: ff:94:f2:3b:04:b9:36:b7

clempo (Fri, 05 May 2017 18:48:04 GMT):
This was fixed in netty 4.1.9.Final

clempo (Fri, 05 May 2017 18:48:19 GMT):
but when I upgrade netty the integration test fails even more

clempo (Fri, 05 May 2017 18:48:48 GMT):
See https://github.com/ballerinalang/ballerina/issues/1981

kpkulkarni (Fri, 05 May 2017 18:55:27 GMT):
Has joined the channel.

rickr (Fri, 05 May 2017 19:45:09 GMT):
I see that all the time I think you're going down the wrong path pursuing that

kpkulkarni (Fri, 05 May 2017 19:51:12 GMT):
Hi, I am trying to build the java example.. I am getting build failure as gradle is not able to download shim-client jar.. Any idea?>> Here is the stacktrace: FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':examples:chaincode:java:SimpleSample:compileClasspath'. > Could not find org.hyperledger:shim-client:1.0. Searched in the following locations: file:/root/.m2/repository/org/hyperledger/shim-client/1.0/shim-client-1.0.pom file:/root/.m2/repository/org/hyperledger/shim-client/1.0/shim-client-1.0.jar https://repo1.maven.org/maven2/org/hyperledger/shim-client/1.0/shim-client-1.0.pom https://repo1.maven.org/maven2/org/hyperledger/shim-client/1.0/shim-client-1.0.jar Required by: project :examples:chaincode:java:SimpleSample

rickr (Fri, 05 May 2017 19:52:28 GMT):
Best asked in #fabric-java-chaincode

kpkulkarni (Fri, 05 May 2017 19:53:07 GMT):
@rickr Thanks

anarancio (Fri, 05 May 2017 20:03:48 GMT):
Has joined the channel.

anarancio (Fri, 05 May 2017 20:08:04 GMT):
hi guys, anyone has succeed to connect the sdk with a fabric 1.0 running on bluemix?

pschnap (Fri, 05 May 2017 20:22:13 GMT):
@anarancio which language's SDK?

pschnap (Fri, 05 May 2017 20:22:33 GMT):
nevermind, just looked at what channel I was in :-D

anarancio (Fri, 05 May 2017 20:22:37 GMT):
@pschnap java :)

anarancio (Fri, 05 May 2017 20:22:50 GMT):
we are having some issue related to TLS

pschnap (Fri, 05 May 2017 20:22:54 GMT):
& yes; the latest version in the repo won't connect, you have to go back a few revisions

anarancio (Fri, 05 May 2017 20:23:08 GMT):
oh

anarancio (Fri, 05 May 2017 20:23:16 GMT):
do you know which version?

pschnap (Fri, 05 May 2017 20:23:57 GMT):
The most recent version i've been able to connect with was 590f07467f89f71213788c8f511b0b3ee72f0b35

anarancio (Fri, 05 May 2017 20:24:10 GMT):
great! I will try, thanks!

akapustin (Sat, 06 May 2017 12:55:15 GMT):
Has joined the channel.

stu2 (Sun, 07 May 2017 21:05:52 GMT):
Has joined the channel.

wouterraateland (Mon, 08 May 2017 08:30:01 GMT):
Has joined the channel.

yecineoueslati (Mon, 08 May 2017 10:07:47 GMT):
hello i sucessfully run the End to end test After that want to use the java chaincode instead of the go one i tried to modify the path of chaincode to piont to pom.xml of the java chaincode but this dont work i get an error on invocation if anyone knows the steps to run the java chancode thx

yecineoueslati (Mon, 08 May 2017 10:09:15 GMT):

Message Attachments

CarlXK (Mon, 08 May 2017 11:28:43 GMT):
@here i got the error below(1.0alpha), can any one help please? Bad newest block expected status 200 got 403, Chain xnChannel org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 403, Chain xnChannel at org.hyperledger.fabric.sdk.Chain.getLatestBlock(Chain.java:1029) at org.hyperledger.fabric.sdk.Chain.getConfigurationBlock(Chain.java:866) at org.hyperledger.fabric.sdk.Chain.parseConfigBlock(Chain.java:789) at org.hyperledger.fabric.sdk.Chain.initialize(Chain.java:500)

chaitanya (Mon, 08 May 2017 12:14:59 GMT):
@ I am getting the following error: ``` 2017-05-08 15:50:07.056 ERROR --- [ main] org.hyperledger.fabric.sdk.Chain : Sending proposal to peer1 failed because of gRPC failure=Status{code=INTERNAL, description=io.grpc.netty.NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304. , cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: INTERNAL: io.grpc.netty.NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304. ``` when I try to use the fabric-sdk-java against my set of chaincodes. How to get past this `frame size` error/limit?

chaitanya (Mon, 08 May 2017 12:14:59 GMT):
@here I am getting the following error: ``` 2017-05-08 15:50:07.056 ERROR --- [ main] org.hyperledger.fabric.sdk.Chain : Sending proposal to peer1 failed because of gRPC failure=Status{code=INTERNAL, description=io.grpc.netty.NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304. , cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: INTERNAL: io.grpc.netty.NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304. ``` when I try to use the fabric-sdk-java against my set of chaincodes. How to get past this `frame size` error/limit?

rickr (Mon, 08 May 2017 12:36:10 GMT):
That requires setting properties on the Nettty channel builder. At the moment the only way to do that is changing the code in EndorserClient.java. There is in the pipeline a change so it can be changed at the SDK level

rickr (Mon, 08 May 2017 12:37:21 GMT):
AND please do not use ```@ here ```

zupan (Mon, 08 May 2017 12:50:38 GMT):
Has joined the channel.

sativ (Mon, 08 May 2017 13:02:19 GMT):
Has joined the channel.

zupan (Mon, 08 May 2017 13:14:46 GMT):
Hi, I am successfully running e2e example from `fabric-simple` and from self-generated docker images. I am trying to deploy custom chaincode similar to `java/chaincode_example02'. My problem is that after chaincode is successfully installed it fails when instantiating. In both examples I'm getting the same error... From CLI: ``` Error: Error endorsing chaincode: rpc error: code = 2 desc = Error starting container: The command '/bin/sh -c cd /root/chaincode/src && gradle -b build.gradle clean && gradle -b build.gradle build' returned a non-zero code: 1 ``` And logs from the failed image... ``` :compileJava Download https://repo1.maven.org/maven2/org/glassfish/javax.json/1.1.0-M1/javax.json-1.1.0-M1.pom Download https://repo1.maven.org/maven2/org/glassfish/json/1.1.0-M1/json-1.1.0-M1.pom Download https://repo1.maven.org/maven2/net/java/jvnet-parent/5/jvnet-parent-5.pom Download https://repo1.maven.org/maven2/org/glassfish/javax.json/1.1.0-M1/javax.json-1.1.0-M1.jar /root/chaincode/src/src/main/java/example/Example01.java:46: error: cannot find symbol final List args = stub.getArgsAsStrings(); ^ symbol: method getArgsAsStrings() location: variable stub of type ChaincodeStub /root/chaincode/src/src/main/java/example/Example01.java:66: error: cannot find symbol final List argList = stub.getArgsAsStrings(); ```

zupan (Mon, 08 May 2017 13:17:01 GMT):
And I'm not using any other dependency aside from what provided examples E.g.:`chaincode_example02`uses. Does anybody know of a resource that would show how to run simple java chaincode?

yecineoueslati (Mon, 08 May 2017 13:21:21 GMT):
i have got the same error

yecineoueslati (Mon, 08 May 2017 13:21:30 GMT):

Message Attachments

zupan (Mon, 08 May 2017 13:37:08 GMT):
@yecineoueslati I found out that my example was written before they changed interface.

zupan (Mon, 08 May 2017 13:38:06 GMT):
Try fist compiling code locally and make sure that you are deploying code following the interfaces that are used in your fabric deployment

yecineoueslati (Mon, 08 May 2017 13:39:28 GMT):
ok thx :slight_smile:

karumbas (Mon, 08 May 2017 16:28:46 GMT):

Message Attachments

karumbas (Mon, 08 May 2017 16:28:46 GMT):
@rickr
Message Attachments

karumbas (Mon, 08 May 2017 16:28:46 GMT):
@rickr
Message Attachments

zupan (Mon, 08 May 2017 17:24:10 GMT):
what are the resources needed to run test fabric with java blockchain

zupan (Mon, 08 May 2017 17:25:13 GMT):
Funny is that I can run base example (go) on vm with 2GB of RAM, but if I try java blockchain 4gb is not enough

zupan (Mon, 08 May 2017 17:25:49 GMT):
Has someone else this problem?

chaitanya (Mon, 08 May 2017 17:43:07 GMT):
We have a chaincode that deploys perfectly alright using the CLI, but is having issues when using SDK. The chaincode calls three other chaincodes during deploy. Is anyone else facing the same problem, or has any thoughts on what I could be missing here?

chaitanya (Mon, 08 May 2017 19:28:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9CxJEeZgYwiiRt4LH) @rickr Could you tell me what is causing this issue, since I've only recently started seeing this; Also not everyone around me is getting it?

rickr (Mon, 08 May 2017 22:01:01 GMT):
Your chaincode has become too large for the defaults set by grpc `NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304`

rickr (Mon, 08 May 2017 22:02:46 GMT):
@karumbas look at End2endAndBackAgainIT.java

rohitbordia (Mon, 08 May 2017 22:42:33 GMT):

Message Attachments

hdeakin (Tue, 09 May 2017 10:42:41 GMT):
Has joined the channel.

abaumhof (Tue, 09 May 2017 11:20:34 GMT):
Has joined the channel.

rickr (Tue, 09 May 2017 12:35:30 GMT):
Don't really ever see that. This I think should have been there when building the fabric best to ask on the #fabric-dev-env channel

rickr (Tue, 09 May 2017 12:37:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N5rL4ZeAM9mqYnoew) @zupan java chaincode question are probably best asked in #fabric-java-chaincode

nickmelis (Tue, 09 May 2017 13:21:22 GMT):
is there any Maven repo for the Java SDK?

rickr (Tue, 09 May 2017 13:28:12 GMT):
Being worked on.

rickr (Tue, 09 May 2017 13:28:12 GMT):
Being worked on. for v 1.0.0

nickmelis (Tue, 09 May 2017 13:33:41 GMT):
is there an easy way I can import Java SDK with Gradle without having to build it myself?

nickmelis (Tue, 09 May 2017 13:42:51 GMT):
I'm trying jitpack, that will probably do the trick

nickmelis (Tue, 09 May 2017 13:47:54 GMT):
other question: in v0.6 Java chaincode shim was in the same SDK project. Is it still the case?

nickmelis (Tue, 09 May 2017 13:55:05 GMT):
looking at https://github.com/hyperledger/fabric-sdk-java/blob/4d7a4d1459713f87f95bb4cc1ee0707d964165c7/src/test/fixture/sdkintegration/javacc/example_cc/build.gradle

nickmelis (Tue, 09 May 2017 13:55:25 GMT):
where does `compile 'org.hyperledger:shim-client:1.0'` come from?

rickr (Tue, 09 May 2017 13:57:24 GMT):
Java chaincode example has not been addressed in the Java SDK .. WIP

abaumhof (Tue, 09 May 2017 14:03:05 GMT):
@nickmelis I think you simply do a gradle build in core/chaincode/shim/java, which gives you shim-client

nickmelis (Tue, 09 May 2017 14:05:10 GMT):
yes but I don't want to have to do it manually

nickmelis (Tue, 09 May 2017 14:21:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=87e7p9pa3nK2ppueu) @rickr does it mean shim client will be part of the Java SDK at some point? Or will it be a totally separate project/repo?

jojialex2 (Wed, 10 May 2017 03:57:57 GMT):
Has joined the channel.

jordipainan (Wed, 10 May 2017 08:13:15 GMT):
Has joined the channel.

phil.gower (Wed, 10 May 2017 10:35:06 GMT):
Has joined the channel.

gauravgiri (Wed, 10 May 2017 15:13:16 GMT):
Has joined the channel.

clempo (Wed, 10 May 2017 16:31:47 GMT):
I am getting this error when running the integration test.

clempo (Wed, 10 May 2017 16:31:48 GMT):
2017-05-10 16:23:24,152 ERROR HFCAClient:580 - POST request to http://localhost:7054/api/v1/enroll with request body: {"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHKMHICAQAwEDEOMAwGA1UEAxMFYWRtaW4wWTATBgcqhkjOPQIBBggqhkjOPQMB\nBwNCAATvjf5pr2DnT2iY9gIXsKrqP0vmM3pzplGk1+KFykOS+HiumTKFj28Q6JEH\nK390CRsGLi+VUBH13QRuPJLhZoiBoAAwCgYIKoZIzj0EAwIDSAAwRQIgGYwm+aFj\nKVLpRuHnWoNMT7wWnwttwJB61uKmJ1O2eUYCIQDzST31w+XdIoaY6TPxKRz85mBI\nTYdWoCjbDJtuqoDj/A==\n-----END CERTIFICATE REQUEST-----\n"}, failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"open /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem: no such file or directory"}],"messages":[]}

clempo (Wed, 10 May 2017 16:31:58 GMT):
I updated to the recommended commit levels of May8/May7, rebuilt all of vagrant, rebuilt all of docker, rebuilt the sdk.

clempo (Wed, 10 May 2017 16:32:43 GMT):
Are you missing instructions to add a line in Vagrantfile or docker-compose.yml?

rickr (Wed, 10 May 2017 17:45:12 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/sdkintegration/docker-compose.yaml#l10 has /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem not /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem:

clempo (Wed, 10 May 2017 18:00:55 GMT):
I'm not sure what I'm supposed to conclude from that

clempo (Wed, 10 May 2017 18:05:41 GMT):
git reports my sdkintegration/docker-compose.yaml has no diff

rickr (Wed, 10 May 2017 18:09:45 GMT):
what happen if you do a git fetch

clempo (Wed, 10 May 2017 19:04:43 GMT):
git pull said I am up to date already

rickr (Wed, 10 May 2017 19:11:00 GMT):
did you do a git fetch ?

clempo (Wed, 10 May 2017 19:11:30 GMT):
I did a git pull before I compiled the sdk

clempo (Wed, 10 May 2017 19:11:37 GMT):
I thought git pull did a fetch

clempo (Wed, 10 May 2017 19:12:32 GMT):
I searched for peerOr1-cert in the sdk and did not find anything relevant

clempo (Wed, 10 May 2017 19:12:43 GMT):
I'm confused where it comes from

rickr (Wed, 10 May 2017 19:13:11 GMT):
have you done a git fetch ?

clempo (Wed, 10 May 2017 19:14:00 GMT):
no, I did git pull

clempo (Wed, 10 May 2017 19:16:07 GMT):
I typed git fetch and got no output

rickr (Wed, 10 May 2017 19:16:22 GMT):
now show me what git status says

clempo (Wed, 10 May 2017 19:20:08 GMT):
sdk-java$ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) modified: src/test/java/org/hyperledger/fabric/sdkintegration/IntegrationSuite.java Untracked files: (use "git add ..." to include in what will be committed) pom.xml.netty src/test/fixture/sdkintegration/docker-compose.yaml.bad src/test/java/org/hyperledger/fabric/sdkintegration/DumpUser1.java no changes added to commit (use "git add" and/or "git commit -a")

clempo (Wed, 10 May 2017 19:20:43 GMT):
sdk-java$ git diff src/test/java/org/hyperledger/fabric/sdkintegration/IntegrationSuite.java diff --git a/src/test/java/org/hyperledger/fabric/sdkintegration/IntegrationSuite.java b/src/test/java/org/hyperledger/fabric/sdkintegration/IntegrationSuite.java index b00f795..c7fc706 100644 --- a/src/test/java/org/hyperledger/fabric/sdkintegration/IntegrationSuite.java +++ b/src/test/java/org/hyperledger/fabric/sdkintegration/IntegrationSuite.java @@ -8,8 +8,9 @@ import org.junit.runners.Suite; @Suite.SuiteClasses({ End2endIT.class, - End2endAndBackAgainIT.class, - HFCAClientEnrollIT.class + DumpUser1.class, + //End2endAndBackAgainIT.class, + //HFCAClientEnrollIT.class }) public class IntegrationSuite {

clempo (Wed, 10 May 2017 19:21:05 GMT):
I don't reach DumpUser1

rickr (Wed, 10 May 2017 19:29:01 GMT):
Does your docker-compose match this https://ctrlv.it/id/27677/287263883

rickr (Wed, 10 May 2017 19:30:19 GMT):
Make sure you're comparing that where you're actually staring the fabric / fabric ca

clempo (Wed, 10 May 2017 19:30:43 GMT):
checking

clempo (Wed, 10 May 2017 19:32:32 GMT):
sdk-java/src/test/fixture/sdkintegration$ diff docker-compose.yaml docker-compose.yaml.rickr 1,2d0 < version: '2' < 132c130,131 < - peer0.org2.example.com \ No newline at end of file --- > - peer0.org2.example.com >

rickr (Wed, 10 May 2017 19:37:44 GMT):
I'm at a loss at the moment as that error you show seems to I think reference something old

rickr (Wed, 10 May 2017 19:38:20 GMT):
dump your ca0 logs

clempo (Wed, 10 May 2017 19:41:49 GMT):
can you tell me how to do that

clempo (Wed, 10 May 2017 19:44:38 GMT):
docker exec -it ca_peerOrg1 bash

clempo (Wed, 10 May 2017 19:44:40 GMT):
then?

clempo (Wed, 10 May 2017 19:45:52 GMT):
root@802ba52acb14:/# cd /etc/hyperledger/ root@802ba52acb14:/etc/hyperledger# ls ls: cannot access 'fabric-ca-server-config': No such file or directory fabric-ca-server fabric-ca-server-config tls

clempo (Wed, 10 May 2017 19:46:11 GMT):
that's bizarre

rickr (Wed, 10 May 2017 20:05:22 GMT):
docker logs ca0 ?

clempo (Wed, 10 May 2017 20:06:44 GMT):
I guess you mean docker logs ca_peerOrg1

clempo (Wed, 10 May 2017 20:08:40 GMT):
ubuntu@hyperledger-devenv:e182390:/opt/gopath/src/github.com/hyperledger/fabric-sdk-java/src/test/fixture/sdkintegration$ docker logs ca_peerOrg1 2017/05/10 15:42:16 [INFO] Created default configuration file at /etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml 2017/05/10 15:42:16 [INFO] Starting server in home directory: /etc/hyperledger/fabric-ca-server 2017/05/10 15:42:16 [DEBUG] Initializing default ca 2017/05/10 15:42:16 [DEBUG] CA initialization started 2017/05/10 15:42:16 [INFO] CA Home Directory: /etc/hyperledger/fabric-ca-server 2017/05/10 15:42:16 [DEBUG] Software key file store directory: /etc/hyperledger/fabric-ca-server/keystore 2017/05/10 15:42:16 [DEBUG] Init CA with home /etc/hyperledger/fabric-ca-server and config {CA:{Name: Keyfile:/etc/hyperledger/fabric-ca-server-config/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc310894150908b90f05e9179556a_sk Certfile:/etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem Chainfile:ca-chain.pem} ParentServer:{URL: CAName:} Signing:0xc42024d950 CSR:{CN:fabric-ca-server Names:[{C:US ST:North Carolina L: O:Hyperledger OU:Fabric SerialNumber:}] Hosts:[802ba52acb14] KeyRequest: CA: SerialNumber:} Registry:{MaxEnrollments:0 Identities:[{Name:admin Pass:adminpw Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.Registrar.Roles:client,user,peer,validator,auditor,ca hf.Registrar.DelegateRoles:client,user,validator,auditor hf.Revoker:1 hf.IntermediateCA:1]}]} Affiliations:map[org1:[department1 department2] org2:[department1]] LDAP:{Enabled:false URL:ldap://:@:/ UserFilter:(uid=%s) GroupFilter:(memberUid=%s) TLS:{Enabled:false CertFiles:[/etc/hyperledger/fabric-ca-server/ldap-server-cert.pem] Client:{KeyFile:/etc/hyperledger/fabric-ca-server/ldap-client-key.pem CertFile:/etc/hyperledger/fabric-ca-server/ldap-client-cert.pem}}} DB:{Type:sqlite3 Datasource:fabric-ca-server.db TLS:{Enabled:false CertFiles:[/etc/hyperledger/fabric-ca-server/db-server-cert.pem] Client:{KeyFile:/etc/hyperledger/fabric-ca-server/db-client-key.pem CertFile:/etc/hyperledger/fabric-ca-server/db-client-cert.pem}}} CSP:0xc420231fe0 Client:} 2017/05/10 15:42:16 [INFO] The CA key and certificate files already exist 2017/05/10 15:42:16 [INFO] Key file location: /etc/hyperledger/fabric-ca-server-config/d8a5b3cac1b821f6e4b487ceaf1fd239cdcfc310894150908b90f05e9179556a_sk 2017/05/10 15:42:16 [INFO] Certificate file location: /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem 2017/05/10 15:42:16 [DEBUG] Initializing 'sqlite3' database at '/etc/hyperledger/fabric-ca-server/fabric-ca-server.db' 2017/05/10 15:42:16 [DEBUG] Using sqlite database, connect to database in home (/etc/hyperledger/fabric-ca-server/fabric-ca-server.db) directory 2017/05/10 15:42:16 [DEBUG] Database (/etc/hyperledger/fabric-ca-server/fabric-ca-server.db) does not exist 2017/05/10 15:42:16 [DEBUG] Creating SQLite Database... 2017/05/10 15:42:16 [DEBUG] Database location: /etc/hyperledger/fabric-ca-server/fabric-ca-server.db 2017/05/10 15:42:16 [DEBUG] Creating tables...

clempo (Wed, 10 May 2017 20:08:58 GMT):
2017/05/10 15:42:16 [DEBUG] Created users table 2017/05/10 15:42:16 [DEBUG] Created affiliation table 2017/05/10 15:42:16 [DEBUG] Created certificates table 2017/05/10 15:42:16 [DEBUG] Successfully opened sqlite3 DB 2017/05/10 15:42:16 [DEBUG] Initializing identity registry 2017/05/10 15:42:16 [DEBUG] Initialized DB identity registry 2017/05/10 15:42:16 [DEBUG] Loading identity table 2017/05/10 15:42:16 [DEBUG] Loading identity 'admin' 2017/05/10 15:42:16 [DEBUG] DB: Getting identity admin 2017/05/10 15:42:16 [DEBUG] DB: Add identity admin 2017/05/10 15:42:16 [DEBUG] Successfully added Identity admin to the database 2017/05/10 15:42:16 [DEBUG] Registered identity: { Name:admin Pass:**** Type:client Affiliation: MaxEnrollments:0 Attrs:map[hf.Registrar.Roles:client,user,peer,validator,auditor,ca hf.Registrar.DelegateRoles:client,user,validator,auditor hf.Revoker:1 hf.IntermediateCA:1] } 2017/05/10 15:42:16 [DEBUG] Successfully loaded identity table 2017/05/10 15:42:16 [DEBUG] Loading affiliations table 2017/05/10 15:42:16 [DEBUG] Adding affiliation org1 2017/05/10 15:42:16 [DEBUG] DB: Add affiliation org1 2017/05/10 15:42:16 [DEBUG] Adding affiliation org1.department1 2017/05/10 15:42:16 [DEBUG] DB: Add affiliation org1.department1 2017/05/10 15:42:16 [DEBUG] Adding affiliation org1.department2 2017/05/10 15:42:16 [DEBUG] DB: Add affiliation org1.department2 2017/05/10 15:42:16 [DEBUG] Adding affiliation org2 2017/05/10 15:42:16 [DEBUG] DB: Add affiliation org2 2017/05/10 15:42:16 [DEBUG] Adding affiliation org2.department1 2017/05/10 15:42:16 [DEBUG] DB: Add affiliation org2.department1 2017/05/10 15:42:16 [DEBUG] Successfully loaded affiliations table 2017/05/10 15:42:16 [DEBUG] Successfully loaded groups table 2017/05/10 15:42:16 [INFO] Initialized sqlite3 database at /etc/hyperledger/fabric-ca-server/fabric-ca-server.db 2017/05/10 15:42:16 [DEBUG] Initializing enrollment signer 2017/05/10 15:42:16 [DEBUG] No key found in BCCSP keystore, attempting fallback 2017/05/10 15:42:16 [DEBUG] validating configuration 2017/05/10 15:42:16 [DEBUG] validate local profile 2017/05/10 15:42:16 [DEBUG] profile is valid 2017/05/10 15:42:16 [DEBUG] validate local profile 2017/05/10 15:42:16 [DEBUG] profile is valid 2017/05/10 15:42:16 [DEBUG] CA initialization successful 2017/05/10 15:42:16 [DEBUG] Adding CA to server 2017/05/10 15:42:16 [INFO] Home directory for CA '': /etc/hyperledger/fabric-ca-server 2017/05/10 15:42:16 [DEBUG] 1 CA instance(s) running on server 2017/05/10 15:42:16 [INFO] Listening at http://0.0.0.0:7054 2017/05/10 16:23:24 [DEBUG] Received request POST /api/v1/enroll Authorization: Basic YWRtaW46YWRtaW5wdw==

clempo (Wed, 10 May 2017 20:09:20 GMT):
{"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHKMHICAQAwEDEOMAwGA1UEAxMFYWRtaW4wWTATBgcqhkjOPQIBBggqhkjOPQMB\nBwNCAATvjf5pr2DnT2iY9gIXsKrqP0vmM3pzplGk1+KFykOS+HiumTKFj28Q6JEH\nK390CRsGLi+VUBH13QRuPJLhZoiBoAAwCgYIKoZIzj0EAwIDSAAwRQIgGYwm+aFj\nKVLpRuHnWoNMT7wWnwttwJB61uKmJ1O2eUYCIQDzST31w+XdIoaY6TPxKRz85mBI\nTYdWoCjbDJtuqoDj/A==\n-----END CERTIFICATE REQUEST-----\n"} 2017/05/10 16:23:24 [DEBUG] Directing traffic to default CA 2017/05/10 16:23:24 [DEBUG] DB: Getting identity admin 2017/05/10 16:23:24 [DEBUG] DB: Login identity admin with max enrollments of 0 and state of 0 2017/05/10 16:23:24 [DEBUG] DB: Successfully incremented state for identity admin to 1 2017/05/10 16:23:24 [DEBUG] DB: identity admin successfully logged in 2017/05/10 16:23:24 [DEBUG] Identity/Pass was correct 2017/05/10 16:23:24 [DEBUG] Received request for endpoint enroll 2017/05/10 16:23:24 [DEBUG] Enrollment request: {SignRequest:{Hosts:[] Request:-----BEGIN CERTIFICATE REQUEST----- MIHKMHICAQAwEDEOMAwGA1UEAxMFYWRtaW4wWTATBgcqhkjOPQIBBggqhkjOPQMB BwNCAATvjf5pr2DnT2iY9gIXsKrqP0vmM3pzplGk1+KFykOS+HiumTKFj28Q6JEH K390CRsGLi+VUBH13QRuPJLhZoiBoAAwCgYIKoZIzj0EAwIDSAAwRQIgGYwm+aFj KVLpRuHnWoNMT7wWnwttwJB61uKmJ1O2eUYCIQDzST31w+XdIoaY6TPxKRz85mBI TYdWoCjbDJtuqoDj/A== -----END CERTIFICATE REQUEST----- Subject: Profile: CRLOverride: Label: Serial: Extensions:[]} CAName:} 2017/05/10 16:23:24 [DEBUG] CSR request received 2017/05/10 16:23:24 [INFO] signed certificate with serial number 587062908621041781220931343103241304774213609514 2017/05/10 16:23:24 [DEBUG] DB: Insert Certificate 2017/05/10 16:23:24 [DEBUG] Saved serial number as hex 66d4cfafa741312e6bf119c6acf74066aa37a82a 2017/05/10 16:23:24 [DEBUG] saved certificate with serial number 587062908621041781220931343103241304774213609514 2017/05/10 16:23:24 [INFO] 172.18.0.1:55866 - "POST /api/v1/enroll" 0 ubuntu@hyperledger-devenv:e182390:/opt/gopath/src/github.com/hyperledger/fabric-sdk-java/src/test/fixture/sdkintegration$

clempo (Wed, 10 May 2017 20:32:58 GMT):
any more suggestion how to debug this?

rickr (Wed, 10 May 2017 20:37:08 GMT):
It looks like it connects I don't see any errors .. maybe ask on the fabric-ca channel

rickr (Wed, 10 May 2017 20:38:12 GMT):
and the error on the client is still `500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"open /etc/hyperledger/fabric-ca-server-config/peerOrg1-cert.pem: no such file or directory"}],"m`

clempo (Wed, 10 May 2017 20:40:40 GMT):
we know from ls the dir itself does not exist

rickr (Wed, 10 May 2017 20:41:04 GMT):
something you can try .. but don't think it will be fruitfull is try in another directory to download a fresh copy of the java sdk .. do a directory compare make sure it's all in sync

clempo (Wed, 10 May 2017 20:41:26 GMT):
isn't it what git is supposed to solve

clempo (Wed, 10 May 2017 20:50:53 GMT):
I did docker stop ..., docker rm..., docker compose..., mvn failsafe:integration-test -DskipITs=false

clempo (Wed, 10 May 2017 20:51:04 GMT):
this time I got further but I'm back where I started

clempo (Wed, 10 May 2017 20:51:22 GMT):
2017-05-10 20:49:09,467 ERROR Chain:2146 - Sending proposal to peer0.org1.example.com failed because of timeout(60000 milliseconds) expiration java.util.concurrent.TimeoutException at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:411) at org.hyperledger.fabric.sdk.Chain.sendProposalToPeers(Chain.java:2133) at org.hyperledger.fabric.sdk.Chain.sendInstantiationProposal(Chain.java:1289)

rickr (Wed, 10 May 2017 20:52:00 GMT):
so what fixed your other problem ?

clempo (Wed, 10 May 2017 20:52:21 GMT):
no idea

clempo (Wed, 10 May 2017 20:53:09 GMT):
any suggestion for the timeout?

clempo (Wed, 10 May 2017 20:53:18 GMT):
60sec is long enough

rickr (Wed, 10 May 2017 20:53:51 GMT):
look at the peer docker logs for errors

rickr (Wed, 10 May 2017 20:55:01 GMT):
When you went to a new fabric build ... did you start with a new vagrant envionrment .. or did you just do a git pull in each project and rebuilt ?

clempo (Wed, 10 May 2017 20:55:29 GMT):
git pull, make clean, make docker

clempo (Wed, 10 May 2017 20:56:42 GMT):
not quite

clempo (Wed, 10 May 2017 20:57:14 GMT):
pulled to get new Vagrantfile

clempo (Wed, 10 May 2017 20:57:22 GMT):
redid vagrant

clempo (Wed, 10 May 2017 20:57:32 GMT):
within vagrant, I did the makes

clempo (Wed, 10 May 2017 20:58:59 GMT):
what are these containers?

clempo (Wed, 10 May 2017 20:59:00 GMT):
41cba1210732 dev-peer1.org1.example.com-example_cc_go-1 "chaincode -peer.a..." 4 minutes ago Up 4 minutes dev-peer1.org1.example.com-example_cc_go-1 76230c270b49 dev-peer0.org1.example.com-example_cc_go-1 "chaincode -peer.a..." 4 minutes ago Up 4 minutes dev-peer0.org1.example.com-example_cc_go-1

rickr (Wed, 10 May 2017 20:59:54 GMT):
IMO I would start with a new vagrant to be make sure it was really all clean .. AND if you are doing to do that .. you need to do a `make docker clean` first. I would go to each project do that .. then do .. a `docker images` make sure NOTHING is there ... then do the builds

clempo (Wed, 10 May 2017 21:00:26 GMT):
that takes a whole day

clempo (Wed, 10 May 2017 21:00:49 GMT):
I thought that's what I tried to achieve

clempo (Wed, 10 May 2017 21:01:14 GMT):
I doubt you spend a whole day rebuilding vagrant every week

rickr (Wed, 10 May 2017 21:01:38 GMT):
I usually get that done in 30 min

clempo (Wed, 10 May 2017 21:02:16 GMT):
maybe my Linux box is VMed to begin with

rickr (Wed, 10 May 2017 21:02:29 GMT):
Like I said .. if you want to keep your Vagrant .. make sure there are NO docker images around

clempo (Wed, 10 May 2017 21:02:54 GMT):
I can do that

rickr (Wed, 10 May 2017 21:04:45 GMT):
Also double check when you do a clean ... that there is no `build` directory in each project .. just to make sure

rickr (Wed, 10 May 2017 21:09:21 GMT):
I should say in theory you shouldn't have to do this but I think it's best practice

rohitbordia (Wed, 10 May 2017 22:21:31 GMT):
@rickr: how does this get created : dev-peer1-example_cc_go-1

rohitbordia (Wed, 10 May 2017 22:22:44 GMT):
in my vagrant setup thats not getting created.. but standalone works

rickr (Wed, 10 May 2017 22:23:09 GMT):
when you instantiate chaincode that is

rohitbordia (Wed, 10 May 2017 22:23:32 GMT):
from my vagrant setup.. I think thats where its failing

rohitbordia (Wed, 10 May 2017 22:24:19 GMT):
im puzzled coz other setup works , I mean mac+ docker , ubuntu + docker works

rohitbordia (Wed, 10 May 2017 22:24:30 GMT):
only the moment i do vagrant im stuck

rickr (Wed, 10 May 2017 22:25:34 GMT):
does it fail when instantiating chaincode ?

rohitbordia (Wed, 10 May 2017 22:25:38 GMT):
yes

rickr (Wed, 10 May 2017 22:25:51 GMT):
you probably had a bad build

rohitbordia (Wed, 10 May 2017 22:26:13 GMT):
i tried twice .. cleaning vagrant ..cleaning docker images

rohitbordia (Wed, 10 May 2017 22:27:08 GMT):

Message Attachments

rickr (Wed, 10 May 2017 22:27:42 GMT):
in vagrant make sure nothing is running `docker ps -a`

rohitbordia (Wed, 10 May 2017 22:28:10 GMT):
yep..

rickr (Wed, 10 May 2017 22:28:19 GMT):
then do the make clean docker-clean

rickr (Wed, 10 May 2017 22:28:35 GMT):
then do docker images

rickr (Wed, 10 May 2017 22:28:53 GMT):
make sure no fabric images are there

rickr (Wed, 10 May 2017 22:29:02 GMT):
do make clean

rickr (Wed, 10 May 2017 22:29:12 GMT):
make sure no build directory is there

rickr (Wed, 10 May 2017 22:29:29 GMT):
then do make docker

rickr (Wed, 10 May 2017 22:30:13 GMT):
usually vagrant builds work where builds on native have issues . my experience

rohitbordia (Wed, 10 May 2017 22:30:45 GMT):
ok

rohitbordia (Thu, 11 May 2017 01:02:39 GMT):
didnt worked cleaned re created new vagrant

lenin.mehedy (Thu, 11 May 2017 01:29:11 GMT):
Has joined the channel.

kelvinzhong (Thu, 11 May 2017 02:40:56 GMT):
are u missing the ccenv image?

kelvinzhong (Thu, 11 May 2017 02:41:02 GMT):
@rohitbordia

rohitbordia (Thu, 11 May 2017 03:27:00 GMT):
hmm sdk example compose file .. does not have ccenv image

kelvinzhong (Thu, 11 May 2017 03:35:51 GMT):
it's not include in the compose file, it's called by the peer when u exec the instantiate, and put the chaincode into the ccenv container and make the chaincode container @rohitbordia

rohitbordia (Thu, 11 May 2017 03:36:06 GMT):
aah

rohitbordia (Thu, 11 May 2017 03:36:12 GMT):
thanks ..

kelvinzhong (Thu, 11 May 2017 03:36:31 GMT):
you could check docker images whether u have download the ccenv

rohitbordia (Thu, 11 May 2017 03:36:40 GMT):
yea i dont have it..

kelvinzhong (Thu, 11 May 2017 03:37:00 GMT):
then try it out, i think that is the problem

rohitbordia (Thu, 11 May 2017 03:37:49 GMT):
thanks.. you saved me start hating vagrant

kelvinzhong (Thu, 11 May 2017 03:38:07 GMT):
lol thats ok

kelvinzhong (Thu, 11 May 2017 06:09:06 GMT):
@rickr hi, i wonder is that possible to range query of the block, as currently we only have chain.queryBlockByNumber(), but sometimes we might need to go through all the block sequentially to check all data, and query only one block at a time is too inefficient for that

ermyas (Thu, 11 May 2017 06:50:39 GMT):
Has joined the channel.

bluefire (Thu, 11 May 2017 06:51:55 GMT):
Has joined the channel.

rickr (Thu, 11 May 2017 10:57:48 GMT):
Sound reasonable. You can open open a JIRA improvement for that..

nherbaut33 (Thu, 11 May 2017 13:27:24 GMT):
Has joined the channel.

nherbaut33 (Thu, 11 May 2017 13:32:32 GMT):
Hi I'm trying to follow the "Java SDK end to end" video. When trying to run docker compose, the fabric-ca container always fails with the following error ``` fabric-ca: not found ``` I've built the container from source: ``` ~/work/src/github.com/hyperledger/fabric-ca$ git rev-parse HEAD 73a42156f637702b2ac8d4ceae0d663c4c688ed4 ``` What do I got wrong?

nherbaut33 (Thu, 11 May 2017 13:32:32 GMT):
Hi I'm trying to follow the "Java SDK end to end" video. When trying to run docker compose, the fabric-ca container always fails with the following error ``` fabric-ca: not found ``` I've built the docker image from source: ``` ~/work/src/github.com/hyperledger/fabric-ca$ git rev-parse HEAD 73a42156f637702b2ac8d4ceae0d663c4c688ed4 ``` What do I got wrong?

webdaford (Thu, 11 May 2017 18:55:20 GMT):
Has joined the channel.

kelvinzhong (Fri, 12 May 2017 02:35:05 GMT):
okay, i have create a New Feature, hope it could be done XD

kelvinzhong (Fri, 12 May 2017 02:35:17 GMT):
https://jira.hyperledger.org/browse/FAB-3884

rmohta (Fri, 12 May 2017 05:00:00 GMT):
Has joined the channel.

rmohta (Fri, 12 May 2017 05:45:14 GMT):
@here In End2endIT.java, we are setting up admin, user1 and peerAdmin. Now this is done, by talking to fabric-ca. What if I would like to do all this *manually*? What special goes into the cert creation and/or crypto-config.yaml and crypto-config.yaml files?

rmohta (Fri, 12 May 2017 05:45:52 GMT):
Also, what's the difference between an admin and peerAdmin, that we see in End2endIT.java?

zhangchao (Fri, 12 May 2017 09:29:19 GMT):
Has joined the channel.

zhangchao (Fri, 12 May 2017 09:32:26 GMT):
When a peer is joining the channel, will the chain check the peer's certificate to accept or reject it ? I cannot find where the peer's cert is used when joining a chain in End2EndIT.java , which codes like below: for (String peerName : sampleOrg.getPeerNames()) { String peerLocation = sampleOrg.getPeerLocation(peerName); Peer peer = client.newPeer(peerName, peerLocation, testConfig.getPeerProperties(peerName)); newChain.joinPeer(peer); out("Peer %s joined chain %s", peerName, name); sampleOrg.addPeer(peer); }

zhangchao (Fri, 12 May 2017 09:33:29 GMT):
can somebody give some advice?

CarlXK (Fri, 12 May 2017 09:46:20 GMT):
I got this error, anyone seen it? @here ``` Exception in thread "main" org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 403, Chain xnChannel at org.hyperledger.fabric.sdk.Chain.getLatestBlock(Chain.java:1049) at org.hyperledger.fabric.sdk.Chain.getConfigurationBlock(Chain.java:890) at org.hyperledger.fabric.sdk.Chain.parseConfigBlock(Chain.java:815) at org.hyperledger.fabric.sdk.Chain.initialize(Chain.java:531) at com.xiangan.platform.chainserver.DeployChainCode.constructChain(DeployChainCode.java:132) at com.xiangan.platform.chainserver.DeployChainCode.setUp(DeployChainCode.java:83) at com.xiangan.platform.chainserver.DeployChainCode.main(DeployChainCode.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) ```

szoghybe (Fri, 12 May 2017 13:43:24 GMT):
Hello, I've managed to follow the fabric-sdk-java instructions to the letter, have built my Linux Ubuntu virtual image, and successfully ran the following:

szoghybe (Fri, 12 May 2017 13:43:28 GMT):
make docker cd ../fabric-ca make docker cd ../fabric/sdkintegration docker-compose down; rm -rf /var/hyperledger/*; docker-compose up --force-recreate Now, what quick Hyperledger Fabric Java test or demo can I run? Is there a procedure I can refer to?

szoghybe (Fri, 12 May 2017 13:43:55 GMT):
Preferably one that will impress mu manager.

szoghybe (Fri, 12 May 2017 13:43:57 GMT):
;)

szoghybe (Fri, 12 May 2017 13:52:35 GMT):
I seem to have 5 containers running, and I believe this corresponds to the 2 companies, each with two peers plus one solo container scebnario. Can anyone confirm? 2017-05-12 13:45:41.217 UTC [chaincode] launchAndWaitForRegister -> DEBU 056 start container with env: peer1.org2.example.com | CORE_CHAINCODE_ID_NAME=cscc:1.0.0-snapshot-a39904a peer1.org2.example.com | CORE_PEER_TLS_ENABLED=false peer1.org2.example.com | CORE_CHAINCODE_LOGGING_LEVEL=info peer1.org2.example.com | CORE_CHAINCODE_LOGGING_SHIM=warning peer1.org2.example.com | CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message} peer1.org2.example.com | 2017-05-12 13:45:41.220 UTC [chaincode] launchAndWaitForRegister -> DEBU 09a start container with env: peer1.org2.example.com | CORE_CHAINCODE_ID_NAME=lscc:1.0.0-snapshot-a39904a peer1.org2.example.com | CORE_PEER_TLS_ENABLED=false peer1.org2.example.com | CORE_CHAINCODE_LOGGING_LEVEL=info peer1.org2.example.com | CORE_CHAINCODE_LOGGING_SHIM=warning peer1.org2.example.com | CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message} peer1.org2.example.com | 2017-05-12 13:45:41.223 UTC [chaincode] launchAndWaitForRegister -> DEBU 0d5 start container with env: peer1.org2.example.com | CORE_CHAINCODE_ID_NAME=escc:1.0.0-snapshot-a39904a peer1.org2.example.com | CORE_PEER_TLS_ENABLED=false peer1.org2.example.com | CORE_CHAINCODE_LOGGING_LEVEL=info peer1.org2.example.com | CORE_CHAINCODE_LOGGING_SHIM=warning peer1.org2.example.com | CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message} peer1.org2.example.com | 2017-05-12 13:45:41.228 UTC [chaincode] launchAndWaitForRegister -> DEBU 110 start container with env: peer1.org2.example.com | CORE_CHAINCODE_ID_NAME=vscc:1.0.0-snapshot-a39904a peer1.org2.example.com | CORE_PEER_TLS_ENABLED=false peer1.org2.example.com | CORE_CHAINCODE_LOGGING_LEVEL=info peer1.org2.example.com | CORE_CHAINCODE_LOGGING_SHIM=warning peer1.org2.example.com | CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message} peer1.org2.example.com | 2017-05-12 13:45:41.233 UTC [chaincode] launchAndWaitForRegister -> DEBU 14a start container with env: peer1.org2.example.com | CORE_CHAINCODE_ID_NAME=qscc:1.0.0-snapshot-a39904a peer1.org2.example.com | CORE_PEER_TLS_ENABLED=false peer1.org2.example.com | CORE_CHAINCODE_LOGGING_LEVEL=info peer1.org2.example.com | CORE_CHAINCODE_LOGGING_SHIM=warning peer1.org2.example.com | CORE_CHAINCODE_LOGGING_FORMAT=%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}

szoghybe (Fri, 12 May 2017 13:53:18 GMT):
What do I do next?

szoghybe (Fri, 12 May 2017 14:00:48 GMT):
Can anyone help me out? I've documented every step required to set this all up on Windows and would like to dump this to a Wordpress.com blog.

clempo (Fri, 12 May 2017 14:41:36 GMT):
@szoghybe, take a look at End2endIT and the other samples in fabric-sdk-java\src\test\java\org\hyperledger\fabric\sdkintegration

clempo (Fri, 12 May 2017 14:43:24 GMT):
@szoghybe, it's not clear if hyperledger fully supports development on Windows. It is a lot easier to work on Linux for now.

clempo (Fri, 12 May 2017 14:44:27 GMT):
They want to support Windows eventually, but my impression is you are a pioneer

szoghybe (Fri, 12 May 2017 14:45:04 GMT):
Thank you. I'm trying this out in a Linux virtual image successfully built with Vagrant and Cygwin.

szoghybe (Fri, 12 May 2017 14:45:15 GMT):
That was the easy part.

szoghybe (Fri, 12 May 2017 14:46:19 GMT):
I've done a find -name but cannot find fabric-sdk-java-1.0.0-SNAPSHOT.jar

clempo (Fri, 12 May 2017 14:46:28 GMT):
You are lucky that everything worked for you. I'm having all sorts of problems making my build work

szoghybe (Fri, 12 May 2017 14:46:32 GMT):
I guess I have to build it ?

clempo (Fri, 12 May 2017 14:47:02 GMT):
yes, vagrant sets up the test bed to run the hyperledger network you will call from Java

szoghybe (Fri, 12 May 2017 14:47:07 GMT):
I've documented all and will post to Wordpress. The Pluralsight course on Vagrant was very helpful.

clempo (Fri, 12 May 2017 14:47:21 GMT):
don't know that course

szoghybe (Fri, 12 May 2017 14:47:47 GMT):
pluralsight.com

szoghybe (Fri, 12 May 2017 14:47:49 GMT):
Pluralsight Introduction to Versioning Environments With Vagrant

clempo (Fri, 12 May 2017 14:48:03 GMT):
did you follow the fabric-sdk-java readme to edit your Vagrantfile?

szoghybe (Fri, 12 May 2017 14:48:16 GMT):
Yes. I have

szoghybe (Fri, 12 May 2017 14:48:52 GMT):
config.vm.network :forwarded_port, guest: 7056, host: 7056, id: "java7056", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 7058, host: 7058, id: "java7058", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8051, host: 8051, id: "java8051", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8053, host: 8053, id: "java8053", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8054, host: 8054, id: "java8054", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8056, host: 8056, id: "java8056", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8058, host: 8058, id: "java8058", host_ip: "localhost", autocorrect: true config.vm.synced_folder "..", "#{SRCMOUNT}" config.vm.synced_folder "..", "/opt/gopath/src/github.com/hyperledger/fabric" config.vm.synced_folder "fabric-sdk-java-master/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration" config.vm.synced_folder ENV.fetch('LOCALDEVDIR', ".."), "#{LOCALDEV}"

clempo (Fri, 12 May 2017 14:49:01 GMT):
I followed it too literally, it's missing an end quote

szoghybe (Fri, 12 May 2017 14:49:03 GMT):
I tested my synced folders worked

szoghybe (Fri, 12 May 2017 14:49:19 GMT):
Yes, an end quote was missing

clempo (Fri, 12 May 2017 14:49:49 GMT):
@rickr please fix the readme, it's missing an end quote here: config.vm.synced_folder "/home/<>/fabric-sdk-java/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration

szoghybe (Fri, 12 May 2017 14:50:16 GMT):
In Cygwin I did:

clempo (Fri, 12 May 2017 14:50:24 GMT):
please contribute your other findings

clempo (Fri, 12 May 2017 14:50:31 GMT):
rickr is pretty good at fixing things

szoghybe (Fri, 12 May 2017 14:50:32 GMT):
cd /cygdrive/c/gocode git config --global core.autocrlf false git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric/devenv wget https://github.com/hyperledger/fabric-sdk-java/archive/master.zip unzip ./master.zip vi Vagrantfile

clempo (Fri, 12 May 2017 14:50:59 GMT):
what's this master.zip thing?

clempo (Fri, 12 May 2017 14:51:31 GMT):
you are building from the master branch of fabric and fabric-ca

szoghybe (Fri, 12 May 2017 14:51:41 GMT):
The "download zip" at https://github.com/hyperledger/fabric-sdk-java

clempo (Fri, 12 May 2017 14:51:44 GMT):
you should use the recommended commit levels

szoghybe (Fri, 12 May 2017 14:52:06 GMT):
Which are (?)

clempo (Fri, 12 May 2017 14:52:20 GMT):
they change constantly, they are in the readme

clempo (Fri, 12 May 2017 14:52:50 GMT):
why not check out the source of the sdk with git?

clempo (Fri, 12 May 2017 14:53:05 GMT):
it will be easier to update the source that way

clempo (Fri, 12 May 2017 14:54:00 GMT):
@rickr, can you add the instructions to check out the sdk with git to avoid that kind of confusion

clempo (Fri, 12 May 2017 14:54:49 GMT):
the commit levels were updated recently so your master branch might work

clempo (Fri, 12 May 2017 14:54:57 GMT):
two weeks ago, that did not work

clempo (Fri, 12 May 2017 14:55:14 GMT):
when fabric makes incompatible changes, the sdk needs time to fix it

szoghybe (Fri, 12 May 2017 14:55:37 GMT):
Hmmm... I know you're talking about the commitlevel mentioned on https://github.com/hyperledger/fabric-sdk-java but I searched for it yesterday and again today. Haven't figured out where it is...

clempo (Fri, 12 May 2017 14:56:07 GMT):
search for "Valid builds of Fabric and Fabric-ca"

clempo (Fri, 12 May 2017 14:56:36 GMT):
then use the guid in the commands

szoghybe (Fri, 12 May 2017 14:56:36 GMT):
Anyhow, so far with the master I was able to make docker in fabri9c and fabric-ca

clempo (Fri, 12 May 2017 14:56:37 GMT):
git reset --hard fabric-ca_commitlevel from above

szoghybe (Fri, 12 May 2017 14:57:18 GMT):
Yes, that command. Shouldn't I replace "commitlevel" with a number?

clempo (Fri, 12 May 2017 14:57:21 GMT):
sure, that is supposed to work, but the sdk team cannot guarantee fabric did not break anything

clempo (Fri, 12 May 2017 14:57:29 GMT):
yes

clempo (Fri, 12 May 2017 14:57:43 GMT):
the one in the section I mentionned

clempo (Fri, 12 May 2017 14:58:43 GMT):
currently, that's: git reset --hard 73a42156f637702b2ac8d4ceae0d663c4c688ed4

clempo (Fri, 12 May 2017 14:59:02 GMT):
like I said, no big deal this week, but learn how to do it for later

szoghybe (Fri, 12 May 2017 14:59:54 GMT):
All right. I had no idea I was supposed to use a hash, I thought it was an integer. Suppose I now want to run End2endIT. What do I need to build first? The SDK? On the host or image?

clempo (Fri, 12 May 2017 15:00:52 GMT):
not clear in the instructions

clempo (Fri, 12 May 2017 15:01:07 GMT):
java is run anywhere, so that could be the host or within vagrant

szoghybe (Fri, 12 May 2017 15:01:31 GMT):
Tell me about it. It looks like a Penguin documented that bit. ;)

clempo (Fri, 12 May 2017 15:02:06 GMT):
I'm rebuilding my host, and when I get there I want to build the sdk directly on the host

clempo (Fri, 12 May 2017 15:02:22 GMT):
in any case, the instructions do not mount the source code within vagrant

clempo (Fri, 12 May 2017 15:03:16 GMT):
careful what you say, you might need rickr's help like we all do

clempo (Fri, 12 May 2017 15:03:33 GMT):
better to make specific suggestions

clempo (Fri, 12 May 2017 15:04:11 GMT):
I consider myself lucky the developer takes time to answer questions

clempo (Fri, 12 May 2017 15:04:29 GMT):
but at the same time, it's clear the product is not mature

szoghybe (Fri, 12 May 2017 15:05:37 GMT):
That's OK. My goal for now is to document the set up and run a Java test case. End2endIT. sounds about right.

clempo (Fri, 12 May 2017 15:06:00 GMT):
it's the first test in the integration suite, it's easier to run the full suite

clempo (Fri, 12 May 2017 15:06:28 GMT):
mvn install or mvn install -DskipTests

clempo (Fri, 12 May 2017 15:06:31 GMT):
to build

clempo (Fri, 12 May 2017 15:06:45 GMT):
mvn failsafe:integration-test -DskipITs=false

clempo (Fri, 12 May 2017 15:06:49 GMT):
to run the samples

clempo (Fri, 12 May 2017 15:07:48 GMT):
if you can make it work under windows, I might consider trying it

szoghybe (Fri, 12 May 2017 15:09:35 GMT):
Trying in parallel to built an image with the latest. Hava a syntax error with the Git command

szoghybe (Fri, 12 May 2017 15:09:37 GMT):
bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest $ cd fabric-ca cd ../fabric git reset --hard 73a42156f637702b2ac8d4ceae0d663c4c688ed4 bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric-ca $ git reset --hard e182390035ec207535c7ba0f5df70dc702057e18 fatal: Impossible d'analyser l'objet 'e182390035ec207535c7ba0f5df70dc702057e18'. bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric-ca $ cd ../fabric bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric $ git reset --hard 73a42156f637702b2ac8d4ceae0d663c4c688ed4 fatal: Impossible d'analyser l'objet '73a42156f637702b2ac8d4ceae0d663c4c688ed4'.

clempo (Fri, 12 May 2017 15:10:30 GMT):
you have to cd to the correct source dir

clempo (Fri, 12 May 2017 15:10:40 GMT):
you did both in fabric-ca

clempo (Fri, 12 May 2017 15:10:45 GMT):
follow the readme exactly

szoghybe (Fri, 12 May 2017 15:12:47 GMT):
Indeed.

szoghybe (Fri, 12 May 2017 15:12:49 GMT):
bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric $ cd ../fabric-ca bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric-ca $ git reset --hard 73a42156f637702b2ac8d4ceae0d663c4c688ed4 HEAD est maintenant à 73a4215 Merge "[ FAB-1892 ] - Add LDAP to fvt test image" bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric-ca $ cd ../fabric bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric $ git reset --hard e182390035ec207535c7ba0f5df70dc702057e18 HEAD est maintenant à e1823900 Merge "[FAB-3698] def inst. policy needs to include channel" bszoghy@QDW-5115 /cygdrive/c/Golang/fabric_java_latest/fabric

clempo (Fri, 12 May 2017 15:14:05 GMT):
This destroyed your changes to Vagrantfile, you have to reapply them

szoghybe (Fri, 12 May 2017 15:31:42 GMT):
Applied.

szoghybe (Fri, 12 May 2017 15:31:44 GMT):
cd /cygdrive/c/gocode mkdir fabric_java_latest cd /cygdrive/c/gocode/fabric_java_latest git config --global core.autocrlf false git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric-ca git reset --hard e182390035ec207535c7ba0f5df70dc702057e18 cd ../fabric git reset --hard 73a42156f637702b2ac8d4ceae0d663c4c688ed4 cd devenv git clone https://github.com/hyperledger/fabric-sdk-java.git vi Vagrantfile # Add: config.vm.network :forwarded_port, guest: 7056, host: 7056, id: "java7056", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 7058, host: 7058, id: "java7058", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8051, host: 8051, id: "java8051", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8053, host: 8053, id: "java8053", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8054, host: 8054, id: "java8054", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8056, host: 8056, id: "java8056", host_ip: "localhost", autocorrect: true config.vm.network :forwarded_port, guest: 8058, host: 8058, id: "java8058", host_ip: "localhost", autocorrect: true # replace config.vm.synced block with: config.vm.synced_folder "..", "#{SRCMOUNT}" config.vm.synced_folder "..", "/opt/gopath/src/github.com/hyperledger/fabric" config.vm.synced_folder "fabric-sdk-java-master/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration" config.vm.synced_folder ENV.fetch('LOCALDEVDIR', ".."), "#{LOCALDEV}" # avoid duplicate virtual machine name by editing line: vb.name = "hyperledger-java-latest" # save in vi and exit: :wq

szoghybe (Fri, 12 May 2017 15:32:06 GMT):
vagrant up

karumbas (Fri, 12 May 2017 15:42:36 GMT):
@here anyone who can help me with this. Only occurs when tls is enabled. ``` Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hyperledger.fabric.sdk.Chain]: Factory method 'reconstructChain' threw exception; nested exception is java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. ``

karumbas (Fri, 12 May 2017 15:42:36 GMT):
@here anyone who can help me with this. Only occurs when tls is enabled. ``` Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hyperledger.fabric.sdk.Chain]: Factory method 'reconstructChain' threw exception; nested exception is java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. ```

Willson (Fri, 12 May 2017 15:49:13 GMT):
@karumbas ```Currently, the pom.xml is set to use netty-tcnative-boringssl for TLS connection to Orderer and Peers, however you can change the pom.xml (uncomment a few lines) to use an alternative TLS connection via ALPN.```

Willson (Fri, 12 May 2017 15:49:13 GMT):
@karumbas `Currently, the pom.xml is set to use netty-tcnative-boringssl for TLS connection to Orderer and Peers, however you can change the pom.xml (uncomment a few lines) to use an alternative TLS connection via ALPN.`

karumbas (Fri, 12 May 2017 15:51:15 GMT):
@Willson ok thanks, let me try that.

clempo (Fri, 12 May 2017 16:05:11 GMT):
@szoghybe, here is how to check out the sdk using git: git clone ssh://clempo@gerrit.hyperledger.org:29418/fabric-sdk-java

szoghybe (Fri, 12 May 2017 16:07:10 GMT):
My understanding is that the difference between git clone https://github.com/hyperledger/fabric-sdk-java.git and git clone ssh://clempo@gerrit.hyperledger.org:29418/fabric-sdk-java is if you want to contribute to the SDK or not. The first is a read-only copy. Am I right?

szoghybe (Fri, 12 May 2017 16:08:49 GMT):
You must be right, tho, vagrant up failed with an auth error.> default: gpg: requesting key 2C52609D from hkp server p80.pool.sks-keyservers.net ==> default: gpgkeys: key 58118E89F3A912897C070ADBF76221572C52609D can't be retrieved

clempo (Fri, 12 May 2017 16:10:06 GMT):
you need to replace clempo with your LFID

clempo (Fri, 12 May 2017 16:10:26 GMT):
I followed the instructions to setup the devenv for fabric itself

clempo (Fri, 12 May 2017 16:10:52 GMT):
rickr added the calls to GitHub later in the readme

clempo (Fri, 12 May 2017 16:11:46 GMT):
yes, GitHub is read only

clempo (Fri, 12 May 2017 16:12:28 GMT):
though contributing would require a pull request anyway

clempo (Fri, 12 May 2017 16:12:36 GMT):
not sure there is a big diff

clempo (Fri, 12 May 2017 16:13:44 GMT):
@rickr, is this still exact in the readme: Read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-java https://hyperledger.org

clempo (Fri, 12 May 2017 16:15:15 GMT):
what's the relation between gerrit.hyperledger.org:29418 and gerrit.hyperledger.org/r/#/admin/projects

szoghybe (Fri, 12 May 2017 16:16:02 GMT):
Looks like I needed to add GnuPG to my Cygwin. Retrying vagrant up...

rickr (Fri, 12 May 2017 16:43:34 GMT):
github is readonly copy but sometimes lags gerrit so you could but a commit level that my not be immediately in github.

rickr (Fri, 12 May 2017 16:43:34 GMT):
github is readonly copy but sometimes lags gerrit so you could put a commit level that my not be immediately in github.

rickr (Fri, 12 May 2017 16:46:46 GMT):
If there are small changes to the READM.md I'll gladly do minor changes. Remember this is open source and if you're benefiting from this and feel you can improve on the READM.md that too is fair game to supply a patch to be merged and contribute something back.

rickr (Fri, 12 May 2017 16:55:46 GMT):
My thanks to @Willson and @clempo for trying to help others out

szoghybe (Fri, 12 May 2017 17:03:05 GMT):
vagrant up

szoghybe (Fri, 12 May 2017 17:05:06 GMT):
wrong window. ;)

clempo (Fri, 12 May 2017 18:27:38 GMT):
@rmohta, I have the same pet peeve with the integration test suite. Obviously, you can create your users ahead of time. That would be the normal use case. Unfortunately, the sdk as it stands delegates this problem to the app since it has no persistence. In practice, what this means is you have to implement your own User and your own Enrollment. I hope we can convince the sdk maintainers to make this simpler in the future because absolutely everyone is affected.

rmohta (Fri, 12 May 2017 18:31:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ffByDJQrAofBmuz93) @clempo Agreed. As we try to implement our first real-work use case out, we're searching for these answers.

clempo (Fri, 12 May 2017 18:33:26 GMT):
I was able to do this by reading the pem files created by the command line utility that creates users

rmohta (Fri, 12 May 2017 18:34:17 GMT):
Yep. We're doing the same :-) @clempo

clempo (Fri, 12 May 2017 18:34:50 GMT):
took me a while to figure out the format expected by the sdk

clempo (Fri, 12 May 2017 18:39:28 GMT):
it's simpler now that there is no public key in Enrollment

rmohta (Fri, 12 May 2017 18:40:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DmjGC5wZeZG7HnEfs) @clempo What do you mean by that?

clempo (Fri, 12 May 2017 18:40:56 GMT):
PEMParser ecertParser = new PEMParser(new StringReader(pemECert)); X509Certificate ecert = null; try { X509CertificateHolder certHolder = (X509CertificateHolder)ecertParser.readObject(); ecert = new JcaX509CertificateConverter().setProvider( "BC" ) .getCertificate(certHolder); } finally { ecertParser.close(); }

clempo (Fri, 12 May 2017 18:41:51 GMT):
FileInputStream privKeyStream = new FileInputStream(privKeyPath); PEMParser keyParser = new PEMParser(new InputStreamReader(privKeyStream)); PrivateKey privKey = null; try { Object object = keyParser.readObject(); if (object instanceof PEMKeyPair) { JcaPEMKeyConverter converter = new JcaPEMKeyConverter().setProvider("BC"); KeyPair kp = converter.getKeyPair((PEMKeyPair) object); privKey = kp.getPrivate(); } else { throw new XDException("Expecting a PEMKeyPair, got " + object.getClass().getName()); } } finally { keyParser.close(); }

clempo (Fri, 12 May 2017 18:42:19 GMT):
Enrollment has two methods, it used to have 3

rmohta (Fri, 12 May 2017 18:42:59 GMT):
ah.. okay. Haven't looked into that for long. Thank You for this @clempo

clempo (Fri, 12 May 2017 18:43:37 GMT):
you will need to change XDException to another Exception you have

rmohta (Fri, 12 May 2017 18:45:42 GMT):
Btw, what the minimum size requirement for the keys? Is it 256 or more? I remember reading somewhere - the golang pakcage supports 2 or 3 types of key size

clempo (Fri, 12 May 2017 18:46:46 GMT):
don't know, I would use the same as the sample. With this code, you can read the pem and find out

clempo (Fri, 12 May 2017 18:47:00 GMT):
it's an EC key

clempo (Fri, 12 May 2017 18:47:32 GMT):
I don't know the common sizes for EC keys

rmohta (Fri, 12 May 2017 18:47:42 GMT):
@clempo okies. Will do that. Using openssl, we could see all the test keys were ecdsa-with-SHA256

clempo (Fri, 12 May 2017 18:48:24 GMT):
openssl should be able to tell you too, is there a verbose mode

rmohta (Fri, 12 May 2017 18:49:18 GMT):
`openssl x509 -text -in ` @clempo This should give you the information in human readable way

clempo (Fri, 12 May 2017 18:50:10 GMT):
that can give you the info on the public key

rmohta (Fri, 12 May 2017 18:50:32 GMT):
oh you're asking about private key?

clempo (Fri, 12 May 2017 18:51:03 GMT):
I guess the sizes of both keys are related

clempo (Fri, 12 May 2017 18:53:18 GMT):
I think you got confused by the output of openssl

clempo (Fri, 12 May 2017 18:53:30 GMT):
the algorithm you mention is for signatures

clempo (Fri, 12 May 2017 18:53:57 GMT):
the key algorithm is just ecdsa

clempo (Fri, 12 May 2017 18:54:29 GMT):
though openssl calls it id-ecPublicKey

clempo (Fri, 12 May 2017 18:55:23 GMT):
the size of the public key of the users created by the integration suite is 256

clempo (Fri, 12 May 2017 18:55:35 GMT):
just proved it

clempo (Fri, 12 May 2017 18:56:08 GMT):
using the command you gave

clempo (Fri, 12 May 2017 18:57:13 GMT):
@rickr, I rebuilt all my environment on a bigger box (now running Centos) and it worked.

clempo (Fri, 12 May 2017 19:04:26 GMT):
@rmohta notice you don't need to parse the cert to implement Enrollment, so the first piece of code is for debugging

clempo (Fri, 12 May 2017 19:07:08 GMT):
@rmohta, don't forget to return the right value for getMSPID() in your implementation of User

szoghybe (Fri, 12 May 2017 19:41:16 GMT):
@clempo Here are my complete setup notes on Windows, as discussed. I put them on a Wordpress blog: https://wordpress.com/post/bertrandszoghy.wordpress.com

szoghybe (Fri, 12 May 2017 19:41:31 GMT):
That's where I am at.

clempo (Fri, 12 May 2017 19:42:13 GMT):
thanks, I will save the link for later

szoghybe (Fri, 12 May 2017 19:42:24 GMT):
I used the commit level hashes on the Github page.

szoghybe (Fri, 12 May 2017 20:25:34 GMT):
Make that https://bertrandszoghy.wordpress.com/

szoghybe (Fri, 12 May 2017 20:25:42 GMT):
Natch.

szoghybe (Fri, 12 May 2017 20:25:50 GMT):
Have a nice weekend everyone!

Senthil1 (Sun, 14 May 2017 07:34:34 GMT):
Has joined the channel.

karumbas (Sun, 14 May 2017 15:49:12 GMT):
@here @Willson I added the TLS alternative dependency as directed and that resolved the ALPN config error but I am now getting a new error ``` Caused by: java.lang.IllegalArgumentException: No host in authority 'DigiCert SHA2 Secure Server CA' ``` This error occurs when adding a peer to the chain on this line ``` Peer peer = client.newPeer(peerName,org.getPeerLocation(peerName),channelConfig.getPeerProperties()); ``` Maybe another thing to note; I am connecting to bluemix HSBN.

bmalavan (Sun, 14 May 2017 18:10:06 GMT):
Has joined the channel.

Willson (Mon, 15 May 2017 02:12:41 GMT):
@karumbas I have not used bluemix, my fabric network runs on centos7 and it is working fine

karumbas (Mon, 15 May 2017 08:42:24 GMT):
Thanks @Willson, @rickr any ideas how I can resolve this https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8rCFahTWoqvLBPHKM

m.qaimari (Mon, 15 May 2017 09:07:58 GMT):
Has joined the channel.

nharshita (Mon, 15 May 2017 09:14:58 GMT):
Has joined the channel.

rickr (Mon, 15 May 2017 14:03:52 GMT):
Not sure of that error. Only thing I can say is your certs CN name needs to match the host or you must provide and override as was done in the end2end samples

rickr (Mon, 15 May 2017 14:03:52 GMT):
Not sure of that error. Only thing I can say is your certs CN name needs to match the host or you must provide an override as was done in the end2end samples

rickr (Mon, 15 May 2017 14:03:52 GMT):
Not sure of that error. Only thing I can say is your certs CN name needs to match the host or you must provide an override as was done in the end2end samples. Also from what I'll admit is limited exposure with ALPN I would prefer not to use it given it's bootloader requirements

simers (Mon, 15 May 2017 16:41:06 GMT):
Has joined the channel.

oooo (Tue, 16 May 2017 08:49:30 GMT):
Has joined the channel.

eetti (Tue, 16 May 2017 12:20:13 GMT):
Has joined the channel.

szoghybe (Tue, 16 May 2017 13:34:14 GMT):
Hello, I can vagrant ssh into my machine but can't SSH into it using Moba Xterm. I've been trying the various solutions described at: https://serverfault.com/questions/441431/cant-ssh-into-a-vagrant-virtual-machine

rocket.cat (Tue, 16 May 2017 13:34:14 GMT):
Marnin', szoghybe

szoghybe (Tue, 16 May 2017 13:34:37 GMT):
But none of them seem to work. What's the trick?

szoghybe (Tue, 16 May 2017 13:34:50 GMT):
TIA.

szoghybe (Tue, 16 May 2017 13:35:39 GMT):
Marnin' rocket.cat.

rocket.cat (Tue, 16 May 2017 13:35:39 GMT):
Good morning to you too, szoghybe

rickr (Tue, 16 May 2017 13:38:40 GMT):
Not sure why you do not want to use vagrant ssh since all your doing there is mostly some simple command lines stuff. But you'll probably get better luck asking on the #fabric-dev-env

szoghybe (Tue, 16 May 2017 13:43:01 GMT):
Hello rickr. Force of habit.

rocket.cat (Tue, 16 May 2017 13:43:01 GMT):
Hey szoghybe, Hello!

szoghybe (Tue, 16 May 2017 13:43:32 GMT):
Hello rocket.cat

rocket.cat (Tue, 16 May 2017 13:43:32 GMT):
Good day, szoghybe

clempo (Tue, 16 May 2017 16:17:23 GMT):
I am studying the security in End2endIT by comparing it to e2e_cli

clempo (Tue, 16 May 2017 16:17:35 GMT):
but there does not seem to be the notion of a user in e2e_cli

clempo (Tue, 16 May 2017 16:18:13 GMT):
what is different in End2endIT environment that requires users

clempo (Tue, 16 May 2017 16:19:07 GMT):
The end goal is to setup the environment of my own demo using command lines or static fixtures

clempo (Tue, 16 May 2017 16:19:37 GMT):
without requiring us to run End2endIT and dump the user enrollment as text output

rickr (Tue, 16 May 2017 16:20:22 GMT):
I have not done much with cli ... my understanding which could be wrong it always runs everything as the SDKs peer Admin

clempo (Tue, 16 May 2017 16:21:01 GMT):
I read somewhere security has to be turned on, is that still true?

rickr (Tue, 16 May 2017 16:21:26 GMT):
I'd ask that on fabric to make sure ... I'm not even it does enrollement of any type

rickr (Tue, 16 May 2017 16:21:26 GMT):
I'd ask that on fabric to make sure ... I'm not even sure it does enrollement of any type

clempo (Tue, 16 May 2017 16:22:09 GMT):
I thought the peer requests needed to be signed, so that would require keys

rickr (Tue, 16 May 2017 16:22:58 GMT):
Yes it has somewhere the peeradmin pkey and cert .. but I would ask on fabric they'd know for sure

clempo (Tue, 16 May 2017 16:23:53 GMT):
may try again, last time my newbie question on network topology got ignored

clempo (Tue, 16 May 2017 16:24:30 GMT):
I'll try to find the default user for the peer command

clempo (Tue, 16 May 2017 16:25:00 GMT):
I thought an envvar gave the dir of the key, but I can't find that var in e2e_cli either

clempo (Tue, 16 May 2017 16:25:57 GMT):
off topic, is there a hyperledger conf soon where there would be tutorial sessions?

clempo (Tue, 16 May 2017 16:26:35 GMT):
are you attending a conf soon?

rickr (Tue, 16 May 2017 16:27:20 GMT):
They don't let me leave my chair :)

clempo (Tue, 16 May 2017 16:28:54 GMT):
I hope they feed you intravenous pizza at least

rohitbordia (Tue, 16 May 2017 16:54:24 GMT):
@kelvinzhong : thanks for letting me know on ccenv container

rohitbordia (Tue, 16 May 2017 16:55:23 GMT):
finally it worked

VenuVemula (Tue, 16 May 2017 17:03:34 GMT):
Has joined the channel.

tmath (Wed, 17 May 2017 00:09:07 GMT):
Has joined the channel.

kelvinzhong (Wed, 17 May 2017 01:57:44 GMT):
congrats @rohitbordia

zhoupeiwen (Wed, 17 May 2017 08:08:58 GMT):
Hey All, does the java sdk work for the fabric alpha2 ?

dayubian (Wed, 17 May 2017 08:44:33 GMT):
@zhoupeiwen Yes, it works fine.

nickmelis (Wed, 17 May 2017 09:44:07 GMT):
@zhoupeiwen @dayubian a few days ago someone on #fabric-release said the Java SDK wouldn't be included in alpha2. Has it changed?

liuwenliang0632 (Wed, 17 May 2017 09:56:32 GMT):
Has joined the channel.

kelvinzhong (Wed, 17 May 2017 09:58:37 GMT):
@rickr hi, i found that the e2etestJava seems to be removed from the project, so currently the java chaincode could not work with the java sdk right?

liuwenliang0632 (Wed, 17 May 2017 10:01:00 GMT):
hi

rickr (Wed, 17 May 2017 10:02:04 GMT):
The java chain code test was removed because it was not up to date.

liuwenliang0632 (Wed, 17 May 2017 10:02:30 GMT):
i had fixed FAB-3969 ,please help me review.

liuwenliang0632 (Wed, 17 May 2017 10:02:50 GMT):
https://gerrit.hyperledger.org/r/#/c/9445/

rickr (Wed, 17 May 2017 10:04:04 GMT):
Code updates are momentarily locked down. No code changes are being added at the moment .

kelvinzhong (Wed, 17 May 2017 10:05:35 GMT):
so theoretically, it could work with the sdk?

rickr (Wed, 17 May 2017 10:06:18 GMT):
Haven tested it don't really know

rickr (Wed, 17 May 2017 10:06:18 GMT):
Haven't tested it don't really know

liuwenliang0632 (Wed, 17 May 2017 10:07:16 GMT):
@rickr are u talking me?

rickr (Wed, 17 May 2017 10:08:41 GMT):
Thanks for the update -- maybe a few days before I get a chance to look at it.

kelvinzhong (Wed, 17 May 2017 10:08:57 GMT):
okay... so the sdk could be worked, but what your concerned is whether the java chaincode could work?

kelvinzhong (Wed, 17 May 2017 10:09:26 GMT):
may be i could try it out

liuwenliang0632 (Wed, 17 May 2017 10:10:10 GMT):
@rickr ,can i add u to reviewer?

rickr (Wed, 17 May 2017 10:10:25 GMT):
yes

rickr (Wed, 17 May 2017 10:13:34 GMT):
If Java chaincode is working it should in theory work. May take some fixes in the SDK since that codepath has not been exercised in some time.

kelvinzhong (Wed, 17 May 2017 10:14:14 GMT):
okay~thx for the info

rickr (Wed, 17 May 2017 10:14:53 GMT):
Go ahead and give it a shot .. Tell me what's broken :)

kelvinzhong (Wed, 17 May 2017 10:15:15 GMT):
lol fine~

liuwenliang0632 (Wed, 17 May 2017 10:15:53 GMT):
i had add Rick Rine for https://gerrit.hyperledger.org/r/#/c/9445/

tmath (Wed, 17 May 2017 10:38:33 GMT):
is this tutorial for v1.0? http://hyperledger-fabric.readthedocs.io/en/latest/Setup/JAVAChaincode.html

rickr (Wed, 17 May 2017 10:41:14 GMT):
Best to ask that on #fabric-java-chaincode

tmath (Wed, 17 May 2017 10:43:15 GMT):
ok. What's the difference between the Java SDK and the Java fabric?

kelvinzhong (Wed, 17 May 2017 10:59:54 GMT):
description=Error starting container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"java\\\": executable file not found in $PATH\"\n

kelvinzhong (Wed, 17 May 2017 10:59:54 GMT):
i try to deploy the java chaincode and return this error description=Error starting container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"java\\\": executable file not found in $PATH\"\n

kelvinzhong (Wed, 17 May 2017 10:59:54 GMT):
i try to deploy the java chaincode and return this error while i try to instantiate description=Error starting container: API error (404): {"message":"oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"java\\\": executable file not found in $PATH\"\n

kelvinzhong (Wed, 17 May 2017 11:00:46 GMT):
i exec the Instantiate then return this error, but why would peer need jdk env.....

kelvinzhong (Wed, 17 May 2017 11:00:46 GMT):
but why would peer need jdk env.....

rickr (Wed, 17 May 2017 11:26:13 GMT):
For java chaincode issues when it's executing in the endorser the experts are #fabric-java-chaincode Make sure your source location is the full path to the java chaincode too.

kelvinzhong (Wed, 17 May 2017 12:59:25 GMT):
yes, i have the full path to the java chaincode project

kelvinzhong (Wed, 17 May 2017 13:00:12 GMT):
i would try to get some answer in #fabric-java-chaincode

hendry19901990 (Wed, 17 May 2017 16:59:47 GMT):
Has joined the channel.

dayubian (Thu, 18 May 2017 01:38:13 GMT):
@nickmelis @zhoupeiwen Fabric SDK Java works fine with alpha2, however Java Chaincode doesn't work in alpha2.

chenxuan (Thu, 18 May 2017 05:17:19 GMT):
Has joined the channel.

chenxuan (Thu, 18 May 2017 05:17:33 GMT):
client and server don't have same version (client : 1.22, server: 1.18)

chenxuan (Thu, 18 May 2017 05:17:39 GMT):
dockerlogfile

chenxuan (Thu, 18 May 2017 05:17:42 GMT):
show this

chenxuan (Thu, 18 May 2017 05:25:57 GMT):
Could not find the file "/root/test.properties"

chenxuan (Thu, 18 May 2017 05:38:37 GMT):
client and server don't have same version

xuanyue202 (Thu, 18 May 2017 06:01:10 GMT):
@rickr I saw from the chat history that Java sdk would go into maven repo for 1.0.0. Is it maven central? Still I cannot find it :frowning2:

chenxuan (Thu, 18 May 2017 06:10:24 GMT):
java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/eclipse/aether/RepositorySystemSession;

chenxuan (Thu, 18 May 2017 07:24:25 GMT):
jump tall blockchains in a single leap

chenxuan (Thu, 18 May 2017 07:24:26 GMT):
?

rickr (Thu, 18 May 2017 09:41:16 GMT):
v1.0.0 is not out

rickr (Thu, 18 May 2017 09:41:16 GMT):
v1.0.0 is not out . The Fabric itself is just now publishing alpha2

rickr (Thu, 18 May 2017 09:41:16 GMT):
v1.0.0 is not out . The Fabric itself is just now publishing alpha2 version.

rickr (Thu, 18 May 2017 09:44:03 GMT):
I'm not following where you see 1.22 vs 1.18 ?

liuwenliang0632 (Thu, 18 May 2017 10:18:45 GMT):
@rickr please review https://gerrit.hyperledger.org/r/#/c/9445/

rickr (Thu, 18 May 2017 11:08:31 GMT):
I do get notified of reviews so no need to ask here :)

MikeMayori (Thu, 18 May 2017 13:59:16 GMT):
Has joined the channel.

MikeMayori (Thu, 18 May 2017 14:01:01 GMT):
Hi all, anybody that can tell me if java sdk is table or what version i can play witch to start building a POC

MikeMayori (Thu, 18 May 2017 14:01:01 GMT):
Hi all, anybody that can tell me if java sdk is stable or what version i can play witch to start building a POC

bestbeforetoday (Thu, 18 May 2017 14:05:18 GMT):
Has joined the channel.

eetti (Thu, 18 May 2017 14:46:51 GMT):
The POM for org.hyperledger:shim-client:jar:1.0 is missing, no dependency information available Could anyone help me point out what I might be missing?

rickr (Thu, 18 May 2017 14:48:17 GMT):
Where is that POM you're referencing ?

eetti (Thu, 18 May 2017 14:54:09 GMT):
1.8 1.8 4.0.0 example chaincode-Range jar java-Range-example 1.0 http://maven.apache.org ${project.basedir}/build chaincode org.apache.maven.plugins maven-jar-plugin 3.0.2 ${dist.dir} true libs/ example.RangeExample org.apache.maven.plugins maven-dependency-plugin 2.10 copy-dependencies package copy-dependencies ${project.build.directory}/libs false false true junit junit 3.8.1 test io.grpc grpc-all 0.13.2 commons-cli commons-cli 1.3.1 org.hyperledger.fabric-sdk-java fabric-sdk-java 1.0.0-alpha2 org.hyperledger shim-client 1.0 nexus-snapshot https://nexus.hyperledger.org/content/repositories/snapshots false true

eetti (Thu, 18 May 2017 14:54:09 GMT):
org.hyperledger shim-client 1.0

rickr (Thu, 18 May 2017 14:58:02 GMT):
What git repository ? what file ?

eetti (Thu, 18 May 2017 14:59:00 GMT):
RangeExample

eetti (Thu, 18 May 2017 14:59:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-java-chaincode?msg=gp8DtxYPRqxdCiNLB)

eetti (Thu, 18 May 2017 15:00:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5xbWNcvTsiXxLZRxo) @sanchezl Suggested you do the following gradle build to get org.hyperledger.fabric.shim package

rickr (Thu, 18 May 2017 15:06:56 GMT):
I really think your looking for help with chaincode which is best asked on #fabric-java-chaincode

CarlXK (Fri, 19 May 2017 06:21:40 GMT):
``` Caused by: java.lang.Exception: Chain mychannel failed to place transaction a51333fcd500c067a94f46c3ffea2ae46b39dff1784b482f15d3b65f4f7ffacc on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Chain.sendTransaction(Chain.java:2283) ``` when i use alpha2 java sdk with alpha2 images, i got this error @here

CarlXK (Fri, 19 May 2017 06:21:40 GMT):
``` Caused by: java.lang.Exception: Chain mychannel failed to place transaction a51333fcd500c067a94f46c3ffea2ae46b39dff1784b482f15d3b65f4f7ffacc on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Chain.sendTransaction(Chain.java:2283) ``` when i use alpha2 java sdk with alpha2 images, i got this error @here

CarlXK (Fri, 19 May 2017 06:21:40 GMT):
``` Caused by: java.lang.Exception: Chain mychannel failed to place transaction a51333fcd500c067a94f46c3ffea2ae46b39dff1784b482f15d3b65f4f7ffacc on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Chain.sendTransaction(Chain.java:2283) ``` when i use alpha2 java sdk with alpha2 images, i got this error @here ``` [36m2017-05-19 03:48:17.400 UTC [cauthdsl] func1 -> DEBU 161 Gate evaluation starts: (&{n:1 policies: }) 2017-05-19 03:48:17.400 UTC [cauthdsl] func2 -> DEBU 162 Principal evaluation starts: (&{0}) (used [false false]) 2017-05-19 03:48:17.400 UTC [cauthdsl] func2 -> ERRO 163 Principal deserialization failed: (Could not deserialize a SerializedIdentity, err unexpected EOF) for identity [99 101 114 116] 2017-05-19 03:48:17.400 UTC [msp/identity] newIdentity -> DEBU 164 Creating identity instance for ID &{Org1MSP 9eec1e5776d14206b02cf62773555423d9f72430930e05436249920f872c8127} 2017-05-19 03:48:17.400 UTC [msp] SatisfiesPrincipal -> DEBU 165 Checking if identity satisfies ADMIN role for Org1MSP ``` fabric error

CarlXK (Fri, 19 May 2017 06:21:40 GMT):
``` Caused by: java.lang.Exception: Chain mychannel failed to place transaction a51333fcd500c067a94f46c3ffea2ae46b39dff1784b482f15d3b65f4f7ffacc on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Chain.sendTransaction(Chain.java:2283) ``` when i use alpha2 java sdk with alpha2 images, i got this error @here ``` [36m2017-05-19 03:48:17.400 UTC [cauthdsl] func1 -> DEBU 161 Gate evaluation starts: (&{n:1 policies: }) 2017-05-19 03:48:17.400 UTC [cauthdsl] func2 -> DEBU 162 Principal evaluation starts: (&{0}) (used [false false]) 2017-05-19 03:48:17.400 UTC [cauthdsl] func2 -> ERRO 163 Principal deserialization failed: (Could not deserialize a SerializedIdentity, err unexpected EOF) for identity [99 101 114 116] 2017-05-19 03:48:17.400 UTC [msp/identity] newIdentity -> DEBU 164 Creating identity instance for ID &{Org1MSP 9eec1e5776d14206b02cf62773555423d9f72430930e05436249920f872c8127} 2017-05-19 03:48:17.400 UTC [msp] SatisfiesPrincipal -> DEBU 165 Checking if identity satisfies ADMIN role for Org1MSP ``` fabric error @rickr have ever had this problem before?

CarlXK (Fri, 19 May 2017 06:21:40 GMT):
``` Caused by: java.lang.Exception: Chain mychannel failed to place transaction a51333fcd500c067a94f46c3ffea2ae46b39dff1784b482f15d3b65f4f7ffacc on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Chain.sendTransaction(Chain.java:2283) ``` when i use alpha2 java sdk with alpha2 images, i got this error @here ``` [36m2017-05-19 03:48:17.400 UTC [cauthdsl] func1 -> DEBU 161 Gate evaluation starts: (&{n:1 policies: }) 2017-05-19 03:48:17.400 UTC [cauthdsl] func2 -> DEBU 162 Principal evaluation starts: (&{0}) (used [false false]) 2017-05-19 03:48:17.400 UTC [cauthdsl] func2 -> ERRO 163 Principal deserialization failed: (Could not deserialize a SerializedIdentity, err unexpected EOF) for identity [99 101 114 116] 2017-05-19 03:48:17.400 UTC [msp/identity] newIdentity -> DEBU 164 Creating identity instance for ID &{Org1MSP 9eec1e5776d14206b02cf62773555423d9f72430930e05436249920f872c8127} 2017-05-19 03:48:17.400 UTC [msp] SatisfiesPrincipal -> DEBU 165 Checking if identity satisfies ADMIN role for Org1MSP ``` ``` [36m2017-05-19 03:49:53.071 UTC [cauthdsl] func2 -> DEBU a58 Principal evaluation fails: (&{0}) [false] 2017-05-19 03:49:53.072 UTC [cauthdsl] func1 -> DEBU a59 Gate evaluation fails: (&{n:1 policies: }) 2017-05-19 03:49:53.072 UTC [orderer/common/broadcast] Handle -> WARN a5a Rejecting broadcast message because of filter error: Rejected by rule: *sigfilter.sigFilter 2017-05-19 03:49:53.111 UTC [orderer/main] Broadcast -> DEBU a5b Starting new Broadcast handler 2017-05-19 03:49:53.111 UTC [orderer/common/broadcast] Handle -> DEBU a5c Starting new broadcast loop [3 ``` fabric error @rickr have ever had this problem before?

bluefire (Fri, 19 May 2017 06:51:35 GMT):
I notice after the lastest commit, when the SDK install chainchode, the chaincode will output to /tmp/mydata.tgz in InstallProposalBuilder.java, but window OS cannot access this path /tmp, so anybody can tell me what can i do for this? thx

rickr (Fri, 19 May 2017 10:11:47 GMT):
Created a JIRA for it https://jira.hyperledger.org/browse/FAB-4034

rickr (Fri, 19 May 2017 10:11:47 GMT):
Created a JIRA for it https://jira.hyperledger.org/browse/FAB-4034 If you don't want to change the code as a _work around_ I think on the drive you're on if you could create a \tmp.

rickr (Fri, 19 May 2017 10:11:47 GMT):
Created a JIRA for it https://jira.hyperledger.org/browse/FAB-4034 If you don't want to change the code as a _work around_ I think on the drive you're on you could create a \tmp directory.

bluefire (Fri, 19 May 2017 10:29:34 GMT):
@rickr thank you, I just change the path to system java tempdir, now it's work fine.

sophiemaichau (Fri, 19 May 2017 10:58:13 GMT):
Has joined the channel.

rickr (Fri, 19 May 2017 11:04:36 GMT):
@CarlXK Is that running _out of the box_ End2endIT ?

graphen (Fri, 19 May 2017 11:05:40 GMT):
Has joined the channel.

graphen (Fri, 19 May 2017 11:17:53 GMT):
Anyone that can point to an confirmed working tutorial for the JavaSDK, the tests can run and everything but how do I customize it to my needs etc.? is there such a tutorial around?

graphen (Fri, 19 May 2017 11:18:03 GMT):
Fabric-SDK***

graphen (Fri, 19 May 2017 11:18:26 GMT):
The java-fabric-sdk!!! :P

rickr (Fri, 19 May 2017 11:24:47 GMT):
I'm pretty sure there's not specific to Java SDK. There may be some general information in the works. @nickgaski anything you can recommend ?

nickgaski (Fri, 19 May 2017 11:24:47 GMT):
Has joined the channel.

rickr (Fri, 19 May 2017 11:31:33 GMT):
The End2endIT* test show how you would use the SDK. Where things start getting complicated is if you want to create you own organizations peer, orderers , policies, consortium et al.

rickr (Fri, 19 May 2017 11:31:33 GMT):
The End2endIT* test show how you would use the SDK. Where things start getting complicated is if you want to creating you own organizations peer, orderers , policies, consortium et al.

graphen (Fri, 19 May 2017 11:32:09 GMT):
That's exactly where I'm at - running the tests etc. is fantastic buuuuut from there it's like hitting a brick wall

kelvinzhong (Fri, 19 May 2017 11:33:13 GMT):
@rickr hi, seems the fabric has the aphla 2 released, does java sdk work with the aphla 2?

kelvinzhong (Fri, 19 May 2017 11:33:13 GMT):
@rickr hi, seems the fabric has the alpha 2 released, does java sdk work with the alpha 2?

rickr (Fri, 19 May 2017 11:35:08 GMT):
I you get the latest java sdk _AT THE MOMENT_ the end2endIT test's docker compose actually is pulling from alpha2

kelvinzhong (Fri, 19 May 2017 11:35:26 GMT):
cool!

ricarda.schueler (Fri, 19 May 2017 11:48:55 GMT):
Has joined the channel.

xuanchen (Fri, 19 May 2017 13:15:05 GMT):
Has joined the channel.

hendry19901990 (Fri, 19 May 2017 15:35:23 GMT):
Hello everyone, i would like to contribute here

ManjeetGambhir (Fri, 19 May 2017 15:44:32 GMT):
@rickr we have generated new config tx having 5 orgs , do you know for these orgs how to generate policy file for each channel

ManjeetGambhir (Fri, 19 May 2017 15:44:52 GMT):
Right now 3 orgs per channel

ManjeetGambhir (Fri, 19 May 2017 15:45:17 GMT):
When try to load chain its failing in orderer

hendry19901990 (Fri, 19 May 2017 16:08:33 GMT):
where is the repo fabric-sdk ?

rickr (Fri, 19 May 2017 17:51:07 GMT):
I think the only means to have policies for the channels are are through the configtx tool. https://github.com/hyperledger/fabric/blob/master/docs/source/configtxgen.rst Any specific question on that you'll need to ask on the fabric channel to get answer.

rickr (Fri, 19 May 2017 17:51:07 GMT):
I think the only means to have policies for the channels are are through the configtx tool. https://github.com/hyperledger/fabric/blob/master/docs/source/configtxgen.rst Any specific question on that you'll need to ask on the fabric channel to get answer Since the developers of that don't really hang out here

rickr (Fri, 19 May 2017 17:59:27 GMT):
Development is done through gerrit you'll need a linux foundation id for that. https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-java

hendry19901990 (Fri, 19 May 2017 18:21:25 GMT):
yes i have a Linux ID

hendry19901990 (Fri, 19 May 2017 18:25:50 GMT):
ready

hendry19901990 (Fri, 19 May 2017 18:26:08 GMT):
who is the leader ??

szoghybe (Fri, 19 May 2017 18:52:08 GMT):
Hello, I set up the fabric-sdk-java in Eclipse imported as a Maven project and it's looking for import org.hyperledger.fabric.protos...

szoghybe (Fri, 19 May 2017 18:52:13 GMT):
Where is that?

szoghybe (Fri, 19 May 2017 19:07:16 GMT):
OK, I need to generate something and the sub-folders under this one is empty:

szoghybe (Fri, 19 May 2017 19:07:34 GMT):
"/opt/gopath/src/github.com/hyperledger/fabric/devenv/fabric-sdk-java/target/generated-sources/protobuf"

szoghybe (Fri, 19 May 2017 19:07:34 GMT):
\/opt/gopath/src/github.com/hyperledger/fabric/devenv/fabric-sdk-java/target/generated-sources/protobuf"

szoghybe (Fri, 19 May 2017 19:09:23 GMT):
ok, ok. I need to add the fabric-sdk-java-1.0.0-alpha2.jar somehow?

szoghybe (Fri, 19 May 2017 19:14:13 GMT):
OK, I crated a lib folder and copied fabric-sdk-java-1.0.0-alpha2.jar into it, added it to the Build Path and 500 errors are gone.

szoghybe (Fri, 19 May 2017 19:14:40 GMT):
Only 2 errs left, it is complaining about com.google.protobuf

szoghybe (Fri, 19 May 2017 19:18:03 GMT):
Do I have to download https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-java-3.3.0.zip and build the darn thing ?

szoghybe (Fri, 19 May 2017 19:23:59 GMT):
@graphen I wrote a blog post last week where I set up the Ubuntu virtual machine from scratch on Windows and run all the java integration tests end to end successfully. Please take a look at:

szoghybe (Fri, 19 May 2017 19:24:01 GMT):
https://bertrandszoghy.wordpress.com/2017/05/12/first-blog-post/

szoghybe (Fri, 19 May 2017 19:25:49 GMT):
I will step through the building of the recommended Linux Virtual machine on a Windows host, start Docker microservices running Hyperledger Fabric on that virtual image, build the fabric-sdk-java which can be found at https://github.com/hyperledger/fabric-sdk-java and run the java unit tests. Next, we will run the end to end Java integration tests. Finally, we will build the HTML documentation with Sphinx.

szoghybe (Fri, 19 May 2017 19:26:22 GMT):
I just did a second blog post where I install Eclipse on the Hyperledger virtual image at:

szoghybe (Fri, 19 May 2017 19:27:37 GMT):
https://bertrandszoghy.wordpress.com/2017/05/19/setting-up-eclipse-neon-for-java-development-on-the-hyperledger-fabric-virtual-image/

szoghybe (Fri, 19 May 2017 19:30:54 GMT):
Bummed out, I leave in an hour and am out of the country for a few days. I wanted to finish this...

szoghybe (Fri, 19 May 2017 19:32:14 GMT):
My last hurdle is:

szoghybe (Fri, 19 May 2017 19:32:16 GMT):
1 required artifact is missing. for artifact: org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.0.0-alpha2 from the specified remote repositories: central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false) at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.resolveBinaryArtifact(AbstractProtocMojo.java:962) at org.xolstice.maven.plugin.protobuf.AbstractProtocMojo.execute(AbstractProtocMojo.java:489) at org.xolstice.maven.plugin.protobuf.AbstractProtocCompileMojo.execute(AbstractProtocCompileMojo.java:31) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:406) at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:285) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing: ---------- 1) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.0.0 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.0.0 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.0.0 -Dclassifier=${os.detected.classifier} -Dpackaging=exe -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.0.0-alpha2 2) com.google.protobuf:protoc:exe:${os.detected.classifier}:3.0.0

gdinhof (Sun, 21 May 2017 07:30:45 GMT):
Has joined the channel.

richard.holzeis (Sun, 21 May 2017 20:09:18 GMT):
Has joined the channel.

CarlXK (Mon, 22 May 2017 01:31:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=E7aa9z9JdFqWcpDvF) @rickr yes, i write my own channel and java code to connect

rodger0514 (Mon, 22 May 2017 01:47:09 GMT):
Has joined the channel.

trilochanachary (Mon, 22 May 2017 01:47:46 GMT):
Has joined the channel.

trilochanachary (Mon, 22 May 2017 01:48:48 GMT):
can u plz help You are using Gradle 2.10: This version of the protobuf plugin works with Gradle version 2.12+ FAILURE: Build failed with an exception. * Where: Build file '/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle' line: 29 * What went wrong: An exception occurred applying plugin request [id: 'java'] > Failed to apply plugin [id 'org.gradle.java'] > Could not create an instance of type com.google.protobuf.gradle.ProtobufSourceDirectorySet_Decorated. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED

Calvin_Heo (Mon, 22 May 2017 02:51:06 GMT):
Has joined the channel.

rickr (Mon, 22 May 2017 11:26:44 GMT):
Looks like you should ask on #fabric-java-chaincode

rickr (Mon, 22 May 2017 11:30:04 GMT):
@CarlXK Did get first the standard end2end working to validate your setup ? At first glance looks like user is not recognized for the channel you're creating.

hendry19901990 (Mon, 22 May 2017 20:40:16 GMT):
for what is this channel

hendry19901990 (Mon, 22 May 2017 20:40:20 GMT):
??

rickr (Mon, 22 May 2017 22:31:43 GMT):
Fabric SDK Java see the readme: https://github.com/hyperledger/fabric-sdk-java

hendry19901990 (Mon, 22 May 2017 22:33:30 GMT):
i asked because i would like to develop in fabric-sdk-java my friend

rickr (Mon, 22 May 2017 22:37:55 GMT):
Need to be clear you want to work on it or develop using it ?

hendry19901990 (Mon, 22 May 2017 22:40:06 GMT):
contribute to sdk

hendry19901990 (Mon, 22 May 2017 22:43:11 GMT):
i want to work in the sdk

rickr (Mon, 22 May 2017 22:43:37 GMT):
Ok have gotten and started looking at it any ?

rickr (Mon, 22 May 2017 22:43:37 GMT):
Ok have gotten it and started looking at it any ?

rickr (Mon, 22 May 2017 22:44:23 GMT):
Run the test cases ? Studied the end2end code, followed what it does in the fabric ?

rickr (Mon, 22 May 2017 22:46:46 GMT):
?

hendry19901990 (Mon, 22 May 2017 22:48:58 GMT):
ok

hendry19901990 (Mon, 22 May 2017 22:49:19 GMT):
are you leader of the team ?

rickr (Mon, 22 May 2017 22:51:47 GMT):
I'm a _maintainer_ and for better or worse committed mot of the code.

rickr (Mon, 22 May 2017 22:51:47 GMT):
I'm a _maintainer_ and for better or worse committed most of the code.

hendry19901990 (Mon, 22 May 2017 22:54:18 GMT):
umm ok

rickr (Mon, 22 May 2017 22:54:42 GMT):
FYI Months past there was *LOTS* to do. At the moment we're frozen for V1 for any _major changes_ . Significant changes are probably not going to go in till after V 1.0 is released. https://jira.hyperledger.org/secure/RapidBoard.jspa?rapidView=99&view=planning.nodetail&versions=visible&epics=visible

rickr (Mon, 22 May 2017 22:57:02 GMT):
Lot of working we'll need to do is write more test, do more testing .. bug fixing till we can finally release. Targeted about end of June .. but that's not locked in stone

hendry19901990 (Mon, 22 May 2017 22:58:27 GMT):
ok

rickr (Mon, 22 May 2017 23:17:38 GMT):
I have an idea if you're so inclined to help out. First you need get up to speed with the end2ende as I suggested. Then construct the channel use just the peer admin user for now. Once the channel is created create two threads .. each thread using that same user, same client, same channel deploy chaincode,, invoke it many times validate results .. ideally be able to that a thousand time. we've not done much MT testing

rickr (Mon, 22 May 2017 23:17:38 GMT):
I have an idea if you're so inclined to help out. First you need get up to speed with the end2ende as I suggested. Then construct the channel use just the peer admin user for now. Once the channel is created create two threads .. each thread using that same user, same client, same channel deploy different chaincode,, invoke it many times validate results .. ideally be able to that a thousand time. we've not done much MT testing

rickr (Mon, 22 May 2017 23:17:38 GMT):
I have an idea if you're so inclined to help out. First you need get up to speed with the end2ende as I suggested. Then construct the channel use just the peer admin user for now. Once the channel is created create two threads .. each thread using that same user, same client, same channel deploy different chaincode,, invoke it many times validate results .. ideally be able to do that a thousand time. we've not done much MT testing

rickr (Mon, 22 May 2017 23:20:37 GMT):
If your're not... I'll open it up for anyone .. really need to see if this holds up

IanSparkes (Tue, 23 May 2017 08:31:44 GMT):
Has joined the channel.

yecineoueslati (Tue, 23 May 2017 14:30:55 GMT):
Hi, is there any example application developped by this sdk. i saw this app https://github.com/IBM-Blockchain/marbles but it's with node sdk. thx.

rickr (Tue, 23 May 2017 14:34:59 GMT):
look over the READM.md

rickr (Tue, 23 May 2017 14:35:55 GMT):
end2endIT samples will show you how to use the sdk

rickr (Tue, 23 May 2017 14:37:42 GMT):
If you want your welcome to port the the marbles demo to use the JSDK :)

garMobTest (Tue, 23 May 2017 17:38:06 GMT):
Has joined the channel.

garMobTest (Tue, 23 May 2017 17:39:10 GMT):
Hi All, is java sdk ready for version 1.0?

rickr (Tue, 23 May 2017 20:34:58 GMT):
@Willson FYI > https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L380

Willson (Wed, 24 May 2017 02:33:27 GMT):
thanks @rickr ^^

chrism28 (Wed, 24 May 2017 11:16:33 GMT):
Has joined the channel.

jimthematrix (Wed, 24 May 2017 12:09:13 GMT):
@chrism28 hi Chris, this is Jim, welcome back to working on java SDK!

trilochanachary (Wed, 24 May 2017 13:24:55 GMT):
did u guys encounter npm-pre-gyp error while executing demo... even though its installed...

rickr (Wed, 24 May 2017 13:28:18 GMT):
are you sure you didn't want to post that on #fabric-sdk-node ?

trilochanachary (Wed, 24 May 2017 13:32:12 GMT):
sorry...i will post in other channel...

lenin.mehedy (Wed, 24 May 2017 14:15:12 GMT):
Any idea why the build is failing with the following errors? ``` Running org.hyperledger.fabric.sdk.ChannelTest 2017-05-24 10:43:21,953 WARN SampleStore:74 - Could not find the file "/Users/lenin/test.properties" 2017-05-24 10:43:21,958 WARN SampleStore:74 - Could not find the file "/Users/lenin/test.properties" java.io.NotSerializableException: org.hyperledger.fabric.sdk.TestHFClient$1 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java ...... ```

rickr (Wed, 24 May 2017 14:18:21 GMT):
Try this again : mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false

rickr (Wed, 24 May 2017 14:49:10 GMT):
Any one interested in Java CC can see discussion on it here : https://chat.hyperledger.org/channel/fabric?msg=KjL3pfAwGZtgp7rXr

szoghybe (Wed, 24 May 2017 15:52:17 GMT):
FYI, In my new blog post, I describe in detail how to install Eclipse Neon on the Hyperledger Fabric virtual machine, import the fabric-sdk-java as a Maven project, build it and step through the Java code of the integration End2E test. It's at: https://bertrandszoghy.wordpress.com/2017/05/19/setting-up-eclipse-neon-for-java-development-on-the-hyperledger-fabric-virtual-image/

clempo (Wed, 24 May 2017 16:02:09 GMT):
What's the purpose of ./e2e-2Orgs/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp if that user is registered and enrolled from scratch in End2endIT?

clempo (Wed, 24 May 2017 16:03:01 GMT):
In fact, it would help my demo if End2endIT would reconstruct that user like it does for the peer admin

rickr (Wed, 24 May 2017 16:59:19 GMT):
I've pressed for that but it's AFAIK it's a _no can do_. Feel free to ask on the #fabric or #fabric-crypto

clempo (Wed, 24 May 2017 17:11:46 GMT):
what is a no can do? Is that answering my question on the unused msp dir?

jordipainan (Wed, 24 May 2017 17:38:10 GMT):
@szoghybe looks really nice, great tutorial ! :D

rickr (Wed, 24 May 2017 22:01:54 GMT):
Answered in haste. Thinking of the wrong user --- I've not tried using that credentials. I'm fairly certain it's just a regular user. Please try and tell us all :) I'm assuming you took the Sample _stuff_ and ran with it so why not just do same as done with peer admin ?

lenin.mehedy (Thu, 25 May 2017 01:11:01 GMT):
@rickr Thanks. I finally got it working, however there is still an exception log as below. but there is no test failure. I suppose the CLI exception log can be ignored? ``` java.lang.Exception: POST request to http://localhost:7054/api/v1/reenroll failed request body {"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIHKMHICAQAwEDEOMAwGA1UEAxMFdXNlcjMwWTATBgcqhkjOPQIBBggqhkjOPQMB\nBwNCAATeVV8T3snRj3t1JuuOnZAzyT6fc2Wi9IdtDpEeVNoD+X2s1IzKV769K8l8\n06qXn/+ZBcJXIeIEz0ujp4yiNgXIoAAwCgYIKoZIzj0EAwIDSAAwRQIgBh41milC\nbS7Z5kyOIqJ33WcUQ1xTRY3z9TG68km8w48CIQDwva9sEJS+FxRMG4U6Ca0OqEip\n9pmAmO0jinKR4XsIGg==\n-----END CERTIFICATE REQUEST-----\n"} with status code: 400. Response: {"success":false,"result":null,"errors":[{"code":400,"message":"Authorization failure"}],"messages":[]} at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:612) at org.hyperledger.fabric_ca.sdk.HFCAClient.reenroll(HFCAClient.java:409) at org.hyperledger.fabric_ca.sdk.HFCAClient.reenroll(HFCAClient.java:364) at org.hyperledger.fabric_ca.sdkintegration.HFCAClientEnrollIT.testUserRevoke(HFCAClientEnrollIT.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 109.188 sec - in org.hyperledger.fabric.sdkintegration.IntegrationSuite Results : Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 ```

kelvinzhong (Thu, 25 May 2017 02:04:33 GMT):
@rickr u try hard bro, but seems the boss would not take the risk to enable the java cc:joy:

kelvinzhong (Thu, 25 May 2017 02:07:08 GMT):
but indeed it sucks to writing go cc as a java developer.....

kelvinzhong (Thu, 25 May 2017 02:07:08 GMT):
but indeed it sucks to write go cc as a java developer.....

aaronzheng (Thu, 25 May 2017 09:01:12 GMT):
Has joined the channel.

aaronzheng (Thu, 25 May 2017 09:03:16 GMT):
hi everyone. may i know where to setup the affiliation? i am using fabric-sdk-java now. when i want to enroll a member, i have to specified the affiliation, but i can't specify as i want. i only can input 'org1.department1'.

rickr (Thu, 25 May 2017 09:10:55 GMT):
@lenin.mehedy I wish it didn't show up like that but it's a test that validates we can't reenroll a user we've revoked which throws an expected exception.

aaronzheng (Thu, 25 May 2017 10:12:00 GMT):
i am creating my channel via fabric-sdk-java, but it display below error. any idea for it? (i have attached two log, one is fabric, another is java) fabric log: orderer.example.com | 2017-05-25 10:06:30.936 UTC [orderer/main] Broadcast -> DEBU 80b Starting new Broadcast handler orderer.example.com | 2017-05-25 10:06:30.937 UTC [orderer/common/broadcast] Handle -> DEBU 80c Starting new broadcast loop orderer.example.com | 2017-05-25 10:06:30.937 UTC [orderer/common/broadcast] Handle -> DEBU 80d Preprocessing CONFIG_UPDATE orderer.example.com | 2017-05-25 10:06:30.937 UTC [orderer/configupdate] Process -> DEBU 80e Processing channel reconfiguration request for channel foo orderer.example.com | 2017-05-25 10:06:30.937 UTC [common/configtx] addToMap -> DEBU 80f Adding to config map: [Groups] /Channel orderer.example.com | 2017-05-25 10:06:30.937 UTC [common/configtx] addToMap -> DEBU 810 Adding to config map: [Groups] /Channel/Application orderer.example.com | 2017-05-25 10:06:30.937 UTC [common/configtx] addToMap -> DEBU 811 Adding to config map: [Groups] /Channel/Application/Org2MS P orderer.example.com | 2017-05-25 10:06:30.937 UTC [common/configtx] addToMap -> DEBU 812 Adding to config map: [Groups] /Channel/Application/Org1MS P orderer.example.com | 2017-05-25 10:06:30.937 UTC [common/configtx] addToMap -> DEBU 813 Adding to config map: [Values] /Channel/Consortium orderer.example.com | 2017-05-25 10:06:30.937 UTC [orderer/common/broadcast] Handle -> WARN 814 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1 java log: org.hyperledger.fabric.sdk.exception.TransactionException: New channel foo error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.(Channel.java:240) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1222) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:127) at org.hyperledger.fabric.aaron.NormalScenario.test(NormalScenario.java:83) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

lenin.mehedy (Thu, 25 May 2017 10:46:29 GMT):
@rickr Thanks. got it.

rickr (Thu, 25 May 2017 10:51:50 GMT):
@aaronzheng I'm assuming you ran the configtx tool at the same level of code that you are running the Fabric with

lenin.mehedy (Thu, 25 May 2017 11:00:19 GMT):
@rickr can you point me to a sample testutil.properties file. It seems to be missing the repo.

lenin.mehedy (Thu, 25 May 2017 11:00:28 GMT):
in*

rickr (Thu, 25 May 2017 11:16:01 GMT):
test.properties is created and deleted by the tests

szoghybe (Thu, 25 May 2017 13:44:44 GMT):
Hello, I now have three blog posts about fabric-sdk-java which you might find useful: Java SDK for Hyperledger Fabric 1.0 (IBM Blockchain) — Setting Up the Environment https://bertrandszoghy.wordpress.com/2017/05/12/fabric-sdk-java/ Setting up Eclipse Neon for Enterprise Java development on the Hyperledger Fabric virtual image https://bertrandszoghy.wordpress.com/2017/05/19/setting-up-eclipse-neon-for-java-development-on-the-hyperledger-fabric-virtual-image/ And a new one this morning: Backing up your Hyperledger virtual image and restoring it on another computer https://bertrandszoghy.wordpress.com/2017/05/25/backing-up-and-restoring-your-hyperledger-virtual-image-on-another-computer/

jordipainan (Thu, 25 May 2017 15:38:18 GMT):
I love your posts <3

jordipainan (Thu, 25 May 2017 15:39:28 GMT):
thx for doing this

clempo (Thu, 25 May 2017 16:41:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HGoYNTmD3vWuD8pqj)

clempo (Thu, 25 May 2017 16:42:25 GMT):
indeed, the test should use the creds, or the creds should not be there to simplify learning the example

clempo (Thu, 25 May 2017 16:43:52 GMT):
I thought you would simply remove the creds, but reloading User1 seems a better goal

clempo (Thu, 25 May 2017 16:44:10 GMT):
if we do that, then looping over all users of the SampleStore becomes somewhat moot

clempo (Thu, 25 May 2017 16:44:47 GMT):
and End2endAndBackAgain now seems strange if it gets its users from the SampleStore

clempo (Thu, 25 May 2017 16:45:20 GMT):
I never felt the SampleStore was a realistic example

clempo (Thu, 25 May 2017 16:46:19 GMT):
Maybe the examples should show two ways to implement user stores

clempo (Thu, 25 May 2017 16:46:51 GMT):
The fabric-ca CLI way with files like the peer admin, and the previous way

rickr (Thu, 25 May 2017 16:58:47 GMT):
The only creds you need on the file system is the peer Admin. You have the org admin which is really just a regular user with registrar rights to allow enrolling other users. At the moment the default policies created by configtx `regular users` can only invoke chaincode.

clempo (Thu, 25 May 2017 17:08:48 GMT):
I'm stressing the point because the example should be as simple as possible to make it easy to learn fabric.

clempo (Thu, 25 May 2017 17:10:18 GMT):
We should state the goal is to use that cred in the example eventually, or we should remove it

rickr (Thu, 25 May 2017 17:32:27 GMT):
I use the peer Admin (creds only on the filesystem created by crytpogen) --- which can not be at the moment gotten from the FabricCA in end2end to construct the channel and install, instantiate CC only those creds are able to do that. I would assume after reading it from the filesystem you would delete those credentials and they would now be is "secure store" End2endIT shows the CA admin registering a regular user. In End2endIT line 353 I switch usercontext that shows that reg. user registered by the admin can invoke CC. End2endAndBackAgainIT gets all user from the SampleStore no registering no enrolling. It then goes on using the peerAdmin to upgrade CC which is only that credentials can do and later around line 337 it uses once again the regular user `TESTUSER_1_NAME` to invoke a `move` This seems to be good mix of using/restoring those credentials.

rickr (Thu, 25 May 2017 17:32:27 GMT):
I use the peer Admin (creds only on the filesystem created by crytpogen) --- which can not be at the moment gotten from the FabricCA in end2end to construct the channel and install, instantiate CC only those creds are able to do that. I would assume after reading it from the filesystem you would delete those credentials (files)and they would now be is "secure store" End2endIT shows the CA admin registering a regular user. In End2endIT line 353 I switch usercontext that shows that reg. user registered by the admin can invoke CC. End2endAndBackAgainIT gets all user from the SampleStore no registering no enrolling. It then goes on using the peerAdmin to upgrade CC which is only that credentials can do and later around line 337 it uses once again the regular user `TESTUSER_1_NAME` to invoke a `move` This seems to be good mix of using/restoring those credentials.

clempo (Thu, 25 May 2017 18:01:45 GMT):
It's a good mix for a test suite, but it's not a very good example if your goal is to learn how to write production code

clempo (Thu, 25 May 2017 18:04:05 GMT):
there is a comment in the example about the peeradmin, but this was a better explanation why it's done differently

clempo (Thu, 25 May 2017 18:04:44 GMT):
could be useful to update that comment

rickr (Thu, 25 May 2017 18:08:10 GMT):
Be specific .. tell me how it think it should read or provide a patch. I don't think you'll find in most 'samples' being offered in open source is "production code". It is a compromise to one test our own code. Validate if it runs your setup is ok. And can does I think a _resonable_ job at showing you how to use the API.

clempo (Thu, 25 May 2017 18:09:59 GMT):
I thought I was specific when I said: We should state the goal is to use that cred (User1) in the example eventually, or we should remove it

clempo (Thu, 25 May 2017 18:10:55 GMT):
I think using the cred from the file system is more real life

rickr (Thu, 25 May 2017 18:19:08 GMT):
no cryptogen is Just dev tool to bootstrap you with all the credentials needed that work with FabricCA and have all credentials produced that it needs for the organizations you ask it to create. I think it's important for those that want to use fabricCA would want to see how to have an certificate signing authority being used. Seeing it register and enroll users that can invoke CC. It's cryptogen that's actually 'fake' no one would create many organizations certs keys etc in that manner.

rickr (Thu, 25 May 2017 18:19:08 GMT):
no cryptogen is just dev tool to bootstrap you with all the credentials needed that work with FabricCA and have all credentials produced that it needs for the organizations you ask it to create. I think it's important for those that want to use fabricCA would want to see how to have an certificate signing authority being used. Seeing it register and enroll users that can invoke CC. It's cryptogen that's actually 'fake' no one would create many organizations certs keys etc in that manner.

clempo (Thu, 25 May 2017 18:20:49 GMT):
I did not study cryptogen. I studied the fabric-ca user's guide which promotes the fabric-ca CLI

clempo (Thu, 25 May 2017 18:23:18 GMT):
I'm not sure what the argument is about. I said you have an unused file in your example. Your answers do not seem to address that original point

clempo (Thu, 25 May 2017 18:23:56 GMT):
more like an unused dir

rickr (Thu, 25 May 2017 18:26:09 GMT):
That unused file is a by product of cryptogen .. Yes I could delete it. I think there are other too. I don't see that as diminishing what End2End test show.

wyanglau (Thu, 25 May 2017 18:28:58 GMT):
Has joined the channel.

aaronzheng (Fri, 26 May 2017 01:22:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=97egu3hptu9re6bAL) @rickr thanks for your reply. after i checked the code again, i found that if i created the channel twice, then i will get BAD_REQUEST error. if i only create it one, it it ok. i think it should have a validation checking for duplicate channel, and meaningful message.

liuwenliang0632 (Fri, 26 May 2017 03:39:17 GMT):
@rickr i had fixed FAB-4170, please help me review

liuwenliang0632 (Fri, 26 May 2017 04:12:21 GMT):
11f

liuwenliang0632 (Fri, 26 May 2017 04:12:22 GMT):
f

liuwenliang0632 (Fri, 26 May 2017 04:12:22 GMT):
as

liuwenliang0632 (Fri, 26 May 2017 04:12:22 GMT):
f

liuwenliang0632 (Fri, 26 May 2017 05:17:28 GMT):
i am sorry , There's something wrong with the keyboard

guruce (Fri, 26 May 2017 06:14:18 GMT):
Has joined the channel.

aaronzheng (Fri, 26 May 2017 06:56:06 GMT):
after creating my channel and install my chaincode, i want to instantiate the chaincode, but i got below error. any idea for it? or how can i check whether the Org1MSP exists or not ? thanks! java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown

zhangchao (Fri, 26 May 2017 06:59:57 GMT):
@aaronzheng , I opened a issue FAB-4001, looks like your errors is same as this one

aaronzheng (Fri, 26 May 2017 07:09:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sCCdzwpWzpKWQ3vR9) @zhangchao do you know in the docker how to check whether Org1MSP exists or not?

zhangchao (Fri, 26 May 2017 07:10:21 GMT):
it's in the channel tx file

MikkelPetersen (Fri, 26 May 2017 12:03:46 GMT):
Has joined the channel.

BhavishaDawda (Fri, 26 May 2017 18:49:16 GMT):
Has joined the channel.

HansDeLeenheer (Fri, 26 May 2017 21:02:33 GMT):
Has joined the channel.

HansDeLeenheer (Fri, 26 May 2017 21:25:32 GMT):
Hi all, allow me to introduce myself briefly; I'm leading the product roadmap at Gospel, a London based startup building a platform on top of HyperLedger. Currently we are using Fabric v0.6 since we are using JAVA-SDK. It has come to my attention lately that there would be timing issues to get JAVA-SDK into Fabric v1.0 which has lead me to stall the migration of our backend (that was planned for this release). Can someone update me on the chances of JAVA-SDK making it to Fabric v1.0 release and what is the blocking factor please?

rickr (Fri, 26 May 2017 22:45:41 GMT):
". It has come to my attention lately that there would be timing issues to get JAVA-SDK into Fabric v1.0" how has that come to your attention ?

rickr (Fri, 26 May 2017 22:45:41 GMT):
"It has come to my attention lately that there would be timing issues to get JAVA-SDK into Fabric v1.0" how has that come to your attention ?

rickr (Fri, 26 May 2017 22:45:41 GMT):
"It has come to my attention lately that there would be timing issues to get JAVA-SDK into Fabric v1.0" How has that come to your attention ?

liuwenliang0632 (Sat, 27 May 2017 01:30:46 GMT):
@rickr can u help me review https://gerrit.hyperledger.org/r/#/c/9857/

rickr (Sat, 27 May 2017 02:26:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8YSea7sA7tieDwoJf) Basically the SDK just uses the user that is set in the usercontext's user' MSPID and the certificate used in the enrollment, privatekey to sign. Did you use the same user for instantiate cc as the the operations ?

rickr (Sat, 27 May 2017 02:26:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8YSea7sA7tieDwoJf) Basically the SDK just uses the user that is set in the usercontext's user' MSPID and the certificate used in the enrollment, privatekey to sign. Did you use the same user for instantiate cc as the the operations ? If no, try that one. If yes, then maybe ask on the #fabric-consensus IMO should work.

rickr (Sat, 27 May 2017 02:26:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8YSea7sA7tieDwoJf) Basically the SDK just uses the user that is set in the usercontext's user' MSPID and the certificate used in the enrollment, privatekey to sign. Did you use the same user for instantiate cc as the other operations listed ? If no, try that one. If yes, then maybe ask on the #fabric-consensus IMO should work.

liuwenliang0632 (Sat, 27 May 2017 02:40:08 GMT):
aha, @rickr waiting for u

rickr (Sat, 27 May 2017 02:41:36 GMT):
really why?

liuwenliang0632 (Sat, 27 May 2017 02:41:57 GMT):
please help me review https://gerrit.hyperledger.org/r/#/c/9857

rickr (Sat, 27 May 2017 02:42:45 GMT):
As I said I get notified when they are ready for review .. asking here won't make it go faster. I have thing waiting in the queue too :)

rickr (Sat, 27 May 2017 02:42:45 GMT):
As I said I get notified when they are ready for review .. asking here won't make it go faster. I have CS waiting in the queue too :)

liuwenliang0632 (Sat, 27 May 2017 02:47:58 GMT):
okay, i join in the queue after you:blush:

rickr (Sat, 27 May 2017 02:48:43 GMT):
Thanks for helping btw -- not at a computer now so maybe a few days

liuwenliang0632 (Sat, 27 May 2017 03:13:59 GMT):
Dragon Boat Festival

HansDeLeenheer (Sat, 27 May 2017 06:34:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=FYTxD4bbeHJhZnzDs) @rickr From our own engineers, conversations with people on the Fabric release team and the fact that it is not included in `alpha2` - for the record, not here to stir the pot, just to show my concerns if this is the case or be comforted if not. There is a lot ofr us that depends on this.

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ?

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? It's true, there has not been a release to Maven which is something that is beyond my control and needs to be done by the Linux Foundation. Last I've heard they've not been able to get that accomplished. @rjones @cbf

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? There's has been on release to Maven which is something that is beyond my control and needs to be done by the Linux Foundation which does seem to be able to get that accomplished @rjones @cbf

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? It's true, there's has not been a to release to Maven which is something that is beyond my control and needs to be done by the Linux Foundation. Last Ive they've not been able get that accomplished. @rjones @cbf

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? It's true, there's has not been a to released to Maven which is something that is beyond my control and needs to be done by the Linux Foundation. Last I've they've not been able get that accomplished. @rjones @cbf

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? It's true, there's has not been a to released to Maven which is something that is beyond my control and needs to be done by the Linux Foundation. Last I've heard they've not been able get that accomplished. @rjones @cbf

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? It's true, there's has not been a to released to Maven which is something that is beyond my control and needs to be done by the Linux Foundation. Last I've heard they've not been able to get that accomplished. @rjones @cbf

rickr (Sat, 27 May 2017 09:32:32 GMT):
Where do you see it's not part of alpha2 ? It's true, there has not been a to released to Maven which is something that is beyond my control and needs to be done by the Linux Foundation. Last I've heard they've not been able to get that accomplished. @rjones @cbf

liuwenliang0632 (Mon, 29 May 2017 01:54:51 GMT):
build error after https://gerrit.hyperledger.org/r/#/c/9891/ merged

dushyant (Mon, 29 May 2017 08:57:07 GMT):
Has joined the channel.

IanSparkes (Mon, 29 May 2017 12:24:03 GMT):
I'm looking to deploy Java chaincode on alpha2, but get the message that it's not working yet. Did I read the message right that this is a feature for later and we should use Go chaincode for the moment?

svasilyev (Mon, 29 May 2017 15:29:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6oJZFugY9f9Rjojcx) @IanSparkes

svasilyev (Mon, 29 May 2017 15:29:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6oJZFugY9f9Rjojcx) @IanSparkes

svasilyev (Mon, 29 May 2017 15:29:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6oJZFugY9f9Rjojcx) @IanSparkes Java chaincode is disabled atm by https://jira.hyperledger.org/browse/FAB-3850

IanSparkes (Tue, 30 May 2017 05:59:42 GMT):
@svasilyev Thx!

lenin.mehedy (Tue, 30 May 2017 07:45:48 GMT):
I got the e2e integration test working. I am trying to isolate user enrolment and channel creation since in practice once the chaincode is deployed in the fabric, you wouldn't need to redeploy every time you update your application backend. However, I could not find any way to load existing channel (although I could reload the users) such that the backend can straight away start doing query/invoke chaincode. Is there a way to load/initialize already deployed channel? OR, any suggestion on ideally how should someone use this sdk to build the backend without requiring deployment of the chaincode every time the backend is restarted?

IanSparkes (Tue, 30 May 2017 10:25:20 GMT):
@lenin.mehedy Long answer: You can look at my example here https://bitbucket.org/isparkes/fabric-sdk-spring-boot-rest-poc which I created to start exploring the e2e test case some more. I just split up the 2e2 test case into "reasonable" chunks that you can execute via a REST call. I don't say it's ideal, I just say it works.

IanSparkes (Tue, 30 May 2017 10:26:35 GMT):
Short answer: Chain newChain = client.newChain(FOO_CHAIN_NAME);

lenin.mehedy (Tue, 30 May 2017 10:32:11 GMT):
@IanSparkes Thanks a lot. I was actually trying to build something like your REST api. Great work.

rickr (Tue, 30 May 2017 11:32:24 GMT):
End2endAndBackAgainIT show's basically how to recreate a channel and reuse. It cheats a little in that it does not actually store/retrieve the channel artifacts something I've never got around to. However I think it would be a fairly trivial l task.

rickr (Tue, 30 May 2017 11:35:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2Kg49wgtvFR5EQbyW) Yes it was a catch 22 situation I was told fixed in the fabric would address. You may have to temporarily restore src/test/fixture/sdkintegration/peer-base/peer-base.yaml line 26 to `command: peer node start --peer-defaultchain=false`

rickr (Tue, 30 May 2017 11:47:04 GMT):
Java CC will most likely not be V1.0 from what I know. I've pushed to make it easy to enable via settings that indicate `let the user beware` but doesn't seem to be making any traction https://jira.hyperledger.org/browse/FAB-4072

rickr (Tue, 30 May 2017 11:47:04 GMT):
Java CC will most likely not be V1.0 from what I know. I've pushed to make it easy to enable via settings that indicate `let the user beware` but doesn't seem to be making any traction https://jira.hyperledger.org/browse/FAB-4072 Chime if you really want it

rickr (Tue, 30 May 2017 11:47:04 GMT):
Java CC will most likely not be V1.0 from what I know. I've pushed to make it easy to enable via settings that indicate `let the user beware` but doesn't seem to be making any traction https://jira.hyperledger.org/browse/FAB-4072 Chime in if you really want it

rasmustrew (Tue, 30 May 2017 11:48:37 GMT):
Has joined the channel.

rasmustrew (Tue, 30 May 2017 11:48:43 GMT):
Hi! I have a question about starting a new chain and enrolling users. I am using the Java SDK. I have been looking at the Getting Started tutorial on readthedocs, there they use the cryptogen tool to generate keys, and use these keys to start a new chain. However, by doing this they completely bypass the CA? Is this a good way to do it? Should the CA not be used to create the keys/certificates for this?

rickr (Tue, 30 May 2017 11:58:59 GMT):
Cryptogen is a boot up development tool that generates all certs including TLS. In theory if you didn't care about CA you could use just certs/keys it generates. The Fabric/FabricCA use it's output in the end2end scenario. With the CA you can register additional user to invoke chain code. At the moment the only credentials that can create the channel and install, instantiate CC is the peerAdmin in the End2endIT. End2endIT ireads directly from the output cryptogen generates.

rickr (Tue, 30 May 2017 11:58:59 GMT):
Cryptogen is a boot up development tool that generates all certs including TLS. In theory if you didn't care about CA you could use just certs/keys it generates. The Fabric/FabricCA use it's output in the end2end scenario. With the CA you can register additional user to invoke chain code. At the moment the only credentials that can create the channel and install, instantiate CC is the peerAdmin in the End2endIT. End2endIT reads directly from the output cryptogen generates.

rickr (Tue, 30 May 2017 11:58:59 GMT):
Cryptogen is a boot up development tool that generates all certs including TLS. In theory if you didn't care about CA you could use just certs/keys it generates. The Fabric/FabricCA use it's output in the end2end scenario. With the CA you can register additional user to invoke chain code. At the moment the only credentials that can create the channel and install, instantiate CC is the peerAdmin in the End2endIT. End2endIT reads directly from the output cryptogen generates. There is no strict requirement to use the FabricCA You should be able to use some other CA too.

lenin.mehedy (Tue, 30 May 2017 12:20:40 GMT):
Hi @rickr , I can see Cryptogen generates all certs including TLS in crypto-config. However, in your fixture folder there is a separate tls folder with additional certificates. How can we generate those for any new setup?

rickr (Tue, 30 May 2017 12:22:44 GMT):
The latest code should only use cryptogen artirfacts for TLS ..

rickr (Tue, 30 May 2017 12:22:44 GMT):
The latest code should only use cryptogen artifacts for TLS ..

rasmustrew (Tue, 30 May 2017 12:35:03 GMT):
Thanks @rickr ! Is it also possible to not use the cryptogen tool at all, and only rely on the CA? How would i go about creating the credentials for the admin in this way?

rickr (Tue, 30 May 2017 12:39:53 GMT):
The SDK had an alpha2 git tag that should work with the alpha2 Fabric. It's documented in the README.md I will not speculate when the Java SDK will be V1.0.0 Here is the exit critera: https://wiki.hyperledger.org/projects/fabric/release_exit_criteria Here is the Jira Board https://jira.hyperledger.org/secure/RapidBoard.jspa?rapidView=99&view=planning&selectedIssue=FAB-648&versions=visible&epics=visible Anything not marked V1.0.0 will *not* be there for V1.0.0 when it happens. I think probably the biggest impediment to declaring V1.0.0 is sufficient test coverage. _In my opinion_ if you depend on this the time is starting to run out to get it and actively work with to see if it suits your needs.

rickr (Tue, 30 May 2017 12:45:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=82riSbCScDbzXEdMK) Don't want to mislead you on that --- I think the best place to ask that would be on #fabric or #fabric-crypto .

rickr (Tue, 30 May 2017 12:49:50 GMT):
I probably should say you can not use cryptogen but how to do it I'm thinking is not for the faint of heart. Not sure how well documented it is. Like I said better channels to ask that on as it's really not central to the SDK itself

lenin.mehedy (Tue, 30 May 2017 12:49:51 GMT):
Thanks @rickr

rasmustrew (Tue, 30 May 2017 12:53:39 GMT):
alright thanks, i'l look around :)

rickr (Tue, 30 May 2017 14:27:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rjrkfcTCpftmLX8fA) I think this has been addressed now.

rickr (Tue, 30 May 2017 14:28:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vE5TKC8ne5dTq8YPf) Should be addressed now

livespotty (Tue, 30 May 2017 15:41:39 GMT):
Has joined the channel.

anarancio (Tue, 30 May 2017 19:54:28 GMT):
hi guys, I have a running instance of fabric 1.0 running. Is there a tutorial somewhere that explains how to setup and use the SDK? https://github.com/hyperledger/fabric-sdk-java/tree/v1.0.0-alpha2 is enough? or there is some other place to look?

rickr (Tue, 30 May 2017 19:56:55 GMT):
README.md ?

anarancio (Tue, 30 May 2017 20:04:33 GMT):
yes I follow it but didn't had luck I will try all over again and ask some specific question in case it continue to fail

rickr (Tue, 30 May 2017 20:06:32 GMT):
if all you're doing is trying it out best to follow the alpha2 path initially Should be very quick to get up and running

anarancio (Tue, 30 May 2017 20:09:16 GMT):
yes we need it for a project we're working right now.. we had it on .6 but need to move to 1.0... I will start all over again with a fresh fabric 1.0 installation too

lenin.mehedy (Wed, 31 May 2017 05:31:59 GMT):
I am getting some warning in the fabric console log as below. Is that something to worry about? ``` peer1.org1.example.com | 2017-05-31 05:30:49.161 UTC [gossip/gossip] Gossip -> WARN b62 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer0.org1.example.com | 2017-05-31 05:30:51.261 UTC [gossip/gossip] Gossip -> WARN e7d Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer0.org2.example.com | 2017-05-31 05:30:52.457 UTC [gossip/gossip] Gossip -> WARN 60b Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer1.org2.example.com | 2017-05-31 05:30:54.163 UTC [gossip/gossip] Gossip -> WARN 60b Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer1.org1.example.com | 2017-05-31 05:30:54.164 UTC [gossip/gossip] Gossip -> WARN b63 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer0.org1.example.com | 2017-05-31 05:30:56.263 UTC [gossip/gossip] Gossip -> WARN e7e Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer0.org2.example.com | 2017-05-31 05:30:57.459 UTC [gossip/gossip] Gossip -> WARN 60c Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting ```

chenxuan (Wed, 31 May 2017 08:05:01 GMT):
36;1mpeer1.org1.example.com | 2017-05-31 08:04:42.684 UTC [gossip/gossip] Gossip -> WARN 3e3 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer1.org2.example.com | 2017-05-31 08:04:42.745 UTC [gossip/gossip] Gossip -> WARN 3e3 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer0.org2.example.com | 2017-05-31 08:04:47.131 UTC [gossip/gossip] Gossip -> WARN 3e4 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer0.org1.example.com | 2017-05-31 08:04:47.176 UTC [gossip/gossip] Gossip -> WARN 3e4 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer1.org1.example.com | 2017-05-31 08:04:47.686 UTC [gossip/gossip] Gossip -> WARN 3e4 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting peer1.org2.example.com | 2017-05-31 08:04:47.746 UTC [gossip/gossip] Gossip -> WARN 3e4 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting

chenxuan (Wed, 31 May 2017 08:05:04 GMT):
me too

chenxuan (Wed, 31 May 2017 08:05:23 GMT):
peer0.org2.example.com | 2017-05-31 08:03:35.118 UTC [deliveryClient] connect -> ERRO 3cb Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]

chenxuan (Wed, 31 May 2017 08:05:31 GMT):
@rickr

rasmustrew (Wed, 31 May 2017 08:10:40 GMT):
@chenxuan Might i ask what version of docer you are running? I ran into a similar issue with docker toolbox, for me it was because i had forgotten to forward ports on the VM created by docker toolbox.

rasmustrew (Wed, 31 May 2017 08:10:53 GMT):
docker*

chenxuan (Wed, 31 May 2017 08:11:19 GMT):
Docker version 1.12.5, build 7392c3b

rasmustrew (Wed, 31 May 2017 08:15:08 GMT):
Are you using docker toolbox? (needed on Windows 7).

chenxuan (Wed, 31 May 2017 08:15:38 GMT):
o

chenxuan (Wed, 31 May 2017 08:15:39 GMT):
no

chenxuan (Wed, 31 May 2017 08:15:44 GMT):
i use the ubuntu

rasmustrew (Wed, 31 May 2017 08:16:23 GMT):
What is the output of "docker ps -a" ?

chenxuan (Wed, 31 May 2017 08:16:26 GMT):
the test can not run @lenin.mehedy

chenxuan (Wed, 31 May 2017 08:16:52 GMT):
e1cdf5476ddc hyperledger/fabric-peer "peer node start" 13 minutes ago Up 13 minutes 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer1.org2.example.com cbbf1c7a498e hyperledger/fabric-peer "peer node start" 13 minutes ago Up 13 minutes 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1.org1.example.com 1924d646eb5b hyperledger/fabric-peer "peer node start" 13 minutes ago Up 13 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 5ac14d678743 hyperledger/fabric-peer "peer node start" 13 minutes ago Up 13 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com 6e2ed2928952 hyperledger/fabric-ca "sh -c 'fabric-ca-ser" 13 minutes ago Up 13 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2 80ef9e688ccf hyperledger/fabric-ca "sh -c 'fabric-ca-ser" 13 minutes ago Up 13 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1 fe2fabe5970f hyperledger/fabric-ccenv "/bin/bash" 13 minutes ago Exited (0) 13 minutes ago sdkintegration_ccenv_1 ddcef6149791 hyperledger/fabric-orderer "orderer" 13 minutes ago Up 13 minutes 0.0.0.0:7050->7050/tcp orderer.example.com

rasmustrew (Wed, 31 May 2017 08:19:57 GMT):
In your browser, if you go to "localhost:7050" Do you succesfully reach the orderer?

chenxuan (Wed, 31 May 2017 08:20:40 GMT):
docker exec -it orderer.example.com bash

chenxuan (Wed, 31 May 2017 08:21:01 GMT):
i use the cmd to get into the orderer.example.com is ok

chenxuan (Wed, 31 May 2017 08:21:34 GMT):
where the console tell me the orderer:7050

chenxuan (Wed, 31 May 2017 08:22:02 GMT):
peer0.org2.example.com | 2017-05-31 08:08:14.122 UTC [ConnProducer] NewConnection -> ERRO 412 Failed connecting to orderer:7050 , error: grpc: timed out when dialing

rasmustrew (Wed, 31 May 2017 08:28:48 GMT):
Sorry, really not sure what the problem is then :/

lenin.mehedy (Wed, 31 May 2017 08:41:24 GMT):
@chenxuan I rebuilt the fabric and fabric-ca docker images based on the commit hash that fabric-sdk-java has been built upon. That solved those issues and integration tests worked

rasmustrew (Wed, 31 May 2017 08:52:18 GMT):
Hey i have another question :) I just pulled java-sdk master. And now i am getting errors related to the import of protos. specifically here: "import static org.hyperledger.fabric.protos."

rasmustrew (Wed, 31 May 2017 08:52:31 GMT):
.whatever :)

rasmustrew (Wed, 31 May 2017 08:53:56 GMT):
How might i go about fixing this?

rasmustrew (Wed, 31 May 2017 09:07:54 GMT):
am i perhaps missing a dependency?

aaronzheng (Wed, 31 May 2017 09:09:26 GMT):
hi i have created my channel and have 'install' and 'instantiate' the 'example_cc_go' successfully. however when i try to query the result from the peer, i got below error. any idea or suggestion for it? 2017-05-31 08:57:24,271 ERROR Channel:2167 - Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=UNKNOWN, description=failed to obtain cds for example_cc_go - could not find chaincode with name 'example_cc_go', cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for example_cc_go - could not find chaincode with name 'example_cc_go' at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2167) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2101) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2064) at org.hyperledger.fabric.aaron.NormalScenario.test(NormalScenario.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for example_cc_go - could not find chaincode with name 'example_cc_go' at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:428) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:514) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:431) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:546) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

nickmelis (Wed, 31 May 2017 09:12:28 GMT):
hi folks, is the Java chaincode shim going to be included in the SDK, like it was in v0.6?

aaronzheng (Wed, 31 May 2017 09:13:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7dRqxy8JnXmqCWNgK) @rasmustrew i would recommend you to set the release version after you download the java-sdk master. e.g. you can use this command to choose alpha 2 version. git checkout tags/

nickmelis (Wed, 31 May 2017 09:13:24 GMT):
@rasmustrew have you tried building the project?

aaronzheng (Wed, 31 May 2017 09:14:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3684R6EAKqvfibQ4b) @nickmelis as i know at this moment, you have to compile the project to get the shim jar.

nickmelis (Wed, 31 May 2017 09:15:07 GMT):
@aaronzheng with 'the project', do you mean the main fabric?

rasmustrew (Wed, 31 May 2017 09:20:57 GMT):
@aaronzheng Ok just did, didnt fix the issue :/

rasmustrew (Wed, 31 May 2017 09:22:57 GMT):
or it sort of did. Eclipse is still telling me there is a compilation error before i run. It runs just fine though so i guess it's fine :)

rasmustrew (Wed, 31 May 2017 09:23:09 GMT):
thanks!

aaronzheng (Wed, 31 May 2017 09:26:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZeBJZRqw4NinJMLwN) @nickmelis yes. the main fabric project (not fabric-sdk-java)!!! go to github.com/hyperledger/fabric/core/chaincode/shim/java and execute the command 'gradle build'. then it will generate a shim.jar~ you can import it into your project.

nickmelis (Wed, 31 May 2017 09:30:08 GMT):
although it seems like java chaincode has been disabled for the release of alpha2, am I right?

aaronzheng (Wed, 31 May 2017 09:47:39 GMT):
@aaronzheng i got my root cause of my question! ha. every time sending the query chaincode request, we have to put it into channel transaction.

rasmustrew (Wed, 31 May 2017 11:39:07 GMT):
I have a new question, this time about joining a peer to a new chain. I have a network consisting of just one peer and one orderer and i want to create a channel and add my one peer to it. I just created a chain, which went well, and then attempt to join a peer to it with channel.joinPeer(peer). That throws an exception: org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to chain mychannel failed. Status FAILURE, details: Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=INTERNAL, description=null, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002. As far as i can tell, the code=INTERNAL, means that the response could not be decompressed, i.e. it was malformed in some way. The hex dump means: Not Acknowledged, End of text, Start of Header, NUL, Start of Text. I am not quite sure what that error means. Neither the Orderer or the Peer print anything at all to their logs. Any ideas?

rasmustrew (Wed, 31 May 2017 11:53:32 GMT):
I am also curious as to why there is both a public addPeer() and joinPeer().

rickr (Wed, 31 May 2017 12:03:13 GMT):
Only join once it really does join the peer to the channel. Add is later you reconstruct the chain. Add really does not grpc calls at all.

rickr (Wed, 31 May 2017 12:04:36 GMT):
Ive never once so far seen the join peer fail like that.

rasmustrew (Wed, 31 May 2017 12:37:28 GMT):
I find it really odd aswell, especially because neither the orderer or the peer prints anything to the log when i do this.

lenin.mehedy (Wed, 31 May 2017 12:40:46 GMT):
@rasmustrew various things could have gone wrong (based on my latest experience). I assume you are using the latest code and have built the containers locally. However, I would recommend you to get the EndToEnd integration test working again. Below are some of my notes to get it working (with latest commit levels) ``` # build fabric and fabric-ca cd $GOPATH/src/github.com mkdir hyperledger cd hyperledger git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric make dist-clean git checkout -b java-sdk d2bfa744059e68d2e50d2cb01d285e3c6e1f2757 make native docker cd ../fabric-ca make clean git checkout -b java-sdk ac2ee79ce8a1f80d5ae9c1ec84968882f45fd0e7 make docker # clone fabric-sdk-java locally cd $GOPATH/src/github.com mkdir hyperledger cd hyperledger git clone https://github.com/hyperledger/fabric-sdk-java.git git checkout -b java-sdk 1b72c0eb9ae5bc1a6dc6402fee9befb8803feab4 # run network cd test/fixture/sdkintegration ./fabric restart # build and run integration test mvn clean install -DkipITs=false -Dmaven.test.failure.ignore=false ``` Once you are back to a working state, start modifying the config gradually.

rasmustrew (Wed, 31 May 2017 12:57:32 GMT):
I will try this, thank you :)

rasmustrew (Wed, 31 May 2017 13:08:50 GMT):
@lenin.mehedy I get errors when i clone the fabric-ca.git. "unable to create file vendor/....SHA1WithRSA.crt: Invalid Argument"

rasmustrew (Wed, 31 May 2017 13:09:17 GMT):
also with SHA1WithRSA_2.crt

rasmustrew (Wed, 31 May 2017 13:09:59 GMT):
I dont think i have ever gotten an error during a git pull before.

rasmustrew (Wed, 31 May 2017 13:10:06 GMT):
git clone rather

lenin.mehedy (Wed, 31 May 2017 13:10:48 GMT):
yeah, that error does not make sense. particularly during git clone.

lenin.mehedy (Wed, 31 May 2017 13:11:09 GMT):
do you have enough disk space?

rasmustrew (Wed, 31 May 2017 13:12:29 GMT):
I have 110 GB free, i'm thinking that should easily be enough.

lenin.mehedy (Wed, 31 May 2017 13:12:45 GMT):
yeah, try doing the git clone again...

lenin.mehedy (Wed, 31 May 2017 13:14:24 GMT):
by the way, I assume you are running each of those commands separately? I didn't try running those in a single setup script though.

rasmustrew (Wed, 31 May 2017 13:14:36 GMT):
i am running them seperately yes

rasmustrew (Wed, 31 May 2017 13:14:41 GMT):
same thing this time.

lenin.mehedy (Wed, 31 May 2017 13:14:58 GMT):
ok, let me clone on my machine...

rasmustrew (Wed, 31 May 2017 13:15:24 GMT):
i will try ssh aswell

rasmustrew (Wed, 31 May 2017 13:17:13 GMT):
same thing for ssh

lenin.mehedy (Wed, 31 May 2017 13:17:16 GMT):
what OS are you using?

rasmustrew (Wed, 31 May 2017 13:17:23 GMT):
Windows 7

lenin.mehedy (Wed, 31 May 2017 13:17:36 GMT):
man! get a linux breed...

rasmustrew (Wed, 31 May 2017 13:17:56 GMT):
It is the computer provided to me by my work ;)

lenin.mehedy (Wed, 31 May 2017 13:18:14 GMT):
anyway, my git clone seems to be working (I am currently with a slow internet though...)

rasmustrew (Wed, 31 May 2017 13:18:49 GMT):
Very strange, i will try updating git i suppose.

lenin.mehedy (Wed, 31 May 2017 13:19:11 GMT):
yeah, try to get the git clone working....

lenin.mehedy (Wed, 31 May 2017 13:23:03 GMT):
@rasmustrew I suppose you can install vagrant and try there...

lenin.mehedy (Wed, 31 May 2017 13:23:39 GMT):
you will need to install various other things to build the docker containers locally...

lenin.mehedy (Wed, 31 May 2017 13:24:10 GMT):
follow this: https://github.com/hyperledger/fabric-sdk-java#working-with-the-fabric-vagrant-environment

rasmustrew (Wed, 31 May 2017 13:28:07 GMT):
updating git did nothing sadly :/

rasmustrew (Wed, 31 May 2017 13:30:07 GMT):
I just had a friend on widnows 10 try aswell, same issue. https://jira.hyperledger.org/browse/FAB-2771?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aworklog-tabpanel Seems to be a known issue, but "won fix".

rasmustrew (Wed, 31 May 2017 13:30:13 GMT):
wont*

rasmustrew (Wed, 31 May 2017 13:36:40 GMT):
i think i have found the cause, ":" is not an allowed char in filenames on windows.

rasmustrew (Wed, 31 May 2017 14:01:56 GMT):
perhaps i should go ahead and install linux on it over the weekend. though i imagine IBM has some fairly stric guidelines on that ^^

rasmustrew (Wed, 31 May 2017 14:12:24 GMT):
@lenin.mehedy Cloning the java-sdk worked fine, so i ran the ./fabric restart as suggested. Now i am getting the same issue as @chenxuan :joy:

lenin.mehedy (Wed, 31 May 2017 14:13:09 GMT):
did you build the container?

lenin.mehedy (Wed, 31 May 2017 14:13:20 GMT):
containers*

rasmustrew (Wed, 31 May 2017 14:14:09 GMT):
the fabric script runs docker compose which builds the containers.

lenin.mehedy (Wed, 31 May 2017 14:14:37 GMT):
no it doesn't. It pulls the official containers of alpha2.

lenin.mehedy (Wed, 31 May 2017 14:15:12 GMT):
I got working with containers built based on the latest code

rasmustrew (Wed, 31 May 2017 14:15:12 GMT):
Then i am not sure what you mean with build the containers.

rasmustrew (Wed, 31 May 2017 14:15:18 GMT):
ah ok

lenin.mehedy (Wed, 31 May 2017 14:15:37 GMT):
Did you follow all my instructions? or you skipped as you liked?

rasmustrew (Wed, 31 May 2017 14:16:07 GMT):
i had to skip since the git clone did not work.

lenin.mehedy (Wed, 31 May 2017 14:16:17 GMT):
okay, I see.

rasmustrew (Wed, 31 May 2017 14:17:25 GMT):
hmm i suppose i could just bypass git and download as zip, il try that

lenin.mehedy (Wed, 31 May 2017 14:27:23 GMT):
yeah, sounds good.

BhavishaDawda (Wed, 31 May 2017 20:25:57 GMT):
I am trying to run `Example02` ( fabric/examples/chaincode/java/chaincode_example02) and seeing the following error, ```May 31, 2017 3:36:13 PM org.hyperledger.fabric.shim.ChaincodeBase newPeerClientConnection INFO: Configuring channel connection to peer. May 31, 2017 3:36:13 PM org.hyperledger.fabric.shim.ChaincodeBase chatWithPeer INFO: Connecting to peer. May 31, 2017 3:36:13 PM io.grpc.internal.TransportSet$1 call INFO: Created transport io.grpc.netty.NettyClientTransport@26391a21(/127.0.0.1:7051) for /127.0.0.1:7051 May 31, 2017 3:36:13 PM org.hyperledger.fabric.shim.ChaincodeBase chatWithPeer INFO: Registering as 'chaincode-example-2' ... sending REGISTER May 31, 2017 3:36:13 PM io.grpc.internal.TransportSet$TransportListener transportShutdown INFO: Transport io.grpc.netty.NettyClientTransport@26391a21(/127.0.0.1:7051) for /127.0.0.1:7051 is being shutdown May 31, 2017 3:36:13 PM io.grpc.internal.TransportSet$TransportListener transportTerminated INFO: Transport io.grpc.netty.NettyClientTransport@26391a21(/127.0.0.1:7051) for /127.0.0.1:7051 is terminated May 31, 2017 3:36:13 PM org.hyperledger.fabric.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: INTERNAL``` The Fabric is running, ```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2b6b5a46851b dev-peer1.org2.example.com-mycc-1.0 "chaincode -peer.a..." 21 minutes ago Up 21 minutes dev-peer1.org2.example.com-mycc-1.0 fd2f83dd79ca dev-peer0.org1.example.com-mycc-1.0 "chaincode -peer.a..." 21 minutes ago Up 21 minutes dev-peer0.org1.example.com-mycc-1.0 d20c242c1afe dev-peer0.org2.example.com-mycc-1.0 "chaincode -peer.a..." 21 minutes ago Up 21 minutes dev-peer0.org2.example.com-mycc-1.0 f4db47edb01b hyperledger/fabric-peer "/bin/bash -c './s..." 22 minutes ago Up 22 minutes cli f134a53f8ccf hyperledger/fabric-peer "peer node start -..." 22 minutes ago Up 22 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8054->7053/tcp peer1.org1.example.com 3fa23773c7b4 hyperledger/fabric-peer "peer node start -..." 22 minutes ago Up 22 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 27f6fd0dfce1 hyperledger/fabric-peer "peer node start -..." 22 minutes ago Up 22 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com d03377b735b5 hyperledger/fabric-peer "peer node start -..." 22 minutes ago Up 22 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 0938c1177692 hyperledger/fabric-orderer "orderer" 22 minutes ago Up 22 minutes 0.0.0.0:7050->7050/tcp orderer.example.com```

rickr (Wed, 31 May 2017 20:28:25 GMT):
Java CC is not supported

BhavishaDawda (Wed, 31 May 2017 20:31:22 GMT):
Java CC is not supproted for fabric 1.0?

BhavishaDawda (Wed, 31 May 2017 20:31:22 GMT):
Java CC is not supported for fabric 1.0?

BhavishaDawda (Wed, 31 May 2017 20:31:29 GMT):
Is it supported in 0.6?

BhavishaDawda (Wed, 31 May 2017 20:31:29 GMT):
Can I use 0.6 for Java CC?

BhavishaDawda (Wed, 31 May 2017 20:31:29 GMT):
~Can I use 0.6 for Java CC?~ - Following discussion on https://chat.hyperledger.org/channel/fabric?msg=KjL3pfAwGZtgp7rXr

chrism28 (Wed, 31 May 2017 23:50:39 GMT):
@rasmustrew I had the same "Invalid Argument" error. I was using a GitBash shell under Windows. Apparently the Windows version of Git is the problem. I installed Git under cygwin64 and used it from a cygwin shell. That allowed me to clone the repository.

aaronzheng (Thu, 01 Jun 2017 01:57:42 GMT):
hi all, i have installed and instantiated my chaincode. when i use 'thenApply' to query after i invoke the channel.sendTransaction, i got nothing. in the debug mode, i still can't invoke the 'theApply' . any idea of it?

aaronzheng (Thu, 01 Jun 2017 01:58:15 GMT):

Message Attachments

tomsorgie (Thu, 01 Jun 2017 02:29:47 GMT):
Has joined the channel.

kelvinzhong (Thu, 01 Jun 2017 08:32:49 GMT):
@rickr hi, i found that in the e2e test, the endorsement policy is using the syntax like n of n, but as I know it is like AND OR expression. Is both syntax could work? or currently policy is all unified to n of n syntax?

kelvinzhong (Thu, 01 Jun 2017 08:44:48 GMT):
okay i found the readme.me has description for it

MDBijman (Thu, 01 Jun 2017 09:09:21 GMT):
Has joined the channel.

rasmustrew (Thu, 01 Jun 2017 09:16:17 GMT):
@chrism28 Thanks!

ccorley (Thu, 01 Jun 2017 12:35:37 GMT):
Has joined the channel.

slugmandrew (Thu, 01 Jun 2017 13:11:21 GMT):
Has joined the channel.

sqwerrels (Thu, 01 Jun 2017 14:03:40 GMT):
Has joined the channel.

sqwerrels (Thu, 01 Jun 2017 14:20:42 GMT):
Hi, I am trying to set up the fabric-sdk-java in eclipse and I'm running into an issue while trying to run the End2EndIT JUnit, where I get the message ```2017-06-01 14:18:46,259 ERROR Channel:419 - org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to channel foo failed. Status FAILURE, details: Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=UNIMPLEMENTED, description=unknown service protos.Endorser, cause=null} org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to channel foo failed. Status FAILURE, details: Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=UNIMPLEMENTED, description=unknown service protos.Endorser, cause=null}```

sqwerrels (Thu, 01 Jun 2017 14:21:22 GMT):
I've tried recloning the fabric-sdk-java, and if I try this out on a different computer, I don't have this issue, anyone know what this means?

sqwerrels (Thu, 01 Jun 2017 14:44:25 GMT):
Scratch the last question! I had an issue with peer when i was trying some things out in a different location, so I re-cloned fabric-sample and ran the network setup to fix the peer issue

sqwerrels (Thu, 01 Jun 2017 15:52:04 GMT):
So, I'm still trying to run End2EndIT.java test and the code just gets stuck at ```channel.sendTransaction(successful, orderers).thenApply(transactionEvent -> { waitOnFabric(0); assertTrue(transactionEvent.isValid()); // must be valid to be here. out("Finished instantiate transaction with transaction id %s", transactionEvent.getTransactionID()); try {``` and while it manages to preform sendTransaction and return sret fine, it doesn't do the thenApply and doesn't enter the brackets to assertTrue

sqwerrels (Thu, 01 Jun 2017 15:52:54 GMT):
Any one have an idea why it is stopping here?

rohitbordia (Thu, 01 Jun 2017 16:44:10 GMT):
has anyone received 404 with v1.0.0-Alpha2

rohitbordia (Thu, 01 Jun 2017 16:44:32 GMT):
enrol request fails with 404

rickr (Thu, 01 Jun 2017 20:01:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=o97w84vSxmLXvn7GH) Check orderer and peer logs for errors. At that point the sdk is waiting for an event .. via the event hub that the transaction has been committed.

rickr (Thu, 01 Jun 2017 20:03:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gEMZrQpJZtACYv2iQ) @rohitbordia No other message along with that? Look at the ca logs for any errors

sqwerrels (Thu, 01 Jun 2017 20:50:19 GMT):
hey rick I was checking the logs for /tcp peer1.org1.example.com in fabric peer and I got ```2017-06-01 20:47:18.830 UTC [ConnProducer] NewConnection -> ERRO 3f3 Failed connecting to orderer:7050 , error: grpc: timed out when dialing 2017-06-01 20:47:18.830 UTC [deliveryClient] connect -> ERRO 3f4 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050] 2017-06-01 20:47:22.865 UTC [gossip/gossip] Gossip -> WARN 3f5 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting 2017-06-01 20:47:27.866 UTC [gossip/gossip] Gossip -> WARN 3f6 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting 2017-06-01 20:47:32.868 UTC [gossip/gossip] Gossip -> WARN 3f7 Failed obtaining gossipChannel of [116 101 115 116 99 104 97 105 110 105 100] aborting ```

sqwerrels (Thu, 01 Jun 2017 20:50:47 GMT):
Any thoughts?

karumbas (Thu, 01 Jun 2017 21:14:07 GMT):
hey @rickr @here any idea why am getting this error Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service protos.Events at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:428) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:514) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:431) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:546) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

karumbas (Thu, 01 Jun 2017 21:14:07 GMT):
hey @rickr @here any idea why am getting this error ```Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service protos.Events at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:428) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:514) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:431) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:546) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ```

MikeGardiner (Fri, 02 Jun 2017 13:01:38 GMT):
Has joined the channel.

SandySun2000 (Fri, 02 Jun 2017 19:42:07 GMT):
Has joined the channel.

SahilKapoor (Fri, 02 Jun 2017 20:42:04 GMT):
Has joined the channel.

SahilKapoor (Fri, 02 Jun 2017 20:43:23 GMT):
@here How can we create peers with sdk. I want to create in a new VM where default fabric network i.e 2 peers and orderer service are not running

SahilKapoor (Fri, 02 Jun 2017 20:43:39 GMT):
Any guidance would really help

ffilozov1 (Fri, 02 Jun 2017 21:51:52 GMT):
Has joined the channel.

caiqiming (Mon, 05 Jun 2017 01:17:42 GMT):
Has joined the channel.

Willson (Mon, 05 Jun 2017 09:16:30 GMT):
hello @rickr when i send a install request with my own chaincode to peers, it returns an error: ` [ERROR] (Sending proposal to peer0 failed because of gRPC failure=Status{code=INTERNAL, description=null, cause=io.netty.handler.codec.http2.Http2Exception$StreamException: Header size exceeded max allowed size (8192)}) [2017-06-05 17:01:30][org.hyperledger.fabric.sdk.Channel] ` , but it working fine with the default chaincode of the sdk, anything wrong with this?

FengChen_1982 (Mon, 05 Jun 2017 09:31:19 GMT):
@sqwerrels where do you get the End2EndIT.java?

Willson (Mon, 05 Jun 2017 09:52:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMWbNHRKuWYZzwrKG) just ignore it. i was forgeting to set the UserContext

HansDeLeenheer (Mon, 05 Jun 2017 11:39:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WkDDP5ASaWTHSmd3p) @BhavishaDawda please upvote https://jira.hyperledger.org/browse/FAB-4072 for 'experimental' Java CC

RezwanKabir (Mon, 05 Jun 2017 13:13:05 GMT):
Has joined the channel.

sqwerrels (Mon, 05 Jun 2017 14:18:03 GMT):
@FengChen_1982 https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

jtsiros (Mon, 05 Jun 2017 20:40:11 GMT):
Has joined the channel.

jtsiros (Mon, 05 Jun 2017 20:40:36 GMT):
Hello! Not sure if anyone is able to help, but would there be any reason why sendTransaction on a channel object (using Java SDK) would block indefinitely? After the transaction proposal comes back, sending the transaction makes it to the orderer and subsequently the peers, but the SDK seems to block on this call: `channel.sendTransaction(pRes, channel.getOrderers()).get()` ``` 2017-06-05 20:37:23.645 UTC [orderer/common/deliver] Handle -> DEBU f26 Delivering block for (0xc420820100) channel: mychannel 2017-06-05 20:37:23.645 UTC [fsblkstorage] newBlockfileStream -> DEBU f2a newBlockfileStream(): filePath=[/var/hyperledger/production/orderer/chains/mychannel/blockfile_000000], startOffset=[54775] 2017-06-05 20:37:23.646 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU f2b Remaining bytes=[6069], Going to peek [8] bytes 2017-06-05 20:37:23.646 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU f2c Returning blockbytes - length=[6067], placementInfo={fileNum=[0], startOffset=[54775], bytesOffset=[54777]} 2017-06-05 20:37:23.647 UTC [orderer/common/deliver] Handle -> DEBU f2d Delivering block for (0xc4201f8200) channel: mychannel

jtsiros (Mon, 05 Jun 2017 20:44:41 GMT):
I'm using the e2e_cli example that's included in the code base

jtsiros (Mon, 05 Jun 2017 20:45:53 GMT):
I've also configured the event hub location to receive the event that the SDK is expecting: ``` c.addEventHub(client.newEventHub(PEER0, PEER0_EH_LOCATION)); c.addEventHub(client.newEventHub(PEER1, PEER1_EH_LOCATION));```

eddie.allen (Mon, 05 Jun 2017 20:51:28 GMT):
Has left the channel.

SandySun2000 (Mon, 05 Jun 2017 20:51:56 GMT):
I got the problem when I run docker ps Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.22)

SandySun2000 (Mon, 05 Jun 2017 20:53:26 GMT):
Install docker-machine is the only solution?

sqwerrels (Mon, 05 Jun 2017 21:22:43 GMT):
@jtsiros Are you on the version of the code that is on the github currently or on v1.0.0Alpha2

jtsiros (Mon, 05 Jun 2017 21:23:28 GMT):
latest - pulled master 4 days ago

sqwerrels (Mon, 05 Jun 2017 21:23:42 GMT):
Try setting the commit back to v1.0.0Alpha2

jtsiros (Mon, 05 Jun 2017 21:23:43 GMT):
commit `a01b2f93081c68def7fa960acbb0c3ff60ce1c79`

sqwerrels (Mon, 05 Jun 2017 21:23:47 GMT):
If you check the docker logs

sqwerrels (Mon, 05 Jun 2017 21:24:00 GMT):
you will likely see grpc is denied on orderer:7050

sqwerrels (Mon, 05 Jun 2017 21:24:42 GMT):
commit `dec17727ddb6b269f8fb30930e10d89bc185225f`

jtsiros (Mon, 05 Jun 2017 21:25:42 GMT):
Ok, i'll checkout that commit and try again

jtsiros (Mon, 05 Jun 2017 21:32:38 GMT):
@sqwerrels what about the java-sdk? Is latest from master OK?

jtsiros (Mon, 05 Jun 2017 21:34:30 GMT):
unless you meant both fabric and the sdk for Alpha 2

rohitbordia (Mon, 05 Jun 2017 21:59:32 GMT):
started working with alpha 2: I see below error

rohitbordia (Mon, 05 Jun 2017 21:59:33 GMT):
Failed connecting to orderer:7050 , error: grpc: timed out when dialing peer0.org1.example.com | 2017-06-05 21:58:53.385 UTC [deliveryClient] connect -> ERRO 5c4 Failed obtaining connection: Could not connect to any of the endpoints: [orderer:7050]

rohitbordia (Mon, 05 Jun 2017 22:02:56 GMT):
is this message ok?

rohitbordia (Mon, 05 Jun 2017 22:09:21 GMT):
alpha2 : Channel:2254 - Channel foo successful sent to Orderer transaction id and the java code hangs here

jtsiros (Mon, 05 Jun 2017 22:38:38 GMT):
@sqwerrels reverting to Alpha2 fixed the issue, thanks!

jtsiros (Mon, 05 Jun 2017 22:43:43 GMT):
If I query transaction by Transaction ID, is there a way I can pull out the data from `TransactionInfo`? ex `chain.queryTransactionByID(dataHash.getTxnID());`

chrism28 (Mon, 05 Jun 2017 23:33:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vBe6EHah2NAepCpP9) @szoghybe Thanks for the setup guides they were most helpful. FYI: I have found a fix for the `os.detected.classifier` issue in pom.xml. Just install the os-maven plugin, It's detailed here: https://github.com/trustin/os-maven-plugin#issues-with-eclipse-m2e-or-other-ides

FengChen_1982 (Tue, 06 Jun 2017 08:09:46 GMT):
@here I want to start testing the fabric-java-sdk, should I use 1.0.0 alpha1 or 1.0.0 alpha environment?

aaronzheng (Tue, 06 Jun 2017 08:35:50 GMT):
i have tested e2e with fabric-alpha2 and fabric-java-sdk-appha2. to me, alpha2 are fine.

FengChen_1982 (Tue, 06 Jun 2017 09:08:17 GMT):
Great, thanks so much.

SandySun2000 (Tue, 06 Jun 2017 14:33:47 GMT):
When I run sample tests and issue 'mvn package' I got the following error.

SandySun2000 (Tue, 06 Jun 2017 14:33:59 GMT):
Running org.hyperledger.fabric.sdk.ChannelTest 2017-06-06 14:18:47,997 WARN SampleStore:75 - Could not find the file "/home/ibmadmin/test.properties" 2017-06-06 14:18:47,997 WARN SampleStore:75 - Could not find the file "/home/ibmadmin/test.properties" java.io.NotSerializableException: org.hyperledger.fabric.sdk.TestHFClient$1 at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) at org.hyperledger.fabric.sdkintegration.SampleUser.saveState(SampleUser.java:147) at org.hyperledger.fabric.sdkintegration.SampleUser.setEnrollment(SampleUser.java:201) at org.hyperledger.fabric.sdk.TestHFClient.newInstance(TestHFClient.java:51) at org.hyperledger.fabric.sdk.ChannelTest.setupClient(ChannelTest.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) 2017-06-06 14:18:48,000 DEBUG HFClient:272 - Setting user context to MSPID: testMSPID? user: someTestUSER

SandySun2000 (Tue, 06 Jun 2017 14:34:42 GMT):
but my test.properties file was there

SandySun2000 (Tue, 06 Jun 2017 14:34:44 GMT):
/home/ibmadmin ibmadmin@blockchain:~$ ls -ltr total 1600 drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Videos drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Templates drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Public drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Pictures drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Music drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Downloads drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 22 2016 Documents -rw------- 1 root root 8 Apr 25 2016 x11vnc.pass drwxr-xr-x 2 ibmadmin ibmadmin 4096 Apr 28 2016 Desktop -rw-r--r-- 1 root root 1595408 May 18 18:30 get-pip.py -rw-rw-r-- 1 ibmadmin ibmadmin 802 Jun 6 10:18 test.properties

SandySun2000 (Tue, 06 Jun 2017 14:34:56 GMT):
any idea what's the cause?

sqwerrels (Tue, 06 Jun 2017 15:33:34 GMT):
The warning about the test properties isn't the error, thats just if you wanted to change properties in the code

sqwerrels (Tue, 06 Jun 2017 15:33:51 GMT):
Your error lies in that your testHFClient is not serializable

sqwerrels (Tue, 06 Jun 2017 15:34:18 GMT):
Check your classes again and see if any of them are throwing errors

pvrbharg (Tue, 06 Jun 2017 16:56:52 GMT):
Has joined the channel.

pvrbharg (Tue, 06 Jun 2017 18:09:12 GMT):
@rohitbordia This very same issue was reported previously under https://jira.hyperledger.org/browse/FAB-4204

rohitbordia (Tue, 06 Jun 2017 20:50:24 GMT):
thanks

rickr (Tue, 06 Jun 2017 21:33:56 GMT):
Current commit levels are passing. Alpha2 SDK tag was working with apha2 fabric no hang. That JIRA if memory serves correct was due to a change in fabric and then a fix in fabric. There is no guarantee of mixing current code with alpha2 levels assuming that's what's being done.

lenin.mehedy (Wed, 07 Jun 2017 00:57:36 GMT):
@rickr Any idea when (or whether) Java CC will be supported?

rickr (Wed, 07 Jun 2017 04:01:36 GMT):

Message Attachments

rickr (Wed, 07 Jun 2017 04:01:42 GMT):
@sanchezl Fairly certain it did not make the cut for V1.0 not even to make it easy to enable.

rickr (Wed, 07 Jun 2017 04:03:46 GMT):
BTW AFAIK @sanchezl I think really got it working so not his fault.

bluefireH (Wed, 07 Jun 2017 06:31:18 GMT):
Has joined the channel.

mpigmans (Wed, 07 Jun 2017 07:45:10 GMT):
Has joined the channel.

mpigmans (Wed, 07 Jun 2017 07:54:41 GMT):
Hey, when running the End2EndIT test I get the following message, but all tests do pass; ```Jun 07, 2017 9:42:54 AM org.hyperledger.fabric.sdk.Chain getGenesisBlock WARNING: Bad deliver expected status 200 got 404, Chain bar ``` Can I just ignore this warning, or does it indicate a problem with my setup?

zupan (Wed, 07 Jun 2017 10:30:40 GMT):
Hello, I'm running e2e sdk test and In the code I see java cc included, but docker images are go based. How could I run java cc?

zupan (Wed, 07 Jun 2017 10:32:03 GMT):
Also, I'm aware of the java cc being disabled in alpha2, but what does this really means for the usability in the timeframe of next two months?

zupan (Wed, 07 Jun 2017 10:33:33 GMT):
Would you recommend rewrite in GO or stay on java? All of this is for experimental purposes, but it is still important that I get it to work.

zupan (Wed, 07 Jun 2017 10:35:26 GMT):
Any input is appreciated event personal preferences on is it easier to develop in go or java (from the perspective of the project status, not language based :) ).

mastersingh24 (Wed, 07 Jun 2017 11:17:50 GMT):
@zupan - - Java chaincode will likely make a comeback in the post 1.0.0 timeframe - so probably over the next couple of months - technically there's no real difference in complexity between Go and Java chaincode - it's more of a language preference - community wise there's more experience with Go chaincode at this point - you might also want to take a look at the Hyperledger Composer project as well - it makes developing fabric applications very easy - https://www.hyperledger.org/projects/composer

zupan (Wed, 07 Jun 2017 11:29:19 GMT):
@mastersingh24 thank you for a detailed overview.

mastersingh24 (Wed, 07 Jun 2017 12:06:10 GMT):
sure thing

pvrbharg (Wed, 07 Jun 2017 16:31:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MX2ccZBhnFvJ4mwPT) @rickr Is your response applicable to fabric-sdk-java? We can replicate the hang issue on multiple work stations at will in our environment - alpha2 SDK and alpha2 fabric. We uploaded a set of additional debug traces to the reported issue. This is holding us up as of now and the use case worked previously for our customer. Please clarify and as we know - it needs to work in our environment in the end. Thanks.

rickr (Wed, 07 Jun 2017 16:40:06 GMT):
Whats the scenario .. e2e hanging ? Something you developed hangs ?

rohitbordia (Wed, 07 Jun 2017 18:10:03 GMT):
@rickr : Nothing we developed which hangs. We switched to alpha2 and E2E test does not work hangs and we have to kill

rickr (Wed, 07 Jun 2017 18:16:39 GMT):
simple direct connect ? nothing like a load balancer ?

rickr (Wed, 07 Jun 2017 18:17:48 GMT):
We have noticed hangs with LB in the middle

rickr (Wed, 07 Jun 2017 18:18:28 GMT):
Fix coming that implements a grpc keep alive

pvrbharg (Wed, 07 Jun 2017 18:51:36 GMT):
@rickr out-of-box ibm sample as is, running in ibm recommended fabric-sdk-java sandbox. alpha2 refresh and no longer works. Prior to refresh - the same sample worked for this customer team on multiple machines. We are using e2e out-of-box sample as a kind of IVT validation/quick check to make sure we are on stable platform... Hope this helps.

rickr (Wed, 07 Jun 2017 20:23:01 GMT):
Anything on orderer or peer sides ? client side env ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL set to TRACE can show some diagnostic

rickr (Wed, 07 Jun 2017 20:23:40 GMT):
gut tells me you need to look an errors on the peer or orderer

rohitbordia (Wed, 07 Jun 2017 22:16:21 GMT):
@rickr: the only thing, I see in docker logs : UTC [ConnProducer] NewConnection -> ERRO 5ee Failed connecting to orderer:7050 , error: grpc: timed out when dialing rickr 3:18 PM

rickr (Thu, 08 Jun 2017 11:19:48 GMT):
Pretty good bet that's your issue.

rickr (Thu, 08 Jun 2017 11:22:18 GMT):
If you're running the untouched docker-compose not sure why you would be getting that. I assume you did a docker ps -a see that orderer is running.

thoduerr (Thu, 08 Jun 2017 13:33:33 GMT):
Has joined the channel.

rohitbordia (Thu, 08 Jun 2017 14:18:47 GMT):
yes , I see logs also its working fine

rohitbordia (Thu, 08 Jun 2017 14:19:23 GMT):
curiosity is , we ran in 3 machines and all have same issues

KouichiUme (Thu, 08 Jun 2017 15:33:25 GMT):
Has joined the channel.

pvrbharg (Thu, 08 Jun 2017 19:20:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tMG23btYZXWBcPb8u) @rohitbordia [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zxzDkJRKyxnF2d76y) @rickr In an apples to oranges comparison - on the same alpha2 driver level - we have not seen this UTC [ConnProducer] NewConnection -> ERRO 5ee Failed connecting to orderer:7050 , error: grpc: timed out when dialing with Go sandbox on my own laptop - just fyi

pvrbharg (Thu, 08 Jun 2017 19:26:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zxzDkJRKyxnF2d76y) @rickr So would the suggestion be to increase grpc time out tunable parameter? Network latency can be unknown and defaults may not be good for every setting. Should we look into network insights - as to why timing out [increase timeout param or open a firewall or whatever else - domain of wireshark?]

rickr (Thu, 08 Jun 2017 19:41:27 GMT):
Maybe ask on the fabric forum .. You while its up and running docker exec into a peer . you'll need to do an apt-get to get the package that has ping .. and then you could try to see if you can ping the orderer or get telnet and see if you can get to port 7050 .. just some ideas

rickr (Thu, 08 Jun 2017 19:41:27 GMT):
Maybe ask on the fabric forum .. You can while its up and running docker exec into a peer . you'll need to do an apt-get to get the package that has ping .. and then you could try to see if you can ping the orderer or get telnet and see if you can get to port 7050 .. just some ideas

kontos (Thu, 08 Jun 2017 19:45:23 GMT):
Has joined the channel.

jyg007 (Thu, 08 Jun 2017 20:30:39 GMT):
Has joined the channel.

bh4rtp (Fri, 09 Jun 2017 01:11:57 GMT):
@here ···Running the unit tests To run the unit tests, please use mvn test or mvn install which will run the unit tests and build the jar file. You must be running a local peer and orderer to be able to run the unit tests.··· the doc says running a local peer, does this mean run `src/test/fixture/sdkintegration#docker-compose up` first?

bh4rtp (Fri, 09 Jun 2017 01:11:57 GMT):
@here ```Running the unit tests To run the unit tests, please use mvn test or mvn install which will run the unit tests and build the jar file. You must be running a local peer and orderer to be able to run the unit tests.``` the doc says running a local peer, does this mean run `src/test/fixture/sdkintegration#docker-compose up` first?

cbf (Fri, 09 Jun 2017 01:12:50 GMT):
@bh4rtp do you want a full run or targeted?

cbf (Fri, 09 Jun 2017 01:13:26 GMT):
oh sorry, you want @rickr

cbf (Fri, 09 Jun 2017 01:13:39 GMT):
I didn't know what channel I was in;-)

bh4rtp (Fri, 09 Jun 2017 01:13:53 GMT):
never mind.

bh4rtp (Fri, 09 Jun 2017 01:19:04 GMT):
@rickr based on the eclipse neon.2, i did the following steps: 1. build latest fabric and fabric-ca. examples/e2e_cli runs ok. 2. run docker-compose -f src/test/fixture/sdkintegration/docker-compose.yaml up 3. in the eclipse neon.2, run maven clean and maven install but there are a number of errors remain.

torresjeff (Fri, 09 Jun 2017 02:38:45 GMT):
Has joined the channel.

lenin.mehedy (Fri, 09 Jun 2017 05:09:07 GMT):
@rickr What would be the process to enable TLS for both CA and orderers?

lenin.mehedy (Fri, 09 Jun 2017 05:10:03 GMT):
@rickr I did the following to enable TLS and CA: 1. enable TLS on ca ``` ca0: image: hyperledger/fabric-ca${IMAGE_TAG_FABRIC_CA} environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/bbb1df5d64a2477f94c718a384db675cf23ac22364b157a492bf2a952bf26be2_sk ports: - "7054:7054" command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/bbb1df5d64a2477f94c718a384db675cf23ac22364b157a492bf2a952bf26be2_sk -b admin:adminpw ${ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS} --tls.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --tls.keyfile /etc/hyperledger/fabric-ca-server-config/bbb1df5d64a2477f94c718a384db675cf23ac22364b157a492bf2a952bf26be2_sk -d' volumes: - ./e2e-2Orgs/channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config:ro container_name: ca0.org1.example.com ca1: image: hyperledger/fabric-ca${IMAGE_TAG_FABRIC_CA} environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/f32d52f74d7607ab296e612c7dd7fa09cba597b1cb8b7c3ad81742205d5f0666_sk ports: - "8054:7054" command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/f32d52f74d7607ab296e612c7dd7fa09cba597b1cb8b7c3ad81742205d5f0666_sk -b admin:adminpw ${ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS} --tls.certfile /etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem --tls.keyfile /etc/hyperledger/fabric-ca-server-config/f32d52f74d7607ab296e612c7dd7fa09cba597b1cb8b7c3ad81742205d5f0666_sk -d' volumes: - ./e2e-2Orgs/channel/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config:ro container_name: ca0.org2.example.com ``` 2. enable TLS on orderers ``` orderer.example.com: container_name: orderer.example.com image: hyperledger/fabric-orderer${IMAGE_TAG_FABRIC} environment: - ORDERER_GENERAL_LOGLEVEL=debug - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - ORDERER_GENERAL_GENESISMETHOD=file - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/orderer.block - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp #- ORDERER_GENERAL_TLS_ENABLED=${ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS} - ORDERER_GENERAL_TLS_ENABLED=true - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/msp/orderer/tls/server.key - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/msp/orderer/tls/server.crt - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/msp/orderer/tls/ca.crt] # - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/msp/orderer/tls/ca.crt, /etc/hyperledger/msp/peer0Org1/tls/ca.crt, /etc/hyperledger/msp/peer1Org1/tls/ca.crt, /etc/hyperledger/msp/peer0Org2/tls/ca.crt, /etc/hyperledger/msp/peer1Org2/tls/ca.crt] - GRPC_TRACE=all=true, - GRPC_VERBOSITY=debug working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: orderer volumes: - ./e2e-2Orgs/channel:/etc/hyperledger/configtx:ro - ./e2e-2Orgs/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer:ro ports: - 7050:7050 ``` Then I have set ``` defaultProperty(INTEGRATIONTESTSTLS, "yes");``` in TestConfig.

lenin.mehedy (Fri, 09 Jun 2017 05:14:47 GMT):
@rickr However I am getting some SSL error as below: ``` 15:13:54.164 [grpc-default-worker-ELG-2-2] DEBUG io.netty.handler.codec.http2.Http2ConnectionHandler - [id: 0xa6c533e0, L:/0:0:0:0:0:0:0:1:60122 ! R:localhost/0:0:0:0:0:0:0:1:7051] Sending GOAWAY failed: lastStreamId '0', errorCode '0', debugData ''. Forcing shutdown of the connection. javax.net.ssl.SSLException: SSLEngine closed already at io.netty.handler.ssl.SslHandler.wrap(...)(Unknown Source) 15:13:54.168 [com.ibm.blueaudit.fabric.deploy.DeployApp.main()] ERROR org.hyperledger.fabric.sdk.Channel - Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=UNAVAILABLE, description=null, cause=io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 000000040000000000000004080000000000000efff1 at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1057) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) at java.lang.Thread.run(Thread.java:748) } ```

kelvinzhong (Fri, 09 Jun 2017 07:50:43 GMT):

Message Attachments

kelvinzhong (Fri, 09 Jun 2017 07:50:45 GMT):

Message Attachments

kelvinzhong (Fri, 09 Jun 2017 07:51:32 GMT):
seems the coding in such a hurry :) @rickr

kelvinzhong (Fri, 09 Jun 2017 07:53:04 GMT):

Message Attachments

kelvinzhong (Fri, 09 Jun 2017 07:53:56 GMT):
also here should provide List as the input in case the policy with multiple signature

chenxuan (Fri, 09 Jun 2017 08:29:25 GMT):
instantiate

chenxuan (Fri, 09 Jun 2017 08:29:31 GMT):
Sending proposal to peer1.org1.example.com failed because of gRPC failure=Status{code=UNKNOWN, description=failed to obtain cds for cc_go_1 - could not find chaincode with name 'cc_go_1', cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to obtain cds for cc_go_1 - could not find chaincode with name 'cc_go_1'

kelvinzhong (Fri, 09 Jun 2017 08:35:53 GMT):
description=failed to obtain cds for cc_go_1 - could not find chaincode with name 'cc_go_1', cause=null

kelvinzhong (Fri, 09 Jun 2017 08:36:23 GMT):
base on the message, u haven't install the chaincode successfully

kelvinzhong (Fri, 09 Jun 2017 08:39:00 GMT):
check your path to your chaincode is correct

kelvinzhong (Fri, 09 Jun 2017 08:39:00 GMT):
check the path of your chaincode file which used for installing the chaincode

chenxuan (Fri, 09 Jun 2017 08:48:55 GMT):
i see the container have been started

chenxuan (Fri, 09 Jun 2017 08:53:30 GMT):
Successful install proposal response Txid: f7a14ff6cf60152562e3a1f69d70adc037a6624c360ac1b00de3e796911bba5f from peer peer0.org1.example.com Successful install proposal response Txid: f7a14ff6cf60152562e3a1f69d70adc037a6624c360ac1b00de3e796911bba5f from peer peer1.org1.example.com Succesful instantiate proposal response Txid: 74a79ea46b763d05e5d3c7f837495e07411408f2e605cc363ef42e09cf1fe8fe from peer peer0.org1.example.com Succesful instantiate proposal response Txid: 74a79ea46b763d05e5d3c7f837495e07411408f2e605cc363ef42e09cf1fe8fe from peer peer1.org1.example.com 交易开始时间:1496998313008

chenxuan (Fri, 09 Jun 2017 08:56:26 GMT):
the chaincode install,instantiate is ok

chenxuan (Fri, 09 Jun 2017 08:56:46 GMT):
but when i start to take transaction the error occur

kelvinzhong (Fri, 09 Jun 2017 09:50:47 GMT):
is the chaincode container still functional when you execute the transaction ?

kelvinzhong (Fri, 09 Jun 2017 09:51:06 GMT):
or the name of the chaincode container is "cc_go_1"?

chenxuan (Fri, 09 Jun 2017 10:08:13 GMT):
yes

kelvinzhong (Fri, 09 Jun 2017 11:00:25 GMT):
that's weird, i'm not sure what's the scenario

MDBijman (Fri, 09 Jun 2017 11:28:12 GMT):
In the SampleOrg.java file used in the end-to -nd tests there's a peerAdmin and an admin. What is the difference between the two?

MDBijman (Fri, 09 Jun 2017 11:28:12 GMT):
In the SampleOrg.java file used in the end-to-end tests there's a peerAdmin and an admin. What is the difference between the two?

chenxuan (Fri, 09 Jun 2017 11:34:40 GMT):
@kelvinzhong the e2e channel.sendTransaction(successful, orderers).thenApply(transactionEvent -> {

chenxuan (Fri, 09 Jun 2017 11:34:52 GMT):
successful

chenxuan (Fri, 09 Jun 2017 11:34:53 GMT):
?

chenxuan (Fri, 09 Jun 2017 11:34:58 GMT):
parameter is?

chenxuan (Fri, 09 Jun 2017 11:41:50 GMT):
the e2e channel.sendTransaction(successful, orderers).thenApply(transactionEvent -> {

chenxuan (Fri, 09 Jun 2017 11:44:12 GMT):
the e2e runChannel method flow the install Instantiate and take transaction but i want to part it

laliux (Fri, 09 Jun 2017 16:15:23 GMT):
Has joined the channel.

MikeGardiner (Fri, 09 Jun 2017 18:21:41 GMT):
Hello Gentlepeople, I just entered an issue in the JIRA FAB-4508 and wanted to kick off some discussion here.

rickr (Fri, 09 Jun 2017 18:29:06 GMT):
Hi Mike - I think it would be better to as much as possible put the discussions in the JIRA itself so it all stays in one place instead of scattered around in this chat. That way we'll always have the full context of decisions in one place

rickr (Fri, 09 Jun 2017 18:44:15 GMT):
Also we are really focused on v1.0 at moment so I hope you understand if we're a little slow in responding on it

jpatchell (Fri, 09 Jun 2017 18:56:06 GMT):
Has joined the channel.

xuanchen (Fri, 09 Jun 2017 23:57:01 GMT):
@rickr can you answer me

rickr (Sat, 10 Jun 2017 08:00:04 GMT):
Missing the question

rickr (Sat, 10 Jun 2017 08:01:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wvqxChMNf8xAyFH2T) look at the `.env` file in the sdkintegration directory

MikeGardiner (Sun, 11 Jun 2017 00:45:39 GMT):
@rickr No worries on keeping the discussion in Jira.

lenin.mehedy (Mon, 12 Jun 2017 00:59:44 GMT):
thanks @rickr Got it working...

kelvinzhong (Mon, 12 Jun 2017 02:47:15 GMT):
hi rickr, i wonder what is the different between the admin and peerAdmin in the e2e test, they seems to be the same...

kelvinzhong (Mon, 12 Jun 2017 02:47:15 GMT):
hi rickr, i wonder what is the different between the admin and peerAdmin in the e2e test, they seems to be the same... @rickr

Mnorberto (Mon, 12 Jun 2017 04:16:45 GMT):
Has joined the channel.

rickr (Mon, 12 Jun 2017 11:16:09 GMT):
With the default policy by configtx peerAdmin can do anything. The rest of the credentials can only invoke chaincode. The admin which would probably be better named as registrar can register additional users that can invoke the chaincode.

dayubian (Mon, 12 Jun 2017 12:21:15 GMT):
@rickr Hi Rickr, I found that, after upgraded to 1.0.0beta, TEST_USER1 could not invoke the chaincode.

rickr (Mon, 12 Jun 2017 12:45:44 GMT):
I think in the End2endIt.java test roughly around line 353 there's a line `client.setUserContext(sampleOrg.getUser(TESTUSER_1_NAME));` before the move. Seems to me the user is doing an invoke move there

dayubian (Mon, 12 Jun 2017 13:16:24 GMT):
thanks @rickr Got it.

kelvinzhong (Mon, 12 Jun 2017 15:19:32 GMT):
so the peerAdmin could also register additional user, right? in fact the admin could replaced with the peerAdmin

kelvinzhong (Mon, 12 Jun 2017 15:21:43 GMT):
is the admin an intermediate ca? also the peerAdmin is an intermediate ca but also set as the real admin, so the peerAdmin could do any thing @rickr

kelvinzhong (Mon, 12 Jun 2017 15:21:43 GMT):
is the admin an intermediate ca? also the peerAdmin is an intermediate ca but also set as the real admin, so the peerAdmin could do anything @rickr

rickr (Mon, 12 Jun 2017 15:39:23 GMT):
good question -- Have not tried that :)

WHATISOOP (Tue, 13 Jun 2017 02:30:06 GMT):
Has joined the channel.

kelvinzhong (Tue, 13 Jun 2017 02:43:02 GMT):
well, i have tried that just now, turn out that the peerAdmin could not register a user, and I look into the config file of the admin, it should also have the right to register a peer too, would you please provide a template to register peer in the e2e test? seems the cryptogen tool could not generate the crypto file for the additional peer/orderer

Rachitga (Tue, 13 Jun 2017 08:49:16 GMT):
Has joined the channel.

absingh0 (Tue, 13 Jun 2017 08:59:17 GMT):
Has joined the channel.

adc (Tue, 13 Jun 2017 13:06:57 GMT):
Has joined the channel.

adc (Tue, 13 Jun 2017 13:22:06 GMT):
Hello, where do I get this dependency (import org.hyperledger.fabric.protos.common.Common.Block) from?

adc (Tue, 13 Jun 2017 13:22:22 GMT):
IntelliJ is not able to find it but when I compile using maven it works

rasmustrew (Tue, 13 Jun 2017 13:42:07 GMT):
Hi! Can anyone provide some insight on this error? 2178 [main] DEBUG org.hyperledger.fabric.sdk.Channel - Channel mychannel send proposal to peer peer0.org1.example.com at url grpc://localhost:7051 2179 [main] DEBUG org.hyperledger.fabric.sdk.Peer - peer.sendProposalAsync name: peer0.org1.example.com, url: grpc://localhost:7051 2195 [grpc-default-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - ----------------OUTBOUND-------------------- [id: 0x8c85cc56, L:/127.0.0.1:60539 - R:localhost/127.0.0.1:7051] SETTINGS: ack=false, settings={ENABLE_PUSH=0, MAX_CONCURRENT_STREAMS=0, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=8192} ------------------------------------ 2196 [grpc-default-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - ----------------OUTBOUND-------------------- [id: 0x8c85cc56, L:/127.0.0.1:60539 - R:localhost/127.0.0.1:7051] WINDOW_UPDATE: streamId=0, windowSizeIncrement=983041 ------------------------------------ 2204 [grpc-default-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - ----------------OUTBOUND-------------------- [id: 0x8c85cc56, L:/127.0.0.1:60539 - R:localhost/127.0.0.1:7051] GO_AWAY: lastStreamId=0, errorCode=1, length=77, bytes=4669727374207265636569766564206672616d6520776173206e6f742053455454494e47532e204865782064756d7020666f7220666972737420352062797465... ------------------------------------ 2207 [grpc-default-worker-ELG-1-2] DEBUG io.netty.handler.codec.http2.Http2ConnectionHandler - [id: 0x8c85cc56, L:/127.0.0.1:60539 - R:localhost/127.0.0.1:7051] Sent GOAWAY: lastStreamId '0', errorCode '1', debugData 'First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002'. Forcing shutdown of the connection. 2209 [main] ERROR org.hyperledger.fabric.sdk.Channel - Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=INTERNAL, description=null, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:309) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:217) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:401) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) at java.lang.Thread.run(Unknown Source)

rasmustrew (Tue, 13 Jun 2017 13:43:05 GMT):
Seems to maybe be related to the order in which the messages arrive? The peer seems to be expecting SETTINGS to arrive first, but instead sees GO_AWAY First?

rickr (Tue, 13 Jun 2017 13:46:54 GMT):
If you are not connecting though a load balancer you can search through the End2xxx samples and remove keepAliveTime statements

rickr (Tue, 13 Jun 2017 13:47:59 GMT):
I think that would address it

rasmustrew (Tue, 13 Jun 2017 13:48:36 GMT):
I am trying to use the End2End samples as a starting point, right now i am attempting to join a single peer to a network. I dont have any keepAliveTime statements anywhere right now.

rasmustrew (Tue, 13 Jun 2017 13:49:03 GMT):
i am running local containers

rickr (Tue, 13 Jun 2017 13:49:24 GMT):
if you're running the end2end and have not changed anything you are running with keepalive

rasmustrew (Tue, 13 Jun 2017 13:51:05 GMT):
i have changed many things :) What i am doing is trying to make the most basic network, 1 ca, 1 orderer, 1 peer, so i am copying the relevant parts from end2end

rasmustrew (Tue, 13 Jun 2017 13:51:24 GMT):
specifically from End2endIT.java

rasmustrew (Tue, 13 Jun 2017 13:52:01 GMT):
i can make a channel just fine, but when i attempt to join the first peer i get this

rasmustrew (Tue, 13 Jun 2017 13:58:21 GMT):
any ideas?

rasmustrew (Tue, 13 Jun 2017 13:58:54 GMT):
chainConfig = new ChannelConfiguration(new File("C:/Users/IBM_ADMIN/Desktop/blockchain_test/channel-artifacts/channel.tx")); hf = HFClient.createNewInstance(); hf.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); ca = new MyCA(); admin = ca.enrollAdmin(); hf.setUserContext(admin); Properties ordererProperties = new Properties(); ordererProperties.setProperty("pemFile", "C:/Users/IBM_ADMIN/Desktop/blockchain_test/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem"); orderer = hf.newOrderer("orderer.example.com", "grpc://localhost:7050", ordererProperties); Properties peerProperties = new Properties(); peer = hf.newPeer("peer0.org1.example.com", "grpc://localhost:7053", peerProperties); byte[] signers = hf.getChannelConfigurationSignature(chainConfig, admin); Channel mychannel = hf.newChannel("mychannel", orderer, chainConfig, signers); mychannel.joinPeer(peer); mychannel.initialize();

rasmustrew (Tue, 13 Jun 2017 13:59:05 GMT):
This is the code i am running, anything seem off?

chenxuan (Wed, 14 Jun 2017 03:35:25 GMT):
New channel foo error. StatusValue 400. Status BAD_REQUEST

CarlXK (Wed, 14 Jun 2017 07:59:30 GMT):
@rickr @here 1.0-beta java sdk, invoke SDKUtils.getProposalConsistencySets method sometimes throws exception, but the result from peers are same, and i change the code to below it works ``` public Collection> getProposalConsistencySets(Collection proposalResponses) throws QueryChainCodeException { if (proposalResponses == null) { throw new QueryChainCodeException("proposalResponses collection is null"); } if (proposalResponses.isEmpty()) { throw new QueryChainCodeException("proposalResponses collection is empty"); } HashMap> ret = new HashMap<>(); for (ProposalResponse proposalResponse : proposalResponses) { // ByteString rwsetByteString = proposalResponse.getProposalResponsePayloadDeserializer() // .getExtension().getChaincodeAction().getResults(); *ByteString rwsetByteString = proposalResponse.getProposalResponse().getResponse().getPayload();* Set set = ret.computeIfAbsent(rwsetByteString, k -> new HashSet<>()); set.add(proposalResponse); } return ret.values(); } ```

CarlXK (Wed, 14 Jun 2017 07:59:30 GMT):
@rickr @here 1.0-beta java sdk, invoke SDKUtils.getProposalConsistencySets method sometimes throws exception, but the result from peers are same, and i change the code to below it works ``` public Collection> getProposalConsistencySets(Collection proposalResponses) throws QueryChainCodeException { if (proposalResponses == null) { throw new QueryChainCodeException("proposalResponses collection is null"); } if (proposalResponses.isEmpty()) { throw new QueryChainCodeException("proposalResponses collection is empty"); } HashMap> ret = new HashMap<>(); for (ProposalResponse proposalResponse : proposalResponses) { // ByteString rwsetByteString = proposalResponse.getProposalResponsePayloadDeserializer() // .getExtension().getChaincodeAction().getResults(); ByteString rwsetByteString = proposalResponse.getProposalResponse().getResponse().getPayload(); Set set = ret.computeIfAbsent(rwsetByteString, k -> new HashSet<>()); set.add(proposalResponse); } return ret.values(); } ```

CarlXK (Wed, 14 Jun 2017 07:59:30 GMT):
@rickr @here 1.0-beta java sdk, invoke SDKUtils.getProposalConsistencySets method sometimes throws exception, but the result from peers are same, and i change the code to below it works ``` public Collection> getProposalConsistencySets(Collection proposalResponses) throws QueryChainCodeException { if (proposalResponses == null) { throw new InvalidArgumentException("proposalResponses collection is null"); } if (proposalResponses.isEmpty()) { throw new InvalidArgumentException("proposalResponses collection is empty"); } HashMap> ret = new HashMap<>(); for (ProposalResponse proposalResponse : proposalResponses) { // ByteString rwsetByteString = proposalResponse.getProposalResponsePayloadDeserializer() // .getExtension().getChaincodeAction().getResults(); ByteString rwsetByteString = proposalResponse.getProposalResponse().getResponse().getPayload(); Set set = ret.computeIfAbsent(rwsetByteString, k -> new HashSet<>()); set.add(proposalResponse); } return ret.values(); } ```

CarlXK (Wed, 14 Jun 2017 07:59:30 GMT):
@rickr @here 1.0-beta java sdk, invoke SDKUtils.getProposalConsistencySets method sometimes throws exception, but the result from peers are same, and i change the code to below it works, it's a bug? ``` public Collection> getProposalConsistencySets(Collection proposalResponses) throws QueryChainCodeException { if (proposalResponses == null) { throw new InvalidArgumentException("proposalResponses collection is null"); } if (proposalResponses.isEmpty()) { throw new InvalidArgumentException("proposalResponses collection is empty"); } HashMap> ret = new HashMap<>(); for (ProposalResponse proposalResponse : proposalResponses) { // ByteString rwsetByteString = proposalResponse.getProposalResponsePayloadDeserializer() // .getExtension().getChaincodeAction().getResults(); ByteString rwsetByteString = proposalResponse.getProposalResponse().getResponse().getPayload(); Set set = ret.computeIfAbsent(rwsetByteString, k -> new HashSet<>()); set.add(proposalResponse); } return ret.values(); } ```

CarlXK (Wed, 14 Jun 2017 07:59:30 GMT):
@rickr @jimthematrix @here 1.0-beta java sdk, invoke SDKUtils.getProposalConsistencySets method sometimes throws exception, but the result from peers are same, and i change the code to below it works, it's a bug? ``` public Collection> getProposalConsistencySets(Collection proposalResponses) throws QueryChainCodeException { if (proposalResponses == null) { throw new InvalidArgumentException("proposalResponses collection is null"); } if (proposalResponses.isEmpty()) { throw new InvalidArgumentException("proposalResponses collection is empty"); } HashMap> ret = new HashMap<>(); for (ProposalResponse proposalResponse : proposalResponses) { // ByteString rwsetByteString = proposalResponse.getProposalResponsePayloadDeserializer() // .getExtension().getChaincodeAction().getResults(); ByteString rwsetByteString = proposalResponse.getProposalResponse().getResponse().getPayload(); Set set = ret.computeIfAbsent(rwsetByteString, k -> new HashSet<>()); set.add(proposalResponse); } return ret.values(); } ```

rickr (Wed, 14 Jun 2017 11:36:18 GMT):
@CarlXK I don't think that's the same thing to cover just the rwsets are identical but if that works for you now ok. You seem to be the first to report this. I'd would prefer a JIRA with details if you could. How can this be reproduced ? What is stacktrace ? Can you enable logging and make this happen ? set env var `ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=DEBUG`

rickr (Wed, 14 Jun 2017 11:36:18 GMT):
@CarlXK I don't think that's the same thing to cover just the rwsets are identical but if that works for you now ok. You seem to be the first to report this. I'd would prefer a JIRA with details if you could. How can this be reproduced ? What is stacktrace ? Can you enable logging and make this happen ? set env var `ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=DEBUG` Thanks

CarlXK (Wed, 14 Jun 2017 11:38:11 GMT):
OK, i will enable log debug and submit a JIRA

gauravgiri (Wed, 14 Jun 2017 12:05:31 GMT):
While using fabric-sdk-java with v1.0.0-beta, what is the best practice/method to store the user enrollment keys/certificates in a database store. Currently a utility class SampleStore is provided, which is based on File store.

ada-wang (Wed, 14 Jun 2017 15:21:35 GMT):
Hi All, I'm confused for newChannel's actions in the End2EndIT.java. In Channel Class, I can find queryChannels function. I read the code and test it, it runs well. BUT, after I HFClient.newChannel and shutdown the program, I cannot get the channel object again, SO the persistence of Channel is not implemented yet ??? Thus, how to get the channel created before, we need it to sendTransaction ..😭

svasilyev (Wed, 14 Jun 2017 15:35:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jw6YESrW5XYoEAmFu) @ada-wang Take a look at End2endAndBackAgainIT.reconstructChannel method

ManjeetGambhir (Wed, 14 Jun 2017 15:41:03 GMT):
@rickr Is there a way that channel can automatically reconnect to fabric ecosystem after restart (orderer went down and comes back up)

rickr (Wed, 14 Jun 2017 16:49:32 GMT):
I think if you get an error and try again it should work. I'm not going to put retry for orderer in the SDK for v1.0 timeline

ManjeetGambhir (Wed, 14 Jun 2017 16:49:44 GMT):
@rickr ok

rickr (Wed, 14 Jun 2017 16:50:08 GMT):
Feel free to create JIRA for an improvement

ManjeetGambhir (Wed, 14 Jun 2017 16:50:18 GMT):
@rickr one more question, can you please suggest me , how to increase sdk endorsement timeout

ManjeetGambhir (Wed, 14 Jun 2017 16:51:05 GMT):
@rickr Now sending big # of trades for chaincode endorsement , it's getting timeout

rickr (Wed, 14 Jun 2017 16:56:26 GMT):
On the request is there a setProposalWaitTime ?

larsf (Wed, 14 Jun 2017 20:59:35 GMT):
Has joined the channel.

ada-wang (Thu, 15 Jun 2017 00:50:59 GMT):
@svasilyev Thank you very much!!! I forget that ...:sob: THX!!!

kyle1234 (Thu, 15 Jun 2017 01:12:27 GMT):
Has joined the channel.

lijiajun1979 (Thu, 15 Jun 2017 01:19:45 GMT):
Has joined the channel.

yahtoo (Thu, 15 Jun 2017 03:00:39 GMT):
Has joined the channel.

Ashish (Thu, 15 Jun 2017 09:49:23 GMT):
Hi Can anyone tell me how to get the jars required to connect to the Fabric from my java code ?

Ashish (Thu, 15 Jun 2017 09:50:36 GMT):
My fabric is running on dockers in my local pc.

Ashish (Thu, 15 Jun 2017 09:51:21 GMT):
and i saw the video and I read the docs. but no where its mentioned how to download the jars - may be someone can guide me, pls ?

rickr (Thu, 15 Jun 2017 12:04:55 GMT):
The alpha2 and Beta were published to Maven so you should be able to just reference it in your pom.xml https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java/1.0.0-beta

Ashish (Thu, 15 Jun 2017 12:22:50 GMT):
Thank you @rickr

Ashish (Thu, 15 Jun 2017 12:52:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hsLWMts74czaG9pdK) @szoghybe Thanks

nickmelis (Thu, 15 Jun 2017 14:34:56 GMT):
how do I know if a channel is already existent before trying to create it?

SahilKapoor (Thu, 15 Jun 2017 16:49:27 GMT):
Hi,

SahilKapoor (Thu, 15 Jun 2017 16:52:10 GMT):
I am new to using this SDK. Can some one help me to setup the dev environment if I already have a fabric network running in the cloud. Do I need to set some config file somewhere so that it can get connection profile or do I mention the grpc urls soemwhere? How can I create a new peers on other vm ? Please help..

rickr (Fri, 16 Jun 2017 00:26:48 GMT):
There is no way no to determine if a channel already exists at the moment. If it does, the creation will fail - guess you'll know then. I think a JIRA should be opened for that and the SDK really needs _proper_ Fabric API for this. However even when then API exists there would be no guarantee that between the time you queried and the time you attempted to create it's not be already created by someone else.

rickr (Fri, 16 Jun 2017 00:26:48 GMT):
There is no way now to determine if a channel already exists at the moment. If it does, the creation will fail - guess you'll know then. I think a JIRA should be opened for that and the SDK really needs _proper_ Fabric API for this. However even when then API exists there would be no guarantee that between the time you queried and the time you attempted to create it's not be already created by someone else.

rickr (Fri, 16 Jun 2017 00:26:48 GMT):
There is no way to determine if a channel already exists at the moment. If it does, the creation will fail - guess you'll know then. I think a JIRA should be opened for that and the SDK really needs _proper_ Fabric API for this. However even when then API exists there would be no guarantee that between the time you queried and the time you attempted to create it's not be already created by someone else.

rickr (Fri, 16 Jun 2017 00:39:22 GMT):
I would run locally first now that the beta is published and there is a version that matches that fabric. Getting the fabric is just letting docker pull images that matches. Read the full README.md Then study the end2endxxx.java samples how it sets up the peers/orderers/eventhubs / creates channels etc. Once you understand that you should be able transfer that knowledge to using the _cloud deployment_. Just my 2 cents :)

lenin.mehedy (Fri, 16 Jun 2017 05:36:18 GMT):
@rickr Any idea on this error, why would it look for that specific ccenv container tag? I do have the container hyperledger/ccenv:latest ``` java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:x86_64-1.0.0-alpha3-snapshot-d2bfa744: API error (404): {"message":"manifest for hyperledger/fabric-ccenv:x86_64-1.0.0-alpha3-snapshot-d2bfa744 not found"} at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2129) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1251) at com.ibm.blueaudit.fabric.deploy.AbstractChaincodeManager.instantiateChaincode(AbstractChaincodeManager.java:290) at com.ibm.blueaudit.fabric.deploy.DefaultChaincodeManager.deployChaincode(DefaultChaincodeManager.java:69) at com.ibm.blueaudit.fabric.deploy.DeployApp.main(DeployApp.java:317) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282) at java.lang.Thread.run(Thread.java:748) ```

nickmelis (Fri, 16 Jun 2017 07:55:52 GMT):
Running a query against my chaincode. With v0.6 ChaincodeResponse used to contain the response payload from the chaincode, now ProposalResponse extends ChaincodeResponse and the latter does not contain any payload with the chaincode response message. Why is that?

chenxuan (Fri, 16 Jun 2017 08:19:17 GMT):
org.hyperledger.fabric.sdk.exception.ProposalException: IO Error while creating install transaction

chenxuan (Fri, 16 Jun 2017 08:19:23 GMT):
@rickr

chenxuan (Fri, 16 Jun 2017 08:27:48 GMT):
the chaincode method init must assign the parameter otherwise occur the error

chenxuan (Fri, 16 Jun 2017 08:27:53 GMT):
org.hyperledger.fabric.sdk.exception.ProposalException: IO Error while creating install transaction

bestbeforetoday (Fri, 16 Jun 2017 14:44:30 GMT):
Has left the channel.

VickyWang (Mon, 19 Jun 2017 05:30:39 GMT):
Has joined the channel.

sfukazu (Mon, 19 Jun 2017 06:37:10 GMT):
Has joined the channel.

FengChen_1982 (Mon, 19 Jun 2017 07:35:02 GMT):
@here I just want to use chaincode query/invoke function of the SDK, is there a simpler test case than the End2EndIT.java? There are too many classes(Test*, Sampe*) involved here.

guruce (Mon, 19 Jun 2017 07:37:47 GMT):
See this, same sample code explain written differently, helped me to understand ;) https://bitbucket.org/isparkes/fabric-sdk-spring-boot-rest-poc/overview

FengChen_1982 (Mon, 19 Jun 2017 07:40:55 GMT):
oh, that's really great!

FengChen_1982 (Mon, 19 Jun 2017 07:41:08 GMT):
@guruce thanks so much!

IanSparkes (Mon, 19 Jun 2017 12:11:48 GMT):
@nickmelis Determine channel existence: The only way I have found so far is to try to create it and catch the exception that is thrown when the initialize() call is done. You get "org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 404, Chain foo" if it does not exist.

IanSparkes (Mon, 19 Jun 2017 12:12:10 GMT):
The code looks a bit like this: ``` try { existingChain.initialize(); ChainInfo chainInfo = new ChainInfo(); chainInfo.setChainName(existingChain.getName()); return chainInfo; } catch (TransactionException ex) { // looks like we are not intialised - construct the chain Chain newChain = clientService.constructChain(client, chainName, getTopology(clientName)); newChain.initialize(); ChainInfo chainInfo = new ChainInfo(); chainInfo.setChainName(newChain.getName()); return chainInfo; } ```

IanSparkes (Mon, 19 Jun 2017 12:12:55 GMT):
Don't worry about the ChainInfo class, that's just something I made to have a response

IanSparkes (Mon, 19 Jun 2017 12:14:22 GMT):
It would be nice to be able to expose/wrap the "parseConfigBlock()" call which does the work of seeing if the channel is configured: Perhaps this is already done, I am on alpha2 still...

IanSparkes (Mon, 19 Jun 2017 12:15:34 GMT):
Still feeling the way on this... Perhaps I will find a better way. We will see.

stanacton (Mon, 19 Jun 2017 14:06:16 GMT):
Has joined the channel.

ManjeetGambhir (Mon, 19 Jun 2017 15:34:25 GMT):
@rickr Hi Rick, in multihost environment, fabric Event listener got stale after 10 minute..Is there a way in sdk to keep the connection alive between peer and sdk ?

ManjeetGambhir (Mon, 19 Jun 2017 15:35:50 GMT):
@rickr now gari singh has put fix to make orderer to peer keep alive in beta version , it's working fine but issue is now between application listener to peer

rickr (Mon, 19 Jun 2017 15:37:00 GMT):
Example of that in the End2end.java

rickr (Mon, 19 Jun 2017 15:37:00 GMT):
Example of that in the End2end.java search for keepAlive

ManjeetGambhir (Mon, 19 Jun 2017 15:54:49 GMT):
Thanks ..i can see that..let me implement

msoumeit (Mon, 19 Jun 2017 16:45:14 GMT):
Query: Is it possible to connect to external sources( URL/DB) from chaincode? How can I achieve this function and whether this needs to be deterministic? Thanks.

tallharish (Mon, 19 Jun 2017 19:55:56 GMT):
Has joined the channel.

dongqi (Tue, 20 Jun 2017 08:38:45 GMT):
Has joined the channel.

chenxuan (Tue, 20 Jun 2017 09:38:09 GMT):
i have a question about the HFClient.java that means the per channel has a HFClient but if the HFClient destroy that means no one can access to the channel by the java sdk

chenxuan (Tue, 20 Jun 2017 09:38:14 GMT):
@rickr

smfaizalkhan (Tue, 20 Jun 2017 10:48:29 GMT):
Hello All ,I have my chaincode running in GO and i have to acces the chaincode from our web application using JAVA ,What is that docs that i should be referrring to ,also any examples ?

nickmelis (Tue, 20 Jun 2017 11:05:39 GMT):
@smfaizalkhan have a look at End2EndIT and the other integration tests in the SDK project

smfaizalkhan (Tue, 20 Jun 2017 11:09:03 GMT):
Thanks @nickmelis

rickr (Tue, 20 Jun 2017 16:48:41 GMT):
No destroy method on the HFClient. If you loose a reference to the client but have references in your code to the channels the channels will not go away. The channel has a shutdown method which will cleanup all it's resources. After that the channel _object_ should no longer be usable. To invoke methods against that channel you need to reconstruct it like the End2endAndBckAgainIT does. Not sure if this answers your question.

sqwerrels (Tue, 20 Jun 2017 16:55:54 GMT):
Is the database by default running on leveldb? If I wanted to change it to couchdb, is it possible to do it in for example the End2EndIT.java class

Raje (Tue, 20 Jun 2017 19:02:28 GMT):
Has joined the channel.

Raje (Tue, 20 Jun 2017 19:03:13 GMT):
I'm getting an error * What went wrong: Error resolving plugin [id: 'com.google.protobuf', version: '0.8.0'] > Could not GET 'https://plugins.gradle.org/api/gradle/4.0/plugin/use/com.google.protobuf/0.8.0'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Any thoughts?

FengChen_1982 (Wed, 21 Jun 2017 03:08:06 GMT):
I get the following error, when I try to run the End2EndIT test. I'm using the 1.0.0-beta tag:

FengChen_1982 (Wed, 21 Jun 2017 03:08:08 GMT):
org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Url:http://localhost:7054, Failed to enroll user admin at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:351) 2017-06-21 03:01:58,486 ERROR HFCAClient:352 - null at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:264) org.apache.http.client.ClientProtocolException

FengChen_1982 (Wed, 21 Jun 2017 03:08:47 GMT):
Looks like org.apache.http.client.ClientProtocolException occured when I want to access the CA Server.

FengChen_1982 (Wed, 21 Jun 2017 03:09:03 GMT):
Any one got ideas about what's wrong here?

FengChen_1982 (Wed, 21 Jun 2017 03:10:01 GMT):
And I can see that the CA Server is listening on my machine: netstat -an | grep 7054 tcp6 0 0 ::1.7054 *.* LISTEN tcp4 0 0 *.7054 *.* LISTEN

FengChen_1982 (Wed, 21 Jun 2017 04:31:28 GMT):
When I check out the CA Server logs, I can see erros like the following:

FengChen_1982 (Wed, 21 Jun 2017 04:31:29 GMT):
2017/06/21 00:38:34 http: TLS handshake error from 172.21.0.1:48794: tls: first record does not look like a TLS handshake 2017/06/21 00:38:51 http: TLS handshake error from 172.21.0.1:48796: tls: oversized record received with length 21536

rickr (Wed, 21 Jun 2017 11:15:14 GMT):
First looks it appears your client is using http and where you're connecting to is expecting https. If you're using the SDK with *NO* changes neither the client nor the fabric/ca should be expecting TLS. In the sdkintegration directory where your docker compose file is there should be an .env file TLS should be commented out.

pschnap (Wed, 21 Jun 2017 20:25:53 GMT):
can the enrollment of the user be null?

pschnap (Wed, 21 Jun 2017 20:26:23 GMT):
or does one have to enroll with a CA before one can interact w/ the fabric?

rickr (Wed, 21 Jun 2017 20:26:54 GMT):
it has to have an enrollment which needs a certificate and a private key

pschnap (Wed, 21 Jun 2017 20:27:25 GMT):
ok that's what I thought, thanks @rickr

guruce (Thu, 22 Jun 2017 11:55:29 GMT):
can anyone help to retrieve ChainCodeEvents from fabric network via java-sdk, I can able to get the same in go sdk with EventHub.RegisterChaincodeEvent(), but the same api is not available in java sdk. :(

adc (Thu, 22 Jun 2017 15:55:41 GMT):
Hi All, I get this error ```2017-06-22 15:55:04,250 ERROR OrdererClient:287 - UNAVAILABLE: Channel closed while performing protocol negotiation ```

adc (Thu, 22 Jun 2017 15:55:52 GMT):
when connecting to the ordering service with TLS enabled

adc (Thu, 22 Jun 2017 15:56:12 GMT):
the properties I'm using are the following: ``` testprops.setProperty("trustServerCertificate", "true"); testprops.setProperty("pemFile", "../fabric/examples/tracking_cli/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem"); testprops.setProperty("sslProvider", "openSSL"); // testprops.setProperty("hostnameOverride", "override"); testprops.setProperty("negotiationType", "TLS"); ```

adc (Thu, 22 Jun 2017 15:56:14 GMT):
any idea?

adc (Thu, 22 Jun 2017 15:57:45 GMT):
btw, if I disable TLS on my fabric network and on the java-sdk, everything works just fine

adc (Thu, 22 Jun 2017 15:57:57 GMT):
Am I missing some property?

adc (Thu, 22 Jun 2017 16:00:21 GMT):
also, this is what I see at the orderer side: ```2017-06-22 15:55:04.094 UTC [grpc] Printf -> DEBU de2 grpc: Server.Serve failed to complete security handshake from "172.18.0.1:39948": EOF 2017-06-22 15:55:04.098 UTC [grpc] Printf -> DEBU de3 grpc: Server.Serve failed to complete security handshake from "172.18.0.1:39950": EOF```

mastersingh24 (Fri, 23 Jun 2017 02:49:47 GMT):
@adc - did you figure this out?

mastersingh24 (Fri, 23 Jun 2017 02:50:44 GMT):
What version of openssl is on your host system?

kevinsong (Fri, 23 Jun 2017 04:16:48 GMT):
Has joined the channel.

adc (Fri, 23 Jun 2017 06:12:32 GMT):
not yet. I have OpenSSL 0.9.8zh 14 Jan 2016, probably a bit old :)

adc (Fri, 23 Jun 2017 06:12:36 GMT):
let me upgrade then

adc (Fri, 23 Jun 2017 06:28:10 GMT):
So, I have now *OpenSSL 1.0.2l 25 May 2017* and I see the same error

adc (Fri, 23 Jun 2017 06:54:41 GMT):
I have also tried to upgrade netty-tcnative-boringssl-static and grpc to the latest but still it does not work :(

adc (Fri, 23 Jun 2017 07:56:36 GMT):
aha, got the issue

adc (Fri, 23 Jun 2017 07:56:54 GMT):
I was specifying the wrong certificate :)

Ashish (Fri, 23 Jun 2017 10:29:45 GMT):
Has left the channel.

rickr (Fri, 23 Jun 2017 13:27:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7vJ3d9rNaSWxh9TLK) registerBlockListener on Channel ?

SahilKapoor (Fri, 23 Jun 2017 17:06:49 GMT):
How can we create new peer on a vm and make it join fabric on new machine? Is it possible with java sdk?

SahilKapoor (Fri, 23 Jun 2017 17:06:49 GMT):
How can we create new peer on a vm and make it join fabric on new machine? Is it possible with java sdk?

chenxuan (Sat, 24 Jun 2017 05:46:12 GMT):
New channel mychannel error. StatusValue 400. Status BAD_REQUEST

chenxuan (Sun, 25 Jun 2017 04:54:28 GMT):
(status: 500, message: Cannot create ledger from genesis block, due to LedgerID already exists), cause=null}

chenxuan (Sun, 25 Jun 2017 04:54:32 GMT):
@rickr

chenxuan (Sun, 25 Jun 2017 05:41:45 GMT):
org.hyperledger.fabric.sdk.exception.TransactionException: Getting genesis block time exceeded 5 seconds for channel mychannel

chenxuan (Sun, 25 Jun 2017 05:41:49 GMT):
@rickr

rickr (Mon, 26 Jun 2017 11:36:38 GMT):
Almost all of the time it's not an issue with the SDK itself. You'll need to dig into the Peer and Orderer logs.

chenxuan (Mon, 26 Jun 2017 12:20:33 GMT):
ok

chenxuan (Mon, 26 Jun 2017 12:20:45 GMT):
i have a question about the fabric-java-sdk

chenxuan (Mon, 26 Jun 2017 12:21:00 GMT):
one channel have one client to operation?

chenxuan (Mon, 26 Jun 2017 12:21:28 GMT):
i use the java to provide restful interface to other

chenxuan (Mon, 26 Jun 2017 12:21:53 GMT):
i store the HFClient use the private static final HashMap clientMap = new HashMap<>();

chenxuan (Mon, 26 Jun 2017 12:22:03 GMT):
but if the web is down

chenxuan (Mon, 26 Jun 2017 12:22:21 GMT):
i can't do it anymore?

rickr (Mon, 26 Jun 2017 12:27:14 GMT):
Should have multiple channels to a client. Restoring client/channels should be possible as in End2endAndBackAgainIT

chenxuan (Mon, 26 Jun 2017 12:37:43 GMT):
but if the web shutdown

chenxuan (Mon, 26 Jun 2017 12:37:55 GMT):
HFClient client = HFClient.createNewInstance();

chenxuan (Mon, 26 Jun 2017 12:37:59 GMT):
the client is lost

chenxuan (Mon, 26 Jun 2017 12:38:18 GMT):
every time is different

chenxuan (Mon, 26 Jun 2017 12:38:40 GMT):
but if the web shutdown HFClient client = HFClient.createNewInstance();

chenxuan (Mon, 26 Jun 2017 12:38:58 GMT):
the client is lost every time is different

chenxuan (Mon, 26 Jun 2017 12:39:20 GMT):
you use the HFClient.createNewInstance()

chenxuan (Mon, 26 Jun 2017 12:42:02 GMT):
the client can't be serializ

rickr (Mon, 26 Jun 2017 12:45:36 GMT):
Would this not work : Create a new instance of the client and the peers, Orderers, and event hubs that you had when shutdown ? Continue running ?

chenxuan (Mon, 26 Jun 2017 13:06:53 GMT):
in the e2e the client can not be store

chenxuan (Mon, 26 Jun 2017 13:07:09 GMT):
but i use it in the web

chenxuan (Mon, 26 Jun 2017 13:07:43 GMT):
if the web shutdown the client is lost

chenxuan (Mon, 26 Jun 2017 13:08:11 GMT):
i can not reconnect to the channel

nickmelis (Mon, 26 Jun 2017 13:47:11 GMT):
what's the purpose of the transientMap in a transaction request?

nickmelis (Mon, 26 Jun 2017 13:47:43 GMT):
it's data that doesn't get written into the ledger, then why do we ever need to send transient data within a transaction?

nickmelis (Mon, 26 Jun 2017 13:48:33 GMT):
and also why in the tests something like `"HyperLedgerFabric", "TransactionProposalRequest:JavaSDK"` gets sent?

rickr (Mon, 26 Jun 2017 13:51:05 GMT):
The API allows it so the SDK exposes it. It could really anything .. If you don't see a need for it in your application there's no requirement to use it

rickr (Mon, 26 Jun 2017 13:51:05 GMT):
The API allows it so the SDK exposes it. It could really be anything .. If you don't see a need for it in your application there's no requirement to use it

nickmelis (Mon, 26 Jun 2017 14:12:23 GMT):
thanks @rickr . I don't personally see a need for it in my app, that's why I was curious about a possible use case. What happens to that information once the transaction reaches the ledger?

rickr (Mon, 26 Jun 2017 14:25:00 GMT):
Any CC arguments are part of the proposal they have to be signed and in the end passed to the orderer. The transient data is not part of the signed data and is never sent to the Orderer and thus can never be sent to a committer. Just think of it as metadata for your CC .. and most likely many CC will never need any metadata

nickmelis (Mon, 26 Jun 2017 14:28:27 GMT):
so chaincode can read transient data?

rickr (Mon, 26 Jun 2017 14:29:07 GMT):
y

rickr (Mon, 26 Jun 2017 14:29:07 GMT):
y I don't think anything else really cares about what's in the meta data

rickr (Mon, 26 Jun 2017 14:29:07 GMT):
y I don't think anything else really cares about what's in the transient map

chenxuan (Mon, 26 Jun 2017 15:01:26 GMT):
java.lang.Exception: io.grpc.StatusRuntimeException: INTERNAL: Connection closed with unknown cause

chenxuan (Mon, 26 Jun 2017 15:01:43 GMT):
@rickr

chenxuan (Mon, 26 Jun 2017 15:01:55 GMT):
2c408f50a89d hyperledger/fabric-orderer:x86_64-1.0.0-beta "orderer" 4 minutes ago Up 4 minutes 0.0.0.0:7050->7050/tcp orderer.example.com 460b9aa5a905 hyperledger/fabric-kafka:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 9093/tcp, 0.0.0.0:32846->9092/tcp kafka2.example.com b543e436968b hyperledger/fabric-kafka:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 9093/tcp, 0.0.0.0:32845->9092/tcp kafka3.example.com 67d4f1f0456c hyperledger/fabric-kafka:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 9093/tcp, 0.0.0.0:32844->9092/tcp kafka1.example.com 8f6e3d239b1d hyperledger/fabric-kafka:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 9093/tcp, 0.0.0.0:32843->9092/tcp kafka0.example.com 51aadf389417 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 4 minutes ago Up 4 minutes 0.0.0.0:8051->8051/tcp, 0.0.0.0:8053->8053/tcp peer1.org1.example.com 1ac0c4a80d98 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 4 minutes ago Up 4 minutes 0.0.0.0:9051->9051/tcp, 0.0.0.0:9053->9053/tcp peer0.org2.example.com 08b8ea82e93a hyperledger/fabric-ca "sh -c 'fabric-ca-ser" 4 minutes ago Up 4 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1 6572f7e7af98 hyperledger/fabric-ca "sh -c 'fabric-ca-ser" 4 minutes ago Up 4 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2 b02e9fd939d3 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 4 minutes ago Up 4 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com b8d3dd1b10e8 hyperledger/fabric-peer:x86_64-1.0.0-beta "peer node start" 4 minutes ago Up 4 minutes 0.0.0.0:10051->10051/tcp, 0.0.0.0:10053->10053/tcp peer1.org2.example.com 8181617d1a93 hyperledger/fabric-zookeeper:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 0.0.0.0:32842->2181/tcp, 0.0.0.0:32841->2888/tcp, 0.0.0.0:32840->3888/tcp zookeeper0.example.com 2e91d28a673f hyperledger/fabric-zookeeper:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 0.0.0.0:32836->2181/tcp, 0.0.0.0:32835->2888/tcp, 0.0.0.0:32834->3888/tcp zookeeper1.example.com c930305e05ef hyperledger/fabric-zookeeper:x86_64-1.0.0-beta "/docker-entrypoint.s" 4 minutes ago Up 4 minutes 0.0.0.0:32839->2181/tcp, 0.0.0.0:32838->2888/tcp, 0.0.0.0:32837->3888/tcp zookeeper2.example.com

chenxuan (Mon, 26 Jun 2017 15:02:11 GMT):
the contain runs successfully

chenxuan (Tue, 27 Jun 2017 02:46:54 GMT):
org.hyperledger.fabric.sdk.exception.TransactionException: Getting genesis block time exceeded 5 seconds for channel mychannel

chenxuan (Tue, 27 Jun 2017 02:47:01 GMT):
@rickr

chenxuan (Tue, 27 Jun 2017 04:55:02 GMT):
how to use the event?

chenxuan (Tue, 27 Jun 2017 04:55:04 GMT):
@rickr

bluefireH (Tue, 27 Jun 2017 08:06:35 GMT):
I got an error likes: Bad last configuation block type 3, expected 1 I'm confuse about the https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/Channel.java line 902: Metadata metaData = Metadata.parseFrom(blockMetadata.getMetadata(1)); why get the second metadata from the block? I modify this to blockMetadata.getMetadata(0) and rebuild the project then it work fine

bluefireH (Tue, 27 Jun 2017 08:08:05 GMT):
So why blockMetadata.getMetadata(0) can get the correct configuation block in my project?

DeutscheBahn-BlockchainDev (Tue, 27 Jun 2017 08:35:10 GMT):
Has joined the channel.

DeutscheBahn-BlockchainDev (Tue, 27 Jun 2017 08:51:49 GMT):
Gents, is it possible to run the Java Client SDK with the Fabric having no CA running in the network, but just having "static" MSP with files on the "server side"? Do we always need a CA to deal with ECERTS and TCERTS (as it did in v0.6) or there is a way to get around running CA?

DeutscheBahn-BlockchainDev (Tue, 27 Jun 2017 08:53:07 GMT):
for instance the e2e-cli example does not start with any CA running, and we can interact with the Fabric from the CLI, can I access this network via the Java SDK or not?

chenxuan (Tue, 27 Jun 2017 09:15:14 GMT):
2017-06-27 17:14:43,777:ERROR http-nio-8080-exec-1 (Util.java:41) - Transaction failed with java.util.concurrent.CompletionException exception java.lang.Exception: Channel mychannel failed to place transaction fe8061d930f9da4a3936c3b52674466b4ea40cf5f3e154728e4e76fd8e39440d on Orderer. Cause: UNSUCCESSFUL

chenxuan (Tue, 27 Jun 2017 09:15:45 GMT):
@rickr

Ashish (Tue, 27 Jun 2017 09:22:49 GMT):
Has joined the channel.

guruce (Tue, 27 Jun 2017 10:57:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jwcttKfpTA9Q7GmcH) @rickr App got triggers but couldn't able to get the payload with BlockEvent object, plz help to derive the payload

rickr (Tue, 27 Jun 2017 12:09:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TrCrTYaNkQwb6ri6Q) look at org/hyperledger/fabric/protos/common/Common.java LAST_CONFIG_VALUE probably should change it for that define may not have been there when the code was first created.

rickr (Tue, 27 Jun 2017 12:38:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eQGFnJyHnztYQP2Mj) You can run with no CA if you look at the End2endIT samples there is a peer admin who's certs are in a file generated by cryptogen. The user can do all operations and is not created/enrolled by the CA. Currently, TCERTS are not supported but when they are you'll need a CA that can support generating them.

rickr (Tue, 27 Jun 2017 12:59:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6ieyZh7YecHmemb9x) Was there anything in the orderer logs ? I'm fairly certain the SDK is only reporting what it's getting back from the Orderer You'll best report that on the #fabric-consensus channel where the experts on that can best help you.

rickr (Tue, 27 Jun 2017 12:59:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6ieyZh7YecHmemb9x) Was there anything in the orderer logs ? I'm fairly certain the SDK is only reporting what it's getting back from the Orderer Better to report that on the #fabric-consensus channel where the experts on that can best help you.

chenxuan (Tue, 27 Jun 2017 13:04:07 GMT):
@rickr the peer show the log

chenxuan (Tue, 27 Jun 2017 13:04:15 GMT):
i have resolved

chenxuan (Tue, 27 Jun 2017 13:05:05 GMT):
but i have question about the fabric java sdk

chenxuan (Tue, 27 Jun 2017 13:05:30 GMT):
that's the HFClient is a object to operation the fabric

chenxuan (Tue, 27 Jun 2017 13:05:57 GMT):
but the HFClient is lost

chenxuan (Tue, 27 Jun 2017 13:05:59 GMT):
there are no way to operation the fabric ?

chenxuan (Tue, 27 Jun 2017 13:11:48 GMT):
i use the sdk in a web programmer

chenxuan (Tue, 27 Jun 2017 13:11:54 GMT):
if the web shutdown

chenxuan (Tue, 27 Jun 2017 13:12:17 GMT):
how can i to get the client to operate the fabric

chenxuan (Tue, 27 Jun 2017 14:40:00 GMT):
@rickr

michaeldowling (Tue, 27 Jun 2017 21:46:30 GMT):
Has joined the channel.

michaeldowling (Tue, 27 Jun 2017 21:49:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Xc7tvMJCg25jCn2uA) @rasmustrew Hey there - just curious if you found any solutions to your issue re: a java-sdk connection to a peer returning the error "First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002"

michaeldowling (Tue, 27 Jun 2017 21:50:11 GMT):
@rasmustrew I'm running into the exact same issue right now, and I'm totally confused as to why I'm getting it.

rickr (Tue, 27 Jun 2017 22:01:21 GMT):
Not sure I understand your question. When your webapp starts back up create a new instance of the client follow the reconstructChannel in End2endAndBackAgainIT

chenxuan (Tue, 27 Jun 2017 23:44:56 GMT):
@rickr thx

lenin.mehedy (Wed, 28 Jun 2017 04:52:55 GMT):
any idea how to send a JSON payload as argument to chaincode invoke function?

lenin.mehedy (Wed, 28 Jun 2017 05:03:20 GMT):
@rickr Does the below example code-snipped look okay to send a json payload for chaincode function args? ``` ObjectMapper mapper = new ObjectMapper(); String jsonArg = mapper.writeValueAsString(myObj); String[] funcArgs = new String[]{jsonArg} ```

JohnDC (Wed, 28 Jun 2017 07:27:53 GMT):
Has joined the channel.

yihuang518 (Wed, 28 Jun 2017 07:46:01 GMT):
Has joined the channel.

yihuang518 (Wed, 28 Jun 2017 12:43:23 GMT):
hi experts, just a quick question, in End2endIT.java, there is out(" Transaction number %d has %d actions", i, transactionEnvelopeInfo.getTransactionActionInfoCount());, in the comment, it says for now there is only 1 action per transaction. Does that mean in the future release, we can combine several invoke into one transaction?

michaeldowling (Wed, 28 Jun 2017 17:59:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=M2WrketiKzdNXHh83) @lenin.mehedy JSON is just a string, right? So you should be able to pass it as payload to chaincode as an argument.

michaeldowling (Wed, 28 Jun 2017 18:01:44 GMT):
@rickr Hey Rick - I'm going nuts with this TLS issue over grpc. I've tried stepping through the code and it simply looks like the java GRPC client libs are expecting a SETTINGS frame of a certain config from the golang grpc server in Fabric.

michaeldowling (Wed, 28 Jun 2017 18:02:09 GMT):
@rickr The error I'm getting is: "First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002"

michaeldowling (Wed, 28 Jun 2017 18:03:27 GMT):
@rickr The code attempting to (simply) connect is: this.client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); this.peer = this.client.newPeer(options.getPeerName(), options.getPeerUrl().toString()); this.orderer = this.client.newOrderer(options.getOrdererName(), options.getOrdererUrl().toString()); GFTNUser user = GFTNUser.loadUser("User1", "ODFI", "ODFIMSP", new File(options.getUserCertificatePath()), new File(options.getUserPrivateKeyPath())); this.client.setUserContext(user); Set channelList = this.client.queryChannels(this.peer);

michaeldowling (Wed, 28 Jun 2017 18:03:41 GMT):
@rickr any ideas of where I should look?

rickr (Wed, 28 Jun 2017 18:10:15 GMT):
src/test/fixture/sdkintegration/.env Reverse the TLS lines in that file. in sdkintegration directory do `./fabric restart` Sets the fabric up for TLS export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true Sets the integration test suite for TLS.

rickr (Wed, 28 Jun 2017 18:11:28 GMT):
Looking at what's done there should give you hints on setting up TLS

michaeldowling (Wed, 28 Jun 2017 18:13:16 GMT):
@rickr ah, thanks. I will take a look. Note, I'm starting a fresh network, NOT using the integration tests or the examples.

rickr (Wed, 28 Jun 2017 18:14:22 GMT):
IMO start with the examples End2endXXXIT get a good feel what's done there. THEN move on

michaeldowling (Wed, 28 Jun 2017 18:15:29 GMT):
@rickr I did start with the examples, now I need to move on to more interesting use cases, which means looking beyond the fabric integration tests.

michaeldowling (Wed, 28 Jun 2017 18:17:55 GMT):
@rickr so that script simple sets environment variables for TLS to true, which I've already got set up. So that's not the source of the issue.

michaeldowling (Wed, 28 Jun 2017 18:19:36 GMT):
@rickr my docker-compose sets the followng already for orderer and peers: ORDERER_GENERAL_TLS_ENABLED=true and CORE_PEER_TLS_ENABLED=true

michaeldowling (Wed, 28 Jun 2017 18:20:01 GMT):
@rickr So I'm wondering if there might be a mismatch between the GRPC version in Fabric and the GRPC libs in the java SDK?

rickr (Wed, 28 Jun 2017 18:23:36 GMT):
And an env var makes it work for the End2endIT tests to run TLS ?

michaeldowling (Wed, 28 Jun 2017 18:46:32 GMT):
@rickr yeah the End2End tests are fine.

michaeldowling (Wed, 28 Jun 2017 18:47:49 GMT):
But when setting up my own network, following all the exact same instructions as in http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html, connecting to it with the java SDK gives me "io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002"

michaeldowling (Wed, 28 Jun 2017 18:48:32 GMT):
@rickr if this were a matter of improper TLS setup, I would expect a different error message around authentication. But this is beyond authentication and into the wire protocol for GRPC.

michaeldowling (Wed, 28 Jun 2017 19:16:06 GMT):
@rickr FYI: https://github.com/grpc/grpc-java/issues/2068

michaeldowling (Wed, 28 Jun 2017 19:16:15 GMT):
@rickr In there, he's referencing this commit: https://github.com/hyperledger/fabric/commit/d39194ce97d8debc9e38b6eff0972a9404a5fd71

rezamt (Thu, 29 Jun 2017 04:24:29 GMT):
Has joined the channel.

FabricWhiskey (Thu, 29 Jun 2017 07:26:08 GMT):
Has joined the channel.

chenxuan (Thu, 29 Jun 2017 08:08:39 GMT):
@rickr the EventHub how to use

guruce (Thu, 29 Jun 2017 10:58:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bCqZju6uwyB6uQZ8X) @guruce

guruce (Thu, 29 Jun 2017 11:07:46 GMT):

Message Attachments

guruce (Thu, 29 Jun 2017 11:07:46 GMT):

Message Attachments

guruce (Thu, 29 Jun 2017 11:07:46 GMT):

Message Attachments

guruce (Thu, 29 Jun 2017 11:07:46 GMT):

Message Attachments

guruce (Thu, 29 Jun 2017 11:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bCqZju6uwyB6uQZ8X) @guruce I can see the message contents with signature characters, when do like this on BlockEvent object *new String(blockEvent.getBlock().toByteArray()* attached response string

rickr (Thu, 29 Jun 2017 12:04:14 GMT):
There should many methods on BlockEvent a lot of them are shown in End2end blockWalker method.

rickr (Thu, 29 Jun 2017 12:04:14 GMT):
There should many methods on BlockEvent a lot of them are shown in End2endIT blockWalker method.

rbv (Thu, 29 Jun 2017 14:19:13 GMT):
Has joined the channel.

rbv (Thu, 29 Jun 2017 14:19:32 GMT):
Hello everyone, I am currently trying to set up fabric for java following the example that's on the fabric GitHub. Once I clone the repository, I tried to start up docker-compose so that I could install javacc and it's giving me the following *error: 2017-06-29 14:11:38.828 UTC [main] main -> ERRO 001 Cannot run peer because error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp: err admin 0 is invalid, validation error Could not obtain certification chain, err A CA certificate cannot be used directly by this MSP*

jmcnevin (Thu, 29 Jun 2017 17:23:18 GMT):
Has joined the channel.

chenxuan (Fri, 30 Jun 2017 00:32:04 GMT):
End2endIT blockWalker method just to get block info

DeutscheBahn-BlockchainDev (Fri, 30 Jun 2017 08:03:33 GMT):
Hello All, how can I retrieve an already created channel in Fabric and initialize the Channel object with it?

DeutscheBahn-BlockchainDev (Fri, 30 Jun 2017 08:04:35 GMT):
creating channels is staright forward, but obviously I do want to reuse them at any point of time, so there has to be some mechanism for that

DeutscheBahn-BlockchainDev (Fri, 30 Jun 2017 08:05:04 GMT):
there is queryChannels for the HFC Client, but it only returns a String, channel name

DeutscheBahn-BlockchainDev (Fri, 30 Jun 2017 08:05:24 GMT):
how can I use the channel name and initialize a Channel object

dayubian (Fri, 30 Jun 2017 08:56:47 GMT):
@DeutscheBahn-BlockchainDev refer to End2endAndBackAgainIT.java

DeutscheBahn-BlockchainDev (Fri, 30 Jun 2017 10:10:18 GMT):
@dayubian thanks :) problem solved

wayneg (Fri, 30 Jun 2017 11:59:40 GMT):
Has joined the channel.

wayneg (Fri, 30 Jun 2017 11:59:45 GMT):
Bad newest block expected status 200 got 403,

wayneg (Fri, 30 Jun 2017 11:59:56 GMT):
who have same error?

wayneg (Fri, 30 Jun 2017 12:00:13 GMT):
How to get a existing channel over java sdk?

guruce (Fri, 30 Jun 2017 12:21:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rpXCu6MuW7A3kShCA) @wayneg can use same as constructChannel in End2endIT, use addPeer method instead of joinPeer.. worked for me

dayubian (Fri, 30 Jun 2017 13:23:41 GMT):
@guruce @wayneg refer to End2endAndBankAgainIT.java

wayneg (Fri, 30 Jun 2017 13:49:46 GMT):
@guruce @dayubian thank you! I will try

wayneg (Sat, 01 Jul 2017 14:04:55 GMT):
End2EndIT run successfully, could I run query in command in peer (peer0.org1)?

wayneg (Sat, 01 Jul 2017 14:11:02 GMT):
peer chaincode query -C bar -n example_cc_go -c '{"Args":["query","b"]}' I get error after run this command in container

wayneg (Sat, 01 Jul 2017 14:11:28 GMT):
Error: Error endorsing query: rpc error: code = Unknown desc = chaincode error (status: 500, message: Unknown function call) -

rishabh1102 (Mon, 03 Jul 2017 13:17:42 GMT):
Has joined the channel.

rishabh1102 (Mon, 03 Jul 2017 13:21:31 GMT):
Is there documentation on how to use the java sdk from scratch?

rishabh1102 (Mon, 03 Jul 2017 13:22:11 GMT):
I'm running my peers and orderers on docker containers and want to query/invoke instantiated chaincode

rishabh1102 (Mon, 03 Jul 2017 13:22:16 GMT):
How can I achieve this?

rishabh1102 (Mon, 03 Jul 2017 14:15:10 GMT):
git reset --hard fabric-ca_commitlevel from above -> this gives me an error

rishabh1102 (Mon, 03 Jul 2017 14:15:23 GMT):
fatal: ambiguous argument 'fabric-ca_commitlevel': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]'

rishabh1102 (Mon, 03 Jul 2017 14:15:39 GMT):
Anyone know how to fix this?

awattez (Mon, 03 Jul 2017 16:04:15 GMT):
Has joined the channel.

rishabh1102 (Mon, 03 Jul 2017 21:35:41 GMT):
Can anyone please explain how I could issue multiple invokes to an instantiated (deployed) chaincode using either nodeJS or Java SDK By multiple invokes, I mean, that they should be issued in parallel, at a frequency of 60Hz At least 60Hz*

guruce (Tue, 04 Jul 2017 06:23:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eGvQgaEp3CW4ZSaZo) @rickr I managed to get the ChainCode event details by modifying sdk code,

guruce (Tue, 04 Jul 2017 06:23:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eGvQgaEp3CW4ZSaZo) @rickr I managed to get the ChainCode event details with below code change in sdk, org/hyperledger/fabric/sdk/ChaincodeActionDeserializer.java ByteString getChainEvent() { return getChaincodeAction().getEvents(); } org/hyperledger/fabric/sdk/BlockInfo.java public byte[] getCCEventPayload() throws InvalidProtocolBufferException { ByteString eventByteString = transactionAction.getPayload().getAction().getProposalResponsePayload().getExtension().getChainEvent(); if (null != eventByteString) { return ChaincodeEventOuterClass.ChaincodeEvent.parseFrom(eventByteString).getPayload().toByteArray(); } return null; }

zaishengming (Tue, 04 Jul 2017 07:01:11 GMT):
Has joined the channel.

smfaizalkhan (Tue, 04 Jul 2017 09:31:25 GMT):
Hello All,

smfaizalkhan (Tue, 04 Jul 2017 09:32:54 GMT):
I tried cloning github.com/hyperledger/fabric-sdk-java and run the unit Test When i run using mvn test,i get the following error Caused by: java.io.FileNotFoundException: /home/faizal/Projekcts/sample/fabric-sdk-java/target/protoc-dependencies/89c38d9d9690c5948055933a19673654/google/type/timeofday.proto (No such file or directory)

smfaizalkhan (Tue, 04 Jul 2017 09:33:33 GMT):
Can anyone let me know what mistake is it ?

rishabh1102 (Tue, 04 Jul 2017 10:05:31 GMT):
Is there any way of using the java sdk without vagrant (using the docker images)

rishabh1102 (Tue, 04 Jul 2017 10:05:54 GMT):
the docker images which are installed without the vm

nickmelis (Tue, 04 Jul 2017 12:39:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nE6WsarcpKgD9JNAz)

nickmelis (Tue, 04 Jul 2017 12:40:09 GMT):
@adc how did you solve this? What certificate did you specify in the end?

liuwenliang0632 (Wed, 05 Jul 2017 05:39:54 GMT):
@rickr my change is not success . the error is not related to my change

liuwenliang0632 (Wed, 05 Jul 2017 05:40:05 GMT):
https://gerrit.hyperledger.org/r/#/c/11375/

rameshthoomu (Wed, 05 Jul 2017 13:47:20 GMT):
java e2e tests are failing intermittently in CI.. Some one please look into this issue https://jira.hyperledger.org/browse/FAB-5182

nickmelis (Wed, 05 Jul 2017 14:07:42 GMT):
any idea what's causing this error while running TLS? ``` sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target```

nickmelis (Wed, 05 Jul 2017 14:07:57 GMT):
I can see someone had it before, but it's not clear what the solution was

nickmelis (Wed, 05 Jul 2017 14:08:53 GMT):
googling around, it seems that the fix for it is just to add the certificate in the "cacerts" to tell the JVM we trust it, but in my case it hasn't solved the problem

nickmelis (Wed, 05 Jul 2017 14:09:25 GMT):
also connection with the CA (https over TLS) works, problem is only with GRPCs

nickmelis (Wed, 05 Jul 2017 14:09:25 GMT):
also connection with the CA (https over TLS) works, problem appears to be only with GRPCs

nickmelis (Wed, 05 Jul 2017 14:09:43 GMT):
any hint anyone?

bdufour (Wed, 05 Jul 2017 14:38:19 GMT):
Has joined the channel.

SubbaBachina (Wed, 05 Jul 2017 20:11:27 GMT):
Has joined the channel.

wayneg (Thu, 06 Jul 2017 09:54:24 GMT):
I am running End2EndIT based RC1 code, got following error:

wayneg (Thu, 06 Jul 2017 09:54:24 GMT):
Order.sendTransaction name: orderer.example.com, url: grpc://localhost:7050 2017-07-06 09:51:58,040 ERROR OrdererClient:164 - sendTransaction error Send transactions failed. Reason: timeout

wayneg (Thu, 06 Jul 2017 09:54:24 GMT):
anyone can help?

IanSparkes (Thu, 06 Jul 2017 14:00:30 GMT):
Hi All, we're trying to finalise a client using the SDK, and we're seeing a lot of stack traces thrown out of the SDK from statements like this: ```} catch (TransactionException e) { //logger.error(e.getMessage(), e); throw e; ```

IanSparkes (Thu, 06 Jul 2017 14:01:03 GMT):
I've commented out the logger statements for the moment, but clearly that's not a good solution.

IanSparkes (Thu, 06 Jul 2017 14:02:25 GMT):
Is there already a task to clean up the exception handling?

nickmelis (Thu, 06 Jul 2017 17:06:16 GMT):
@here is any of you running the SKD on OSX?

pschnap (Thu, 06 Jul 2017 18:49:27 GMT):
I'm having trouble connecting the Java SDK to the orderer, it gives me the following errors when I try to initialize the channel in the SDK: SDK-side: > [TransactionException] UNAVAILABLE: Channel closed while performing protocol negotiation and on the orderer side: > orderer.example.com | 2017-07-06 17:48:29.474 UTC [grpc] Printf -> DEBU cc4 grpc: Server.Serve failed to complete security handshake from "10.0.2.2:64226": EOF I've been poking around looking at the certificates but haven't found anything glaring yet; any help would be appreciated :)

chaitanya (Thu, 06 Jul 2017 18:50:33 GMT):
Hi, is there an example or some documentation/pointers to get me started on writing a BlockEvent listener using the JavaSDK ?

pschnap (Thu, 06 Jul 2017 19:07:55 GMT):
@chaitanya I was pointed to the End2endIT.java test file (under org.hyperledger.fabric.sdkintegration) when I requested an example; there might be something there using the BlockListener; there's also BlockEventTest.java under org.hyperledger.fabric.sdk in testing too

ffilozov1 (Thu, 06 Jul 2017 19:29:57 GMT):
Is anyone seeing an Eclipse error related to a modified .project file when import a newly cloned fabric-sdk-java repo?

ffilozov1 (Thu, 06 Jul 2017 19:29:57 GMT):
Is anyone seeing an Eclipse error related to a modified .project file when importing a newly cloned fabric-sdk-java repo?

ffilozov1 (Thu, 06 Jul 2017 19:29:57 GMT):
Is anyone seeing an Eclipse (Neon) error related to a modified .project file when importing a newly cloned fabric-sdk-java repo?

ffilozov1 (Thu, 06 Jul 2017 19:29:57 GMT):
Is anyone seeing an Eclipse (Neon) error related to a modified .project file when importing a newly cloned fabric-sdk-java repo?

jmcnevin (Thu, 06 Jul 2017 20:00:30 GMT):
Has left the channel.

SasagawaHiroshi (Fri, 07 Jul 2017 02:09:43 GMT):
Has joined the channel.

chaitanya (Fri, 07 Jul 2017 05:09:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MaF5sEsFtiyKEJ9X3) @pschnap Thanks! Also, have you had a chance to test it against alpha-2 Fabric images?

Gaurav_Impro (Fri, 07 Jul 2017 08:13:40 GMT):
Has joined the channel.

pschnap (Fri, 07 Jul 2017 12:37:52 GMT):
@chaitanya I have not, I've been on the beta and planning to move to the rc once I get things worked out with what I'm currently doing (which isn't using the block events at all).

chaitanya (Fri, 07 Jul 2017 12:38:41 GMT):
@pschnap Sure no problem. Thanks anyway :)

pschnap (Fri, 07 Jul 2017 12:41:27 GMT):
:-D

tqumhieh (Fri, 07 Jul 2017 16:31:16 GMT):
Has joined the channel.

tqumhieh (Fri, 07 Jul 2017 16:32:45 GMT):
Hello guys, I'm getting started with Blockchain, and I have my network setup and running on docker over MAC, but I'm kind of lost in finding the needed steps to compile and java-idk, any hints are highly appreciated.

tqumhieh (Fri, 07 Jul 2017 16:32:45 GMT):
Hello guys, I'm getting started with Blockchain, and I have my network setup and running on docker over MAC, but I'm kind of lost in finding the needed steps to compile and java-sdk, any hints are highly appreciated.

yecineoueslati (Fri, 07 Jul 2017 16:49:41 GMT):
hello everybody i want to get the error response from java chaincode but i dont know how

yecineoueslati (Fri, 07 Jul 2017 16:50:12 GMT):

Message Attachments

yecineoueslati (Fri, 07 Jul 2017 16:50:27 GMT):

Message Attachments

yecineoueslati (Fri, 07 Jul 2017 16:51:23 GMT):
i get the exception above invalidArgument

yecineoueslati (Fri, 07 Jul 2017 16:51:28 GMT):
thank you

blockcloud (Sat, 08 Jul 2017 03:00:02 GMT):
Has joined the channel.

blockcloud (Sat, 08 Jul 2017 03:02:16 GMT):
@rishabh1102 Have you find some guidelines about the fabric-sdk-java? I'm also confusing about how to use it in a java project.

blockcloud (Sat, 08 Jul 2017 03:39:14 GMT):
@yecineoueslati Hi yecineoueslati, could you teach me how to use fabric-sdk-java in a java project? Thank you

dushyant (Sat, 08 Jul 2017 13:48:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TAchL8EDM2vjhkeC7) @ffilozov1 yes, I fixed this error by running the following command in my fabric-sdk-java directory - mvn eclipse:clean eclipse:eclipse

smfaizalkhan (Sun, 09 Jul 2017 07:14:11 GMT):
Hello All, I tried cloning github.com/hyperledger/fabric-sdk-java and run the unit test from IDE ,When i clcik on End2endIt and tried to run as Junit,it says No Junint test found.What am i missing ?

smfaizalkhan (Sun, 09 Jul 2017 07:49:52 GMT):
But other projects Junit Testing running

chenxuan (Sun, 09 Jul 2017 13:29:57 GMT):
you should

chenxuan (Sun, 09 Jul 2017 13:30:06 GMT):
learn java

chenxuan (Mon, 10 Jul 2017 03:15:50 GMT):
INTERNAL: io.grpc.netty.NettyClientTransport$3: Frame size 4666139 exceeds maximum: 4194304.

hime-cn (Mon, 10 Jul 2017 06:38:20 GMT):
Has joined the channel.

bh4rtp (Mon, 10 Jul 2017 08:21:19 GMT):
does the latest java sdk not support eclipse neon.2 any longer? i import the pom.xml in the root path of java sdk using eclipse neon.2, and there is only a demo chaincode project created.

bh4rtp (Mon, 10 Jul 2017 08:41:30 GMT):
sorry i found the reason. i deleted previous version from eclipse and re-cloned the latest sdk. the previous remained information must be cleaned.

yecineoueslati (Mon, 10 Jul 2017 09:22:16 GMT):
hi @blockcloud, the first step is to run the endToEnd test case of the fabric-sdk-java for this you must follow these steps git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric-ca git reset --hard fabric-ca_commitlevel from above cd ../fabric git reset --hard fabric_commitlevel from above cd devenv change the Vagrant file as suggested below: vagrant up vagrant ssh make docker cd ../fabric-ca make docker cd ../fabric/sdkintegration docker-compose down; rm -rf /var/hyperledger/*; docker-compose up --force-recreate

yecineoueslati (Mon, 10 Jul 2017 09:22:55 GMT):
after that there is a hack to run java chaincode

yecineoueslati (Mon, 10 Jul 2017 10:45:51 GMT):
It appears that handling errors in invoke fuctions is possible by events but i dont find an example with the java sdk if anybody havean exxample thx

rishabh1102 (Mon, 10 Jul 2017 12:22:29 GMT):
@blockcloud , no, not yet

chaitanya (Mon, 10 Jul 2017 12:35:19 GMT):
@pschnap I'm having trouble connecting the JavaSDK to an existing network that I set up using docker-compose. The error I see on the docker logs of the orderer is `grpc: Server.Serve failed to complete security handshake from "172.22.0.1:59256": tls: first record does not look like a TLS handshake`

chaitanya (Mon, 10 Jul 2017 12:35:29 GMT):
Any idea, what's the problem here?

chaitanya (Mon, 10 Jul 2017 13:41:12 GMT):
Ah, I figured. My SDK properties had tls disabled for some reason.

pschnap (Mon, 10 Jul 2017 13:51:19 GMT):
glad you got it figured out! I'm still transitioning to RC1 and haven't gotten communication with the ledger from the SDK worked out yet

pschnap (Mon, 10 Jul 2017 13:52:05 GMT):
I was seeing a similar error that I was debugging and wanted to wait to respond until I'd worked that out in case it was related, but it turns out it wasn't

FollowingGhosts (Mon, 10 Jul 2017 14:57:41 GMT):
Has joined the channel.

pschnap (Mon, 10 Jul 2017 15:09:21 GMT):
Which certificate do I need to pass to the CA when trying to enroll a user? The cacert?

pschnap (Mon, 10 Jul 2017 17:56:14 GMT):
nvm, it was a config issue

pschnap (Mon, 10 Jul 2017 17:57:06 GMT):
How do I add TLS certs for the SDK to use? I'm having trouble getting it to talk to my orderer

pschnap (Mon, 10 Jul 2017 18:30:30 GMT):
I can talk to the CA but when I go to initialize a channel it errors with: > TransactionException: UNAVAILABLE: Channel closed while performing protocol negotiation and the orderer gives me: > orderer.example.com | 2017-07-10 18:29:43.372 UTC [grpc] Printf -> DEBU d2d grpc: Server.Serve failed to complete security handshake from "10.0.2.2:53973": EOF

pschnap (Mon, 10 Jul 2017 18:31:18 GMT):
any ideas?

liuwenliang0632 (Tue, 11 Jul 2017 06:00:28 GMT):
@rickr please help me review https://gerrit.hyperledger.org/r/#/c/11375

chenxuan (Tue, 11 Jul 2017 12:35:48 GMT):
hi everyoen

chenxuan (Tue, 11 Jul 2017 12:35:50 GMT):
Caused by: io.grpc.StatusRuntimeException: UNKNOWN: could not find chaincode with name 'example_cc_go' - make sure the chaincode example_cc_go has been successfully instantiated and try again

chenxuan (Tue, 11 Jul 2017 12:36:16 GMT):
when i want to the runChannel

chenxuan (Tue, 11 Jul 2017 12:36:21 GMT):
it tell me the error

chenxuan (Tue, 11 Jul 2017 12:36:33 GMT):
however the chaincode starts successfully

chenxuan (Tue, 11 Jul 2017 12:36:50 GMT):
Collection transactionPropResp = channel.sendTransactionProposal(transactionProposalRequest, channel.getPeers());

chenxuan (Tue, 11 Jul 2017 12:44:55 GMT):
the peer

chenxuan (Tue, 11 Jul 2017 12:44:56 GMT):
peer1.org1.example.com | 2017-07-11 12:43:32.949 UTC [lscc] Invoke -> ERRO 3d3 error getting chaincode example_cc_go on channel: foo(err:could not find chaincode with name 'example_cc_go')

chenxuan (Tue, 11 Jul 2017 12:45:07 GMT):
show me the log

chaitanya (Tue, 11 Jul 2017 13:17:12 GMT):
@pschnap Check your certificate paths in the SDK code. Are you using the right cryptogen/configtxgen to generate crypto stuff? (seems obvious, but turns out I had them mismatched myself)

tsnyder (Tue, 11 Jul 2017 13:17:52 GMT):
@rickr How can a client which is encapsulating the fabric java sdk be notified / determine when a Peer connection is dropped (ie. a connection exception is encountered? Same for the Event Hub connections?

pschnap (Tue, 11 Jul 2017 13:27:53 GMT):
@chaitanya essentially I added CAs to the first-network example; I assume the crypto stuff was complete for that example. The SDK connects to one of the CAs I set up ok using the certificate I copied from the crypto stuff (into the VM where I'm developing with the SDK) but then it can't connect to the orderer

pschnap (Tue, 11 Jul 2017 13:38:42 GMT):
@chaitanya I'll poke around; thanks for the suggestions!

ymchee (Tue, 11 Jul 2017 15:16:20 GMT):
Has joined the channel.

chaitanya (Tue, 11 Jul 2017 15:44:47 GMT):
I'm seeing the error `Failed to deserialize creator identity, err MSP Org1MSP is unknown` when I'm trying to get a block from the network. My hunch is perhaps my `peerOrg1.mspid` property value is wrong. Has anyone handled this before? One of the lines in the orderer logs reads: ```2017-07-11 12:56:20.589 UTC [msp/identity] newIdentity -> DEBU 8a9 Creating identity instance for ID &{Org1MSP ebd50bcc9fcf04a8874b5f1de558cc833b4b67474b46a25b2158b0c72fcb1cc6} 2017-07-11 12:56:20.589 UTC [cauthdsl] func2 -> DEBU 8aa 0xc42011c1e8 identity 0 does not satisfy principal: The identity is a member of a different MSP (expected OrdererMSP, got Org1MSP)```

sqwerrels (Tue, 11 Jul 2017 16:21:48 GMT):
Hi, Im poking around the End2EndIT tests and currently both channels are predefined at the start. Is there a way to dynamically add new orgs and peers that weren't previously defined after the channels have been installed?

rickr (Tue, 11 Jul 2017 18:02:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fzffbbAYPfqpBfpQe) Nothing is being merged now till we decide how we'll be handling V1.1 branching in git and gerrit ... stay tuned

pschnap (Tue, 11 Jul 2017 18:11:26 GMT):
@chaitanya looks like it wants you to use "OrdererMSP" instead of "Org1MSP", can't say why though

rickr (Tue, 11 Jul 2017 18:16:09 GMT):
The Peer is not a streaming API. I have not seen a way to be asynchronously notified _reliably_ if it's connection drops (grpc maintains a connection) That said, I think when you try to send the next request to the Peer you should see an exception. Any exception _should_ cause Peer or Orderer to abandon current grpc connection and try a new connection. The event hub is a streaming api with a call back. If it detects a disconnect it *should* by default try to reconnect. I did some _limited_ testing on this but not exhaustive. See on EventHub.java setEventHubDisconnectHandler

chaitanya (Wed, 12 Jul 2017 08:00:53 GMT):
@pschnap I'm still getting the `Failed to deserialize creator identity, err MSP Org1MSP is unknown` when I'm trying to get a block from the network, at my JavaSDK end, but no errors on the docker logs of the orderer. Any pointers on how to fix this? @rickr

MingChaoWAN (Wed, 12 Jul 2017 08:11:03 GMT):
Has joined the channel.

HugoPu (Wed, 12 Jul 2017 08:24:54 GMT):
Has joined the channel.

HugoPu (Wed, 12 Jul 2017 08:25:58 GMT):
@chaitanya I got the same problem when I try to create a new channel, how did you fix this issue?

chaitanya (Wed, 12 Jul 2017 08:27:17 GMT):
@HugoPu If you're getting it on trying to create a Channel, it is likely that your certificate paths aren't correct...What errors does docker logs orderer.example.com show?

HugoPu (Wed, 12 Jul 2017 08:35:47 GMT):
@chaitanya sorry, I forgot to mention the problem is 'grpc: Server.Serve failed to complete security handshake from "172.22.0.1:59256": tls: first record does not look like a TLS handshake'. I got this problem when I try to create a new channel. The way I tried to create a new channel was the same as the unit test 'End2endIT', and when I trid to run 'End2endIT', I got the same problem

chaitanya (Wed, 12 Jul 2017 08:36:36 GMT):
@HugoPu Sure, in that case, I think your SDK doesn't have tls enabled ...check if the parameter is false/null, instead of true?

HugoPu (Wed, 12 Jul 2017 08:44:12 GMT):
@chaitanya Thank you, will come back to ask you if I can't find how to enable tls.

HugoPu (Wed, 12 Jul 2017 09:08:45 GMT):
@chaitanya `Properties ordererProperties = testConfig.getOrdererProperties(orderName);Properties ret = new Properties(); ret.setProperty("pemFile", cert.getAbsolutePath()); // ret.setProperty("trustServerCertificate", "true"); //testing environment only NOT FOR PRODUCTION! ret.setProperty("hostnameOverride", name); ret.setProperty("sslProvider", "openSSL"); ret.setProperty("negotiationType", "TLS"); `

HugoPu (Wed, 12 Jul 2017 09:08:45 GMT):
@chaitanya ```Properties ordererProperties = testConfig.getOrdererProperties(orderName);Properties ret = new Properties(); ret.setProperty("pemFile", cert.getAbsolutePath()); // ret.setProperty("trustServerCertificate", "true"); //testing environment only NOT FOR PRODUCTION! ret.setProperty("hostnameOverride", name); ret.setProperty("sslProvider", "openSSL"); ret.setProperty("negotiationType", "TLS"); ```

HugoPu (Wed, 12 Jul 2017 09:08:45 GMT):
@chaitanya ```Properties ordererProperties = testConfig.getOrdererProperties(orderName);Properties ret = new Properties(); ret.setProperty("pemFile", cert.getAbsolutePath()); // ret.setProperty("trustServerCertificate", "true"); //testing environment only NOT FOR PRODUCTION! ret.setProperty("hostnameOverride", name); ret.setProperty("sslProvider", "openSSL"); ret.setProperty("negotiationType", "TLS"); ``` It looks like it has already set "TLS", could you give me some help?

HugoPu (Wed, 12 Jul 2017 09:10:18 GMT):
@chaitanya It looks like it has already set "TLS", could you give me some help?

chaitanya (Wed, 12 Jul 2017 09:36:04 GMT):
@HugoPu From what I have at my end, there's a property "integrationtests.tls" that I had to set to "true"

chaitanya (Wed, 12 Jul 2017 09:36:04 GMT):
@HugoPu From what I have at my end, there's a property "integrationtests.tls" that I had to set to "true". I'm working with beta

chaitanya (Wed, 12 Jul 2017 09:44:25 GMT):
I have been following TestConfig.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java

chaitanya (Wed, 12 Jul 2017 09:47:02 GMT):
>It looks like it has already set "TLS", could you give me some help? The change I suggested is to be made in the Config() constructor, not in the orderer properties

riancu (Wed, 12 Jul 2017 10:09:08 GMT):
Has joined the channel.

Rachitga (Wed, 12 Jul 2017 13:09:31 GMT):
Hello All, Am using sdk-java at the client, I was trying to generate a channel creation request, but for some reason the channel creation is taking much longer due to some changes I have made at the fabric side. I wanted to know how I could increase my timeout for which the client is sending a deliver request to the orderer, its presently showing 5 seconds as the timeout in the log at my client.

rickr (Wed, 12 Jul 2017 13:26:10 GMT):
On the Orderer set a property "ordererWaitTimeMilliSecs" to "ordererWaitTimeMilliSecs" then set the system property to "ordererWaitTimeMilliSecs" to "10000" .. for 10 seconds actually a bug but that's what you need to do for now :(

cjvkrishna (Wed, 12 Jul 2017 13:27:21 GMT):
Has joined the channel.

cjvkrishna (Wed, 12 Jul 2017 13:30:18 GMT):
Hi All, I am trying to get a POC done with java-sdk. I am getting the following error: "org.hyperledger.fabric.sdk.exception.ProposalException: Peer peer0.org1.example.com channel query return with empty fabric response". I couldn't find anything related to this proposal in the peer0.org1 docker instance. How do I debug this?

Rachitga (Wed, 12 Jul 2017 13:31:23 GMT):
@rickr, so the property should exist at the client side, what do you mean by change on the orderer, can you point me to the specific file you are mentioning the change in

Rachitga (Wed, 12 Jul 2017 13:36:18 GMT):
presently I have changed the file fabric-sdk-java/src/main/java/org/hyperledger/fabric/sdk/Channel.java in function getGenesisBlock, ``` if (duration > config.getGenesisBlockWaitTime()) { throw new TransactionException(format("Getting genesis block time exceeded %s seconds for channel %s", Long.toString(TimeUnit.MILLISECONDS.toSeconds(duration)), name)); } ``` to ``` if (duration > config.getGenesisBlockWaitTime()+300000) { throw new TransactionException(format("Getting genesis block time exceeded %s seconds for channel %s", Long.toString(TimeUnit.MILLISECONDS.toSeconds(duration)), name)); } ```

Rachitga (Wed, 12 Jul 2017 13:37:04 GMT):
i know my set value for the timeout is too huge, but i wanted to be sure that my changes in the fabric code wern't the issue

Rachitga (Wed, 12 Jul 2017 13:37:04 GMT):
the code seems to be working now

Rachitga (Wed, 12 Jul 2017 13:37:49 GMT):
but i still wanted to know in which file i should make this change to

Rachitga (Wed, 12 Jul 2017 13:37:49 GMT):
but i still wanted to know in which file i should make the change to the wait time

rickr (Wed, 12 Jul 2017 14:45:51 GMT):
That's different wait time. You can set env var ORG_HYPERLEDGER_FABRIC_SDK_CHANNEL_GENESISBLOCK_WAIT_TIME=40000 or There is a config.properties org.hyperledger.fabric.sdk.channel.genesisblock_wait_time=40000 for like 40 seconds

cjvkrishna (Wed, 12 Jul 2017 23:50:54 GMT):
Okay I got past my previous error .. Now I am stuck on another error: [ERROR] Enrollment failure: open /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem: input/output error

cjvkrishna (Wed, 12 Jul 2017 23:51:52 GMT):
Looks like the CA for peerOrg1 can not find the certificate pem file. Is the path incorrect? How do I correct this in docker-compose file?

zhangmenghang (Thu, 13 Jul 2017 01:39:27 GMT):
hi,i‘m using sdk 1.0 for fabric 10. release, channel is successfully created and chaincode is initialized, but when invoke the chaincode,it fails:

zhangmenghang (Thu, 13 Jul 2017 01:39:29 GMT):
2017-07-13 01:32:30,296 ERROR Channel:2029 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate has expired or is not yet valid, cause=null}

zhangmenghang (Thu, 13 Jul 2017 01:39:47 GMT):
all things is ok when i use cli

Rachitga (Thu, 13 Jul 2017 06:03:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ofHd49YukwQGaXKYj) @rickr thanks!

HugoPu (Thu, 13 Jul 2017 06:38:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sHuLnPz83xEMtuAc9) @chaitanya Thanks for helping, After I set runningFabricTLS to be true, I got another problem ```Received error on channel foo, orderer orderer.example.com, url grpcs://192.168.53.20:7050, UNAVAILABLE: Channel closed while performing protocol negotiation io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation``` . The logs of orderer.example.com is ```grpc: Server.Serve failed to complete security handshake from "192.168.54.233:48721": EOF```. Do you have any idea?

HugoPu (Thu, 13 Jul 2017 06:38:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sHuLnPz83xEMtuAc9) @chaitanya Thanks for helping, After I set runningFabricTLS to be true, I got another problem ```Received error on channel foo, orderer orderer.example.com, url grpcs://192.168.53.20:7050, UNAVAILABLE: Channel closed while performing protocol negotiation io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation``` . The logs of orderer.example.com is ```grpc: Server.Serve failed to complete security handshake from "192.168.54.233:48721": EOF``` . Do you have any idea?

HugoPu (Thu, 13 Jul 2017 06:38:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sHuLnPz83xEMtuAc9) @chaitanya Thanks for helping, After I set runningFabricTLS to be true, I got another problem ```Received error on channel foo, orderer orderer.example.com, url grpcs://192.168.53.20:7050, UNAVAILABLE: Channel closed while performing protocol negotiation io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation``` . The logs of orderer.example.com is `grpc: Server.Serve failed to complete security handshake from "192.168.54.233:48721": EOF` . Do you have any idea?

HugoPu (Thu, 13 Jul 2017 06:38:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sHuLnPz83xEMtuAc9) @chaitanya Thanks for helping, After I set runningFabricTLS to be true, I got another problem ```Received error on channel foo, orderer orderer.example.com, url grpcs://192.168.53.20:7050, UNAVAILABLE: Channel closed while performing protocol negotiation io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation``` . The log on orderer.example.com is `grpc: Server.Serve failed to complete security handshake from "192.168.54.233:48721": EOF` . Do you have any idea?

HugoPu (Thu, 13 Jul 2017 06:38:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sHuLnPz83xEMtuAc9) @chaitanya Thanks for helping, After I set runningFabricTLS to be true, I got another problem ```Received error on channel foo, orderer orderer.example.com, url grpcs://192.168.53.20:7050, UNAVAILABLE: Channel closed while performing protocol negotiation io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation``` The log on orderer.example.com is `grpc: Server.Serve failed to complete security handshake from "192.168.54.233:48721": EOF` . Do you have any idea?

moulali308 (Thu, 13 Jul 2017 09:11:54 GMT):
Has joined the channel.

moulali308 (Thu, 13 Jul 2017 09:12:08 GMT):
Hello all

moulali308 (Thu, 13 Jul 2017 09:12:50 GMT):
Can I any link to know about Fabric SDK in detail

CarlXK (Thu, 13 Jul 2017 10:29:06 GMT):
@rickr @jimthematrix could the sdk attach to a overlay network, i use docker swarm and create a overlay network xnqkl, set CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=xnqkl, when i use java sdk to connect , report error ``` 07-13 10:16:39.825 ERROR o.h.f.s.Channel - Sending proposal to peer0.org1.xnqkl.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Error starting container: API error (500): {"message":"Could not attach to network xnqkl: rpc error: code = 7 desc = network xnqkl not manually attachable"} , cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: API error (500): {"message":"Could not attach to network xnqkl: rpc error: code = 7 desc = network xnqkl not manually attachable"} at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2029) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1174) at com.xiangan.platform.deploy.DeployChainCode.deployChainCode(DeployChainCode.java:282) at com.xiangan.platform.deploy.DeployChainCode.deploy(DeployChainCode.java:122) at com.xiangan.platform.deploy.DeployChainCode.deployChaincode(DeployChainCode.java:89) at com.xiangan.platform.deploy.DeployChainCode.main(DeployChainCode.java:64) ```

CarlXK (Thu, 13 Jul 2017 10:29:06 GMT):
@rickr @jimthematrix could the sdk attach to a overlay network, i use docker swarm and create a overlay network xnqkl, set CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=xnqkl, when i use java sdk to connect , report error ``` 07-13 10:16:39.825 ERROR o.h.f.s.Channel - Sending proposal to peer0.org1.xnqkl.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Error starting container: API error (500): {"message":"Could not attach to network xnqkl: rpc error: code = 7 desc = network xnqkl not manually attachable"} , cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error starting container: API error (500): {"message":"Could not attach to network xnqkl: rpc error: code = 7 desc = network xnqkl not manually attachable"} at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2029) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1174) at com.xiangan.platform.deploy.DeployChainCode.deployChainCode(DeployChainCode.java:282) at com.xiangan.platform.deploy.DeployChainCode.deploy(DeployChainCode.java:122) at com.xiangan.platform.deploy.DeployChainCode.deployChaincode(DeployChainCode.java:89) at com.xiangan.platform.deploy.DeployChainCode.main(DeployChainCode.java:64) ``` and the network info ``` root@VM-2-43-ubuntu:~# docker network ls NETWORK ID NAME DRIVER SCOPE 72fd6ca5eafe bridge bridge local 09146bfa58db docker_gwbridge bridge local 6b14314ea011 host host local nodb6iz8dgn3 ingress overlay swarm f632f6af0801 none null local ebohqg2uovtb xnqkl overlay swarm ```

rickr (Thu, 13 Jul 2017 12:45:13 GMT):
I don't think that an error of the SDK I'm first _guess_ is it's an issue with the peer starting the container for the chaincode. From the SDK perspective I think the if it can send requests to peers and orderers it should be ok. I'm thinking this best would be posted on the #fabric-peer-endorser-committer channel.

rickr (Thu, 13 Jul 2017 12:45:13 GMT):
I don't think that an error of the SDK. My first _guess_ is it's an issue with the peer starting the container for the chaincode. From the SDK perspective I think if it can send requests to peers and orderers it should be ok. I'm thinking this best would be posted on the #fabric-peer-endorser-committer channel. Provide a full link to the peer logs via some pastit utility.

jordan.k.miles (Thu, 13 Jul 2017 14:50:34 GMT):
Has joined the channel.

jordan.k.miles (Thu, 13 Jul 2017 14:50:53 GMT):
has anyone tried using the fabric-sdk-java with ivy/ant?

liuwenliang0632 (Thu, 13 Jul 2017 17:03:03 GMT):
hi @rickr u can reply me on FAB-5178 .

chenxuan (Fri, 14 Jul 2017 08:26:55 GMT):
import org.hyperledger.fabric.protos.orderer.AtomicBroadcastGrpc;

chenxuan (Fri, 14 Jul 2017 08:26:55 GMT):
the class

chenxuan (Fri, 14 Jul 2017 08:26:55 GMT):
@rickr don't find

liuwenliang0632 (Fri, 14 Jul 2017 09:57:04 GMT):
using maven update

jordan.k.miles (Fri, 14 Jul 2017 13:29:02 GMT):
will the sdk build break if I exclude the jacoco plugin? I don't want all those libraries cluttering up my path.

rickr (Fri, 14 Jul 2017 13:41:08 GMT):
If you're building an application on top the SDK you shouldn't even be downloading it. Your application should be pulling it down from Maven.

rickr (Fri, 14 Jul 2017 13:42:26 GMT):
Only reason to get the SDK is to see the samples (End2end...IT.java) and if you plan to develop the SDK itself.

jordan.k.miles (Fri, 14 Jul 2017 14:09:55 GMT):
I pulled the org.hyperledger.fabric-sdk-java jar from the maven repo, but the project is an ivy/ant build. When I pulled it in, I got a few errors about missing maven dependencies (coming from the jacoco plugin).

jordan.k.miles (Fri, 14 Jul 2017 14:10:24 GMT):
I ended up pulling in those dependencies, then pulling in the fabric-sdk-java jar, then excluding them. everything built so that may work.

rickr (Fri, 14 Jul 2017 14:37:50 GMT):
Right now the only dependency shouldn't be there is jacoco-maven-plugin. Need to figure out how to exclude

ssaddem (Fri, 14 Jul 2017 14:57:10 GMT):
hi i have not tested yet but does java sdk support permitted users (can i from chaincode retreive getcreator) ? if not do you plan to add support in the next version ?

ssaddem (Fri, 14 Jul 2017 14:57:10 GMT):
hi i have not tested yet but does java sdk support permitted users (can i from chaincode retreive getcreator) in v1.0.0 ? if not do you plan to add support in the next version ?

ssaddem (Fri, 14 Jul 2017 14:57:10 GMT):
@rickr hi i have not tested yet but does java sdk support permitted users (can i from chaincode retreive getcreator) in v1.0.0 ? if not do you plan to add support in the next version ?

kustrun (Fri, 14 Jul 2017 15:25:10 GMT):
Has joined the channel.

rickr (Fri, 14 Jul 2017 15:27:23 GMT):
I don't think this would be an SDK todo. Something the chaincode stub should provide if I'm understanding your question. Probably best asked in #fabric channel

kustrun (Fri, 14 Jul 2017 18:29:47 GMT):
Hi! Does there exists a tutorial how to connect to channel which is already running? I would like to use existing peer credentials which are already generated in folder crypto-config?

clempo (Fri, 14 Jul 2017 20:07:27 GMT):
@kustrun, did you look at the End2endAndBackAgainIT sample?

clempo (Fri, 14 Jul 2017 20:07:48 GMT):
@rickr, there is a typo in this method name: nsRwsetInfo.getNaamespace()

clempo (Fri, 14 Jul 2017 20:10:14 GMT):
I am looking at the blockWalker in End2EndIT, I think the principle of iteration should be standardized. The walker loops in at least 3 different ways because the underlying classes forces different ways

clempo (Fri, 14 Jul 2017 20:11:00 GMT):
I think the block info classes are getting confused between an Endorser and an Endorsement

clempo (Fri, 14 Jul 2017 20:11:51 GMT):
The thing that contains the endorser signature should be an Endorsement, not an Endorser

clempo (Fri, 14 Jul 2017 20:13:00 GMT):
The SDK should make up its mind if it spells Envelop or Envelope

clempo (Fri, 14 Jul 2017 20:17:23 GMT):
I like that we now call newChannel instead of newChain, this is much clearer

xinpei8 (Fri, 14 Jul 2017 22:34:02 GMT):
Has joined the channel.

xinpei8 (Fri, 14 Jul 2017 22:39:12 GMT):
Hi all, I am trying to update the channel configuration to add a new org onto the channel. To do so, it seems that we need the SDK to retrieve the latest config. Is there any public method in the java-sdk that can return the latest configuration block? I see there are getConfigurationBlock() and getGenesisBlock() in Channel.java but they're all private. Thank you!

guo (Sat, 15 Jul 2017 07:45:39 GMT):
Has joined the channel.

guo (Sat, 15 Jul 2017 07:50:59 GMT):
hi guys , in release 1.0.0, i saw" [FAB-3850] disable java chaincode as its WIP", my question is: if i use fabric java sdk 1.0.0, can i install/deploy/run the java version chaincode ?

chenxuan (Sat, 15 Jul 2017 10:06:30 GMT):
@rickr do you test the tps use the sdk

smfaizalkhan (Sun, 16 Jul 2017 08:08:23 GMT):
Hello All,My understanding is each peer ,orderer will be seprate physical machines which will have the chaicode as an image installed on top of hyperledger fabric ,thats how they maintain the world state.Now how to form a network between these all physical machines using docker.Help appreciated

sajeevkhan (Sun, 16 Jul 2017 08:33:11 GMT):
Has joined the channel.

sajeevkhan (Sun, 16 Jul 2017 08:35:33 GMT):
Hi, I am using the JAVA SDK to enroll a user. On enrolling the user, I get the enrollment certificate (Key and Certificate) and I want to save this on the local database at the client. It would be great if you can let me know the best practice to store and retrieve the private key and certificate. Thanks, Sajeev

chaitanya (Sun, 16 Jul 2017 17:28:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dzrPQ5LvN7mPS2XPY) @HugoPu I haven't got the channel closed error so far, but I have only tried connecting the SDK to an existing network. See if your certs are alright and pointed to correctly in your SDK code (for the EOF error). Also, check for any other channel.shutdown() calls that may have missed your eye. That's all I can think of, sorry..

chaitanya (Sun, 16 Jul 2017 18:14:47 GMT):
Hi, can anyone point me to an example that I could use to get BlockEvents as and when blocks are committed to the ledger, using the JavaSDK? I've seen the blockwalker() function in End2EndIT.java, but I need something that works as a listener, and not by querying the height of the chain always. I can think of a naive infinite loop solution using the blockwalker() calls, but I guess there might be a better way to do this?

chaitanya (Sun, 16 Jul 2017 18:14:47 GMT):
Hi, can anyone point me to an example that I could use to get BlockEvents as and when blocks are committed to the ledger, using the JavaSDK? I've seen the blockwalker() function in End2EndIT.java, but I need something that works as a listener, and not by querying the height of the chain always. I can think of a naive infinite loop solution using the blockwalker() calls, but is there a better way to do this?

chaitanya (Sun, 16 Jul 2017 18:14:47 GMT):
Hi, can anyone point me to an example that I could use to get BlockEvents as and when blocks are committed to the ledger, using the JavaSDK? I've seen the blockwalker() function in End2EndIT.java, but I need something that works as a listener, and not by querying the height of the chain always. I can think of a naive infinite loop solution using the blockwalker() calls, but is there a better way to do this? @pschnap @rickr

jordan.k.miles (Sun, 16 Jul 2017 19:07:16 GMT):
using just the test membersrvc: membersrvc: image: hyperledger/fabric-membersrvc ports: - "7054:7054" command: membersrvc is it possible to connect to it with the java sdk? I

jordan.k.miles (Sun, 16 Jul 2017 19:08:23 GMT):
I'm trying to enroll an existing user with `caClient.enroll( "test_vp0", "MwYpmSRjupbT" )` but all I'm getting back from the Docker container is `received bogus greeting from client: "POST /api/v1/enroll HTTP"`

dushyant (Sun, 16 Jul 2017 22:19:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kvG8beTBQ7wPYr72D) @chaitanya I think you could add a listener to a channel via Channel.registerBlockListener function which will give you event notifications.

chaitanya (Mon, 17 Jul 2017 04:52:07 GMT):
@dushyant I tried doing that-- defined a BlockListener, passed that into the registerBlockListener() function, wrote out the `received` method for the BlockListener I had defined, but that didn't quite do it. Could you point me to an example or snippet on these lines?

paapighoda (Mon, 17 Jul 2017 05:47:29 GMT):
Has joined the channel.

paapighoda (Mon, 17 Jul 2017 05:48:14 GMT):
Is there a Java tutorial on the Fabric?

dushyant (Mon, 17 Jul 2017 06:28:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RLRDbLcjDrzncgqNa) @chaitanya I don't know of an example which shows this but I tried doing this inside End2EndIT itself and it worked, are you getting any errors when you register your listener?

chaitanya (Mon, 17 Jul 2017 07:23:00 GMT):
@dushyant I'm not getting any errors on trying to register my listener. I think I fixed it, using threads.

dushyant (Mon, 17 Jul 2017 07:46:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=T8WNCmxfPCNryD7CZ) @chaitanya are you running a listener in another thread or using blockwalker() calls in a thread to query blocks?

dushyantbehl (Mon, 17 Jul 2017 07:56:18 GMT):
Has joined the channel.

Codegidi (Mon, 17 Jul 2017 12:25:46 GMT):
Has joined the channel.

mescoba1 (Mon, 17 Jul 2017 17:03:57 GMT):
Has joined the channel.

jordan.k.miles (Mon, 17 Jul 2017 18:45:12 GMT):
anybody?

rickr (Mon, 17 Jul 2017 19:18:04 GMT):
Where are you seeing `hyperledger/fabric-membersrvc` ?

rickr (Mon, 17 Jul 2017 19:20:48 GMT):
JSDK has a client for connecting to Fabaric-CA which is a replacement for membersrvc

jordan.k.miles (Tue, 18 Jul 2017 00:25:01 GMT):
it's the image in my docker-compose.yaml from following this guide: https://www.ibm.com/developerworks/java/library/j-chaincode-for-java-developers/index.html?ca=drs-

Rachitga (Tue, 18 Jul 2017 08:09:52 GMT):
Hello All, I was changing some code at the java-sdk side, specifically this part in the code, in file https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java ``` channel.sendTransaction(successful, orderers).thenApply(transactionEvent -> { waitOnFabric(0); assertTrue(transactionEvent.isValid()); // must be valid to be here. out("Finished instantiate transaction with transaction id %s", transactionEvent.getTransactionID()); try { successful.clear(); failed.clear(); ....... ....... ....... client.setUserContext(sampleOrg.getUser(TESTUSER_1_NAME)); //////////////////////////// // Send Transaction Transaction to orderer out("Sending chaincode transaction(move a,b,100) to orderer."); return channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS); } ``` I am getting the following error, can someone explain me the possible reasons for this? java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID d7e8cbacfd1b66fd3827b7dd282bd98932afeefafbfc5fd75f7819b7b9da47d8 status 11 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at org.hyperledger.fabric.sdkintegration.End2endIT.lambda$runChannel$0(End2endIT.java:386) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at org.hyperledger.fabric.sdk.Channel$TL.lambda$fire$1(Channel.java:2555) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748)

Rachitga (Tue, 18 Jul 2017 08:10:57 GMT):
I was looking for someone to explain me the specifics of return channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS);, and the transactionEvent variables

chenxuan (Tue, 18 Jul 2017 08:43:38 GMT):
@rickr the txId may be same

chenxuan (Tue, 18 Jul 2017 08:43:39 GMT):
?

chenxuan (Tue, 18 Jul 2017 08:43:57 GMT):
i think you should have a good way to create the txid

chenxuan (Tue, 18 Jul 2017 08:44:37 GMT):
public TransactionContext(Channel channel, User user, CryptoSuite cryptoPrimitives) { this.user = user; this.channel = channel; //TODO clean up when public classes are interfaces. this.verify = !"".equals(channel.getName()); //if name is not blank not system channel and need verify. // this.txID = transactionID; this.cryptoPrimitives = cryptoPrimitives; identity = ProtoUtils.createSerializedIdentity(getUser()); ByteString no = getNonce(); ByteString comp = no.concat(identity.toByteString()); byte[] txh = cryptoPrimitives.hash(comp.toByteArray()); // txID = Hex.encodeHexString(txh); txID = new String(Utils.toHexString(txh)); }

chenxuan (Tue, 18 Jul 2017 08:44:46 GMT):
i think txID = new String(Utils.toHexString(txh));

chenxuan (Tue, 18 Jul 2017 08:44:56 GMT):
is not a good method to produce the txid

chenxuan (Tue, 18 Jul 2017 08:45:16 GMT):
because i use the multiple thread to test

chenxuan (Tue, 18 Jul 2017 08:45:19 GMT):
find the txid

chenxuan (Tue, 18 Jul 2017 08:46:24 GMT):
is duplicate

DeutscheBahn-BlockchainDev (Tue, 18 Jul 2017 09:50:43 GMT):
Dear All, is there any way I may dynamically ask the Fabric which are the Peers who are registered on a Channel?

ShobhitSrivastava (Tue, 18 Jul 2017 13:22:13 GMT):
Has joined the channel.

ShobhitSrivastava (Tue, 18 Jul 2017 13:22:19 GMT):
Hi Team

ShobhitSrivastava (Tue, 18 Jul 2017 13:23:13 GMT):
While running my application from java-sdk I am getting below exception:Error is: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: The proposal responses do not have consistent read write sets

ShobhitSrivastava (Tue, 18 Jul 2017 13:23:28 GMT):
Please reply, what should be the cause of this?

rickr (Tue, 18 Jul 2017 13:27:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cjTcp6WAj5JcC5amM) [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cjTcp6WAj5JcC5amM) Any reason you're not using the docker image provided by v1.0.0 ? https://github.com/hyperledger/fabric-sdk-java/releases

rickr (Tue, 18 Jul 2017 13:30:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RnM9RS9tuvSrRwksj) Means you have proposals which have produced in the chaincode readwrite sets that were not consistent (what's would be written to the ledger would not be the same in both cases).

rickr (Tue, 18 Jul 2017 13:30:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RnM9RS9tuvSrRwksj) Means you have proposals which have produced in the chaincode readwrite sets that were not consistent (what would be written to the ledger would not be the same for each proposal).

ShobhitSrivastava (Tue, 18 Jul 2017 13:40:38 GMT):
Yes, correct @rickr I am not able to store the value, PutState method is not working. Where could the error be? Any suggestion

ShobhitSrivastava (Tue, 18 Jul 2017 13:41:56 GMT):
I am able to see the logs after putstate method but getting this exception in eclipse console

rickr (Tue, 18 Jul 2017 15:00:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JzqWo5bhuktXRkJmk) There is a means to determine which Anchor peers _can_ join the channel. There's no means that I'm aware of that determine which peers have actually joined the channel. Can I ask for some details for your use case ?

rickr (Tue, 18 Jul 2017 15:00:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JzqWo5bhuktXRkJmk) There is a means to determine which Anchor peers _can_ join the channel. There's no means that I'm aware of to determine which peers have actually joined the channel. Can I ask for some details for your use case ?

pschnap (Tue, 18 Jul 2017 15:40:47 GMT):
In the "first-network" example, which cert in the `crypto-config` directory am I supposed to use for TLS to the peer for org1 peer0? I'm getting the following error from the orderer with all the certs I've tried: ``` ERRO 108f Principal deserialization failure (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority) for identity ... ```

pschnap (Tue, 18 Jul 2017 15:40:47 GMT):
In the "first-network" example, which cert in the `crypto-config` directory am I supposed to use for TLS to org1's peer0? I'm getting the following error from the orderer with all the certs I've tried: ``` ERRO 108f Principal deserialization failure (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority) for identity ... ```

xinpei8 (Tue, 18 Jul 2017 16:10:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DDRPJNx5oZqPadMgt) @rickr Is it what you're looking for? Collection peers = channel.getPeers()

clempo (Tue, 18 Jul 2017 17:20:54 GMT):
@rickr, I did not get any feedback on my previous comment, do I need to log a full fledged Jira for this? double a in nsRwsetInfo.getNaamespace(); missing e in block.getEnvelopCount(); missing implementation of transactionActionInfo.getEndorsementInfos(); missing getChaincodeInputArgs() with no args; and an equivalent of transactionActionInfo.getTxReadWriteSet() that would return an Iterable.

clempo (Tue, 18 Jul 2017 17:22:13 GMT):
This method signature is strange, I think the method name is better than the return type

clempo (Tue, 18 Jul 2017 17:22:15 GMT):
BlockInfo.EndorserInfo endorserInfo = transactionActionInfo.getEndorsementInfo(n);

rickr (Tue, 18 Jul 2017 17:29:19 GMT):
sure

rickr (Tue, 18 Jul 2017 17:29:19 GMT):
Please create seperate JIRAs

rickr (Tue, 18 Jul 2017 17:29:48 GMT):
I got the Naamespace

pschnap (Tue, 18 Jul 2017 17:31:06 GMT):
fixed my issue, wasn't updating the private keys pointed to by my docker-compose file for the CAs

pschnap (Tue, 18 Jul 2017 17:31:23 GMT):
needed to re-point to those files after regenerating the crypto material

pschnap (Tue, 18 Jul 2017 17:31:50 GMT):
(FYI for folks in the future)

clempo (Tue, 18 Jul 2017 17:45:50 GMT):
I created https://jira.hyperledger.org/browse/FAB-5366

rickr (Tue, 18 Jul 2017 17:47:25 GMT):
Now wheres the RC patch ?

rickr (Tue, 18 Jul 2017 17:47:25 GMT):
Now wheres the CR patch ?

clempo (Tue, 18 Jul 2017 17:49:44 GMT):
what is CR?

clempo (Tue, 18 Jul 2017 17:51:03 GMT):
you changed your response after I created the Jira

clempo (Tue, 18 Jul 2017 17:51:14 GMT):
do you still want me to split the Jira?

clempo (Tue, 18 Jul 2017 17:53:55 GMT):
Is it possible to do the equivalent of ChaincodeStubInterface.GetStateByRange() in Java outside of Chaincode?

clempo (Tue, 18 Jul 2017 17:54:21 GMT):
The only way I know is to query all BlockInfos and traverse them all

rickr (Tue, 18 Jul 2017 18:07:03 GMT):
Changed what response ?

rickr (Tue, 18 Jul 2017 18:07:03 GMT):
Changed what response ? Better to open JIRAs for specific items as we may or may not accept them as a whole.

rickr (Tue, 18 Jul 2017 18:08:26 GMT):
CR := change request with your fixes

clempo (Tue, 18 Jul 2017 18:43:11 GMT):
You first typed "sure", then you changed it to "Please create seperate JIRAs"

clempo (Tue, 18 Jul 2017 18:44:36 GMT):
you did the two easy ones, then there is the bunch on BlockInfo iterables, the last one I bet will get killed because the datatype is likely baked into the grpc proto files

clempo (Tue, 18 Jul 2017 18:44:58 GMT):
I consider the iterables a single item

rickr (Tue, 18 Jul 2017 19:06:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vjjS8XdrhLpowo8Z7) No. Write chaincode that returns that information

jordan.k.miles (Tue, 18 Jul 2017 19:43:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=W28QXurnkz3b43XaF) @rickr Well, I was trying to get around having to configure the CA myself. It may be best practice though.

clempo (Tue, 18 Jul 2017 20:11:35 GMT):
Were the chain code custom event implemented? Will they appear as regular events in my BlockEvent listener? If not, how can I listen to them? How can I emit a chaincode custom event within my chaincode?

clempo (Tue, 18 Jul 2017 20:11:35 GMT):
Were the chain code custom event implemented? Will they appear as regular events in my BlockEvent listener? If not, how can I listen to them? How can I emit a chaincode custom event within my chaincode? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dwBe3M6pBng5aKQJe) Just opened a JIRA for that https://jira.hyperledger.org/browse/FAB-5387

clempo (Tue, 18 Jul 2017 20:11:35 GMT):
Were the chain code custom event implemented? Will they appear as regular events in my BlockEvent listener? If not, how can I listen to them? How can I emit a chaincode custom event within my chaincode? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dwBe3M6pBng5aKQJe)

kelvinzhong (Wed, 19 Jul 2017 03:07:46 GMT):
@rickr hi, can the sdk

kelvinzhong (Wed, 19 Jul 2017 03:07:46 GMT):
@rickr hi, can the sdk now register a new peer? i saw there have some comment there says could also peer be registered, but have no sample for this

kelvinzhong (Wed, 19 Jul 2017 03:07:46 GMT):
@rickr hi, can the sdk register a new peer now? i saw there have some comments says could also the peer be registered, but have no sample for this

lenin.mehedy (Wed, 19 Jul 2017 08:01:27 GMT):
@rickr Any idea on the below error? ``` api | Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err Thesupplied identity is not valid, Verify() returned x509: certificate signed by unknown authority api | at io.grpc.Status.asRuntimeException(Status.java:540) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) ~[grpc-stub-1.3.0.jar:1.3.0] api | at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) ~[grpc-core-1.3.0.jar:1.3.0] api | at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) ~[grpc-core-1.3.0.jar:1.3.0] api | ... 3 common frames omitted api | 07:33:32.962 [LargeThreadPool-thread-22] ERROR org.hyperledger.fabric.sdk.Channel - Sending proposal to peer1.org1.example.com failed because of gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null} api | java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority api | at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2138) [fabric-sdk-java-1.0.0-beta.jar:na] api | at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2072) [fabric-sdk-java-1.0.0-beta.jar:na] api | at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2005) [fabric-sdk-java-1.0.0-beta.jar:na] ```

kelvinzhong (Wed, 19 Jul 2017 09:01:43 GMT):
@rickr since the tag of rc version, eclipse could not normally import the project as the eclipse report .project file is damaged

kelvinzhong (Wed, 19 Jul 2017 09:03:00 GMT):
i have to delete the .project file and import as the maven project, eclipse would automatically generate the new .project file

ssaddem (Wed, 19 Jul 2017 14:20:07 GMT):
@rickr java sdk does he support querry with cert ?

rickr (Wed, 19 Jul 2017 16:45:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dwBe3M6pBng5aKQJe) Just opened a JIRA for that https://jira.hyperledger.org/browse/FAB-5387

rickr (Wed, 19 Jul 2017 16:48:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tbbrSr7ceg9s3vwHx) Usually means you're using the wrong MSPID or certificate in User context

Shubham1109 (Wed, 19 Jul 2017 20:12:49 GMT):
Has joined the channel.

pschnap (Wed, 19 Jul 2017 20:27:58 GMT):
The example code in this test uses a `setCAName` method on the `EnrollmentRequest` class, but I don't find it in either the 1.0.0 release of the SDK _or_ the RC1 release https://github.com/hyperledger/fabric-sdk-java/blob/v1.0.0/src/test/java/org/hyperledger/fabric_ca/sdk/EnrollmentRequestTest.java

pschnap (Wed, 19 Jul 2017 20:28:23 GMT):
Where can I find it in the SDK?

pschnap (Wed, 19 Jul 2017 20:33:39 GMT):
hm, it seems to be in the RegistrationRequest but this user is already registered

atomti (Thu, 20 Jul 2017 06:44:38 GMT):
Has joined the channel.

Dalf (Thu, 20 Jul 2017 13:20:41 GMT):
Has joined the channel.

DeutscheBahn-BlockchainDev (Thu, 20 Jul 2017 13:50:29 GMT):
Dear All, can we read the Genesis and Config blocks of a Channel via the API?

rickr (Thu, 20 Jul 2017 14:07:19 GMT):
There is update coming to let you get the channel config bytes. That's needed for doing an upgrade to the channel. Till now, I've not directly exposed others unless I've seen a use case.

rickr (Thu, 20 Jul 2017 14:23:13 GMT):
There is queryBlockByNumber on channel and the Genesis block is always 0

DeutscheBahn-BlockchainDev (Thu, 20 Jul 2017 14:33:18 GMT):
Hi @rickr thanks for update!

rishabh1102 (Thu, 20 Jul 2017 16:27:14 GMT):
Hey, is there any way to use the java sdk without using mvn?

rishabh1102 (Thu, 20 Jul 2017 16:27:33 GMT):
Like having a set of files and compiling them using javac and executing them using java?

rishabh1102 (Thu, 20 Jul 2017 16:27:40 GMT):
I just want to invoke my chaincode

rishabh1102 (Thu, 20 Jul 2017 16:28:06 GMT):
@here

ssaddem (Thu, 20 Jul 2017 16:30:36 GMT):
why ?

rishabh1102 (Thu, 20 Jul 2017 16:32:20 GMT):
I've installed it using mvn install

rishabh1102 (Thu, 20 Jul 2017 16:32:41 GMT):
And all that i see are the end to end tests which work with specific examples

rishabh1102 (Thu, 20 Jul 2017 16:33:05 GMT):
I want to run invoke on my own network which is deployed natively across multiple machines

rishabh1102 (Thu, 20 Jul 2017 16:33:26 GMT):
Chaincode has already been instantiated on it

rishabh1102 (Thu, 20 Jul 2017 16:33:58 GMT):
Just basic invoking and querying are my requirements

rishabh1102 (Thu, 20 Jul 2017 16:34:46 GMT):
I'm basically looking for the java equivalent of this.

rishabh1102 (Thu, 20 Jul 2017 16:35:25 GMT):
invoke.js in the fabcar example of fabric-samples

rickr (Thu, 20 Jul 2017 16:36:16 GMT):
IMO Much easier if you just create your own application's pom.xml an reference the SDK and let it manage the dependencies

rishabh1102 (Thu, 20 Jul 2017 16:37:07 GMT):
Hmm, that sounds okay

rishabh1102 (Thu, 20 Jul 2017 16:37:16 GMT):
But how do I go about coding?

rishabh1102 (Thu, 20 Jul 2017 16:37:29 GMT):
I mean, I can try breaking down End2EndIT.java

rishabh1102 (Thu, 20 Jul 2017 16:37:34 GMT):
And picking up what I need from there

rishabh1102 (Thu, 20 Jul 2017 16:37:45 GMT):
But is there an easier way to do this?

rickr (Thu, 20 Jul 2017 16:37:52 GMT):
yeah -- that's the idea

rishabh1102 (Thu, 20 Jul 2017 16:38:13 GMT):
Breaking down End2EndIT.java?

rickr (Thu, 20 Jul 2017 16:38:22 GMT):
pick what you need from it

rickr (Thu, 20 Jul 2017 16:41:49 GMT):
maybe this is a better starting point https://github.com/venugopv/FabricJavaSDKSample/blob/master/pom.xml

rickr (Thu, 20 Jul 2017 16:41:49 GMT):
maybe this is a better starting point https://github.com/venugopv/FabricJavaSDKSample

ssaddem (Thu, 20 Jul 2017 16:57:12 GMT):
@rickr does fabric v1.0.0 support cert enroll ?

wangpan22 (Fri, 21 Jul 2017 01:57:40 GMT):
Has joined the channel.

rishabh1102 (Fri, 21 Jul 2017 07:05:26 GMT):
So I tried getting invoke and query to work without using a CA

rishabh1102 (Fri, 21 Jul 2017 07:06:07 GMT):
And I'm getting an VSCC Error, Authentication failure

rishabh1102 (Fri, 21 Jul 2017 07:06:14 GMT):
Anyone know how to fix this?

inaki (Fri, 21 Jul 2017 08:50:15 GMT):
Has joined the channel.

smita0709 (Fri, 21 Jul 2017 12:48:42 GMT):
Has joined the channel.

smita0709 (Fri, 21 Jul 2017 12:48:47 GMT):
Hi, In the example in the below link the configtxlator takes the configuration block in .pb (protobuf) format. https://hyperledger-fabric.readthedocs.io/en/latest/configtxlator.html The getConfigurationBlock() method in Channel class in fabric-sdk-java returns a Block (org.hyperledger.fabric.protos.common.Common$Block). How to I retrieve a configuration block from fabric sdk java in protobuf format so that I can pass it to the configtxlator?

rickr (Fri, 21 Jul 2017 12:51:45 GMT):
Method to do this should be in V1.0.1 https://jira.hyperledger.org/browse/FAB-5368

rickr (Fri, 21 Jul 2017 12:55:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gtDdaex5t5q5rKnD2) See End2endIT.java for ca.enroll

rickr (Fri, 21 Jul 2017 13:01:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bettLxPaco2NeNvP5) See the End2endIT.java samples the user that is a user `peerAdmin` (search for setPeerAdmin) All the End2endxxIT could be rewritten removing the Fabric-ca client, enrollment parts and just using that user.

pschnap (Fri, 21 Jul 2017 14:57:11 GMT):
I'm getting an error when trying to invoke, it's giving me the following on the `ProposalResponse` verification: ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: Cannot verify signature. Error is: Wrong key usage ```

pschnap (Fri, 21 Jul 2017 14:57:14 GMT):
Any ideas?

rickr (Fri, 21 Jul 2017 15:09:52 GMT):
The response is failing to verify with any peer certificate. I've not see this before must be a stacktrace with that. Use something like `pasteit` post url here. _might help_

pschnap (Fri, 21 Jul 2017 15:16:03 GMT):
``` DEBUG 2017-07-21 10:01:02,984 6098 org.hyperledger.fabric.sdk.Channel [main] Channel testing got back from peer PEER status: 200, message: OK ERROR 2017-07-21 10:01:02,991 6105 org.hyperledger.fabric.sdk.security.CryptoPrimitives [main] Cannot verify signature. Error is: Wrong key usage Certificate: 2D...2D0A org.hyperledger.fabric.sdk.exception.CryptoException: Cannot verify signature. Error is: Wrong key usage Certificate: 2D...2D0A at org.hyperledger.fabric.sdk.security.CryptoPrimitives.verify(CryptoPrimitives.java:187) at org.hyperledger.fabric.sdk.ProposalResponse.verify(ProposalResponse.java:106) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2040) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:1955) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:1889) ... at com.COMPANY.hyperledger.Main.main(Main.java:20) Caused by: java.security.InvalidKeyException: Wrong key usage at java.security.Signature.initVerify(Signature.java:501) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.verify(CryptoPrimitives.java:180) ... 7 more ERROR 2017-07-21 10:01:02,993 6107 org.hyperledger.fabric.sdk.ProposalResponse [main] verify: Cannot retrieve peer identity from ProposalResponse. Error is: Cannot verify signature. Error is: Wrong key usage Certificate: 2D...2D0A org.hyperledger.fabric.sdk.exception.CryptoException: Cannot verify signature. Error is: Wrong key usage Certificate: 2D...2D0A at org.hyperledger.fabric.sdk.security.CryptoPrimitives.verify(CryptoPrimitives.java:187) at org.hyperledger.fabric.sdk.ProposalResponse.verify(ProposalResponse.java:106) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2040) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:1955) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:1889) ... at com.COMPANY.hyperledger.Main.main(Main.java:20) Caused by: java.security.InvalidKeyException: Wrong key usage at java.security.Signature.initVerify(Signature.java:501) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.verify(CryptoPrimitives.java:180) ... 7 more ```

pschnap (Fri, 21 Jul 2017 15:18:16 GMT):
@rickr ^

pschnap (Fri, 21 Jul 2017 15:18:46 GMT):
btw, I'm using the 1.0.0 release of the SDK against the RC1 of the fabric

pschnap (Fri, 21 Jul 2017 15:20:22 GMT):
it works against a local 1.0.0; the error is occurring against the RC1 on Bluemix

pschnap (Fri, 21 Jul 2017 15:30:55 GMT):
It could be that my configuration is not correct, or I'm missing setting something up in the SDK

clempo (Fri, 21 Jul 2017 19:39:24 GMT):
The Readme is still missing a closing quote in the instructions to update the Vagrantfile

clempo (Fri, 21 Jul 2017 19:39:27 GMT):
config.vm.synced_folder "/home/<>/fabric-sdk-java/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration

clempo (Fri, 21 Jul 2017 19:39:46 GMT):
This creates a very cryptic error message and it takes a while to figure it out

clempo (Fri, 21 Jul 2017 19:40:33 GMT):
I reported this mistake before, I'm not sure if this is a new regression

clempo (Fri, 21 Jul 2017 19:41:09 GMT):
The error message I got was:

clempo (Fri, 21 Jul 2017 19:43:28 GMT):
undefined method gsub

rickr (Fri, 21 Jul 2017 20:05:18 GMT):
K thought I had addressed that at one time.

jordan.k.miles (Fri, 21 Jul 2017 20:20:09 GMT):
trying to create a new channel in accordance with the End2endIT test and I'm getting this error: `Principal deserialization failure (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")) for identity` Has anyone else come across this? All of my certs were generated with cryptogen, my admin's enrollment is set and channel configuration looks correct.

rishabh1102 (Sat, 22 Jul 2017 10:21:12 GMT):
Hey guys, how can I turn off logging in the java sdk?

rishabh1102 (Sat, 22 Jul 2017 10:21:23 GMT):
@rickr

sajeevkhan (Sat, 22 Jul 2017 12:42:04 GMT):
Hi There, We are trying to instantiate a chaincode that was already installed. However, I am wondering how the Channel Object can be fetched using the JAVA SDK

tarunc (Sat, 22 Jul 2017 21:14:42 GMT):
Has joined the channel.

takagimasanobu (Sun, 23 Jul 2017 11:56:24 GMT):
Has joined the channel.

CarlXK (Mon, 24 Jul 2017 02:28:22 GMT):
@rickr i m using the java sdk to deploy cc & invoke , now got a problem: 1. startup ca& order 2. startup Peer root, install & instantiate cc 3. startup Peer ttt, install cc 4. invoke cc of peer root succeed, invoke cc of peer ttt failed error in Peer below ``` 2017-07-21 17:54:30.948 CST [chaincode] ExecuteChaincode -> ERRO 460 Error executing chaincode: Could not get deployment transaction from LSCC for account_cc_go:1 - Get ChaincodeDeploymentSpec for account_cc_go/xnchannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-07-21 17:54:30.948 CST [endorser] callChaincode -> DEBU 461 Exit ``` could you please help and give a workaround?

CarlXK (Mon, 24 Jul 2017 02:28:22 GMT):
@rickr i m using the java sdk to deploy cc & invoke , now got a problem: 1. startup ca& order 2. startup Peer root, install & instantiate cc, use container1 3. startup Peer ttt, install cc , use container2 4. invoke cc of peer root succeed, invoke cc of peer ttt failed error in Peer below ``` 2017-07-21 17:54:30.948 CST [chaincode] ExecuteChaincode -> ERRO 460 Error executing chaincode: Could not get deployment transaction from LSCC for account_cc_go:1 - Get ChaincodeDeploymentSpec for account_cc_go/xnchannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-07-21 17:54:30.948 CST [endorser] callChaincode -> DEBU 461 Exit ``` could you please help and give a workaround?

jrui (Mon, 24 Jul 2017 09:39:58 GMT):
Has joined the channel.

rickr (Mon, 24 Jul 2017 11:20:31 GMT):
I've not seen that error before. I think you'd get a better answer on the #fabric-consensus channel as to what that error means.

rickr (Mon, 24 Jul 2017 11:58:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sqWpLFKyBoXwjcwCy) try with env. var ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=INFO. for now. DEBUG got checked in ... looking to fix to make default INFO.

chaitanya (Mon, 24 Jul 2017 17:46:44 GMT):
Hi, I've been trying to run invoke and query using the Java-SDK against an already setup network, but lately I've been getting the following error: ```java.lang.IllegalArgumentException: Malformed \uxxxx encoding. at java.util.Properties.loadConvert(Properties.java:574) at java.util.Properties.load0(Properties.java:390) at java.util.Properties.load(Properties.java:341) at com.ibm.in.offchain.models.SampleStore.loadProperties(SampleStore.java:73) at com.ibm.in.offchain.models.SampleStore.getValue(SampleStore.java:66) at com.ibm.in.offchain.models.SampleUser.(SampleUser.java:52) at com.ibm.in.offchain.models.SampleStore.getMember(SampleStore.java:121) at com.ibm.in.offchain.talker.FabricTalker.setup(FabricTalker.java:177) at com.ibm.in.offchain.talker.FabricTalker.bootstrap(FabricTalker.java:84) at com.ibm.in.offchain.ListenForBlocks.run(ListenForBlocks.java:23) at java.lang.Thread.run(Thread.java:748) Exception in thread "BlockEventListener-Thread" java.lang.NullPointerException at com.ibm.in.offchain.ListenForBlocks.run(ListenForBlocks.java:30) at java.lang.Thread.run(Thread.java:748) ``` Any idea about what's causing this? I'm not even reading properties from a properties file, except for a logger.

chaitanya (Mon, 24 Jul 2017 17:46:44 GMT):
Hi, I've been trying to run invoke and query using the Java-SDK against an already setup network, but lately I've been getting the following error: ```java.lang.IllegalArgumentException: Malformed \uxxxx encoding. at java.util.Properties.loadConvert(Properties.java:574) at java.util.Properties.load0(Properties.java:390) at java.util.Properties.load(Properties.java:341) at com.ibm.in.offchain.models.SampleStore.loadProperties(SampleStore.java:73) at com.ibm.in.offchain.models.SampleStore.getValue(SampleStore.java:66) at com.ibm.in.offchain.models.SampleUser.(SampleUser.java:52) at com.ibm.in.offchain.models.SampleStore.getMember(SampleStore.java:121) at com.ibm.in.offchain.talker.FabricTalker.setup(FabricTalker.java:177) at com.ibm.in.offchain.talker.FabricTalker.bootstrap(FabricTalker.java:84) at com.ibm.in.offchain.ListenForBlocks.run(ListenForBlocks.java:23) at java.lang.Thread.run(Thread.java:748) ``` Any idea about what's causing this? I'm not even reading properties from a properties file, except for a logger.

chaitanya (Mon, 24 Jul 2017 17:46:44 GMT):
Hi, I've been trying to run invoke and query using the Java-SDK against an already setup network, but lately I've been getting the following error: ```java.lang.IllegalArgumentException: Malformed \uxxxx encoding. at java.util.Properties.loadConvert(Properties.java:574) at java.util.Properties.load0(Properties.java:390) at java.util.Properties.load(Properties.java:341) at com.ibm.in.offchain.models.SampleStore.loadProperties(SampleStore.java:73) at com.ibm.in.offchain.models.SampleStore.getValue(SampleStore.java:66) at com.ibm.in.offchain.models.SampleUser.(SampleUser.java:52) at com.ibm.in.offchain.models.SampleStore.getMember(SampleStore.java:121) at com.ibm.in.offchain.talker.FabricTalker.setup(FabricTalker.java:177) at com.ibm.in.offchain.talker.FabricTalker.bootstrap(FabricTalker.java:84) at com.ibm.in.offchain.ListenForBlocks.run(ListenForBlocks.java:23) at com.ibm.in.offchain.App.main(App.java:28) ``` Any idea about what's causing this? I'm not even reading properties from a properties file, except for a logger.

sajeevkhan (Tue, 25 Jul 2017 02:46:55 GMT):
Hi, How do we fetch the channel details from the peer so that we can use the channel to send a transaction later.

smita0709 (Tue, 25 Jul 2017 06:08:55 GMT):
Hi, Is there a way to update the configuration block of a channel in fabric sdk java?

smita0709 (Tue, 25 Jul 2017 06:30:07 GMT):
also when is fabric sdk java v1.0.1 due for release?

anik (Tue, 25 Jul 2017 06:55:34 GMT):
Is there any to generate orderer block to work with 3 organizations in end2endIT example? what changes are needed in configtx.yaml. would appreciate any pointer

tallharish (Tue, 25 Jul 2017 12:54:02 GMT):
I am familiar enough with JDK to do invoke and query transactions. How do I listen for endorsements? Could someone please point me to relevant code in End2endIT.java or other project ?

tallharish (Tue, 25 Jul 2017 12:54:02 GMT):
I am familiar enough with JDK to do invoke and query transactions. How do I listen for endorsement proposal from other peers? Could someone please point me to relevant code in End2endIT.java or other project ?

tallharish (Tue, 25 Jul 2017 12:54:02 GMT):
I am familiar enough with JDK to do invoke and query transactions. How do I listen for endorsement proposal from other peers? Could someone please point me to relevant code in End2endIT.java or other project? Thanks

tallharish (Tue, 25 Jul 2017 12:54:02 GMT):
I am familiar enough with java JDK to do invoke and query transactions. How do I listen for endorsement proposal from other peers? Could someone please point me to relevant code in End2endIT.java or other project? Thanks

tallharish (Tue, 25 Jul 2017 14:56:16 GMT):
I am developing appln using Java JDK in Eclipse. how do I change the trace level of messages? I have enabled the DEBUG level a while back and would like to switch it off but forgot how to. Thanks.

clempo (Tue, 25 Jul 2017 16:36:48 GMT):
Why does the Channel complains there are no orderers if all I want to do is register a block listener? I would expect defining eventHubs is all I need.

clempo (Tue, 25 Jul 2017 18:48:15 GMT):
What's the purpose of TxReadWriteSetInfo if all it contains is an iterable list of TxReadWriteSetInfo.NsRwsetInfo?

clempo (Tue, 25 Jul 2017 18:49:49 GMT):
are there missing or planned members in TxReadWriteSetInfo?

clempo (Tue, 25 Jul 2017 18:54:30 GMT):
TxReadWriteSetInfo.getNsRwsetInfos() is empty in my BlockEvent but that block has rw sets if I call Channel.queryBlockByNumber(nbr), is that normal?

rickr (Tue, 25 Jul 2017 20:03:42 GMT):
yes -- It's costly for the event hub to include that for all events. The out is if you need it when you get the event is to query to do the queryBlockByNumber to then get it.

clempo (Tue, 25 Jul 2017 20:04:55 GMT):
is that part of the documentation?

rickr (Tue, 25 Jul 2017 20:06:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aAvLQjAkqAyEiTfWa) bug in the SDK was delivered with DEBUG on will be changed in v1.0.1 to INFO. for now set ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=INFO.

rickr (Tue, 25 Jul 2017 20:08:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sMQWy7MHm3HikXuwY) Should be in v1.0.1

rickr (Tue, 25 Jul 2017 20:14:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pCWZyZNBgcnxqthmv) Not sure what you're asking here. The SDK's don't listen for proposals from other peers.

clempo (Tue, 25 Jul 2017 20:20:38 GMT):
@rickr, do you know the answer to this? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4QTXXgmk35os5aLwA)

pschnap (Tue, 25 Jul 2017 20:21:44 GMT):
my `ProposalResponse.isVerified()` method calls keep throwing an error: > Cannot verify signature. Error is: Wrong key usage any ideas?

clempo (Tue, 25 Jul 2017 20:26:33 GMT):
@pschnap, did you change the UserContext between the TransactionProposal and ProposalResponse?

pschnap (Tue, 25 Jul 2017 20:32:24 GMT):
@clempo I don't think so, I create the `TransactionProposalRequest`, set the CCID/Fn/Args, send it via `Channel.sendTransactionProposal`, then check the `ProposalResponse`s and get the error

clempo (Tue, 25 Jul 2017 20:50:53 GMT):
Maybe your certificate contains a Usage extension that does not allow the crypto operation you are attempting

clempo (Tue, 25 Jul 2017 20:51:57 GMT):
I would put a breakpoint where that error is generated. It might be all happening locally in the SDK.

pschnap (Tue, 25 Jul 2017 20:56:25 GMT):
good call on the breakpoint; I hadn't noticed that the `sendTransactionProposal` is actually throwing the same error

pschnap (Tue, 25 Jul 2017 21:00:55 GMT):
bah, looks like it was all `sendTransactionProposal`; I'll investigate more tomorrow, thanks @clempo !

Hangyu (Wed, 26 Jul 2017 00:35:02 GMT):
when I try to create channel, I always encounter this error ``` org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: timeout at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:163) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:133) at org.hyperledger.fabric.sdk.Channel.(Channel.java:222) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1121) ``` I have found that this is controlled by *ordererWaitTimeMilliSecs* in OrderClient.java, I have tried to customize the value but failed, could you inform me the right way of customizing it ? thank you @rickr

Hangyu (Wed, 26 Jul 2017 01:48:34 GMT):
I have found your answer, thanks very much! @rickr

szlaci1983 (Wed, 26 Jul 2017 08:44:12 GMT):
Has joined the channel.

JanRzepecki (Wed, 26 Jul 2017 09:52:13 GMT):
Has joined the channel.

ohupalo (Wed, 26 Jul 2017 09:52:30 GMT):
Has joined the channel.

ohupalo (Wed, 26 Jul 2017 09:53:14 GMT):
Hello. How deploy chaincode on java using fabric sdk

ohupalo (Wed, 26 Jul 2017 09:53:14 GMT):
Hello. How deploy chaincode on java using fabric sdk?

ohupalo (Wed, 26 Jul 2017 09:54:51 GMT):

Message Attachments

ohupalo (Wed, 26 Jul 2017 09:55:57 GMT):
I've tried do it like with go example, unfortunately it failed.

sajeevkhan (Wed, 26 Jul 2017 11:13:20 GMT):
Hi, What is the JAVA SDK equivalent for the command "peer channel fetch -c chainID"

sajeevkhan (Wed, 26 Jul 2017 11:51:39 GMT):
Hi, We have successfully created a new channel and also installed and instantiated a chaincode on this . The network is using CouchDB for State management. We are using JAVA SDK to construct and install chain code. Now, after restarting the network, we would want JAVA SDK to connect to the channel and perform queries on the chain code. On executing a query in JAVA SDK using channel.queryByChaincode(queryByChaincodeRequest, channel.getPeers()); “org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel foo has not been initialized.” However, when we try to initialize the channel, channel.initialize(), we get the following exception org.hyperledger.fabric.sdk.Channel : Bad newest block expected status 200 got 404, Channel foo I guess, what we are missing the JAVA equivalent of the following peer command: “peer channel fetch -c chainID “ It would be great if someone can help us with this issue. Regards Sajeev

n91 (Wed, 26 Jul 2017 12:16:54 GMT):
Has joined the channel.

rickr (Wed, 26 Jul 2017 13:20:48 GMT):
Not sure why you're seeing that error. End2endAndBackAgainIT shows reconstructing a channel and performing additional operations on it.

rickr (Wed, 26 Jul 2017 13:20:48 GMT):
Not sure why you're seeing that error. End2endAndBackAgainIT shows reconstructing a channel and performing additional operations on it. Check the orderer log if there is any hints what's wrong.

rickr (Wed, 26 Jul 2017 13:23:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jtWbPKRk75L5uhdBS) End2endIT.java shows deploying chaincode.

rickr (Wed, 26 Jul 2017 13:25:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q8nmxxKWkkEFuBQZQ) At the moment you need an Orderer for most almost all but probably just listening for events.

rickr (Wed, 26 Jul 2017 13:25:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=q8nmxxKWkkEFuBQZQ) At the moment you need an Orderer for most almost all operations but probably just listening for events.

tallharish (Wed, 26 Jul 2017 13:30:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x3id4FguaQnefbCqE) @rickr Quick followup: I am seeing logs running the fabric-sdk-java project on eclipse console. I created a new Eclipse maven project, adding fabric-sdk-java project as a dependency. When I run the project now, I dont see any sdk logs on console. How do I see them? Sorry for the eclipse-specific question :)

clempo (Wed, 26 Jul 2017 13:37:02 GMT):
I still think this is a bug. My piece of software only listens to events and I force my user to define an orderer that will never be used.

clempo (Wed, 26 Jul 2017 13:40:47 GMT):
I wonder if a simple block listener is really related to a channel. I know the channel uses it to finish the transaction, but that's not the same as saying the block listener is a part of the channel.

clempo (Wed, 26 Jul 2017 13:41:25 GMT):
The other solution is to add the check for empty orderers at the point you use them

tallharish (Wed, 26 Jul 2017 14:08:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x3id4FguaQnefbCqE) @rickr Followup question. I created a new eclipse maven project, importing fabric-sdk-java dependency and writing a simple client which works. I see the following error ```log4j:WARN No appenders could be found for logger (com.ibm.research.fabricClient.TestConfig). log4j:WARN Please initialize the log4j system properly.```. I added log4j in my project as follows: ``` log4j log4j 1.2.17 ```. Also copied log4j.properties from another project in src/ or src/resources folders. But still can't fix it. What am I missing?

tallharish (Wed, 26 Jul 2017 14:08:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x3id4FguaQnefbCqE) @rickr Followup question. I created a new eclipse maven project, importing fabric-sdk-java dependency and writing a simple client which works. I see the following error ```log4j:WARN No appenders could be found for logger (com.ibm.research.fabricClient.TestConfig). log4j:WARN Please initialize the log4j system properly.```. I added log4j in my project as follows: ``` log4j log4j 1.2.17 ``` Also copied log4j.properties from another project in src/ or src/resources folders. But still can't fix it. What am I missing?

tallharish (Wed, 26 Jul 2017 14:08:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x3id4FguaQnefbCqE) @rickr Followup question. I created a new eclipse maven project, importing fabric-sdk-java dependency and writing a simple client which works. I see the following error ```log4j:WARN No appenders could be found for logger (com.ibm.research.fabricClient.TestConfig). log4j:WARN Please initialize the log4j system properly.```. I added log4j in my project as follows: ``` log4j log4j 1.2.17 ``` Also copied log4j.properties from another project in src/ or src/resources folders. But still can't fix it. What am I missing?

tallharish (Wed, 26 Jul 2017 14:08:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x3id4FguaQnefbCqE) @rickr Followup question. I created a new eclipse maven project, importing fabric-sdk-java dependency and writing a simple client which works. I see the following error ```log4j:WARN No appenders could be found for logger (com.org.division.fabricClient.TestConfig). log4j:WARN Please initialize the log4j system properly.```. I added log4j in my project as follows: ``` log4j log4j 1.2.17 ``` Also copied log4j.properties from another project in src/ or src/resources folders. But still can't fix it. What am I missing?

rickr (Wed, 26 Jul 2017 14:17:04 GMT):
I don't _think_ this is an SDK issue. Your application is using log4J and you're not setting it up properly

n91 (Wed, 26 Jul 2017 15:00:13 GMT):
@rickr Hi , I am following the reconfiguration example from documentation to add a new organization to channel. I am able to decode,encode, updateConfig and create envelope using HttpPost. How to execute `peer channel update -f config_update_as_envelope.pb -c testchainid -o 127.0.0.1:7050` from java SDK ?

rickr (Wed, 26 Jul 2017 15:19:24 GMT):
Updates and a complete example ( _UpdateChannelIT.java_ ) has been delivered on the master branch. Should be in v1.0.1 when it's cut.

n91 (Wed, 26 Jul 2017 15:25:25 GMT):
@rickr v1.0.1 is not available yet !! Any insight on this part specifically 'SDK signs and submit config'

n91 (Wed, 26 Jul 2017 15:28:24 GMT):
@rickr Thanks

mescoba1 (Wed, 26 Jul 2017 17:50:16 GMT):
Has left the channel.

anik (Wed, 26 Jul 2017 18:02:46 GMT):
End2EndIT run successfully for org1, can I run query in command for installed chaincode in peer (peer0.org2)?

anik (Wed, 26 Jul 2017 18:28:40 GMT):

Message Attachments

anik (Wed, 26 Jul 2017 18:29:06 GMT):
running End2EndIT

clempo (Wed, 26 Jul 2017 19:38:56 GMT):
The Epoch in my BlockInfo or BlockEvents is always 0, is that normal? I thought the epoch was similar to a date. What does Epoch mean if it is always 0?

clempo (Wed, 26 Jul 2017 20:22:18 GMT):
I don't understand how this response in the Go chaincode jsonResp := "{\"Name\":\"" + A + "\",\"Amount\":\"" + string(Avalbytes) + "\"}"

clempo (Wed, 26 Jul 2017 20:22:35 GMT):
is deserialized into the value of b in End2endIT with this String payload = proposalResponse.getProposalResponse().getResponse().getPayload().toStringUtf8();

clempo (Wed, 26 Jul 2017 20:23:01 GMT):
My goal is to return multiple values from a query, which seems easy in Go but does not make sense on the client side in Java

clempo (Wed, 26 Jul 2017 20:24:29 GMT):
Is it possible the go code under src/test/fixtures/sdkintegration/gocc/sample1 is not the code the sample is actually running

cjvkrishna (Wed, 26 Jul 2017 21:50:15 GMT):
Howto install java chaincode on Fabric 1.0?

cjvkrishna (Wed, 26 Jul 2017 22:04:26 GMT):
Can I use InstallProposalRequest to install java chaincode? If yes, where can I find an example?

cjvkrishna (Wed, 26 Jul 2017 22:33:29 GMT):
From the source code, I see the following comment: "Chaincode input stream containing the actual chaincode. Only format supported is a tar zip compressed input of the source" for the method: setChaincodeInputStream(..) So, to install a Java ChainCode, do I just build it with gradle and point the ChaincodeInputStream to the .tar I get in the build/distributions folder?

cjvkrishna (Wed, 26 Jul 2017 22:34:05 GMT):
Hi @rickr can you please look into my question?

anik (Thu, 27 Jul 2017 02:26:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aD4RqigadB7KrFp4P) @anik @rickr

gopinathbr (Thu, 27 Jul 2017 07:33:48 GMT):
Has joined the channel.

gopinathbr (Thu, 27 Jul 2017 07:38:37 GMT):
@cjvkrishna If I am not wrong, you should install a zip or tar of the source only (without building it). Once installed, fabric will build the java chain code as per the build instructions in the .gradle file.

sajeevkhan (Thu, 27 Jul 2017 07:56:39 GMT):
Hi, On bringing up a network with couchdb the container entry for couchdb is getting deleted from docker-compose.yaml file. Can anyone explain the reason why the following entry is deleted couchdb: container_name: couchdb image: hyperledger/fabric-couchdb:x86_64-1.0.0-rc1 ports: - 5984:5984 environment: DB_URL: http://localhost:5984/member_db

HuangLijun (Thu, 27 Jul 2017 11:56:41 GMT):
Has joined the channel.

rickr (Thu, 27 Jul 2017 13:05:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=34J9qjdozZqKt3z8Y) Full examples of installing chaincode is in org/hyperledger/fabric/sdkintegration/End2endIT.java

rickr (Thu, 27 Jul 2017 13:08:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rvNjT6rEciZb95qp2) Most of the time is either wrong MSPID and or certificate being supplied.

tallharish (Thu, 27 Jul 2017 13:11:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=56PEiCYfy3akRBX7E) @rickr Let me try to understand the flow here. For a transaction that requires endorsements from Org1.member AND Org2.member, the client belonging to Org1.member sends transaction proposal () to org1 peer and org2 peer. I am assuming the client appln at org2 receives it, processes it, and replies back with transaction-endorsed () back to client in org1, which validates the signatures and policy and sends it to orderer. My question is how does client appln in org2 set an event notification (like callback). Any code you could cite here?

rickr (Thu, 27 Jul 2017 13:21:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Ei8GLom7xxqPehi2w) Epoch is not used but must be set zero currently.

rickr (Thu, 27 Jul 2017 13:25:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=da84WkA95R5NnjxiH) You can on a channel use `registerBlockListener` to see which blocks have been written to the ledger.

clempo (Thu, 27 Jul 2017 14:06:58 GMT):
Never mind, the JSON document is a debug message, the return value is just the value of b [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oE7AQcMwRoTiz7PaD)

fanjianhang (Fri, 28 Jul 2017 08:41:03 GMT):
Has joined the channel.

anik (Fri, 28 Jul 2017 11:33:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hvbL3htgPWanZyngR) @rickr Actually i deployed the chaincode using existing End2endIT via Org1 peer.Than logged in to the docker container of peer of Org1 and query the chaincode which works fine for me .But when i try to query the same chaincode from peer of Org2 i get this error.Does existing sample End2endIT deploy chaincode on all four peers ?

hcw (Fri, 28 Jul 2017 14:14:56 GMT):
Has joined the channel.

cjvkrishna (Fri, 28 Jul 2017 15:18:43 GMT):
Thanks @gopinathbr and @rickr. I created a simple service to install custom chaincode to blockchain. I am using Fabric-sdk-java 1.0.0.-beta and the docker images being pulled are also 1.0.0-beta. 1) I am seeing the following error: "Java chaincode is work-in-progress and disabled" while installing custom ChainCode. Does the latest version 1.0.0 support Java chaincode installation. 2) I couldn't find the relevant information from the release notes: http://hyperledger-fabric.readthedocs.io/en/latest/releases.html This might not be related, but this ticket FAB-1794 that says that the fix version should be 1.1

cjvkrishna (Fri, 28 Jul 2017 15:20:40 GMT):
Which version of Fabric supports Java Chaincode installation?

ibmmqmet (Fri, 28 Jul 2017 15:23:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=S9XJbJdW3PShwBSNA) @pschnap I'm seeing the

ibmmqmet (Fri, 28 Jul 2017 15:23:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=S9XJbJdW3PShwBSNA) @pschnap I'm seeing the same error when connecting to a service I have no control over ... It seems to be a problem with the certificate created from a pem in CryptoPrimitives.verify() - the usage bits for the cert are not including data signing. To allow me to go further for now, I've modified things so the doVerify() method on the transaction proposal returns false but I know the underlying issue needs to be looked at. I don;t have any control over the servers or CA - that's hosted elsewhere; all I can play with is on the client side. Did you make any progress?

pschnap (Fri, 28 Jul 2017 15:25:01 GMT):
I had my head in the clouds that day, the `sendTransactionProposal` was actually the source of the exceptions I was seeing, not the `isVerified` methods

pschnap (Fri, 28 Jul 2017 15:25:58 GMT):
@ibmmqmet are you trying against the bluemix beta? That's when I'm seeing this error, not against my local

ibmmqmet (Fri, 28 Jul 2017 15:33:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6MPPRnH6FAYk3DTbc) @pschnap Yes - HSBN 1.0 beta

pschnap (Fri, 28 Jul 2017 15:35:34 GMT):
@ibmmqmet I told one of the bluemix team members about the issue; they said they'd had the same thing happen when they were hosting the hyperledger beta release and will look into it

bgaisford (Fri, 28 Jul 2017 17:53:58 GMT):
Has joined the channel.

harsha (Sat, 29 Jul 2017 03:57:10 GMT):
Has left the channel.

rishabh1102 (Sat, 29 Jul 2017 09:23:58 GMT):
Hey all, on running the client app with the java sdk, I'm gettig logging like this: ----------------INBOUND-------------------- [id: 0xedfbe918, L:/192.168.122.55:40654 - R:/192.168.122.55:7051] HEADERS: streamId=5, headers=GrpcHttp2ResponseHeaders[:status: 200, content-type: application/grpc], padding=0, endStream=false ------------------------------------ 2017-07-29 09:19:19,371 DEBUG NettyClientHandler:147 - ----------------INBOUND-------------------- [id: 0xedfbe918, L:/192.168.122.55:40654 - R:/192.168.122.55:7051] DATA: streamId=5, padding=0, endStream=false, length=1016, bytes=00000003f30801220d08c80112024f4b1a04313939392ab5010a20d184e12b9e41c35946cd5bf2d37dac901c6aa8b9e51bc56cc3bcdbdec11289d61290010a38...

rishabh1102 (Sat, 29 Jul 2017 09:24:09 GMT):
Is there any way I can disable it?

smita0709 (Mon, 31 Jul 2017 05:08:53 GMT):
Hello, When will fabric sdk java v1.0.1 be released?

Farit (Mon, 31 Jul 2017 08:54:39 GMT):
Has joined the channel.

clempo (Mon, 31 Jul 2017 16:10:56 GMT):
I'm getting this error from the EventHub connection. Is this normal behavior for the EventHub? If so, why is this an error on the client side?

clempo (Mon, 31 Jul 2017 16:10:57 GMT):
[2017-07-28T21:30:11.172Z] ERROR (XDLog4J) grpc-default-executor-5: [EventHub$1 - onError()] - EventHub:peer0 terminated is false shutdown is false has error UNAVAILABLE org.hyperledger.fabric.sdk.exception.EventHubException: io.grpc.StatusRuntimeException: UNAVAILABLE at org.hyperledger.fabric.sdk.EventHub$1.onError(EventHub.java:208) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426)

wangxinalex (Mon, 31 Jul 2017 16:14:47 GMT):
Has joined the channel.

kelvinzhong (Tue, 01 Aug 2017 02:09:20 GMT):
@rickr @clempo same problem, every time restart the peer container, we have to reconstruct the Channel in sdk, otherwise could not get the evenhub

Ashish (Tue, 01 Aug 2017 08:32:34 GMT):
Hi All, EndToEndIT has a code like this below ``` SampleUser peerOrgAdmin = sampleStore.getMember(sampleOrgName + "Admin", sampleOrgName, sampleOrg.getMSPID(), findFileSk(Paths.get(testConfig.getTestChannlePath(), "crypto-config/peerOrganizations/", sampleOrgDomainName, format("/users/Admin@%s/msp/keystore", sampleOrgDomainName)).toFile()), Paths.get(testConfig.getTestChannlePath(), "crypto-config/peerOrganizations/", sampleOrgDomainName, format("/users/Admin@%s/msp/signcerts/Admin@%s-cert.pem", sampleOrgDomainName, sampleOrgDomainName)).toFile()); sampleOrg.setPeerAdmin(peerOrgAdmin); //A special user that can create channels, join peers and install chaincode```

Ashish (Tue, 01 Aug 2017 08:34:45 GMT):
Does this mean that if I write the same code for *User1@org1.example.com*, instead of *Admin@org1.example.com* , would it treat User1@org1.example.com as the Administrator user who can create channels/join peers & install chaincode?

Ashish (Tue, 01 Aug 2017 08:35:59 GMT):
Is it like, one peer need to have only one PeerAdmin ?

CarlXK (Tue, 01 Aug 2017 10:58:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=B3WNT7GAmaq8LDPYv) @clempo same issue , don't know what happened

rishabh1102 (Tue, 01 Aug 2017 11:15:03 GMT):
@here I have an issue, I was using the sdk to query. My Endorsement policy is the following: AND (OR (Org1, Org2), OR(Org2, Org3)). I created a channel using the java sdk and added org1, org2 and org3 to it. Now I switched off org3 and tried to invoke/query. My endorsement policy was fulfilled, but the SDK says the there aren't enough endorsers and so the transaction fails. How can I get around this?

rickr (Tue, 01 Aug 2017 11:38:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=B3WNT7GAmaq8LDPYv) I have not seen this. Can you give some detail steps to recreate.

rickr (Tue, 01 Aug 2017 11:43:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xFkLEoWGvyEnqeysW) Only those credentials (MSPID, private Key, certificate) _Peer Admin_ can do most of the operations. There is another user just Admin which can register other users. That admin and the user's it can register can only query and invoke chaincode.

kelvinzhong (Tue, 01 Aug 2017 11:46:51 GMT):
@rickr construct a channel and save it in the jvm, then restart the fabric node(peer), and use the same channel to invoke, you would find that the invoke is successfully but the channel could not get the eventhub

rickr (Tue, 01 Aug 2017 11:51:15 GMT):
`construct a channel and save it in the jvm` not sure what you mean by this

CarlXK (Tue, 01 Aug 2017 11:53:03 GMT):
cache it , and get it from cache when use it next time

rickr (Tue, 01 Aug 2017 11:54:07 GMT):
Are you recreating the Peer service in docker ?

kelvinzhong (Tue, 01 Aug 2017 11:54:34 GMT):
Channel fooChannel = constructChannel(FOO_CHANNEL_NAME, client, sampleOrg); fooChannel.invoke();//successfully invoke and get the eventhub Thread.sleep(100000);//restart the peer fooChannel.invoke();//successfully invoke but could not get the eventhub

rickr (Tue, 01 Aug 2017 11:54:54 GMT):
If not, that's basically what the End2endAndBackAgainIT does

kelvinzhong (Tue, 01 Aug 2017 11:55:56 GMT):
yes i think 'recreating the Peer service' is what i talking about

kelvinzhong (Tue, 01 Aug 2017 11:55:56 GMT):
yes i think 'recreating the Peer service' is what i'm talking about

rickr (Tue, 01 Aug 2017 12:00:08 GMT):
You can't *recreate* the Peer container services .. It has the ledger and other information. The docker setup does not persist it outside the container environment. You should be able stop and restart the Peer service container, but I have not tested that.

kelvinzhong (Tue, 01 Aug 2017 12:02:31 GMT):
well, might is not recreate but restart

CarlXK (Tue, 01 Aug 2017 12:02:47 GMT):
another problem: even not restart the peer service , below error occured: ``` 08-01 12:00:17.006 DEBUG o.h.f.s.Channel - Channel xnchannel send proposal to peer tcl.org1.xnqkl.com at url grpc://10.0.17.126:7056 08-01 12:00:17.006 DEBUG o.h.f.s.Peer - peer.sendProposalAsync name: tcl.org1.xnqkl.com, url: grpc://10.0.17.126:7056 08-01 12:00:17.031 DEBUG i.n.h.c.h.Http2ConnectionHandler - [id: 0x9a5ccaf1, L:0.0.0.0/0.0.0.0:51950 ! R:/10.0.17.126:7056] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. Forcing shutdown of the connection. java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.write(IOUtil.java:148) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:427) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:777) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:769) at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:750) at io.netty.handler.codec.http2.Http2ConnectionHandler.onError(Http2ConnectionHandler.java:561) at io.grpc.netty.AbstractNettyHandler.exceptionCaught(AbstractNettyHandler.java:99) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:286) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:265) at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:257) at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1301) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:286) ```

CarlXK (Tue, 01 Aug 2017 12:02:47 GMT):
another problem: even not restart the peer service , just wait 20min, below error occured: ``` 08-01 12:00:17.006 DEBUG o.h.f.s.Channel - Channel xnchannel send proposal to peer tcl.org1.xnqkl.com at url grpc://10.0.17.126:7056 08-01 12:00:17.006 DEBUG o.h.f.s.Peer - peer.sendProposalAsync name: tcl.org1.xnqkl.com, url: grpc://10.0.17.126:7056 08-01 12:00:17.031 DEBUG i.n.h.c.h.Http2ConnectionHandler - [id: 0x9a5ccaf1, L:0.0.0.0/0.0.0.0:51950 ! R:/10.0.17.126:7056] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. Forcing shutdown of the connection. java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.write(IOUtil.java:148) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:427) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:777) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:769) at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:750) at io.netty.handler.codec.http2.Http2ConnectionHandler.onError(Http2ConnectionHandler.java:561) at io.grpc.netty.AbstractNettyHandler.exceptionCaught(AbstractNettyHandler.java:99) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:286) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:265) at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:257) at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1301) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:286) ```

CarlXK (Tue, 01 Aug 2017 12:02:47 GMT):
another problem: Deploy the ca/order--host1, peer1/sdk1--host2, peer2/sdk2--host3, peer3/sdk3--host4 Deploy cc cc1, cc2, to peer1 peer2 peer3, install & instantiate, invoke & query. Do not restart the peer service , just wait 20min, below error occured: ``` 08-01 12:00:17.006 DEBUG o.h.f.s.Channel - Channel xnchannel send proposal to peer tcl.org1.xnqkl.com at url grpc://10.0.17.126:7056 08-01 12:00:17.006 DEBUG o.h.f.s.Peer - peer.sendProposalAsync name: tcl.org1.xnqkl.com, url: grpc://10.0.17.126:7056 08-01 12:00:17.031 DEBUG i.n.h.c.h.Http2ConnectionHandler - [id: 0x9a5ccaf1, L:0.0.0.0/0.0.0.0:51950 ! R:/10.0.17.126:7056] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. Forcing shutdown of the connection. java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.write(IOUtil.java:148) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:427) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:777) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:769) at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:750) at io.netty.handler.codec.http2.Http2ConnectionHandler.onError(Http2ConnectionHandler.java:561) at io.grpc.netty.AbstractNettyHandler.exceptionCaught(AbstractNettyHandler.java:99) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:286) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:265) at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:257) at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1301) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:286) ```

kelvinzhong (Tue, 01 Aug 2017 12:02:49 GMT):
stop the container but not remove it

rickr (Tue, 01 Aug 2017 12:07:30 GMT):
@CarlXK I think that's to be expected you have keep alive enabled ?

CarlXK (Tue, 01 Aug 2017 12:08:25 GMT):
how to enable the keep alive?

rickr (Tue, 01 Aug 2017 12:09:35 GMT):
I'll put it on my to do list to try and stop and start the various services.

kelvinzhong (Tue, 01 Aug 2017 12:10:22 GMT):
well i would counting on that:grin:

rickr (Tue, 01 Aug 2017 12:10:27 GMT):
If you're using the end2end code it's enabled for eventhub (peer)

rickr (Tue, 01 Aug 2017 12:10:27 GMT):
If you're using the end2end code keep alive is enabled for eventhub (peer)

CarlXK (Tue, 01 Aug 2017 12:12:47 GMT):
ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000);

CarlXK (Tue, 01 Aug 2017 12:12:47 GMT):
ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); do you mean of these code ?

rickr (Tue, 01 Aug 2017 12:15:03 GMT):
y

CarlXK (Tue, 01 Aug 2017 12:15:39 GMT):
how to make it always alive, set it to zero?

rickr (Tue, 01 Aug 2017 12:16:05 GMT):
just comment out those lines if you don't want it

CarlXK (Tue, 01 Aug 2017 12:18:30 GMT):
we don't add these code now

rickr (Tue, 01 Aug 2017 12:24:03 GMT):
_Off the bat_ I can't imagine anything on the client side why it wouldn't be able to reconnect to a service. It holds no state information other than how to reconnect. If it's not reconnecting and working after a service restart I have to think it's restarting the service in the docker environment is where the issue is.

kelvinzhong (Tue, 01 Aug 2017 12:27:00 GMT):
the client could still send the transaction to the peer/orderer but,the eventhub seems could not reconnect to the client

rickr (Tue, 01 Aug 2017 12:27:41 GMT):
k will investigate

CarlXK (Tue, 01 Aug 2017 12:29:22 GMT):
yes, the client should be hold no state information, so it seems it is docker service's issue

CarlXK (Tue, 01 Aug 2017 12:29:22 GMT):
yes, the client should be hold no state information, so it seems it is docker service's issue but now how to fix that?

clempo (Tue, 01 Aug 2017 13:06:03 GMT):
In my case, the peers, orderers, and event hubs are still running. You get the error after a long period of inactivity without any transactions. I pass null for the set of properties when I reconstruct the peers, orderers and event hubs. Maybe keepAlive is turned off by default.

clempo (Tue, 01 Aug 2017 13:06:52 GMT):
I suspect to avoid the timeout, I would need to set keepAliveTime.

clempo (Tue, 01 Aug 2017 13:07:43 GMT):
What is the expected behavior if keepAliveTimeout is reached and causes the timeout? Are you reconnecting or that's the end of this reconstructed channel?

rickr (Tue, 01 Aug 2017 13:08:05 GMT):
long period of inactivity := ?

clempo (Tue, 01 Aug 2017 13:09:00 GMT):
never measured it. Let's say 1h, but it could be 8 min.

rickr (Tue, 01 Aug 2017 13:09:32 GMT):
The event hub maybe a client issue as it tries to do automatic reconnects - I did try this a long time ago and seen it working but not recently

clempo (Tue, 01 Aug 2017 13:10:07 GMT):
So far, I believe it reconnects

clempo (Tue, 01 Aug 2017 13:10:32 GMT):
I just learned about the keep alive props

clempo (Tue, 01 Aug 2017 13:11:45 GMT):
Originally, I thought the behavior was normal and this should not be an error, now I'm not so sure.

clempo (Tue, 01 Aug 2017 13:15:17 GMT):
I'm a bit confused for the need of a keepAliveTimeout on the client side of a permanent connection

clempo (Tue, 01 Aug 2017 13:15:56 GMT):
why would the client disconnect to reconnect and risk losing some events in between

clempo (Tue, 01 Aug 2017 13:16:49 GMT):
similarly, on the event hub side, why would it disconnect if there were no events to report for a while

clempo (Tue, 01 Aug 2017 13:17:17 GMT):
that's not the client side's fault

CarlXK (Tue, 01 Aug 2017 13:40:42 GMT):
@rickr i set properties to orderer & eventhub in sdk Properties properties = new Properties(); properties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {30L, TimeUnit.SECONDS}); properties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}) got below error: ``` 08-01 13:37:15.894 DEBUG o.h.f.s.Channel - Channel xnchannel sending transaction to orderer(s) with TxID 8978dad165d2032926ddbca7070c257bdd98a4409a5818a5b867937cc92b4c8a 08-01 13:37:15.895 DEBUG o.h.f.s.Orderer - Order.sendTransaction name: orderer.xnqkl.com, url: grpc://172.18.173.191:7050 08-01 13:37:15.897 ERROR i.n.h.c.h.DefaultHttp2Connection - Caught Throwable from listener onStreamActive. java.lang.IllegalArgumentException: delay: -205431781801 (expected: >= 0) at io.netty.util.concurrent.AbstractScheduledEventExecutor.schedule(AbstractScheduledEventExecutor.java:138) at io.netty.util.concurrent.AbstractScheduledEventExecutor.schedule(AbstractScheduledEventExecutor.java:29) at io.grpc.internal.KeepAliveManager.onTransportActive(KeepAliveManager.java:202) at io.grpc.netty.NettyClientHandler$1.onStreamActive(NettyClientHandler.java:211) at io.netty.handler.codec.http2.DefaultHttp2Connection$ActiveStreams.addToActiveStreams(DefaultHttp2Connection.java:1212) at io.netty.handler.codec.http2.DefaultHttp2Connection$ActiveStreams.activate(DefaultHttp2Connection.java:1159) at io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultStream.activate(DefaultHttp2Connection.java:538) at io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultEndpoint.createStream(DefaultHttp2Connection.java:961) at io.netty.handler.codec.http2.DefaultHttp2Connection$DefaultEndpoint.createStream(DefaultHttp2Connection.java:868) at io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.writeHeaders(DefaultHttp2ConnectionEncoder.java:158) at io.netty.handler.codec.http2.DecoratingHttp2FrameWriter.writeHeaders(DecoratingHttp2FrameWriter.java:52) at io.netty.handler.codec.http2.StreamBufferingEncoder.writeHeaders(StreamBufferingEncoder.java:157) at io.netty.handler.codec.http2.StreamBufferingEncoder.writeHeaders(StreamBufferingEncoder.java:141) at io.grpc.netty.NettyClientHandler.createStream(NettyClientHandler.java:426) at io.grpc.netty.NettyClientHandler.write(NettyClientHandler.java:240) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:739) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:731) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:817) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:724) at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1022) at io.netty.channel.AbstractChannel.write(AbstractChannel.java:291) at io.grpc.netty.WriteQueue.flush(WriteQueue.java:127) at io.grpc.netty.WriteQueue.access$000(WriteQueue.java:47) at io.grpc.netty.WriteQueue$1.run(WriteQueue.java:59) at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ```

clempo (Tue, 01 Aug 2017 13:57:19 GMT):
@CarlXK The IllegalArgumentException might be trying to tell you the value of the two properties are inverted.

clempo (Tue, 01 Aug 2017 13:58:10 GMT):
There is no point in sending a keep alive message after 30 sec if you timeout after 8 sec

clempo (Tue, 01 Aug 2017 13:58:52 GMT):
@rickr, that exception message coule be improved though

clempo (Tue, 01 Aug 2017 13:58:52 GMT):
@rickr, that exception message could be improved though

CarlXK (Tue, 01 Aug 2017 14:01:20 GMT):
properties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {1L, TimeUnit.MINUTES}); properties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}) change it to 1 min to retry

clempo (Tue, 01 Aug 2017 14:03:14 GMT):
@carlXX, you made the gap even bigger. If I'm right, that will not help at all.

clempo (Tue, 01 Aug 2017 14:04:20 GMT):
The way I read this is: disconnect after 8 sec of inactivity

clempo (Tue, 01 Aug 2017 14:04:45 GMT):
I'm guessing, but that's the only way it makes sense to me

CarlXK (Tue, 01 Aug 2017 14:08:04 GMT):
you means it will disconnect after 8 seconds and only keep 1 min alive ?

CarlXK (Tue, 01 Aug 2017 14:08:04 GMT):
you means it will disconnect after 8 seconds and only keep 1 min alive ? @clempo

clempo (Tue, 01 Aug 2017 14:16:41 GMT):
I'm just guessing, but the way I read this is: send a keep alive message every 1min, disconnect if there is 8 sec of inactivity (including no keep alive messages)

clempo (Tue, 01 Aug 2017 14:16:57 GMT):
so it always disconnects

clempo (Tue, 01 Aug 2017 14:17:36 GMT):
experiment both ways to see if I'm right

CarlXK (Tue, 01 Aug 2017 14:20:19 GMT):
maybe , i will only set the grpc.NettyChannelBuilderOption.keepAliveTime to 15s

clempo (Tue, 01 Aug 2017 14:21:54 GMT):
I set my keepAliveTime to 4 min, and no timeout, but I did not try it yet

clempo (Tue, 01 Aug 2017 14:22:13 GMT):
my previous explanation also does not make sense

clempo (Tue, 01 Aug 2017 14:22:43 GMT):
maybe the way it works is: send a keep alive message every 1min, disconnect if there is 8 sec of inactivity (including no keep alive messages RESPONSES)

clempo (Tue, 01 Aug 2017 14:22:43 GMT):
maybe the way it works is: send a keep alive message every 1min, disconnect if there is 8 sec of inactivity (including no keep alive message RESPONSES)

rickr (Tue, 01 Aug 2017 14:43:21 GMT):
The only reason I know to date to use keep alive feature is if you are connecting through something like a load balancer that kills connections if it detects no activity.

CarlXK (Tue, 01 Aug 2017 15:29:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=c5fQRamCP8tR3tLwp) @clempo set grpc.NettyChannelBuilderOption.keepAliveTime to 4mins is ok now , thanks a lot~

CarlXK (Tue, 01 Aug 2017 15:29:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=c5fQRamCP8tR3tLwp) @clempo set grpc.NettyChannelBuilderOption.keepAliveTime to 4mins is ok now , thanks a lot~ still got the exception but does not affect the use ``` 08-01 15:38:00.897 ERROR i.n.h.c.h.DefaultHttp2Connection - Caught Throwable from listener onStreamActive. java.lang.IllegalArgumentException: delay: -523587550241 (expected: >= 0) at io.netty.util.concurrent.AbstractScheduledEventExecutor.schedule(AbstractScheduledEventExecutor.java:138) at io.netty.util.concurrent.AbstractScheduledEventExecutor.schedule(AbstractScheduledEventExecutor.java:29) at io.grpc.internal.KeepAliveManager.onTransportActive(KeepAliveManager.java:202) at io.grpc.netty.NettyClientHandler$1.onStreamActive(NettyClientHandler.java:211) ```

CarlXK (Tue, 01 Aug 2017 15:30:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6naaPxR9bi2gyKjL3) @rickr seems that grpc clients and server need keep alive

rickr (Tue, 01 Aug 2017 21:57:50 GMT):
What happens if you don't set the keep alive ?

CarlXK (Wed, 02 Aug 2017 00:10:15 GMT):
@rickr if don't set the keep alive , event hub lost the connection very fast but now , the event hub also can't receive message , maybe the time is not set right

berserkr (Wed, 02 Aug 2017 03:23:56 GMT):
Has joined the channel.

berserkr (Wed, 02 Aug 2017 03:30:30 GMT):
has the java client been integrated with android?

berserkr (Wed, 02 Aug 2017 03:30:40 GMT):
or does anyone have any experience I could leverage?

Ashish (Wed, 02 Aug 2017 04:51:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tqtEKJR4bQ6xiX8w6) @rickr Thank you Rick,

MoulaliMvg (Wed, 02 Aug 2017 06:20:42 GMT):
Has joined the channel.

Ashish (Wed, 02 Aug 2017 06:27:41 GMT):
I started the CA instance in HTTPS mode by specifying the following.. ``` -e FABRIC_CA_SERVER_TLS_ENABLED=true -e FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem -e FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/b2a5e1d23e0145697c3a4cfa94fef364eb5a94db0534aba157a2e3257a830d9b_sk ```

Ashish (Wed, 02 Aug 2017 06:29:07 GMT):
Then was trying to enroll as below ```HFCAClient hfca = HFCAClient.createNewInstance("https://xxx.xxx.xxx.xxx:7002", props); hfca.setCryptoSuite(crypto); admin = new UserImpl("admin", "org1"); if (!admin.isEnrolled()) { HFCAEnrollment hfcaEnrlMnt = (HFCAEnrollment) hfca.enroll(admin.getName(), "adminpw");```

Ashish (Wed, 02 Aug 2017 06:29:30 GMT):
But its always ending up in the Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Ashish (Wed, 02 Aug 2017 06:29:30 GMT):
But its always ending up in the *Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty*

Ashish (Wed, 02 Aug 2017 06:29:30 GMT):
But its always ending up in the *Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty* And the server console prints *2017/08/02 07:18:59 http: TLS handshake error from :62942: remote error: tls: internal error*

Ashish (Wed, 02 Aug 2017 06:29:30 GMT):
But its always ending up in the ``` SEVERE: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ``` And the server console prints *2017/08/02 07:18:59 http: TLS handshake error from :62942: remote error: tls: internal error*

Ashish (Wed, 02 Aug 2017 06:30:42 GMT):
I tried importing the server certificate into a trust store which i created.. keytool -import -v -trustcacerts -alias ClientAlias -file *ca.org1.example.com-cert.pem* -keystore client.jks

Ashish (Wed, 02 Aug 2017 06:31:07 GMT):
and referring to the same in the main of my ca-client..

Ashish (Wed, 02 Aug 2017 06:32:16 GMT):
``` System.getProperties().setProperty("javax.net.ssl.trustStore","\client.jks"); System.getProperties().setProperty("javax.net.ssl.keyStore","\\client.jks"); System.getProperties().setProperty("javax.net.ssl.keyStorePassword","ashish"); System.getProperties().setProperty("javax.net.ssl.keyStoreType","JKS"); ```

Ashish (Wed, 02 Aug 2017 06:32:24 GMT):
but still error is the same.

Ashish (Wed, 02 Aug 2017 06:32:53 GMT):
Can you folks help?

Andrei_Kogun (Wed, 02 Aug 2017 08:30:11 GMT):
Has joined the channel.

Ashish (Wed, 02 Aug 2017 08:53:58 GMT):
Handshake fails with the error. *Host name '192.168.1.5' does not match the certificate subject provided by the peer (CN=ca.org1.example.com, O=org1.example.com, L=San Francisco, ST=California, C=US)*

Ashish (Wed, 02 Aug 2017 08:54:13 GMT):
should i generate the crypto by specifying the ip addresses ?

Ashish (Wed, 02 Aug 2017 08:57:51 GMT):
Oh, my bad. It works with ```props.setProperty("allowAllHostNames", "true");```

munireddya (Wed, 02 Aug 2017 10:12:03 GMT):
Hi I new to blockchain

munireddya (Wed, 02 Aug 2017 10:12:35 GMT):
Suppose if a want to store any docment how I can store?

munireddya (Wed, 02 Aug 2017 10:13:17 GMT):
using hyperledger

dave.enyeart (Wed, 02 Aug 2017 10:43:47 GMT):
@munireddya Hyperledger Fabric uses a key/value model to store things in the ledger. The chaincode API to store something on the ledger is `PutState(key string, value []byte)`. The document bytes can be passed to the chaincode invoke function, and then stored in ledger with PutState().

munireddya (Wed, 02 Aug 2017 11:15:11 GMT):
@dave.enyeart is there any size limit to store data...because doc size may be in MBs..

dave.enyeart (Wed, 02 Aug 2017 11:33:04 GMT):
@munireddya There are some known problems with larger data sizes, which is being worked and intended to be fixed. You can follow the latest status at https://jira.hyperledger.org/browse/FAB-5049

rickr (Wed, 02 Aug 2017 12:30:03 GMT):
@CarlXK @clempo I found a small timing window that caused the eventhub to stop make retries. I'm working on a fix to that. Mostly, the scenario I've tested is in End2endIT.java that I put a minute sleep between instantiate chaincode and the invoke move operation. During the sleep I'd stop and restart all services in the Fabric. You'll see errors logged as the eventhub continues to try and connect when the services are down... I'm going with that's working as designed. This issue I talked of would not have affected stopping the client, and then stopping all the Fabric services, restarting the Fabric services , then starting and reconnecting the client. I tested that between End2endIT and End2endAndBackAgainIT -- I seen no issues on for this. I also removed all the grpc Keep alive setting and put a sleep gap in End2endIT.java as above but for an hour wait with no restarting the Fabric services .. I seen no errors in this case. This is all on the same system. Once again, I think the only issue grpc keep alives are needed are for the load balancer issue.

CarlXK (Wed, 02 Aug 2017 12:35:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iTDQ9W7Gahw9Jm94J) @rickr even add the keepalive property, eventhub also can't receive the message after mins(about 20) wait, now i generate a new channel object every 10 mins if there have no transcations

rickr (Wed, 02 Aug 2017 12:40:08 GMT):
Sorry not sure I'm following your scenario

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 13:54:11 GMT):

Message Attachments

CarlXK (Wed, 02 Aug 2017 14:08:18 GMT):
@rickr if possible, you can reproduce the scenario and sometimes got below error ``` Http2ConnectionHandler - [id: 0x714e2be0, L:0.0.0.0/0.0.0.0:52594 ! R:/172.18.173.192:7058] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. ```

rickr (Wed, 02 Aug 2017 14:50:00 GMT):
no -- can you reproduce it by someway modifying the integration tests provided ?

gauthampamu (Wed, 02 Aug 2017 15:27:51 GMT):
I have a questions on Java SDK. Read the documentation on the page. https://github.com/hyperledger/fabric-sdk-java I wanted to check if there are any limitations or issues with java SDK. Is it stable ? I wanted to find out how many members currently using Java SDK with v1.0 fabric.

gauthampamu (Wed, 02 Aug 2017 15:27:51 GMT):
I have a question on Java SDK. Read the documentation on the page. https://github.com/hyperledger/fabric-sdk-java I wanted to check if there are any limitations or issues with java SDK. Is it stable ? I wanted to find out how many members currently using Java SDK with v1.0 fabric.

scupyr (Wed, 02 Aug 2017 15:32:00 GMT):
Has joined the channel.

CarlXK (Wed, 02 Aug 2017 15:37:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zp9ChvBGkBh8iyZo4) @rickr i will try to prepare the environment , but not so fast

pschnap (Wed, 02 Aug 2017 18:58:56 GMT):
In the End2endIT test, there's an Org admin user and a Peer Org admin -- why two users? Aren't they synonymous?

Senthil1 (Thu, 03 Aug 2017 03:18:43 GMT):
@rickr In this CR https://gerrit.hyperledger.org/r/#/c/12099/ we are getting an error with e2e sdk integration. In `End2endIT.java`, channel creation, chaincode install & instantiate, invoke and query succeeded. We get the following error when the test try to call `QSCC` to get block info. ```End2endIT.setup:193->runChannel:539 Test failed with error : queryBlockchainInfo peer peer0.org1.example.com channel foo error Unable to query block channel info for channel foo from peer peer0.org1.example.com with message Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=proto: Marshal called with nil, cause=null}``` Can you help us in identifying the root cause of this error?

Senthil1 (Thu, 03 Aug 2017 03:18:43 GMT):
@rickr In this CR https://gerrit.hyperledger.org/r/#/c/12099/ we are getting an error with e2e sdk integration. In `End2endIT.java`, channel creation, chaincode install & instantiate, invoke and query succeeded. We get the following error when the test try to call `QSCC` to get block info. ```End2endIT.setup:193->runChannel:539 Test failed with error : queryBlockchainInfo peer peer0.org1.example.com channel foo error Unable to query block channel info for channel foo from peer peer0.org1.example.com with message Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=proto: Marshal called with nil, cause=null}``` Can you help us in identifying the root cause of this error?

a442941609 (Thu, 03 Aug 2017 04:20:30 GMT):
Has joined the channel.

smallX (Thu, 03 Aug 2017 05:02:30 GMT):
Has joined the channel.

smallX (Thu, 03 Aug 2017 06:19:57 GMT):
client: `New chain foo error. StatusValue 400. Status BAD_REQUEST`

smallX (Thu, 03 Aug 2017 06:19:57 GMT):
server: ```

smallX (Thu, 03 Aug 2017 06:19:57 GMT):
server: ``` 2017-08-03 06:02:26.137 UTC [cauthdsl] func2 -> ERRO 41e Principal deserialization failed: (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")) for identity [10 7 79 114 103 49 77 83 80 18 178 6 45 45 45 45 45 66 69 71 73 78 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10 77 73 73 67 76 106 67 67 65 100 83 103 65 119 73 66 65 103 73 81 68 103 90 106 50 52 105 83 78 66 122 106 78 48 90 43 116 113 72 66 101 84 65 75 66 103 103 113 104 107 106 79 80 81 81 68 65 106 66 122 77 81 115 119 10 67 81 89 68 86 81 81 71 69 119 74 86 85 122 69 84 77 66 69 71 65 49 85 69 67 66 77 75 81 50 70 115 97 87 90 118 99 109 53 112 89 84 69 87 77 66 81 71 65 49 85 69 66 120 77 78 85 50 70 117 73 69 90 121 10 89 87 53 106 97 88 78 106 98 122 69 90 77 66 99 71 65 49 85 69 67 104 77 81 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 69 99 77 66 111 71 65 49 85 69 65 120 77 84 89 50 69 117 10 98 51 74 110 77 83 53 108 101 71 70 116 99 71 120 108 76 109 78 118 98 84 65 101 70 119 48 120 78 122 65 50 77 84 81 119 77 122 69 49 77 122 82 97 70 119 48 121 78 122 65 50 77 84 73 119 77 122 69 49 77 122 82 97 10 77 70 115 120 67 122 65 74 66 103 78 86 66 65 89 84 65 108 86 84 77 82 77 119 69 81 89 68 86 81 81 73 69 119 112 68 89 87 120 112 90 109 57 121 98 109 108 104 77 82 89 119 70 65 89 68 86 81 81 72 69 119 49 84 10 89 87 52 103 82 110 74 104 98 109 78 112 99 50 78 118 77 82 56 119 72 81 89 68 86 81 81 68 68 66 90 66 90 71 49 112 98 107 66 118 99 109 99 120 76 109 86 52 89 87 49 119 98 71 85 117 89 50 57 116 77 70 107 119 10 69 119 89 72 75 111 90 73 122 106 48 67 65 81 89 73 75 111 90 73 122 106 48 68 65 81 99 68 81 103 65 69 43 112 98 98 110 51 77 106 111 57 55 53 99 109 121 109 101 57 99 73 75 79 116 84 90 52 67 118 99 73 74 81 10 120 68 71 112 98 83 75 71 90 55 115 67 70 109 110 117 117 118 119 104 67 43 115 66 78 97 83 110 102 47 103 79 65 118 43 81 111 98 87 106 43 43 119 107 81 111 106 48 53 57 69 85 108 75 78 105 77 71 65 119 68 103 89 68 10 86 82 48 80 65 81 72 47 66 65 81 68 65 103 87 103 77 66 77 71 65 49 85 100 74 81 81 77 77 65 111 71 67 67 115 71 65 81 85 70 66 119 77 66 77 65 119 71 65 49 85 100 69 119 69 66 47 119 81 67 77 65 65 119 10 75 119 89 68 86 82 48 106 66 67 81 119 73 111 65 103 112 55 67 109 90 80 99 103 90 121 81 121 85 43 114 102 56 73 47 70 57 56 102 78 84 72 114 106 88 53 86 90 90 99 85 73 106 67 80 108 48 79 81 119 67 103 89 73 10 75 111 90 73 122 106 48 69 65 119 73 68 83 65 65 119 82 81 73 104 65 74 71 83 80 119 116 100 102 71 70 70 107 50 87 119 83 74 57 75 71 99 104 75 115 82 102 71 43 100 83 99 116 88 43 99 110 99 115 77 105 88 74 80 10 65 105 65 106 47 52 83 75 66 78 66 43 55 48 117 99 90 86 97 83 55 117 118 86 54 86 72 49 116 67 56 43 100 74 107 115 47 102 106 106 117 49 101 67 119 81 61 61 10 45 45 45 45 45 69 78 68 32 67 69 82 84 73 70 73 67 65 84 69 45 45 45 45 45 10] orderer.example.com | 2017-08-03 06:02:26.137 UTC [cauthdsl] func2 -> DEBU 41f Principal evaluation fails: (&{0}) [false] orderer.example.com | 2017-08-03 06:02:26.137 UTC [cauthdsl] func1 -> DEBU 420 Gate evaluation fails: (&{n:1 policies: }) orderer.example.com | 2017-08-03 06:02:26.137 UTC [orderer/common/broadcast] Handle -> WARN 421 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining ```

smallX (Thu, 03 Aug 2017 06:19:57 GMT):
how to fix it

smallX (Thu, 03 Aug 2017 06:24:32 GMT):
0.0

yoyokeen (Thu, 03 Aug 2017 06:59:00 GMT):
Has joined the channel.

deepakvparmar (Thu, 03 Aug 2017 12:43:56 GMT):
Has joined the channel.

rickr (Thu, 03 Aug 2017 12:44:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=p9kcyiXqXe5qj8GER) End2end tests with no modifications ? Happens consistently ? Running against same level of Fabric ?

deepakvparmar (Thu, 03 Aug 2017 12:44:41 GMT):
Hi, I am getting following error while running integration tests : 2017-08-03 12:40:49,002 WARN SampleStore:75 - Could not find the file "C:\Users\IBM_AD~1\AppData\Local\Temp\HFCSampletest.properties" from where i can get HFCSampletest.properties file.

rickr (Thu, 03 Aug 2017 12:45:18 GMT):
That should not be an issue

rickr (Thu, 03 Aug 2017 12:47:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=82A5Bn7usZsJ2PAnJ) Almost always means the code is using the identity when you set the user context. Make sure user has correct mspid, private key, and certificate.

rickr (Thu, 03 Aug 2017 12:49:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xq8Ekdzwfsevq62X4) Org admin can register new user to invoke CC. Peer Org admin constructs the channel.

deepakvparmar (Thu, 03 Aug 2017 12:54:52 GMT):
It's novice question, but not able to understand why do we need to sync following folder into vagrant file in order to test fabric-sdk-java? config.vm.synced_folder "C:/Deepak/projects/btmu/gitsrc/fabric-sdk-java/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration"

Senthil1 (Thu, 03 Aug 2017 13:14:39 GMT):
@rickr We haven't modified End2endIT test. Without SideDB CR, this test works fine. With our CR, it fails consistently in GetChainInfo on QSCC. As it works with other CR, SideDB could be introducing this error.

Senthil1 (Thu, 03 Aug 2017 13:14:39 GMT):
@rickr We haven't modified End2endIT test. Without SideDB CR, this test works fine. With our CR, it fails consistently (in my local vagrant setup) in GetChainInfo on QSCC. As it works with other CR, SideDB could be introducing this error.

Senthil1 (Thu, 03 Aug 2017 13:14:39 GMT):
@rickr We haven't modified End2endIT test. Without SideDB CR, this test works fine. With our CR, it fails consistently (in my local vagrant setup) in GetChainInfo on QSCC. As it works with other CR, SideDB could be introducing this error. With CLI, GetChainInfo on QSCC with SideDB CR works. We have updated protos/ledger/rwset in SideDB CR. Though java SDK uses old proto, It should be the reason for this error.

Senthil1 (Thu, 03 Aug 2017 13:14:39 GMT):
@rickr We haven't modified End2endIT test. Without SideDB CR, this test works fine. With our CR, it fails consistently (in my local vagrant setup) in GetChainInfo on QSCC. As it works with other CR, SideDB could be introducing this error. With CLI, GetChainInfo on QSCC with our CR works. We have updated protos/ledger/rwset. Though java SDK uses old proto, It should be the reason for this error.

Senthil1 (Thu, 03 Aug 2017 13:15:16 GMT):
I tested in my vagrant environment.

clempo (Thu, 03 Aug 2017 14:23:23 GMT):
I would like to implement asynchronous processing of transactions. Channel.sendTransaction() returns a Future so I can go on and do other things, but when I wait on the Future, I become synchronous again. A better approach would be to listen on the BlockEvents like the SDK does and trigger a callback. I'm struggling to make this thread safe because I need to register my interest on a transactionID before we send the transaction. I could duplicate the code that computes the transactionID in the SDK, but that assumes internal knowledge that could change at any time. How can we achieve fully asynchronous processing in the SDK v1.0.0 and how could we make it easier in future versions?

rishabh1102 (Thu, 03 Aug 2017 15:20:20 GMT):
Guys, What exactly happens during Gossip time?

rishabh1102 (Thu, 03 Aug 2017 15:20:58 GMT):
In the java SDK, we have to set a parameter called GOSSIPTIME, anyone know about it in proper detail?

rishabh1102 (Thu, 03 Aug 2017 15:21:22 GMT):
because it seems to have some sort of parallelism

DeutscheBahn-BlockchainDev (Thu, 03 Aug 2017 15:25:44 GMT):
dear all, do you know how to use the Java SDK to listen on BlockEvents which are sent by the chaincode?

clempo (Thu, 03 Aug 2017 15:36:16 GMT):
@DeutscheBahn-BlockchainDev, use channel.registerBlockListener()

DeutscheBahn-BlockchainDev (Thu, 03 Aug 2017 15:43:43 GMT):
hi @cel

DeutscheBahn-BlockchainDev (Thu, 03 Aug 2017 15:43:57 GMT):
hi @clempo thanks a lot!

DeutscheBahn-BlockchainDev (Thu, 03 Aug 2017 15:44:07 GMT):
do you have any code snipplet by any chance? Thanks

DeutscheBahn-BlockchainDev (Thu, 03 Aug 2017 15:48:38 GMT):
how is it related with the EventHubs?

clempo (Thu, 03 Aug 2017 15:59:15 GMT):
@DeutscheBahn-BlockchainDev, strangely, this API is not tested in the junits. It's easy, you implement the BlockListener interface, create an instance of your listener, and pass it to channel.registerBlockListener(mylistener)

DeutscheBahn-BlockchainDev (Thu, 03 Aug 2017 16:03:13 GMT):
thanks, will give it a try and see how it works :)

Dibri (Thu, 03 Aug 2017 16:03:22 GMT):
Has joined the channel.

Dibri (Thu, 03 Aug 2017 16:08:27 GMT):
Hello everyone, I don't know if it's the right chat. But I have problem to understand how to configure the Hyperledger blockchain network to connect a java program using the java SDK. There are some good tutorial that can show me how to do the right configuration of the network and then connect an java client application? Thanks

clempo (Thu, 03 Aug 2017 16:09:14 GMT):
@Dibri, look at End2endIT and End2endAndBackAgainIT

Dibri (Thu, 03 Aug 2017 16:11:23 GMT):
Thank you

clempo (Thu, 03 Aug 2017 16:12:58 GMT):
@deepakvparmar, because you already reserved the ports in vagrant, you need to run the sdkintegration tests within vagrant otherwise the ports will look busy when vagrant is running

rickr (Thu, 03 Aug 2017 17:23:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tEgbFBgErYZDJgc4y) The only mention of gossip is GOSSIPWAITTIME in TestConfig.java .. that's dead code and cleaning it up. GOSSIP should be totally transparent to and SDK.

rickr (Thu, 03 Aug 2017 17:32:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qaHXgaxeFdhCtMs22) I don't follow a Future is in essence a callback

clempo (Thu, 03 Aug 2017 17:49:07 GMT):
@rickr, A Future is a callback you have to wait on, that takes a thread, hence you are synchronous at that point.

clempo (Thu, 03 Aug 2017 17:49:53 GMT):
It's better to have the listener be the only thread that waits

clempo (Thu, 03 Aug 2017 17:50:24 GMT):
(listener here is a generic term, not one of your data types)

rickr (Thu, 03 Aug 2017 17:55:43 GMT):
Look at End2endAndBackAgainIT see how futures are chained together and even in a a function `moveAmount`

clempo (Thu, 03 Aug 2017 17:56:22 GMT):
Show me how to wait on two futures on the same thread

clempo (Thu, 03 Aug 2017 17:58:39 GMT):
I believe your listener calls back the Future, but that does not call back the app

clempo (Thu, 03 Aug 2017 17:59:54 GMT):
I either need to know the transaction ID of interest before sending the transaction, or I need the SDK listener to callback my app, this could be my own Future for example

clempo (Thu, 03 Aug 2017 18:15:07 GMT):
I just noticed the ProposalWaitTime has the problem I'm talking about. The waitTimes are cumulative since each proposal is waiting sequentially and the timeout is full value for each

rickr (Thu, 03 Aug 2017 18:16:19 GMT):
I just hacked this together without any testing maybe issues but think I could get it to work .. ``` List waitOnFutures(List> futures) throws InterruptedException { List ret = new ArrayList<>(futures.size()); final CountDownLatch finishLatch = new CountDownLatch(futures.size()); for (CompletableFuture future : futures) { future.thenApply(transactionEvent -> { ret.add(transactionEvent); finishLatch.countDown(); return null; }); } finishLatch.await(); return ret; }```

rickr (Thu, 03 Aug 2017 18:17:20 GMT):
Probably better solutions out there

clempo (Thu, 03 Aug 2017 18:17:35 GMT):
I need to study thenApply()

clempo (Thu, 03 Aug 2017 18:18:15 GMT):
do you see the problem with proposalWaitTime in Channel.sendProposalToPeers()

clempo (Thu, 03 Aug 2017 18:27:11 GMT):
Looks like CompletableFuture is what I was looking for, so this takes care of that.

clempo (Thu, 03 Aug 2017 18:30:19 GMT):
the issue with the proposalWaitTime is unrelated.

clempo (Thu, 03 Aug 2017 18:30:46 GMT):
I believe Channel.sendProposalToPeers() will take peers.size() * proposalWaitTime time to execute if all proposals time out

clempo (Thu, 03 Aug 2017 18:40:13 GMT):
It appears Channel.sendTransaction() also has the same problem but this time the messages are ordered req resp req resp... instead of req req req...resp resp resp like the proposals

clempo (Thu, 03 Aug 2017 18:41:50 GMT):
It's fine to implement a timeout per partner connection, but then there should be a timeout for the whole operation

clempo (Thu, 03 Aug 2017 18:42:38 GMT):
I bet the global timeout is what people expect in v1.0.0 but that's not what they get

clempo (Thu, 03 Aug 2017 19:32:20 GMT):
I changed the chaincode src/test/fixture/sdkintegration/gocc/sample1/src/github.com/example_cc/example_cc.go hoping a fresh run of End2endIT would install it but it's not picking up my new file

clempo (Thu, 03 Aug 2017 19:32:53 GMT):
what is the easiest command to check if I made a syntax error in go

clempo (Thu, 03 Aug 2017 19:33:49 GMT):
Could a syntax error explain why my new code is not the one installed?

rickr (Thu, 03 Aug 2017 19:34:18 GMT):
Look at the logs of the chaincode created container

clempo (Thu, 03 Aug 2017 19:35:30 GMT):
I'm not sure I understand this. That probably explains my trouble.

clempo (Thu, 03 Aug 2017 19:36:33 GMT):
is the chaincode created container created before End2endIT runs?

clempo (Thu, 03 Aug 2017 19:37:23 GMT):
I thought End2endIT sent source code

clempo (Thu, 03 Aug 2017 19:37:54 GMT):
then maybe a peer would create a container from the source

clempo (Thu, 03 Aug 2017 19:38:25 GMT):
should I look at the log of a peer?

clempo (Thu, 03 Aug 2017 19:40:02 GMT):
maybe the chaincode is preinstalled and the install in End2endIT is a no-op

clempo (Thu, 03 Aug 2017 20:25:18 GMT):
The log does not say anything

clempo (Thu, 03 Aug 2017 20:25:20 GMT):
docker logs 97eb63799f09 ########### example_cc Init ########### Aval = 500, Bval = 200 ########### example_cc Invoke ########### Aval = 400, Bval = 300 ########### example_cc Invoke ########### Query Response:{"Name":"b","Amount":"300"} ########### example_cc Invoke ###########

clempo (Thu, 03 Aug 2017 20:25:52 GMT):
The last Invoke with no detail is the call to my new action

clempo (Thu, 03 Aug 2017 20:26:15 GMT):
it fails because I'm not running my modified code

clempo (Thu, 03 Aug 2017 20:28:38 GMT):
I read http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html

clempo (Thu, 03 Aug 2017 20:29:15 GMT):
Next I'll have to figure out how the chaincode containers are created and initializated in the samples

sqwerrels (Thu, 03 Aug 2017 21:02:56 GMT):
Are you running the fabric script? Try running ./fabric.sh restart and then running the End2EndIT test again

CarlXK (Fri, 04 Aug 2017 02:00:29 GMT):
@clempo @rickr i use java sdk deploy 2 chaincodes in one channel, step below : 1. install chaincode2 in peer1 2. create the channel1, instantiate chaincode1 in peer1&channel1 3. install chaincode2 in peer1 4. *query if chaincode2 is instantiated, found that chaincode2 is instantiated* it is a bug or there are some mistakes ?

CarlXK (Fri, 04 Aug 2017 02:00:29 GMT):
@clempo @rickr i use java sdk deploy 2 chaincodes in one channel, step below : 1. install chaincode2 in peer1 2. create the channel1, join the peer1 to channel, instantiate chaincode1 in peer1&channel1 3. install chaincode2 in peer1 4. *query if chaincode2 is instantiated, found that chaincode2 is instantiated* it is a bug or there are some mistakes ?

CarlXK (Fri, 04 Aug 2017 02:00:29 GMT):
@clempo @rickr i use java sdk deploy 2 chaincodes in one channel 2hosts; for host1 everything is ok, for the host2 step below : 1. install chaincode2 in peer1 2. create the channel1, join the peer1 to channel, instantiate chaincode1 in peer1&channel1 3. install chaincode2 in peer1 4. *query if chaincode2 is instantiated, found that chaincode2 is instantiated*

liuwenliang0632 (Fri, 04 Aug 2017 03:08:08 GMT):
@CarlXK i think instantiated is Automatic

liuwenliang0632 (Fri, 04 Aug 2017 03:11:04 GMT):
is chaincode2 instantiated in other peer

CarlXK (Fri, 04 Aug 2017 03:12:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=FX8j6jbv7on3hKpMr) @liuwenliang0632 yes, in host1 i install and instantiate the cc1 & cc2, in host2 only can instantiate cc1 , can't instantiate cc2, why?

liuwenliang0632 (Fri, 04 Aug 2017 03:14:06 GMT):
we could speek in twg-china channel with chinese

liuwenliang0632 (Fri, 04 Aug 2017 03:14:06 GMT):
@CarlXK we could speek in twg-china channel with chinese

liuwenliang0632 (Fri, 04 Aug 2017 03:17:20 GMT):
it is a correct process

deepakvparmar (Fri, 04 Aug 2017 04:49:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xcSTHtWPhrAY64jFN) @clempo : Thank You :)

deepakvparmar (Fri, 04 Aug 2017 04:52:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xcSTHtWPhrAY64jFN) @clempo : But, We have forwarded all ports to Host OS as well, will it still create problem?

deepakvparmar (Fri, 04 Aug 2017 04:53:14 GMT):
Can someone who has 1500+ reputation on StackOverflow create tag for "fabric-sdk-java"?

yoyokeen (Fri, 04 Aug 2017 07:31:57 GMT):
ERROR: for configtxlator Cannot start service configtxlator: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"/usr/local/bin/configtxlator\\\": stat /usr/local/bin/configtxlator: no such file or directory\"\n"

yoyokeen (Fri, 04 Aug 2017 07:32:21 GMT):
```root@iZ2ze5v28cpic3ok2o1ux7Z:/opt/gopath/src/github.com/hyperledger/fabric-sdk-java/src/test/fixture/sdkintegration# ll /usr/local/bin/configtxlator lrwxrwxrwx 1 root root 69 Aug 4 15:31 /usr/local/bin/configtxlator -> /opt/gopath/src/github.com/hyperledger/fabric/build/bin/configtxlator*```

yoyokeen (Fri, 04 Aug 2017 07:32:33 GMT):
the file existing

yoyokeen (Fri, 04 Aug 2017 07:41:36 GMT):
2017-08-04 07:19:23,230 main WARN SampleStore:75 - Could not find the file "/tmp/HFCSampletest.properties"

yoyokeen (Fri, 04 Aug 2017 07:42:33 GMT):
exactlly it not existing

yoyokeen (Fri, 04 Aug 2017 07:42:44 GMT):
how to make it?

yoyokeen (Fri, 04 Aug 2017 07:58:10 GMT):
Error: Validation of certificate and key failed: Invalid certificate and/or key in files '/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem' and '/etc/hyperledger/fabric-ca-server-config/fcf776b02a05600408d0be9d9752afc59f64950b721cacb363b5b95a0fea6216_sk': Public key and private key do not match

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 09:47:40 GMT):
Hi @clempo would I receive my custom set chaincode events also as BlockEvents?

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 09:53:20 GMT):
I would generally like to subscribe to custom events I am throwing from my chaincode, I do get he concept of the BlockListener on a particular channel, but does this receive my custom event as a BlockEvent?

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 09:54:17 GMT):
you have stub.setEvent on the chaincode side, is the BlockListener the correct way to receive on the SDK side?

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 12:14:24 GMT):
can we say you are only supporting BlockEvents?

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 12:16:00 GMT):
StreamObserver eventStream = new StreamObserver() { @Override public void onNext(PeerEvents.Event event) { logger.debug(format("EventHub %s got event type: %s", EventHub.this.name, event.getEventCase().name())); if (event.getEventCase() == PeerEvents.Event.EventCase.BLOCK) { try { eventQue.addBEvent(new BlockEvent(EventHub.this, event)); //add to channel queue } catch (InvalidProtocolBufferException e) { EventHubException eventHubException = new EventHubException(format("%s onNext error %s", this, e.getMessage()), e); logger.error(eventHubException.getMessage()); threw.add(eventHubException); } } }

Codegidi (Fri, 04 Aug 2017 12:22:51 GMT):
Has left the channel.

rickr (Fri, 04 Aug 2017 12:46:54 GMT):
There is code pending to handle chaincode events when they're detected in the blocks and a callback to a registered listener, but I don't know when it will be available.

Vadim (Fri, 04 Aug 2017 12:47:39 GMT):
Has joined the channel.

Vadim (Fri, 04 Aug 2017 12:56:53 GMT):
Has left the channel.

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 13:43:50 GMT):
ok, thanks for update

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 13:45:55 GMT):
but you are convinced they are being sent on the chaincode side? for instance by Java chaincode?

DeutscheBahn-BlockchainDev (Fri, 04 Aug 2017 14:02:30 GMT):
do we expect ChaincodeEvents to come as PeerEvents? I can finish the code for our project if these events are populated to the Client SDK

clempo (Fri, 04 Aug 2017 14:27:46 GMT):
It's the result of forwarding that makes the port busy. If you stop vagrant, maybe you can run outside of it. It would make more sense for a production environment. I'm not there yet and I have not tried. [](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nggmu3qpFG7XSZecZ)

eacoeytaux (Fri, 04 Aug 2017 19:55:58 GMT):
Has joined the channel.

clempo (Fri, 04 Aug 2017 20:44:20 GMT):
I am still unsuccessful trying to make End2endIT work with a modified chaincode example_cc.go

clempo (Fri, 04 Aug 2017 20:44:50 GMT):
I used the go compiler to prove my modified example_cc.go file compiles cleanly

clempo (Fri, 04 Aug 2017 20:45:35 GMT):
I ran End2endIT in the debugger, I put a breakpoint where the targz file is created from the source location

clempo (Fri, 04 Aug 2017 20:46:31 GMT):
The debugger tells me the absolute path of the file included in the targz. The path is correct.

clempo (Fri, 04 Aug 2017 20:46:48 GMT):
I use vi to double check the contents at that path. Still correct.

clempo (Fri, 04 Aug 2017 20:47:13 GMT):
End2endIT reports the chaincode installation was successful

clempo (Fri, 04 Aug 2017 20:48:25 GMT):
Can someone explain where the chaincode code comes from if not from the install proposal

clempo (Fri, 04 Aug 2017 20:48:56 GMT):
or any hints on how to continue debug this?

clempo (Fri, 04 Aug 2017 20:48:56 GMT):
or any hints on how to continue debugging this?

rickr (Sat, 05 Aug 2017 21:16:54 GMT):
The shell script `fabric.sh restart` should restart everything and clean out an CC containers. Then running your deployment does it produce a CC docker container ?

rickr (Sat, 05 Aug 2017 21:19:01 GMT):
You need to do both a install and instantiate

rickr (Sat, 05 Aug 2017 21:19:50 GMT):
If that's ok it should produce a CC docker container instance. Should be able to look a it's logs

rickr (Sat, 05 Aug 2017 21:24:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=W5NYdRxr6ksK3BBeR) Not sure what your asking. If you have a linux foundation id should be able to see this delta on roughly what to expect https://gerrit.hyperledger.org/r/#/c/12091/7/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

deepakvparmar (Sun, 06 Aug 2017 07:12:31 GMT):
What is the right way of setting chaincode location while initialzing installChaincodeProposal, setting sourceLoaction or setting inputStream in Production? if (isFooChain) { // on foo chain install from directory. ////For GO language and serving just a single user, chaincodeSource is mostly likely the users GOPATH installProposalRequest.setChaincodeSourceLocation(new File(TEST_FIXTURES_PATH + "/sdkintegration/gocc/sample1")); } else { // On bar chain install from an input stream. installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream( (Paths.get(TEST_FIXTURES_PATH, "/sdkintegration/gocc/sample1", "src", CHAIN_CODE_PATH).toFile()), Paths.get("src", CHAIN_CODE_PATH).toString())); }

Eric.Bui (Sun, 06 Aug 2017 11:08:16 GMT):
Has joined the channel.

rickr (Sun, 06 Aug 2017 14:01:53 GMT):
There is no `right way`. It depends on the use case of the application you want build.

deepakvparmar (Sun, 06 Aug 2017 14:42:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3QdqHvGJKf4JsqCxP) @rickr : Thank You Rick. Can you please explain which one is suitable for which kind of application use case by taking example?

deepakvparmar (Mon, 07 Aug 2017 12:24:07 GMT):
@rickr : I am trying to create channel by taking reference of implementation provided in End2endIT.java, but getting following error , any input or suggestion would be very helpful. Channel example_ee_go error: Expected config block for channel: example_ee_go, but got: foo

lenin.mehedy (Mon, 07 Aug 2017 12:46:35 GMT):
Hi @rickr I have got the following error as my api module runs inside Websphere liberty, which does not support Oracle JDK. Any idea/suggestion? ``` java.lang.NoClassDefFoundError: sun.security.x509.X509CertImpl at io.netty.handler.ssl.util.SelfSignedCertificate.(SelfSignedCertificate.java:149) [netty-handler-4.1.8.Final.jar:4.1.8.Final] at io.netty.handler.ssl.util.SelfSignedCertificate.(SelfSignedCertificate.java:110) [netty-handler-4.1.8.Final.jar:4.1.8.Final] at io.netty.handler.ssl.util.SelfSignedCertificate.(SelfSignedCertificate.java:88) [netty-handler-4.1.8.Final.jar:4.1.8.Final] at io.netty.handler.ssl.util.SelfSignedCertificate.(SelfSignedCertificate.java:79) [netty-handler-4.1.8.Final.jar:4.1.8.Final] at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:148) [netty-handler-4.1.8.Final.jar:4.1.8.Final] at io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:158) [grpc-netty-1.3.0.jar:1.3.0] at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:139) [grpc-netty-1.3.0.jar:1.3.0] at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:109) [grpc-netty-1.3.0.jar:1.3.0] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:143) [fabric-sdk-java-1.0.0-beta.jar:na] at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:152) [fabric-sdk-java-1.0.0-beta.jar:na] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2100) [fabric-sdk-java-1.0.0-beta.jar:na] at org.hyperledger.fabric.sdk.Channel.queryChannels(Channel.java:1800) [fabric-sdk-java-1.0.0-beta.jar:na] at org.hyperledger.fabric.sdk.HFClient.queryChannels(HFClient.java:403) [fabric-sdk-java-1.0.0-beta.jar:na] ```

rickr (Mon, 07 Aug 2017 13:24:53 GMT):
Not sure. I have run with the IBM JDK the integration test suite with no problems.

rickr (Mon, 07 Aug 2017 13:28:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d8foynuFqbbHEP9QP) [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d8foynuFqbbHEP9QP) You'll need to regenerate the channel config block with configtx with the name you want instead of using the IT suites's generated

daygee (Mon, 07 Aug 2017 14:59:06 GMT):
Has joined the channel.

alexcrownus (Mon, 07 Aug 2017 15:00:59 GMT):
Has joined the channel.

sanjay-saxena (Mon, 07 Aug 2017 18:08:20 GMT):
Has joined the channel.

smcambria22 (Mon, 07 Aug 2017 19:48:52 GMT):
Has joined the channel.

FrankShikhaliev (Mon, 07 Aug 2017 20:23:17 GMT):
Has joined the channel.

blockcloud (Tue, 08 Aug 2017 01:07:01 GMT):
@lenin.mehedy It looks like you miss some jar files, like netty-handler-4.1.8.Final.jar and so on...

zaishengming (Tue, 08 Aug 2017 01:48:59 GMT):
hi,@rickr, I have download newest java-sdk-java,fabric,and fabric-ca. I already use make docker on fabric and fabirc-ca in this way.And I already create

zaishengming (Tue, 08 Aug 2017 01:51:35 GMT):

Message Attachments

zaishengming (Tue, 08 Aug 2017 01:57:48 GMT):
when i get the fabric-java-sdk(src-test-fixture-sdkintegration) copy to fabric project, use "docker-compose up --force-recreate" produce the contrainers .It have exited with a contraniners ...How is it happen?

zaishengming (Tue, 08 Aug 2017 01:57:57 GMT):

Message Attachments

rishabh1102 (Tue, 08 Aug 2017 06:14:50 GMT):
Guys, is it possible that the java sdk adds peers to the channel as per the endorsement policy? For eg: If I have a 4 org network (Org0, Org1, Org2, Org3) with My endorsement Policy = Any 3 Of 4. If I create a channel (In the SDK) with peers of all orgs, even if one of them doesn

rishabh1102 (Tue, 08 Aug 2017 06:19:44 GMT):
Guys, is it possible that the java sdk adds peers to the channel as per the endorsement policy? For eg: If I have a 4 org network (Org0, Org1, Org2, Org3) with My endorsement Policy = Any 3 Of 4. If I create a channel (In the SDK) with peers of all orgs, even if only one doesn't respond (which means my endorsement policy is fulfilled, the sdk says not enough endorsers

gauravgiri (Tue, 08 Aug 2017 06:31:59 GMT):
I am using fabric-sdk-java and trying to connect to an existing hyperledger 1.0 blockchain network created using: http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html I used CLI to install, instantiate and query on a sample chaincode they all worked fine. I configured fabric-sdk-java to use the admin privatekeyfile, and certificatefile generated. However, when i try to use fabric-sdk-java client to connect to this network, it gives error below, any idea what may have caused this error: org.hyperledger.fabric.sdk.exception.ProposalException: Failed exception message is Sending proposal to peer0 failed because of: gRPC failure=Status{code=INTERNAL, description=null, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:309) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:217) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:401) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) at java.lang.Thread.run(Thread.java:745) }, status is 500

deepakvparmar (Tue, 08 Aug 2017 07:06:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=FxMSXxBfyJ5qy6o8R) @rickr : Thank You Rickr, Kindly let me know how to use configtx as i havent used before or guide me link where i can take reference.

qsmen (Tue, 08 Aug 2017 07:31:07 GMT):
Has joined the channel.

qsmen (Tue, 08 Aug 2017 07:33:14 GMT):
hello,I want to know whether if the current java sdk can be

qsmen (Tue, 08 Aug 2017 07:34:37 GMT):
Hello, I want to know whether the current java sdk can work correctly. I mean if it can be compiled and run correctly. Thank you.

liuwenliang0632 (Tue, 08 Aug 2017 07:35:55 GMT):
java sdk work well.

liuwenliang0632 (Tue, 08 Aug 2017 07:36:01 GMT):
@qsmen

qsmen (Tue, 08 Aug 2017 07:38:37 GMT):
@liuwenliang0632 , Thank you.

DeutscheBahn-BlockchainDev (Tue, 08 Aug 2017 07:47:24 GMT):
@rickr thanks a lot, things work with the events! :)

deepakvparmar (Tue, 08 Aug 2017 08:18:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xvruAzG8YQKtAGcZA) @zaishengming : You are not running process in background. Kindly use "docker-compose up --force-recreate -d" command.

zaishengming (Tue, 08 Aug 2017 08:25:48 GMT):
@deepakvparmar thank you for your help!but both methods are the same.In fact,I want to know why the "ccenv" container is exited?

zaishengming (Tue, 08 Aug 2017 08:27:35 GMT):
@rickr hello, whether the newest version of fabric-sdk-java more than netty.jar?which version?

yoyokeen (Tue, 08 Aug 2017 09:02:59 GMT):
```[2017-08-08 16:57:02.696] [DEBUG] Helper - [crypto_ecdsa_aes]: constructor, keySize: 256 [2017-08-08 16:57:02.696] [DEBUG] Helper - [crypto_ecdsa_aes]: Hash algorithm: SHA2, hash output size: 256 [2017-08-08 16:57:02.696] [DEBUG] Helper - [utils.CryptoKeyStore]: CryptoKeyStore, constructor - start [2017-08-08 16:57:02.699] [DEBUG] Helper - [utils.CryptoKeyStore]: constructor, no super class specified, using config: fabric-client/lib/impl/FileKeyValueStore.js [2017-08-08 16:57:02.700] [DEBUG] Helper - [crypto_ecdsa_aes]: constructor, keySize: 256 [2017-08-08 16:57:02.701] [DEBUG] Helper - [crypto_ecdsa_aes]: Hash algorithm: SHA2, hash output size: 256 [2017-08-08 16:57:02.701] [DEBUG] Helper - [utils.CryptoKeyStore]: CryptoKeyStore, constructor - start [2017-08-08 16:57:02.701] [DEBUG] Helper - [utils.CryptoKeyStore]: constructor, no super class specified, using config: fabric-client/lib/impl/FileKeyValueStore.js [2017-08-08 16:57:02.701] [DEBUG] Helper - [crypto_ecdsa_aes]: constructor, keySize: 256 [2017-08-08 16:57:02.702] [DEBUG] Helper - [crypto_ecdsa_aes]: Hash algorithm: SHA2, hash output size: 256 [2017-08-08 16:57:02.702] [DEBUG] Helper - [utils.CryptoKeyStore]: CryptoKeyStore, constructor - start [2017-08-08 16:57:02.702] [DEBUG] Helper - [utils.CryptoKeyStore]: constructor, no super class specified, using config: fabric-client/lib/impl/FileKeyValueStore.js [2017-08-08 16:57:02.712] [DEBUG] Helper - [crypto_ecdsa_aes]: ecdsa signature: Signature { r: , s: , recoveryParam: 1 } error: [Peer.js]: sendProposal - timed out after:45000 error: [Peer.js]: sendProposal - timed out after:45000 error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/opt/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: REQUEST_TIMEOUT at Timeout._onTimeout (/opt/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Peer.js:100:19) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5) [2017-08-08 16:57:47.761] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-08-08 16:57:47.761] [ERROR] instantiate-chaincode - instantiate proposal was bad [2017-08-08 16:57:47.761] [ERROR] instantiate-chaincode - Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting... [2017-08-08 16:57:47.762] [ERROR] instantiate-chaincode - Failed to order the transaction. Error code: undefined```

yoyokeen (Tue, 08 Aug 2017 09:03:19 GMT):
when I run instantiate-chaincode command with the error.

deepakvparmar (Tue, 08 Aug 2017 09:15:10 GMT):
Where i can find build/bin/cryptogen tool?

zaishengming (Tue, 08 Aug 2017 09:17:31 GMT):
@deepakvparmar you can find with "gopath/src/github.com/hyperledger/fabric/release/linux-amd64/bin"

nikit-os (Tue, 08 Aug 2017 09:45:54 GMT):
Has joined the channel.

deepakvparmar (Tue, 08 Aug 2017 09:54:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=h8zp38enrmEeE22M3) @zaishengming : Thank You. Actually i cannot find linux-amd64 folder within release folder.

zaishengming (Tue, 08 Aug 2017 09:56:35 GMT):
@deepakvparmar you must in github download fabirc prpject ,and run "make docker" first ,second "make release" .Just can hava

zaishengming (Tue, 08 Aug 2017 09:56:51 GMT):
@deepakvparmar Just can have

deepakvparmar (Tue, 08 Aug 2017 10:43:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6oQ8dcNCv7eNNg8sR) @zaishengming Thank You. "make release" worked. :)

deepakvparmar (Tue, 08 Aug 2017 10:44:11 GMT):
I am trying to create new channel, but transaction proposal is getting time out. Any suggestion or pointers would help me. org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: timeout at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:163) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:133) at org.hyperledger.fabric.sdk.Channel.(Channel.java:222) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1121) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) at com.mufg.common.bcb.config.FabricManager.createNewChannel(FabricManager.java:152) at com.mufg.common.bcb.config.FabricManager.setupFabricNetwork(FabricManager.java:103) at com.mufg.common.bcb.config.FabricManager.invoke(FabricManager.java:388) at com.mufg.common.bcb.services.FabricBridgeServiceImpl.invoke(FabricBridgeServiceImpl.java:30) at com.mufg.common.bcb.services.FabricBridgeServiceImpl.main(FabricBridgeServiceImpl.java:59) com.mufg.common.bcb.exceptions.FabricBridgeException: Send transactions failed. Reason: timeout at com.mufg.common.bcb.services.FabricBridgeServiceImpl.invoke(FabricBridgeServiceImpl.java:33) at com.mufg.common.bcb.services.FabricBridgeServiceImpl.main(FabricBridgeServiceImpl.java:59)

deepakvparmar (Tue, 08 Aug 2017 12:28:51 GMT):
@rickr : While creating new channel using fabric-java-sdk, I am getting timeout error consistently. Any pointers or suggestion would be very helpful. org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: timeout at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:163) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:133) at org.hyperledger.fabric.sdk.Channel.(Channel.java:222) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1121) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:577) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:192)

rickr (Tue, 08 Aug 2017 13:06:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H7HWfsmtwsFgTJmzs) You need to sign the request block with at least 3 endorser signatures.

rickr (Tue, 08 Aug 2017 13:08:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5iiANhqXgrXJ7qHkm) First looks appears you're not even connecting. Recheck url port and that services is up. If it is does it have anything in the logs.

rickr (Tue, 08 Aug 2017 13:08:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Gq7bnFjxKu3P4F6yv) Example is in the README.md

rickr (Tue, 08 Aug 2017 13:12:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RTQcNojJhEAtwqvPJ) Is this Node ? If yes, please post in #fabric-sdk-node

rickr (Tue, 08 Aug 2017 13:15:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8qBwrQhKgwvwFshDu) Part of the Fabric. JSDK Readme.md shows how it was used for the integration test. http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html

BhavishaDawda (Tue, 08 Aug 2017 13:58:13 GMT):
The hyperledger FAQ mentions that the client should only connect to as many peers as are required by the endorsement policy - Does SDK provide an API to get the number of peers to connect to?

BhavishaDawda (Tue, 08 Aug 2017 13:58:13 GMT):
@rickr The hyperledger FAQ mentions that the client should only connect to as many peers as are required by the endorsement policy - Does SDK provide an API to get the number of peers to connect to?

eric.wall (Tue, 08 Aug 2017 14:57:05 GMT):
Is it possible to install Java chaincode on the fabric-samples/first-network using "peer install chaincode" command?

rickr (Tue, 08 Aug 2017 15:00:20 GMT):
Java chaincode is not supported at this time.

rickr (Tue, 08 Aug 2017 15:01:25 GMT):
Better discussed in #fabric-java-chaincode

jtsiros (Tue, 08 Aug 2017 22:19:50 GMT):
Has left the channel.

licdhemin (Wed, 09 Aug 2017 02:12:23 GMT):
Has joined the channel.

DarshanBc (Wed, 09 Aug 2017 03:34:29 GMT):
Has joined the channel.

yoyokeen (Wed, 09 Aug 2017 08:01:15 GMT):
```org.hyperledger.fabric.sdk.exception.InvalidArgumentException: UserContext for user user1 has no enrollment set. at org.hyperledger.fabric.sdk.User.userContextCheck(User.java:84) at org.hyperledger.fabric.sdk.HFClient.setUserContext(HFClient.java:257) at org.hyperledger.fabric.sdkintegration.End2endIT.lambda$runChannel$0(End2endIT.java:345) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at org.hyperledger.fabric.sdk.Channel$TL.lambda$fire$1(Channel.java:2567) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)```

yoyokeen (Wed, 09 Aug 2017 08:01:41 GMT):
when I run End2endIT test with the error

licdhemin (Wed, 09 Aug 2017 08:22:04 GMT):
hello everyone. how to set up fabric-sdk-java to ? thanks.

licdhemin (Wed, 09 Aug 2017 08:22:28 GMT):
how to set up fabric-sdk-java to run

licdhemin (Wed, 09 Aug 2017 08:24:33 GMT):
hello wvwry one . how to set up fabric-sdk-java to used in business system ? thanks

licdhemin (Wed, 09 Aug 2017 08:25:23 GMT):
where can found the logic paper?

Styxt (Wed, 09 Aug 2017 09:18:47 GMT):
Has joined the channel.

licdhemin (Wed, 09 Aug 2017 09:23:08 GMT):
hello every one. how to set up fabric-sdk-java to connect chaincode ? thanks

rwadhwa (Wed, 09 Aug 2017 12:33:23 GMT):
Has joined the channel.

eric.wall (Wed, 09 Aug 2017 15:00:46 GMT):
Any advice how to get started with End2EndIT? I don't exactly know how to run it and what is needed. I have built Java from source and reverted the git commit that disabled Java chaincode. Now I want to use the Java SDK to deploy some Java chaincode (although Go works fine for now so I can get accustomed to the SDK first)

eric.wall (Wed, 09 Aug 2017 15:01:25 GMT):
I've spun up a network by configuring the config files of the "first-network" folder in fabric-samples. This is on a remote machine I only connect to through ssh

eric.wall (Wed, 09 Aug 2017 15:02:40 GMT):
If I want to use the Java SDK, do I set up a development environment like Eclipse? Can I do this on my local machine and have it connect to the network running on the remote machine?

rickr (Wed, 09 Aug 2017 15:43:55 GMT):
Look at the README.md should tell you how to get started. Java chaincode is not supported.

kelvinzhong (Thu, 10 Aug 2017 01:48:52 GMT):
@rickr hi rickr, as i noticed that, when successfully send a transaction to the orderer, the return future will wait for all events to fire. but it's too costly to wait for all events to return, even sometimes one of the event fail to return then the future would never be fired. can i simply consider the peers would always come to synchronize the transaction if the orderer return success, even the events fail to return?

DarshanBc (Thu, 10 Aug 2017 05:05:14 GMT):
can anyone pst the link to read about java sdk documentation

DarshanBc (Thu, 10 Aug 2017 05:05:14 GMT):
can anyone post the link to read about java sdk documentation

rwadhwa (Thu, 10 Aug 2017 08:04:06 GMT):
@DarshanBc The only place I could see it is in this link: https://github.com/hyperledger/fabric-sdk-java

rwadhwa (Thu, 10 Aug 2017 08:05:26 GMT):
Hi All, Till now, even through the examples given through the Git, I could only run the gradle test cases. Which actually doesn't refer to the actual running environment.

rwadhwa (Thu, 10 Aug 2017 08:06:32 GMT):
Let's say, I started the already provided Images via docker for all the components,, now I want to query the chaincode via Java Code. I couldn't find any example for that. Can someone help help with this?

rwadhwa (Thu, 10 Aug 2017 08:07:05 GMT):
A good documentation is a must for Hyperledger Fabric. And till now, we don't have it. :(

DarshanBc (Thu, 10 Aug 2017 10:47:16 GMT):
What is cryptosuite

DarshanBc (Thu, 10 Aug 2017 10:47:16 GMT):
What does HFCClient.cryptosuite returns and why is it required ?

gauravgiri (Thu, 10 Aug 2017 11:03:04 GMT):
Any pointers for fabric-java-sdk to listen to different event types(block, chaincode) from hyperledger network? And if the fabric-sdk-java subscriptions for these events be made durable in nature?

DarshanBc (Thu, 10 Aug 2017 11:03:45 GMT):
Hi @here with respect to this link https://github.com/venugopv/FabricJavaSDKSample. I may sound silly, However this code doesn't have public static void main so from where does it start executing

DarshanBc (Thu, 10 Aug 2017 11:03:45 GMT):
Hi @here with respect to End2endIT in this link https://github.com/venugopv/FabricJavaSDKSample. I may sound silly, However this code doesn't have public static void main so from where does it start executing

DarshanBc (Thu, 10 Aug 2017 11:54:52 GMT):
on executing End2endIT example I am getting this error `End2endTest.setup:214 Url:http://localhost:7054, Failed to enroll user admin UpgradeCCEnd2endTest.setup:180 UserContext for user peerOrg1Admin has no enrollment set.`

DarshanBc (Thu, 10 Aug 2017 11:54:52 GMT):
on executing End2endIT example I am getting this error ```End2endTest.setup:214 Url:http://localhost:7054, Failed to enroll user admin UpgradeCCEnd2endTest.setup:180 UserContext for user peerOrg1Admin has no enrollment set.```

Dpkkmr (Thu, 10 Aug 2017 12:21:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8ihseScmzsaTpKENW) @DarshanBc Even I am getting the same error, Failed tests: UpgradeCCEnd2endTest.setup:180 UserContext for user peerOrg1Admin has no enrollment set. End2endTest.setup:214 Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@67b467e9 url: http://localhost:7054 POST request to http://localhost:7054/api/v1/register failed request body {"id":"user1","type":"user","max_enrollments":0,"affiliation":"org1.department1","attrs":[]} with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"Identity 'user1' is already registered"}],"messages":[]} Tests run: 2, Failures: 2, Errors: 0, Skipped: 0 Any help in resolving this will be helpful.

rickr (Thu, 10 Aug 2017 14:31:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=SXR2ALAfKvizbpW3q) Depends on how important it is that the ledger was updated. If it's like a procurement application for your company and you just want to write immediately to another channel an invoice to your fulfillment dept to send merchandise without knowing 100% you've have valid transaction you've been paid .. by all means.

rickr (Thu, 10 Aug 2017 14:43:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LWzn73YbBQuExEdxF) The SDK will not _ re-document_ Hyperledger Fabric. It should have documentation for that. You need to have done some homework to get that basic understanding for Fabric prior to using the JSDK. I liken it to using a JDBC without have any knowledge of relational databases. The README.md does have some explanation of specific items. Most important the integration test _src/test/java/org/hyperledger/fabric/sdkintegration/*IT_ should cover 90% of what the JDSK can do. With the prerequisite of knowing the Fabric should get you going fairly fast. You should be able to actually cut paste what you need to build your own application. Yes, I suppose you can never have enough documentation.

rickr (Thu, 10 Aug 2017 14:47:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8ihseScmzsaTpKENW) I run the End2endIT all the time and so does our verify builds Have never seen that error. Don't know how you're seeing that.

clempo (Thu, 10 Aug 2017 15:40:11 GMT):
@Dpkkmr, it appears you are running End2endIT twice without restarting your network. End2endIT assumes the network has just started and needs to be initialized. [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WhtE4ozDexgXrv2em)

clempo (Thu, 10 Aug 2017 15:43:02 GMT):
@DarshanBc, End2endIT is a junit. It is called by the maven-failsafe-plugin through IntegrationSuite.java [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QsQKuEG3F4ntM5oto)

clempo (Thu, 10 Aug 2017 21:08:46 GMT):
@rickr, the method TransactionEvent.getEventHub() should be public. That should be accessible from the CompletableFuture's result

yacovm (Thu, 10 Aug 2017 21:39:03 GMT):
Has joined the channel.

moriohara (Thu, 10 Aug 2017 23:41:48 GMT):
Has left the channel.

gauravgiri (Fri, 11 Aug 2017 03:04:12 GMT):
@rickr Regarding EventHub feature in fabric-sdk-java: 1. Listener for specific events like chaincode/block events: Any pointers for fabric-java-sdk to listen to specific event types(block, chaincode) from hyperledger network, something similar to fabric-sdk-node.js, EventHub.registerChaincodeEvent(), EventHub.registerBlockEvent() ? 2. Durability of the EventHub subscriptions: And any suggestions on how fabric-sdk-java subscriptions for these events be made durable in nature, what if the consumer application in fabric-sdk-java is not available, will it lead to event loss ?

sh (Fri, 11 Aug 2017 05:03:35 GMT):
Has joined the channel.

rishabh1102 (Fri, 11 Aug 2017 07:30:34 GMT):
Hey all, I had a doubt, in the java sdk, when one sends an invoke request on a channel, it waits asynchrounously for all peers on the channel to reply. My endorsement policy is set to n out of m. Is it possible that my asynchronous invoke returns as soon as I get a successful transaction endorsement from n peers? I'm trying to simulate malicious peers and this would make the sdk immune to DoS attacks

deepakvparmar (Fri, 11 Aug 2017 08:03:14 GMT):
@rickr : I am experiencing timeout error consistently while running End2EndIT.java , when creating new channel. org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: timeout Any pointer or suggestion how to avoid this error and create channel successfully.

rwadhwa (Fri, 11 Aug 2017 08:37:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5qtY4WFNKWoiWfkj8) @rickr Hi Rick, I understand there is a lots of info given in the readme.md. But to be honest, the person who is not aware of how things are happening (even after reading a lot of documents), must have a working example to start with. I'm sure most of us here are struggling because of that.

rwadhwa (Fri, 11 Aug 2017 08:39:48 GMT):
@rickr I understood all the components separately, but didn't understand how to work with fabric-ca server via Java. I want to register user/entities using Java Code, and not via CLI. Any help on that would be appreciated. However, just want to make a point, if Fabric Documentation would have been any where close to what was provided for JDBC, people wouldn't be asking questions. No offence. Looking forward for the reply.

DarshanBc (Fri, 11 Aug 2017 08:46:08 GMT):
Actually I am trying things on fabcar example this is the command that is staring the fabric ca server can you tell me how to go with this type of setup `command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/CA1_PRIVATE_KEY -b admin:adminpw -d'

DarshanBc (Fri, 11 Aug 2017 08:46:08 GMT):
Actually I am trying things on fabcar example this is the command that is staring the fabric ca server can you tell me how to go with this type of setup ```command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/CA1_PRIVATE_KEY -b admin:adminpw -d'```

DarshanBc (Fri, 11 Aug 2017 08:47:57 GMT):
to register user and enroll

DarshanBc (Fri, 11 Aug 2017 09:16:36 GMT):
How to connect to my ca server in docker and get hf.Registrar.Roles attributes associated with a user

ngeorge (Fri, 11 Aug 2017 09:58:36 GMT):
Has joined the channel.

ngeorge (Fri, 11 Aug 2017 10:02:39 GMT):
I am connecting to an existing blockchain network. Using java SDK, what would be the execution point from which I can start, to get the details of existing nodes in the network(peer, orderer etc ) ?

clempo (Fri, 11 Aug 2017 14:42:06 GMT):
@ngeorge, are you asking for an API to discover which nodes participate in the network? I did not see a discovery API in the samples.I thought (a subset of) the network topology must be known ahead of time by the client.

pvrbharg (Fri, 11 Aug 2017 19:50:42 GMT):
Hi - where would I find the meaning of status 11 when program emits a TransactionEventException? https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java if (e instanceof TransactionEventException) { BlockEvent.TransactionEvent te = ((TransactionEventException) e).getTransactionEvent(); if (te != null) { e.printStackTrace(System.err); fail(format("Transaction with txid %s failed. %s", te.getTransactionID(), e.getMessage())); } } The program emits a transaction ID and status 11 text - it means nothing unless we know what the status 11 description is. Any help would be appreciated.

spinisetti (Sat, 12 Aug 2017 04:30:08 GMT):
Has joined the channel.

acosta_rodrigo (Sat, 12 Aug 2017 17:05:13 GMT):
Has joined the channel.

chaitanya (Mon, 14 Aug 2017 10:28:29 GMT):
@here I have been trying to setup a network consisting of 4 orgs, but everytime I pull it up, and exec into the cli container, chaincode deployment fails because the container doesn't have `Go` setup. ```bash: go: command not found ```

chaitanya (Mon, 14 Aug 2017 10:28:41 GMT):
Does anyone have any idea what I could be missing?

mastersingh24 (Mon, 14 Aug 2017 11:41:19 GMT):
@chaitanya - not sure what you are using as the CLI container, but you should use the fabric-tools images

rickr (Mon, 14 Aug 2017 12:44:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hiRateiqcALpFv9BL) Chaincode event listener is coming. There are no plans for the SDK itself to take into account missed events. There is a JIRA open on the Peer side to start sending events from a specific block. When that get's implemented it will be exposed to the application directly.

pvrbharg (Mon, 14 Aug 2017 12:45:59 GMT):
@chaitanya If you following this document thru all the way down - your entire go setup would be correctly setup. https://golang.org/doc/code.html#Workspaces

rickr (Mon, 14 Aug 2017 12:48:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GgFqziSrd32aptAqN) Not at this time

rickr (Mon, 14 Aug 2017 12:48:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GgFqziSrd32aptAqN) Not at this time. The proposal creation is done on all peers requested in parallel so not waiting for all would only provide a minor if any improvement in performance. The waiting done once sent to the Orderer is *much* longer but this only waits for all the eventhubs your applications has set up to listen on and is NOT related to any policies - the only thing here to consider is which Peers/commiters you want to know for sure have commited your transaction.

rickr (Mon, 14 Aug 2017 12:53:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=daHpfBekAhGmnJhmG) CHANNEL_CONFIG_WAIT_TIME ?

rickr (Mon, 14 Aug 2017 12:57:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=XSxG3h2jiohZZkb26) ``` enum TxValidationCode { VALID = 0; NIL_ENVELOPE = 1; BAD_PAYLOAD = 2; BAD_COMMON_HEADER = 3; BAD_CREATOR_SIGNATURE = 4; INVALID_ENDORSER_TRANSACTION = 5; INVALID_CONFIG_TRANSACTION = 6; UNSUPPORTED_TX_PAYLOAD = 7; BAD_PROPOSAL_TXID = 8; DUPLICATE_TXID = 9; ENDORSEMENT_POLICY_FAILURE = 10; MVCC_READ_CONFLICT = 11; PHANTOM_READ_CONFLICT = 12; UNKNOWN_TX_TYPE = 13; TARGET_CHAIN_NOT_FOUND = 14; MARSHAL_TX_ERROR = 15; NIL_TXACTION = 16; EXPIRED_CHAINCODE = 17; CHAINCODE_VERSION_CONFLICT = 18; BAD_HEADER_EXTENSION = 19; BAD_CHANNEL_HEADER = 20; BAD_RESPONSE_PAYLOAD = 21; BAD_RWSET = 22; ILLEGAL_WRITESET = 23; INVALID_OTHER_REASON = 255; }```

rickr (Mon, 14 Aug 2017 12:59:09 GMT):
Best ask on the #fabric channels for the details of those.

rickr (Mon, 14 Aug 2017 13:03:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jGwhzjQLJ8aN5CGMb) There is examples of registering a user in the End2endIT.java Anyone can contribute to enhancing the documentation -- very few have posted minor inconsistencies.

rickr (Mon, 14 Aug 2017 13:03:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jGwhzjQLJ8aN5CGMb) There is examples of registering a user in the End2endIT.java Anyone can contribute to enhancing the documentation -- todate very few have posted minor inconsistencies and less have contributed.

rickr (Mon, 14 Aug 2017 13:03:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jGwhzjQLJ8aN5CGMb) There is examples of registering a user in the End2endIT.java Like I said, I think the *IT.java cover 90% of what you can do with the SDK. You can _mostly_ build your application by cut and paste. Anyone can contribute to enhancing the documentation -- todate very few have posted minor inconsistencies and less have contributed.

ohupalo (Mon, 14 Aug 2017 13:38:41 GMT):
dynamic

pasimoes (Tue, 15 Aug 2017 04:48:40 GMT):
Has joined the channel.

gloriow (Tue, 15 Aug 2017 09:06:32 GMT):
Has joined the channel.

gauravgiri (Tue, 15 Aug 2017 10:30:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y5YYQtJApkH5CmhZ7) @rickr Thank You. Does your comment mean that fabric-sdk-java does not yet implement the register methods for chaincode or blocks inside EventHub.java, similar to corresponding implementation in fabric-sdk-node? Any idea when will they be available?

rickr (Tue, 15 Aug 2017 12:34:55 GMT):
You can today with `Channel.registerBlockListener` listen to _any_ block on the channel. If you're looking for CC events in the block today you'll need to do the work to get them. There is an update `registerChaincodeEventListener` that should make that easier.

Jonny (Tue, 15 Aug 2017 13:28:40 GMT):
Has joined the channel.

gauravgiri (Tue, 15 Aug 2017 13:38:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gNFqFGfBnnmxQnnak) @rickr Thank You. Do you have any information when will the Channel.registerChaincodeEventListener implementation be available? We are using fabric-sdk-java primarily for our application, however our application needs to listen to chaincode events also to fulfill an important business function. So we need to make design decision, if we should wait on fabric-sdk-java implementation to be available, or should we think for alternative fabric-sdk-node implementation specifically for chaincode events?

rickr (Tue, 15 Aug 2017 15:23:09 GMT):
It should be in 1.1 but I won't commit when that will be available. You can merge cherrypick https://gerrit.hyperledger.org/r/#/c/12091/ or wait till it gets merged then work with master in the interim.

yoyokeen (Wed, 16 Aug 2017 00:00:15 GMT):
how to judge the user existing via sdk?

wangpan22 (Wed, 16 Aug 2017 04:35:38 GMT):
anyone met this exception before? when trying to create a channel, Caused by: io.netty.handler.codec.http2.Http2Exception: Invalid frame length 1024.

chenxu123 (Wed, 16 Aug 2017 06:06:59 GMT):
Has joined the channel.

chenxu123 (Wed, 16 Aug 2017 06:39:07 GMT):
how to join channel instead of creating a new channel?

YashGanthe (Wed, 16 Aug 2017 08:53:23 GMT):
Has joined the channel.

YashGanthe (Wed, 16 Aug 2017 08:59:23 GMT):
If I run peer channel fetch config config_block.pb -o 127.0.0.1:7050 -c testchainid, I get a proto formatted configuration of a channel. Where is the definition of the proto class that corresponds to this proto formatted configuration?

wangdong (Wed, 16 Aug 2017 09:19:03 GMT):
Has joined the channel.

wangdong (Wed, 16 Aug 2017 09:22:16 GMT):
Hi, when I read the code, I got one situation. when to create a new channel, there is one line: ordererChannel = orderer.getChannel(). And I found there is a method in orderer class which said to get the channel of which the orderer is a member. But what if this order is used by multiple channels? Or I missed something, please let me know. Thanks

wangdong (Wed, 16 Aug 2017 09:24:06 GMT):
And this line is in channel.java, constructor methods line 167. Any comment will be appreciated.

paapighoda (Wed, 16 Aug 2017 09:26:59 GMT):
Hello, is there any tutorial available on java-sdk, similar to that on node sdk?

rickr (Wed, 16 Aug 2017 12:14:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zM5893eJkYcj4uTBk) You need to know which users you created registered

rickr (Wed, 16 Aug 2017 12:15:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EBeY57uo8M7mLi53F) Have never seen that before.

rickr (Wed, 16 Aug 2017 12:17:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aYCnztYoQd4kvrTFK) At the moment you need to create a orderer object for each channel

rickr (Wed, 16 Aug 2017 12:17:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aYCnztYoQd4kvrTFK) At the moment you need to create a orderer object for each channel. They can use the same URL to the actual Orderer

rickr (Wed, 16 Aug 2017 12:18:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4obQhxnX3nZeEbLNK) No tutorial follow the *IT.java to see how to use the sdk

wangdong (Wed, 16 Aug 2017 14:37:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cwexw5Ka4uLzNt4hS) @rickr Hi, thanks for your reply. My point is this orderer object just return one channel. If the orderer node can be used by multiple channel, this orderer should return multiple channels instead of only one. And in my opinion, one channel can have multi-orderer which we call orderer set. And as I ask one developer of fabric, that one order can be used by multiple channels. You said "create a orderer object", but why this line? what if this orderer is used

wangdong (Wed, 16 Aug 2017 14:44:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cwexw5Ka4uLzNt4hS) @rickr Hi, thanks for your reply. My point is this orderer object just return one channel. If the orderer node can be used by multiple channel, this orderer should return multiple channels instead of only one. And in my opinion, one channel can have multi-orderer which we call orderer set. And as I ask one developer of fabric, that one order can be used by multiple channels. You said "create a orderer object", but why that line code? what if this orderer is used by other channels. There are more than one channels which should be returned. If I am wrong and it is a long story. Would you please share me some document? Thanks.

VenuVemula (Wed, 16 Aug 2017 14:50:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jbTgrYrtg4hpgcZfy) @paapighoda , you can generate javadocs by running 'mvn site' or 'mvn javadoc:javadoc' . The javadoc wud be in target/site/apidocs

rickr (Wed, 16 Aug 2017 14:56:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yBskdsfdR7ffyc99f) The Orderer created in the SDK is more or less a connection to the actual Orderer. You can create as many of these you like to the SAME Orderer. Use each in different channels - it's the same Orderer you're connecting to. Today, It a _limitation_ these _Orderer connection_ objects are a 1 to 1 with channels.

wangdong (Thu, 17 Aug 2017 03:05:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8jsuJZBdhbir5Rd79) @rickr Thanks a lot for your answer. Really appreciate it.

kelvinzhong (Thu, 17 Aug 2017 05:09:27 GMT):
@rickr hi rick, i found that seems the gossip protocol is not stable, some peer appear disconnect with the other peers, the block is missing unless restart the peer or it would not synchronize with the others. where should i ask the question about the gossip protocol?

kelvinzhong (Thu, 17 Aug 2017 05:09:27 GMT):
@rickr hi rick, i found that seems the gossip protocol is not stable, some peer appear disconnect with the other peers, the block height is less than the others, unless restart the peer or it would not synchronize with the others. where should i ask the question about the gossip protocol?

tallharish (Thu, 17 Aug 2017 08:12:43 GMT):
event

tallharish (Thu, 17 Aug 2017 09:33:52 GMT):
Looking for sample code to understand how to listen to chaincode or Tx events via the eventhub. I see some discussion on this channel, but some concrete examples / pointers would be useful. Thanks

tallharish (Thu, 17 Aug 2017 11:05:35 GMT):
register

Othman.Darwish (Thu, 17 Aug 2017 11:30:44 GMT):
Has joined the channel.

Othman.Darwish (Thu, 17 Aug 2017 11:36:01 GMT):
practically , what is the difference between transaction proposal and query chain proposal , they both derived from the same class and have no significant implementation ?

rickr (Thu, 17 Aug 2017 12:28:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Mx2B9GvRbSRZ8Rfe7) I would start with #fabric-gossip

rickr (Thu, 17 Aug 2017 12:35:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dvhNkTZpFf4J84j79) There is no direct example in the IT tests. However if you look at Channel.java it uses the `registerBlockListener` which is available for applications to listen to raw blocks. So that in essence is the example :) There is comming code to make listening for CC events easier https://gerrit.hyperledger.org/r/#/c/12091/

rickr (Thu, 17 Aug 2017 12:35:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dvhNkTZpFf4J84j79) There is no direct example in the IT tests. However if you look at Channel.java it uses the `registerBlockListener` which is available for applications to listen to raw blocks. So that in essence is the example :) There is coming code to make listening for CC events easier https://gerrit.hyperledger.org/r/#/c/12091/

samdeir (Thu, 17 Aug 2017 14:46:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nFg5SiyauNoq8KgHM) @Othman.Darwish

samdeir (Thu, 17 Aug 2017 14:48:24 GMT):
[ I guess there's no difference at all, maybe be its for future requirements? ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nFg5SiyauNoq8KgHM) @Othman.Darwish

Othman.Darwish (Thu, 17 Aug 2017 14:49:17 GMT):
Thank you for nothing !

samdeir (Thu, 17 Aug 2017 14:58:17 GMT):
Difference between QueryByChaincodeRequest and TransactionProposalRequest?

chenxuan (Thu, 17 Aug 2017 15:23:04 GMT):
@rickr i use the idea open the sdk

chenxuan (Thu, 17 Aug 2017 15:23:29 GMT):
but i run the protobuf:compile

chenxuan (Thu, 17 Aug 2017 15:23:36 GMT):
cmd to build the proto

chenxuan (Thu, 17 Aug 2017 15:24:08 GMT):
find it can't generate the grpc-java

chenxuan (Thu, 17 Aug 2017 15:24:15 GMT):
it just generate the java

chenxuan (Thu, 17 Aug 2017 15:24:27 GMT):
in the target folder

tallharish (Thu, 17 Aug 2017 15:55:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5YE7AbbLiD8oRpEbG) Thanks @rickr. I could get registerBlockListener working easily.. Do you recommend cherry-picking and compiling this in jdk ourselves, or is there an upcoming code-fix / minor release coming soon?

MeenakshiSingh (Fri, 18 Aug 2017 07:13:57 GMT):
Has joined the channel.

MeenakshiSingh (Fri, 18 Aug 2017 07:14:11 GMT):
Hi..I have a few doubts...1. does 1.0 provide a way to find out which transactions failed in consensus or did not meet endorsement policy? 2. If a set of transactions fail due to network issues, is there a mechanism to retry them?

Styxt (Fri, 18 Aug 2017 10:39:45 GMT):
Hi, i imported the fabric-sdk-java dependency to my maven project but somehow org.hyperledger.fabric.sdk.Chain is missing. Anyone got an idea how i could fix this?

kelvinzhong (Fri, 18 Aug 2017 11:13:14 GMT):
Chain has change the name to Channel

tallharish (Fri, 18 Aug 2017 11:47:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CQBbP2k7RgNsMnmBf) @tallharish Cherry picked and integrated the patch with my build. It works fine. For the benefit of others, sharing my code snippet. (You can refer to End2endIT as well). ``` channel.registerChaincodeEventListener( Pattern.compile(".*"), // chaincode name - any Pattern.compile(Pattern.quote("event")), // event name - event chaincodeEventListener); ChaincodeEventListener chaincodeEventListener = new ChaincodeEventListener() { @Override public void received(String handle, BlockEvent blockEvent, ChaincodeEvent chaincodeEvent) { out("RECEIVED Chaincode event with handle: %s, chhaincode Id: %s, chaincode event name: %s, " + "transaction id: %s, event payload: \"%s\", from eventhub: %s", handle, chaincodeEvent.getChaincodeId(), chaincodeEvent.getEventName(), chaincodeEvent.getTxId(), new String(chaincodeEvent.getPayload()), blockEvent.getEventHub().toString()); } }; ```

MoulaliMvg (Fri, 18 Aug 2017 12:17:38 GMT):
how we can fetch all entities fron chaincode stub in go language?

rickr (Fri, 18 Aug 2017 13:11:00 GMT):
@tallharish It's been merged into master branch.

rickr (Fri, 18 Aug 2017 13:16:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jtzspNASPgkkAbiKC) If it fails for any reason the future will complete with an exception. It's generally up to the application to put what retry attempts it wants to do.

FollowingGhosts (Fri, 18 Aug 2017 15:41:45 GMT):
Does the Java SDK work on Android?

tallharish (Fri, 18 Aug 2017 19:09:42 GMT):
i am creating a new Java Maven project for fabric client, leveraging features such as SampleStore, SampleUser and SampleOrg from fabric-sdk-java. When I declare maven dependency on fabric-sdk-java, all other dependencies (like org.apache.commons*) are imported automatically. When I build the jar from the latest fabric-sdk-java and import it as a local maven repository, I need to add all libraries (presumably from `mvn dependency:list`) to pom one by one to resolve all dependencies. What I am doing wrong? should I build the jar in a different way?

rickr (Fri, 18 Aug 2017 19:47:10 GMT):
Why not start your own maven project pom.xml and list a dependency on it ?

tallharish (Fri, 18 Aug 2017 19:49:37 GMT):
yes I started. If i declare following dependency in my pom.xml, then its all good. ``` org.hyperledger.fabric-sdk-java fabric-sdk-java 1.0.1 ```

tallharish (Fri, 18 Aug 2017 19:49:37 GMT):
yes I started. If i declare following dependency in my pom.xml, then its all good. ``` org.hyperledger.fabric-sdk-java fabric-sdk-java 1.0.1 ``` but when I declare a local repo. and import the jar through that, then i face issues with packages imported by fabric-sdk-java. ``` local-maven-repo file:///${project.basedir}/local-maven-repo fabric-local fabric-sdk-java 1.1.0-SNAPSHOT ```

tallharish (Fri, 18 Aug 2017 19:53:03 GMT):
since i made latest build 1.1.0 with ChaincodeEvents etc.. i have a jar file.. I declare my dependency as a local maven repo. (donno the best way to do this). Then maven isn't getting sdk dependencies resolved ``` local-maven-repo file:///${project.basedir}/local-maven-repo fabric-local fabric-sdk-java 1.1 ```

tallharish (Fri, 18 Aug 2017 19:53:03 GMT):
My .jar is kept at {project.basedir}/local-maven-repo/fabric-local/fabric-sdk-java/1.1/fabric-sdk-java-1.1.jar

rickr (Fri, 18 Aug 2017 19:56:00 GMT):
well I've not tried that - But there is no version 1.1 it's 1.1.0-SNAPSHOT if its from the master branch

rickr (Fri, 18 Aug 2017 19:58:37 GMT):
why is the groupId not fabric-sdk-java ?

tallharish (Fri, 18 Aug 2017 20:01:39 GMT):
My .jar is kept at {project.basedir}/local-maven-repo/fabric-local/fabric-sdk-java/1.1/fabric-sdk-java-1.1.jar

tallharish (Fri, 18 Aug 2017 20:01:39 GMT):
My .jar is kept at `{project.basedir}/local-maven-repo/fabric-local/fabric-sdk-java/1.1/fabric-sdk-java-1.1.jar`, just named it like this.

tallharish (Fri, 18 Aug 2017 20:01:39 GMT):
My .jar is kept at `{project.basedir}/local-maven-repo/fabric-local/fabric-sdk-java/1.1/fabric-sdk-java-1.1.jar`, just named it like this.

Ashish (Sat, 19 Aug 2017 07:30:38 GMT):
Has left the channel.

Ashish (Sat, 19 Aug 2017 07:30:58 GMT):
Has joined the channel.

sajeevkhan (Sat, 19 Aug 2017 11:20:36 GMT):
Hi Folks, Using the JAVA SDK how can we get the status of a peer? I am looking for the equivalent of Peer node status command...... Thanks, Sajeev

MeenakshiSingh (Sun, 20 Aug 2017 06:00:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NSL7EmM3C5y8h8EBL) @rickr ok..but if I want to find out what transactions did not go through, failing an endorsement policy or consensus, how will I retrieve those?

ngeorge (Mon, 21 Aug 2017 05:26:04 GMT):
Using java sdk APIs, is there a way to get the details(peers, orderers etc ) of existing network topology for a given channel name ? I could see function getChannel in HFClient class. When I tried it returned a null object.

yyyyyyy9 (Mon, 21 Aug 2017 08:25:47 GMT):
Has joined the channel.

ngeorge (Mon, 21 Aug 2017 08:39:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fz9YqEosHRwBhSA3C) @clempo I have brought up the network using cli containers(created channel, peers and have joined them ). Now I want to install chaincode using java SDK. For that I will need a handle to the created channel and peers. Is there a way to get that?

deepakvparmar (Mon, 21 Aug 2017 09:01:00 GMT):
While calling channel.initialize() method, I am getting following exception. Any pointer or suggestion would be very helpful. org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 404, Channel mychannel at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1085) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:898) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:826) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:526)

tallharish (Mon, 21 Aug 2017 13:33:07 GMT):
@rickr How do I initialize log4j? I created a new eclipse maven project, added dependency for fabric-sdk-java, added my code. I see the following WARN, and do not see any fabric based logs on the console. ``` log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. ``` I guess it has something to do with initializing the Config. I added the `config.properties` in my project base folder. Note that when I run the same code in the fabric-java-sdk project in Eclipse, it works fine and I get log outputs on console. What initialization am I missing?

MoulaliMvg (Mon, 21 Aug 2017 13:56:37 GMT):
Hi I am following fabric-samples/balance-transfer I have two modules in my project like comp1 and comp2 modules curl commands like below in balance-transfer curl -s -X POST \ http://localhost:4000/chaincodes \ -H "authorization: Bearer $ORG1_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:7056"], "chaincodeName":"mycc", "chaincodePath":"github.com/example_cc", "chaincodeVersion":"v0" }' curl -s -X POST \ http://localhost:4000/chaincodes \ -H "authorization: Bearer $ORG2_TOKEN" \ -H "content-type: application/json" \ -d '{ "peers": ["localhost:8056"], "chaincodeName":"mycc", "chaincodePath":"github.com/example_cc", "chaincodeVersion":"v0" }' 1. when company1 want to send JSON data to company2 2. company2 takes that data and displays in UI and it should approve that data. Once it approves , company1 should get acknoledgement from comp2 to comp1 3. How I can do transactions with in companies in balance transfer setup 4. How can i launch comp1 UI with "localhost:7056" and comp2 UI with "localhost:8056" and how to fetch all transactions from distributed ledger

tallharish (Mon, 21 Aug 2017 14:30:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NvXyWYyDwswgvKgd2) @tallharish Figured out the problem. Copied the log4j.properties file from /src/resources/. to /src/resources/. in my project as well.

tallharish (Mon, 21 Aug 2017 14:30:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NvXyWYyDwswgvKgd2) @tallharish Figured out the problem. Copied the log4j.properties file from src/resources/. to src/resources/. in my project as well. Had to create folder resources in src.

tallharish (Mon, 21 Aug 2017 14:30:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NvXyWYyDwswgvKgd2) @tallharish Figured out the problem. Copied the log4j.properties file from src/resources/. in fabric-sdk-java to src/resources/. in my project as well. Had to create folder resources in src.

wangdong (Tue, 22 Aug 2017 02:04:18 GMT):
Hi, when I am reading the code. I met the systemChannel in Channel class. Is it a implementation of a asynchronization ? I am not sure. Just make sure of it. because I am not familiar to java. And I googled Executor. it is used for async. But I am not familiar with background story. So I just ask what the advantages here with a systemChannel?

smita0709 (Tue, 22 Aug 2017 04:59:08 GMT):
Hello I am trying to update the channel configuration I have computed the diff of 2 configs with configtxlator and now I want to update the channel config updateChannelConfiguration(UpdateChannelConfiguration updateChannelConfiguration, Orderer orderer, byte[]... signers) httppost = new HttpPost("http://localhost:7059/configtxlator/compute/update-from-configs"); HttpEntity multipartEntity = MultipartEntityBuilder.create() .setMode(HttpMultipartMode.BROWSER_COMPATIBLE) .addBinaryBody("original", channelConfigurationBytes, ContentType.APPLICATION_OCTET_STREAM, "originalFakeFilename") .addBinaryBody("updated", newConfigBytes, ContentType.APPLICATION_OCTET_STREAM, "updatedFakeFilename") .addBinaryBody("channel", fooChannel.getName().getBytes()).build(); httppost.setEntity(multipartEntity); response = httpclient.execute(httppost); statuscode = response.getStatusLine().getStatusCode(); out("Got %s status for updated config bytes needed for updateChannelConfiguration ", statuscode); assertEquals(200, statuscode); byte[] updateBytes = EntityUtils.toByteArray(response.getEntity()); UpdateChannelConfiguration updateChannelConfiguration = new UpdateChannelConfiguration(updateBytes); //Ok now do actual channel update. fooChannel.updateChannelConfiguration(updateChannelConfiguration, client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));

smita0709 (Tue, 22 Aug 2017 05:02:03 GMT):
Hello I am trying to update the channel configuration I have computed the diff of 2 configs with configtxlator and now I want to update the channel config the updateChannelConfiguration methos takes UpdateChannelConfiguration , Orderer and signers as parameters I have the UpdateChannelConfiguration , from where to I get the Orderer and the signers which I need to pass to the methos? The methos signature of updateChannelConfiguration updateChannelConfiguration(UpdateChannelConfiguration updateChannelConfiguration, Orderer orderer, byte[]... signers) **** the code that i'm trying to execute**** httppost = new HttpPost("http://localhost:7059/configtxlator/compute/update-from-configs"); HttpEntity multipartEntity = MultipartEntityBuilder.create() .setMode(HttpMultipartMode.BROWSER_COMPATIBLE) .addBinaryBody("original", channelConfigurationBytes, ContentType.APPLICATION_OCTET_STREAM, "originalFakeFilename") .addBinaryBody("updated", newConfigBytes, ContentType.APPLICATION_OCTET_STREAM, "updatedFakeFilename") .addBinaryBody("channel", fooChannel.getName().getBytes()).build(); httppost.setEntity(multipartEntity); response = httpclient.execute(httppost); statuscode = response.getStatusLine().getStatusCode(); out("Got %s status for updated config bytes needed for updateChannelConfiguration ", statuscode); assertEquals(200, statuscode); byte[] updateBytes = EntityUtils.toByteArray(response.getEntity()); UpdateChannelConfiguration updateChannelConfiguration = new UpdateChannelConfiguration(updateBytes); //Ok now do actual channel update. fooChannel.updateChannelConfiguration(updateChannelConfiguration, client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));

xymoc (Tue, 22 Aug 2017 08:52:07 GMT):
Has joined the channel.

samdeir (Tue, 22 Aug 2017 10:10:31 GMT):
Hi all, Whats the difference between QueryByChaincodeRequest and TransactionProposalRequest classes from design perspective?

kelvinzhong (Tue, 22 Aug 2017 10:56:59 GMT):
query would not commit the record into the ledger

kelvinzhong (Tue, 22 Aug 2017 10:57:04 GMT):
but transaction would

Styxt (Tue, 22 Aug 2017 14:21:24 GMT):
Hi all, i want to use the sdk to query the ledger and invoke transactions ... i looked at the End2endIT.java so my question is what if i can just copy paste and change the TestConfig.java or what exactly how i can use the sdk in a real scenario.

mrkiouak (Tue, 22 Aug 2017 19:45:43 GMT):
Has joined the channel.

SantoshShahane (Tue, 22 Aug 2017 21:43:33 GMT):
Has joined the channel.

SantoshShahane (Tue, 22 Aug 2017 21:43:52 GMT):
RUNNING: End2endAndBackAgainIT org.hyperledger.fabric.sdk.exception.InvalidArgumentException: UserContext for user peerOrg1Admin has no enrollment set. at org.hyperledger.fabric.sdk.User.userContextCheck(User.java:84) at org.hyperledger.fabric.sdk.HFClient.setUserContext(HFClient.java:257) at org.hyperledger.fabric.sdk.endtoend.UpgradeCCEnd2endTest.reconstructChannel(UpgradeCCEnd2endTest.java:492) at org.hyperledger.fabric.sdk.endtoend.UpgradeCCEnd2endTest.setup(UpgradeCCEnd2endTest.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

SantoshShahane (Tue, 22 Aug 2017 21:44:05 GMT):
Anyone knows ??

SystemShock (Wed, 23 Aug 2017 08:41:01 GMT):
Has joined the channel.

bercinho (Wed, 23 Aug 2017 13:33:34 GMT):
Has joined the channel.

chaitanya (Wed, 23 Aug 2017 14:26:45 GMT):
Hi, we have an application that's making invokes through the JavaSDK. The issue is that requests coming at the invoke parallely are getting the same TransactionID. Any idea as to what we could be doing wrong? The SDK application is largely the same as the End2EndIT.java (Fabric beta)

rickr (Wed, 23 Aug 2017 15:15:42 GMT):
Are you recreating a new request each time from scratch ? The request going to multiple peers will have the same transactionID

clempo (Wed, 23 Aug 2017 17:18:22 GMT):
@SantoshShahane, End2endAndBackAgainIT assumes End2endIT has been run exactly once before it can run.

clempo (Wed, 23 Aug 2017 17:28:25 GMT):
I noticed chaincode methods can return values even when they are called with sendTransactionProposal(). In End2endIT's example_cc.go, the move() method returns nil but it does not appear to be mandatory. What would happen if I call the orderer.sendTransaction() with a bunch of successful ProposalResponses which agreed on everything except the payload? The reason I ask is because I'd like to define the return value to be the payload of the first successful ProposalResponse, just like I do for queryByChaincode().

chaitanya (Wed, 23 Aug 2017 17:46:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=g6LvZp76Yt8ZHehnC) @rickr Yes, they're both new requests

clempo (Wed, 23 Aug 2017 20:37:49 GMT):
@rickr, the comment for SDKUtils.getProposalConsistencySets() is misleading since it returns a set without checking anything. The example in End2endIT does not check the return value so this is doubly misleading.

clempo (Wed, 23 Aug 2017 20:38:11 GMT):
The comment says: Check that the proposals all have consistent read write sets

rickr (Wed, 23 Aug 2017 22:01:58 GMT):
By default we the SDK will do this and throw an exception if there is more than one proposal sent to the Orderer that are not consistent.. But the utility is available to the application too.

rickr (Wed, 23 Aug 2017 22:20:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YDvM5SJChTZjPA7HQ) Not sure how your getting this. Just from observation of running the integration test I have never seen them produce transactionIDs that are similar by observation. I just reran it sending the output to a file and made sure they were different. The request can go to multiple peers when they come back the do have the SAME transaction ID that's to be expected are you possibly confusing this ? ``` sending transaction proposal to all peers with arguments: move(a,b,25) Successful transaction proposal response Txid: 3479433e1ccf5834a18c3d988813a7947cd883cbd65d49c98f2356645aac272f from peer peer0.org2.example.com Successful transaction proposal response Txid: 3479433e1ccf5834a18c3d988813a7947cd883cbd65d49c98f2356645aac272f from peer peer1.org2.example.com ``` Those will both go to the Orderer and are considered to be one transaction

rickr (Wed, 23 Aug 2017 22:26:02 GMT):
Also if you send the same transactionID to the orderer again it will reject any later ones so if the integration test were producing this there should be failures.

nimtiazm (Thu, 24 Aug 2017 00:26:58 GMT):
Has joined the channel.

chaitanya (Thu, 24 Aug 2017 03:33:37 GMT):
>Those will both go to the Orderer and are considered to be one transaction @rickr By new requests, I meant they're both new invoke requests (transactionProposals sent out, response awaited, transaction sent to orderer). Could you please elaborate as to why they'll be considered to be one transaction at the Orderer?

girishgh88 (Thu, 24 Aug 2017 11:26:52 GMT):
Has joined the channel.

girishgh88 (Thu, 24 Aug 2017 11:29:10 GMT):
by running channel.initialize(); I am getting the following exception ```

girishgh88 (Thu, 24 Aug 2017 11:43:11 GMT):
while running `channer.initialize()` getting the following exception ```Exception in thread "main" org.hyperledger.fabric.sdk.exception.TransactionException: INTERNAL at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:286) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:165) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1074) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:898) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:826) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:526) at com.ibs.blockchain.client.test.Test.createChannel(Test.java:151) at com.ibs.blockchain.client.test.Test.main(Test.java:179) Caused by: io.grpc.StatusRuntimeException: INTERNAL at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:309) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:217) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:401) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ... 1 more```

girishgh88 (Thu, 24 Aug 2017 11:43:11 GMT):
while running `channer.initialize()` getting the following exception ```Exception in thread "main" org.hyperledger.fabric.sdk.exception.TransactionException: INTERNAL at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:286) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:165) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1074) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:898) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:826) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:526) at com.ibs.blockchain.client.test.Test.createChannel(Test.java:151) at com.ibs.blockchain.client.test.Test.main(Test.java:179) Caused by: io.grpc.StatusRuntimeException: INTERNAL at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:309) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:217) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:401) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ... 1 more``` What will be issue?

girishgh88 (Thu, 24 Aug 2017 11:43:11 GMT):
while running `channer.initialize()` getting the following exception ```Exception in thread "main" org.hyperledger.fabric.sdk.exception.TransactionException: INTERNAL at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:286) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:165) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1074) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:898) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:826) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:526) at com.ibs.blockchain.client.test.Test.createChannel(Test.java:151) at com.ibs.blockchain.client.test.Test.main(Test.java:179) Caused by: io.grpc.StatusRuntimeException: INTERNAL at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:309) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:217) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:401) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ... 1 more``` What will be the issue?

girishgh88 (Thu, 24 Aug 2017 11:43:11 GMT):
while running `channer.initialize()` getting the following exception ```Exception in thread "main" org.hyperledger.fabric.sdk.exception.TransactionException: INTERNAL at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:286) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:165) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1074) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:898) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:826) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:526) at com.ibs.blockchain.client.test.Test.createChannel(Test.java:151) at com.ibs.blockchain.client.test.Test.main(Test.java:179) Caused by: io.grpc.StatusRuntimeException: INTERNAL at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:309) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:217) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:401) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ... 1 more``` What will be the issue? I am running this in a java application through eclipse mars and using jdk 1.8

clempo (Thu, 24 Aug 2017 13:13:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3rv7gjKTvJj2i5mAT)

clempo (Thu, 24 Aug 2017 13:19:45 GMT):
I now see End2endIT checks the return value of getProposalConsistencySets() in one place, but there is another call where the return value is not checked and that makes it into a no-op (and a bad example)[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3rv7gjKTvJj2i5mAT)

clempo (Thu, 24 Aug 2017 13:40:44 GMT):
@rickr, you said the sdk checks for consistency of the ProposalResponses. It appears SDKUtils.getProposalConsistencySets() only checks the chaincodeAction without checking the actual proposalResponsePayload. Should it also check the return value in the payload? Is the method implementing the same consistency check as the orderer? If Fabric does not mind different return values, should the SDK provide a utility to check the return values are consistent for those applications that need it? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=snxcs2NJMSCrMWeqE)

rickr (Thu, 24 Aug 2017 13:43:55 GMT):
All that matters is the read write sets are identical. That's all that's put in the ledger. There was a issue that it didn't handle bad proposals right but the latest code has that addressed.

wangdong (Thu, 24 Aug 2017 13:44:44 GMT):
@rickr Hi, I have a question regarding the channel constructor. There is a short one, which has less parameters. And when the client call this to get channel instance, it said that it is a configured channel. I wonder if it is not instantiated? At least this is my finding.

clempo (Thu, 24 Aug 2017 13:59:10 GMT):
Do I need to create a Jira for this? I think fixing the example is important.[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bE59dkoXXB4wF7zxj)

rickr (Thu, 24 Aug 2017 14:15:36 GMT):
I can remove that one line ... as said it strictly not need for ANY application to call `getProposalConsistencySets` as that by default will be handled when sending to the orderer. I put the call in *explicitly* in once case to show application have access to that call. I can put a comment there that it's not strictly needed.

rickr (Thu, 24 Aug 2017 14:15:36 GMT):
I can remove that one line ... as said it strictly not need for ANY application to call `getProposalConsistencySets` as that by default will be handled when sending to the orderer. I put the call in *explicitly* in one case to show application have access to that call. I can put a comment there that it's not strictly needed.

clempo (Thu, 24 Aug 2017 14:21:16 GMT):
I think it is excellent that you show the call, but there is a second call that gives a bad example because it is a no-op without the check

clempo (Thu, 24 Aug 2017 14:22:17 GMT):
Adding the comment that is not strictly needed is also a good idea

clempo (Thu, 24 Aug 2017 14:22:17 GMT):
Adding a comment that the call is not strictly needed (where we do the check) is also a good idea

rickr (Thu, 24 Aug 2017 14:27:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x5dTQzxpcDsGk9vPf) Have not come across this error. IMO making sure the integration test provided work is always a good idea to make sure your environment is up and running ok as they have know to pass. Then move on from there with your own application. Have you tried that ?

clempo (Thu, 24 Aug 2017 14:29:47 GMT):
What I'm proposing is to remove line 342: SDKUtils.getProposalConsistencySets(responses); or else check its return value (and add the comment that this was optional)

rickr (Thu, 24 Aug 2017 14:33:57 GMT):
got it

nimtiazm (Thu, 24 Aug 2017 15:08:32 GMT):
Hi. Is there any blog or how-to that I could follow to simply and run an actual hello world on fabric. Every single tutorial i've tried just doesn't work

nimtiazm (Thu, 24 Aug 2017 15:08:56 GMT):
some is v0.6, other is 1.0.0 and docker images aren't there etc etc

nimtiazm (Thu, 24 Aug 2017 15:09:29 GMT):
or maybe i'm too early into trying fabric java sdk. may be it isn't ready yet. please can someone tell me if that's the case?

clempo (Thu, 24 Aug 2017 15:42:10 GMT):
@nimtiazm, I suggest you checkout fabric version v1.0.1, rebuild the docker containers within vagrant and run the Java sdk sample End2endIT. This is explained in the java sdk readme https://github.com/hyperledger/fabric-sdk-java Using a stable release is easier than staying at the tip of master all the time

girishgh88 (Fri, 25 Aug 2017 04:50:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EfzAxJ4sxgP7BxsX2) @rickr No. since I have already checking with my network which is up and running, I directly tried to integrate with it. Ok I will start with the provided integration test and update.

nnao (Fri, 25 Aug 2017 17:57:21 GMT):
Has joined the channel.

nimtiazm (Fri, 25 Aug 2017 20:21:35 GMT):
A general and a bit of newbie question. Is fabric java sdk a catchup game over go sdk or it'll stay head to head. I understand that the platform is written in go and libraries are supported through shim.

qiang0723 (Sat, 26 Aug 2017 10:00:20 GMT):
Has joined the channel.

chaitanya (Sun, 27 Aug 2017 11:22:36 GMT):
@rickr I have an application sending invokes parallelly to my SDK client. One of them gets validation code 0 (lets calls this T1) and the other gets 11 (lets call this T2), which is expected behavior. However, when I'm trying to return the TransactionID from the invoke interface to the application, it returns T1 txID twice, and the application never comes to know of the failed transaction T2. Any idea what's happening here?

duwenhui (Mon, 28 Aug 2017 05:40:54 GMT):
Has joined the channel.

rickr (Mon, 28 Aug 2017 13:06:52 GMT):
It's opensource depends on what's contributed

pschnap (Mon, 28 Aug 2017 16:00:07 GMT):
Is there a way to access an invocation's arguments from a BlockListener event's Block(Data)? I've been poking through the SDK but haven't really found anything yet

pschnap (Mon, 28 Aug 2017 16:04:12 GMT):
Nevermind, found it in TransactionActionInfo

zArchitectBill (Mon, 28 Aug 2017 22:12:14 GMT):
Has joined the channel.

grice_32 (Tue, 29 Aug 2017 00:28:32 GMT):
Has joined the channel.

yoyokeen (Tue, 29 Aug 2017 07:40:06 GMT):
```2017-08-29 07:39:28,724 DEBUG Channel:1930 - Channel foo send proposal to peer peer1.org1.example.com at url grpc://112.126.87.91:7056 2017-08-29 07:39:29,542 DEBUG Peer:152 - peer.sendProposalAsync name: peer1.org1.example.com, url: grpc://112.126.87.91:7056 2017-08-29 07:39:30,764 ERROR Channel:1977 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Transaction returned with failure: Incorrect arguments, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Transaction returned with failure: Incorrect arguments at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:1977) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1120) at org.hyperledger.fabric.sdkintegration.End2endIT1.runChannel(End2endIT1.java:312) at org.hyperledger.fabric.sdkintegration.End2endIT1.setup(End2endIT1.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Transaction returned with failure: Incorrect arguments at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)```

yoyokeen (Tue, 29 Aug 2017 07:41:18 GMT):
when I Instantiate chaincode with the error 'Incorrect arguments', but my arguments is correct which has 5 params.

CarlXK (Tue, 29 Aug 2017 08:49:47 GMT):
@rickr when create channel, i got an error in 1.0.1 version(sdk peer orderer), it work fine in 1.0.0 version, any update for channel create? ` 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Creating channel: xnchannel, client context Org1MSPuser 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Creating new channel xnchannel on the Fabric 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel adding ordererorderer.xnqkl.com, url: grpc://119.23.74.36:7050 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel sendUpdateChannel 2017-08-29 16:18:34.005 DEBUG 5 --- [nio-8080-exec-2] o.h.fabric.sdk.transaction.ProtoUtils : SignatureHeader: nonce: 5fe3471fe0237d1538e25370a2489c4048c0d245f6d5c75b, User:Org1MSPuser, MSPID: Org1MSP, idBytes: 040f12ab7eecb8aeb16c53371fc84e545be66e3212fffa8214e4954400c6f285 2017-08-29 16:18:34.005 DEBUG 5 --- [nio-8080-exec-2] o.h.fabric.sdk.transaction.ProtoUtils : ChannelHeader: type: CONFIG_UPDATE, version: 1, Txid: d1cae4bf150566247eefd2ebac7b152f3e6c4441560c132e055c68674400f41e, channelId: xnchannel, epoch 0 2017-08-29 16:18:34.010 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Orderer : Order.sendTransaction name: orderer.xnqkl.com, url: grpc://119.23.74.36:7050 2017-08-29 16:18:34.029 DEBUG 5 --- [ault-executor-1] o.hyperledger.fabric.sdk.OrdererClient : resp status value: 400, resp: BAD_REQUEST 2017-08-29 16:18:34.030 DEBUG 5 --- [nio-8080-exec-2] o.hyperledger.fabric.sdk.OrdererClient : Done waiting for reply! Got:status: BAD_REQUEST 2017-08-29 16:18:34.030 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel sendUpdateChannel 400 2017-08-29 16:18:34.032 ERROR 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel error: New channel xnchannel error. StatusValue 400. Status BAD_REQUEST org.hyperledger.fabric.sdk.exception.TransactionException: New channel xnchannel error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:378) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.(Channel.java:194) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1304) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) [fabric-sdk-java-1.0.1.jar!/:na] at com.xiangan.platform.sdk.api.service.FabricSdkService.createChannel(FabricSdkService.java:270) [classes!/:na] at com.xiangan.platform.sdk.api.service.FabricSdkService.constructChannel(FabricSdkService.java:174) [classes!/:na] at com.xiangan.platform.sdk.api.controller.ChannelController.newChannel(ChannelController.java:68) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] `

CarlXK (Tue, 29 Aug 2017 08:49:47 GMT):
@rickr when create channel, i got an error in 1.0.1 version(sdk peer orderer), it work fine in 1.0.0 version, any update for channel create? ` 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Creating channel: xnchannel, client context Org1MSPuser 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Creating new channel xnchannel on the Fabric 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel adding ordererorderer.xnqkl.com, url: grpc://119.23.74.36:7050 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel sendUpdateChannel 2017-08-29 16:18:34.005 DEBUG 5 --- [nio-8080-exec-2] o.h.fabric.sdk.transaction.ProtoUtils : SignatureHeader: nonce: 5fe3471fe0237d1538e25370a2489c4048c0d245f6d5c75b, User:Org1MSPuser, MSPID: Org1MSP, idBytes: 040f12ab7eecb8aeb16c53371fc84e545be66e3212fffa8214e4954400c6f285 2017-08-29 16:18:34.005 DEBUG 5 --- [nio-8080-exec-2] o.h.fabric.sdk.transaction.ProtoUtils : ChannelHeader: type: CONFIG_UPDATE, version: 1, Txid: d1cae4bf150566247eefd2ebac7b152f3e6c4441560c132e055c68674400f41e, channelId: xnchannel, epoch 0 2017-08-29 16:18:34.010 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Orderer : Order.sendTransaction name: orderer.xnqkl.com, url: grpc://119.23.74.36:7050 2017-08-29 16:18:34.029 DEBUG 5 --- [ault-executor-1] o.hyperledger.fabric.sdk.OrdererClient : resp status value: 400, resp: BAD_REQUEST 2017-08-29 16:18:34.030 DEBUG 5 --- [nio-8080-exec-2] o.hyperledger.fabric.sdk.OrdererClient : Done waiting for reply! Got:status: BAD_REQUEST 2017-08-29 16:18:34.030 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel sendUpdateChannel 400 2017-08-29 16:18:34.032 ERROR 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel error: New channel xnchannel error. StatusValue 400. Status BAD_REQUEST org.hyperledger.fabric.sdk.exception.TransactionException: New channel xnchannel error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:378) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.(Channel.java:194) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1304) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) [fabric-sdk-java-1.0.1.jar!/:na] at com.xiangan.platform.sdk.api.service.FabricSdkService.createChannel(FabricSdkService.java:270) [classes!/:na] at com.xiangan.platform.sdk.api.service.FabricSdkService.constructChannel(FabricSdkService.java:174) [classes!/:na] at com.xiangan.platform.sdk.api.controller.ChannelController.newChannel(ChannelController.java:68) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] `

CarlXK (Tue, 29 Aug 2017 08:49:47 GMT):
@rickr when create channel, i got an error in 1.0.1 version(sdk peer orderer), it work fine in 1.0.0 version, any update for channel create? ``` 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Creating channel: xnchannel, client context Org1MSPuser 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Creating new channel xnchannel on the Fabric 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel adding ordererorderer.xnqkl.com, url: grpc://119.23.74.36:7050 2017-08-29 16:18:34.004 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel sendUpdateChannel 2017-08-29 16:18:34.005 DEBUG 5 --- [nio-8080-exec-2] o.h.fabric.sdk.transaction.ProtoUtils : SignatureHeader: nonce: 5fe3471fe0237d1538e25370a2489c4048c0d245f6d5c75b, User:Org1MSPuser, MSPID: Org1MSP, idBytes: 040f12ab7eecb8aeb16c53371fc84e545be66e3212fffa8214e4954400c6f285 2017-08-29 16:18:34.005 DEBUG 5 --- [nio-8080-exec-2] o.h.fabric.sdk.transaction.ProtoUtils : ChannelHeader: type: CONFIG_UPDATE, version: 1, Txid: d1cae4bf150566247eefd2ebac7b152f3e6c4441560c132e055c68674400f41e, channelId: xnchannel, epoch 0 2017-08-29 16:18:34.010 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Orderer : Order.sendTransaction name: orderer.xnqkl.com, url: grpc://119.23.74.36:7050 2017-08-29 16:18:34.029 DEBUG 5 --- [ault-executor-1] o.hyperledger.fabric.sdk.OrdererClient : resp status value: 400, resp: BAD_REQUEST 2017-08-29 16:18:34.030 DEBUG 5 --- [nio-8080-exec-2] o.hyperledger.fabric.sdk.OrdererClient : Done waiting for reply! Got:status: BAD_REQUEST 2017-08-29 16:18:34.030 DEBUG 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel sendUpdateChannel 400 2017-08-29 16:18:34.032 ERROR 5 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Channel xnchannel error: New channel xnchannel error. StatusValue 400. Status BAD_REQUEST org.hyperledger.fabric.sdk.exception.TransactionException: New channel xnchannel error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:378) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.(Channel.java:194) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1304) [fabric-sdk-java-1.0.1.jar!/:na] at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) [fabric-sdk-java-1.0.1.jar!/:na] at com.xiangan.platform.sdk.api.service.FabricSdkService.createChannel(FabricSdkService.java:270) [classes!/:na] at com.xiangan.platform.sdk.api.service.FabricSdkService.constructChannel(FabricSdkService.java:174) [classes!/:na] at com.xiangan.platform.sdk.api.controller.ChannelController.newChannel(ChannelController.java:68) [classes!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131] ```

Styxt (Tue, 29 Aug 2017 09:16:18 GMT):
Hi all, could anyone here explain to me how i can connect the sdk to an existing Blockchain like the balance-transfer example - i looked at the tests but i can't quite figure out how it works and what files i need if the sdk is running on a different host where no components are running.

aso (Tue, 29 Aug 2017 09:47:38 GMT):
Has joined the channel.

deepakvparmar (Tue, 29 Aug 2017 10:12:51 GMT):
While sending sending transaction to orderer, How we can find out whether transaction has been timed out or not?

deepakvparmar (Tue, 29 Aug 2017 10:19:20 GMT):
In case of time out response based on configured invokeTimeOut value while sending successful transaction proposal response to orderer, Are we going to receive TransactionEventException in exceptionally() block?

mastersingh24 (Tue, 29 Aug 2017 12:21:41 GMT):
@rickr - If you have a chance, can you pull down and review https://gerrit.hyperledger.org/r/#/c/12909/ ?

mastersingh24 (Tue, 29 Aug 2017 12:21:51 GMT):
(it's a nice sample for the Java SDK)

rickr (Tue, 29 Aug 2017 12:27:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=w4EGAs36m5qiCyJK3) Anything in the orderer logs gives a hint ?

rickr (Tue, 29 Aug 2017 12:29:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aAem5FXeJNni9ehy7) End2endIT and End2endAndBackAgainIT are examples of creating and reconnecting back.

rickr (Tue, 29 Aug 2017 12:30:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dpwoCfKnJa7EznWqA) Should throw an exception there.

rickr (Tue, 29 Aug 2017 12:34:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N7j4ZLqgMgAr6GvSD) I +1 it. Not a committer to `fabric-samples`

rickr (Tue, 29 Aug 2017 12:34:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N7j4ZLqgMgAr6GvSD) I +1 it. Not a maintainer to `fabric-samples`

rickr (Tue, 29 Aug 2017 12:34:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N7j4ZLqgMgAr6GvSD) I +1 it. Not a maintainer to `fabric-samples` Once committed I'll add to our README.md a reference to it.

ascatox (Tue, 29 Aug 2017 12:43:08 GMT):
Hi All! Where can I find API documentation for this java SDK?

silliman (Tue, 29 Aug 2017 14:57:07 GMT):
I am trying to follow the README.md file at the root of the https://github.com/hyperledger/fabric-sdk-java repo with the goal of running the integration tests successfully. I have not used Maven before. I am at the 1.0.1 tag for fabric-sdk-java, fabric, and fabric-ca. ``` ubuntu@hyperledger-devenv:e43b68f:/opt/gopath/src/github.com/hyperledger/fabric-sdk-java$ mvn -version Apache Maven 3.3.9 Maven home: /usr/share/maven Java version: 1.8.0_131, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-93-generic", arch: "amd64", family: "unix" ``` I have run these commands that are mentioned in the *SDK dependencies* section of README.md: `mvn dependency:tree`, `mvn dependency:list` and `mvn dependency:analyze-report`. In all three of those commands I receive these warnings. Is this something I need to worry about or can they be safely ignored? ``` [WARNING] [WARNING] Some problems were encountered while building the effective model for org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.0.1 [WARNING] 'version' contains an expression but should be a constant. @ org.hyperledger.fabric-sdk-java:fabric-sdk-java:${fabric.sdk.java.version}, /opt/gopath/src/github.com/hyperledger/fabric-sdk-java/pom.xml, line 7, column 14 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ org.hyperledger.fabric-sdk-java:fabric-sdk-java:${fabric.sdk.java.version}, /opt/gopath/src/github.com/hyperledger/fabric-sdk-java/pom.xml, line 488, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] ``` Then, in the output from the `mvn dependency:analyze-report` command I receive these messages: ``` Unable to process: org.hyperledger.fabric.sdk.SDKUtils Unable to process: org.hyperledger.fabric.sdk.HFClient Unable to process: org.hyperledger.fabric.sdk.Channel$TL Unable to process: org.hyperledger.fabric.sdk.Channel Unable to process: org.hyperledger.fabric.sdk.helper.Utils Unable to process: org.hyperledger.fabric.sdk.helper.DiagnosticFileDumper Unable to process: org.hyperledger.fabric.sdk.EventHub$2 Unable to process: org.hyperledger.fabric.sdk.TestHFClient Unable to process: org.hyperledger.fabric.sdkintegration.End2endIT Unable to process: org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT Unable to process: org.hyperledger.fabric.sdkintegration.Util [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18.764 s [INFO] Finished at: 2017-08-29T14:07:55+00:00 [INFO] Final Memory: 39M/390M [INFO] ------------------------------------------------------------------------ ``` Are the *unable to process...* messages just prior to the BUILD SUCCESS message cause for concern?

CarlXK (Tue, 29 Aug 2017 15:20:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=esMoNtKiQCYmkxd94) @rickr there have a warning ``` 2017-08-29 23:19:34.885 CST [msp/identity] newIdentity -> DEBU 42f Creating identity instance for ID &{Org1MSP 040f12ab7eecb8aeb16c53371fc84e545be66e3212fffa8214e4954400c6f285} 2017-08-29 23:19:34.885 CST [msp] SatisfiesPrincipal -> DEBU 430 Checking if identity satisfies ADMIN role for Org1MSP 2017-08-29 23:19:34.885 CST [cauthdsl] func2 -> DEBU 431 0xc42006eb88 principal matched by identity 0 2017-08-29 23:19:34.885 CST [msp/identity] Verify -> DEBU 432 Verify: digest = 00000000 16 80 a1 78 8d 4a 6a e1 0a 4d 68 eb cf 00 c2 fa |...x.Jj..Mh.....| 00000010 4c bc ad 93 36 6f ab 5d 0a 3a 5e 75 af 65 f1 48 |L...6o.].:^u.e.H| 2017-08-29 23:19:34.885 CST [msp/identity] Verify -> DEBU 433 Verify: sig = 00000000 30 44 02 20 41 2a b7 9b 7c 4c a5 fb 78 34 82 cd |0D. A*..|L..x4..| 00000010 c4 14 73 b7 7a a4 b9 3b 91 6a c4 ef cd 3d 1d 5a |..s.z..;.j...=.Z| 00000020 6a e8 93 a2 02 20 4a 69 2f dd 23 f5 09 20 6b 31 |j.... Ji/.#.. k1| 00000030 5a bb 25 09 04 c0 84 85 79 05 49 c0 e8 ce c7 02 |Z.%.....y.I.....| 00000040 e6 c5 4c 2b ba d7 |..L+..| 2017-08-29 23:19:34.885 CST [cauthdsl] func2 -> DEBU 434 0xc42006eb88 principal evaluation succeeds for identity 0 2017-08-29 23:19:34.885 CST [cauthdsl] func1 -> DEBU 435 0xc42006eb88 gate 1504019974885041139 evaluation succeeds 2017-08-29 23:19:34.885 CST [orderer/common/broadcast] Handle -> WARN 436 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set ```

CarlXK (Tue, 29 Aug 2017 15:20:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=esMoNtKiQCYmkxd94) @rickr there have a warning, invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set? ``` 2017-08-29 23:19:34.885 CST [msp/identity] newIdentity -> DEBU 42f Creating identity instance for ID &{Org1MSP 040f12ab7eecb8aeb16c53371fc84e545be66e3212fffa8214e4954400c6f285} 2017-08-29 23:19:34.885 CST [msp] SatisfiesPrincipal -> DEBU 430 Checking if identity satisfies ADMIN role for Org1MSP 2017-08-29 23:19:34.885 CST [cauthdsl] func2 -> DEBU 431 0xc42006eb88 principal matched by identity 0 2017-08-29 23:19:34.885 CST [msp/identity] Verify -> DEBU 432 Verify: digest = 00000000 16 80 a1 78 8d 4a 6a e1 0a 4d 68 eb cf 00 c2 fa |...x.Jj..Mh.....| 00000010 4c bc ad 93 36 6f ab 5d 0a 3a 5e 75 af 65 f1 48 |L...6o.].:^u.e.H| 2017-08-29 23:19:34.885 CST [msp/identity] Verify -> DEBU 433 Verify: sig = 00000000 30 44 02 20 41 2a b7 9b 7c 4c a5 fb 78 34 82 cd |0D. A*..|L..x4..| 00000010 c4 14 73 b7 7a a4 b9 3b 91 6a c4 ef cd 3d 1d 5a |..s.z..;.j...=.Z| 00000020 6a e8 93 a2 02 20 4a 69 2f dd 23 f5 09 20 6b 31 |j.... Ji/.#.. k1| 00000030 5a bb 25 09 04 c0 84 85 79 05 49 c0 e8 ce c7 02 |Z.%.....y.I.....| 00000040 e6 c5 4c 2b ba d7 |..L+..| 2017-08-29 23:19:34.885 CST [cauthdsl] func2 -> DEBU 434 0xc42006eb88 principal evaluation succeeds for identity 0 2017-08-29 23:19:34.885 CST [cauthdsl] func1 -> DEBU 435 0xc42006eb88 gate 1504019974885041139 evaluation succeeds 2017-08-29 23:19:34.885 CST [orderer/common/broadcast] Handle -> WARN 436 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set ```

rickr (Tue, 29 Aug 2017 15:21:13 GMT):
I've not see issues if at the end BUILD SUCCESS is displayed

CarlXK (Tue, 29 Aug 2017 15:22:31 GMT):
2017-08-29 23:19:34.885 CST [orderer/common/broadcast] Handle -> WARN 436 Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: invalid mod_policy for element [Policy] /Channel/Application/Admins: mod_policy not set what wrong with this?

rickr (Tue, 29 Aug 2017 15:24:27 GMT):
Running against the same Fabric level ? --- Maybe try #fabric channel

rickr (Tue, 29 Aug 2017 15:27:59 GMT):
try regenerating your channel config block maybe with v101 fabric if you didn't try that

CarlXK (Tue, 29 Aug 2017 15:30:50 GMT):
@rickr thanks , will update the tool and retry it

silliman (Tue, 29 Aug 2017 15:31:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7YRtBdqdcuFp4tgYy) @rickr was this statement w.r.t. the `mvn dependency` commands only? For example, when I ran `mvn test` or `mvn install` to run the unit tests, I received lots of stack exceptions and errors yet at the end it displayed.... ``` Results : Tests run: 288, Failures: 0, Errors: 0, Skipped: 2 [INFO] [INFO] --- jacoco-maven-plugin:0.7.9:report (post-unit-test) @ fabric-sdk-java --- [INFO] Loading execution data file /opt/gopath/src/github.com/hyperledger/fabric-sdk-java/target/coverage-reports/jacoco-ut.exec [INFO] Analyzed bundle 'fabric-java-sdk' with 129 classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS ``` and when I tried to run the integration tests I received similar output despite seeing lots of exceptions in the *HFCAClientEnrollIT* portion of the test: ``` Tests run: 18, Failures: 0, Errors: 0, Skipped: 2 [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS ```

rickr (Tue, 29 Aug 2017 15:34:01 GMT):
From what I've seen BUILD SUCCESS is BUILD SUCCESS. Do any of the tests say Failure ?

silliman (Tue, 29 Aug 2017 15:40:14 GMT):
@rickr nothing that specifically says failure but I've got a lot of warnings, ERROR messages in the logs, lots of java exceptions, etc., NullPointerExceptions, IllegalArgumentExceptions, HTTP 404, 500, etc.

SandySun2000 (Tue, 29 Aug 2017 20:23:20 GMT):
Does any one have the experience to set up the eclipse environment to compile .proto files? I need help on that. Thanks!

SandySun2000 (Tue, 29 Aug 2017 23:49:18 GMT):
I made it work by following this link https://stackoverflow.com/questions/1578456/integrate-protocol-buffers-into-maven2-build

deepakvparmar (Wed, 30 Aug 2017 05:55:38 GMT):
We are currently handling timeout event when we are sending transaction proposal to orderer. We would also like to handle completion phase when orderer will send block to all peers, all peers will verify and commit transaction. Any suggestion or pointer how we can handle this use case?

aneb (Wed, 30 Aug 2017 06:04:38 GMT):
Has joined the channel.

gauravgiri (Wed, 30 Aug 2017 06:44:24 GMT):
Hi @rickr, One question regarding fabric-sdk-java to handle invoke() transactions. Invoke transactions are usually done in following 2 phases: channel.sendTransactionProposal & channel.sendTransaction There is a doubt/query regarding the second phase, channel.sendTransaction. When is the CompletableFuture object returned? 1. Is it returned when after the transactions are committed successfully by the committing peers? 2. OR is it returned when the transactions are just accepted by the orderer? If it is 1, can we rely that if we get the CompletableFuture object, the transactions have committed successfully in the committing peers? If it is 2, how can an application using fabric-sdk-java be sure that transactions are committed successfully by the committing peers? Code using fabric-sdk-java to use the channel.sendTransaction below: CompletableFuture future_transactionEvent = channel.sendTransaction(successful, channel.getOrderers()); TransactionEvent transactionEvent = future_transactionEvent.get();

MoulaliMvg (Wed, 30 Aug 2017 06:51:50 GMT):
Hi all I completed my fabric 1.0 set up with node sdk but I don't know about how to set up with java sdk can any one refer some link for how to proceed fabric set up with java sdk

HuangLijun (Wed, 30 Aug 2017 10:20:44 GMT):
hi all, I deployed a channel that contains peers from two orgs, and use the AND endorsement policy. Then I need to invoke chaincode under this scenario. So I new a Channel object "newChannel" and new "EventHub"s from two orgs, then newChannel.addEventHub(eventHub) and newChannel.initialize(). But I encountered below error, the eventhub from AMSP could be connected correctly but the ones from BMSP couldn't, and the "newChannel" could be only set one HFClient which only with one UserContext. *How could I achieve the goal that channel could connect to eventhubs from different orgs?* Thanks so much! ``` org.hyperledger.fabric.sdk.exception.EventHubException: io.grpc.StatusRuntimeException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID AMSP, received BMSP]] ```

pine (Wed, 30 Aug 2017 11:11:29 GMT):
Has joined the channel.

rickr (Wed, 30 Aug 2017 12:22:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MmkLg2vywr9xjkEjs) When the future is resolved all listening eventhubs have seen the transaction in a block completed successfully.

rickr (Wed, 30 Aug 2017 12:23:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=AhaJvFn2yjXgrus53) ^^^^

JiuZhuYou (Wed, 30 Aug 2017 12:27:27 GMT):
Has joined the channel.

greg.haskins (Wed, 30 Aug 2017 20:12:46 GMT):
Has left the channel.

leogzl (Thu, 31 Aug 2017 06:17:11 GMT):
Has joined the channel.

CarlXK (Thu, 31 Aug 2017 07:09:18 GMT):
@rickr after fabric network running about 14 hours, send the message to peer, send the message to order , got exception below, and send the message again got succeed, seems that the connection closed by peer and orderer, maybe the issue is from peer/orderer, what's wrong with it? ``` fabric-sdk-server|2017-08-31 10:16:35,081|DEBUG|[grpc-default-worker-ELG-1-6]|io.netty.handler.codec.http2.Http2ConnectionHandler|[id: 0xf7e80175, L:0 .0.0.0/0.0.0.0:35802 ! R:/10.135.56.171:8056] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. Forcing sh utdown of the connection. java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.write(IOUtil.java:148) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:432) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) at io.netty.handler.codec.http2.Http2ConnectionHandler.onError(Http2ConnectionHandler.java:573) at io.grpc.netty.AbstractNettyHandler.exceptionCaught(AbstractNettyHandler.java:84) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:285) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:264) at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:256) at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1301) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:285) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:264) at io.netty.channel.DefaultChannelPipeline.fireExceptionCaught(DefaultChannelPipeline.java:914) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.handleReadException(AbstractNioByteChannel.java:104) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:145) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) at java.lang.Thread.run(Thread.java:748) ```

CarlXK (Thu, 31 Aug 2017 07:09:18 GMT):
@rickr fabric network running about 14 hours, there always have transaction between sdk and peer/order, at one time got the exception below, send the message to peer/orderer failed, and send the message again got succeed, seems that the connection closed by peer and orderer and retry it will succeed, what's wrong with it? ``` fabric-sdk-server|2017-08-31 10:16:35,081|DEBUG|[grpc-default-worker-ELG-1-6]|io.netty.handler.codec.http2.Http2ConnectionHandler|[id: 0xf7e80175, L:0 .0.0.0/0.0.0.0:35802 ! R:/10.135.56.171:8056] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. Forcing sh utdown of the connection. java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.writev0(Native Method) at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51) at sun.nio.ch.IOUtil.write(IOUtil.java:148) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:432) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) at io.netty.handler.codec.http2.Http2ConnectionHandler.onError(Http2ConnectionHandler.java:573) at io.grpc.netty.AbstractNettyHandler.exceptionCaught(AbstractNettyHandler.java:84) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:285) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:264) at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:256) at io.netty.channel.DefaultChannelPipeline$HeadContext.exceptionCaught(DefaultChannelPipeline.java:1301) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:285) at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:264) at io.netty.channel.DefaultChannelPipeline.fireExceptionCaught(DefaultChannelPipeline.java:914) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.handleReadException(AbstractNioByteChannel.java:104) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:145) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) at java.lang.Thread.run(Thread.java:748) ```

deepakvparmar (Thu, 31 Aug 2017 09:59:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HAZftPSLrtm544fK5) @rickr Thank You Rick. It means, Once we are receiving TransactionEvent object in which transactionEvent.isValid() is truee, then peers have successfully verified readwrite set and committed transaction into ledger?

rickr (Thu, 31 Aug 2017 14:09:55 GMT):
As stated - Future is resolved successfully when listening eventhubs on the peers have seen a block that has the transaction marked valid.

CarlXK (Thu, 31 Aug 2017 14:39:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YrjBqdphhWGFPEHmR) @CarlXK @rickr any idea of this issue?

rickr (Thu, 31 Aug 2017 15:14:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YrjBqdphhWGFPEHmR) It just got tired after 14 hrs ? :) Seriously there to much that's happening to know. You'd have to have logs from ALL client, oderer, peers probably at debug level to pinpoint the issue. If its grpc issue it may require grpc tracing too. The SDK for any connections issue type exception SHOULD abandon that connection and start a new one. IMO any robust application should try for proposal endorsement failures do a retry. There is no issue with doing that -- that means creating a WHOLE new request and sending it to the peers again. For the orderer If failure occurs, the application should try to query for the block by transaction id queryBlockByTransactionID if not there or bad do a retry.

rickr (Thu, 31 Aug 2017 15:14:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YrjBqdphhWGFPEHmR) It just got tired after 14 hrs ? :) Seriously there too much that's happening to know. You'd have to have logs from ALL client, oderer, peers probably at debug level to pinpoint the issue. If its grpc issue it may require grpc tracing too. The SDK for any connections issue type exception SHOULD abandon that connection and start a new one. IMO any robust application should try for proposal endorsement failures do a retry. There is no issue with doing that -- that means creating a WHOLE new request and sending it to the peers again. For the orderer If failure occurs, the application should try to query for the block by transaction id queryBlockByTransactionID if not there or bad do a retry.

Vrai1127 (Thu, 31 Aug 2017 19:45:14 GMT):
Has joined the channel.

ascatox (Fri, 01 Sep 2017 09:16:49 GMT):
Hi All! I'm trying to execute the End2EndIT Test, but I've some problems with my blockchain configuration! What's the blockchain configuration needed to make to work the Integration Test?

JenilDoshi (Fri, 01 Sep 2017 21:11:55 GMT):
Has joined the channel.

JenilDoshi (Fri, 01 Sep 2017 21:17:59 GMT):
Hi All, I am also trying to use Java SDK and I am at first step of starting the Blockchain network by running docker-compose.yaml file inside fabric-sdk-java-test\src\test\fixture\sdkintegration. I start this using docker-compose up command and I am getting following error: ERROR: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: no such host. Can anyone help me in this.

JamieOBE (Sat, 02 Sep 2017 07:12:20 GMT):
Has joined the channel.

eason0208 (Mon, 04 Sep 2017 06:39:15 GMT):
Has joined the channel.

zaishengming (Mon, 04 Sep 2017 06:41:38 GMT):
@rickr when i run "docker-compose up --force-recreate" in "/home/xxx/gopath/src/github.com/hyperledger/fabric/sdkintegration" ,it is normal.But I run " fabric-sdk-java\src\test\java\org\hyperledger\fabric\sdkintegration\End2endIT.java",in the end prompt “peer1.org2.example.com | 2017-09-04 06:31:42.025 UTC [eventhub_producer] Chat -> ERRO 561 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled peer1.org2.example.com | 2017-09-04 06:31:42.025 UTC [eventhub_producer] deRegisterHandler -> DEBU 562 deregistering event type: BLOCK peer0.org2.example.com | 2017-09-04 06:31:42.025 UTC [eventhub_producer] Chat -> ERRO 831 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled peer0.org2.example.com | 2017-09-04 06:31:42.025 UTC [eventhub_producer] deRegisterHandler -> DEBU 832 deregistering event type: BLOCK”.How did this happen?

CarlXK (Mon, 04 Sep 2017 08:43:47 GMT):
@rickr now java sdk use tls cert only support absolute path ret.setProperty("pemFile", cert.getAbsolutePath()), could it support String or byte[] way , it will be convenient

CarlXK (Mon, 04 Sep 2017 08:43:47 GMT):
@rickr now java sdk use tls cert only support absolute path ret.setProperty("pemFile", cert.getAbsolutePath()), could it support String or byte[] way , it could be convenient

CarlXK (Mon, 04 Sep 2017 08:43:47 GMT):
@rickr now java sdk use tls cert only support absolute path ret.setProperty("pemFile", cert.getAbsolutePath()), could it support String or byte[] way , it could be convenient pemBytes was recently added.

CarlXK (Mon, 04 Sep 2017 08:43:47 GMT):
@rickr now java sdk use tls cert only support absolute path ret.setProperty("pemFile", cert.getAbsolutePath()), could it support String or byte[] way , it could be convenient

Vrai1127 (Mon, 04 Sep 2017 19:46:38 GMT):
Hi, could anyone help me understand what Java SDK currently doesn't do compared to Node SDK?

ngeorge (Tue, 05 Sep 2017 10:28:48 GMT):
Hi, while running the End2EndIT.java integration test, whatever endorsement policy is given, the instantiation is getting successful ..eg. with a wrong value for identity mspid, the endorsement is supposed to fail, but in my case, instantiation succeeds.. Could anyone explain the reason for the same?

deepakvparmar (Tue, 05 Sep 2017 11:05:34 GMT):
If We have TLS enabled fabric network, Do we need to provide certificates of peers, orderer and eventhub while invoking and querying existing channel?

LaurenceBonney (Tue, 05 Sep 2017 12:34:28 GMT):
Has joined the channel.

LaurenceBonney (Tue, 05 Sep 2017 12:48:31 GMT):
Hi there, I'm getting an issue with using the Java client connecting to an SSL enabled version of the fabric-samples/fabcar demo. The application is successfully updating and querying the update of the ledger, but the confirmation to the EventHub is failing, I do not see any errors in the peer container, orderer container does log this: 2017-09-05 12:25:19.530 UTC [msp/identity] newIdentity -> DEBU e30 Creating identity instance for ID &{Org1MSP 1eb740903a7f4e689b1a4647dc57acfa4fb9fd0b530147a885d28880f7c5a452} 2017-09-05 12:25:19.530 UTC [cauthdsl] func2 -> DEBU e31 0xc420164060 identity 0 does not satisfy principal: The identity is a member of a different MSP (expected OrdererMSP, got Org1MSP) 2017-09-05 12:25:19.530 UTC [cauthdsl] func2 -> DEBU e32 0xc420164060 principal evaluation fails My order is configured to use OrdererMSP and peer configured to use Org1MSP (as per the fabcar/basic-network config). My application logs the following: Tue Sep 05 13:25:19 BST 2017 [INFO] Creating endpoint for url grpcs://peer0.org1.example.com:7053 Sep 05, 2017 1:25:19 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-63] Created with target peer0.org1.example.com:7053 Tue Sep 05 13:25:19 BST 2017 [INFO] done with connect for EventHub:peer0.org1.example.com Tue Sep 05 13:25:19 BST 2017 [DEBUG] 1 eventhubs initialized Tue Sep 05 13:25:19 BST 2017 [DEBUG] Channel mychannel registerTransactionListenerProcessor starting Tue Sep 05 13:25:19 BST 2017 [DEBUG] Channel mychannel blockListener 105c1829-22fe-465e-91ed-c1c1cd36daaa starting Tue Sep 05 13:25:19 BST 2017 [DEBUG] Channel mychannel registerTransactionListenerProcessor completed Tue Sep 05 13:25:19 BST 2017 [DEBUG] Channel mychannel initialized Tue Sep 05 13:25:19 BST 2017 Thread: MQBridge (31) BCInvoke(bcInvoke) Channel initialised OK Tue Sep 05 13:25:19 BST 2017 Thread: MQBridge (31) BCInvoke(bcInvoke) Now calling chaincode Tue Sep 05 13:25:19 BST 2017 [DEBUG] ChannelHeader: type: ENDORSER_TRANSACTION, version: 1, Txid: 3679d6fffb96cbc84e914eb485e113f19c031ef4c8ec0f01b4afede4016b6ba9, channelId: mychannel, epoch 0 Tue Sep 05 13:25:19 BST 2017 [DEBUG] ChaincodeInvocationSpec type: GOLANG, chaincode name: fabcar, chaincode path: , chaincode version: 1 args("createCar", "CAR12", "Ford", "Focus ST", "Blue", "BOB") Tue Sep 05 13:25:19 BST 2017 [DEBUG] SignatureHeader: nonce: 10500926b9a232955ca5be831eab42fbe127ca1f0f6b0d00, User:admin, MSPID: Org1MSP, idBytes: 1eb740903a7f4e689b1a4647dc57acfa4fb9fd0b530147a885d28880f7c5a452 Tue Sep 05 13:25:19 BST 2017 [DEBUG] Channel mychannel send proposal to peer peer0.org1.example.com at url grpcs://peer0.org1.example.com:7051 Tue Sep 05 13:25:19 BST 2017 [DEBUG] peer.sendProposalAsync name: peer0.org1.example.com, url: grpcs://peer0.org1.example.com:7051 Tue Sep 05 13:25:19 BST 2017 [INFO] Creating endpoint for url grpcs://peer0.org1.example.com:7051 Tue Sep 05 13:25:19 BST 2017 [ERROR] EventHub:peer0.org1.example.com terminated is false shutdown is false has error UNAVAILABLE: Channel closed while performing protocol negotiation io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation Tue Sep 05 13:25:19 BST 2017 [ERROR] StatusRuntimeException Status Status{code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null}. Description Channel closed while performing protocol negotiation Sep 05, 2017 1:25:19 PM io.grpc.internal.ManagedChannelImpl INFO: [io.grpc.internal.ManagedChannelImpl-68] Created with target peer0.org1.example.com:7051 Tue Sep 05 13:25:19 BST 2017 [DEBUG] Channel mychannel got back from peer peer0.org1.example.com status: 200, message: OK Any ideas?

rickr (Tue, 05 Sep 2017 16:38:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Z6p4YgJu4zRbS9LKM) pemBytes was recently added.

rickr (Tue, 05 Sep 2017 16:40:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qujnggwoQH5pcgD9X) My only guess is it's not finding dockerhub IP or bad connection to it ?

rickr (Tue, 05 Sep 2017 16:43:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LPeZnmRFWY4fPJJ5y) Do the integration test fully run ? I think those messages is what the peer will produce each time the client disconnects from it.

rickr (Tue, 05 Sep 2017 16:45:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6nvuANMZN3wsjQup4) yes

rickr (Tue, 05 Sep 2017 16:50:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PeuxSaupmHBJqDBWv) Anything on the peer side logs ?

zaishengming (Wed, 06 Sep 2017 01:42:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3ucP8vxT9gYfN8W4N) @rickr thank you ,rickr.I understand with it.

smith (Wed, 06 Sep 2017 02:47:28 GMT):
Has joined the channel.

henryhs (Wed, 06 Sep 2017 03:04:16 GMT):
Has joined the channel.

zemtsov (Wed, 06 Sep 2017 06:33:47 GMT):
Has left the channel.

LaurenceBonney (Wed, 06 Sep 2017 11:37:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Pb2ckmt8usLvaLEGy) @rickr Nothing from the EventHub it appears to be working as far as the container is concerned (note: this is a fresh setup created today): 2017-09-06 11:28:47.535 UTC [eventhub_producer] AddEventType -> DEBU 03c Registering BLOCK 2017-09-06 11:28:47.535 UTC [eventhub_producer] AddEventType -> DEBU 03d Registering CHAINCODE 2017-09-06 11:28:47.535 UTC [eventhub_producer] AddEventType -> DEBU 03e Registering REJECTION 2017-09-06 11:28:47.535 UTC [eventhub_producer] AddEventType -> DEBU 03f Registering REGISTER 2017-09-06 11:28:47.535 UTC [eventhub_producer] start -> INFO 040 Event processor started 2017-09-06 11:29:47.494 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 2ea Entry 2017-09-06 11:29:47.494 UTC [eventhub_producer] SendProducerBlockEvent -> INFO 2eb Channel [mychannel]: Sending event for block number [0] 2017-09-06 11:29:47.494 UTC [eventhub_producer] Send -> DEBU 2ec Entry 2017-09-06 11:29:47.494 UTC [eventhub_producer] Send -> DEBU 2ed Event processor timeout > 0 2017-09-06 11:29:47.494 UTC [eventhub_producer] Send -> DEBU 2ee Event sent successfully 2017-09-06 11:29:47.494 UTC [eventhub_producer] Send -> DEBU 2ef Exit 2017-09-06 11:29:47.494 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 2f0 Exit 2017-09-06 11:30:02.731 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 440 Entry 2017-09-06 11:30:02.731 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 441 Channel [mychannel]: Block event for block number [1] contains transaction id: 290f4902d051545c0fabc94ce3a590d27fd9f58bc6860a3ccb74b8ea0e27f368 2017-09-06 11:30:02.731 UTC [eventhub_producer] SendProducerBlockEvent -> INFO 442 Channel [mychannel]: Sending event for block number [1] 2017-09-06 11:30:02.731 UTC [eventhub_producer] Send -> DEBU 443 Entry 2017-09-06 11:30:02.731 UTC [eventhub_producer] Send -> DEBU 444 Event processor timeout > 0 2017-09-06 11:30:02.731 UTC [eventhub_producer] Send -> DEBU 445 Event sent successfully 2017-09-06 11:30:02.731 UTC [eventhub_producer] Send -> DEBU 446 Exit 2017-09-06 11:30:02.731 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 447 Exit 2017-09-06 11:30:12.878 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 609 Entry 2017-09-06 11:30:12.878 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 60a Channel [mychannel]: Block event for block number [2] contains transaction id: 0abe2bd41ac7e0e92c337e4bf48266a870668d985f222e41824a1a16c1cc8046 2017-09-06 11:30:12.878 UTC [eventhub_producer] SendProducerBlockEvent -> INFO 60b Channel [mychannel]: Sending event for block number [2] 2017-09-06 11:30:12.878 UTC [eventhub_producer] Send -> DEBU 60c Entry 2017-09-06 11:30:12.878 UTC [eventhub_producer] Send -> DEBU 60d Event processor timeout > 0 2017-09-06 11:30:12.878 UTC [eventhub_producer] Send -> DEBU 60e Event sent successfully 2017-09-06 11:30:12.878 UTC [eventhub_producer] Send -> DEBU 60f Exit 2017-09-06 11:30:12.878 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 610 Exit 2017-09-06 11:31:15.258 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 723 Entry 2017-09-06 11:31:15.258 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 724 Channel [mychannel]: Block event for block number [3] contains transaction id: e9e3312afad7a2e2d5538bba30f20628dbf12678ab3660b6e0b36334782460cc 2017-09-06 11:31:15.258 UTC [eventhub_producer] SendProducerBlockEvent -> INFO 725 Channel [mychannel]: Sending event for block number [3] 2017-09-06 11:31:15.259 UTC [eventhub_producer] Send -> DEBU 726 Entry 2017-09-06 11:31:15.259 UTC [eventhub_producer] Send -> DEBU 727 Event processor timeout > 0 2017-09-06 11:31:15.259 UTC [eventhub_producer] Send -> DEBU 728 Event sent successfully 2017-09-06 11:31:15.259 UTC [eventhub_producer] Send -> DEBU 729 Exit 2017-09-06 11:31:15.259 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 72a Exit

LaurenceBonney (Wed, 06 Sep 2017 13:01:02 GMT):
@rickr The full peer log from startup including the SDK performing a query request is available here: https://ibm.box.com/s/j1g7k6er3yny3mvyb28c5vywedgb4fxc

rickr (Wed, 06 Sep 2017 14:52:30 GMT):
If going through some firewall/proxy/loadbalancer try setting the keepAliveTime see the End2endxxxxIT integration tests on how this is done.

rickr (Wed, 06 Sep 2017 14:52:30 GMT):
If going through some firewall/proxy/loadbalancer try setting the keepAliveTime see the End2endxxxxIT integration tests on how this is done. Even if you're not would give that a try.

LaurenceBonney (Wed, 06 Sep 2017 14:56:53 GMT):
I'll try that, its all local but worth a shot.

LaurenceBonney (Wed, 06 Sep 2017 15:28:34 GMT):
Am I right in thinking in terms of SSL, if I've got authority to connect to the peer I'll have (the same) authority to connect to the peer's eventhub?

rickr (Wed, 06 Sep 2017 16:49:36 GMT):
Certificate in general should be the same. If you're connect to the endorser port, which it seems you are, it should be the exact same for the eventhub port

rrb01 (Wed, 06 Sep 2017 23:26:35 GMT):
Has joined the channel.

Sean219 (Thu, 07 Sep 2017 08:48:37 GMT):
Has joined the channel.

roccia8685 (Thu, 07 Sep 2017 13:59:13 GMT):
Has joined the channel.

bercinho (Thu, 07 Sep 2017 15:52:39 GMT):
Hi @rickr do you by any chance have an example for UpdateChannelConfiguration / public void updateChannelConfiguration(UpdateChannelConfiguration updateChannelConfiguration, Orderer orderer, byte[]... signers) throws TransactionException, InvalidArgumentException {

bercinho (Thu, 07 Sep 2017 15:52:55 GMT):
I would like to change the BatchTime for a channel via the SDK

bercinho (Thu, 07 Sep 2017 15:53:02 GMT):
or BatchSize

bercinho (Thu, 07 Sep 2017 15:53:10 GMT):
any example would be of big help

bercinho (Thu, 07 Sep 2017 15:56:30 GMT):
when I see I need a configFile from the file system

bercinho (Thu, 07 Sep 2017 15:56:57 GMT):
is this the "config_update_as_envelope.pb" I can generate via the CLI commands

bercinho (Thu, 07 Sep 2017 15:58:06 GMT):
with the configtxlator service and manually fetching the config block via the peer command?

bercinho (Thu, 07 Sep 2017 16:06:13 GMT):
@bestbeforetoday could you please help with the above question, I see you have committed the UpdateChannelConfiguration class in git, I just would like to understand the expectations on the source file you are referring to? "* constructs a ChannelConfiguration object with the actual configuration gotten from the file system" ... what is the structure of the config allowed here? is this the one we generate via the configtxlator service & fetch via the peer? Thanks

bestbeforetoday (Thu, 07 Sep 2017 16:06:13 GMT):
Has joined the channel.

suganuma (Thu, 07 Sep 2017 16:57:20 GMT):
Hi, I have a question for a channel construction for multi organizations (End2endIT example is just a single organization). I add all peers and event hubs from each organization to the channel. I set user context of the client instance with peerAdmin of the corresponding organization when adding peers and event hubs. But I got the following error:

suganuma (Thu, 07 Sep 2017 16:57:31 GMT):
`2017-09-07 16:25:30,114 ERROR EventHub:208 - EventHub:peer1.org1.example.com terminated is false shutdown is false has error UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1MSP, received Org2MSP]]`

suganuma (Thu, 07 Sep 2017 16:58:05 GMT):
How can we get around the problem?

trongcauhcmus (Fri, 08 Sep 2017 02:29:30 GMT):
Has joined the channel.

trongcauhcmus (Fri, 08 Sep 2017 02:32:39 GMT):
hi, i'm new. maybe my questions already have but if you can, pls help me. IS the environment for java sdk of fabric the same with "byfn example"?

robert.feng (Fri, 08 Sep 2017 04:00:57 GMT):
Has joined the channel.

bestbeforetoday (Fri, 08 Sep 2017 09:30:49 GMT):
@bercinho My only contribution there was to tidy up some compile-time warnings. @rickr is the primary contributor so most likely to be able to help. @jimthematrix might also be able to help, or at least steer somebody else who can to your question

bestbeforetoday (Fri, 08 Sep 2017 09:31:18 GMT):
Has left the channel.

bercinho (Fri, 08 Sep 2017 09:50:37 GMT):
@bestbeforetoday many thanks for feedback, then I will wait for the Gents above to come back to me :)

bestbeforetoday (Fri, 08 Sep 2017 09:50:37 GMT):
Has joined the channel.

bestbeforetoday (Fri, 08 Sep 2017 09:51:14 GMT):
Has left the channel.

ascatox (Fri, 08 Sep 2017 10:26:22 GMT):
Hi All! I'm trying to develop an application by maven dependency of the SDK, but it seems to me that there are some missing methods respect to the SDK source code available on github.

ascatox (Fri, 08 Sep 2017 10:26:22 GMT):
Hi All! I'm trying to develop an application by maven dependency of the SDK, but it seems to me that there are some missing methods respect to the SDK source code available on github,

ascatox (Fri, 08 Sep 2017 10:27:17 GMT):
for example I couldn't find the method `channel.registerChaincodeEventListener``

ascatox (Fri, 08 Sep 2017 10:28:03 GMT):
and others

ascatox (Fri, 08 Sep 2017 10:28:03 GMT):
and different others.

ascatox (Fri, 08 Sep 2017 10:28:05 GMT):
.

pschnap (Fri, 08 Sep 2017 13:58:33 GMT):
Is there a way to have the SDK create a genesis block for creating a channel instead of having to create it externally then read it in?

sativ (Fri, 08 Sep 2017 14:32:13 GMT):
Hi guys, could you please let me know where can I get the latest "Hyperledger Fabric SDK Design Specification" I have a document that I've downloaded in the end of 2016, but can't seems to find the newer version thanks

deepakvparmar (Sat, 09 Sep 2017 10:59:48 GMT):
@rickr : While executing End2EndIT.java, We have enabled runningTLS= true and runningFabricCATLS=false. We could able to register user successfully, but getting following error while constructing channel, Any pointer or suggestion would be very helpful. org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: UNAVAILABLE at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:169) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:133) at org.hyperledger.fabric.sdk.Channel.(Channel.java:222) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1121) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:577) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 000000040000000000000004080000000000000efff1 at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1057) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)

deepakvparmar (Sat, 09 Sep 2017 11:44:26 GMT):
@rickr : Our fabric java client program is working fine if TLS is not enabled. Now, When we are enabling TLS by providing following properties , We are getting exception. sslProvider=openSSL negotiationType=TLS In addition of above properties, We are also providing pemFile for each peer, orderer and eventhub before invoking channel. Exception we are receiving is: org.hyperledger.fabric.sdk.Channel sendProposalToPeers Sending proposal to peer1.org1.sla.mufg.com failed because of: gRPC failure=Status{ code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2029) at org.hyperledger.fabric.sdk.Channel.queryChannels(Channel.java:1701) at org.hyperledger.fabric.sdk.HFClient.queryChannels(HFClient.java:393) at com.common.bcb.config.FabricManager.useExistingChannel(FabricManager.java:170) at com.common.bcb.config.FabricManager.initChannel(FabricManager.java:115) at com.common.bcb.config.FabricManager.invoke(FabricManager.java:233) at com.common.bcb.services.FabricChaincodeServiceImpl.invoke(FabricChaincodeServiceImpl.java:65) at com.business.service.SLAServiceDelegatorImpl.listSLAs(SLAServiceDelegatorImpl.java:82) at com.business.service.SLAServiceDelegatorImpl$Proxy$_$$_WeldClientProxy.listSLAs(Unknown Source) at com.business.SLAsResource.listSLAs(SLAsResource.java:85) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.lang.Thread.run(Thread.java:785)

spiditec (Sat, 09 Sep 2017 15:35:47 GMT):
Has joined the channel.

MariaHenderson (Sun, 10 Sep 2017 09:57:42 GMT):
Has joined the channel.

Peaches (Sun, 10 Sep 2017 14:46:33 GMT):
Has joined the channel.

ngeorge (Mon, 11 Sep 2017 06:45:56 GMT):
Hi All, I am trying to use Java SDK , to instantiate the chaincode on two organisations .I am using the configurations which are used in End2EndIT.java. The instantiation succeeds when the instantiate method is called on the organisations individually(as shown in End2EndIT.java ).. but while trying to instantiate on two organisations together, it fails with the below error: 2017-09-11 05:41:00,325 ERROR Channel:2029 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP Org1MSP is unknown, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2029) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1174) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1136) ...... Caused by: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown at io.grpc.Status.asRuntimeException(Status.java:540) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Does Java SDK support instantiation on multiple organisations connected to same channel?

bercinho (Mon, 11 Sep 2017 11:31:53 GMT):
Hi @rickr do you by any chance have an example for UpdateChannelConfiguration / public void updateChannelConfiguration(UpdateChannelConfiguration updateChannelConfiguration, Orderer orderer, byte[]... signers) throws TransactionException, InvalidArgumentException { I would like to change the BatchTime for a channel via the SDK or BatchSize any example would be of big help when I see I need a configFile from the file system is this the "config_update_as_envelope.pb" I can generate via the CLI commands with the configtxlator service and manually fetching the config block via the peer command?

jeffgarratt (Mon, 11 Sep 2017 15:20:06 GMT):
Has joined the channel.

suganuma (Mon, 11 Sep 2017 15:48:19 GMT):
@ngeorge One point to be careful (in channel construction and chaincode installation) is to switch the client user context to the peerAdmin from corresponding organization. One problem I noticed in java-sdk is that the EventHub connection uses the current user context. I raised the issue FAB-6101 and will put the fix code soon.

rickr (Mon, 11 Sep 2017 16:11:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Tyaoopc8HfJtxYNq5) UpdateChannelIT.java ?

rickr (Mon, 11 Sep 2017 16:14:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7BAzzxo9JsMAjWqyC) No

rickr (Mon, 11 Sep 2017 16:16:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bYd5xeNm83wwS2hbz) There is only one version and it's obsolete given the changes that occurred as the fabric matured.

rickr (Mon, 11 Sep 2017 16:19:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TSgY2LBWZREwBgdtn) The integration suite can be run with TLS and in our verify builds it only run that way so I have to think it's working. More than like your not providing there right certs or the generated certs have wrong CN

rickr (Mon, 11 Sep 2017 16:34:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WmDew6B5fmAmcYpay) You can only instantiate CC on your OWN organization's peers. Also, currently you can only register an event hub to listen that are your own. You can send proposals for endorsement to all peers in a channel even those NOT in your organization. If you want to simulate this you will need create two clients, two channels. Set user context for each of the organizations on the separate clients. Join the peer that is on the client that user context matches add the other. Add an eventhub of the peer that is set for the organization the user context is on the client.

deepakvparmar (Tue, 12 Sep 2017 05:29:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Toth6kRQLE9XWnLuJ) @rickr : Thank You Rick.

ngeorge (Tue, 12 Sep 2017 06:52:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HQsnukigeCMEdG9KA) @rickr Thank you.

ngeorge (Tue, 12 Sep 2017 06:52:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HQsnukigeCMEdG9KA) @rickr Thank you. By mentioning two channels did you mean two different channels or two instances of the same channel with appropriate peers added to them (peers that is on the client that user context matches )?

CarlXK (Tue, 12 Sep 2017 08:49:13 GMT):
@rickr we add below code , it makes client & server connection stable peerProperties.put("grpc.NettyChannelBuilderOption.keepAliveWithoutCalls", new Object[]{true});

CarlXK (Tue, 12 Sep 2017 08:49:13 GMT):
@rickr we add below code , it makes client & server connection stable peerProperties.put("grpc.NettyChannelBuilderOption.keepAliveWithoutCalls", new Object[]{true}); imp

CarlXK (Tue, 12 Sep 2017 08:49:13 GMT):
@rickr we add below code , it improve the stability client & server connection peerProperties.put("grpc.NettyChannelBuilderOption.keepAliveWithoutCalls", new Object[]{true});

CarlXK (Tue, 12 Sep 2017 08:49:13 GMT):
@rickr we add below code , it improve the stability of client & server connection peerProperties.put("grpc.NettyChannelBuilderOption.keepAliveWithoutCalls", new Object[]{true});

ngeorge (Tue, 12 Sep 2017 09:31:51 GMT):
As per the document, "the initial instantiation applies to all peers in the channel". If we try instantiate a second time the error thrown by SDK is "chaincode exists", while the error message should have been something that says that the chaincode is already instantiated. 2017-09-11 13:10:39,666 ERROR Channel:2029 - Sending proposal to peer0.ABC failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: chaincode exists example_cc), cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: chaincode exists example_cc) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2029) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1174) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1136) .... Please correct me if I am wrong.

sajeevkhan (Tue, 12 Sep 2017 09:37:29 GMT):
Hi, I am trying to fetch the complete details of a channel using JAVA SDK. The channel is already created successfully with multiple peers joined already on it. There are a couple of eventHubs added to the channel. Later, I am trying to fetch the channels on the peer as follows Set channels = client.queryChannels(peer); And then I get the details of the Channel as follows: Channel channel = client.newChannel(channelName); And then I try to get the Peers and Eventhubs as follows: Collection eventHubs = channel.getEventHubs(); Collection peers = channel.getPeers(); However, the eventHubs and peers are always returned empty. Am I missing something here?

sajeevkhan (Tue, 12 Sep 2017 09:39:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4emGNrgYXPoTWbpio) @DeutscheBahn-BlockchainDev Were able to get the Channel Object. If yes, does it have the list of peers and evenhubs on the object.

deepakvparmar (Tue, 12 Sep 2017 09:49:04 GMT):
@rickr : Is there provision of mock services into fabric-sdk-java?

rickr (Tue, 12 Sep 2017 15:26:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZMwWcp45ehi5Tyfpr) More like two instance of the same channel so yes.

rickr (Tue, 12 Sep 2017 15:27:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7eDixWFvCR4paC4eG) I've noted this in the README.md and added it to the End2endIT.java -- Thanks!

rickr (Tue, 12 Sep 2017 15:29:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ci7vT8tYzHePgtLri) Not SDK generated errors. These are directly returned from the Fabric so you need to address in the #fabric channel.

rickr (Tue, 12 Sep 2017 15:31:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YBJJz5a5tpFu7TMjF) Not sure what's being asked.

deepakvparmar (Wed, 13 Sep 2017 05:23:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oWv5uFnqtEEC7uMME) @rickr : Thank You Rick. Actually, We have written java client using fabric-java-sdk to connect fabric network, for invoking/querying chaincode, now, We would like to write unit test cases for the same. As we would like to avoid using actual running fabric network in Unit Test Cases, We are trying to find if fabric-java-sdk is providing any mock services for the same.

sativ (Wed, 13 Sep 2017 07:55:14 GMT):
Hi guys, I have a problem running End2EndIT on 2 machines. My setup is: a VM where I have built Java SDK, and tested End2EndIT to run successfully. Then I have a 2nd Linux system in the same network, where I can't use Maven. I have copied _fabric-sdk-java.jar_ file from _target_ folde from a VM to the 2nd system. I have also downloaded and copied all 3rd party libraries as *.jar files and included them into the project The goal - is to run End2EndIT by connecting it to the original VM that runs Fabric network using Docker. Currently when I run it, I get the error below. Docker containers are running, and I can get the test running fine on a VM. Could you please have a look and see where could the problem be? Struggling for several days already...

sativ (Wed, 13 Sep 2017 07:55:32 GMT):

Message Attachments

gxx (Wed, 13 Sep 2017 10:20:20 GMT):
Has joined the channel.

rickr (Wed, 13 Sep 2017 13:00:36 GMT):
Have your tried from the system running the client to use telnet to the system running the fabric ca ?

rickr (Wed, 13 Sep 2017 13:01:21 GMT):
Guessing firewalls blocking

rickr (Wed, 13 Sep 2017 13:19:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=icnvPcFnLxejSo4k2) We do some very simplistic mocking for exercising code for negative paths. Most coverage requires actual Fabric network, Integration tests.

Girish.GH (Wed, 13 Sep 2017 13:37:53 GMT):
Has joined the channel.

Girish.GH (Wed, 13 Sep 2017 13:47:47 GMT):
by using fabric-sdk-java client I am trying to invoke chaincode installed and instantiated in peers on my hyperledger fabric network setup locall in windows using docker images. I am able to invoke and query the chain code to the peer `peer0.org2.example.com`, but when I am trying the same to the peer `peer0.org2.example.com` getting the following error ``` 2017-09-13 13:22:45,382 main ERROR Channel:2241 - Sending proposal to peer0.org2.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2241) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2155) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2089) at com.ibs.blockchain.client.utility.BlockChainUtility.sendProposal(BlockChainUtility.java:232) at com.ibs.blockchain.client.utility.BlockChainUtility.createFlight(BlockChainUtility.java:80) at com.ibs.blockchain.client.test.BCAPITest.main(BCAPITest.java:9) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:427) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:419) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:60) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:493) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$500(ClientCallImpl.java:422) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:525) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ``` while looking to the docker-compose.yaml the port mapping is like ``` peer0.org1.example.com ports: - 7051:7051 - 7053:7053 peer0.org2.example.com ports: - 8051:7051 - 8053:7053 ``` it is working only with peer having the port same as tcp port(7051) but getting the above error with the peer having different port 8051. why?

Girish.GH (Wed, 13 Sep 2017 13:47:47 GMT):
by using fabric-sdk-java client I am trying to invoke chaincode installed and instantiated in peers on my hyperledger fabric network setup locall in windows using docker images. I am able to invoke and query the chain code to the peer `peer0.org1.example.com`, but when I am trying the same to the peer `peer0.org2.example.com` getting the following error ``` 2017-09-13 13:22:45,382 main ERROR Channel:2241 - Sending proposal to peer0.org2.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2241) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2155) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2089) at com.ibs.blockchain.client.utility.BlockChainUtility.sendProposal(BlockChainUtility.java:232) at com.ibs.blockchain.client.utility.BlockChainUtility.createFlight(BlockChainUtility.java:80) at com.ibs.blockchain.client.test.BCAPITest.main(BCAPITest.java:9) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:427) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:419) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:60) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:493) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$500(ClientCallImpl.java:422) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:525) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) ``` while looking to the docker-compose.yaml the port mapping is like ``` peer0.org1.example.com ports: - 7051:7051 - 7053:7053 peer0.org2.example.com ports: - 8051:7051 - 8053:7053 ``` it is working only with peer having the port same as tcp port(7051) but getting the above error with the peer having different port 8051. why?

AnilOner (Thu, 14 Sep 2017 03:02:54 GMT):
Has joined the channel.

CallMain (Thu, 14 Sep 2017 06:41:46 GMT):
Has joined the channel.

jarvis26 (Thu, 14 Sep 2017 07:07:41 GMT):
Has joined the channel.

zhaochy (Fri, 15 Sep 2017 03:30:39 GMT):
hi guys, is anyone knows where the chaincode is stored after I successfully invoke the `client.installChaincode()` from sdk-node?

zhaochy (Fri, 15 Sep 2017 03:34:15 GMT):
some path at the target peer, I guess, can anyone explicate it ?

willenchou (Fri, 15 Sep 2017 08:27:46 GMT):
Has joined the channel.

willenchou (Fri, 15 Sep 2017 08:42:46 GMT):
in one node ,i user "EndToEndIT" create a channel named "foo",it work . how can i user the channel in other node with the java sdk. what is the steps.

szlaci1983 (Fri, 15 Sep 2017 10:37:04 GMT):
Hey, I just like to ask you guys about your approach of developing blockchain solutions.... are you guys using composer or writing the chaincode in GOlang?

rickr (Fri, 15 Sep 2017 13:06:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QvXpPcpfQtokcusm8) By node := another system ? Look at End2endAndBackAgainIT.java

sativ (Fri, 15 Sep 2017 14:12:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uKy2a93H4GfddtBXp) @rickr Thanks, it was a firewall indeed

sativ (Fri, 15 Sep 2017 14:57:24 GMT):
hi guys, could you please have a look at the errors I'm getting while running End2EndIT from a remote system

sativ (Fri, 15 Sep 2017 14:57:34 GMT):
server side logs

sativ (Fri, 15 Sep 2017 14:58:04 GMT):

Message Attachments

sativ (Fri, 15 Sep 2017 14:58:33 GMT):
client's side log: org.hyperledger.fabric_ca.sdk.exception.RegistrationException: Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@4273cc8b url: http://130.119.126.220:7054 POST request to http://130.119.126.220:7054/api/v1/register failed request body {"id":"user2_0","type":"user","max_enrollments":0,"affiliation":"org1.department1","attrs":[]} with status code: 400. Response: {"success":false,"result":null,"errors":[{"code":400,"message":"Authorization failure"}],"messages":[]} at org.hyperledger.fabric_ca.sdk.HFCAClient.register(HFCAClient.java:252) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:207) at org.hyperledger.fabric.sdkintegration.is_test.main(is_test.java:14) Caused by: java.lang.Exception: POST request to http://130.119.126.220:7054/api/v1/register failed request body {"id":"user2_0","type":"user","max_enrollments":0,"affiliation":"org1.department1","attrs":[]} with status code: 400. Response: {"success":false,"result":null,"errors":[{"code":400,"message":"Authorization failure"}],"messages":[]} at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:721) at org.hyperledger.fabric_ca.sdk.HFCAClient.register(HFCAClient.java:243) ... 2 more Exception in thread "main" java.lang.AssertionError: Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@4273cc8b url: http://130.119.126.220:7054 POST request to http://130.119.126.220:7054/api/v1/register failed request body {"id":"user2_0","type":"user","max_enrollments":0,"affiliation":"org1.department1","attrs":[]} with status code: 400. Response: {"success":false,"result":null,"errors":[{"code":400,"message":"Authorization failure"}],"messages":[]} at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:250) at org.hyperledger.fabric.sdkintegration.is_test.main(is_test.java:14)

szhman (Fri, 15 Sep 2017 17:11:09 GMT):
Has joined the channel.

willenchou (Sat, 16 Sep 2017 05:54:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wWRQpMpJbzM9J9mfD) @rickr it means another system,it worked now,ths

willenchou (Sat, 16 Sep 2017 05:56:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wWRQpMpJbzM9J9mfD) @rickr by the way ,is there any function 2 query chaincodeid on chains

willenchou (Sat, 16 Sep 2017 05:56:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wWRQpMpJbzM9J9mfD) @rickr by the way ,is there any function 2 query chaincodeid on chains by txid

wanghhao (Sat, 16 Sep 2017 16:15:38 GMT):
Has joined the channel.

luke16 (Mon, 18 Sep 2017 01:23:22 GMT):
Has joined the channel.

CarlXK (Mon, 18 Sep 2017 02:26:43 GMT):
@rickr i see the code of HFClient.newChannel changed in master branch, channel object cached by name and only have one copy but in some scenario, we need more channel objects, ex: build a channel for peer1/peer2/peer3/orderer1, build another channel for peer1/peer3/orderer1 and IMO, the sdk don't need to do the cache function things, cache need implemented by apps ``` public Channel newChannel(String name) throws InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Channel name can not be null or empty string."); } synchronized (channels) { if (channels.containsKey(name)) { throw new InvalidArgumentException(format("Channel by the name %s already exits", name)); } logger.trace("Creating channel :" + name); Channel newChannel = Channel.createNewInstance(name, this); channels.put(name, newChannel); return newChannel; } } ```

CarlXK (Mon, 18 Sep 2017 02:26:43 GMT):
@rickr i see the code of HFClient.newChannel changed in master branch, channel object cached in Map and only have one copy. but in some scenario, we need more channel objects for a channel, ex: build a channel obj for peer1/peer2/peer3/orderer1, build another channel obj for peer1/peer3/orderer1 and IMO, the SDK shouldn't do the cache function, cache need implemented by apps ``` public Channel newChannel(String name) throws InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Channel name can not be null or empty string."); } synchronized (channels) { if (channels.containsKey(name)) { throw new InvalidArgumentException(format("Channel by the name %s already exits", name)); } logger.trace("Creating channel :" + name); Channel newChannel = Channel.createNewInstance(name, this); channels.put(name, newChannel); return newChannel; } } ```

CarlXK (Mon, 18 Sep 2017 02:26:43 GMT):
@rickr i see the code of HFClient.newChannel changed in master branch, channel object cached in Map and only have one copy. but in some scenario, we need more channel objects for a channel, ex: build a channel obj for peer1/peer2/peer3/orderer1, build another channel obj for peer1/peer3/orderer1 and IMO, the SDK shouldn't do the cache function, cache need implemented by apps ``` public Channel newChannel(String name) throws InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Channel name can not be null or empty string."); } synchronized (channels) { if (channels.containsKey(name)) { throw new InvalidArgumentException(format("Channel by the name %s already exits", name)); } logger.trace("Creating channel :" + name); Channel newChannel = Channel.createNewInstance(name, this); channels.put(name, newChannel); return newChannel; } } ```

chenshiok (Mon, 18 Sep 2017 02:48:54 GMT):
Has joined the channel.

jarvis26 (Mon, 18 Sep 2017 06:00:38 GMT):
Hi..I am trying to do a sample using the java sdk using my own fabric network. I have my distributed network setup on remote machines. Any pointers on what changes are required to be made in what files. Thanks in advance.

rickr (Mon, 18 Sep 2017 13:06:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6NEmJXscxTtb8hnj8) There is no *caching*.

tsnyder (Mon, 18 Sep 2017 13:10:58 GMT):
Question on Managing Endorsements - If endorsement requests are sent out simultaneously (almost - meaning not serially) does the Java SDK respond for Endorsement on the minimal satisfaction / denial of the Endorsement per the Endorsement Policy or when all requests have been received or the timeout triggered?

tsnyder (Mon, 18 Sep 2017 13:14:01 GMT):
Example for question on Endorsement - if the Endorsement Policy is 2 out of 3, and 3 Proposals are sent out - would the SDK respond on receiving 2 successful Endorsements or would it wait until either the 3rd was received or the timeout period expired?

rickr (Mon, 18 Sep 2017 13:17:43 GMT):
The SDK does nothing with *enforcing* policies on endorsements.

pschnap (Mon, 18 Sep 2017 13:17:51 GMT):
What permissions do I need to setup/enable for a user to deploy chaincode from the SDK? I'm getting an error starting with the following: `Authorization for INSTALL has been denied`. I'm using the peer admin to deploy

rickr (Mon, 18 Sep 2017 13:21:55 GMT):
Peer admin should have that. I'm guessing it's not the peer admin or your hitting something else. "deploy" is rather ambiguous, are you installing or instantiating CC?

pschnap (Mon, 18 Sep 2017 13:29:00 GMT):
the error I'm getting is when I'm trying to install (though the code then tries to instantiate after that)

pschnap (Mon, 18 Sep 2017 13:29:30 GMT):
here's the full error message: ``` Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])) ```

pschnap (Mon, 18 Sep 2017 13:29:44 GMT):
it's weird that it says it's not an admin because it is the admin user

pschnap (Mon, 18 Sep 2017 13:29:48 GMT):
@rickr ^

pschnap (Mon, 18 Sep 2017 13:31:43 GMT):
erm, I guess I don't know if it's the _peer_ admin, it's the admin user associated with the CA (which I assume is the peer admin)

rickr (Mon, 18 Sep 2017 13:35:36 GMT):
NOT :)

rickr (Mon, 18 Sep 2017 13:37:02 GMT):
Cryptogen produces the admin peers credentials (Certs and private keys) Seen End2endIT for what it uses as the peer admin.

rickr (Mon, 18 Sep 2017 13:37:02 GMT):
Cryptogen produces the admin peers credentials (Certs and private keys) See End2endIT for what it uses as the peer admin.

pschnap (Mon, 18 Sep 2017 13:38:29 GMT):
ok, I'll take a look at that in more depth -- it's what I was following already

pschnap (Mon, 18 Sep 2017 13:39:12 GMT):
but I do have to use the peer admin instead of the admin CA user, correct?

rickr (Mon, 18 Sep 2017 13:39:22 GMT):
To be honest admin was a bad choice for the CA .. it should probably have been named CA registrar

pschnap (Mon, 18 Sep 2017 13:39:38 GMT):
eh, hindsight

pschnap (Mon, 18 Sep 2017 13:44:29 GMT):
Aha, found it in End2endIT; thanks @rickr !

tsnyder (Mon, 18 Sep 2017 13:50:22 GMT):
@rickr - (The SDK does nothing with *enforcing* policies on endorsements.) - I interpret your response as - it waits for all Proposal Responses to return or the timeout.

rickr (Mon, 18 Sep 2017 14:36:55 GMT):
Sends endorsements to all peers in parallel. If one times out, It should have an error code 500 with an appropriate message. Other peer endorsements that were successful would be ok (200). It' up to the application to decide if that meets it's requirement.

waslleysouza (Mon, 18 Sep 2017 15:44:09 GMT):
Has joined the channel.

SandySun2000 (Tue, 19 Sep 2017 01:06:31 GMT):
I followed the JAVA-SDK readme file, but I have trouble to perform the following step: If `build/bin/configtxgen` tool is not present run `make configtxgen`. I want to customize channel.tx instead of using the pregenerated foo.tx and bar.tx. Do you have any successful experience to share with me? Thanks in the advance!

rickr (Tue, 19 Sep 2017 14:33:09 GMT):
http://hyperledger-fabric.readthedocs.io/en/latest/configtxgen.html

SandySun2000 (Tue, 19 Sep 2017 17:22:23 GMT):
@rickr I have problem to find "build/bin/configtxgen".

rickr (Tue, 19 Sep 2017 17:32:57 GMT):
If its not in fabric documentation ask in #fabric channel it's their tool. If it's not documented any where obvious open a JIRA against Fabric

SandySun2000 (Tue, 19 Sep 2017 17:59:22 GMT):
@rickr I didn't know configtxgen is fabric tool. I thought it is the JAVA-SDK tool. After I issued "make configtxgen" under fabric. It works. Thanks!

asaningmaxchain (Wed, 20 Sep 2017 06:47:57 GMT):
Has joined the channel.

asaningmaxchain (Wed, 20 Sep 2017 06:48:35 GMT):
@rickr i see the source code about the fabric-sdk-java,it use the async way to make transaction

asaningmaxchain (Wed, 20 Sep 2017 06:48:36 GMT):
?

bmalavan (Wed, 20 Sep 2017 07:02:53 GMT):
Hi, I have a scenario here. My chaincode return 'shim.Error("some Data")' for a specific business logic. However, when I send proposal for this kind of transaction, it fails ( as expected ) and returning proposal response (failed). I am not able to get the `some Data` using `getMessage()` back using my Java SDK client. Meanwhile, if my response is `shim.Success ("some data in bytes")` I am able to get the Payload message. Is this expected behaviour? I am using HLF v1.0

bmalavan (Wed, 20 Sep 2017 07:02:53 GMT):
Hi, I have a scenario here. My chaincode return `shim.Error("some Data")` for a specific business logic. However, when I send proposal for this kind of transaction, it fails ( as expected ) and returning proposal response (failed). I am not able to get the `some Data` using `getMessage()` back using my Java SDK client. Meanwhile, if my response is `shim.Success ("some data in bytes")` I am able to get the Payload message. Is this expected behaviour? I am using HLF v1.0

clempo (Wed, 20 Sep 2017 15:31:29 GMT):
@rickr, I believe the future sret leaks in Channel.sendTransaction(...) if communication with all the orderers fails, that's because sret is registered but no partner knows about it and therefore nothing can fire it

clempo (Wed, 20 Sep 2017 15:32:26 GMT):
The cleanup based on timeouts was removed a while ago

clempo (Wed, 20 Sep 2017 15:39:27 GMT):
@rickr, I believe the name of the method BlockInfo.getTransactionActionInfos() is wrong since it returns Iterable. The same method in TransactionEnvelopeInfo makes a lot more sense since it returns Iterable.

rickr (Wed, 20 Sep 2017 15:42:16 GMT):
K best if you open JIRAs for this

rickr (Wed, 20 Sep 2017 15:42:23 GMT):
seperate ones please

clempo (Wed, 20 Sep 2017 15:45:54 GMT):
@rickr, I think there is a problem of types for TxNum between the method TransactionEnvelopeInfo.getTransactionActionInfo(int txNum) and Version.getTxNum() which returns long.

clempo (Wed, 20 Sep 2017 15:48:25 GMT):
Talking about Version, it contains a BlockNum and a TxNum, what happens if the block contains multiple Envelopes since there is no EnvelopeNum, does the transaction index keep counting between envelopes?

qingsongGuo (Thu, 21 Sep 2017 04:56:57 GMT):
Has joined the channel.

rrb01 (Thu, 21 Sep 2017 12:47:56 GMT):
How do I call one chaincode from another chaincode in HyperLedger Fabric Java SDK?

szoghybe (Thu, 21 Sep 2017 13:48:09 GMT):
# As described on page https://github.com/hyperledger/fabric-sdk-java # I have done: git clone https://github.com/hyperledger/fabric.git git clone https://github.com/hyperledger/fabric-ca.git cd fabric-ca git reset --hard fabric-ca_commitlevel from above cd ../fabric git reset --hard fabric_commitlevel from above cd devenv change the Vagrant file as suggested below: vagrant up vagrant ssh make docker cd ../fabric-ca make docker cd ../fabric/sdkintegration docker-compose down; rm -rf /var/hyperledger/*; docker-compose up --force-recreate # and I have a fabric running in a terminal # Now I open a new Cygwin terminal: cd /cygdrive/c/gocode/fabric_1.0.2/fabric/devenv vagrant ssh cd /vagrant/fabric-sdk-java mvn install # build shim-client-1.0.jar cd /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/java gradle build cd /opt/gopath/src/github.com/hyperledger/fabric/sdkintegration/javacc/example_cc gradle -b build.gradle build # add in pom.xml: javax.json javax.json-api 1.1.0-M1 mvn dependency:resolve mvn install ## At this point, I am confused ### What do I do next to run the end to end Java test ? Or a Simple Client test?

szoghybe (Thu, 21 Sep 2017 13:48:43 GMT):
Any help appreciated.

szoghybe (Thu, 21 Sep 2017 13:52:24 GMT):
ubuntu@hyperledger-devenv:5fb31dd:/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration$ echo $JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 ubuntu@hyperledger-devenv:5fb31dd:/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration$ java -version openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) ubuntu@hyperledger-devenv:5fb31dd:/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration$ mvn -version Apache Maven 3.3.9 Maven home: /usr/share/maven Java version: 1.8.0_131, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-77-generic", arch: "amd64", family: "unix" ubuntu@hyperledger-devenv:5fb31dd:/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration$

szoghybe (Thu, 21 Sep 2017 13:55:22 GMT):
When I run

szoghybe (Thu, 21 Sep 2017 13:55:25 GMT):
cd /vagrant/fabric-sdk-java mvn install

szoghybe (Thu, 21 Sep 2017 13:55:40 GMT):
I do get the following listing in the fabric terminal:

szoghybe (Thu, 21 Sep 2017 13:55:54 GMT):
peer0.org1.example.com | 2017-09-21 13:56:57.747 UTC [endorser] ProcessProposal -> DEBU 1a6 Entry peer0.org1.example.com | 2017-09-21 13:56:57.747 UTC [protoutils] ValidateProposalMessage -> DEBU 1a7 ValidateProposalMessage starts for signed proposal 0xc4202bb680 peer0.org1.example.com | 2017-09-21 13:56:57.747 UTC [endorser] ProcessProposal -> DEBU 1a8 Exit

szoghybe (Thu, 21 Sep 2017 13:56:10 GMT):
I was hoping for somthing more involved (?)

FengChen_1982 (Mon, 25 Sep 2017 03:02:32 GMT):
Has left the channel.

bmalavan (Mon, 25 Sep 2017 06:53:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mpQtMFMZidfCDLZ2L) @rickr Any idea?

ikset (Mon, 25 Sep 2017 12:16:52 GMT):
Has joined the channel.

ikset (Mon, 25 Sep 2017 12:53:57 GMT):
Vadim composer manager sloman

ikset (Mon, 25 Sep 2017 12:55:18 GMT):
```vendor.1b9a8f4ada7a594aad5a.bundle.js:1 ERROR TypeError: Cannot read property 'orderers' of undefined at e._next (6.fddb24b2dc6b6087258d.chunk.js:1) at e.T14+.e.__tryOrSetError (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e.T14+.e.next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e.T14+.e._next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e.T14+.e.next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e._next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e.T14+.e.next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e._next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e.T14+.e.next (vendor.1b9a8f4ada7a594aad5a.bundle.js:1) at e._subscribe (vendor.1b9a8f4ada7a594aad5a.bundle.js:1)```

rickr (Mon, 25 Sep 2017 13:47:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mfCBoy7fPSinQ8qYC) Best asked on #chaincode-dev

rickr (Mon, 25 Sep 2017 13:48:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2QiGoSf95GvzKRSpz) Follow the readme.md on how to run integration tests. BTW there is no need for vagrant if your OS can support the docker

rickr (Mon, 25 Sep 2017 13:51:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Aj46iWp58GyBaeHgP) I'm not sure on the error case how to get that data if it does not come back the same way as on success. Best asked if it can be gotten to on the #fabric channel

rickr (Mon, 25 Sep 2017 13:57:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DCrmv7rZPozxFQmsq) They're not related.

clempo (Mon, 25 Sep 2017 16:26:29 GMT):
I disagree they are unrelated. If I want to query the actual value of a key mentioned in a ReadSet, I have to find the WriteSet pointed by the TxNum. This may never happen in practice, but technically, a TxNum can point to a transaction that cannot be extracted from a BlockInfo except by a very inefficient iterator. This may never be fixed but being aware of it may avoid future similar mistakes. Too many of those and your API will feel clunky.

clempo (Mon, 25 Sep 2017 16:30:11 GMT):
Another example of inconsistent naming is the singular or plural for the get accessor in a collection. For example BlockInfo.getEnvelopeInfo(int) versus KVRWSet.getWrites(int). I almost logged a Jira for this until I realized the KVRWSet class is probably automatically generated. Plural in that context feels unnatural.

clempo (Mon, 25 Sep 2017 16:31:18 GMT):
@rickr, can you comment about the multiple envelopes in a block, what is the official definition of TxNum in that case? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DCrmv7rZPozxFQmsq)

clempo (Mon, 25 Sep 2017 16:31:18 GMT):
@rickr, can you comment about the multiple envelopes in a block, what is the official definition of TxNum in that case? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2wMzYABo7Mzo3a5jR)

rickr (Mon, 25 Sep 2017 16:34:26 GMT):
Every transaction may have more than one action it's just not used today. getTransactionActionInfo is just an index into that

clempo (Mon, 25 Sep 2017 16:35:28 GMT):
fine, but the question also applies one layer above with multiple envelopes

clempo (Mon, 25 Sep 2017 16:35:46 GMT):
did you write one action when you meant one envelope?

rickr (Mon, 25 Sep 2017 17:04:29 GMT):
Look at End2endIT.java blockWalker shows going through the blocks. Each block gets Envelopes by looping through `returnedBlock.getEnvelopeInfos()` Special handling for Transaction type envelope goes through individual actions (today only one ) with an iterator `getTransactionActionInfos` Which returns a `BlockInfo.TransactionEnvelopeInfo.TransactionActionInfo` for each iteration. I'm not sure what's `klunky` about that. It _massively simplifies_ what's going on in the protobuf definition if it were left to user to decipher.

clempo (Mon, 25 Sep 2017 17:58:59 GMT):
You misunderstood my point. What can become clunky is the naming convention within the API.

clempo (Mon, 25 Sep 2017 18:00:58 GMT):
I understand how to navigate the BlockInfo and below. My question is how come there is no EnvelopeNum in the key Version. That can only be explained by extra semantics of the TxNum or some external limitation that is not reflected in the API. What is the semantics of TxNum?

clempo (Mon, 25 Sep 2017 18:00:58 GMT):
I understand how to navigate the BlockInfo and below. My question is how come there is no EnvelopeNum in the key Version. That can only be explained by extra semantics of the TxNum or some external limitation that is not reflected in the API. What is the semantics of TxNum in the presence of multiple envelopes within one BlockInfo?

pschnap (Mon, 25 Sep 2017 19:32:26 GMT):
Are chaincode events still a thing and does the Java SDK support them?

pschnap (Mon, 25 Sep 2017 19:43:51 GMT):
hm, seems there's an interface for them as of Aug 2017 but according to the node sdk documentation only Block events are emitted currently

rickr (Mon, 25 Sep 2017 20:30:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bz9uyweNSXt4mitRY) The Version is only on the the readset which has what was read getBlockNum is the block number and getTxNum is the index of the envelope in the block which you can get via getEnvelopeInfo I think the protos where changed for long to int some time.

clempo (Mon, 25 Sep 2017 20:33:36 GMT):
Oh that's interesting. So you claim the TxNum is the envelope number and the envelope contains only one transactionAction even though the data structure says it's a collection?

rickr (Mon, 25 Sep 2017 20:35:34 GMT):
Today it's only one

rickr (Mon, 25 Sep 2017 20:35:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LXYgKaykeMt8dGAwD) Example of this in End2endIT.java look for registerChaincodeEventListener

pschnap (Mon, 25 Sep 2017 21:11:55 GMT):
Thanks @rickr !

chaitanya (Tue, 26 Sep 2017 16:08:24 GMT):
Hi everyone, lately I've been getting the following error: ```org.hyperledger.fabric.sdk.exception.ProposalException: Not enough endorsers for invoke AddRequest :500 endorser error:Sending proposal to peer0.org1.example.com failed because of gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: Failure in invoking contentList chaincode. Got error: ), cause=null}. Was verified:false ``` The desired chaincode container for the chaincode name is up and had never gone down, ever since the network was brought up. Any idea what causes this error?

szoghybe (Tue, 26 Sep 2017 19:57:34 GMT):
New blog post: Building the Hyperledger Fabric VM and Docker Images version 1.0.2 from scratch, then running the fabric-java-sdk version 1.0.1 end to end test against it https://bertrandszoghy.wordpress.com/2017/09/26/building-the-hyperledger-fabric-vm-and-docker-images-version-1-0-2-from-scratch-then-running-the-fabric-java-sdk-version-1-0-1-end-to-end-test/

clempo (Tue, 26 Sep 2017 20:52:38 GMT):
@rickr, unRegisterBlockListener() and unRegisterChaincodeEventListener() should be called unregisterBlockListener() and unregisterChaincodeEventListener() with a small r for register

clempo (Tue, 26 Sep 2017 20:52:43 GMT):
do you need me to create a Jira?

clempo (Tue, 26 Sep 2017 20:53:14 GMT):
These methods don't exist in v1.0.1 so we can still easily rename them

clempo (Tue, 26 Sep 2017 20:56:14 GMT):
https://github.com/hyperledger/fabric-sdk-java does not list the v1.0.2 release, is that a bug of the mirror site?

rickr (Tue, 26 Sep 2017 23:48:04 GMT):
Best open a JIRA and a patch

rickr (Tue, 26 Sep 2017 23:48:46 GMT):
There was no v1.0.2

mdanaci (Wed, 27 Sep 2017 13:31:36 GMT):
Has joined the channel.

mdanaci (Wed, 27 Sep 2017 13:41:21 GMT):
Hello everyone, I'm trying to run my old chaincode (v0.6) with the new one (v1.1). I'm trying to run End2endIT.java test I changed the both example_cc.go in text/fixture/sdkintegration with my old chaincode. I'm running docker-compose up -d --force-recreate and running End2endIT.java My chaincode successfully deploys to peers. But when i try to send transaction proposal with the *new String[] {"myDummyMethod", "a", "b", "100"}* I'm getting error`Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: Unknown action, check the first argument, must be one of 'delete', 'query', or 'move') ` My chaincode has an invoke method like this. I dont have move delete query methods back in version 0.6 ``` func (t *ChaincodeMain) Invoke(stub shim.ChaincodeStubInterface) pb.Response { if function == "init-member" { return t.init_member(stub, args) } else if function == "transfer-credit" { return t.transfer_credit(stub, args) } ... ```

mdanaci (Wed, 27 Sep 2017 13:41:21 GMT):
Hello everyone, I'm trying to run my old chaincode (v0.6) with the new one (v1.1). I'm trying to run End2endIT.java test I changed the both example_cc.go in text/fixture/sdkintegration with my old chaincode. I'm running docker-compose up -d --force-recreate and running End2endIT.java My chaincode successfully deploys to peers. But when i try to send transaction proposal with the *new String[] {"init-member", "a", "b", "100"}* I'm getting error`Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: Unknown action, check the first argument, must be one of 'delete', 'query', or 'move') ` My chaincode has an invoke method like this. I dont have move delete query methods back in version 0.6 ``` func (t *ChaincodeMain) Invoke(stub shim.ChaincodeStubInterface) pb.Response { if function == "init-member" { return t.init_member(stub, args) } else if function == "transfer-credit" { return t.transfer_credit(stub, args) } ... ```

mdanaci (Wed, 27 Sep 2017 13:41:21 GMT):
Hello everyone, I'm trying to run my old chaincode (v0.6) with the new one (v1.1). I'm trying to run End2endIT.java test I changed the both example_cc.go in text/fixture/sdkintegration with my old chaincode. I'm running docker-compose up -d --force-recreate and running End2endIT.java My chaincode successfully deploys to peers. But when i try to send transaction proposal with the *new String[] {"init-member", "a", "b", "100"}* I'm getting error`Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: Unknown action, check the first argument, must be one of 'delete', 'query', or 'move')` My chaincode has an invoke method like this. I dont have move delete query methods back in version 0.6 ``` func (t *ChaincodeMain) Invoke(stub shim.ChaincodeStubInterface) pb.Response { if function == "init-member" { return t.init_member(stub, args) } else if function == "transfer-credit" { return t.transfer_credit(stub, args) } ... ```

mdanaci (Wed, 27 Sep 2017 13:41:21 GMT):
Hello everyone, I'm trying to run my old chaincode (v0.6) with the new one (v1.1). I'm trying to run End2endIT.java test I changed the both example_cc.go in text/fixture/sdkintegration with my old chaincode. I'm running docker-compose up -d --force-recreate and running End2endIT.java My chaincode successfully deploys to peers. But when i try to send transaction proposal with the *new String[] {"init-member", "a", "b", "100"}* I'm getting error _Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: Unknown action, check the first argument, must be one of 'delete', 'query', or 'move')_ My chaincode has an invoke method like this. I dont have move delete query methods back in version 0.6 ``` func (t *ChaincodeMain) Invoke(stub shim.ChaincodeStubInterface) pb.Response { if function == "init-member" { return t.init_member(stub, args) } else if function == "transfer-credit" { return t.transfer_credit(stub, args) } ... ```

rickr (Wed, 27 Sep 2017 14:01:03 GMT):
Best to take that to #chaincode-dev

szoghybe (Wed, 27 Sep 2017 14:15:55 GMT):
@rickr Hello, is there a design doc for fabric-java-sdk explaining the Java code is building the Go code?

clempo (Wed, 27 Sep 2017 14:28:14 GMT):
@mdanaci, I had similar behavior, I solved it by running "./fabric.sh restart" which does a little extra clean up before restarting

clempo (Wed, 27 Sep 2017 14:32:00 GMT):
@szoghybe, fabric-java-sdk does not generate go code, it talks to the Fabric network through grpc. Maybe you want to write chaincode in Java, this is entirely different and is not yet supported in v1.0

mdanaci (Wed, 27 Sep 2017 14:34:38 GMT):
@clempo it worked! Thanks.

szoghybe (Wed, 27 Sep 2017 14:35:12 GMT):
Hello, no I don't want to code chaincode in Java. I was trying to understand /** * Chaincode builder * * @return ChaincodeID builder. */ in ChaincodeID.java

szoghybe (Wed, 27 Sep 2017 14:35:41 GMT):
Is there a high-level design doc that explains? Thanks.

clempo (Wed, 27 Sep 2017 14:49:49 GMT):
@szoghybe, a builder is a object oriented pattern to replace a constructor with multiple set accessors, one accessor per constructor argument. That builder creates a ChaincodeID which is just a moniker.

gauthampamu (Thu, 28 Sep 2017 14:57:15 GMT):
https://chat.hyperledger.org/channel/fabric-questions?msg=rhyG2zt7QHQY4K3jM

SandySun2000 (Thu, 28 Sep 2017 22:47:03 GMT):
I saw the following error when I try to use java sdk client to create a channel to bluemix network. Any clue what was wrong? Where should I take a look to debug the problem? 2017-09-28 22:41:23.187 UTC [orderer/common/broadcast] Handle -> WARN 01a Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating DeltaSet: Policy for [Groups] /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining

SandySun2000 (Thu, 28 Sep 2017 22:50:31 GMT):
I found the similar issue: https://jira.hyperledger.org/browse/FAB-3436. But I didn't see the solution

jimthematrix (Fri, 29 Sep 2017 02:36:16 GMT):
@SwatiRaj thanks for submitting the CR for balance transfer with Java SDK, please see my comment to https://gerrit.hyperledger.org/r/#/c/13927/

SwatiRaj (Fri, 29 Sep 2017 02:36:16 GMT):
Has joined the channel.

jimthematrix (Fri, 29 Sep 2017 02:36:20 GMT):
let me know if you have any questions

SwatiRaj (Fri, 29 Sep 2017 06:33:27 GMT):
@jimthematrix , Hi Jim , I mailed you regarding the same on your hotmail ID , can you please check and help . Thanks

mastersingh24 (Sat, 30 Sep 2017 10:09:11 GMT):
(https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ekiS844WAYmxEX9te) @SandySun2000

glotov (Sun, 01 Oct 2017 09:41:01 GMT):
Has joined the channel.

epm2wi (Sun, 01 Oct 2017 10:13:56 GMT):
Has joined the channel.

glotov (Mon, 02 Oct 2017 07:34:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=87e7p9pa3nK2ppueu) @rickr is it possible to run java chaincodes with fabric-sdk-java? it has `src/test/fixture/sdkintegration/javacc/example_cc/`, but how to run it?

glotov (Mon, 02 Oct 2017 07:34:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=87e7p9pa3nK2ppueu) Hello all! Is it possible to run java chaincodes with fabric-sdk-java now? it has `src/test/fixture/sdkintegration/javacc/example_cc/`, but how to run it?

clempo (Mon, 02 Oct 2017 20:59:21 GMT):
@glotov WIP = Work In Progress

asharora78 (Tue, 03 Oct 2017 06:02:03 GMT):
Has joined the channel.

ascatox (Tue, 03 Oct 2017 06:11:51 GMT):
Hi All! Is it possible via Java SDK to send an Upgrade Proposal like in Node SDK `sendUpgradeProposal(request, timeout)``

ngeorge (Tue, 03 Oct 2017 07:46:40 GMT):
Hi All, I am getting the below exception while reading the private key of admin(to set the user context). java.lang.SecurityException: class "org.bouncycastle.asn1.pkcs.RSAPublicKey"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:898) at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668) at java.lang.ClassLoader.defineClass(ClassLoader.java:761) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) Has anyone faced the same?

ascatox (Tue, 03 Oct 2017 10:43:38 GMT):
Hi All! I'm facing this problem when I try to instantiate my chaincode the CompletableFuture.get() never finish and is stopped by the timeout. Someone else is facing these problems?

ascatox (Tue, 03 Oct 2017 10:43:38 GMT):
Hi All! I'm facing this problem when I try to instantiate my chaincode the CompletableFuture.get() never finish and is stopped by the timeout. Someone else is facing these problems?

glotov (Tue, 03 Oct 2017 12:30:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=SEuKrdaiCov5HrxaQ) @clempo Thank you, I just mean that half a year has passed since @rickr message about WIP and I hope there may be some progress in making Java chaincodes work. Is there?

glotov (Tue, 03 Oct 2017 12:30:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=SEuKrdaiCov5HrxaQ) @clempo Thank you, I just mean that 4 month have passed since @rickr message about WIP and I hope there may be some progress in making Java chaincodes work. Is there?

rickr (Tue, 03 Oct 2017 14:22:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5H86WhsZbzZeHkk26) org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java ?

rickr (Tue, 03 Oct 2017 14:23:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Efx8itLxLuPfGrRTj) End2endIT are working must be unique to your situation. Make sure you have eventhubs running and check associated peer for the transaction being sent out to eventhubs

stacie (Tue, 03 Oct 2017 15:06:09 GMT):
Has joined the channel.

clempo (Tue, 03 Oct 2017 18:45:43 GMT):
@ngeorge, you probably have two versions of bouncy castle in your path. Don't forget to check the lib/ext folder in the JRE.

KevinLeyssens (Wed, 04 Oct 2017 10:48:15 GMT):
Has joined the channel.

deva-madala (Wed, 04 Oct 2017 11:18:32 GMT):
Has joined the channel.

ngeorge (Thu, 05 Oct 2017 13:01:19 GMT):
I have certain import statements in the chaincode and those are from a different folder. But while I try to instantiate using the Java sdk, it says 'cannot find package..'. I have placed the folder also along with the chaincode in the source directory(local system from where installation is done) while installing and instantiating the chaincode using the sdk. How do we send the packages along with the chaincode for installation/instantiation?

clempo (Thu, 05 Oct 2017 13:19:36 GMT):
@ngeorge, the fabric-sdk-java readme says: Go lang chaincode dependencies must be contained in vendor folder. For an explanation of this see Vendor folder explanation https://blog.gopheracademy.com/advent-2015/vendor-folder/

ngeorge (Thu, 05 Oct 2017 13:21:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mFM8yHdGbzirj96PX) @clempo Thanks.. And where is this vendor folder located when we just are running the docker images and deployment is triggered from a java program remotely ?

clempo (Thu, 05 Oct 2017 13:23:55 GMT):
Sorry, never tried it. Please read the doc at the link and tell us what you find.

ngeorge (Thu, 05 Oct 2017 13:24:06 GMT):
:).

SudhiBhat (Thu, 05 Oct 2017 16:28:13 GMT):
Has joined the channel.

SudhiBhat (Thu, 05 Oct 2017 16:30:19 GMT):
Hello,

SudhiBhat (Thu, 05 Oct 2017 16:31:45 GMT):
Maybe a naive question. I am trying to use the java SDK to make transaction proposals on an already running blockchain network. What user/certificate do I set in the context. Should I get the certificate details from the fabric-ca or is there any other way?

clempo (Thu, 05 Oct 2017 17:08:33 GMT):
@SudhiBhat, look at the samples End2endIT and End2endAndBackAgainIT. They show a SampleStore for users. In practice, you will likely need to implement your own User and Enrollment classes. If you call fabric-ca programatically , registering a user creates it, and (re)enrolling the user creates a cert and private key. You can also load the cert and private key from the files generated by the fabric-ca client command line tool. There is an example of that in End2endIT when it creates the peerOrgAdmin.

SudhiBhat (Thu, 05 Oct 2017 17:11:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ceH5iE7EmE5GGrusX) @clempo Thanks a lot for the hints! I will take a look at this... Just started to implement the User interface and also stumbled on the fabric-ca's REST APIs documented in http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#overview Stuck in the maze right now...

clempo (Thu, 05 Oct 2017 17:12:33 GMT):
That's and old doc, the REST API is dead in v1.0

clempo (Thu, 05 Oct 2017 17:12:33 GMT):
That's an old doc, the REST API is dead in v1.0

clempo (Thu, 05 Oct 2017 17:14:14 GMT):
maybe fabric-ca still supports it, but I would use the java sdk instead

SudhiBhat (Thu, 05 Oct 2017 17:14:35 GMT):
Damn... just when you thought you had something!

SudhiBhat (Thu, 05 Oct 2017 17:14:39 GMT):
:)

clempo (Thu, 05 Oct 2017 17:15:28 GMT):
Like I said, I'm not sure what fabric-ca supports, but you certainly can't call a peer with the REST API anymore.

SudhiBhat (Thu, 05 Oct 2017 17:21:03 GMT):
Can you comment on this https://github.com/ratnakar-asara/FabricJavaSample

clempo (Thu, 05 Oct 2017 17:23:08 GMT):
This code is v1.0-SNAPSHOT, it will not compile with v1.0

clempo (Thu, 05 Oct 2017 17:23:35 GMT):
Why don't you go to official End2endIT which is properly maintained in sync with the release

clempo (Thu, 05 Oct 2017 17:23:35 GMT):
Why don't you go to the official End2endIT which is properly maintained in sync with the release

SudhiBhat (Thu, 05 Oct 2017 17:25:08 GMT):
Thanks for the heads up. Will refer only to the https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

ngeorge (Fri, 06 Oct 2017 06:17:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uSFdHoiZM73NHJNaq) @clempo That worked.. Thanks.. I copied the dependent packages into a folder named vendor and placed it in the chaincode folder(along with the chaincode)..

SudhiBhat (Fri, 06 Oct 2017 16:35:04 GMT):
Hello, Was looking at the End2endIT sample and in the TestConfig class where the org configurations are read there is a switch from http to https and grpc to grpcs. In these cases it is expected to have the public key stored as a property in the org ca properties. It is a public key hence not a problem to have it but how to get this when our network is running example in a AWS EC2 instance and the SDK is consumed in another application. This application will not have access to the cypto config folder?

SudhiBhat (Fri, 06 Oct 2017 16:35:04 GMT):
Hello, Was looking at the End2endIT sample and in the TestConfig class where the org configurations are read there is a switch from http to https and grpc to grpcs. In these cases it is expected to have the public key stored as a property in the org ca properties. It is a public key hence not a problem to have it but how to get this when our network is running in a AWS EC2 instance and the SDK is consumed in another application. This application will not have access to the cypto config folder?

sonnykui (Fri, 06 Oct 2017 23:45:00 GMT):
Has joined the channel.

SudhiBhat (Sat, 07 Oct 2017 13:30:56 GMT):
I am planning to consume the SDK in a Spring Boot application which will make calls to the network which is already running in AWS EC2. In the SDK is it always necessary to create the channel and have the peers join the network always? The channel and the network will always be running. Is there a way that I can just tell the SDK to use a channel?

SudhiBhat (Sun, 08 Oct 2017 10:51:03 GMT):
When I try to instantiate the HFCAClient the config class tries to load the config.properties and for this it tries to get the System property "user.dir". In the case of spring application this is not guaranteed. What would be the best way to solve this? Currently this gives a null pointer exception while getting the HFCAClient instance.

Hundredwz (Mon, 09 Oct 2017 01:39:52 GMT):
Has joined the channel.

Hundredwz (Mon, 09 Oct 2017 03:03:15 GMT):
I am learning to use fabric-sdk-java,when i type `docker-compose up -d --force-recreate` cmd in `sdkintegration` folder,I always get the error```ERROR: for configtxlator Cannot start service configtxlator: oci runtime error: container_linux.go:262: starting container process caused "exec: \"/usr/local/bin/configtxlator\": stat /usr/local/bin/configtxlator: no such file or directory"``` even if I exec the ```export ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION="1.0.0" ``` cmd.Could any one give me some suggestions?

Hundredwz (Mon, 09 Oct 2017 03:04:02 GMT):
I am learning to use fabric-sdk-java,when i type `docker-compose up -d --force-recreate` cmd in `sdkintegration` folder,I always get the error ```ERROR: for configtxlator Cannot start service configtxlator: oci runtime error: container_linux.go:262: starting container process caused "exec: \"/usr/local/bin/configtxlator\": stat /usr/local/bin/configtxlator: no such file or directory"``` even if I exec the

Hundredwz (Mon, 09 Oct 2017 03:04:40 GMT):
```export ORG_HYPERLEDGER_FABRIC_SDKTEST_VERSION="1.0.0"``` could any one offer some suggestions?

AlexMeng (Mon, 09 Oct 2017 10:11:43 GMT):
Has joined the channel.

sgdev (Mon, 09 Oct 2017 16:53:36 GMT):
Has joined the channel.

SudhiBhat (Mon, 09 Oct 2017 18:28:14 GMT):
When I try to register and enroll a peer I get an error "url: https://localhost:7054 Remote host closed connection during handshake" What could be the probable reasons?

SudhiBhat (Mon, 09 Oct 2017 18:28:14 GMT):
When I try to register and enroll an user in a peer I get an error "url: https://localhost:7054 Remote host closed connection during handshake" What could be the probable reasons?

koalakeeper (Tue, 10 Oct 2017 05:50:26 GMT):
Has joined the channel.

sunhwei (Tue, 10 Oct 2017 07:04:09 GMT):
Has joined the channel.

rajasekharpippalla (Tue, 10 Oct 2017 10:02:50 GMT):
Has joined the channel.

chaitanya (Tue, 10 Oct 2017 10:30:57 GMT):
Hi, I'm getting the following error on running invokes against Fabric v1, ``` "exception":"org.hyperledger.fabric.sdk.exception.TransactionException","message":"Bad last configuation block type 3, expected 1"} ``` Could someone help me with what could be the problem here?

chaitanya (Tue, 10 Oct 2017 10:30:57 GMT):
Hi, I'm getting the following error on running invokes against Fabric v1, ``` "exception":"org.hyperledger.fabric.sdk.exception.TransactionException","message":"Bad last configuation block type 3, expected 1"} ``` Could someone help me with what could be the problem here?

mdanaci (Tue, 10 Oct 2017 12:55:23 GMT):
Hello, I'm getting error while i retry to run End2endAndBackAgainIT test. 1. I`m running ./fabric.sh with restart. 2. I`m running End2endIT test, it works ok. 3. If i run End2endIT test again, i got the following exception ``` Caused by: java.lang.Exception: POST request to http://localhost:7054/api/v1/register failed request body {"id":"user1","type":"user","max_enrollments":0,"affiliation":"org1.department1","attrs":[]} with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"Identity 'user1' is already registered"}],"messages":[]} ``` 4. if i run End2endAndBackAgainIT, i got the following exception ``` RUNNING: End2endAndBackAgainIT Reconstructing foo channel org.hyperledger.fabric.sdk.exception.InvalidArgumentException: UserContext for user peerOrg1Admin has no enrollment set. at org.hyperledger.fabric.sdk.User.userContextCheck(User.java:84) at org.hyperledger.fabric.sdk.HFClient.setUserContext(HFClient.java:365) at org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT.reconstructChannel(End2endAndBackAgainIT.java:475) at org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT.setup(End2endAndBackAgainIT.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ``` My first question : How can i run tests without fabric.sh restart? (I want to run these test on already running container) Second : What is the difference between End2endIt.java and End2endAndBackAgainIT.java Third : Do i need to setup users, construct channel every method invocation? I implemented my smart contract it works fine but i don't understand this fabric-sdk-java. v0.6 was much more easier. Thank you.

rickr (Tue, 10 Oct 2017 13:42:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Foo5WFauaswLxDwcR) That's what this application/sample does. Your application can store it anywhere that it seems suitable for your needs.

rickr (Tue, 10 Oct 2017 13:43:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=76yNSdKhQs54HqokX) End2endAndBackAgainIT.java ?

rickr (Tue, 10 Oct 2017 13:47:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8CPPbvQ5i5uNY5jqQ) Seems your running a mix-match of sdk >1.0 with docker images from fabric 1.0 is my best guess

rickr (Tue, 10 Oct 2017 13:55:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ND5zhEvat4pFWcumh) Can you telnet to localhost 7054 ?

rickr (Tue, 10 Oct 2017 14:01:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7oxcygCyw58qAzig3) Running all the integration tests requires a clean restart. End2endIt.java construct the channel and joins the peers. That would need to be done only once. As the name hints and End2endAndBackAgainIT.java _reconstructs_ the channel so it _can be used again_ and starts of the test validating previous end2endIt.java.

lmars (Tue, 10 Oct 2017 14:02:04 GMT):
Has joined the channel.

SudhiBhat (Tue, 10 Oct 2017 14:06:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8YqoDhZyagpEMPNFD) @rickr Hello, I have my own docker-compose file which spins a three peer org with one orderer. I copied the files from the fabric-samples/first-network and modified the files. Surprisingly this does not spin a fabric-ca image. I would assume this is important as the port 7054 is bound to the ca server. May be this is the reason why it is not connecting. When I enroll a user it tries to connect to the ca server to generate the certificates for the user right? Sorry for the basic questions... but trying to settle in...

SudhiBhat (Tue, 10 Oct 2017 18:32:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8YqoDhZyagpEMPNFD) @rickr Yes the problem was the Fabric - CA docker image was not available. I am now facing a different issue. When I enroll a user using the HFCAClient.enroll(String user, String secret) and I pass the basic credentials I would assume the CA will generate the certificates and give back the Enrollment object. This step fails by giving the error "Failed to enroll user" and if I go to the logs of the docker image it has the error "Unknown Certificate". The exception raised in the SDK is Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. "PKIX path building failed"

ConstC (Wed, 11 Oct 2017 03:06:00 GMT):
Has joined the channel.

MoulaliMvg (Wed, 11 Oct 2017 06:23:26 GMT):
Hi can anyone know when Balance transfer application using Fabric_java_sdk is going to release

Hundredwz (Wed, 11 Oct 2017 07:38:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RiwE6yGXSvQdaiNMr) @rickr yeah.what i used are mixed.When I pull the images v1.0.1 ,it all works.Thank you

tallharish (Wed, 11 Oct 2017 08:49:55 GMT):
My client is timing out when sending the transaction to the orderer, `channel.sendTransaction(successful).get(InvokeWaitTime, TimeUnit.SECONDS);` At Orderer, I see that it received transaction and forwarded the block to the peer. When I query the peer (after my invoke transaction timed out) I see the right value. So looks like everyone is doing their job.. but i donno why my client is getting stuck there. Any hints? Or debug logs I could add?

adc (Wed, 11 Oct 2017 11:08:41 GMT):
Hi, there is a java-sdk failure in the e2e tests for https://gerrit.hyperledger.org/r/#/c/13917/. Does anyone have an idea of the reason?

rameshthoomu (Wed, 11 Oct 2017 12:21:17 GMT):
@adc FAB-6575

rickr (Wed, 11 Oct 2017 14:09:15 GMT):
Just talked to the fabric-ca maintainers and at the moment they think the issue is their's to fix

rickr (Wed, 11 Oct 2017 14:37:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=giBBWiqAYX8eAx67v) Have added an eventHubs ?

rickr (Wed, 11 Oct 2017 14:37:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=giBBWiqAYX8eAx67v) Have you added an eventHubs ?

rickr (Wed, 11 Oct 2017 14:37:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=giBBWiqAYX8eAx67v) Have you added any eventHubs ?

rickr (Wed, 11 Oct 2017 16:18:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zXFvBJJ8ffrsEZda3) @rameshthoomu Are the SDKs not being run with Fabric/ca verify builds ? Did this get merged in ?

rameshthoomu (Wed, 11 Oct 2017 16:19:11 GMT):
no.. sdk's run only on fabric verify and merge builds..

rameshthoomu (Wed, 11 Oct 2017 16:19:24 GMT):
I have created a FAB-6577 to take up this work..

rameshthoomu (Wed, 11 Oct 2017 16:20:26 GMT):
working on it..

Maria (Wed, 11 Oct 2017 16:58:19 GMT):
Has joined the channel.

mkhb654 (Wed, 11 Oct 2017 17:03:01 GMT):
Has joined the channel.

luomin (Thu, 12 Oct 2017 01:12:55 GMT):
Has joined the channel.

deepakvparmar (Thu, 12 Oct 2017 05:36:40 GMT):
@rik

deepakvparmar (Thu, 12 Oct 2017 05:38:22 GMT):
@rickr : We are facing blocker in current blockchain poc. We would like to know what is the significance of following properties in context of EventHub. Currently, We are not setting these two properties while configuring channel. eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS});

rajasekharpippalla (Thu, 12 Oct 2017 06:41:23 GMT):
how we can identify all transactions which are related to particular user , i am working on balance-transfer example in fabric-samples ?

Glen (Thu, 12 Oct 2017 07:15:42 GMT):
Has joined the channel.

gauravgiri (Thu, 12 Oct 2017 08:02:34 GMT):
Hi @rickr We are using fabric-sdk-java, and have multiple organizations, all users belong to organization: "userorg", while the peer belong to organization "peerorg1". Sometimes during the invoke() transactions, the TransactionEvent.get() waits forever, and times out. We also observe error below, possibly related to timeout on TransactionEvent.get(): [10/11/17 12:19:38:836 JST] 00000128 EventHub E org.hyperledger.fabric.sdk.EventHub$1 onError EventHub:peer1 terminated is false shutdown is false has error UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID peerorg1, received userorg]] During Channel.intialize(), the EventHub.connect() is used using the UserContext, and all our user's belong to organization "userorg" only. All transactions are issued from the context of this organization("userorg") and it's users. Also, the endorsement's are all OK while connecting to peer, moreover not all invoke transactions result into timeout(and possibly this error). Does this error point to something else, could you please try and point why we could be getting this error: "UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID peerorg1, received userorg]"?

kojima714 (Thu, 12 Oct 2017 08:27:05 GMT):
Has joined the channel.

tallharish (Thu, 12 Oct 2017 10:00:11 GMT):
at the channel.sendTransactionProposal() call , i see the following error,

tallharish (Thu, 12 Oct 2017 10:00:11 GMT):
at the channel.sendTransactionProposal() call , i see the following error, ``` 2017-10-12 09:52:49,841 main ERROR Channel:2241 - Sending proposal to peer0.manuf1.example.com:7051 failed because of: gRPC failure=Status{code=UNKNOWN, description=Error executing chaincode: Could no t get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch ``` At the peer, I see the following error: ``` 2017-10-12 09:52:49.803 UTC [chaincode] notify -> DEBU e7e notifying Txid:3e73d091d7bc2b86bf352375d5ad61256f3a3a289579d3edd608180d3a124212 2017-10-12 09:52:49.803 UTC [chaincode] Execute -> DEBU e7f Exit 2017-10-12 09:52:49.803 UTC [chaincode] ExecuteChaincode -> ERRO e80 Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-10-12 09:52:49.803 UTC [endorser] callChaincode -> DEBU e81 Exit 2017-10-12 09:52:49.803 UTC [endorser] simulateProposal -> ERRO e82 failed to invoke chaincode path:"github.ibm.com/ICI/msp_overlay/chaincode/go/supply_chain" name:"mycc" version:"1.0" on transaction 3e73d091d7bc2b86bf352375d5ad61256f3a3a289579d3edd608180d3a124212, error: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-10-12 09:52:49.803 UTC [endorser] simulateProposal -> DEBU e83 Exit ```

tallharish (Thu, 12 Oct 2017 10:00:11 GMT):
at the channel.sendTransactionProposal() call , i see the following error, ``` 2017-10-12 09:52:49,841 main ERROR Channel:2241 - Sending proposal to peer0.:7051 failed because of: gRPC failure=Status{code=UNKNOWN, description=Error executing chaincode: Could no t get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch ``` At the peer, I see the following error: ``` 2017-10-12 09:52:49.803 UTC [chaincode] notify -> DEBU e7e notifying Txid:3e73d091d7bc2b86bf352375d5ad61256f3a3a289579d3edd608180d3a124212 2017-10-12 09:52:49.803 UTC [chaincode] Execute -> DEBU e7f Exit 2017-10-12 09:52:49.803 UTC [chaincode] ExecuteChaincode -> ERRO e80 Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-10-12 09:52:49.803 UTC [endorser] callChaincode -> DEBU e81 Exit 2017-10-12 09:52:49.803 UTC [endorser] simulateProposal -> ERRO e82 failed to invoke chaincode path:"github.com/" name:"mycc" version:"1.0" on transaction 3e73d091d7bc2b86bf352375d5ad61256f3a3a289579d3edd608180d3a124212, error: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-10-12 09:52:49.803 UTC [endorser] simulateProposal -> DEBU e83 Exit ```

tallharish (Thu, 12 Oct 2017 10:00:11 GMT):
at the channel.sendTransactionProposal() call , i see the following error, ``` 2017-10-12 09:52:49,841 main ERROR Channel:2241 - Sending proposal to peer0.:7051 failed because of: gRPC failure=Status{code=UNKNOWN, description=Error executing chaincode: Could no t get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch ``` At the peer, I see the following error: ``` 2017-10-12 09:52:49.803 UTC [chaincode] notify -> DEBU e7e notifying Txid:3e73d091d7bc2b86bf352375d5ad61256f3a3a289579d3edd608180d3a124212 2017-10-12 09:52:49.803 UTC [chaincode] Execute -> DEBU e7f Exit 2017-10-12 09:52:49.803 UTC [chaincode] ExecuteChaincode -> ERRO e80 Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-10-12 09:52:49.803 UTC [endorser] callChaincode -> DEBU e81 Exit 2017-10-12 09:52:49.803 UTC [endorser] simulateProposal -> ERRO e82 failed to invoke chaincode path:"github.com/" name:"mycc" version:"1.0" on transaction 3e73d091d7bc2b86bf352375d5ad61256f3a3a289579d3edd608180d3a124212, error: Error executing chaincode: Could not get deployment transaction from LSCC for mycc:1.0 - Get ChaincodeDeploymentSpec for mycc/mychannel from LSCC error: chaincode fingerprint mismatch data mismatch 2017-10-12 09:52:49.803 UTC [endorser] simulateProposal -> DEBU e83 Exit ``` Where could I be going wrong?

rickr (Thu, 12 Oct 2017 15:36:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yazzhSmL5jPuqxN7m) The only known reason to use these are to keep connection's active for firewalls and loadbalancers

rickr (Thu, 12 Oct 2017 15:39:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wQ7gax5KWvW8vsRqT) Last I heard it has to be the peeradmin for that peer to create the connection

rickr (Thu, 12 Oct 2017 15:41:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Nx5WDfQj8DaaxQSxc) Each CC has a docker instance associated with it. Have you looked at the logs produced in this docker image ?

rickr (Thu, 12 Oct 2017 15:41:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Nx5WDfQj8DaaxQSxc) Each CC has a docker instance associated with it. Have you looked at the logs produced in this docker image ? Also when you install/instantiate any change in your CC make sure the docker images associated with it are cleaned out. Or make sure you're upgrading CC each time.

SudhiBhat (Fri, 13 Oct 2017 02:01:54 GMT):
Hello, I am consuming the fabric-sdk-java in a Spring Boot application. When I do a channel.initialize() I get a exception from InvocableHandlerMethod. Should I give some kind of a callback class in my application or I am doing something wrong?

SudhiBhat (Fri, 13 Oct 2017 02:56:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YXtDR3psT5FrtA74b) Will there be any issues making a grpc call in a spring boot environment?

ryokawajp (Fri, 13 Oct 2017 03:35:14 GMT):
Hi @rickr @gauravgiri , thank you for the information. I want to detect the completion of a Invoke transaction using CompletableFuture (i.e., Block event) returned by sendTransaction(). I suppose non-admin user is usually used to send a transaction. So HFClient.setUserContext() is set to a non-admin user of a org (say, "userorg"). If I understand the spec of fabric-sdk-java correctly, setUserContext() also affect the connection requests to event hubs of peers. If we need admin user of the peer to connect to the peer's event hub, do we also need to use the admin user of the peer to issue Invoke transactions? Is there any way to use different users for transaction and event hub?

SudhiBhat (Fri, 13 Oct 2017 05:12:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eCaxFmgccMDd6t8rD) Looks like a JAR hell. I removed the dependencies on the io.grpc* libraries in my pom and allowed the dependencies to be injected by the pom of fabric-sdk-java and it appears to be working

johncaboose (Fri, 13 Oct 2017 09:43:49 GMT):
Has joined the channel.

KrzysztofNiemiec (Fri, 13 Oct 2017 11:10:38 GMT):
Has joined the channel.

KrzysztofNiemiec (Fri, 13 Oct 2017 11:11:06 GMT):
Hi I am trying to run code that base on End2EndIT example from fabric-sdk-java. It means just call invoke on chaincode. However I get timeout all the time. I attached log from execution. I tried to analyze logs comparing my execution from invoke called from cli but didn't found any significant differences except fact that called from java orderer starts first new Deliver handler, and later new Broadcasat handler. And when I perform invoke from cli there is no new Deliver handler.

KrzysztofNiemiec (Fri, 13 Oct 2017 11:11:29 GMT):

invoke-chaincode-timeout.log

SudhiBhat (Fri, 13 Oct 2017 11:48:34 GMT):
How do you associate a Fabric CA to an Org/peer. I am enrolling the user to one of the org's CA. However when I set this user to the transaction context and fire a transaction proposal on a peer of which the user is a part of I get an error saying that the certificate is signed by an unknown authority

mdanaci (Fri, 13 Oct 2017 13:19:00 GMT):
hello, i`m using time.Now() in my smart contract. Every peer returns different time so my endorsment fails on SDKUtils.getProposalConsistencySets(responses); what can i do?

sativ (Fri, 13 Oct 2017 16:05:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=XgpeN63poGou4QAAG) @tallharish Hi, I'm using the same code, and it compiles, but I don't see any events, even when I run chaincode, there's no events, nor messages. I have also registered an eventHub, but no luck. Are there any other settings to get chaicode events? Thanks!

silliman (Fri, 13 Oct 2017 17:43:19 GMT):
@mdanaci you cannot use time.Now() in your smart contract. Have the client application produce a timestamp and pass that to your smart contract to that each peer will see the same value.

silliman (Fri, 13 Oct 2017 17:43:19 GMT):
@mdanaci you cannot use time.Now() in your smart contract. Have the client application produce a timestamp and pass that so your smart contract to that each peer will see the same value.

silliman (Fri, 13 Oct 2017 17:43:19 GMT):
@mdanaci you cannot use time.Now() in your smart contract. Have the client application produce a timestamp and pass that to your smart contract so that each peer will see the same value.

mdanaci (Fri, 13 Oct 2017 20:35:07 GMT):
@silliman thanks

SudhiBhat (Sat, 14 Oct 2017 05:59:21 GMT):
@rickr I have a 3 Org (Org1 with Org1MSP, Org2 with Org2MSP and Org3 with Org3MSP) with one Orderer with OrdererMSP docker image set up. For the 3 orgs I have a 3 fabric-ca images (caOrg1, caOrg2, caOrg3) running. I generated all the certificates using the cryptogen tool on my local system and placed it in the crypto-config folder and have mounted them to the docker images as well. Now when a user who belongs to the Org1 wants to make a transaction proposal I enroll that user using the RegistrationRequest and perform the ca.Enroll to enroll the user so that the key pair and certificate gets generated. This user is associated to the Org1MSP. However when I use this new user that has been enrolled is used to perform transaction proposal (via client.setUserContext()) I get an error "Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority". I might be missing a simple configuration step but cannot find it and I spent enough time figuring it out :thinking:

slugle (Sun, 15 Oct 2017 21:44:38 GMT):
Has joined the channel.

ryokawajp (Mon, 16 Oct 2017 02:33:39 GMT):
@rickr @gauravgiri Hi , I found this JIRA issue. It seems that there have been already a discussion. I will comment on the JIRA.

ryokawajp (Mon, 16 Oct 2017 02:33:39 GMT):
@rickr @gauravgiri Hi , I found this JIRA issue. It seems that there have been already a discussion. I will comment on the JIRA.FAB-6101

waterlord (Mon, 16 Oct 2017 06:21:16 GMT):
Has joined the channel.

ozjc (Mon, 16 Oct 2017 08:30:12 GMT):
Has joined the channel.

rexxie (Mon, 16 Oct 2017 08:31:27 GMT):
Has joined the channel.

seungchan (Mon, 16 Oct 2017 10:46:01 GMT):
Has joined the channel.

seungchan (Mon, 16 Oct 2017 10:47:26 GMT):
Hello, Current hyperledger fabric is supporting to make java chaincode?... If it is supporting, could you recommend some example? please....

AlexMeng (Mon, 16 Oct 2017 12:38:27 GMT):
The integration test shows a channel with one Org, how to use the SDK to create/join channel across different Orgs? Could anyone give an example? @rickr

robinrob (Mon, 16 Oct 2017 12:46:10 GMT):
Has joined the channel.

sudhi-git (Mon, 16 Oct 2017 12:58:49 GMT):
Has joined the channel.

Styxt (Mon, 16 Oct 2017 15:15:50 GMT):
Hi, i am getting the following error when i'm trying to join my peers to the channel i've created: ``` Okt 16, 2017 5:01:16 PM org.hyperledger.fabric.sdk.Channel sendProposalToPeers SCHWERWIEGEND: Sending proposal to peer0.org1.example.com failed because of: gRP C failure=Status{code=INTERNAL, description=null, cause=io.netty.handler.codec.h ttp2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 ``` Any idea what could be the cause?

Styxt (Mon, 16 Oct 2017 15:15:50 GMT):
Hi, i am getting the following error when i'm trying to join my peers to the channel i've created: ``` Okt 16, 2017 5:01:16 PM org.hyperledger.fabric.sdk.Channel sendProposalToPeers SCHWERWIEGEND: Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=INTERNAL, description=null, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 ``` Any idea what could be the cause?

seungchan (Mon, 16 Oct 2017 16:26:04 GMT):
Does java chaincode is supported in current release of fabric?

mastersingh24 (Mon, 16 Oct 2017 22:58:28 GMT):
@Styxt - This typically indicates a TLS error - so likely you missed something in your properties settings. (https://chat.hyperledger.org/channel/fabric-sdk-java?msg=26KmmnoDoRN5vbiKt)

sudhi-git (Tue, 17 Oct 2017 03:25:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rZBc3gN9QmubJD5rG) @SudhiBhat Tagging other experts @mastersingh24

sudhi-git (Tue, 17 Oct 2017 03:34:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jttgQegQ4w53NvAAb) As far as I can understand there needs to be handshake between the CA and the peer. In the sense the peer needs to know the signing authority for the certificates. Maybe I need to give the certificate of the CA to peer?

malkochoglu (Tue, 17 Oct 2017 03:36:36 GMT):
Has joined the channel.

malkochoglu (Tue, 17 Oct 2017 03:48:30 GMT):
I want first build and run examples under fabric/examples/chaincode/java/ . I see both gradle and pom file. Are they placed there to give an option for developers or do we need both of them?

johncaboose (Tue, 17 Oct 2017 06:45:30 GMT):
Hello! Running Fabric and Java SDK version 1.0.1. I know transactions commit to the blockchain (as a query says it has) and everything about that is all fine and good except that the CompletableFuture from the sendTransaction function is never able to get anything. In other words it waits forever when in the get function for it. Do I have to manually implement a certain type of event in my chaincode for this elementary SDK function to work? Or are those events built in to the peer logic and there’s some sort of bug in it or the SDK? Thank you.

LemonMinp (Tue, 17 Oct 2017 07:45:40 GMT):
Has joined the channel.

johncaboose (Tue, 17 Oct 2017 08:25:28 GMT):
Alright I found a ticket for what I asked about. It seems I need to add an eventhub to the Channel. Thanks. Here’s the link: https://jira.hyperledger.org/browse/FAB-6198

manu (Tue, 17 Oct 2017 11:34:14 GMT):
Has joined the channel.

rickr (Tue, 17 Oct 2017 13:22:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Z5Wmq3s97pQA7DACg) No not supported in the latest nor from what I've gathered in v1.1 but double check with #fabric-java-chaincode

rickr (Tue, 17 Oct 2017 13:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jttgQegQ4w53NvAAb) Not sure what operation you're doing with this new enrolled user but from what I know those credentials can ONLY invoke CC (not install or instantiate)

rickr (Tue, 17 Oct 2017 13:28:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=W5ogBrmiMqnhd4bQg) Java CC is not supported .. That example probably out dated too.

KJAWSBC (Tue, 17 Oct 2017 14:03:45 GMT):
Has joined the channel.

KJAWSBC (Tue, 17 Oct 2017 14:28:22 GMT):
Hello,

KJAWSBC (Tue, 17 Oct 2017 14:28:25 GMT):
0 down vote favorite I'm trying to get the example up and running from https://www.ibm.com/developerworks/library/j-chaincode-for-java-developers/index.html All the build was successful and peer connection is up and running. I see below errors. C:\home\mychaincode\src\gitub.com\hyperledger\fabric\examples\chaincode\java\Exa mple\build\distributions\Example\bin>Example Hello world! starting [Ljava.lang.String;@2d98a335 Oct 16, 2017 1:03:32 PM example.Example main INFO: starting Oct 16, 2017 1:03:33 PM io.grpc.internal.TransportSet$1 call INFO: Created transport io.grpc.netty.NettyClientTransport@2f1ec084(/127.0.0.1:7 051) for /127.0.0.1:7051 Oct 16, 2017 1:03:34 PM io.grpc.internal.TransportSet$TransportListener transpor tShutdown INFO: Transport io.grpc.netty.NettyClientTransport@2f1ec084(/127.0.0.1:7051) for /127.0.0.1:7051 is being shutdown Oct 16, 2017 1:03:34 PM io.grpc.internal.TransportSet$TransportListener transpor tTerminated INFO: Transport io.grpc.netty.NettyClientTransport@2f1ec084(/127.0.0.1:7051) for /127.0.0.1:7051 is terminated Oct 16, 2017 1:03:34 PM org.hyperledger.java.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNAVAILABLE

KJAWSBC (Tue, 17 Oct 2017 14:28:25 GMT):
0 down vote favorite I'm trying to get the example up and running from https://www.ibm.com/developerworks/library/j-chaincode-for-java-developers/index.html All the build was successful and peer connection is up and running. I see below errors. C:\home\mychaincode\src\gitub.com\hyperledger\fabric\examples\chaincode\java\Exa mple\build\distributions\Example\bin>Example Hello world! starting [Ljava.lang.String;@2d98a335 Oct 16, 2017 1:03:32 PM example.Example main INFO: starting Oct 16, 2017 1:03:33 PM io.grpc.internal.TransportSet$1 call INFO: Created transport io.grpc.netty.NettyClientTransport@2f1ec084(/127.0.0.1:7 051) for /127.0.0.1:7051 Oct 16, 2017 1:03:34 PM io.grpc.internal.TransportSet$TransportListener transpor tShutdown INFO: Transport io.grpc.netty.NettyClientTransport@2f1ec084(/127.0.0.1:7051) for /127.0.0.1:7051 is being shutdown Oct 16, 2017 1:03:34 PM io.grpc.internal.TransportSet$TransportListener transpor tTerminated INFO: Transport io.grpc.netty.NettyClientTransport@2f1ec084(/127.0.0.1:7051) for /127.0.0.1:7051 is terminated Oct 16, 2017 1:03:34 PM org.hyperledger.java.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNAVAILABLE

hjy (Tue, 17 Oct 2017 15:39:12 GMT):
Has joined the channel.

SudhiBhat (Wed, 18 Oct 2017 03:27:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mP9CG4GyzAtjFe2nS) @rickr I am only invoking a GetState or a PutState. I am exactly following the steps in the End2endIT.java test case. I might be missing a configuration. Another information. Unlike the "fixtures" in the sdk project, where the certificates are stored in the e2eorgs folder I am generating the cryptographic material using the cryptogen tool for the different entities mentioned in the crypto-config folder. What is the purpose of storing the cacert and in the fabric HFCClient class the certificate is stored in the secure store? Is this the missing link?

paulkeogh (Wed, 18 Oct 2017 21:53:48 GMT):
Has joined the channel.

lin2K (Thu, 19 Oct 2017 09:19:06 GMT):
Has joined the channel.

cumt168 (Thu, 19 Oct 2017 13:33:17 GMT):
Has joined the channel.

cumt168 (Thu, 19 Oct 2017 13:33:36 GMT):
I run the End2endIT.java ,but this is error happen.

cumt168 (Thu, 19 Oct 2017 13:33:45 GMT):
Anyone can help me ? Thanks

cumt168 (Thu, 19 Oct 2017 13:34:04 GMT):
I found the config , defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.ca_location", "http://10.99.192.39:7050");

cumt168 (Thu, 19 Oct 2017 13:34:34 GMT):
where can I find the "ca_location"? There is no ca run

ozjc (Fri, 20 Oct 2017 10:55:40 GMT):
I think I'm late. I am currently writing Clojure SDK and learned a couple of things. Using 'grpc' is easier than 'grpcs', and to use 'grpc', need to add/change _TLS_ENABLED to false in configuration file(for example, docker-compose.yaml). I've just finished sign function with 'grpc', so probably turn on TLS and try 'grpcs'. Java keeps CA info in TrustStore and need to tweak it to make it talk with local docker servers (and possibly other tweaks which I do not know how yet).

Hundredwz (Fri, 20 Oct 2017 13:00:16 GMT):
I am using fabric-sdk-java to build one web app.But it couldnt write to blockchain.Actually,I cant do anything to blockchain,like query or invoke.I didnt get any logs.Can any help me ?

mnosseir (Fri, 20 Oct 2017 19:52:32 GMT):
Has joined the channel.

curtissummers (Fri, 20 Oct 2017 21:33:46 GMT):
Has joined the channel.

pheneghan (Fri, 20 Oct 2017 21:52:53 GMT):
Has joined the channel.

pheneghan (Fri, 20 Oct 2017 21:56:55 GMT):
I have set up Hyperledger Fabric on my IBM Bluemix test account and downloaded the Fabric Java SDK. I want to create the simplest "Hello World" type client app to call my Hyperledger install on a IBM Bluemix. Is there a good resource showing a simple Java client app?

fbutnariu (Sun, 22 Oct 2017 21:51:35 GMT):
Has joined the channel.

rickr (Mon, 23 Oct 2017 13:23:55 GMT):
https://github.com/IBM-Blockchain/JSDKIntegrationSample

hellothere (Mon, 23 Oct 2017 18:14:24 GMT):
Has joined the channel.

hellothere (Mon, 23 Oct 2017 18:15:45 GMT):
Hello, I'm a student trying to learn blockchain. If I build and deploy a blockchain network using Hyperledger Fabric, can I use the Java SDK to interact with the blockchain from a java web application? If so, how do I go about implementing the Java SDK in my application? Any simple resources that help explain?

ryokawajp (Tue, 24 Oct 2017 03:30:53 GMT):
message size

ryokawajp (Tue, 24 Oct 2017 03:40:57 GMT):
Hi. I heard that gRPC has a limitation in the maximum message size of 4MiBs. Is this value configurable in fabric-sdk-java? I would like to increase this value to enable the client to upload and download a large file such as a Word document. https://github.com/grpc/grpc/issues/7927

ryokawajp (Tue, 24 Oct 2017 03:43:15 GMT):
FYI: It looks like we can configure the max message size in fabric-sdk-node https://jira.hyperledger.org/browse/FAB-3301

cumt168 (Tue, 24 Oct 2017 03:56:51 GMT):
Hi, when I run fabric-sdk-java unit tests, there is one error happen. -- {"code":0,"message":"Identity 'user1' is already registered"} , Could anyone help on this ?

adrianhopebailie (Tue, 24 Oct 2017 07:05:14 GMT):
Has left the channel.

cumt168 (Tue, 24 Oct 2017 07:35:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aFnwYgvToQNXwkuRw) @rickr Can you provide this sample file of "bmxServiceCredentials.json" ?

rock_martin (Tue, 24 Oct 2017 08:52:14 GMT):
Has joined the channel.

Gauravimpro (Tue, 24 Oct 2017 09:44:04 GMT):
Has joined the channel.

Gauravimpro (Tue, 24 Oct 2017 10:08:33 GMT):
Hi, How can i enable logging for fabric-sdk-java?

mdanaci (Tue, 24 Oct 2017 12:29:03 GMT):
Hello @rickr , i have 2 organizations and 4 peers like the end2endit test. I want to use single channel (foo) with two organizations. Is it possible? The code below only gets first organizations' orderer. and first organizations' peerAdmin. Am i going to call channel.addOrderer(2. organizations' orderer) client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin()));

rickr (Tue, 24 Oct 2017 13:00:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7zZ3jFreHoZT3AkE3) [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7zZ3jFreHoZT3AkE3) No The BMX service should provide that to you.

rickr (Tue, 24 Oct 2017 13:03:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KX3DD3NXagGDgNk6r) There are many ways but the simplest of them is set it via env var: ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL or ORG_HYPERLEDGER_FABRIC_CA_SDK_LOGLEVEL

rickr (Tue, 24 Oct 2017 13:06:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zBZoA2Lzgb9XzLSzc) For the client (SDK) there is a limit on inbound messages size see End2endIT _grpc.NettyChannelBuilderOption.maxInboundMessageSize_

robsonximenes (Tue, 24 Oct 2017 13:24:45 GMT):
Has joined the channel.

robsonximenes (Tue, 24 Oct 2017 13:25:11 GMT):
Hi! Is there a archetype to start a new chaincode project???

Styxt (Tue, 24 Oct 2017 13:27:30 GMT):
Hi, i am getting the following error when i try to do a transaction with the sdk: ```SCHWERWIEGEND: Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: Unknown action, check the first argument, must be one of 'delete', 'query', or 'move'. But got: move), cause=null}``` Creating the channel, installing and initializing the chaincode work but somehow when i try to do the transaction it does not recognize the 'move' (I am currently working with the balance transfer examle cc) Anyone got an idea what the problem could be?

ryokawajp (Tue, 24 Oct 2017 16:35:47 GMT):
@rickr Thank you. I will take a look at the sample.

jeroiraz (Wed, 25 Oct 2017 02:02:26 GMT):
Has joined the channel.

cumt168 (Wed, 25 Oct 2017 04:18:17 GMT):
I meet this error, "First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002". What is this reason? @rickr

ozjc (Wed, 25 Oct 2017 05:55:15 GMT):
@cumt168 I got that when servers are running with TLS enabled, and client is trying to connect via grpc rather than grcps

cumt168 (Wed, 25 Oct 2017 06:56:19 GMT):
@ozjc I just run the classs "End2endAndBackAgainIT", and change nothing. How can I fix this issue?

cumt168 (Wed, 25 Oct 2017 06:57:10 GMT):
May I need to make some changes?

Gauravimpro (Wed, 25 Oct 2017 07:19:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4pYdvd3vyPh8KDuv7) @rickr I tried it but somehow it is not working. I am using maven project and used export command to set but couldn't get the fabric-sdk-java logs.

cumt168 (Wed, 25 Oct 2017 10:14:52 GMT):
I meet a error. --------- 2017-10-25 09:42:36,894 grpc-default-worker-ELG-2-2 DEBUG ReferenceCountedOpenSslContext:648 - verification of certificate failed sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

cumt168 (Wed, 25 Oct 2017 10:15:07 GMT):
what is it, anyone can help?

cumt168 (Wed, 25 Oct 2017 10:15:25 GMT):
I run End2endAndBackAgainIT.

ozjc (Wed, 25 Oct 2017 20:10:35 GMT):
@cumt168 (Warning - I haven't run Java SDK only read code to write my own version of Clojure SDK). About your previous question(assume you run local Docker images). 1. Change server configuration - I.e., change all *_TLS_ENABLED to false in your configuration file. 2. Use overrideAuthority(though I couldn't make it work in my Clojure SDK. I believe underlying library does not support it yet and use InsecureTrustManageFactory)

ozjc (Wed, 25 Oct 2017 20:10:35 GMT):
@cumt168 (Warning - I haven't run Java SDK only read code to write my own version of Clojure SDK). About your previous question(assume you run local Docker images). 1. Change server configuration - I.e., change all *__TLS__ENABLED to false in your configuration file. 2. Use overrideAuthority(though I couldn't make it work in my Clojure SDK. I believe underlying library does not support it yet and use InsecureTrustManageFactory)

anyone (Wed, 25 Oct 2017 20:52:17 GMT):
Has joined the channel.

hartimer (Wed, 25 Oct 2017 21:32:26 GMT):
Has joined the channel.

aatkddny (Wed, 25 Oct 2017 23:17:56 GMT):
Has joined the channel.

aatkddny (Wed, 25 Oct 2017 23:24:48 GMT):
I have a consortium - lets say three orgs A, B and C. My client has the peer admin for A set in the user context. I want to create a channel they all share. It seems to work if I call client.getChannelConfigurationSignature for the peer admins for all three, form them into an array and use that to call client.newChannel. What I can't do is figure out how to join the peers from the other orgs - B and C to the channel. I can't use that HFClient (A means an MSP mismatch). I can't create new HFClients for B and C because the client.getChannel(name) returns null and client.newChannel gives me an upgrade version mismatch. How do I join the peers to the channel here? (And after that of course the event hubs).

falix (Thu, 26 Oct 2017 03:25:11 GMT):
Has joined the channel.

cumt168 (Thu, 26 Oct 2017 05:22:06 GMT):
@ozjc Thank you, it is very helpful.

srongzhe (Thu, 26 Oct 2017 09:07:16 GMT):
Has joined the channel.

pheneghan (Thu, 26 Oct 2017 14:22:40 GMT):
I have the same question as @cumt168 with creating the bmxServiceCredentials.json file. The https://github.com/IBM-Blockchain/JSDKIntegrationSample shows how to do this if you are running Blockchain Enterprise installed from the catalog (this one has a blockchain dashboard from which you can download Service Credentials). However if you are running in a Kubernetes container there is no service credentials download. I was pointed to this: https://ibm-blockchain.github.io/interacting/ but not sure how to get the credentials path (have the public IP address). Also the JSDKIntegrationSample code expects a JSON object "organizations" in the bmxServiceCredentials.json file but the credentials block sample in the "interacting with your Blockchain" article is missing this object.

gowrikvk (Thu, 26 Oct 2017 15:11:27 GMT):
Has joined the channel.

rickr (Thu, 26 Oct 2017 15:37:08 GMT):
The sample worked once with standard bmx service. Not sure if they're are keeping it up todate with changes. You need work that team

rickr (Thu, 26 Oct 2017 15:37:08 GMT):
The sample worked once with standard bmx service. Not sure if they're are keeping it up todate with changes. You need work with that team

kz.bake (Thu, 26 Oct 2017 16:13:34 GMT):
Has joined the channel.

neharprodduturi (Thu, 26 Oct 2017 22:30:56 GMT):
Has joined the channel.

georgeanu (Thu, 26 Oct 2017 22:51:38 GMT):
Has joined the channel.

gowrikvk (Fri, 27 Oct 2017 04:40:01 GMT):
test@test-HP-EliteBook-840-G2:~/jsdkhl/src/github.com/hyperledger/fabric/core/chaincode/shim/java$ gradle build FAILURE: Build failed with an exception. * Where: Build file '/home/test/jsdkhl/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle' line: 33 * What went wrong: An exception occurred applying plugin request [id: 'java'] > Failed to apply plugin [id 'org.gradle.java'] > Could not create an instance of type com.google.protobuf.gradle.ProtobufSourceDirectorySet_Decorated. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED

gowrikvk (Fri, 27 Oct 2017 04:40:27 GMT):
any one suggest why i am getting this any solution?

gowrikvk (Fri, 27 Oct 2017 05:53:39 GMT):
we can resolve this issue with installation of Gradle 4.2.1

gowrikvk (Fri, 27 Oct 2017 08:49:28 GMT):
src/github.com/hyperledger/fabric/examples/chaincode/java/Example/src/main/java/example/Example.java:[66,8] example.Example is not abstract and does not override abstract method invoke(org.hyperledger.fabric.shim.ChaincodeStub) in org.hyperledger.fabric.shim.ChaincodeBase

gowrikvk (Fri, 27 Oct 2017 08:49:43 GMT):
getting issue ...any thoughts please

kz.bake (Fri, 27 Oct 2017 11:16:30 GMT):
hello, is there any sdk for android?

rickr (Fri, 27 Oct 2017 13:29:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BySLvpQ5M2zCdoPeG) No support for java CC at any fabric release.

rickr (Fri, 27 Oct 2017 13:29:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BySLvpQ5M2zCdoPeG) No support for java CC at any fabric release. Best discussed on #fabric-java-chaincode

scmchan (Fri, 27 Oct 2017 14:33:10 GMT):
Has joined the channel.

alimamacoin (Mon, 30 Oct 2017 05:02:17 GMT):
Has joined the channel.

deepakvparmar (Mon, 30 Oct 2017 09:07:26 GMT):
@rickr : We would like to increase gRPC package message size in fabric java sdk. Kindly help us how we can increase size. Currently, We are getting following exception : org.hyperledger.fabric.sdk.Channel initialize INTERNAL: io.grpc.net ty.NettyClientTransport$3: Frame size 4678347 exceeds maximum: 4194304. org.hyperledger.fabric.sdk.exception.TransactionException: INTERNAL: io.grpc.netty.Nett yClientTransport$3: Frame size 4678347 exceeds maximum: 4194304. at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:286) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:165) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1074) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:898) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:826)

mmick (Mon, 30 Oct 2017 11:33:46 GMT):
Has joined the channel.

ascatox (Mon, 30 Oct 2017 14:23:57 GMT):
Hi All! I'm trying to develop a simple application to interact with the blockchain! Using maven to import the fabric-sdk-java library I can't find this class `import org.hyperledger.fabric.sdk.ChaincodeEvent;``

ascatox (Mon, 30 Oct 2017 14:24:12 GMT):
Someone has the same problem!

rickr (Mon, 30 Oct 2017 14:37:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=exASrHwiT64zXjPK8) On the client side (SDK) you add grpc.NettyChannelBuilderOption.maxInboundMessageSize to the properties. However if what you're sending is also large you may need to update the server side (Fabric). You'll need to ask that on the #fabric-orderer channel

rickr (Mon, 30 Oct 2017 14:42:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oEmqLrcSx6GceqH2Q) Are you referencing version 1.0.0 or 1.0.1 ?

ascatox (Mon, 30 Oct 2017 14:43:08 GMT):
1.0.1

ascatox (Mon, 30 Oct 2017 14:46:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bxLvAs4JpxeDysuw6) @rickr 1.0.1

rickr (Mon, 30 Oct 2017 15:53:01 GMT):
I thought that made the 1.0.1 cut but apparently not. I just checked, it is in the 1.1.0-SNAPSHOT builds as expected. The readme.md has some pointers on how to reference in your apps pom.xml

deepakvparmar (Tue, 31 Oct 2017 06:48:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=avctpeu6izs6K73ph) @rickr : Thank You Rick. As per your suggestion, I can add property called "grpc.NettyChannelBuilderOption.maxInboundMessageSize" as a Orderer properties while initializing channel in fabric java sdk. Moreover; We should also increase size on fabric server side as well. Can you please help me where i can find document for all such properties which we can add as Orderer, Peer and EventHub properties? Actually I would like to know how we can set "maxInboudMessageSize" and what should be type or unit of property value.

luckydogchina (Tue, 31 Oct 2017 06:58:51 GMT):
Has joined the channel.

luckydogchina (Tue, 31 Oct 2017 07:00:24 GMT):
I may find a bug in the fabric-sdk-java

luckydogchina (Tue, 31 Oct 2017 07:02:48 GMT):
when I try to run `docker-compose up` under the sdkintegration folder, the error is throwed:

luckydogchina (Tue, 31 Oct 2017 07:02:48 GMT):
when I try to run `docker-compose up` under the sdkintegration folder, the error is throwed:`Error: Failed to store certificate: open /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem: read-only file system ca_peerOrg1 exited with code 1`

luckydogchina (Tue, 31 Oct 2017 07:02:48 GMT):
when I try to run `docker-compose up` under the sdkintegration folder, the error is throwed:`Error: Failed to store certificate: open /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem: read-only file system ca_peerOrg1 exited with code 1` Then I change the ` /etc/hyperledger/fabric-ca-server-config:ro` to ` /etc/hyperledger/fabric-ca-server-config` under `ca0` and `ca1` in `docker-compose.yaml`, all is ok !

luckydogchina (Tue, 31 Oct 2017 07:02:48 GMT):
when I try to run `docker-compose up` under the sdkintegration folder, the error is throwed:`Error: Failed to store certificate: open /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem: read-only file system ca_peerOrg1 exited with code 1` Then I change the ` /etc/hyperledger/fabric-ca-server-config:ro` to ` /etc/hyperledger/fabric-ca-server-config` under `ca0` and `ca1` in `docker-compose.yaml`, all is ok !

luckydogchina (Tue, 31 Oct 2017 07:03:24 GMT):

start ca fialure.png

xuanyue202 (Tue, 31 Oct 2017 09:58:08 GMT):
@rickr How can fabric-sdk-java listen to the event emitted by chaincode?

xuanyue202 (Tue, 31 Oct 2017 09:59:51 GMT):
I tried the `registerChaincodeEventListener` method in EventHub, but nothing happened. The original 'registerTXListener' has been removed. THere is little document on this. :frowning2:

gujingxiao (Tue, 31 Oct 2017 10:04:52 GMT):
Has joined the channel.

rickr (Tue, 31 Oct 2017 13:55:29 GMT):
I'll have to look into that. What is the version of fab-ca? commit level ? I did this once on purpose because the CA should NOT be changing that. My first inclination is this is a fab-ca bug. Off the bat don't think I'm seeing that in a recent version.

rickr (Tue, 31 Oct 2017 13:56:49 GMT):
@deepakvparmar Please ask that on the #fabric channel they need to be documenting that or showing an example.

smithbk (Tue, 31 Oct 2017 14:30:35 GMT):
@luckydogchina Did /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem exist before starting fabric-ca-server? If not, then it needs to create a self-signed CA cert and store it there. If it already existed, then yes it is a bug since it should not try to replace it.

luckydogchina (Wed, 01 Nov 2017 01:02:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rAiaaQ8GgtAeSGogG) @smithbk Yes, I make the msp by the `cryptogen` tool before running the dockers

smithbk (Wed, 01 Nov 2017 01:19:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JBdejCGnELcv4fqXj) @luckydogchina As Rick asked, what version of fabric-ca-server is this? Pls try with the latest in master if you haven't, and if it is still a problem, open a jira item with more detailed instructions on how to reproduce.

luckydogchina (Wed, 01 Nov 2017 02:51:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=w2F3hpx5DCsoYhQim) @smithbk I pull the `fabric-ca` docker images from `docker pull`, the image version is `hyperledger/fabric-ca:x86_64-1.0.1`.

luckydogchina (Wed, 01 Nov 2017 02:51:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=w2F3hpx5DCsoYhQim) @smithbk I pull the `fabric-ca` docker images from `docker pull`, the image version is `hyperledger/fabric-ca:x86_64-1.0.1`. the fabric-sdk-java version is v1.0.1 too.

luckydogchina (Wed, 01 Nov 2017 02:57:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=w2F3hpx5DCsoYhQim) @smithbk How can I report the bug ? Can you give a entrance to me ?

zhiqiang 1 (Wed, 01 Nov 2017 04:10:31 GMT):
Has joined the channel.

Kayd29 (Wed, 01 Nov 2017 10:18:21 GMT):
Has joined the channel.

smithbk (Wed, 01 Nov 2017 12:26:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iGT5bPzdXRLRGmDY7) @luckydogchina Go to https://jira.hyperledger.org/secure/Dashboard.jspa ... and it has a link to create a Linux Foundation ID if you don't have one. Click on "Create Issue" and be sure to select "fabric-ca" as the Component

rickr (Wed, 01 Nov 2017 14:15:48 GMT):
I just checked and I don't see any errors with start fabric ca https://ctrlv.it/id/58214/2710944373 commit 786cb8d0587c331294244cd912cac3dfed0d6daa Date: Sun Oct 1 15:57:17 2017 -0400

SandySun2000 (Wed, 01 Nov 2017 18:14:29 GMT):
where does org.hyperledger.fabric.protos.peer.EventsGrpc come from? I have trouble to recognize this package from my eclipse project. However, org.hyperledger.fabric.protos.peer.PeerEvents looks good

yoyokeen (Thu, 02 Nov 2017 02:47:43 GMT):
@here,how to use the customsize event?

zhaochy (Thu, 02 Nov 2017 04:03:15 GMT):
Has left the channel.

Jonny (Thu, 02 Nov 2017 15:33:41 GMT):
hi guys, where can I find a working sample of the usage of this java-sdk-client?

hellothere (Thu, 02 Nov 2017 20:15:27 GMT):
Hi all, would anyone be willing to let me direct message them with some beginner, basic questions on getting start on building a java client and using the java sdk?

rickr (Thu, 02 Nov 2017 21:13:57 GMT):
Learn Hyperledger Fabric concepts. First ask on Fabric RC channel the best source for that. Maybe http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html The SDK will not re-document it. *Fully* read the SDK Readme.md Then READ IT AGAIN :) Study the EndendIT.java and End2endAndBackAgainIT while they are integration tests they do 95% of what an application would do with the SDK. Maybe take it a step further and follow it in a debugger to help learn what it's doing. Then for *your application* you have 90% of the code already written as you should be able to copy and paste most of what you need from them .

rickr (Thu, 02 Nov 2017 21:13:57 GMT):
Learn Hyperledger Fabric concepts. First ask on Fabric RC channel the best source for that. Maybe http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html The SDK will not re-document it. *Fully* read the SDK Readme.md Then READ IT AGAIN :) Study the EndendIT.java and End2endAndBackAgainIT while they are integration tests they do 95% of what an application would do with the SDK. Maybe take it a step further and follow it in a debugger to help learn what it's doing. Then for *your application* you have 90% of the code already written as you should be able to copy and paste most of what you need from them .

rickr (Thu, 02 Nov 2017 21:13:57 GMT):
Learn Hyperledger Fabric concepts. First ask on Fabric RC channel the best source for that. Maybe http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html The SDK will not re-document it. *Fully* read the SDK Readme.md Then READ IT AGAIN :) Study the EndendIT.java and End2endAndBackAgainIT while they are integration tests they do 95% of what an application would do with the SDK. Maybe take it a step further and follow it in a debugger to help learn what it's doing. Then for *your application* you have 90% of the code already written as you should be able to copy and paste most of what you need from them :)

rickr (Thu, 02 Nov 2017 21:18:42 GMT):

cumt168 (Fri, 03 Nov 2017 03:26:48 GMT):
Java chaincode is work-in-progress and disabled

cumt168 (Fri, 03 Nov 2017 03:26:59 GMT):
what is this mean? @rickr

cumt168 (Fri, 03 Nov 2017 03:29:40 GMT):
when i use "peer chaincode *** ", the error happen above. My chaincode is implemented by java.

sanchezl (Fri, 03 Nov 2017 13:06:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=b9pEQK4xsK3rvfcvi) @cumt168 You will need to compile your own fabric v1.1 with the experimental flag on to use Java chaincode. You can ask more questions in #fabric-java-chaincode

hellothere (Fri, 03 Nov 2017 18:42:38 GMT):
Is the Java SDK the easiest way interact with a blockchain network running on Fabric from a Java web application?

mmick (Sat, 04 Nov 2017 08:43:42 GMT):
when to use hyperledger composer vs SDK's (java, node)?

zhixinlong (Mon, 06 Nov 2017 09:47:11 GMT):
Has joined the channel.

zhixinlong (Mon, 06 Nov 2017 09:47:32 GMT):
please tell who write this broken sdk

zhixinlong (Mon, 06 Nov 2017 09:47:49 GMT):
It is hurt IBM

cumt168 (Mon, 06 Nov 2017 12:32:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=v3PBHLvoewhiDM3aX) @sanchezl Thank you.

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the `channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]]`

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the `channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]]` if i set the usercontext org1 to all eventhubs. This time i get the following exception. `org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] `

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the `channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]]` if i set the usercontext org1 to all eventhubs. This time i get the following exception. `org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] `

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the `channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]]` if i set the usercontext org1 to all eventhubs. This time i get the following exception. `org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] `

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the `channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]]` if i set the usercontext org1 to all eventhubs. This time i get the following exception.`org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] `

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the `channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]]` if i set the usercontext org1 to all eventhubs. This time i get the following exception. ```org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] ```

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the ```channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]] ``` if i set the usercontext org1 to all eventhubs. This time i get the following exception. ```org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] ```

mdanaci (Mon, 06 Nov 2017 13:14:37 GMT):
Hello @rickr i have 5 organization and each org has 1 peer, these orgs has 1 common channel. I'm trying to add 5 eventhubs to channel, even i set the userContext for each eventhub creation i get the following error when i initialize the ```channel. java.lang.AssertionError: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org1, received Org5]] ``` if i set the usercontext org1 to all eventhubs. This time i get the following exception. ```org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: UNKNOWN: event message must be properly signed by an identity from the same organization as the peer: [failed deserializing event creator: [Expected MSP ID Org5, received Org1]] ```

hellothere (Mon, 06 Nov 2017 13:22:52 GMT):
Are there any sample java web applications using the Java SDK I can browse?

bh4rtp (Mon, 06 Nov 2017 14:26:27 GMT):
hi, how can i pass access_token value to `composer-cli`? i am using authorization of github.

bh4rtp (Mon, 06 Nov 2017 14:26:27 GMT):
hi, how can i pass `access_token` value to `composer-cli`? i am using authorization of github.

bh4rtp (Mon, 06 Nov 2017 14:26:27 GMT):
hi, how can i pass `access_token` value to `composer-cli`? i am using authentication from github.

rickr (Mon, 06 Nov 2017 15:38:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RPwnFGkdtnN4aQoyC) Each organization would be like a company Ford, Toyota, BMW etc Their Peers, Orderers CA would NEVER be shared especially not the credentials using them. Their clients would ONLY run in their own organizations IT shop. If what you want to do is provide a scenario like this and not have them run in the different Java instances (closer to real use case) use a separate HFClient provide each the appropriate user creds for each organization and create a separate channel object (same name) .

mondraymond (Mon, 06 Nov 2017 16:02:17 GMT):
Has joined the channel.

zdmob (Tue, 07 Nov 2017 02:18:11 GMT):
Has joined the channel.

mdanaci (Tue, 07 Nov 2017 07:17:34 GMT):
Hi @rickr, I mentioned before that i have 5 organization, each organization has 1 peer, 1 ca and the whole system has 1 orderer. I will have 5 physical servers in runtime (each server will contain 1ca, 1peer, 1 couchdb for that organization) and a orderer server. Total of 6 physical server. Whole system has 1 channel (1 ledger) What i am trying to do is create and serialize channel in a starter project using End2endIT.java Here are the steps: 1. For each organization "Create 1 HFCAClient and create admin users, register and enroll them and add to organization." (Each org has its own certificates) 2. Create an orderer 3. Construct channel - Create channel using first organizations peer admin. Add all peers to channel (switching organizations and userContext (I have 1 HFCClient)) 4. Add one eventHub using first organization (my previous question was this one) 5. initialize channel 6. Install chaincode to all peers and invoke init method. 7. Serialize channel to a file. After that i'm copying this serialized file to servers and reconstruct channel like in the End2endAndBackAgainIT.java I'm running my methods and it works. There aren't any examples like "Multiple organizations using 1 channel", Am i missing something? Thanks by the way. [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NiGJqNnvK4mQpFoHy) @rickr

asaningmaxchain (Tue, 07 Nov 2017 12:25:45 GMT):
@rickr i set the max message for the peer ` peerProperties.put("grpc.ManagedChannelBuilderOption.maxInboundMessageSize", 100*1024*1024); Peer peer = client.newPeer(peerName, peerLocation, peerProperties);` and then i still get the error

asaningmaxchain (Tue, 07 Nov 2017 12:27:56 GMT):
@rickr i set the ` peerProperties.put("grpc.ManagedChannelBuilderOption.maxInboundMessageSize", 100*1024*1024); Peer peer = client.newPeer(peerName, peerLocation, peerProperties);` but i still get the error

asaningmaxchain (Tue, 07 Nov 2017 12:28:09 GMT):
NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304

asaningmaxchain (Tue, 07 Nov 2017 12:28:09 GMT):
`NettyClientTransport$2: Frame size 88617868 exceeds maximum: 4194304`

asaningmaxchain (Tue, 07 Nov 2017 12:33:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Pb8gQfiGNGDZ5Bhz6) @rickr @karo

asaningmaxchain (Tue, 07 Nov 2017 12:33:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Pb8gQfiGNGDZ5Bhz6) @rickr @karumbas https://github.com/hyperledger/fabric-sdk-java/blob/11bd160a95fa8529d93582ec68556bb1c4652c21/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L589

asaningmaxchain (Tue, 07 Nov 2017 12:33:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Pb8gQfiGNGDZ5Bhz6) @rickr @karumbas https://github.com/hyperledger/fabric-sdk-java/blob/11bd160a95fa8529d93582ec68556bb1c4652c21/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L589 i think it's place should to see

rickr (Tue, 07 Nov 2017 13:36:56 GMT):
@mdanaci Sounds to me like it's working. The end2end does have multiple orgs but the use different channel for test purposes.

rickr (Tue, 07 Nov 2017 13:45:37 GMT):
@asaningmaxchain I think that message is coming from the fabric not the SDK you'll need to ask on #fabric-peer-endorser-committer if there are server settings needed

mdanaci (Tue, 07 Nov 2017 14:01:18 GMT):
@rickr It's working if i test with the organization that who created that channel. The other organizations don't work. :D ``` Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, org.getPeerAdmin())); for (String peerName : org.getPeerNames()) { String peerLocation = org.getPeerLocation(peerName); Properties peerProperties = config.getPeerProperties(peerName); //test properties for peer.. if any. if (peerProperties == null) { peerProperties = new Properties(); } peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); Peer peer = client.newPeer(peerName, peerLocation, peerProperties); newChannel.joinPeer(peer); org.addPeer(peer); } for (Orderer orderer : orderers) { //add remaining orderers if any. newChannel.addOrderer(orderer); } client.setUserContext(org.getPeerAdmin()); for (String eventHubName : org.getEventHubNames()) { final Properties eventHubProperties = config.getEventHubProperties(eventHubName); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); EventHub eventHub = client.newEventHub(eventHubName, org.getEventHubLocation(eventHubName), eventHubProperties); newChannel.addEventHub(eventHub); } ```

mdanaci (Tue, 07 Nov 2017 14:01:18 GMT):
@rickr It's working if i test with the organization that who created that channel. The other organizations don't work. :D org1 creates the newChannel, how can i add other organizations to this channel? ``` Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, org.getPeerAdmin())); for (String peerName : org.getPeerNames()) { String peerLocation = org.getPeerLocation(peerName); Properties peerProperties = config.getPeerProperties(peerName); //test properties for peer.. if any. if (peerProperties == null) { peerProperties = new Properties(); } peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); Peer peer = client.newPeer(peerName, peerLocation, peerProperties); newChannel.joinPeer(peer); org.addPeer(peer); } for (Orderer orderer : orderers) { //add remaining orderers if any. newChannel.addOrderer(orderer); } client.setUserContext(org.getPeerAdmin()); for (String eventHubName : org.getEventHubNames()) { final Properties eventHubProperties = config.getEventHubProperties(eventHubName); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); EventHub eventHub = client.newEventHub(eventHubName, org.getEventHubLocation(eventHubName), eventHubProperties); newChannel.addEventHub(eventHub); } ```

mdanaci (Tue, 07 Nov 2017 14:01:18 GMT):
@rickr It's working if i test with the organization that who created that channel. The other organizations don't work. :D org1 creates the newChannel, how can i add other organizations to this channel? ``` Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, org.getPeerAdmin())); for (String peerName : org.getPeerNames()) { String peerLocation = org.getPeerLocation(peerName); Properties peerProperties = config.getPeerProperties(peerName); //test properties for peer.. if any. if (peerProperties == null) { peerProperties = new Properties(); } peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); Peer peer = client.newPeer(peerName, peerLocation, peerProperties); newChannel.joinPeer(peer); org.addPeer(peer); } for (Orderer orderer : orderers) { //add remaining orderers if any. newChannel.addOrderer(orderer); } client.setUserContext(org.getPeerAdmin()); for (String eventHubName : org.getEventHubNames()) { final Properties eventHubProperties = config.getEventHubProperties(eventHubName); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); EventHub eventHub = client.newEventHub(eventHubName, org.getEventHubLocation(eventHubName), eventHubProperties); newChannel.addEventHub(eventHub); } newChannel.initialize(); ```

knagware9 (Tue, 07 Nov 2017 16:13:50 GMT):
Has left the channel.

mastersingh24 (Tue, 07 Nov 2017 23:52:06 GMT):
@mdanaci - take a look at https://youtu.be/DKuGU5CYV_E to understand what is involved in adding additional organizations to a channel and then look at https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java for how to interact with configtxlator from the Java SDK

asaningmaxchain (Wed, 08 Nov 2017 01:16:33 GMT):
@rickr @mastersingh24 the java sdk send the tx in async way,so how to get the tps?

asaningmaxchain (Wed, 08 Nov 2017 01:20:19 GMT):
@mastersingh24 @rickr i got the error `"Failed query proposal from peer peer0.org1.example.com status: FAILURE. Messages: Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=INTERNAL, description=io.grpc.netty.NettyClientTransport$3: Frame size 4545210 exceeds maximum: 4194304. , cause=null}. Was verified : false" Name `

asaningmaxchain (Wed, 08 Nov 2017 01:20:19 GMT):
@mastersingh24 @rickr i got the error ```"Failed query proposal from peer peer0.org1.example.com status: FAILURE. Messages: Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=INTERNAL, description=io.grpc.netty.NettyClientTransport$3: Frame size 4545210 exceeds maximum: 4194304. , cause=null}. Was verified : false" Name ```

Umar12 (Wed, 08 Nov 2017 08:36:29 GMT):
Has joined the channel.

rickr (Wed, 08 Nov 2017 12:56:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9wc5AFFCFCf4HT6Mb) Maybe this will help: only one Org creates the channel. All other orgs would use client.newChannel(name) to get the channel object. All orgs need to join their peers the first time and after that would only to reconnstruct the channel use addPeer.

rickr (Wed, 08 Nov 2017 13:35:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wmpikSFwFFRgarHR9) https://github.com/hyperledger/fabric-sdk-java/blob/0b3e5aaa7b7f9440921f75f488da34b67f6dd606/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L684 Should be able to do that for orderer, eventhub and peers

rickr (Wed, 08 Nov 2017 13:37:01 GMT):
You may need to also fix the server side for that too. Need to ask that on one of their channels #fabric-peer-endorser-committer ?

rjones (Wed, 08 Nov 2017 20:12:40 GMT):
Has joined the channel.

rjones (Wed, 08 Nov 2017 20:14:11 GMT):
@rickr I thought I saw a comment somewhere from you about needing to preserve log files from release builds for a long time, and I cannot find your comment. Could you help me out - which release builds in particular?

rjones (Wed, 08 Nov 2017 20:15:03 GMT):
@rickr the upcoming outage (this weekend) is to partly address your desire for longer retention, but right now logs are pruned with a very dull knife. If there is a class of logs I can keep for a longer time I'm open to some work on crontab

rickr (Wed, 08 Nov 2017 20:37:18 GMT):
@rjones I think it's ok now. I did mention to @rameshthoomu that a very nice _icing on the cake_ option would be to keep logs for the builds for the last build merged .. until ofcourse the next merge. This would be a good reference at times when something started failing to fallback why it worked before ... if you get my drift

rjones (Wed, 08 Nov 2017 20:38:25 GMT):
that would be pretty hard to determine externally, I think

rickr (Wed, 08 Nov 2017 20:38:46 GMT):
Yeah -- figured -- not high priority

rjones (Wed, 08 Nov 2017 20:38:50 GMT):
there isn't something neat I can do with a `find` command to find those logs.

rjones (Wed, 08 Nov 2017 20:39:02 GMT):
I think longer retention overall will help everyone

rjones (Wed, 08 Nov 2017 20:39:18 GMT):
there is one particular job that is a problem, tbh. I need to set a much shorter retention for it

rjones (Wed, 08 Nov 2017 20:39:48 GMT):
well, any log of the form `fabric*s390x*` is problematic

rickr (Wed, 08 Nov 2017 20:41:13 GMT):
The issue I was also seeing is on reverify for a merged build (maybe it' was on others ) There was no indication being given that it was starting .. which I thought was it was not running at all. But it did kick off and showed it's status _after_ it was done.

rjones (Wed, 08 Nov 2017 20:42:36 GMT):
there is a bug in the `gerrit` plugin for Jenkins. gerrit changed how you comment on merged changes and the Jenkins plugin is not fixed, yet.

rjones (Wed, 08 Nov 2017 20:44:58 GMT):
to give you an idea of scale, the `fabric-verify-z` job logs are about 20megs each. the `fabric-verify-x86_64` logs are about 70K each

rjones (Wed, 08 Nov 2017 20:44:58 GMT):
to give you an idea of scale, the `fabric-verify-z` job logs are ~20megs each. the `fabric-verify-x86_64` logs are ~70K each

rickr (Wed, 08 Nov 2017 20:49:38 GMT):
Yeah but I heard it completes under half the time :)

rjones (Wed, 08 Nov 2017 20:55:13 GMT):
¯\_(ツ)_/¯

rjones (Wed, 08 Nov 2017 20:55:43 GMT):
I can shake my fist in the direction of the service provider, not much I can do otherwise

rjones (Wed, 08 Nov 2017 20:55:59 GMT):
I've had an open ticket on that issue for a little while

asaningmaxchain (Thu, 09 Nov 2017 01:46:50 GMT):
@rickr @mastersingh24 the java sdk send the tx in async way,so how to get the tps?

rickr (Thu, 09 Nov 2017 02:50:58 GMT):
What do you consider a transaction ?

rickr (Thu, 09 Nov 2017 14:07:25 GMT):
You may find this interesting https://chat.hyperledger.org/channel/fabric-orderer?msg=cGEhbX6RKcdfZvFDM

rickr (Thu, 09 Nov 2017 14:28:34 GMT):
*Volunteer Needed* I keep getting asked on how to set up Eclipse for development. Would like someone preferably who has set it up already and knows all the gotcha's and hints and tips to get it working. No mad rush please : https://jira.hyperledger.org/browse/FAB-6939

chaitanya (Thu, 09 Nov 2017 17:08:05 GMT):
Hi everyone, I am getting a timeout issue (for 2 of my 6 chaincodes) despite all chaincode containers being up ```org.hyperledger.fabric.sdk.exception.ProposalException: Not enough endorsers for invoke RequestOpenChannel :500 endorser error:Sending proposal to peer0.org1.example.com failed because of timeout(20000 milliseconds) expiration. Was verified:false``` Can someone tell me what could be the reasons for the timeout error?

rickr (Thu, 09 Nov 2017 17:15:07 GMT):
It timed out :)

rickr (Thu, 09 Nov 2017 17:16:01 GMT):
Try looking at Config.getProposalWaitTime see how to change that

rickr (Thu, 09 Nov 2017 17:18:24 GMT):
On the fabric side look at the the docker containers instances that are your chaincode find ones that timed out look at the logs see if anything there is going on

aatkddny (Thu, 09 Nov 2017 23:03:16 GMT):
This might be a dumb question. I have a channel that has 3 organizations attached to it. Each has two endorsing peers. I need to have a transaction endorsed by two of them for it to be considered ok. The channel currently is set to allow any one to endorse and it passes - I haven't tried iterating the possibilities yet. My java code is adapted from the good old end to end sample. My HFClient is for the first org. It has Org_One.peer0 and peer1 attached to it. If I submit the TransactionProposalRequest using channel.sendTransactionProposal with my peer set I get two ProposalResponse replies (from the two peers for this channel). How do I make sure it also is submitted to the other peers? More HFClients? It happens automagically? I add the peers to the channel (even though they are for the wrong client). Anyone try this yet and can save me a little time?

aatkddny (Thu, 09 Nov 2017 23:03:16 GMT):
I have a channel that has 3 organizations attached to it. Each has two endorsing peers. I need to have a transaction endorsed by two of them for it to be considered ok. My java code is adapted from the good old end to end sample. My HFClient is for the first org. It has Org_One.peer0 and peer1 attached to it. If I submit the TransactionProposalRequest using channel.sendTransactionProposal with my peer set I get two ProposalResponse replies (from the two peers for this channel). How do I make sure it also is submitted to the other peers? More HFClients? It happens automagically? I add the peers to the channel (even though they are for the wrong client). Anyone try this yet and can save me a little time?

aatkddny (Thu, 09 Nov 2017 23:03:16 GMT):
I have a channel that has 3 organizations attached to it. Each has two endorsing peers. I need to have a transaction endorsed by two of them for it to be considered ok. My java code is adapted from the good old end to end sample. My HFClient is for the first org. It has Org_One.peer0 and peer1 attached to it. If I submit the TransactionProposalRequest using channel.sendTransactionProposal with my peer set I get two ProposalResponse replies (from the two peers for this channel). When I submit to the orderer I get `java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 7a5070e84ec423e5d5cb63cb18223b322e3233945a37bdc42f321530409e2eda status 10` If I set it to OR it works just fine, so it is obviously something to do with the requests not propagating. How do I make sure it also is submitted to the other peers? More HFClients? Could I add the peers to the channel (even though they are for the wrong client). I think I tried that before and it failed abjectly. Anyone try this yet and can save me a little time?

aatkddny (Thu, 09 Nov 2017 23:12:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tazKSccFyv3yZrEeo) @rickr The JavaSDK I assume? It's pretty simple apart from one wrinkle. If you don't have whatever it is you are using for checkstyle (I forgot already - did this a while back) you need to edit the .project file and delete the damn thing - keep only javabuilder and Maven2Nature. After that it's fairly standard - you import it, convert it to a maven project, run the maven -> generate sources and then it should compile cleanly. After that I used the mvn: on the command line as the doc says to run the tests.

aatkddny (Thu, 09 Nov 2017 23:13:59 GMT):
[x ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wiHw8tTnFRce69jSW) @chaitanya

aatkddny (Thu, 09 Nov 2017 23:13:59 GMT):
[](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wiHw8tTnFRce69jSW) @chaitanya I had this happen a more than a few times when I first turned on security. If you look at the logs from the chain code containers attached to the peers (assuming they were instantiated properly) it'll tell you what went wrong.

takeo (Fri, 10 Nov 2017 07:29:32 GMT):
Has joined the channel.

takeo (Fri, 10 Nov 2017 07:43:33 GMT):
Hi! I have some questions about Java SDK. Why does a User object need a key-value store? What does this way mean?

takeo (Fri, 10 Nov 2017 07:49:12 GMT):
Do I really have to use a key-value store?

takeo (Fri, 10 Nov 2017 08:15:02 GMT):
I need the smallest and simplest Java SDK example to only invoke a chaincode.

takeo (Fri, 10 Nov 2017 08:20:27 GMT):
I guess what class I have to make are classes that implement Enrollment and User. Is it correct?

takeo (Fri, 10 Nov 2017 08:20:27 GMT):
I guess what class I have to make are classes that implement Enrollment and User, except my main class. Is it correct?

chaitanya (Fri, 10 Nov 2017 11:14:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MnaAsBYpaB5iz5Yun) @rickr I tried changing this via an application.properties, but it never seems to change from the `20000 milliseconds` value. Is there someplace other than `fooChain.setTransactionWaitTime(config.getTransactionWaitTime());` where I must be setting it?

rickr (Fri, 10 Nov 2017 13:52:30 GMT):
You should be able to set it with an environment variable, java system property or config.properties see top of Config.java

rickr (Fri, 10 Nov 2017 13:55:06 GMT):
Also if you are going from TLS to not TLS or visa versa you need to clean out your existing CC docker containers. There is in the sdkintegration directory a fabric.sh that does that for you if you want to do a restart

kedarr (Fri, 10 Nov 2017 14:03:21 GMT):
Has joined the channel.

chaitanya (Fri, 10 Nov 2017 18:38:36 GMT):
@rickr I have a Java SDK instance running, for a network of 2 orgs each containing 2 peers. As far as I understand the purpose of an anchor peer, I should only add the anchor peers to the SDK, right? Or does it make sense to add both the anchor and non-anchor peer to the SDK? By "adding a peer to the SDK" I mean adding them to a channel using the `Channel.addPeer()` function.

chaitanya (Fri, 10 Nov 2017 18:38:36 GMT):
@rickr I have a Java SDK instance running, for a network of 2 orgs each containing 2 peers. As far as I understand the purpose of an anchor peer, I should only add the anchor peers to the SDK, right? Or does it make sense to add both the anchor and non-anchor peer to the SDK? By "adding a peer to the SDK" I mean adding them to a channel using the `Channel.addPeer()` function.

danielbharath (Sun, 12 Nov 2017 03:27:39 GMT):
Has joined the channel.

rickr (Mon, 13 Nov 2017 14:14:04 GMT):
AFAIK the minimum requirement is just a single peer attached to a channel. Any other peer will need to have gossip setup to keep it sync. In general, the SDK does not care about Anchor vs - non - anchor. That is more related to gossip something the SDK is really not aware of.

asaningmaxchain (Mon, 13 Nov 2017 15:01:50 GMT):
@rickr can you take a look #fabric-orderer

chaitanya (Mon, 13 Nov 2017 16:58:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yFHFyS8ZxzCZ9SLt4) @rickr alright, thanks!

GayatriH (Tue, 14 Nov 2017 06:57:25 GMT):
Has joined the channel.

GayatriH (Tue, 14 Nov 2017 07:03:40 GMT):
Hi, has anyone tried to make fabric java-sdk v1.1 with docker on windows up and running with chaincode installed and instantiated? I have run docker-compose.yml which pulls up 3 images - peers, orderer and ca and starts the containers. But when I go to bash for any container, I do no find anything on /opt folder. Also running this command "chaincode_example02 -i CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051" does not start anything on port 7051. I am really stuck here, I have multiple things online but there are some info is for v0.6 which is not relevant to v1.1. Can someone please guide me with set up steps from beginning?

GayatriH (Tue, 14 Nov 2017 07:03:40 GMT):
Hi, has anyone tried to make fabric java-sdk v1.1 with docker on windows up and running with chaincode installed and instantiated? I have run docker-compose.yml which pulls up 3 images - peers, orderer and ca and starts the containers. But when I go to bash for any container, I do no find anything on /opt folder. Also running this command "chaincode_example02 -i CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051" does not start anything on port 7051. I am really stuck here, I have tried multiple things online but some info is for v0.6 which is not relevant to v1.1. Can someone please guide me with set up steps from beginning?

ascatox (Tue, 14 Nov 2017 14:04:43 GMT):
Hi All! Someone can explain the need to have an *Admin* and a *PeerAdmin* in the End2EndTest

ascatox (Tue, 14 Nov 2017 14:05:06 GMT):
What are the differences between them!Thanks in advance!

ascatox (Tue, 14 Nov 2017 14:05:06 GMT):
What are the differences between them?Thanks in advance!

rickr (Tue, 14 Nov 2017 14:09:36 GMT):
The Admin should be more properly named CARegistrar. That user can register with the CA additional users to `invoke` chaincode. The PeerAdmin is needed to join peer to channel, install CC, and instantiate CC.

ascatox (Tue, 14 Nov 2017 14:11:41 GMT):
They are both necessary, I can use only the Admin for everytihng

ascatox (Tue, 14 Nov 2017 14:11:41 GMT):
They are both necessary, I can use only the Admin for everything

rickr (Tue, 14 Nov 2017 14:12:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4Yur6YBfRzCfvhWHH) Maybe this can help with windows ? I don't use windows so kind lost at helping out

rickr (Tue, 14 Nov 2017 14:15:22 GMT):
The Peer Admin can do almost anything except update chaincode that requires the Orderer Admin.

ascatox (Tue, 14 Nov 2017 14:18:00 GMT):
Thanks for the asnwer

ascatox (Tue, 14 Nov 2017 14:18:00 GMT):
Thanks for the asnwer!

ascatox (Tue, 14 Nov 2017 14:19:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=crLRw2BNp4kifzZAs) @rickr I can register a PeerAdmin using a CA Server?

rickr (Tue, 14 Nov 2017 14:23:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Ptz3Jxrxtuehbg644) Should have been : The Peer Admin can do almost anything except update/modify the channel that requires the Orderer Admin.

mdanaci (Tue, 14 Nov 2017 15:03:34 GMT):
Hello, i can't call channel.initialize(); in my test environments. I'm using payara as a server. I'm getting "Jetty ALPN/NPN has not been properly configured." ``` Caused by: java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:153) at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:130) at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:119) at io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:90) at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:155) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:168) at org.hyperledger.fabric.sdk.Channel.seekBlock(Channel.java:1242) ``` I also uncommented these dependencies but result did not changed ``` org.mortbay.jetty.alpn jetty-alpn-agent 2.0.1 org.mortbay.jetty.alpn alpn-boot 8.1.7.v20160121 ``` I also added `-Dcom.ibm.jsse2.overrideDefaultTLS=true -Dhttps.protocols=TLSv1.2` as vm args but no help. What should i do?

berserkr (Tue, 14 Nov 2017 17:29:54 GMT):
Hi All, is there a guide to use the sdk with bmx without using composer?

berserkr (Tue, 14 Nov 2017 17:35:25 GMT):
also, one quick question, has anyone here tried the sdk on android?

berserkr (Tue, 14 Nov 2017 17:36:07 GMT):
I read that android is adding support for bouncy castle, which is a reason why many crypto suites were limited (e.g., spongy castle)

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); User user = User.getPeerAdminUser("crypto-config/peerOrganizations/peer.sbps-bcpoc.jp/users/Admin@peer.sbps-bcpoc.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.sbps-bcpoc.jp", "grpc://13.113.211.1:7051"); Channel channel = client.newChannel("bcpoc01ch"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel bcpoc01ch has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)```

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); User user = User.getPeerAdminUser("crypto-config/peerOrganizations/peer.sbps-bcpoc.jp/users/Admin@peer.mydomain.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.mydomain.jp", "grpc://xxx.xxx.xxx.xxx:7051"); Channel channel = client.newChannel("mych"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel bcpoc01ch has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)```

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); User user = User.getPeerAdminUser("crypto-config/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.mydomain.jp", "grpc://xxx.xxx.xxx.xxx:7051"); Channel channel = client.newChannel("mych"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel bcpoc01ch has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)```

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); MyUser user = MyUser.getPeerAdminUser("crypto-config/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.mydomain.jp", "grpc://xxx.xxx.xxx.xxx:7051"); Channel channel = client.newChannel("mych"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel bcpoc01ch has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)```

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); MyUser user = MyUser.getPeerAdminUser("crypto-config/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.mydomain.jp", "grpc://xxx.xxx.xxx.xxx:7051"); Channel channel = client.newChannel("mych"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel mych has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)```

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); MyUser user = MyUser.getPeerAdminUser("crypto-config/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.mydomain.jp", "grpc://xxx.xxx.xxx.xxx:7051"); Channel channel = client.newChannel("mych"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel mych has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)``` below command succeed. ```CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp \ CORE_PEER_ADDRESS=xxx.xxx.xxx.xxx:7051 \ CORE_PEER_LOCALMSPID="Org1MSP" \ peer chaincode query -C mych -n testcc -v 1.0 -c '{"Args":["query","a"]}'```

takeo (Wed, 15 Nov 2017 06:09:51 GMT):
@rickr Please let me know what is wrong... below command succeed. ```CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp \ CORE_PEER_ADDRESS=xxx.xxx.xxx.xxx:7051 \ CORE_PEER_LOCALMSPID="Org1MSP" \ peer chaincode query -C mych -n testcc -v 1.0 -c '{"Args":["query","a"]}'``` below Java program shows the exception. ``` HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); MyUser user = MyUser.getPeerAdminUser("crypto-config/peerOrganizations/peer.mydomain.jp/users/Admin@peer.mydomain.jp/msp", "Org1MSP"); client.setUserContext(user); Peer peer = client.newPeer("peer0.peer.mydomain.jp", "grpc://xxx.xxx.xxx.xxx:7051"); Channel channel = client.newChannel("mych"); channel.addPeer(peer); ChaincodeID chaincodeId = ChaincodeID.newBuilder().setName("testcc").setVersion("1.0").build(); TransactionProposalRequest tr = client.newTransactionProposalRequest(); QueryByChaincodeRequest queryByChaincodeRequest = client.newQueryProposalRequest(); queryByChaincodeRequest.setArgs(new String[] {"a"}); queryByChaincodeRequest.setFcn("get"); queryByChaincodeRequest.setChaincodeID(chaincodeId); Collection queryProposals = channel.queryByChaincode(queryByChaincodeRequest);``` ```log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel mych has not been initialized. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1521) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2116) at jp.sbpayment.dl.hlf.sample.app.Main.main(Main.java:35)```

mdanaci (Wed, 15 Nov 2017 07:50:07 GMT):
you need to call channel.initialize(); [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=njXtfBW7T9m7J59yi) @takeo

takeo (Wed, 15 Nov 2017 08:37:54 GMT):
@mdanaci Thank you!

ascatox (Wed, 15 Nov 2017 10:15:20 GMT):
Hi All! Someone knows where can I find an example of users enrolling with a CA Server?

mdanaci (Wed, 15 Nov 2017 10:52:32 GMT):
Hello @rickr i added jetty-alpn-agent and alpn-boot jar files to payara's libs but no help. Do i need to use ibm jdk? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=k6CdGQLCwGmzBYG7t)

gauravgiri (Wed, 15 Nov 2017 10:58:04 GMT):
Hi @rickr Hi, We are trying out concurrency tests(submitting multiple, say 4 transactions, unrelated, no conflict transactions, to the blockchain network at the same time) using fabric-sdk-java version 1.0.1 with a batch size of 1. However sometimes, we do get these errors during Channel.sendTransaction. The transactions proposals from peers are OK and verified. Still we get the below error. Any idea, why this could be happening? I checked in fabric-sdk-java's class Channel. Here the Original Exception thrown by sendTransaction method is eaten up, and wrapped up inside a new Exception and throw it back to client, hence the original cause of the error on sendTransaction is not available to the client applications. Can we get the source jar for maven 1.0.1 fabric-sdk-java jar? java.util.concurrent.ExecutionException: java.lang.Exception: Channel testchannel failed to place transaction d92e5114cfbaaf427bb6cd9521066e746073771e3a4e6de8aa5bc4001a57988c on Orderer. Cause: UNSUCCESSFUL at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:368) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1926) .... Caused by: java.lang.Exception: Channel testchannel failed to place transaction d92e5114cfbaaf427bb6cd9521066e746073771e3a4e6de8aa5bc4001a57988c on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2183) at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2087) at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2073)

gauravgiri (Wed, 15 Nov 2017 10:58:04 GMT):
Hi @rickr , We are trying out concurrency tests(submitting multiple, say 4 transactions, unrelated, no conflict transactions, to the blockchain network at the same time) using fabric-sdk-java version 1.0.1 with a batch size of 1. However sometimes, we do get these errors during Channel.sendTransaction. The transactions proposals from peers are OK and verified. Still we get the below error. Any idea, why this could be happening? I checked in fabric-sdk-java's class Channel. Here the Original Exception thrown by sendTransaction method is eaten up, and wrapped up inside a new Exception and throw it back to client, hence the original cause of the error on sendTransaction is not available to the client applications. Can we get the source jar for maven 1.0.1 fabric-sdk-java jar? java.util.concurrent.ExecutionException: java.lang.Exception: Channel testchannel failed to place transaction d92e5114cfbaaf427bb6cd9521066e746073771e3a4e6de8aa5bc4001a57988c on Orderer. Cause: UNSUCCESSFUL at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:368) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1926) .... Caused by: java.lang.Exception: Channel testchannel failed to place transaction d92e5114cfbaaf427bb6cd9521066e746073771e3a4e6de8aa5bc4001a57988c on Orderer. Cause: UNSUCCESSFUL at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2183) at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2087) at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2073)

minhasr (Wed, 15 Nov 2017 13:46:50 GMT):
Has joined the channel.

rickr (Wed, 15 Nov 2017 14:37:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6P5L5vmZSTab3C3Eq) https://github.com/hyperledger/fabric-sdk-java/blob/d4ff8c2e0041b72fbe0b03eb959a701b17ff1841/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L186 ?

rickr (Wed, 15 Nov 2017 14:37:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6P5L5vmZSTab3C3Eq) https://github.com/hyperledger/fabric-sdk-java/blob/d4ff8c2e0041b72fbe0b03eb959a701b17ff1841/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L186 ? As stated before the *IT.java testcases do 95% of what the JSDK can do.

rickr (Wed, 15 Nov 2017 14:58:47 GMT):
@gauravgiri _Original Exception thrown by sendTransaction method is eaten up_ Can you point me to where in the code (preferably a github url link to the code line) where the original exception is getting lost. Is not logged ? Would like to fix that if it's still the case. Source is always in github all published jars are https://oss.sonatype.org/content/repositories/releases/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0.1/ At that small stack trace line 2183 on v101 would not the part of that execption I don't think https://github.com/hyperledger/fabric-sdk-java/blob/11bd160a95fa8529d93582ec68556bb1c4652c21/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2183 So is that really v101? This with very limited information looks like Orderer itself is throwing that. If true, first we would need to find out why that was which would be asked on the #fabric-orderer channel. You'll probably need full logs and exactly when it giving that error.

berserkr (Thu, 16 Nov 2017 00:47:48 GMT):
@rickr I am getting the dreaded "bad_request" error when creating the channel foo. I am using the End2endIT.java scenario, I re-purposed it as a single java application, and am able to enroll users with the fabric ca. My network is the basic network you can configure using the fabric-samples/basic-network config

berserkr (Thu, 16 Nov 2017 00:48:02 GMT):
my understanding is that this is a crypto issue

berserkr (Thu, 16 Nov 2017 00:50:25 GMT):
however, what I ended up doing, which might be wrong is: copy over the `~/dev/src/github.com/hyperledger/fabric-samples/basic-network/crypto-config` contents onto the `fixture/sdkintegration/e2e-2Orgs/` channel directory

berserkr (Thu, 16 Nov 2017 00:51:19 GMT):
From what I understood, the sdk will pick up the certificates from the crypto-config directory (for the Admin/User entities), and use that to send requests via the application/sdk

berserkr (Thu, 16 Nov 2017 00:58:41 GMT):
My working code is here, based on some of the work you guys have been doing: `https://github.com/berserkr/sample_java_app_hlfv1`

berserkr (Thu, 16 Nov 2017 01:38:00 GMT):
```2017-11-16 00:01:16.802 UTC [orderer/common/sigfilter] Apply -> DEBU 753 Forwarding validly signed message for policy &{%!s(*common.ImplicitMetaPolicy=&{Readers 0}) %!s(int=1) [%!s(*policies.implicitMetaPolicy=&{0xc420adcb80 1 [0xc420025768]}) %!s(*policies.implicitMetaPolicy=&{0xc420add0e0 1 [0xc4200257c8]})]} 2017-11-16 00:01:16.802 UTC [orderer/common/deliver] Handle -> DEBU 754 [channel: mychannel] Received seekInfo (0xc420b2a1c0) start: > stop: > 2017-11-16 00:01:40.391 UTC [orderer/main] Broadcast -> DEBU 755 Starting new Broadcast handler 2017-11-16 00:01:40.391 UTC [orderer/common/broadcast] Handle -> DEBU 756 Starting new broadcast loop 2017-11-16 00:01:40.391 UTC [orderer/common/broadcast] Handle -> DEBU 757 Preprocessing CONFIG_UPDATE 2017-11-16 00:01:40.391 UTC [orderer/configupdate] Process -> DEBU 758 Processing channel creation request for channel foo 2017-11-16 00:01:40.391 UTC [orderer/common/broadcast] Handle -> WARN 759 Rejecting CONFIG_UPDATE because: Attempted to include a member which is not in the consortium 2017-11-16 00:01:40.392 UTC [orderer/main] func1 -> DEBU 75a Closing Broadcast stream 2017-11-16 00:01:40.808 UTC [grpc] Printf -> DEBU 75b transport: http2Server.HandleStre```

berserkr (Thu, 16 Nov 2017 01:38:28 GMT):
my network is running on a separate server as well

lin2K (Thu, 16 Nov 2017 02:13:53 GMT):
in fabric java sdk 1.1 how to set custom propertys

lin2K (Thu, 16 Nov 2017 02:31:01 GMT):
// Default values /** * Timeout settings **/ defaultProperty(PROPOSAL_WAIT_TIME, "20000"); defaultProperty(CHANNEL_CONFIG_WAIT_TIME, "15000"); defaultProperty(ORDERER_RETRY_WAIT_TIME, "200"); defaultProperty(ORDERER_WAIT_TIME, "10000"); defaultProperty(EVENTHUB_CONNECTION_WAIT_TIME, "1000"); defaultProperty(GENESISBLOCK_WAIT_TIME, "50000");

gauravgiri (Thu, 16 Nov 2017 03:07:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iH5bmfGcNRcK9dW5Y) @rickr Thank you, At the git source for v1.0.1 https://github.com/hyperledger/fabric-sdk-java/blob/v1.0.1/src/main/java/org/hyperledger/fabric/sdk/Channel.java, at line #2384 on sendTransaction if an Exception is thrown, it is caught at line #2391 by the ExceptionHandler. However the Exception information is not used to throw the error back to the client application at line #2409, with exception constructed at line #2407. Also, I agree that the error is logged at line #2397, however for this we still need to configure commons-logging, would appreciate if the original error could be propogated back to the client application. We are using the maven fabric-sdk-java 1.0.1 version at: https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java. So maybe differences in line # because of maven version of 1.0.1 and original source at https://github.com/hyperledger/fabric-sdk-java/blob/v1.0.1/src/main/java/org/hyperledger/fabric/sdk/Channel.java? Kindly suggest. Thank You.

balmeida (Thu, 16 Nov 2017 10:28:24 GMT):
Has joined the channel.

rickr (Thu, 16 Nov 2017 15:37:48 GMT):
Thanks @gauravgiri I see now where we are not including the original error.

rickr (Thu, 16 Nov 2017 15:39:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=97xHgLNmmd8wBgHit) @lin2K https://github.com/hyperledger/fabric-sdk-java/blob/ef748a8979b8203636a85e59b190a383c1086026/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L32

doraemon7 (Fri, 17 Nov 2017 06:50:14 GMT):
Has joined the channel.

swettdj (Fri, 17 Nov 2017 09:15:30 GMT):
hello @here I'm tying to upgrade the chaincode on fabcar sample using the SDK. So first of all I send a `sendInstallProposa` with an `InstallProposalRequest` settend like this: `installProposalRequest.setChaincodeSourceLocation(new File("C:\\DeLauri\\WorkSpaces\\WorkSpaceFabric\\FAbricCarWEB")); installProposalRequest.setChaincodeVersion("1.541"); installProposalRequest.setChaincodePath("\\");`. This request install the chaincode succefully.

swettdj (Fri, 17 Nov 2017 09:15:30 GMT):
hello @here I'm tying to upgrade the chaincode on fabcar sample using the SDK. So first of all I send a `sendInstallProposa` with an `InstallProposalRequest` settend like this: ```installProposalRequest.setChaincodeSourceLocation(new File("C:\\DeLauri\\WorkSpaces\\WorkSpaceFabric\\FAbricCarWEB")); installProposalRequest.setChaincodeVersion("1.541"); installProposalRequest.setChaincodePath("\\");```. This request install the chaincode succefully.

swettdj (Fri, 17 Nov 2017 09:19:48 GMT):
after this I create an `UpgradeProposalRequest` like this: ```UpgradeProposalRequest upgradeProposal = hfClient.newUpgradeProposalRequest(); upgradeProposal.setChaincodeID(chaincodeID); upgradeProposal.setChaincodeVersion("1.541"); upgradeProposal.setArgs(new String[]{""}); upgradeProposal.setChaincodePath("src\\"); ChaincodeEndorsementPolicy endorsmentPolicy = new ChaincodeEndorsementPolicy(); endorsmentPolicy.fromYamlFile(new File("C:\\DeLauri\\WorkSpaces\\WorkSpaceFabric\\FAbricCarWEB\\src\\chaincodeendorsementpolicy.yaml")); upgradeProposal.setChaincodeEndorsementPolicy(endorsmentPolicy);``` but when I send this proposal I get this error: `Failed to generate platform-specific docker build: could not decode url: ChaincodeSpec's path/URL invalid`.

swettdj (Fri, 17 Nov 2017 09:20:01 GMT):
could someone help me?

wininani (Fri, 17 Nov 2017 12:33:36 GMT):
Has joined the channel.

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
You need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participant".

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
You need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participate".

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
I think you need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participate". If you want to do it the other way, this worked: ` log.info("***Creating install proposal for chaincode"); final String channelName = channel.getName(); client.setUserContext(org.getPeerAdmin()); InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chaincodeID); String goFolder = "/Users/alanatkinson/go/src/repparticipant"; String tgzPrefix = "src/" + CHAIN_CODE_PATH; installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream((Paths.get(goFolder).toFile()), tgzPrefix)); installProposalRequest.setChaincodeVersion(CHAIN_CODE_VERSION); log.info("Sending install proposal"); Collection responses; Collection successful = new LinkedList<>(); Collection failed = new LinkedList<>(); Set peersFromOrg = org.getPeers(); responses = client.sendInstallProposal(installProposalRequest, org.getPeers());

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
I think you need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participate". If you want to do it the other way, this worked: ` log.info("***Creating install proposal for chaincode"); final String channelName = channel.getName(); client.setUserContext(org.getPeerAdmin()); InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chaincodeID); String goFolder = "/Users/alanatkinson/go/src/repparticipant"; String tgzPrefix = "src/" + CHAIN_CODE_PATH; installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream((Paths.get(goFolder).toFile()), tgzPrefix)); installProposalRequest.setChaincodeVersion(CHAIN_CODE_VERSION); log.info("Sending install proposal"); Collection responses; Collection successful = new LinkedList<>(); Collection failed = new LinkedList<>(); Set peersFromOrg = org.getPeers(); responses = client.sendInstallProposal(installProposalRequest, org.getPeers());`

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
I think you need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participate". If you want to do it the other way, this worked: `final String channelName = channel.getName(); client.setUserContext(org.getPeerAdmin()); InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chaincodeID); String goFolder = "/Users/alanatkinson/go/src/repparticipant"; String tgzPrefix = "src/" + CHAIN_CODE_PATH; installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream((Paths.get(goFolder).toFile()), tgzPrefix)); installProposalRequest.setChaincodeVersion(CHAIN_CODE_VERSION); Collection responses; Set peersFromOrg = org.getPeers(); responses = client.sendInstallProposal(installProposalRequest, org.getPeers());`

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
I think you need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participate". If you want to do it the other way, this worked: final String channelName = channel.getName(); client.setUserContext(org.getPeerAdmin()); InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chaincodeID); String goFolder = "/Users/alanatkinson/go/src/repparticipant"; String tgzPrefix = "src/" + CHAIN_CODE_PATH; installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream((Paths.get(goFolder).toFile()), tgzPrefix)); installProposalRequest.setChaincodeVersion(CHAIN_CODE_VERSION); Collection responses; Set peersFromOrg = org.getPeers(); responses = client.sendInstallProposal(installProposalRequest, org.getPeers());

aatkddny (Fri, 17 Nov 2017 13:45:25 GMT):
I think you need to set the relative directory path in the go/src directory. In my case my CC was in the /participate directory so my path was "/participate". If you want to do it the other way, this worked: final String channelName = channel.getName(); client.setUserContext(org.getPeerAdmin()); InstallProposalRequest installProposalRequest = client.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chaincodeID); String goFolder = "/Users/alanatkinson/go/src/participate"; String tgzPrefix = "src/" + CHAIN_CODE_PATH; installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream((Paths.get(goFolder).toFile()), tgzPrefix)); installProposalRequest.setChaincodeVersion(CHAIN_CODE_VERSION); Collection responses; Set peersFromOrg = org.getPeers(); responses = client.sendInstallProposal(installProposalRequest, org.getPeers());

aatkddny (Fri, 17 Nov 2017 13:56:35 GMT):
I hit this with spring-boot. Spent a while on it, but it was a little while ago, so don't remember exactly what the fix was. There's nothing in the classpath or extra exported jars though. The only additional dep in my pom is this: io.netty netty-tcnative 2.0.6.Final provided

aatkddny (Fri, 17 Nov 2017 13:56:35 GMT):
@mdanaci I hit this with spring-boot. Spent a while on it, but it was a little while ago, so don't remember exactly what the fix was. There's nothing in the classpath or extra exported jars though. The only additional dep in my pom is this: io.netty netty-tcnative 2.0.6.Final provided

swettdj (Fri, 17 Nov 2017 15:13:48 GMT):
@aatkddny the InstallationProposal works fine, my problem is with `pgradeProposal.setChaincodePath("src\\");`

swettdj (Fri, 17 Nov 2017 15:13:48 GMT):
@aatkddny the InstallationProposal works fine, my problem is with `upgradeProposal.setChaincodePath("src\\");`

aatkddny (Fri, 17 Nov 2017 16:29:45 GMT):
My bad. Lack of coffee. But I still think you need a path set relative to src.

berserkr (Fri, 17 Nov 2017 23:50:01 GMT):
has anyone seen the following trace before: ``` org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Proposal response is invalid. at org.hyperledger.fabric.sdk.ProposalResponse.getChaincodeActionResponsePayload(ProposalResponse.java:207) at End2endIT.lambda$runChannel$0(End2endIT.java:409) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at org.hyperledger.fabric.sdk.Channel$TL.lambda$fire$1(Channel.java:2793) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) java.lang.NullPointerException at End2endIT.lambda$runChannel$1(End2endIT.java:449) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at org.hyperledger.fabric.sdk.Channel$TL.lambda$fire$1(Channel.java:2793) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) org.hyperledger.fabric.sdk.exception.ProposalException: queryBlockchainInfo peer peer0.org1.example.com channel foo error Unable to query block channel info for channel foo from peer peer0.org1.example.com with message Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null} at org.hyperledger.fabric.sdk.Channel.queryBlockchainInfo(Channel.java:1817) at org.hyperledger.fabric.sdk.Channel.queryBlockchainInfo(Channel.java:1778) at End2endIT.runChannel(End2endIT.java:508) at End2endIT.setup(End2endIT.java:198) at End2endIT.go(End2endIT.java:91) at Hello.main(Hello.java:5) Caused by: org.hyperledger.fabric.sdk.exception.PeerException: Unable to query block channel info for channel foo from peer peer0.org1.example.com with message Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null} at org.hyperledger.fabric.sdk.Channel.queryBlockchainInfo(Channel.java:1805) ... 5 more Caught an exception running channel foo Test failed with error : queryBlockchainInfo peer peer0.org1.example.com channel foo error Unable to query block channel info for channel foo from peer peer0.org1.example.com with message Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null} That's all folks! Process finished with exit code 0```

berserkr (Fri, 17 Nov 2017 23:50:50 GMT):
I am able to create the channel, install the cc, and instantiate it, but it is now going through: ````Constructing channel foo Created channel foo Peer peer0.org1.example.com joined channel foo Finished initialization channel foo Running channel foo Creating install proposal Sending install proposal Successful install proposal response Txid: c2d30b9d4c8d94e3310ed2cc503b9f72f2679d3fbe21403201b06b1fa82bf336 from peer peer0.org1.example.com Received 1 install proposal responses. Successful+verified: 1 . Failed: 0 Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively Succesful instantiate proposal response Txid: 0bc66c075dd566cdfcc21a014e5d870508782ba3ee86aa8fc6fc2a2aa053fdc5 from peer peer0.org1.example.com Received 1 instantiate proposal responses. Successful+verified: 1 . Failed: 0 Sending instantiateTransaction to orderer with a and b set to 100 and 200 respectively Finished instantiate transaction with transaction id 0bc66c075dd566cdfcc21a014e5d870508782ba3ee86aa8fc6fc2a2aa053fdc5 sending transactionProposal to all peers with arguments: move(a,b,100) Expected only one set of consistent proposal responses but got 0 Received 1 transaction proposal responses. Successful+verified: 0 . Failed: 1 Not enough endorsers for invoke(move a,b,100):1 endorser error: Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority, cause=null}. Was verified: false Successfully received transaction proposal responses. Caught an exception while invoking chaincode Failed invoking chaincode with error : Proposal response is invalid. Caught exception while running query Failed during chaincode query with error : null```

berserkr (Fri, 17 Nov 2017 23:51:42 GMT):
My setup is simple, I have the fabric-samples/basic-network running on a server, and trying to access it through the sdk on my laptop - crypto-config and channel info were copied over to the channel directory

berserkr (Fri, 17 Nov 2017 23:52:25 GMT):
This is the last part of my peer's log: ```2017-11-17 23:46:29.983 UTC [couchdb] handleRequest -> DEBU 5a9 Entering handleRequest() method=PUT url=http://couchdb:5984/foo/statedb_savepoint 2017-11-17 23:46:29.983 UTC [couchdb] handleRequest -> DEBU 5aa HTTP Request: PUT /foo/statedb_savepoint HTTP/1.1 | Host: couchdb:5984 | User-Agent: Go-http-client/1.1 | Content-Length: 191 | Accept: application/json | Content-Type: application/json | If-Match: 1-9ba3fd32b8a121ab6eb633efa1c4bef2 | Accept-Encoding: gzip | | 2017-11-17 23:46:29.984 UTC [couchdb] handleRequest -> DEBU 5ab Exiting handleRequest() 2017-11-17 23:46:29.984 UTC [couchdb] SaveDoc -> DEBU 5ac Exiting SaveDoc() 2017-11-17 23:46:29.984 UTC [lockbasedtxmgr] Commit -> DEBU 5ad Updates committed to state database 2017-11-17 23:46:29.984 UTC [historyleveldb] Commit -> DEBU 5ae Channel [foo]: Updating history database for blockNo [1] with [1] transactions 2017-11-17 23:46:29.985 UTC [historyleveldb] Commit -> DEBU 5af Channel [foo]: Updates committed to history database for blockNo [1] 2017-11-17 23:46:29.985 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 5b0 Entry 2017-11-17 23:46:29.985 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 5b1 Channel [foo]: Block event for block number [1] contains transaction id: 0bc66c075dd566cdfcc21a014e5d870508782ba3ee86aa8fc6fc2a2aa053fdc5 2017-11-17 23:46:29.985 UTC [eventhub_producer] SendProducerBlockEvent -> INFO 5b2 Channel [foo]: Sending event for block number [1] 2017-11-17 23:46:29.985 UTC [eventhub_producer] Send -> DEBU 5b3 Entry 2017-11-17 23:46:29.985 UTC [eventhub_producer] Send -> DEBU 5b4 Event processor timeout > 0 2017-11-17 23:46:29.985 UTC [eventhub_producer] Send -> DEBU 5b5 Event sent successfully 2017-11-17 23:46:29.985 UTC [eventhub_producer] Send -> DEBU 5b6 Exit 2017-11-17 23:46:29.985 UTC [eventhub_producer] SendProducerBlockEvent -> DEBU 5b7 Exit 2017-11-17 23:46:29.996 UTC [endorser] ProcessProposal -> DEBU 5b8 Entry 2017-11-17 23:46:29.996 UTC [protoutils] ValidateProposalMessage -> DEBU 5b9 ValidateProposalMessage starts for signed proposal 0xc421428ed0 2017-11-17 23:46:29.996 UTC [protoutils] validateChannelHeader -> DEBU 5ba validateChannelHeader info: header type 3 2017-11-17 23:46:29.996 UTC [protoutils] checkSignatureFromCreator -> DEBU 5bb checkSignatureFromCreator starts 2017-11-17 23:46:29.996 UTC [endorser] ProcessProposal -> DEBU 5bc Exit 2017-11-17 23:46:30.005 UTC [endorser] ProcessProposal -> DEBU 5bd Entry 2017-11-17 23:46:30.005 UTC [protoutils] ValidateProposalMessage -> DEBU 5be ValidateProposalMessage starts for signed proposal 0xc421429590 2017-11-17 23:46:30.005 UTC [protoutils] validateChannelHeader -> DEBU 5bf validateChannelHeader info: header type 3 2017-11-17 23:46:30.005 UTC [protoutils] checkSignatureFromCreator -> DEBU 5c0 checkSignatureFromCreator starts 2017-11-17 23:46:30.006 UTC [endorser] ProcessProposal -> DEBU 5c1 Exit 2017-11-17 23:46:30.333 UTC [eventhub_producer] Chat -> ERRO 5c2 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2017-11-17 23:46:30.333 UTC [eventhub_producer] deRegisterHandler -> DEBU 5c3 deregistering event type: BLOCK```

berserkr (Fri, 17 Nov 2017 23:53:12 GMT):
Finally, my policy is simple: ```# A Shotgun policy xx identities: # list roles to be used in the policy user1: {"role": {"name": "member", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP #user2: {"role": {"name": "member", "mspId": "Org2MSP"}} admin1: {"role": {"name": "admin", "mspId": "Org1MSP"}} # admin role. #admin2: {"role": {"name": "admin", "mspId": "Org2MSP"}} policy: # the policy .. could have been flat but show grouping. 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - 1-of: - signed-by: "user1" # a reference to one of the identities defined above. - signed-by: "admin1"```

berserkr (Fri, 17 Nov 2017 23:53:36 GMT):
I used the default policy provided by oneof the samples, and commented out the second org as we only have one org

berserkr (Sat, 18 Nov 2017 00:11:39 GMT):
does anyone know where the 'tls' folder comes from in the javasdkintegration example? : `src/test/fixture/sdkintegration/e2e-2Orgs/tls` - https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/fixture/sdkintegration/e2e-2Orgs/tls

mastersingh24 (Sun, 19 Nov 2017 13:13:04 GMT):
@berserkr - I'm not even sure it is used anymore?

swettdj (Mon, 20 Nov 2017 11:24:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QTrLs3inrPDZRQpFf) @aatkddny my problem is this! I.e. I install the chaincode catch him from my local machine (`"C:\\DeLauri\\WorkSpaces\\WorkSpaceFabric\\FAbricCarWEB"`). But when I send the upgrade proposal I don't understand what path I must set: my local path ore some peer's local path?

swettdj (Mon, 20 Nov 2017 11:24:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QTrLs3inrPDZRQpFf) @aatkddny my problem is this! I.e. I install the chaincode catch him from my local machine ( `"C:\\DeLauri\\WorkSpaces\\WorkSpaceFabric\\FAbricCarWEB"` ). But when I send the upgrade proposal I don't understand what path I must set: my local path ore some peer's local path?

SandySun2000 (Mon, 20 Nov 2017 19:25:13 GMT):
Any one has experience to check in files to Gerrit? I kept getting Permission Denied (publickey), even I already copy paste ~/.ssh/id_rsa.pub to settings/SSH Public Keys?

swettdj (Tue, 21 Nov 2017 10:50:19 GMT):
@here anyone could help/explain me??

SwatiRaj (Tue, 21 Nov 2017 11:25:42 GMT):
@swettdj your local path , because it will take it from your local where your java application is running.

swettdj (Tue, 21 Nov 2017 11:31:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YSniN5LExv5zSCc66) @SwatiRaj so you are telling that I must specify my local machine path? maybe I haven't complete explain the situation: I'm tring to install and then update the chain code from my workstation with java sdk and the fabric si on a virtual and remote linux machine.

sanchezl (Tue, 21 Nov 2017 15:02:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fdZBrp8jmeW8DDFWi) @swettdj To upgrage, you install the new version (using the local path) and then instantiate the new version (path is no longer needed).

swettdj (Tue, 21 Nov 2017 15:06:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bXXEEue7r8FBhTBMR) @sanchezl I will try, but according with documentation I understood that the two operations are different. I will try.

swettdj (Tue, 21 Nov 2017 15:31:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=snsFd6KNvDnv3xztH) During the instantiation I get this error `UNKNOWN: chaincode error (status 500, message: chaincode exists fabcar)`

yingmsky (Wed, 22 Nov 2017 00:28:34 GMT):
Has joined the channel.

greg2git (Wed, 22 Nov 2017 01:35:53 GMT):
Has joined the channel.

lkolisko (Wed, 22 Nov 2017 10:15:37 GMT):
Has joined the channel.

trongtoanRaD (Wed, 22 Nov 2017 12:46:15 GMT):
Has joined the channel.

jackeyliliang (Fri, 24 Nov 2017 03:02:09 GMT):
Has joined the channel.

netwalker2000 (Fri, 24 Nov 2017 08:51:57 GMT):
Has joined the channel.

PetrVlasekCA (Fri, 24 Nov 2017 10:52:18 GMT):
Has joined the channel.

ryokawajp (Mon, 27 Nov 2017 08:18:15 GMT):
Hi everyone. I have a question on the life cycle of Channel object and Channel.shutdown(). When we create a Channel object and initialize it, we will have EventHub objects to connect to peers. When are these EventHub connections closed? Will the connections be closed when the Channel object is removed by Garbage Collection? Or do we need to call Channel.shutdown() explicitly? Background of this question is that, our team is trying to create a Channel object per each transaction, but we are not sure this will cause a leak of the network resource for EventHub connections.

rickr (Mon, 27 Nov 2017 20:32:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=P5o5cEZwhTqgZBcbQ) What version is this ? commit level ?

rickr (Mon, 27 Nov 2017 20:40:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KuFnQ2KKED2GZrTPw) Shutdown should stop all the eventhubs and clean up as much as possible. The final removal of the channel reference from your application code should clean up all. Just de-referencing should eventually have it all cleaned up but it depends on when garbage collection gets around to it.

rickr (Mon, 27 Nov 2017 20:40:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KuFnQ2KKED2GZrTPw) Shutdown should stop all the eventhubs and clean up as much as possible. The final removal of the channel reference from your application code should clean up all. Just de-referencing the channel won't cause it to be garbage collected since the Client has a reference to it still -- something that should probably get addressed :)

dherykw (Mon, 27 Nov 2017 20:45:16 GMT):
Has joined the channel.

rjones (Mon, 27 Nov 2017 22:36:30 GMT):
Has left the channel.

ryokawajp (Tue, 28 Nov 2017 01:00:13 GMT):
@rickr Thank you! We will ensure our code to release the channel object by Channel.shutdown().

pheneghan (Tue, 28 Nov 2017 03:26:24 GMT):
I have run the IBM JSDKHyperledgerSample and have no problems interacting with my Enterprise Plan IBM Blockchain on Bluemix. I have installed chaincode on my channel and now want to invoke my chaincode without going through the process of instantiating the chaincode as shown in the sample. How do I access an existing chaincode and invoke? It looks like I need to instantiate a ChaincodeID object? How do I do this by referencing my existing chaincode on IBM Bluemix rather than my local chaincode?

ryokawajp (Tue, 28 Nov 2017 12:03:05 GMT):
@pheneghan I have never used IBM Blockchain on Bluemix but I think that Chaincode ID is a string ID specified by a user when he or she deploys a chaincode in the public. I guess that you used a some kind of GUI tool to deploy the chaincode. That tool should be capable of specifying a Chaincode ID. The same Chaincode ID should be specified when you invoke the chaincode. For example, when one sends a invoke transaction, one needs to create a TransactionProposalRequest object, use TransactionProposalRequest.setChaincodeID() to set the Chaincode ID to a request and pass the request object to Channel.sendTransactionProposal(). Here is a sample code: https://github.com/hyperledger/fabric-sdk-java/blob/v1.0.1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L363

ryokawajp (Tue, 28 Nov 2017 12:03:05 GMT):
@pheneghan I have never used IBM Blockchain on Bluemix. Chaincode ID is a string ID specified by a user when he or she deploys a chaincode into a fabric network. I guess that you used a some kind of GUI tool to deploy the chaincode. That tool should be capable of specifying a Chaincode ID. The same Chaincode ID should be specified when you invoke the chaincode from a Java client program. For example, when one sends a invoke transaction, one needs to create a TransactionProposalRequest object, use TransactionProposalRequest.setChaincodeID() to set the Chaincode ID to a request and pass the request object to Channel.sendTransactionProposal(). Here is a sample code: https://github.com/hyperledger/fabric-sdk-java/blob/v1.0.1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L363

mzhk (Tue, 28 Nov 2017 13:23:04 GMT):
Has joined the channel.

mzhk (Tue, 28 Nov 2017 13:30:12 GMT):
Hi @here, is there a way to get payload from a chaincode peer.Response in the fabric-sdk in case an error is thrown? In org/hyperledger/fabric/sdk/Channel when an exception is caught in sendProposalToPeers() it seems to have only Status and Message available. Version: fabric-sdk-java-1.0.1

dave.enyeart (Tue, 28 Nov 2017 13:31:54 GMT):
@mzhk Please don't use at-here, they are reserved for important channel announcements

mzhk (Tue, 28 Nov 2017 13:32:47 GMT):
(sorry)

matrisis (Tue, 28 Nov 2017 14:59:37 GMT):
Has joined the channel.

albert.lacambra (Tue, 28 Nov 2017 18:13:28 GMT):
I am trying to create an enrolmnet using java SDK without FabricCA

albert.lacambra (Tue, 28 Nov 2017 18:13:56 GMT):
so I am using the private key contained into crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore to create the enrolmment object

albert.lacambra (Tue, 28 Nov 2017 18:14:53 GMT):
to convert from the BASE64 format I am using RSA algorithm witb bouncy castle provider

albert.lacambra (Tue, 28 Nov 2017 18:14:55 GMT):
"KeyFactory factory = KeyFactory.getInstance("RSA", "BC"); PemObject pemObject = pemReader.readPemObject(); PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(pemObject.getContent());"

albert.lacambra (Tue, 28 Nov 2017 18:15:00 GMT):
however it returns an error

albert.lacambra (Tue, 28 Nov 2017 18:15:34 GMT):
is the RSA the problem, the PKCS8? How can I create a mocked Enrollment to use the generate CryptoMaterial?

rickr (Tue, 28 Nov 2017 21:13:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QugkKm4aPRXNDBZcz) I don't think so. If it failed I don't think there's anything in that can be trusted in the payload.

SDChoi (Wed, 29 Nov 2017 03:02:31 GMT):
Has joined the channel.

sahaaditya62 (Wed, 29 Nov 2017 08:50:36 GMT):
Has joined the channel.

sahaaditya62 (Wed, 29 Nov 2017 11:47:41 GMT):

Clipboard - November 29, 2017 5:15 PM

sahaaditya62 (Wed, 29 Nov 2017 11:48:33 GMT):

Clipboard - November 29, 2017 5:17 PM

sahaaditya62 (Wed, 29 Nov 2017 11:49:03 GMT):

Clipboard - November 29, 2017 5:18 PM

sahaaditya62 (Wed, 29 Nov 2017 11:49:16 GMT):
could anyone help me to solve the problem.if you need more details please do let me know.

ngeorge (Wed, 29 Nov 2017 12:18:05 GMT):
While upgrading the chaincode with version 2, I could see containers created with current(upgraded) version .The containers created while instantiating with version 1 is also running... Is this the normal behaviour?Does both the versions exist on a channel at the same time? Is the chaincode tagged to version? As in, does the previous version chaincode contain the upgraded code or old one?

rickr (Wed, 29 Nov 2017 13:59:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=FjM8hA9NPD8NavdmZ) Can you telnet to localhost 7054 to see if it connects ? Either not really running or something else is blocking

muralisr (Wed, 29 Nov 2017 14:10:46 GMT):
@ngeorge note that a chaincode could be accessed by many channels so in your example chaincode created in version 1 could be in use in other channels. Curently we don;t maintain a reference count of access across channels. If no channel is using it , its just a container that won't be used. There is some work on cleaning up "orphaned" containers based on timeout https://jira.hyperledger.org/browse/FAB-3326

ngeorge (Thu, 30 Nov 2017 05:14:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xpraMvqipsryCGpXe) @muralisr Thank you.

mzhk (Thu, 30 Nov 2017 07:21:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=s3dRWvosQvDNjnXrK) @rickr thanks for feedback! PS. we wanted to send stacktrace over in case of an error.

matrisis (Thu, 30 Nov 2017 10:40:10 GMT):
Has left the channel.

sahaaditya62 (Fri, 01 Dec 2017 01:53:37 GMT):
Hi All , I am unable to get the CA information from my java class.any one have any idea how I can get the CA information from java class.

ikset (Fri, 01 Dec 2017 11:04:54 GMT):
User User_1 added by ikset.

smita0709 (Fri, 01 Dec 2017 11:46:09 GMT):
Hello,

smita0709 (Fri, 01 Dec 2017 11:46:33 GMT):
IHow to I retrive the configuration block of system channel in fabric sdk java?

Vadim (Fri, 01 Dec 2017 11:46:40 GMT):
Has left the channel.

kedarr (Fri, 01 Dec 2017 12:58:52 GMT):
Hello,

kedarr (Fri, 01 Dec 2017 13:01:54 GMT):
Hello, I am trying to use fabric-java-sdk version 1.1.0-SNAPSHOT for registering users, creating channels, querying etc and created java shim using the latest fabric code. However, I am getting following exception when I try to run SimpleChainCode example. Looks like version issues. Exception in thread "Thread-1" java.lang.NoSuchMethodError: io.grpc.netty.NettyChannelBuilder.build()Lio/grpc/internal/ManagedChannelImpl; at org.hyperledger.fabric.shim.ChaincodeBase.newPeerClientConnection(ChaincodeBase.java:170) at org.hyperledger.fabric.shim.ChaincodeBase.lambda$start$0(ChaincodeBase.java:94) at java.lang.Thread.run(Thread.java:745) Any help is greatly appreciated.

rickr (Fri, 01 Dec 2017 14:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Z9gdpu7s4ehctKCrQ) Lot of examples of interacting with FabricCA here https://github.com/hyperledger/fabric-sdk-java/blob/a8d89513f554812eea70cc4362c40af4fd1e0d60/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L61 Also in the other End2end*IT testcases If that's what you're asking about.

rickr (Fri, 01 Dec 2017 14:06:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WonSpbjPpwx4BoyZR) @kedarr I think this is a error for running CC better asked on: #fabric-java-chaincode

rickr (Fri, 01 Dec 2017 16:42:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZaAxHwMZLrRQCPrmS) @smita0709 What system channel ? Can you give details what it is you're trying to do ?

kedarr (Sat, 02 Dec 2017 01:01:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aCbTkLDRv4HLczMrf) @rickr Thanks. I was able to resolved this issue.

sampath06 (Sat, 02 Dec 2017 15:15:06 GMT):
Has joined the channel.

harinikandadai (Sat, 02 Dec 2017 21:38:03 GMT):
Has joined the channel.

bizhenchao1201 (Sun, 03 Dec 2017 09:33:37 GMT):
Has joined the channel.

vijay5378 (Mon, 04 Dec 2017 07:30:09 GMT):
Has joined the channel.

vijay5378 (Mon, 04 Dec 2017 07:31:02 GMT):
I am trying to deploy java Chaincode on Hyperledger v1.1-preview. When I try to register the Chaincode, I am getting an error message: Dec 03, 2017 12:42:28 PM org.hyperledger.fabric.shim.ChaincodeBase newPeerClientConnection INFO: Configuring channel connection to peer. Dec 03, 2017 12:42:28 PM org.hyperledger.fabric.shim.ChaincodeBase chatWithPeer INFO: Connecting to peer. Dec 03, 2017 12:42:28 PM io.grpc.internal.TransportSet$1 call INFO: Created transport io.grpc.netty.NettyClientTransport@12fa0810(/127.0.0.1:7051) for /127.0.0.1:7051 Dec 03, 2017 12:42:28 PM io.grpc.internal.TransportSet$TransportListener transportShutdown INFO: Transport io.grpc.netty.NettyClientTransport@12fa0810(/127.0.0.1:7051) for /127.0.0.1:7051 is being shutdown Dec 03, 2017 12:42:28 PM io.grpc.internal.TransportSet$TransportListener transportTerminated INFO: Transport io.grpc.netty.NettyClientTransport@12fa0810(/127.0.0.1:7051) for /127.0.0.1:7051 is terminated Dec 03, 2017 12:42:28 PM org.hyperledger.fabric.shim.ChaincodeBase chatWithPeer INFO: Registering as 'mycc' ... sending REGISTER Dec 03, 2017 12:42:28 PM io.netty.handler.codec.http2.Http2ConnectionHandler processGoAwayWriteResult WARNING: [id: 0x22581fa1] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection refused: /127.0.0.1:7051'. Forcing shutdown of the connection. java.nio.channels.ClosedChannelException Dec 03, 2017 12:42:28 PM org.hyperledger.fabric.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNAVAILABLE I have been breaking my head over this. Can someone throw light on this error?

vijay5378 (Mon, 04 Dec 2017 07:31:02 GMT):
I have been breaking my head getting my Chaincode to deploy... I am getting the following error: Dec 06, 2017 5:39:08 AM org.hyperledger.fabric.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNIMPLEMENTED: unknown service protos.ChaincodeSupport when I try to run the Chaincode.jar file

smita0709 (Mon, 04 Dec 2017 10:06:36 GMT):
@rickr I am referring to ordering system channel. I want to update the system channel with CRL(certificate revocation list) . The MSP definitions in the ordering system channel are the MSP definitions that are used at channel creation time to initialize the new channel. In fabric sdk java v1.0.1 there is a method getConfiguerationBytes() in Channel.java class to retrivies the configuration block of a channel. I know how to retrieve and update the configuration block of a regular channel, however I do not know how it is done for a system channel

ngeorge (Mon, 04 Dec 2017 12:35:04 GMT):
While trying to query a chaincode using JavaSDK, I am getting the below exception : 2017-12-04 11:12:37,609 ERROR Channel:2258 - Sending proposal to peer0.Org1 failed because of: gRPC failure=Status{code=UNKNOWN, description=Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction), cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Error executing chaincode: Failed to execute transaction (Timeout expired while executing transaction) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2258) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2155) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2130) .... I have tried setting the userContext to user and also admin. Both failed with the same error. For user/admin, I provided the respective user certificate and the pem file from the cryptoconfig generated. The same chaincode could be queried from the cli successfully. Could anyone help me on this?

rickr (Mon, 04 Dec 2017 14:44:36 GMT):
If you did not name the system ordering channel the default name is `testchainid` . Try creating a channel by that name as in End2endAndBackAgainIT I've not attempted this so disclaimer is YMMV :)

rickr (Mon, 04 Dec 2017 14:44:36 GMT):
If you did not name the system ordering channel the default name is `testchainid` . Try creating a channel by that name as in End2endAndBackAgainIT I've not attempted this so disclaimer is _caveat utilitor_ :)

nikit-os (Mon, 04 Dec 2017 15:36:56 GMT):
Hi all! I'm trying create two Channel instances, from fabric-java-sdk, with one orderer service. But it fails with error: ``` Caused by: org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Can not add orderer orderer.health.com to channel private-channel because it already belongs to channel general-channel. ``` As I understand by `MaxChannels` parameter from `configtx.yaml` - one orderer can handle multiple channels. But Orderer class in fabric-java-sdk has only one field for channel and setChannel() method throw exception when channel field already set. `org.hyperledger.fabric.sdk.Orderer`: ``` void setChannel(Channel channel) throws InvalidArgumentException { if (channel == null) { throw new InvalidArgumentException("setChannel Channel can not be null"); } if (null != this.channel && this.channel != channel) { throw new InvalidArgumentException(format("Can not add orderer %s to channel %s because it already belongs to channel %s.", name, channel.getName(), this.channel.getName())); } this.channel = channel; } ``` Please, help me understand why restriction by channel count exists in Orderer class. Or maybe there is no need to add multiple channels to one orderer and this should be done by adding separate orderer per channel?

skarim (Mon, 04 Dec 2017 18:00:28 GMT):
Has joined the channel.

skarim (Mon, 04 Dec 2017 18:00:52 GMT):
I am trying to get eclipse set up with the Java SDK, after importing the project I keep getting this error in eclipse. Type mismatch: cannot convert from LinkedList to List This refers to line 3074 in src/main/java/org/hyperledger/fabric/sdk/Channel.java. Has any one seen this before?

rickr (Mon, 04 Dec 2017 21:51:30 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/c8cd86baa87f4eda63420e78c43bdc5b8dc84ca1/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3074

bitdream (Tue, 05 Dec 2017 03:25:47 GMT):
Has joined the channel.

agileHua (Tue, 05 Dec 2017 07:39:42 GMT):
Has joined the channel.

agileHua (Tue, 05 Dec 2017 07:39:58 GMT):
how to get system channel through java sdk

agileHua (Tue, 05 Dec 2017 07:48:06 GMT):
how add an organization to existing Hyperledger Fabric blockchain network using Java SDK

agileHua (Tue, 05 Dec 2017 07:48:06 GMT):
how to add an organization to existing Hyperledger Fabric blockchain network using Java SDK

Ann (Tue, 05 Dec 2017 07:51:02 GMT):
Has joined the channel.

nikit-os (Tue, 05 Dec 2017 10:21:45 GMT):
Why org.hyperledger.fabric.sdk.Peer can have only one channel? We can join peer to multiple channels in Fabric. ``` /** * The Peer class represents a peer to which SDK sends deploy, or query proposals requests. */ public class Peer implements Serializable { private Channel channel; ```

sampath06 (Tue, 05 Dec 2017 10:55:46 GMT):
I was trying to run the End2endIT test case and am getting the following error ```ca_peerOrg1 | 2017/12/05 10:50:31 http: TLS handshake error from 172.21.0.1:53260: tls: oversized record received with length 21536```

sampath06 (Tue, 05 Dec 2017 10:55:56 GMT):
Any ideas on what could be the problem?

smita0709 (Tue, 05 Dec 2017 11:37:26 GMT):
@rickr Thanks :) I will try with testchainid

rickr (Tue, 05 Dec 2017 14:10:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ng9vGzRzgyR9ZEc6k) Create as many peer objects that reference the peer and join them to as many channels you like.

rickr (Tue, 05 Dec 2017 14:14:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=y5GtpC3RaNMNGypFS) @sampath06 TLS configured on the peer ?

sampath06 (Tue, 05 Dec 2017 14:17:16 GMT):
Yes.. This is the config for ca0 ``` ca.org1.example.com: image: hyperledger/fabric-ca:x86_64-1.0.0 environment: - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk ports: - "7054:7054" command: sh -c 'fabric-ca-server start -b admin:adminpw -d' volumes: - ./channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config container_name: ca_peerOrg1 ```

michael_aR (Tue, 05 Dec 2017 15:46:17 GMT):
Has joined the channel.

jcbombardelli (Tue, 05 Dec 2017 16:06:59 GMT):
Has joined the channel.

vijay5378 (Wed, 06 Dec 2017 05:40:33 GMT):
Dec 06, 2017 5:39:08 AM org.hyperledger.fabric.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNIMPLEMENTED: unknown service protos.ChaincodeSupport

vijay5378 (Wed, 06 Dec 2017 05:40:47 GMT):
I get the above error when I try to deploy my chaincode

vijay5378 (Wed, 06 Dec 2017 05:40:59 GMT):
Been breaking my head over this... any pointers?

ngeorge (Wed, 06 Dec 2017 06:58:06 GMT):
In github java sdk documentation, I could see a maven dependency for fabric-sdk-java, version 1.1.0-SNAPSHOT. But in maven repository, the latest version available is 1.0.1(https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java). Is the latest version not updated in maven?

sampath06 (Wed, 06 Dec 2017 07:29:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BrhrCunaJRGkEZm7f) The problem went away when I changed the URL of the CA to use https. Now am running into a different problem: ``` 2017-12-06 07:27:50,982 main WARN Config:72 - Failed to load any configuration from: config.properties. Using toolkit defaults 2017-12-06 07:27:52,069 main WARN Config:78 - Failed to load any configuration from: config.properties. Using toolkit defaults 2017-12-06 07:27:53,307 main WARN SampleStore:75 - Could not find the file "/tmp/HFCSampletest.properties" 2017-12-06 07:27:53,349 main WARN SampleStore:75 - Could not find the file "/tmp/HFCSampletest.properties" 2017-12-06 07:27:56,342 main ERROR HFCAClient:347 - java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty ```

wanghhao (Wed, 06 Dec 2017 07:51:51 GMT):
hi, is there a method to query orderer and peer info by a channel name ,instead of reconstruct channel?

michael_aR (Wed, 06 Dec 2017 09:10:24 GMT):
hi, which is the right jdk file to go with eclipse neon ? if i import https://github.com/hyperledger/fabric-sdk-java as maven project i get a lot of dependencies errors in my pom.xml

michael_aR (Wed, 06 Dec 2017 09:11:36 GMT):
or should i go with intelli j? Because eclipse is our companies default IDE

michael_aR (Wed, 06 Dec 2017 09:15:46 GMT):
we have the first-network online now on our linux server and want to write our own chaincode + first transactions

michael_aR (Wed, 06 Dec 2017 09:35:07 GMT):
ok i found this help https://github.com/hyperledger/fabric-sdk-java/commit/213edec4fda8c3f94684655e9e00a82be59812a2

michael_aR (Wed, 06 Dec 2017 09:55:00 GMT):
"mvn install -DskipTests" is not working. there is no such file in my fabric-sdk-java filesystem

michael_aR (Wed, 06 Dec 2017 12:40:30 GMT):
```fabric-sdk-java-master>mvn install -DskipTests [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 492, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Detecting the operating system and CPU architecture [INFO] ------------------------------------------------------------------------ [INFO] os.detected.name: windows [INFO] os.detected.arch: x86_64 [INFO] os.detected.classifier: windows-x86_64 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building fabric-java-sdk 1.1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- git-commit-id-plugin:2.2.2:revision (get-the-git-infos) @ fabric-sdk-java --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.296 s [INFO] Finished at: 2017-12-06T13:37:11+01:00 [INFO] Final Memory: 14M/220M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.2:revision (get-the-git-infos) on project fabric-sdk-java: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException```

michael_aR (Wed, 06 Dec 2017 12:40:48 GMT):
any help eclipse neo

michael_aR (Wed, 06 Dec 2017 12:40:48 GMT):
any help ? eclipse neo

rickr (Wed, 06 Dec 2017 12:47:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mDGN7RDKx7eAgCKE4) @vijay5378 Please post CC errors to #chaincode-dev for #fabric-java-chaincode I don't think this is an SDK error.

rickr (Wed, 06 Dec 2017 12:51:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZmEwtTiiebotcPimd) @ngeorge v1.0.1 is the latest release but SNAPSHOTS for v1.1 are constantly being published and should work with fabric 1.0

rickr (Wed, 06 Dec 2017 12:56:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7xf9eXRdKv6CfWPPK) @sampath06 Not seen that before. The End2endIT.java is working with TLS enabled .. have you followed that ? Enabled with: ``` export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS=--tls.enabled ```

rickr (Wed, 06 Dec 2017 13:01:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=g97CJ6nG33v2AtrH8) @michael_aR Some instructions https://github.com/hyperledger/fabric-sdk-java#setting-up-eclipse have been added ( thanks @skarim ) .. can you try following that ? Please provide feedback Thanks

rickr (Wed, 06 Dec 2017 13:11:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kBb8Ls7u5n7h7Cysu) @wanghhao Last I heard there is no means to find out what channels a Peer has already joined.

aastha0304 (Wed, 06 Dec 2017 17:08:09 GMT):
Has joined the channel.

aastha0304 (Wed, 06 Dec 2017 17:12:04 GMT):
hi all, i am a hyperledger fresher, and I was wondering, how to invoke hyperledger-fabric blockchain from my mobile (the front-end in the normal sense? ) We have node/java/python/go client for HF i know but that means they are actually backends, besides the codechain server itself. So does it mean we have 2 backends? The way it works is actually 3 tier Mobile -> A machines node code -> The machine's codechain code?

aatkddny (Wed, 06 Dec 2017 19:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aCbTkLDRv4HLczMrf) @rickr

aatkddny (Wed, 06 Dec 2017 19:58:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aCbTkLDRv4HLczMrf) @rickr Are you running on spring-boot by any chance? If so it's a dependency versioning thing.

wanghhao (Thu, 07 Dec 2017 09:10:31 GMT):
@rickr ,thanks

rickr (Thu, 07 Dec 2017 12:55:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9cnFHojJo9X5Yw9Sd) @wanghhao Forgot about this see https://github.com/hyperledger/fabric-sdk-java/blob/213edec4fda8c3f94684655e9e00a82be59812a2/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L526

zdmob (Fri, 08 Dec 2017 10:19:26 GMT):
hi all, i have a question for java sdk, how can I get a channel instance that all ready install an initialize, I want to run tx in that channel

zdmob (Fri, 08 Dec 2017 11:13:40 GMT):
I got error "org.hyperledger.fabric.sdk.exception.TransactionException: Getting block time exceeded 5 seconds for channel mychannel" when call channel.initialize();

ngeorge (Fri, 08 Dec 2017 13:04:26 GMT):
Inorder to send an invoke transaction to multiple orgs, which usercontext should be set? Can I set any random organisation as the usercontext ?

oralzb (Fri, 08 Dec 2017 15:36:24 GMT):
Has joined the channel.

gdinhof (Fri, 08 Dec 2017 17:02:17 GMT):
Has left the channel.

zhishui (Sun, 10 Dec 2017 02:40:01 GMT):
Has joined the channel.

zhishui (Sun, 10 Dec 2017 02:49:43 GMT):
I have aquestion for java sdk ,I don't know why ? the exption is below 2017-12-10 01:39:22,777 main ERROR OrdererClient:171 - sendTransaction error Channel foo, send transactions failed on orderer orderer.example.com. Reason: timeout after 3000 ms. org.hyperledger.fabric.sdk.exception.TransactionException: Channel foo, send transactions failed on orderer orderer.example.com. Reason: timeout after 3000 ms. at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:169) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:140) at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:354) at org.hyperledger.fabric.sdk.Channel.(Channel.java:194) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1304) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:577) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) 2017-12-10 01:40:21,389 grpc-default-executor-2 ERROR OrdererClient:150 - Received error on channel foo, orderer orderer.example.com, url grpc://localhost:7050, UNAVAILABLE

kedarr (Mon, 11 Dec 2017 11:54:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Ryu89cPBrKtqA9oDz) @aatkddny yes I am using Spring boot and it was indeed because of the versioning issue. I was able to resolved it by using fabric-chaincode-java

rickr (Mon, 11 Dec 2017 12:48:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KFZhBWD4H5j5A7DB8) @zhishui Try upping https://github.com/hyperledger/fabric-sdk-java/blob/213edec4fda8c3f94684655e9e00a82be59812a2/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L52 Otherwise, you need to look at the orderer log to see if there are any issues there

asaningmaxchain (Mon, 11 Dec 2017 12:54:38 GMT):
@rickr the sdk doesn't provide the tx event

asaningmaxchain (Mon, 11 Dec 2017 12:54:38 GMT):
@rickr the sdk doesn't provide the tx event? i see it provide the chaincode event and block event

rickr (Mon, 11 Dec 2017 13:11:51 GMT):
Block events has transactions in them.

rickr (Mon, 11 Dec 2017 13:11:51 GMT):
Block event has transactions in them.

asaningmaxchain (Mon, 11 Dec 2017 14:42:44 GMT):
@rickr i see the peer should bind to the specified channel,but i know the peer provide the other service the `status`,`logging` it doesn't need the channel

asaningmaxchain (Mon, 11 Dec 2017 14:42:44 GMT):
@rickr i see the peer should bind to the specified channel,but i know the peer provide the other service the `status`,`logging` it doesn't need the channel,so i wonder why the source code tell me i should bind the channel

asaningmaxchain (Mon, 11 Dec 2017 14:42:44 GMT):
@rickr i see the peer should bind to the specified channel,but i know the peer provide the other service the `status` `logging` it doesn't need the channel,so i wonder why the source code tell me i should bind the channel

asaningmaxchain (Mon, 11 Dec 2017 14:42:44 GMT):
@rickr i see the peer should bind to the specified channel,but i know the peer provide the other service the `status` `logging` it doesn't need the channel,so i wonder why the source code tell me i should bind the channel,and i see the java sdk source code,i find it just provide the orderer client and endorser client,so i think we should add more client to get more information

fabcan (Mon, 11 Dec 2017 15:17:48 GMT):
Has joined the channel.

zhishui (Tue, 12 Dec 2017 05:25:39 GMT):
@rickr Thank you very much

guolidong (Tue, 12 Dec 2017 05:58:00 GMT):
Has joined the channel.

vijay5378 (Tue, 12 Dec 2017 10:33:24 GMT):
I have been trying to try running java chaincode. I have registered the java chaincode, However, when I try to install chaincode I get the following error: Error: Java chaincode is work-in-progress and disabled. I use the following command for installing - peer chaincode install -l java -n sscc -v 0 -p /github.com/hyperledger/fabric/examples/chaincode/java/SimpleSample/build/ How do I overcome this?

greg2git (Tue, 12 Dec 2017 13:54:24 GMT):
Has left the channel.

rickr (Tue, 12 Dec 2017 14:26:44 GMT):
Java chaincode is not officially working.

rickr (Tue, 12 Dec 2017 14:28:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fGtYogvWkw4sd3JCS) @asaningmaxchain Can you give me specifics ... exactly what you're trying to do.

asaningmaxchain (Tue, 12 Dec 2017 14:29:47 GMT):
i see the java sdk source code,find it if i want to communicate with the peer, i must specified the channel,but the peer should provide other service like `status`,`logging`

asaningmaxchain (Tue, 12 Dec 2017 14:29:47 GMT):
i see the java sdk source code,find it if i want to communicate with the peer, i must specified the channel,but the peer should provide other service like `status` `logging`

rickr (Tue, 12 Dec 2017 14:30:40 GMT):
status := what exactly are you trying to get status for ? what information ?

asaningmaxchain (Tue, 12 Dec 2017 14:34:28 GMT):
what? why the java sdk doesn't include the all the proto in the fabric?

asaningmaxchain (Tue, 12 Dec 2017 14:34:42 GMT):
https://github.com/hyperledger/fabric-sdk-java/tree/master/src/main/proto/peer

rickr (Tue, 12 Dec 2017 14:35:02 GMT):
we only include that protos we use

asaningmaxchain (Tue, 12 Dec 2017 14:35:08 GMT):
https://github.com/hyperledger/fabric/tree/master/protos/peer

asaningmaxchain (Tue, 12 Dec 2017 14:36:27 GMT):
but i think the other service should include for the sake of knowing the fabric

asaningmaxchain (Tue, 12 Dec 2017 14:36:27 GMT):
but i think it's necessary the other service should include for the sake of knowing the fabric

rickr (Tue, 12 Dec 2017 14:38:39 GMT):
Please provide what APIs/Function the Fabric has that the JSDK is missing .. best to open a JIRA for each. If they require other protos we'll pull them in as needed

rickr (Tue, 12 Dec 2017 14:40:16 GMT):
I see no need to pull in protos and have those classes generated that the JSDK is does not reference.

rickr (Tue, 12 Dec 2017 14:40:16 GMT):
I see no need to pull in protos and have those classes generated that the JSDK does not reference.

muasif80 (Tue, 12 Dec 2017 14:52:20 GMT):
Has joined the channel.

muasif80 (Tue, 12 Dec 2017 14:52:36 GMT):
hi

asaningmaxchain (Tue, 12 Dec 2017 14:54:23 GMT):
ok, i got it

HubertYoung (Wed, 13 Dec 2017 01:55:05 GMT):
hi,guys.i got an error when runing End2endIT sending instantiation proposal to peers.Any ideas?

HubertYoung (Wed, 13 Dec 2017 01:55:19 GMT):

Clipboard - December 13, 2017 9:55 AM

tquark71 (Wed, 13 Dec 2017 02:25:13 GMT):
Has joined the channel.

rickr (Wed, 13 Dec 2017 02:47:44 GMT):
try to start this up in a directory with the name `sdkintegration`

HubertYoung (Wed, 13 Dec 2017 02:51:09 GMT):
got it.i changed the directory to sdkintegration_network.but why the directory name relates to the network name?

rickr (Wed, 13 Dec 2017 02:53:20 GMT):
not sure exactly its a `docker thing` :)

HubertYoung (Wed, 13 Dec 2017 02:58:03 GMT):
thanks.it runs well.

swettdj (Wed, 13 Dec 2017 10:25:40 GMT):
hello @here I upgraded every fabric docker image to the latest version, but the java-SDK version is stopped to 1.0.1 and the 1.1.0 snapshot seems to doesn't exists. Could anyone give some information about this? because studying the objects that cooming back from the fabric I see some difference between the real object that came from fabric and the casted object used into SDK.

DarshanBc (Wed, 13 Dec 2017 10:27:49 GMT):
@swettdj Please don't use here it notifies everyone I understand your desire to get answer but please dint use here

DarshanBc (Wed, 13 Dec 2017 10:27:49 GMT):
@swettdj Please don't use here it notifies everyone I understand your desire to get answer but please dont use here

swettdj (Wed, 13 Dec 2017 10:29:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BaqWPrgoP6wpaHFH7) @DarshanBc Excuse me

zhishui (Wed, 13 Dec 2017 10:29:35 GMT):

Clipboard - 2017年12月13日晚上6点29分

zhishui (Wed, 13 Dec 2017 10:29:37 GMT):
add org.hyperledger.fabric-sdk-java fabric-sdk-java 1.0.1 into pom.xml and modify

zhishui (Wed, 13 Dec 2017 10:39:40 GMT):
@swettdj I'll give the pom.xml to you and you can try it again

zhishui (Wed, 13 Dec 2017 10:41:24 GMT):

pom.txt

swettdj (Wed, 13 Dec 2017 10:50:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=j4gzZmidmcwktMQm6) @zhishui that's what I did but if I try to switch to 1.1.0 snapshot it seems to doesn't exists

swettdj (Wed, 13 Dec 2017 10:50:10 GMT):
https://github.com/hyperledger/fabric-sdk-java#110-snapshot-builds

zhishui (Wed, 13 Dec 2017 11:03:04 GMT):
@swettdj I see

asaningmaxchain (Wed, 13 Dec 2017 11:58:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HPqM3qNBM8SWKPNHC) @HubertYoung yes

asaningmaxchain (Wed, 13 Dec 2017 11:59:43 GMT):
``` private Orderer getRandomOrderer() throws InvalidArgumentException { if (getOrderers().isEmpty()) { throw new InvalidArgumentException("Channel " + name + " does not have any orderers associated with it."); } return getOrderers().iterator().next(); //TODO make this random }```

asaningmaxchain (Wed, 13 Dec 2017 11:59:43 GMT):
``` private Orderer getRandomOrderer() throws InvalidArgumentException { if (getOrderers().isEmpty()) { throw new InvalidArgumentException("Channel " + name + " does not have any orderers associated with it."); } return getOrderers().iterator().next(); //TODO make this random }``` @rickr getRandomOrderer i don't know why? can you give me some clue

muasif80 (Wed, 13 Dec 2017 13:05:01 GMT):
I get this Could not find org.hyperledger:shim-client:1.0.

rickr (Wed, 13 Dec 2017 13:19:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rzYwvHR5WhBTdHKjo) @asaningmaxchain I'm not sure what your exact question is.

rickr (Wed, 13 Dec 2017 13:21:31 GMT):
If an application defines more than one orderer for the channel and you send a transaction without specifying which one explicitly we randomly pick one.

Ashish (Wed, 13 Dec 2017 13:23:15 GMT):
Hi Rick pls help, We are getting an issue while endorsing.. with 2 Orgs with AdminRole ( affiliation ) and AND condition.. We have setup a network with four Orgs, OrgA, OrgB, OrgC & OrgD. Each organization with 1 Anchor Peer and one supporting peer. Fabric version v1.0.3 [ docker images and binaries ] Fabric Java SDK jar version v1.0.1 as 1.0.3 was not available. :( Used the Cryptogen for creating the artifacts. While defining the channel, we have specified configtx.yaml as below OrgA - Role.Admin OrgB - Role.Admin OrgC - Role.Member OrgD - Role.Member & Orderer : Solo. With this setup, we started testing the endorsement policy with the help of JavaSDK. We have a simple chaincode, and the endorsement policy is as below. identities: # list roles to be used in the policy admin1: {"role": {"name": "admin", "mspId": "OrgAMSP"}} # admin role. admin2: {"role": {"name": "admin", "mspId": "OrgBMSP"}} user3: {"role": {"name": "member", "mspId": "OrgCMSP"}} user4: {"role": {"name": "member", "mspId": "OrgDMSP"}} policy: # the policy .. could have been flat but show grouping. 4-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "user3" - signed-by: "user4" - signed-by: "admin1" - signed-by: "admin2" [ Note: Some portion in the read the docs mentioned to specify identities in the reverse order of privilege and signature set in the increasing order of privilege. But we have tried otherwise as well. ] During the invoke from our java client, we are sending the transaction to all the peers in the network. We are collecting the proposal from all the nodes and the accumulated set is being sent to the orderer. But the transaction fails with status 10. [ TransactionEventException: Received invalid transaction event. Transaction ID 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 status 10 ] In the logs you can see as below :- 2017-12-11 11:14:31,174 DEBUG EventHub:198 - EventHub peer1.OrgA got event type: BLOCK java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 status 10 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at com.tcs.bc.deployment.fabric.Deploy.invokeSmartContract(Deploy.java:1078) at com.tcs.bc.deployment.fabric.DeploymentManager.deployChaincode(DeploymentManager.java:139) at com.tcs.bc.deployment.fabric.DeploymentManager.main(DeploymentManager.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 status 10 at org.hyperledger.fabric.sdk.Channel$TL.lambda$fire$2(Channel.java:2796) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-12-11 11:14:31,180 DEBUG Channel:2710 - Channel testchannel got event for transaction 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 2017-12-11 11:14:31,180 DEBUG Channel:2748 - Channel testchannel seen transaction event 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 for eventHub EventHub:peer1.OrgA If i change the endorsement policy to 2of and mention only ROLE.Admin, then also it fails. But if i change the endorsement policy to 2of and mention only ROLE.Member, then its successful. Any help in solving this issue would be highly appreciated.

Ashish (Wed, 13 Dec 2017 13:23:15 GMT):
Hi Rick pls help, We are getting an issue while endorsing.. with 2 Orgs with AdminRole ( affiliation ) and AND condition.. We have setup a network with four Orgs, OrgA, OrgB, OrgC & OrgD. Each organization with 1 Anchor Peer and one supporting peer. Fabric version v1.0.3 [ docker images and binaries ] Fabric Java SDK jar version v1.0.1 as 1.0.3 was not available. :( Used the Cryptogen for creating the artifacts. While defining the channel, we have specified configtx.yaml as below OrgA - Role.Admin OrgB - Role.Admin OrgC - Role.Member OrgD - Role.Member & Orderer : Solo. With this setup, we started testing the endorsement policy with the help of JavaSDK. We have a simple chaincode, and the endorsement policy is as below. identities: # list roles to be used in the policy admin1: {"role": {"name": "admin", "mspId": "OrgAMSP"}} # admin role. admin2: {"role": {"name": "admin", "mspId": "OrgBMSP"}} user3: {"role": {"name": "member", "mspId": "OrgCMSP"}} user4: {"role": {"name": "member", "mspId": "OrgDMSP"}} policy: # the policy .. could have been flat but show grouping. 4-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "user3" - signed-by: "user4" - signed-by: "admin1" - signed-by: "admin2" [ Note: Some portion in the read the docs mentioned to specify identities in the reverse order of privilege and signature set in the increasing order of privilege. But we have tried otherwise as well. ] During the invoke from our java client, we are sending the transaction to all the peers in the network. We are collecting the proposal from all the nodes and the accumulated set is being sent to the orderer. But the transaction fails with status 10. [ TransactionEventException: Received invalid transaction event. Transaction ID 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 status 10 ] In the logs you can see as below :- ``` 2017-12-11 11:14:31,174 DEBUG EventHub:198 - EventHub peer1.OrgA got event type: BLOCK java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 status 10 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at com.tcs.bc.deployment.fabric.Deploy.invokeSmartContract(Deploy.java:1078) at com.tcs.bc.deployment.fabric.DeploymentManager.deployChaincode(DeploymentManager.java:139) at com.tcs.bc.deployment.fabric.DeploymentManager.main(DeploymentManager.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 status 10 at org.hyperledger.fabric.sdk.Channel$TL.lambda$fire$2(Channel.java:2796) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2017-12-11 11:14:31,180 DEBUG Channel:2710 - Channel testchannel got event for transaction 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 2017-12-11 11:14:31,180 DEBUG Channel:2748 - Channel testchannel seen transaction event 872a9f157ddf0516cb2c2ffe7a39a9b9bc3c4b8685e1912d1aec05bca9fc64b1 for eventHub EventHub:peer1.OrgA ``` If i change the endorsement policy to 2of and mention only ROLE.Admin, then also it fails. But if i change the endorsement policy to 2of and mention only ROLE.Member, then its successful. Any help in solving this issue would be highly appreciated.

rickr (Wed, 13 Dec 2017 13:33:42 GMT):
what is admin user ? This can not be the CA admin. That is just a ROLE memeber. If you look at the integration testcases there is a `peer admin` that user has ROLE admin

rickr (Wed, 13 Dec 2017 13:35:57 GMT):
BTW if you want latest we routinely publish SNAPSHOTs see the README.md

Ashish (Wed, 13 Dec 2017 13:45:04 GMT):
Thanks Rick, will go through the README.md again.. and will dig it up. While creating the channel, we had specified the Role.Admin and Role.Member in the *configtx.yaml as AdminPrincipal: Role.ADMIN & AdminPrincipal: Role.MEMBER* Btw, if you mentioned the usercontext was set using the users generated as a part of the the generated crypto material. he is similar to the guy who was setup as peerAdmin in End2End IT the user who gets created in the /<>/crypto-config/peerOrganizations/OrgA/users when we create crypto material using the cryptogen.

Ashish (Wed, 13 Dec 2017 13:45:04 GMT):
Thanks Rick, will go through the README.md again.. and will dig it up. While creating the channel, we had specified the Role.Admin and Role.Member in the *configtx.yaml as AdminPrincipal: Role.ADMIN & AdminPrincipal: Role.MEMBER* Btw, if you meant by admin and user in your comment in relation to the usercontext , then it was set using the users generated as a part of the the generated crypto material. he is similar to the guy who was setup as peerAdmin in End2End IT the user who gets created in the /<>/crypto-config/peerOrganizations/OrgA/users when we create crypto material using the cryptogen.

Ashish (Wed, 13 Dec 2017 13:45:04 GMT):
Thanks Rick, will go through the README.md again.. and will dig it up. While creating the channel, we had specified the Role.Admin and Role.Member in the *configtx.yaml as AdminPrincipal: Role.ADMIN & AdminPrincipal: Role.MEMBER* Btw, if you meant by admin and user in your comment in relation to the usercontext , then it was set using the users generated as a part of the generated crypto material. he is similar to the guy who was setup as peerAdmin in End2End IT the user who gets created in the /<>/crypto-config/peerOrganizations/OrgA/users when we create crypto material using the cryptogen.

Ashish (Wed, 13 Dec 2017 13:46:38 GMT):

Clipboard - December 13, 2017 7:16 PM

Ashish (Wed, 13 Dec 2017 13:47:15 GMT):
for us install, instantiate, upgrade are working just fine.

Ashish (Wed, 13 Dec 2017 13:47:35 GMT):
invoke has hit a roadblock - when we started testing the endorsement policy

muasif80 (Wed, 13 Dec 2017 13:56:35 GMT):
I got this error

muasif80 (Wed, 13 Dec 2017 13:56:36 GMT):
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.5:sign (sign-artifacts) on project fabric-sdk-java: Exit code: 1 -> [Help 1]

muasif80 (Wed, 13 Dec 2017 13:56:46 GMT):
While running the java sdk example code.

muasif80 (Wed, 13 Dec 2017 13:56:51 GMT):
Can anyone please help

Ashish (Wed, 13 Dec 2017 14:10:25 GMT):
@muasif80 can you provide a bit more of the Maven error stack trace please?

asaningmaxchain (Wed, 13 Dec 2017 14:45:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bSjefiadz2RyTvtYw) @rickr but in the fabric the orderer just only one

dharuq (Wed, 13 Dec 2017 16:43:08 GMT):
Has joined the channel.

agileHua (Thu, 14 Dec 2017 08:34:54 GMT):
@rickr Is there any examples about how to use method channel.updateChannelConfiguration

agileHua (Thu, 14 Dec 2017 08:34:54 GMT):
@rickr Is there any examples about how to use method channel.updateChannelConfiguration?

agileHua (Thu, 14 Dec 2017 08:34:54 GMT):
@rickr Is there any examples about how to use method Channel.updateChannelConfiguration?

agileHua (Thu, 14 Dec 2017 08:41:13 GMT):
we made signature about channel update info ,but couldnt be verified

smita0709 (Thu, 14 Dec 2017 09:22:01 GMT):
@rickr Through fabric sdk java how do I connect to a fabric network that is tls enabled?

muasif80 (Thu, 14 Dec 2017 12:22:32 GMT):
how to pass json from java to go chaincode

rickr (Thu, 14 Dec 2017 14:20:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sRyoxj4HKMvQciffc) @agileHua https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java#L57

rickr (Thu, 14 Dec 2017 14:22:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=76ngABbxBdGFPTEi5) @smita0709 private Channel reconstructChannel(String name, HFClient client, SampleOrg sampleOrg) throws Exception {

rickr (Thu, 14 Dec 2017 14:22:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=76ngABbxBdGFPTEi5) @smita0709 https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L472-L562

rickr (Thu, 14 Dec 2017 14:29:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pmnkuHYN2SfPmHKhv) @muasif80 As a parameter ? https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L425

muasif80 (Thu, 14 Dec 2017 14:43:10 GMT):
Actually thats an array of strings and it is received there as an array of arguments. I was thinking about sending a single object with complex json hiearchy

rickr (Thu, 14 Dec 2017 15:09:20 GMT):
Everything has to be converted to bytes on the wire. Covert your json to a string send it as a parameter and then in you CC parse the string to json

rickr (Thu, 14 Dec 2017 15:09:20 GMT):
Everything has to be converted to bytes on the wire. Convert your json to a string send it as a parameter and then in you CC parse the string to json

asaningmaxchain (Thu, 14 Dec 2017 15:51:33 GMT):
@rickr i use the java to upgrade the chaincode ,

asaningmaxchain (Thu, 14 Dec 2017 15:51:33 GMT):
@rickr i use the java to upgrade the chaincode ,and i get the follow error

asaningmaxchain (Thu, 14 Dec 2017 15:52:00 GMT):
```2017-12-14 23:50:42,192 ERROR Channel:2285 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'test'), cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: could not find chaincode with name 'test') at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2285) at org.hyperledger.fabric.sdk.Channel.sendUpgradeProposal(Channel.java:1525) at org.hyperledger.fabric.sdk.Channel.sendUpgradeProposal(Channel.java:1487) at com.maxchain.config.fabric.channel.ChannelUtil.chaincodeUpgrade(ChannelUtil.java:265) at com.maxchain.config.HLTest.testUpgradeChaincode(HLTest.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: could not find chaincode with name 'test')```

asaningmaxchain (Thu, 14 Dec 2017 15:52:17 GMT):
``` chaincode error (status: 500, message: could not find chaincode with name 'test')```

asaningmaxchain (Fri, 15 Dec 2017 00:57:06 GMT):
@rickr i don't know why the queryInstantiatedChaincodes request should set the orderer node information?

didianV5 (Fri, 15 Dec 2017 01:28:29 GMT):
Has joined the channel.

pvrbharg (Fri, 15 Dec 2017 03:08:56 GMT):
Team, which version of fabric-sdk-java would I be using if I wish to connect to fabric version of v1.0.2? v1.0.1 or v1.0.0 or ? Thanks

donsonZhang (Fri, 15 Dec 2017 07:51:15 GMT):
Has joined the channel.

donsonZhang (Fri, 15 Dec 2017 07:54:26 GMT):
there is a demo to show how to use sdk-java interact with the fabric?

donsonZhang (Fri, 15 Dec 2017 07:54:51 GMT):
HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); client.setUserContext(new User() { public String getName() { return "donson"; } public Set getRoles() { return null; } public String getAccount() { return null; } public String getAffiliation() { return null; } public Enrollment getEnrollment() { return new Enrollment() { public PrivateKey getKey() { return null; } public String getCert() { return null; } }; } public String getMspId() { return "Org1MSP"; } }); Channel channel = client.newChannel("mychannel"); channel.addOrderer(client.newOrderer("orderer0","grpc://localhost:7050")); channel.addPeer(client.newPeer("peer0","grpc://localhost:7051")); channel.initialize(); TransactionProposalRequest transactionProposalRequest = client.newTransactionProposalRequest(); ChaincodeID chaincodeID = ChaincodeID.newBuilder().setName("myCC").setVersion("1.0").setPath("github.com/some_package/package/chaincode/myCC").build(); transactionProposalRequest.setChaincodeID(chaincodeID); transactionProposalRequest.setFcn("some_function"); transactionProposalRequest.setProposalWaitTime(TimeUnit.SECONDS.toMillis(10)); //transactionProposalRequest.setArgs(); Collection proposalResponses = channel.sendTransactionProposal(transactionProposalRequest); CompletableFuture transactionEventCompletableFuture = channel.sendTransaction(proposalResponses, client.getUserContext()); BlockEvent.TransactionEvent transactionEvent = transactionEventCompletableFuture.get(); System.out.println(transactionEvent.toString());

donsonZhang (Fri, 15 Dec 2017 08:02:14 GMT):
Exception in thread "main" org.hyperledger.fabric.sdk.exception.InvalidArgumentException: UserContext for user donson enrollment missing user certificate. at org.hyperledger.fabric.sdk.User.userContextCheck(User.java:92) at org.hyperledger.fabric.sdk.HFClient.setUserContext(HFClient.java:257) at Test.main(Test.java:19)

asaningmaxchain (Fri, 15 Dec 2017 10:06:39 GMT):
@donsonZhang the user cert is null

asaningmaxchain (Fri, 15 Dec 2017 10:08:00 GMT):
please use the http://pastebin.com/ to paste your code

asuchit (Fri, 15 Dec 2017 10:08:16 GMT):
Has joined the channel.

chaitanya (Fri, 15 Dec 2017 10:43:16 GMT):
Hi everyone, I've been seeing a weird issue lately. I have 2 orgs in the network, and the Java SDK is bound to org1. I also have a block listener in SDK application. In a lot of the blocks, I'm seeing data signed by both Org1MSP and Org2MSP, while I expect it to only have data from Org1MSP. Does anyone have any idea whats missing here?

donsonZhang (Fri, 15 Dec 2017 10:57:22 GMT):
the fabric java sdk 1.0.1 has not AtomicBroadcastGrpc ?

donsonZhang (Fri, 15 Dec 2017 11:05:14 GMT):
`import org.hyperledger.fabric.protos.orderer.AtomicBroadcastGrpc;`

donsonZhang (Fri, 15 Dec 2017 11:05:55 GMT):
@asaningmaxchain how I set user cert?

donsonZhang (Fri, 15 Dec 2017 11:18:12 GMT):
the fabric java sdk 1.0.1 has not AtomicBroadcastGrpc ? I get the source code from github and protoc all proto,find the OrdererClient use the AtomicBroadcastGrpc,but the AtomicBroadcastGrpc is not exist

donsonZhang (Fri, 15 Dec 2017 11:18:12 GMT):
docker ps

donsonZhang (Fri, 15 Dec 2017 11:22:06 GMT):
and org.hyperledger.fabric.protos.peer.EventsGrpc is not exist

asaningmaxchain (Fri, 15 Dec 2017 12:37:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yMkWWiyD33suHqXZd) @donsonZhang i should be produced by the tool like the cryptogen or other tools

HubertYoung (Fri, 15 Dec 2017 13:20:43 GMT):
how to check whether the user without persistence is registered to ca using sdk

muasif80 (Fri, 15 Dec 2017 13:41:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Sw9jECtvimWYq3Azf) @rickr Ok

rickr (Fri, 15 Dec 2017 13:48:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HhwQMspQnQL9XCXCg) @pvrbharg Should connect to all. So should the v1.1 SNAPSHOT builds

rickr (Fri, 15 Dec 2017 13:51:06 GMT):
@donsonZhang Look at End2endIT.java https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/java/org/hyperledger/fabric/sdkintegration

rickr (Fri, 15 Dec 2017 13:54:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YHQgpaDWtyChRDnX6) @chaitanya Are the proposals you create being endorsed by peers from both Orgs ?

rickr (Fri, 15 Dec 2017 15:08:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PNw7aBYB4zAiv7qac) @HubertYoung Nothing in v1.0 For v1.1 there will be a way if enabled

asaningmaxchain (Fri, 15 Dec 2017 16:23:18 GMT):
@rickr when the chaincode install,it can set the many signature,so i think the signed_cc_dep_spec proto should be included

pvrbharg (Fri, 15 Dec 2017 20:12:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xt94qhHZWSCiYeJGG) @rickr Thank you Rick. So client -> fabric-sdk-java v1.0.1 should be good working with fabric v1.0.3 server runtime or anything upwards, right? This is what we need to make sure we are good with. Please confirm and in advance thank you!

donsonZhang (Sat, 16 Dec 2017 07:03:15 GMT):
is there a demo to show how to use the java sdk interact with the fabric? the github test code can not run

donsonZhang (Sat, 16 Dec 2017 07:05:06 GMT):
and now the fabric is supported the java chain code ?

iago001 (Sat, 16 Dec 2017 14:15:55 GMT):
Has joined the channel.

rickr (Sat, 16 Dec 2017 19:12:58 GMT):
All tests are passing with latest commit https://gerrit.hyperledger.org/r/#/c/15953/

rickr (Sat, 16 Dec 2017 19:12:58 GMT):
All tests are passing with latest commit https://gerrit.hyperledger.org/r/#/c/15953/ That runs against V1.0 and latest Fabric V1.1

rickr (Sat, 16 Dec 2017 19:12:58 GMT):
All tests are passing with latest commit https://gerrit.hyperledger.org/r/#/c/15953/ That runs JSDK v1.1 master latest (work in progress) against Fabric V1.0.0 and latest Fabric V1.1 master

rickr (Sat, 16 Dec 2017 19:12:58 GMT):
All tests are passing with latest commit https://gerrit.hyperledger.org/r/#/c/15953/ That runs JSDK v1.1 master latest ( _work in progress_ ) against Fabric V1.0.0 release and latest Fabric V1.1 master ( _work in progress_ )

rickr (Sat, 16 Dec 2017 19:13:56 GMT):

Clipboard - December 16, 2017 2:13 PM

rickr (Sat, 16 Dec 2017 19:17:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xusAErN8g2TkR5otW) @pvrbharg If you are just starting out and learning Fabric BC I would recommend just getting the latest or use the v1.1 SNAPSHOT

rickr (Sat, 16 Dec 2017 20:29:14 GMT):
I just tested locally JSDK v1.0.1 against Fabric v1.0.5 and it passed. To get Fabric v1.0.5 before you start docker : ``` export IMAGE_TAG_FABRIC=:x86_64-1.0.5 export IMAGE_TAG_FABRIC_CA=:x86_64-1.0.5 ``` to get the SDK 1.0.1: ``` git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java/ git checkout tags/v1.0.1 ``` Now there is a failure in the unit test just because a certificate has expired. If you're not doing development which no one is on v1.0.1 then to run the integration tests : mvn clean install -DskipITs=true -Dmaven.test.failure.ignore=false javadoc:javadoc -Dtest=IntegrationSuite ```

rickr (Sat, 16 Dec 2017 20:29:14 GMT):
I just tested locally JSDK v1.0.1 against Fabric v1.0.5 and it passed. To get Fabric v1.0.5 before you start docker : ``` export IMAGE_TAG_FABRIC=:x86_64-1.0.5 export IMAGE_TAG_FABRIC_CA=:x86_64-1.0.5 ``` to get the SDK 1.0.1: ``` git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java/ git checkout tags/v1.0.1 ``` Now there is a failure in the unit test just because a certificate has expired. If you're not doing development which no one is on v1.0.1 then to run the integration tests : ``` mvn clean install -DskipITs=true -Dmaven.test.failure.ignore=false javadoc:javadoc -Dtest=IntegrationSuite ```

rickr (Sat, 16 Dec 2017 20:29:14 GMT):
I just tested locally JSDK v1.0.1 release against Fabric v1.0.5 release and it passed. To get Fabric v1.0.5 before you start docker : ``` export IMAGE_TAG_FABRIC=:x86_64-1.0.5 export IMAGE_TAG_FABRIC_CA=:x86_64-1.0.5 ``` to get the SDK 1.0.1: ``` git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java/ git checkout tags/v1.0.1 ``` Now there is a failure in the unit test just because a certificate has expired. If you're not doing development which no one is on v1.0.1 then to run the integration tests : ``` mvn clean install -DskipITs=true -Dmaven.test.failure.ignore=false javadoc:javadoc -Dtest=IntegrationSuite ```

rickr (Sat, 16 Dec 2017 20:39:39 GMT):
Client output of my run : https://ctrlv.it/id/69957/760496859 There are some exceptions because it includes negative test that are meant to throw exceptions. What matter at the bottom: ``` [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:53 min [INFO] Finished at: 2017-12-16T15:33:41-05:00 [INFO] Final Memory: 51M/605M [INFO] ------------------------------------------------------------------------ ```

rickr (Sat, 16 Dec 2017 20:39:39 GMT):
Client output of my run : https://ctrlv.it/id/69957/760496859 There are some exceptions because it includes negative test that are meant to throw exceptions. What matter at the bottom: ``` [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:53 min [INFO] Finished at: 2017-12-16T15:33:41-05:00 [INFO] Final Memory: 51M/605M [INFO] ------------------------------------------------------------------------ ``` There are two main test there End2endIT.java and End2endAndBackAgainIT.java That do 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) Then you can cut and paste from there to your own application.

rickr (Sat, 16 Dec 2017 20:39:39 GMT):
Client output of my run : https://ctrlv.it/id/69957/760496859 There are some exceptions because it includes negative test that are meant to throw exceptions. What matter at the bottom: ``` [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:53 min [INFO] Finished at: 2017-12-16T15:33:41-05:00 [INFO] Final Memory: 51M/605M [INFO] ------------------------------------------------------------------------ ``` There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) Then you can cut and paste from there to your own application.

rickr (Sat, 16 Dec 2017 20:39:39 GMT):
Client output of my run : https://ctrlv.it/id/69957/760496859 There are some exceptions because it includes negative test that are meant to throw exceptions. What matter at the bottom: ``` [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:53 min [INFO] Finished at: 2017-12-16T15:33:41-05:00 [INFO] Final Memory: 51M/605M [INFO] ------------------------------------------------------------------------ ``` There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) *working code right before eyes!* Then once you know this you can cut and paste from there to your own application. ( _the code is done for you!_ :) )

rickr (Sat, 16 Dec 2017 20:39:39 GMT):
Client output of my run : https://ctrlv.it/id/69957/760496859 There are some exceptions because it includes negative test that are meant to throw exceptions. What matter at the bottom: ``` [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:53 min [INFO] Finished at: 2017-12-16T15:33:41-05:00 [INFO] Final Memory: 51M/605M [INFO] ------------------------------------------------------------------------ ``` There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) *working code right before eyes!* Then once you understand them you can cut and paste from there to your own application. ( _the code is done for you!_ :) )

rickr (Sat, 16 Dec 2017 21:27:03 GMT):
From what I've seen to the extent that the integration tests are passing: Latest working in progress of JSDK v1.1 works against Fabric v1.0.0 released and Fabric v1.1 work in progress (gerrit verification builds) Latest JSDK 1.0.1 release is working against JSDK v1.0.5 release. ( My own local testing )

rickr (Sat, 16 Dec 2017 21:27:03 GMT):
From what I've seen to the extent that the integration tests are passing: Latest work in progress of JSDK v1.1 works against Fabric v1.0.0 released and Fabric v1.1 work in progress (gerrit verification builds) Latest JSDK 1.0.1 release is working against JSDK v1.0.5 release. ( My own local testing )

rickr (Sat, 16 Dec 2017 21:27:03 GMT):
From what I've seen to the extent that the integration tests are passing: Latest work in progress of JSDK v1.1 works against Fabric v1.0.0 released and Fabric v1.1 work in progress (via gerrit verification builds passing) Latest JSDK 1.0.1 release is working against Fabric v1.0.5 release. ( via my own local testing )

rickr (Sat, 16 Dec 2017 21:27:03 GMT):
From what I've seen _to the extent that the integration tests are passing_: Latest work in progress of JSDK v1.1 works against Fabric v1.0.0 released and Fabric v1.1 work in progress (via gerrit verification builds passing) Latest JSDK 1.0.1 release is working against Fabric v1.0.5 release. ( via my own local testing )

rickr (Sat, 16 Dec 2017 21:27:03 GMT):
From what I've seen _to the extent that the integration tests are passing_: Latest work in progress of JSDK v1.1 works against Fabric v1.0.0 released and Fabric v1.1 work in progress (via gerrit verification builds passing) JSDK 1.0.1 latest release is working against Fabric v1.0.5 latest release. ( via my own local testing )

rickr (Sat, 16 Dec 2017 21:47:46 GMT):
Latest I heard is there is no support for Java chaincode in Fabric v1.1 release.

rickr (Sat, 16 Dec 2017 21:47:46 GMT):
Latest I heard is there is no support for Java chaincode in Fabric v1.1 release. https://chat.hyperledger.org/channel/fabric-java-chaincode?msg=HYj3Zkfp5S2rXZq6S

pvrbharg (Sat, 16 Dec 2017 22:27:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nkRmW7xBreva5TXiB) @rickr @sanchezl Thank you so much and my take away from all your responses - use v1.1 SNAPSHOT. My use case requires me to use fabric-sdk-java to deploy chaincode developed in Go on to IBP hosted environment that is at fabric and fabric-ca v1.0.3. This is the context and I am a fabric-sdk-java newbie - however I am skilled in Go and CLI interactions. As always - there is not much margin with dates or deadlines. I believe using v1.1 SNAPSHOT probably is most future proof and the current code level is at 1.0.0-beta. This is the context. Thanks again and you helped me guide to what I am looking for. Regards.

asaningmaxchain (Sun, 17 Dec 2017 14:27:33 GMT):
@rickr i think the End2EndIT method runChannel is too long

asaningmaxchain (Sun, 17 Dec 2017 14:27:33 GMT):
@rickr i think the End2EndIT method runChannel is too long,can you extract it into many method

aneb (Mon, 18 Dec 2017 01:09:40 GMT):
Has left the channel.

silentspark (Mon, 18 Dec 2017 03:16:13 GMT):
Has joined the channel.

ngeorge (Mon, 18 Dec 2017 08:51:15 GMT):
While querying a chaincode using cli, I could see that orderer reference is not used. The result is returned even if the orderer container is down. But while using the java sdk , channel.queryByChaincode(...) method, we have to initialize the channel and for that, the orderer has to be added to the channel object. Is there a means to query the peers, using java sdk even if the orderer is unavailable ?

wanghhao (Mon, 18 Dec 2017 10:07:09 GMT):
Has left the channel.

asaningmaxchain (Mon, 18 Dec 2017 11:21:47 GMT):
``` channel.sendTransaction(successful, Arrays.asList(orderer)).thenApply(transactionEvent -> { return null; }).exceptionally(e -> { if (e instanceof TransactionEventException) { BlockEvent.TransactionEvent te = ((TransactionEventException) e).getTransactionEvent(); if (te != null) { System.out.println(te); } } return null; }).get(10000, TimeUnit.SECONDS);```

asaningmaxchain (Mon, 18 Dec 2017 11:22:26 GMT):
@rickr when i instantiate chaincode the transactionEvent is null ?can you tell me why?

asaningmaxchain (Mon, 18 Dec 2017 11:22:26 GMT):
@rickr when i instantiate chaincode the transactionEvent is null ?can you tell me why?but the chaincode container startup successfully

donsonZhang (Mon, 18 Dec 2017 11:59:40 GMT):
where can I find the "ca_location"? There is no ca run I found the config , defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.ca_location", "http://localhost:7054");

chaitanya (Mon, 18 Dec 2017 12:30:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NeFeY7vhpbFNPMsKe) @rickr I checked the proposal responses and they're coming only from the anchor peer of org1. If i run this setup on a single machine, I dont get this problem, but I face this issue only if I run the setup on multiple VMs

donsonZhang (Mon, 18 Dec 2017 12:49:35 GMT):
`CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 30cbd1016f63 dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 "chaincode -peer.a..." 3 days ago Up 3 days dev-peer0.org1.example.com-mycc-1.0 cc5f52156120 hyperledger/fabric-tools "/bin/bash" 11 days ago Up 3 days cli 7f011b1e2297 hyperledger/fabric-orderer "orderer" 11 days ago Up 3 days 0.0.0.0:7050->7050/tcp orderer.example.com 4ae9ed6230e2 hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com cfd15366ab83 hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com 9cbbce772d4b hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 9940e07ce15d hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com`

donsonZhang (Mon, 18 Dec 2017 12:49:58 GMT):
docker ps

donsonZhang (Mon, 18 Dec 2017 12:50:21 GMT):
`CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 30cbd1016f63 dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 "chaincode -peer.a..." 3 days ago Up 3 days dev-peer0.org1.example.com-mycc-1.0 cc5f52156120 hyperledger/fabric-tools "/bin/bash" 11 days ago Up 3 days cli 7f011b1e2297 hyperledger/fabric-orderer "orderer" 11 days ago Up 3 days 0.0.0.0:7050->7050/tcp orderer.example.com 4ae9ed6230e2 hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com cfd15366ab83 hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com 9cbbce772d4b hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com 9940e07ce15d hyperledger/fabric-peer "peer node start" 11 days ago Up 3 days 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com`

donsonZhang (Mon, 18 Dec 2017 12:51:28 GMT):
0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com, is the peer0 has twice port: 7051 and 7053?

donsonZhang (Mon, 18 Dec 2017 12:51:52 GMT):
And what mean 0.0.0.0:7051->7051/tcp

rickr (Mon, 18 Dec 2017 14:42:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DmasBbShp2G3azCZg) @ngeorge No not at the moment and probably not later as in the future we'll need to get current config block to determine the version/capabilities the channel has to handle difference

rickr (Mon, 18 Dec 2017 14:42:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DmasBbShp2G3azCZg) @ngeorge No not at the moment and probably not later as in the future we'll need to get current config block to determine the version/capabilities the channel has to handle difference in releases

rickr (Mon, 18 Dec 2017 14:49:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2LoDf4xfLmGuo8rXL) @asaningmaxchain The only reason I know of why it would be null is that you have no active eventhubs . In that case the only thing the resolution of the future indicates is that )rderer has _accepted_ the transaction with no errors.

asaningmaxchain (Mon, 18 Dec 2017 14:50:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xGvQkAnRp3YBGy3LR) @rickr i try it

asaningmaxchain (Mon, 18 Dec 2017 14:50:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xGvQkAnRp3YBGy3LR) @rickr i try it,do you test the tps use the java sdk?

asaningmaxchain (Mon, 18 Dec 2017 14:51:16 GMT):
@rickr do you test the tps use the java sdk?

rickr (Mon, 18 Dec 2017 14:59:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YcLQ58yTgfox8tNbF) @chaitanya Are there other VMs send proposals to this vm and channel from the _other organization_ ?

chaitanya (Mon, 18 Dec 2017 15:10:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wR9vaNSz5QyR8nPnH) @rickr Nope. There's just one SDK and all application transactions go through it. The SDK is bound to org1, and there's some invokes the SDK makes by itself. It is these invokes that are showing up with additional TxIDs in the block, in case of a multiple VM system.

chaitanya (Mon, 18 Dec 2017 15:10:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wR9vaNSz5QyR8nPnH) @rickr Nope. There's just one SDK and all application transactions go through it. The SDK is bound to org1, and there are some invokes the SDK makes by itself. It is these invokes that are showing up with additional TxIDs in the block, in case of a multiple VM system.

rickr (Mon, 18 Dec 2017 15:28:47 GMT):
Odd can you use a debugger to narrow down where the sdk is initiating these transactions ? Give a stack trace ? Enable TRACE (use: https://ctrlv.it/)

rickr (Mon, 18 Dec 2017 15:28:47 GMT):
Odd can you use a debugger to narrow down where the sdk is initiating these transactions ? Give a stack trace ? Enable TRACE (use: https://ctrlv.it/) Maybe first look at the difference between what is happening locally and then when remotely ?

chaitanya (Mon, 18 Dec 2017 17:08:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7zKBacgWToeT5pk5z) @rickr I have a certain logging in my SDK, wherein I track the flow of a transaction.The odd part is that the additonal transaction ID that I see in the committed block, is never seen by my SDK. The only place it is found in my system is in a committed block (received by my blockEvent listener), which breaks a certain parsing logic of mine.

rickr (Mon, 18 Dec 2017 17:13:15 GMT):
_ The odd part is that the additonal transaction ID that I see in the committed block, is never seen by my SDK. _ Don't follow : Do you mean that the SDK client never creates this? You don't see it on your client at all but then get it with the eventhub ?

chaitanya (Mon, 18 Dec 2017 17:22:45 GMT):
@rickr precisely yes!

rickr (Mon, 18 Dec 2017 17:29:16 GMT):
So you've enabled the SDK at TRACE level. When you start up and get this transaction id you don't see this transaction id anywhere till it's reported by the eventhub ?

chaitanya (Mon, 18 Dec 2017 17:29:58 GMT):
@rickr yes

rickr (Mon, 18 Dec 2017 17:38:22 GMT):
Think you'll have to paste it (https://ctrlv.it/) The SDK log at trace and the same for the peer log at trace. Orderer wouldn't hurt either. Try to have the times between the systems _relatively_ synced. Tell us what transaction id you think is errant.

rickr (Mon, 18 Dec 2017 17:38:29 GMT):
@wlahti ^^^

happy975 (Tue, 19 Dec 2017 09:23:53 GMT):
Has joined the channel.

pvrbharg (Tue, 19 Dec 2017 12:37:23 GMT):
@rickr - You have been helping us hugely. We tried compiling our Java code base from v1.0.0-beta to WIP_fabric_v1 or 1.1.0-SNAPSHOT. and we are getting this error on Mac platform:

pvrbharg (Tue, 19 Dec 2017 12:37:50 GMT):

DarwinLinkingError.txt

pvrbharg (Tue, 19 Dec 2017 12:38:38 GMT):
I am hoping you may have seen this issue already and solved it or any guidance you may provide me. Thanks.

muasif80 (Tue, 19 Dec 2017 13:16:09 GMT):
@rickr We have these tests create-channel.js join-channel.js in node sdk testsuite, don't we have such tests in the java sdk suite

rickr (Tue, 19 Dec 2017 18:52:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wi28x8zE9o2Afyf54) @pvrbharg I don't really use OSX so I've not encountered that. You'll need to google it some is right now the best I can offer. That library is used for TLS support. There is another alternative but Jetty ALPN but you'll need to google that too to figure out how to enable. https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/pom.xml#L173

rickr (Tue, 19 Dec 2017 18:52:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wi28x8zE9o2Afyf54) @pvrbharg I don't really use OSX so I've not encountered that. You'll need to google it some is right now the best I can offer. That library is used for TLS support. There is another alternative Jetty ALPN but you'll need to google that too to figure out how to enable. https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/pom.xml#L173

rickr (Tue, 19 Dec 2017 18:58:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WojhQGEcbjAC2TREF) @muasif80 The integration test create the channel object and the do join peers to the channel. The `real` channel is created/configured with the configtxgen tool https://github.com/hyperledger/fabric-sdk-java#channel-creation-artifacts I don't think there's really any difference with the Node side.

rickr (Tue, 19 Dec 2017 19:01:09 GMT):
*FYI any help/ coverage by me here will be sparse till sometime first week of Jan. 2018.*

muasif80 (Tue, 19 Dec 2017 19:10:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7izBpDLeHNtd7ZEXq) @rickr It doesnt create real channel. :grimacing:

rickr (Tue, 19 Dec 2017 19:15:44 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L675

rickr (Tue, 19 Dec 2017 19:15:44 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L675 Signs the channel config block and sends to orderer to create channel. But that block is created by the configtx tool as I stated.

rickr (Tue, 19 Dec 2017 19:15:44 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/270a75e97042826ba3dc6f120a2506fec8187659/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L675 Signs the channel config block and sends to orderer to create channel. But that block is created by the configtx tool as I stated. ASFAIK I don't think the Node SDK is doing anything more.

muasif80 (Tue, 19 Dec 2017 21:14:26 GMT):
Ok thanks

markthedark (Wed, 20 Dec 2017 12:25:45 GMT):
Has joined the channel.

markthedark (Wed, 20 Dec 2017 12:52:45 GMT):
hello, i'm having some trouble understanding this whole sdk thing... following along https://hyperledger-fabric.readthedocs.io/en/release/chaincode4ade.html , i understand how to write, compile, deploy and run the chaincode.. can someone explain to me what are the steps necessary to write, compile and deploy some chaincode using the java-sdk to an existing network?

atian15 (Thu, 21 Dec 2017 02:20:55 GMT):
Has joined the channel.

HubertYoung (Thu, 21 Dec 2017 03:39:59 GMT):
Got an error when invoking channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers());

HubertYoung (Thu, 21 Dec 2017 03:39:59 GMT):
hi,guys.i got an error when invoking channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers()). channel.getPeers() is not null

HubertYoung (Thu, 21 Dec 2017 03:40:07 GMT):
2017-12-21 11:34:44.254 ERROR 17356 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP Org1MSP is unknown, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2285) [classes/:na] at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1401) [classes/:na]

HubertYoung (Thu, 21 Dec 2017 07:12:54 GMT):
hi,guys.i got an error when instantiating the channel.

HubertYoung (Thu, 21 Dec 2017 07:12:56 GMT):
2017-12-21 15:10:06.384 ERROR 2449 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP Org1MSP is unknown, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err MSP Org1MSP is unknown at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2285) [classes/:na]

asaningmaxchain (Thu, 21 Dec 2017 07:21:22 GMT):
@HubertYoung how do you produce the configtx

HubertYoung (Thu, 21 Dec 2017 07:23:59 GMT):
i am using the End2endIT example.i didnt change the default yaml.

asaningmaxchain (Thu, 21 Dec 2017 08:31:25 GMT):
can you use the https://github.com/hyperledger/fabric/tree/master/examples/configtxupdate to parser the genesisblock and channel.tx

vijay5378 (Thu, 21 Dec 2017 12:10:34 GMT):
Hi apologies for the newbie'ish question: I get the following when I try to install java chaincodeError: Java chaincode is work-in-progress and disabled. I use the following command for installing - peer chaincode install -l java -n sscc -v 0 -p /github.com/hyperledger/fabric/examples/chaincode/java/SimpleSample/build/ How do I overcome this?

janbols (Thu, 21 Dec 2017 12:36:41 GMT):
Has joined the channel.

mastersingh24 (Thu, 21 Dec 2017 12:39:44 GMT):
@vijay5378 - the only way would be to build Fabric yourself and enable experimental features. Although I believe that if you pull down the 1.1-preview experimental features are enabled

vijay5378 (Thu, 21 Dec 2017 12:41:56 GMT):
@mastersingh24 I did do that, but with v1.0.5. I didn't use docker images. Would I be able to try out java chaincode if I clone the v1.1.0-preview git branch?

mastersingh24 (Thu, 21 Dec 2017 12:57:40 GMT):
You should be able to just pull down the 1.1.0-preview images as well

mastersingh24 (Thu, 21 Dec 2017 12:57:46 GMT):
Or clone master and build

markthedark (Thu, 21 Dec 2017 13:21:16 GMT):
Does someone have an example code on how to connect to an existing fabric network (byfn example)?

RodrigoAcosta (Thu, 21 Dec 2017 14:19:11 GMT):
Has joined the channel.

sbelko (Thu, 21 Dec 2017 15:16:49 GMT):
Has joined the channel.

vijay5378 (Thu, 21 Dec 2017 15:55:13 GMT):
Thanks will try that out[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9q3A24qrFYNG9fpDR) @mastersingh24

asaningmaxchain (Fri, 22 Dec 2017 03:05:32 GMT):
@mastersingh24 @rickr https://jira.hyperledger.org/browse/FAB-7545 please take a look

yoyokeen (Fri, 22 Dec 2017 05:57:06 GMT):
```Caused by: io.grpc.StatusRuntimeException: UNKNOWN ```what's the problem on?

yoyokeen (Fri, 22 Dec 2017 05:57:36 GMT):
```2017-12-22 05:53:07,113 main ERROR Channel:428 - Channel foo error: Channel foo, send transaction failed on orderer orderer.example.com. Reason: UNKNOWN org.hyperledger.fabric.sdk.exception.TransactionException: Channel foo, send transaction failed on orderer orderer.example.com. Reason: UNKNOWN at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:178) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:142) at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:384) at org.hyperledger.fabric.sdk.Channel.(Channel.java:219) ```

asaningmaxchain (Fri, 22 Dec 2017 06:17:09 GMT):
do you use the tls?

asaningmaxchain (Fri, 22 Dec 2017 06:17:09 GMT):
do you use the tls? or can you the `docker logs` to get the orderer node

yoyokeen (Fri, 22 Dec 2017 06:42:07 GMT):
docker logs -f orderer.example.com, which is empty

yoyokeen (Fri, 22 Dec 2017 06:42:36 GMT):
It cant connect the orderer. so not data come out.

HubertYoung (Fri, 22 Dec 2017 08:39:06 GMT):
@asaningmaxchain thanks,i regenerate all the file but still doesnt work.it turned out i passed the wrong enrollement object when deserialization。

HubertYoung (Fri, 22 Dec 2017 08:39:06 GMT):
@asaningmaxchain thanks,i regenerate all the file but still doesnt work.it turned out i passed the wrong enrollement object when deserialization.

HubertYoung (Fri, 22 Dec 2017 08:40:45 GMT):
do i have to create channel for every user in a web application?

HubertYoung (Fri, 22 Dec 2017 08:40:45 GMT):
do i have to create channel for every request in a web application?

asaningmaxchain (Fri, 22 Dec 2017 09:27:43 GMT):
it's base on your logic

HubertYoung (Fri, 22 Dec 2017 11:27:47 GMT):
i want to make the channel singleton in one organization.what would be the best practice?

HubertYoung (Fri, 22 Dec 2017 11:27:47 GMT):
i want to make the channel singleton in one organization and create a new HFClient object every request.what would be the best practice?

HubertYoung (Fri, 22 Dec 2017 11:28:33 GMT):
does channel support concurrent?

RodrigoAcosta (Fri, 22 Dec 2017 19:19:46 GMT):
@markthedark this is a good place to start src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

yoyokeen (Sat, 23 Dec 2017 09:03:08 GMT):
```2017-12-23 06:59:42,425 main ERROR OrdererClient:180 - sendTransaction error Channel foo, send transaction failed on orderer orderer.example.com. Reason: UNKNOWN org.hyperledger.fabric.sdk.exception.TransactionException: Channel foo, send transaction failed on orderer orderer.example.com. Reason: UNKNOWN at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:178) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:142) at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:384) at org.hyperledger.fabric.sdk.Channel.(Channel.java:219) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1348) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:176) at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:655) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:189) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: io.grpc.StatusRuntimeException: UNKNOWN at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:418) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:663) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:443) ```

yoyokeen (Sat, 23 Dec 2017 09:03:21 GMT):
the latest version with th error

donsonZhang (Mon, 25 Dec 2017 07:15:11 GMT):
example e2e_cli: kafka logs:

donsonZhang (Mon, 25 Dec 2017 07:15:15 GMT):
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='Cannot allocate memory' (errno=12)

donsonZhang (Mon, 25 Dec 2017 07:15:31 GMT):
so where is to set thge JVM args?

rohanagarwal (Mon, 25 Dec 2017 21:32:55 GMT):
Has joined the channel.

Cavan2477 (Tue, 26 Dec 2017 01:57:42 GMT):
Has joined the channel.

hendry19901990 (Tue, 26 Dec 2017 16:29:48 GMT):
i have a problem, help me

hendry19901990 (Tue, 26 Dec 2017 16:30:11 GMT):
Build file '/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle' line: 30 * What went wrong: An exception occurred applying plugin request [id: 'com.google.protobuf', version: '0.7.0'] > Failed to apply plugin [id 'com.google.protobuf'] > Please apply the Java plugin or the Android plugin first

hendry19901990 (Tue, 26 Dec 2017 16:30:25 GMT):
whe i run

hendry19901990 (Tue, 26 Dec 2017 16:30:26 GMT):
$ cd $GOPATH/src/github.com/hyperledger/fabric/core/chaincode/shim/java $ gradle -b build.gradle clean

jnichols181912 (Tue, 26 Dec 2017 19:32:14 GMT):
Has joined the channel.

hendry19901990 (Tue, 26 Dec 2017 20:25:51 GMT):
2017-12-26 20:25:08.572 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc 2017-12-26 20:25:08.572 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled Error: Java chaincode is work-in-progress and disabled

hendry19901990 (Tue, 26 Dec 2017 20:26:06 GMT):
when i try to install chaincode

GaneshSharma (Wed, 27 Dec 2017 16:55:13 GMT):
Has joined the channel.

smita0709 (Thu, 28 Dec 2017 10:02:24 GMT):
Hello, I am trying to connect to a TLS enabled fabric network through fabric sdk java I am using grpcs. To connect to non TLS fabric network I use grpc. | I get the follwing error when i try to connect to the TLS enabled network [ERROR] 2017-12-28 14:48:32.123 [main] Channel - Sending proposal to participant_peer failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Channel closed while performing protocol negotiation, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation

Kaltrak (Fri, 29 Dec 2017 02:53:15 GMT):
Has joined the channel.

WalkerLiu (Fri, 29 Dec 2017 08:40:49 GMT):
Has joined the channel.

Abhijeet.K (Sat, 30 Dec 2017 14:16:33 GMT):
Has joined the channel.

ShankarBorate (Tue, 02 Jan 2018 08:23:57 GMT):
Has joined the channel.

ShankarBorate (Tue, 02 Jan 2018 08:24:06 GMT):
I also got the same error

ShankarBorate (Tue, 02 Jan 2018 08:26:33 GMT):
I was following this tutorial

ShankarBorate (Tue, 02 Jan 2018 08:26:34 GMT):
https://www.ibm.com/developerworks/library/j-chaincode-for-java-developers/index.html

asaningmaxchain (Tue, 02 Jan 2018 08:34:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mAFLEHkK95Y8wYrhd) @smita0709 can you stay the same with fabric network

rickr (Tue, 02 Jan 2018 14:28:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LMqLavxNraPjFit5r) @markthedark There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) *working code right before eyes!* Then once you understand them you can cut and paste from there to your own application. ( _the code is done for you!_ 🙂 )

rickr (Tue, 02 Jan 2018 14:28:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LMqLavxNraPjFit5r) @markthedark There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) *working code right before eyes!* Then once you understand them you can cut and paste from there to your own application. ( _the code is done for you!_ 🙂 )

rickr (Tue, 02 Jan 2018 14:28:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LMqLavxNraPjFit5r) @markthedark There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) *working code right before eyes!* Then once you understand them you can cut and paste from there to your own application. ( _the code is done for you!_ 🙂 )

rickr (Tue, 02 Jan 2018 14:28:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LMqLavxNraPjFit5r) @markthedark There are two main test there End2endIT.java and End2endAndBackAgainIT.java That does 95% of what the SDK does. https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java Once network is created : https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Study them and better yet work with them in a debugger to follow the code ( *a live demo* ) *working code right before eyes!* Then once you understand them you can cut and paste from there to your own application. ( _the code is done for you!_ 🙂 )

rickr (Tue, 02 Jan 2018 14:35:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mAFLEHkK95Y8wYrhd) @smita0709 All the integration test can be enabled for TLS and are so for verification tests. Before starting docker images: export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_CA_TLS=--tls.enabled Before starting the client integration tests: export ORG_HYPERLEDGER_FABRIC_SDKTEST_INTEGRATIONTESTS_TLS=true Most likely you certificate is wrong or host/ip in the certifcate CN does not match.

rickr (Tue, 02 Jan 2018 14:43:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Fkcm6MWMBXQ8yC9nr) @yoyokeen Did you look at the orderer logs ? docker logs orderer.example.com enable trace on client see exactly when you send the transaction then look at what's being produced by the Orderer.

sativ01.ca (Tue, 02 Jan 2018 16:17:05 GMT):
Has joined the channel.

praveentalari (Wed, 03 Jan 2018 17:42:18 GMT):
Has joined the channel.

diego88 (Thu, 04 Jan 2018 00:25:32 GMT):
Has joined the channel.

diego88 (Thu, 04 Jan 2018 00:26:29 GMT):
Hi everyone, i need some info about one thing: how to request a certificate to the CA server in a Java application?

michael_aR (Thu, 04 Jan 2018 09:46:53 GMT):
Does this solution work on windows or linux only ?! https://github.com/hyperledger/fabric-sdk-rest

michael_aR (Thu, 04 Jan 2018 09:53:19 GMT):
i get many errors while executing npm link..

markthedark (Thu, 04 Jan 2018 13:50:58 GMT):
Hello, i'm having trouble decoding the response payload using the SDK.. the usual procedure used in the examples, cannot decode my composite key as it only prints out _[{"Key":"_

markthedark (Thu, 04 Jan 2018 14:14:37 GMT):
aah, found the problem, the composite key is escaped with \000, which translates to byte zero, and does not print out. [{\"Key\":\"\000pacId~txID\0001234567\00043f978f4eb364c1089ec78236f04dcaf0d837cf6eef17f92237e2129a4680382\000\"

rickr (Thu, 04 Jan 2018 15:04:35 GMT):
fd [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=geWHnXCCxpuzuYbPZ) @diego88 https://github.com/hyperledger/fabric-sdk-java/blob/bf9491294e9c37ba16a81684102e81138e83755e/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L180 ?

asaningmaxchain (Thu, 04 Jan 2018 17:33:39 GMT):
@rickr i see the node sdk support the transaction event,the java sdk will support it in the future

jonweller (Fri, 05 Jan 2018 02:08:50 GMT):
Has joined the channel.

jonweller (Fri, 05 Jan 2018 02:28:03 GMT):
Hi... is there a way to generate the channel.tx file dynamically using the SDK? We are looking to dynamically create channels as needed.

markthedark (Fri, 05 Jan 2018 07:43:55 GMT):
@jonweller i think this piece of code shows the generation of a new channel https://github.com/hyperledger/fabric-sdk-java/blob/bf9491294e9c37ba16a81684102e81138e83755e/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L168

rickr (Fri, 05 Jan 2018 13:56:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PkXZfy6y5uPEq6TRw) @jonweller I don't think there really is currently. One approach that comes to mind is https://github.com/hyperledger/fabric-sdk-java/blob/bf9491294e9c37ba16a81684102e81138e83755e/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java This updates a channel if you had a _template_ you could continue to update it but I'm not sure if it will allow you to change the channel name. The other approach is possibly provide your own wrapper (maybe REST based) around _configtxgen_

rickr (Fri, 05 Jan 2018 13:56:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PkXZfy6y5uPEq6TRw) @jonweller I don't think there really is currently. One approach that comes to mind is https://github.com/hyperledger/fabric-sdk-java/blob/bf9491294e9c37ba16a81684102e81138e83755e/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java This updates a channel if you had a _template_ you could continue to update it but I'm not sure if it will allow you to change the channel name. The other approach is possibly provide your own wrapper (maybe REST based) around _configtxgen_ @jyellick ^^

rickr (Fri, 05 Jan 2018 13:56:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PkXZfy6y5uPEq6TRw) @jonweller I don't think there really is currently. One approach that comes to mind is https://github.com/hyperledger/fabric-sdk-java/blob/bf9491294e9c37ba16a81684102e81138e83755e/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java This updates a channel if you had a _template_ you could continue to update it but I'm not sure if it will allow you to change the channel name. The other approach is possibly provide your own wrapper (maybe REST based) around _configtxgen_ This would only work too I think if you could use the same crypto artifacts for the new channels you were creating; otherwise, you also need generate that too via `cryptogen` @jyellick ^^

rickr (Fri, 05 Jan 2018 14:17:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KKMNnvAqemBMjDmzC) @asaningmaxchain use blockevent then there's code to find the transactions in each.

asaningmaxchain (Fri, 05 Jan 2018 14:18:18 GMT):
@rickr i know the java chaincode support the block event,it's good

asaningmaxchain (Fri, 05 Jan 2018 14:18:46 GMT):
yesterday when i see the nodejs sdk,i find it supports the tx event ,so

hpurmann (Sat, 06 Jan 2018 15:17:27 GMT):
Has joined the channel.

hpurmann (Sat, 06 Jan 2018 18:27:25 GMT):
Wow, is it true that there is no published Documentation for the SDK? Is this being considered? Copy-pasting example code is not the way I want to be using a library.

hpurmann (Sat, 06 Jan 2018 18:27:25 GMT):
Wow, is it true that there is no published documentation for the SDK? Is this being considered? Copy-pasting example code is not the way I want to be using a library.

jonweller (Sun, 07 Jan 2018 02:49:40 GMT):
Thanks @markthedark& @rickr .... I've got a bit of an example working from both your suggestions.

ianbishop (Sun, 07 Jan 2018 16:56:30 GMT):
Has joined the channel.

rickr (Sun, 07 Jan 2018 17:31:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vArLHLnpo7BsAh33m) @hpurmann javadoc is produced if you feel there's more needed that the complete examples, javadoc and what's in the README.md .. Please open a JIRA and provide a gerrit patch set with the lacking materials

rickr (Sun, 07 Jan 2018 17:31:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vArLHLnpo7BsAh33m) @hpurmann javadoc is produced if you feel there's more needed than the complete examples, javadoc and what's in the README.md .. Please open a JIRA and provide a gerrit patch set with the lacking materials

hpurmann (Mon, 08 Jan 2018 12:13:44 GMT):
There is a javadoc? Where can I find it?

rickr (Mon, 08 Jan 2018 14:22:01 GMT):
http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0.1/fabric-sdk-java-1.0.1-javadoc.jar ?

rickr (Mon, 08 Jan 2018 14:22:01 GMT):
http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0.1/fabric-sdk-java-1.0.1-javadoc.jar ? Should be built to when you do mvn install if you add `javadoc:javadoc` target in `target/site/apidocs`

rickr (Mon, 08 Jan 2018 14:22:01 GMT):
http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.0.1/fabric-sdk-java-1.0.1-javadoc.jar ? Should be built too when you do mvn install if you add `javadoc:javadoc` target in `target/site/apidocs`

swettdj (Mon, 08 Jan 2018 15:42:46 GMT):
Excuse me, I would know of there is a way to check/get `UserContext` for a specific user

swettdj (Mon, 08 Jan 2018 15:42:50 GMT):
thanks

diego88 (Mon, 08 Jan 2018 20:46:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hTFvbrpPZp9vLqEBY) Hi, i'm still trying to generate an eCert in Java for the fabcar example (so for the basic-network). The code on the previous link is very messy for me and i really don't know where to start. Im trying to replicate the enrollAdmin.js and registerUser.js in Java. Thank you in advance for any tips!

RobertMiroballi (Mon, 08 Jan 2018 21:03:52 GMT):
Has joined the channel.

vijay5378 (Tue, 09 Jan 2018 03:41:36 GMT):
If I have a chaincode thats already deployed and running and I need to query the chaincode with a java application - do I need to enrol a new user for this purpose? The java application can be deployed on a mobile or a website - would it not be a very cumbersome process if every installation needs to be enrolled?

aceyin (Tue, 09 Jan 2018 06:48:52 GMT):
Has joined the channel.

aceyin (Tue, 09 Jan 2018 10:10:07 GMT):
What's the difference between *HFCAClient.register(RegistrationRequest request, User registrar)* and *HFCAClient.enroll(String user, String secret)* ?

italycappuccino (Tue, 09 Jan 2018 11:05:51 GMT):
Has joined the channel.

rickr (Tue, 09 Jan 2018 14:23:57 GMT):
Register creates the user identity and gives a password (aka secret) The registrar would give the user that information. After that presumably that user would `enroll` with his own private/public key pair to get a certificate needed to make requests. The `enroll` function will also generate the public/private keys for the user if they're not given.

rickr (Tue, 09 Jan 2018 14:30:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=97hKrf3sDDfmLryYe) @vijay5378 I can't answer that I don't know you're application. If your application can all use the same user identity then maybe not. If they can't I'd think you would need each mobile /website to have the admin/registrar create their own ID via HFCAClient.register and they have them enroll to persist the certificate and keys.

rickr (Tue, 09 Jan 2018 14:59:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wN6aPMtkNNvWDGQTm) @diego88 Did I miss understand what you're looking for ? I assume you're looking to get a signed certificate from the CA (ecert) From the code rather obvious it first registers a user if needed. The looks if enrolled ( need a certificate from the CA). Does a ca.enroll(..) with user name and secret (gotten from the register) That returns from the CA a HCAEnrollment. The HCAEnrollement.getCert() returns a CA signed certificate in PEM format.

swettdj (Tue, 09 Jan 2018 15:19:05 GMT):
I'm followed the https://hyperledger-fabric.readthedocs.io/en/release/write_first_app.html guide trying to translate the Node code into Java code. I can enroll the admin, register the user and query the blockchain. Now I'm trying to upgrade the chaincode but when I send `InstallProposalRequest` I receive the following error: ```chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))```

asaningmaxchain (Tue, 09 Jan 2018 15:23:36 GMT):
please you the admin msp to operate it

asaningmaxchain (Tue, 09 Jan 2018 15:23:36 GMT):
please use admin msp to operate it

swettdj (Tue, 09 Jan 2018 15:46:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ahBLMgsR6YJrYTy8z) @asaningmaxchain Are you talking with me? If yes, could you please explain? Thanks

asaningmaxchain (Tue, 09 Jan 2018 15:46:43 GMT):
the log information is enough

swettdj (Tue, 09 Jan 2018 15:48:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Ny2wRwYCFqzBADFde) @asaningmaxchain Yes, but what do you mean with "please you the admin msp to operate it" ?

asaningmaxchain (Tue, 09 Jan 2018 15:48:48 GMT):
i modify my message

swettdj (Tue, 09 Jan 2018 15:51:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HuSJCW8R2czJqspwM) @asaningmaxchain Ok, but the "admin" user that I enrolled is the admin msp, or not? Excuse me but I'm triyng to understand

rickr (Tue, 09 Jan 2018 16:05:31 GMT):
Needs to be the peer Admin this is user created in the End2endIT.java here: https://github.com/hyperledger/fabric-sdk-java/blob/c4957fdca7dd935b3b6049decebcede9b5371105/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L202

embrown-ibm (Tue, 09 Jan 2018 18:32:12 GMT):
Has joined the channel.

embrown-ibm (Tue, 09 Jan 2018 18:43:41 GMT):
I am attempting to write an app to *instantiate* chaincode using the `End2EndIT.java` as a guide. Instead of passing an _endorsement policy_, I chose to just take the default. The problem I'm having is that when I send the instantiation proposals to my peers, I continually get errors. Responses are failing because they are not being verified. I have no idea what the cause could be, does anyone have any suggestions? Thanx and C-ya!!!

rickr (Tue, 09 Jan 2018 18:48:30 GMT):
Have you tried using the same one as the End2endIT uses ? does it fail too? The end2end if very liberal :) I think, the default is majority of admins

rickr (Tue, 09 Jan 2018 18:48:30 GMT):
Have you tried using the same one as the End2endIT uses ? does it fail too? The end2end is very liberal :) I think, the default is majority of admins

embrown-ibm (Tue, 09 Jan 2018 18:53:33 GMT):
I have not attempted to using the `*.yaml` files from End2End

embrown-ibm (Tue, 09 Jan 2018 18:53:33 GMT):
I have not attempted to using the `*.yaml` files from End2End, I'll give that a try.

embrown-ibm (Tue, 09 Jan 2018 19:13:50 GMT):
I just attempted using the `*chaincodeendoresementpolicy.yaml` file used by End2endIT and I get the same failure. An *ExecutionException* is thrown containing the following message... ```io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: chaincode instantiation policy violated(Failed to authenticate policy))```

rickr (Tue, 09 Jan 2018 20:05:40 GMT):
did you different mspid ?

rickr (Tue, 09 Jan 2018 20:05:40 GMT):
did you have a different mspid ?

diego88 (Tue, 09 Jan 2018 20:47:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ApNaqMCnM9wzgTCyd) @rickr My problem is that i can't understand the SampleOrg, SampleUser, SampleStore, TestConfig connections....id like to do something more easy even if is ugly, i mean in a sequence

mprasad25 (Wed, 10 Jan 2018 05:27:26 GMT):
Has joined the channel.

zerppen (Wed, 10 Jan 2018 07:56:04 GMT):
I got a problem when I constructed `channel` for all `orgs' peers can join`.You know End2endIT.java is different from end_to_end_test.go of goSDK,it constructs new channel only present org peers can join.So,i used `configtxgen` made a new genesis.block and mychannel.tx.Then I tried construct new channel for all peers all orgs.but got this error message

zerppen (Wed, 10 Jan 2018 07:56:58 GMT):

channelError.jpeg

rickr (Wed, 10 Jan 2018 14:43:00 GMT):
Hard to tell. Best if you can go into a debugger put a BP right where the error is happening. Go to fabric console where debug msg are being output. Do a couple of enters to mark the spot or clear the terminal. Then single step on the client across this error. On fabric console you should have only what lead up to this error.

asaningmaxchain (Wed, 10 Jan 2018 15:45:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pGoEpg95tcB8Jp46N) @zerppen TLS?

ryokawajp (Thu, 11 Jan 2018 04:38:30 GMT):
Hi. I used SDKUtils.getProposalConsistencySets() to check the consistency of the endorsements from peers in order to avoid Byzantine failure. However, I observed that there is a case that it overlooks non-consistent responses which is caused by a direct modification of DB. I described the detail in a JIRA https://jira.hyperledger.org/browse/FAB-7693

ryokawajp (Thu, 11 Jan 2018 04:40:28 GMT):
Any comments are welcome. But is this a bug or an expected behavior? I am not sure getProposalConsistencySets() is provided for this purpose, or I need to use a different function to check it.

ryokawajp (Thu, 11 Jan 2018 04:43:00 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tgMXxLJF6EKQ3HX9Q I found a similar discussion in a log.

duwenhui (Thu, 11 Jan 2018 04:43:02 GMT):
After java sdk collecting the endorsment, invoke _channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS); to orderer, happened out of time error orderer show logs below, I guess about "Ignoring stale time-to-cut-message for block 。". Version: fabric 1.0.0, After run 7 hours,the bug occourd,befor it, everythine is ok,can someone solved this problem? {"log":"\u001b[36m2018-01-11 03:45:42.526 UTC [fsblkstorage] indexBlock -\u003e DEBU ab9\u001b[0m Indexing block [blockNum=519924, blockHash=[]byte{0xc9, 0xa6, 0xea, 0x7e, 0x41, 0x9c, 0x24, 0x97, 0x6c, 0xa0, 0x8b, 0x79, 0x9f, 0x9, 0x31, 0xf6, 0xbe, 0x39, 0xf4, 0x5d, 0xc5, 0xc2, 0x3d, 0x71, 0xef, 0x6e, 0xe7, 0x6b, 0x41, 0x3d, 0xa6, 0x95} txOffsets=\n","stream":"stderr","time":"2018-01-11T03:45:42.527018114Z"} {"log":"txId=f814688bc1ff46031cab9ee6de623bea50f7b67216544c446e343e1a213c36c7 locPointer=offset=72, bytesLength=5004\n","stream":"stderr","time":"2018-01-11T03:45:42.527097784Z"} {"log":"]\n","stream":"stderr","time":"2018-01-11T03:45:42.527127607Z"} {"log":"\u001b[36m2018-01-11 03:45:42.526 UTC [fsblkstorage] updateCheckpoint -\u003e DEBU aba\u001b[0m Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[66], latestFileChunksize=[30873016], isChainEmpty=[false], lastBlockNumber=[519924]\n","stream":"stderr","time":"2018-01-11T03:45:42.527133387Z"} {"log":"\u001b[36m2018-01-11 03:45:42.526 UTC [orderer/multichain] WriteBlock -\u003e DEBU abb\u001b[0m [channel: cbca] Wrote block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527137396Z"} {"log":"\u001b[36m2018-01-11 03:45:42.526 UTC [orderer/kafka] processTimeToCut -\u003e DEBU abc\u001b[0m [channel: cbca] Proper time-to-cut received, just cut block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527143398Z"} {"log":"\u001b[36m2018-01-11 03:45:42.526 UTC [orderer/kafka] processMessagesToBlocks -\u003e DEBU abd\u001b[0m [channel: cbca] Successfully unmarshalled consumed message, offset is 1895887. Inspecting type...\n","stream":"stderr","time":"2018-01-11T03:45:42.527154602Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU abe\u001b[0m [channel: cbca] It's a time-to-cut message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527158414Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU abf\u001b[0m [channel: cbca] Ignoring stale time-to-cut-message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527162223Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processMessagesToBlocks -\u003e DEBU ac0\u001b[0m [channel: cbca] Successfully unmarshalled consumed message, offset is 1895888. Inspecting type...\n","stream":"stderr","time":"2018-01-11T03:45:42.527165907Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU ac1\u001b[0m [channel: cbca] It's a time-to-cut message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527169167Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU ac2\u001b[0m [channel: cbca] Ignoring stale time-to-cut-message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527172301Z"} {"log":"\u001b[36m2018-01-11 03:46:01.122 UTC [grpc] Printf -\u003e DEBU ac3\u001b[0m grpc: Server.Serve failed to complete security handshake from \"127.0.0.1:41212\": EOF\n","stream":"stderr","time":"2018-01-11T03:46:01.12252874Z"} {"log":"\u001b[36m2018-01-11 03:46:14.214 UTC [grpc] Printf -\u003e DEBU ac4\u001b[0m grpc: Server.Serve failed to complete security handshake from \"47.95.252.108:37790\": EOF\n","stream":"stderr","time":"2018-01-11T03:46:14.214805542Z"}

ryokawajp (Thu, 11 Jan 2018 04:57:24 GMT):
@duwenhui Just FYI. https://jira.hyperledger.org/browse/FAB-5709 Orderer of v1.0.0 has a bug in cutting a block caused by the number of transactions or by the size of transactions in a block exceeding a threshold (i.e., not the case of Time-To-Cut). According to the JIRA item, this issue is fixed in v1.0.2. I am not sure this is related to the time out you observed.

baoyangc (Thu, 11 Jan 2018 05:03:23 GMT):
Has joined the channel.

baoyangc (Thu, 11 Jan 2018 05:05:21 GMT):
``` {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU abe\u001b[0m [channel: cbca] It's a time-to-cut message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527158414Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU abf\u001b[0m [channel: cbca] Ignoring stale time-to-cut-message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527162223Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processMessagesToBlocks -\u003e DEBU ac0\u001b[0m [channel: cbca] Successfully unmarshalled consumed message, offset is 1895888. Inspecting type...\n","stream":"stderr","time":"2018-01-11T03:45:42.527165907Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU ac1\u001b[0m [channel: cbca] It's a time-to-cut message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527169167Z"} {"log":"\u001b[36m2018-01-11 03:45:42.527 UTC [orderer/kafka] processTimeToCut -\u003e DEBU ac2\u001b[0m [channel: cbca] Ignoring stale time-to-cut-message for block 519924\n","stream":"stderr","time":"2018-01-11T03:45:42.527172301Z"} {"log":"\u001b[36m2018-01-11 03:46:01.122 UTC [grpc] Printf -\u003e DEBU ac3\u001b[0m grpc: Server.Serve failed to complete security handshake from \"127.0.0.1:41212\": EOF\n","stream":"stderr","time":"2018-01-11T03:46:01.12252874Z"} {"log":"\u001b[36m2018-01-11 03:46:14.214 UTC [grpc] Printf -\u003e DEBU ac4\u001b[0m grpc: Server.Serve failed to complete security handshake from \"47.95.252.108:37790\": EOF\n","stream":"stderr","time":"2018-01-11T03:46:14.214805542Z"} ```

duwenhui (Thu, 11 Jan 2018 05:12:57 GMT):
@ryokawajp Thanks for your reply, Do you know that 1.0.2 is compatible with version 1.0.0 completely? If so, I just upgraded to the next version 1.0.2 and verify.

ryokawajp (Thu, 11 Jan 2018 08:32:57 GMT):
@duwenhui I do not know very well about the compatibility. AFAIK, 1.0.2 is a bug fix release. A chaincode for v1.0.0 is compatible. For clients, fabric-sdk-java v1.0.1 have been released and this one is compatible with Fabric v1.0.2. For replacing Fabric in an existing network, I only have an experience of the case from v1.0.0 to v1.0.1 and it worked fine. However, channel artifacts files created by configtxgen tool are not compatible. When you create a new channel in v1.0.1, you need to re-create channel artifacts files.

krisava (Thu, 11 Jan 2018 22:50:18 GMT):
Has joined the channel.

krisava (Thu, 11 Jan 2018 22:58:13 GMT):
Hi, I am going through on integrating the Chaincode deployed on the "Blockchain instance on IBM cloud" with the "java application sdk". I found few examples, struggling with the user certs/keys to construct the "User/SimpleUser" to get the connectivity to the channel/chaincode. In the "Blockchain instance on IBM cloud", I see the "credentials json" which got various certs for each peer/orders/ca's. So I got confused which one to use, as I see in couple of examples it was mentioned as "xxxx.priv" and I don't see that in that "credentials json". Any help in constructing the "user" and assigning to the "client.setUserContext(user)" is much appreciated. Thanks!

rickr (Thu, 11 Jan 2018 23:31:02 GMT):
https://github.com/IBM-Blockchain/JSDKIntegrationSample

rickr (Thu, 11 Jan 2018 23:31:02 GMT):
https://github.com/IBM-Blockchain/JSDKIntegrationSample I created but not keep it update date was told someone from IBM will. maybe it will help

rickr (Thu, 11 Jan 2018 23:31:02 GMT):
https://github.com/IBM-Blockchain/JSDKIntegrationSample I created but not keep it update date was told someone from IBM will. maybe it will help You should probably post issue questions there.

rickr (Thu, 11 Jan 2018 23:31:02 GMT):
https://github.com/IBM-Blockchain/JSDKIntegrationSample I created but not keeping it updated. Was told someone from IBM will. maybe it will help You should probably post issue questions there.

krisava (Thu, 11 Jan 2018 23:36:02 GMT):
thanks!

zerppen (Fri, 12 Jan 2018 09:13:41 GMT):
thanks for replying @rickr my purpose is to create a channel for all peers of different orgs joining.Absolutely `End2endIT.java` is good,but in that way created channel only peers of present organization can join.

ancythomas (Fri, 12 Jan 2018 11:14:36 GMT):
Has joined the channel.

ancythomas (Fri, 12 Jan 2018 11:23:30 GMT):
Hi, I have noticed 2 issues while trying to upgrade chaincode using Java SDK, 1.I have not installed/instantiated the chaincode, and I try to upgrade the chaincode, it is giving me the error message as "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here, my chaincode name was "Test123", and I have set it correctly. The channel name is "kafkachannel". This is not meaningful as the chaincode name is not "kafkachannel". 2.I have installed the chaincode,but I haven't instantiated the chaincode, and then I try to upgrade the chaincode, it is giving me the same error as earlier: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here also the chaincode name is not meaningful, Moroever, there is no distinction between the Upgradation errors from Fabric, whether the chaincode is not installed/instantiated? Can someone please look into this and help me out? [I am able to upgrade the chaincode after doing the foll:installing and instantiating the chaincode, then again installing with a diff version.]

ancythomas (Fri, 12 Jan 2018 11:23:30 GMT):
Hi, I have noticed 2 issues while trying to upgrade chaincode using Java SDK, 1.I have not installed/instantiated the chaincode, and I try to upgrade the chaincode, it is giving me the error message as "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name *'kafkachannel'*), cause=null}" Here, my chaincode name was *"Test123"*, and I have set it correctly. The channel name is *"kafkachannel"*. This is not meaningful as the chaincode name is not "kafkachannel". 2.I have installed the chaincode,but I haven't instantiated the chaincode, and then I try to upgrade the chaincode, it is giving me the same error as earlier: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here also the chaincode name is not meaningful, Moroever, there is no distinction between the Upgradation errors from Fabric, whether the chaincode is not installed/instantiated? Can someone please look into this and help me out? [I am able to upgrade the chaincode after doing the foll:installing and instantiating the chaincode, then again installing with a diff version.]

ancythomas (Fri, 12 Jan 2018 11:23:30 GMT):
Hi, I have noticed 2 issues while trying to upgrade chaincode using Java SDK, 1.I have not installed/instantiated the chaincode, and I try to upgrade the chaincode, it is giving me the error message as "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name *'kafkachannel'*), cause=null}" Here, my chaincode name was *"Test123"*, and I have set it correctly. The channel name is *"kafkachannel"*. This is not meaningful as the chaincode name is not "kafkachannel". 2.I have installed the chaincode,but I haven't instantiated the chaincode, and then I try to upgrade the chaincode, it is giving me the same error as earlier: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here also the chaincode name is not meaningful, Moroever,* there is no distinction between the Upgradation errors from Fabric, whether the chaincode is not installed/instantiated*?? Can someone please look into this and help me out? [I am able to upgrade the chaincode after doing the foll:installing and instantiating the chaincode, then again installing with a diff version.]

ancythomas (Fri, 12 Jan 2018 11:23:30 GMT):
Hi, I have noticed 2 issues while trying to upgrade chaincode using Java SDK, 1.I *have not installed/instantiated *the chaincode, and I try to *upgrade* the chaincode, it is giving me the *error message* as "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name *'kafkachannel'*), cause=null}" Here, my chaincode name was *"Test123"*, and I have set it correctly. The channel name is *"kafkachannel"*. This is not meaningful as the chaincode name is not "kafkachannel". 2.I have *installed* the chaincode,but I *haven't instantiated *the chaincode, and then I try to *upgrade* the chaincode, it is giving me the *same error *as earlier: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here also the chaincode name is not meaningful, Moroever,* there is no distinction between the Upgradation errors from Fabric, whether the chaincode is not installed/instantiated*?? Can someone please look into this and help me out? [I am able to upgrade the chaincode after doing the foll:installing and instantiating the chaincode, then again installing with a diff version.]

ancythomas (Fri, 12 Jan 2018 11:23:30 GMT):
Hi, I have noticed 2 issues while trying to upgrade chaincode using Java SDK, 1.I *have not installed/instantiated *the chaincode, and I try to *upgrade* the chaincode, it is giving me the *error message* as "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name *'kafkachannel'*), cause=null}" Here, my chaincode name was *"Test123"*, and I have set it correctly. The channel name is *"kafkachannel"*. This is not meaningful as the chaincode name is not "kafkachannel". 2.I have *installed* the chaincode,but I *haven't instantiated *the chaincode, and then I try to *upgrade* the chaincode, it is giving me the *same error *as earlier: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here also the chaincode name is not meaningful, Moroever,*there is no distinction between the Upgradation errors from Fabric, whether the chaincode is not installed/instantiated??* Can someone please look into this and help me out? [I am able to upgrade the chaincode after doing the foll:installing and instantiating the chaincode, then again installing with a diff version.]

ancythomas (Fri, 12 Jan 2018 11:23:30 GMT):
Hi, I have noticed 2 issues while trying to upgrade chaincode using Java SDK, 1.I *have not installed/instantiated *the chaincode, and I try to *upgrade* the chaincode, it is giving me the *error message* as "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name *'kafkachannel'*), cause=null}" Here, my chaincode name was *"Test123"*, and I have set it correctly. The channel name is *"kafkachannel"*. This is not meaningful as the chaincode name is not "kafkachannel". 2.I have *installed* the chaincode,but I *haven't instantiated *the chaincode, and then I try to *upgrade* the chaincode, it is giving me the *same error *as earlier: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name 'kafkachannel'), cause=null}" Here also the chaincode name is not meaningful, Moroever, *there is no distinction between the Upgradation errors from Fabric*, *whether the chaincode is not installed/instantiated??* Can someone please look into this and help me out? [I am able to upgrade the chaincode after doing the foll:installing and instantiating the chaincode, then again installing with a diff version.]

ancythomas (Fri, 12 Jan 2018 11:25:32 GMT):

Clipboard - January 12, 2018 4:55 PM

ancythomas (Fri, 12 Jan 2018 11:26:40 GMT):

Clipboard - January 12, 2018 4:56 PM

ancythomas (Fri, 12 Jan 2018 11:53:26 GMT):

Clipboard - January 12, 2018 5:23 PM

rickr (Fri, 12 Jan 2018 15:28:04 GMT):
@ancythomas Have you tried diagnosing the issue ? Turned on logging both SDK and on Fabric ( see README.md) did it give you any insight ? Best technique if you can is set a break point in debugger right before the api that has the issue, clear or do a enters to know in the logging output where the command started. Then put a break point right after and do a run. Should show you only logging for that api.

rickr (Fri, 12 Jan 2018 15:28:04 GMT):
@ancythomas Have you tried diagnosing the issue ? Turned on logging both SDK and on Fabric ( see README.md) did it give you any insight ? Best technique if you can is set a break point in debugger right before the api that has the issue, clear or do a enters on console with logging for both client and fabric to know in the logging output where the command started. Then put a break point right after and do a run. Should show you only logging for that api.

nagarajants (Fri, 12 Jan 2018 19:12:01 GMT):
Has joined the channel.

nagarajants (Fri, 12 Jan 2018 19:12:13 GMT):
what are the pros and cons of using fabric-sdk-node vs fabric-sdk-java

praveentalari (Sat, 13 Jan 2018 04:55:19 GMT):
even I have that doubt. With the introduction of fabric composer and the support of only javascript chaincode , I wonder if there will be updates for fabric-sdk-java. I think going forward only composer and js chaincode will be supported.

silliman (Sat, 13 Jan 2018 19:54:55 GMT):
@praveentalari the languages supported by SDKs for apps calling chaincode are decoupled from the languages that chaincode themselves run in. So, e.g., the fact that java chaincode is not currently enabled is irrelevant to the future of the java SDK. Additionally, since the core of Hyperledger Fabric is written in Go, I find it highly unlikely that Chaincode in Go would not continue to be supported for the foreseeable future.

diego88 (Sun, 14 Jan 2018 03:41:37 GMT):
Hi, i have a question. On the sdk there is a file called TestConfig.java. Inside there are some properties like String INTEGRATIONTESTS_ORG =org.hyperledger.fabric.sdktest.integrationtests.org. and some default properties like: defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.mspid", "Org2MSP"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.domname", "org2.example.com"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.ca_location", "http://localhost:8054"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.peer_locations", "peer0.org2.example.com@grpc://localhost:8051,peer1.org2.example.com@grpc://localhost:8056"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.orderer_locations", "orderer.example.com@grpc://localhost:7050"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.eventhub_locations", "peer0.org2.example.com@grpc://localhost:8053, peer1.org2.example.com@grpc://localhost:8058"); if i try to run the network with the example i have no issues, but if i run my own network how i have to modify these integrationtest_org?

ascatox (Mon, 15 Jan 2018 12:12:21 GMT):
Hi All!! I've a problem. I'm using the version 1.0.1 using maven Repo to retrieve the library. In the maven version under the class `Channel` I can't find the method ` public String registerChaincodeEventListener(Pattern chaincodeId, Pattern eventName, ChaincodeEventListener chaincodeEventListener) throws InvalidArgumentException `, correctly present in the source coming from Github.

ascatox (Mon, 15 Jan 2018 12:12:21 GMT):
Hi All!! I've a problem. I'm using the version 1.0.1 using maven Repo to retrieve the library. In the maven version under the class `Channel` I can't find the method ` public String registerChaincodeEventListener(Pattern chaincodeId, Pattern eventName, ChaincodeEventListener chaincodeEventListener) throws InvalidArgumentException `, correctly present instead the source code coming from Github.

patilmahesh0008 (Mon, 15 Jan 2018 13:04:54 GMT):
Has joined the channel.

rickr (Mon, 15 Jan 2018 14:54:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Ar4EDmDXMu2Srng5C) @diego88 TestConfig.java Sample* Are not part of the SDK. While the integration test show how to use the SDK they are also our tests and we need to test with multiple orgs peers etc. I really wouldn't expect anyone building an actual application would use these verbatim. If you're just trying to run against a different network that has all these defined EXACTLY like sdk has done then yes you would mostly need to make changes in TestConfig.java

ascatox (Mon, 15 Jan 2018 15:03:31 GMT):
Hi All! I'm encountering this error. I'm using a peer Admin registered and enrolled using the fabric CA. `chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])), cause=null}`

ascatox (Mon, 15 Jan 2018 15:03:31 GMT):
Hi All! I'm encountering this error. I'm using a peer Admin registered and enrolled using the fabric CA to install a chaincode using the java api. `chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin])), cause=null}`

ascatox (Mon, 15 Jan 2018 15:03:45 GMT):
someone knows this error???

rickr (Mon, 15 Jan 2018 15:10:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MZKnJ8u7R8mSLEH6g) @ascatox I don't think that was in v1.0.1 .. It should be in SNAPSHOT builds

rickr (Mon, 15 Jan 2018 15:11:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=C2nRHtWEpWBP9JFSR) @ascatox Common error here is using the wrong MSPID for the user

michael_aR (Mon, 15 Jan 2018 15:20:20 GMT):
I'm running my own network and not the example domainnames and now i get `org.hyperledger.fabric.sdk.exception.TransactionException: New channel foo error. StatusValue 400. Status BAD_REQUEST`

michael_aR (Mon, 15 Jan 2018 15:21:36 GMT):
docker logs shows `orderer.de.xxxx.net | 2018-01-15 13:40:25.390 UTC [cauthdsl] func2 -> ERRO 1ac Principal deserialization failure (The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority`

michael_aR (Mon, 15 Jan 2018 15:22:44 GMT):
i created my own cryptoconfig stuff and was using fabric.sh functions to clean and run the orchestration

asaningmaxchain (Mon, 15 Jan 2018 16:47:09 GMT):
@rickr do you test the multi orderer?

asaningmaxchain (Mon, 15 Jan 2018 16:51:08 GMT):
i start the fabric with multi orderer, and i use the java sdk to operate it,when i use the orderer0 to create/join channel,install /initialize chaincode and invoke is ok,but when i use the orderer1 to operate it,it can't invoke,i don't know it's the java sdk issue,or the fabric orderer issue

asaningmaxchain (Mon, 15 Jan 2018 16:51:08 GMT):
i start the fabric with multi orderer, and i use the java sdk to operate it,when i use the orderer0 to create/join channel,install /initialize chaincode and invoke is ok,but when i use the orderer1 to operate it,it can't invoke,i don't know it's the java sdk issue,or the fabric orderer issue,i see the orderer log,it does work,however the sdk is running

ancythomas (Tue, 16 Jan 2018 05:30:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Kwp3vLFZHAf4fsALa) @rickr The issue is when I am trying to upgrade chaincode using *sendUpgradeProposal()* The issues are:- 1. *The response from Fabric SDK is same , even if the chaincode is not installed/instantiated.* This does not give a proper message to the User.(it could be different to emphasise the exact reason for failure, as "not installed" when it is not installed and "not instantiated" when it is not instantiated) 2. The response from Fabric in both the cases is as: "Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: could not find chaincode with name *'kafkachannel'*), cause=null}" Here the chaincode name is wrongly referrring to the channel name. It should have been _could not find chaincode with name *'Test123'*_

rickr (Tue, 16 Jan 2018 13:48:18 GMT):
@ancythomas The SDK only returns the messages it's given. You need to open up a JIRA against the Fabric peer component for them to give better error messages

bmalavan (Tue, 16 Jan 2018 15:03:11 GMT):
Anyone tested java sdk application in sparc-solaris platform?

bmalavan (Tue, 16 Jan 2018 15:37:51 GMT):
has anyone using the fabric-sdk-java ran into the "Jetty ALPN/NPN has not been properly configured?

bmalavan (Tue, 16 Jan 2018 15:38:04 GMT):
I am getting this issue in solaris 10 sparc

bmalavan (Tue, 16 Jan 2018 15:43:18 GMT):
my application is Springboot

bmalavan (Tue, 16 Jan 2018 15:43:49 GMT):
surprisingly, there is no error when the same build running on Ubunt 16.04

zafartm (Tue, 16 Jan 2018 17:21:00 GMT):
Has joined the channel.

rickr (Wed, 17 Jan 2018 13:18:03 GMT):
I think TLS is one of the more platform specific feature by use of GRPC . There are two choices tcnative-boringssl which is the preferred choice and ALPN. I have no experience on getting it working on Solaris platform

rickr (Wed, 17 Jan 2018 13:18:03 GMT):
I think TLS is one of the more platform specific feature by use of GRPC . There are two choices tcnative-boringssl which is the preferred choice and ALPN. I have no experience on getting it working on Solaris platform There are GRP forums https://groups.google.com/forum/#!forum/grpc-io you search for solutions or ask questions

SharanRajani (Wed, 17 Jan 2018 13:50:58 GMT):
Has joined the channel.

SharanRajani (Wed, 17 Jan 2018 13:52:05 GMT):
Environment JAVA, BLOCKCHAIN, HYPERLEDGER FABRIC, Linux Mint, CMD How to repeat the problem? Run the network, register the program, Test the URL from SOAP UI - HTTP:\LOCALHOST:7050\ Other Information Hi All – We are trying to implement Blockchain program using one of the sample program (SimpleSample.JAVA) listed out in the below link. We are able to setup the environment to execute the program in Linux Mint operating system. But, when we test it from SOAPUI with URL http:\localhost:7050 with HTTP METHOD GET/POST, we get an error saying ‘- ERROR GETTING RESPONSE; ORG.APACHE.HTTP.NOHTTPRESPONSEEXCEPTION: THE TARGET SERVER FAILED TO RESPOND’. Need your inputs on how this can be rectified to run the Blockchain program? The Blockchain program is successfully registered with the Docker. We got stuck post trying from the URL. Linked followed for the implementation: https://www.ibm.com/developerworks/library/j-chaincode-for-java-developers/index.html File – SIMPLESAMPLE.JAVA

rickr (Wed, 17 Jan 2018 14:26:57 GMT):
@SharanRajani "How to write chaincode for Hyperledger Fabric v0.6" I don't think you're going to much support/help for v0.6 which is entirely different from v1.0

rickr (Wed, 17 Jan 2018 14:26:57 GMT):
@SharanRajani "How to write chaincode for Hyperledger Fabric v0.6" I don't think you're going to get much support/help for v0.6 which is entirely different from v1.0

ascatox (Wed, 17 Jan 2018 15:43:27 GMT):
Hi All! Is it possible to use TLS with orderer and peers in the 1.0.1 version of SDK ?

daygee (Wed, 17 Jan 2018 16:21:43 GMT):
Hello guys

daygee (Wed, 17 Jan 2018 16:22:23 GMT):
So I have been trying to build an application, using the fabric java-sdk

daygee (Wed, 17 Jan 2018 16:23:01 GMT):
but the unit tests fail when they get to the point of invoking chaincode

daygee (Wed, 17 Jan 2018 16:24:20 GMT):
the error is timeout

daygee (Wed, 17 Jan 2018 16:26:46 GMT):

Clipboard - January 17, 2018 5:26 PM

daygee (Wed, 17 Jan 2018 16:29:24 GMT):

Clipboard - January 17, 2018 5:28 PM

daygee (Wed, 17 Jan 2018 16:30:27 GMT):
any help would be really appreciated because I can't move forward without resolving this

rickr (Wed, 17 Jan 2018 16:49:37 GMT):
Each running CC produces docker instances .. try using docker log command to see if there is any more information. This is a peer endorser issue and you're more likely to find answers in #fabric-peer-endorser-committer channel

rickr (Wed, 17 Jan 2018 16:49:37 GMT):
Each running CC produces docker instances .. try using docker log command to see if there is any more information. This is a peer endorser / CC issue and you're more likely to find answers in #fabric-peer-endorser-committer channel

rickr (Wed, 17 Jan 2018 16:50:50 GMT):
@ascatox our CI verify and merge builds are always run with TLS enabled.

SharanRajani (Wed, 17 Jan 2018 18:43:55 GMT):
@rickr Thanks Alot!

bmalavan (Thu, 18 Jan 2018 04:47:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7yD8xi8Ji5WvYxa2f) @rickr Thanks. What is the other choice other than tcnative-boringssl?

Devender_Singh (Thu, 18 Jan 2018 05:16:56 GMT):
Has joined the channel.

james3443112 (Thu, 18 Jan 2018 06:51:13 GMT):
Has joined the channel.

nodrunkdriving (Thu, 18 Jan 2018 07:01:47 GMT):
Has joined the channel.

nodrunkdriving (Thu, 18 Jan 2018 07:05:59 GMT):
Hello guys who know this error

nodrunkdriving (Thu, 18 Jan 2018 07:06:18 GMT):
org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel sendDeliver failed on orderer orderer.example.com. Reason: INTERNAL at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:295) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:172) at org.hyperledger.fabric.sdk.Channel.seekBlock(Channel.java:1198) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1274) at org.hyperledger.fabric.sdk.Channel.getLastConfigIndex(Channel.java:1097) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:1028) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:949) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:676) at SimpleChaincode.main(SimpleChaincode.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: io.grpc.StatusRuntimeException: INTERNAL at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:380) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:419) at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:60)

nodrunkdriving (Thu, 18 Jan 2018 07:06:31 GMT):
And order log

nodrunkdriving (Thu, 18 Jan 2018 07:06:32 GMT):
grpc: Server.Serve failed to complete security handshake from "10.169.1.17:54989": tls: first record does not look like a TLS handshake

Manish.Sharma (Thu, 18 Jan 2018 09:13:22 GMT):
Has joined the channel.

daygee (Thu, 18 Jan 2018 09:30:21 GMT):
@rickr thanks, will go to the channel

Ashish (Thu, 18 Jan 2018 10:22:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7yD8xi8Ji5WvYxa2f) @rickr What is the version of the Netty and netty-tcnative-boringssl-static you have right now ?

Ashish (Thu, 18 Jan 2018 10:22:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7yD8xi8Ji5WvYxa2f) @rickr **What is the version of the Netty and netty-tcnative-boringssl-static you have right now ?**

Ashish (Thu, 18 Jan 2018 10:25:12 GMT):
for 1.0.1, i was using netty jars of 4.1.8 and the netty-tcnative-boringssl-static-1.1.33.Fork26. They used to work just fine as long as i was deploying in a Tomcat 7.0 version. but they stopped working once I changed my tomcat to 8.5. [ Tried upgrading the netty to 4.1.19 and the netty-tcnative-boringssl-static-to v2.0.7 . But still no luck Can you give some pointers. ?

Ashish (Thu, 18 Jan 2018 10:25:12 GMT):
for SDK v1.0.1, i was using netty jars of 4.1.8 and the netty-tcnative-boringssl-static-1.1.33.Fork26. They used to work just fine as long as i was deploying in a Tomcat 7.0 version. but they stopped working once I changed my tomcat to 8.5. [ Tried upgrading the netty to 4.1.19 and the netty-tcnative-boringssl-static-to v2.0.7 . But still no luck Can you give some pointers. ?

bmalavan (Thu, 18 Jan 2018 11:18:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Eiobd3mp9LMEqDdMZ) @Ashish Believe the question is for me. 2.0.5.Final

Ashish (Thu, 18 Jan 2018 11:48:07 GMT):
@bmalavan Thanks. I guess they are corresponding to the javasdk version 1.1.Snapshot?

bmalavan (Thu, 18 Jan 2018 11:49:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=odiGsDXYbg9L3tHs9) @Ashish No, I have not upgrade to 1.1 yet. Still I am using 1.0.1

Ashish (Thu, 18 Jan 2018 11:51:00 GMT):
Ohkay. That's perfect for me. Would it be possible to get the Maven pom.xml or relevant excerpt of it?

bmalavan (Thu, 18 Jan 2018 12:16:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eeen9qMMciKfB3EMx) @Ashish DM ed the gradle dependencies output

ascatox (Thu, 18 Jan 2018 14:24:04 GMT):
Hi!!! I'm using the End2EndIT someone has an example with the network configured with this file `src/test/java/org/hyperledger/fabric/sdk/testutils.properties``

ascatox (Thu, 18 Jan 2018 14:24:10 GMT):
Thanks!!!

ascatox (Thu, 18 Jan 2018 15:00:25 GMT):
Hi All Someone knows the meaning of this error? `Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=Failed to deserialize creator identity, err MSP Org1MSP is unknown, cause=null``

rickr (Thu, 18 Jan 2018 15:03:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Eiobd3mp9LMEqDdMZ) @Ashish Depends on what level of the SDK you have. Should be in pom.xml

rickr (Thu, 18 Jan 2018 15:04:12 GMT):
@nodrunkdriving Looks like you're connecting non-tls to tls

rickr (Thu, 18 Jan 2018 15:06:08 GMT):
@ascatox Looks like your using a user with an unexpected mspid

ascatox (Thu, 18 Jan 2018 15:07:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gLhJFLPFzhGYc6LHG) @rickr Thank you for the help! I try to investigate but this sounds very strange.

ascatox (Thu, 18 Jan 2018 15:07:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=As9W5csEnGFF28vrq) @rickr Thank you for the help! I try to investigate but this sounds very strange.

Ashish (Thu, 18 Jan 2018 15:28:10 GMT):
I had 1.0.1, but I had tampered with the pom a bit, which had resulted in old dependencies. Now reverted everything, got the 2.0.5.Final as mentioned above. Will try the tomcat 8.5 with the original set of libraries. My bad :(

Ashish (Thu, 18 Jan 2018 15:28:10 GMT):
@rickr I had 1.0.1, but I had tampered with the pom a bit, which had resulted in old dependencies. Now reverted everything, got the 2.0.5.Final as mentioned above. Will try the tomcat 8.5 with the original set of libraries. My bad :(

rickr (Thu, 18 Jan 2018 16:01:24 GMT):
All published version of what use is also recorded in maven repo https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java

ibmamnt (Fri, 19 Jan 2018 04:16:18 GMT):
Has joined the channel.

ibmamnt (Fri, 19 Jan 2018 04:52:34 GMT):
Hi, quick question. Does fabric-sdk-java supports multiple orderers ? For example, one orderer is down, then SDK send transaction to next orderer. This is not supported in Node.SDK yet.

asaningmaxchain (Fri, 19 Jan 2018 04:54:19 GMT):
yes

asaningmaxchain (Fri, 19 Jan 2018 04:54:19 GMT):
yes,you should modify the source code

asaningmaxchain (Fri, 19 Jan 2018 04:54:19 GMT):
yes,you should modify the source code,let me check it

rickr (Fri, 19 Jan 2018 05:01:59 GMT):
@ibmamnt Not at the moment but the application can do that.

asaningmaxchain (Fri, 19 Jan 2018 05:04:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pGDKjpctNiGJTQn8Q) @rickr the channel can add multi orderer

asaningmaxchain (Fri, 19 Jan 2018 05:06:27 GMT):
``` public Channel addOrderer(Orderer orderer) throws InvalidArgumentException { if (shutdown) { throw new InvalidArgumentException(format("Channel %s has been shutdown.", name)); } if (null == orderer) { throw new InvalidArgumentException("Orderer is invalid can not be null."); } logger.debug(format("Channel %s adding orderer%s, url: %s", name, orderer.getName(), orderer.getUrl())); orderer.setChannel(this); orderers.add(orderer); return this; }```

asaningmaxchain (Fri, 19 Jan 2018 05:06:59 GMT):
``` Orderer orderer = getRandomOrderer();```

asaningmaxchain (Fri, 19 Jan 2018 05:06:59 GMT):
``` Orderer orderer = getRandomOrderer();```it doesn;t check whether the orderer is available

asaningmaxchain (Fri, 19 Jan 2018 05:06:59 GMT):
``` Orderer orderer = getRandomOrderer();```it doesn't check whether the orderer is available

ibmamnt (Fri, 19 Jan 2018 07:58:43 GMT):
Thanks !

praveentalari (Fri, 19 Jan 2018 12:17:25 GMT):
Why am I having compilation errors(esp in End2endIT) when I did the following ? git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java git checkout tags/v1.0.1 -b mybranch

praveentalari (Fri, 19 Jan 2018 12:30:52 GMT):
Why am I having compilation errors(esp in End2endIT) when I did the following ? git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java git checkout tags/v1.0.1 -b mybranch cd /Users/pt/MY_universe/WS/github_ws/hyperledger_related/fabric-sdk-java/src/test/fixture/sdkintegration/ ./fabric.sh clean ./fabric.sh up

praveentalari (Fri, 19 Jan 2018 12:30:52 GMT):
Why am I having compilation errors(esp in End2endIT) when I did the following ? git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java git checkout tags/v1.0.1 -b mybranch cd ./src/test/fixture/sdkintegration/ ./fabric.sh clean ./fabric.sh up

vijay5378 (Fri, 19 Jan 2018 13:34:01 GMT):
I have the following setup - Peer1 in machine 1 (Org a) and peer2 in machine 2 (org 2). I have written a chaincode which functions as a smart contract and I have set the policy for this chaincode as follows AND ('orgs.member','org2.member') as I want both the peers to endorse any transaction. I have also written a java application that will invoke the chaincode and will add a key, value to the ledger. Now, how do I go about this ? Should the java application form a transaction proposal and get endorsements from both peers? If yes, then the application would need the private key from both the peers. Is this the right approach?

ascatox (Fri, 19 Jan 2018 13:51:07 GMT):
Someone has an example for the file **src/main/java/eu/faredge/fabric/client/testutils.properties**

ascatox (Fri, 19 Jan 2018 13:51:26 GMT):
present in TestConfig.java

ascatox (Fri, 19 Jan 2018 13:51:33 GMT):
Thanks a lot!!!

hpurmann (Fri, 19 Jan 2018 16:02:14 GMT):
Hey people! I'm trying to get registerBlockListener to work. Do I need a separate thread for that? This is what I did: ``` channel.registerBlockListener(blockEvent -> { PeerEvents.Event event = blockEvent.getEvent(); System.out.println(event); }); ```

hpurmann (Fri, 19 Jan 2018 16:02:14 GMT):
Hey people! I'm trying to get registerBlockListener to work. Do I need a separate thread for that? This is what I did: ```channel.registerBlockListener(blockEvent -> { PeerEvents.Event event = blockEvent.getEvent(); System.out.println(event); }); ```

hpurmann (Fri, 19 Jan 2018 16:02:14 GMT):
Hey people! I'm trying to get registerBlockListener to work. Do I need a separate thread for that? This is what I did: ```channel.registerBlockListener(blockEvent -> { PeerEvents.Event event = blockEvent.getEvent(); System.out.println(event); }); ```

hpurmann (Fri, 19 Jan 2018 16:02:14 GMT):
Hey people! I'm trying to get registerBlockListener to work. Do I need a separate thread for that? This is what I did: ```channel.registerBlockListener(blockEvent -> { PeerEvents.Event event = blockEvent.getEvent(); System.out.println(event); }); ``` I expect that it logs anything when I add a block to the chain from the node sdk.

hpurmann (Fri, 19 Jan 2018 16:02:14 GMT):
Hey people! I'm trying to get registerBlockListener to work. Do I need a separate thread for that? This is what I did: ```channel.registerBlockListener(blockEvent -> { PeerEvents.Event event = blockEvent.getEvent(); System.out.println(event); }); ``` I expect that it logs something when I add a block to the chain from the node sdk.

asaningmaxchain (Fri, 19 Jan 2018 16:48:51 GMT):
@rickr i use the master fabric and then i start the test it tell me the `io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err the supplied identity is not valid: x509: certificate signed by unknown authority`

rickr (Fri, 19 Jan 2018 18:31:49 GMT):
Be warned Latest Fabric master has an issue with very latest SDK IT tests. Fabric committed a feature which the SDK's implemented then changed it and merged that which broke the SDKs. This won't be fixed until https://gerrit.hyperledger.org/r/#/c/16741/ is merged.

rickr (Fri, 19 Jan 2018 18:39:02 GMT):
@hpurmann The Channel it self register's it's own internal block listener .. look at that : https://github.com/hyperledger/fabric-sdk-java/blob/41ec4c36f8d8009e1e0117cb58a26646c8c91c21/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L2743

rickr (Fri, 19 Jan 2018 18:43:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RnGxM85jHohGQx9Mu) @asaningmaxchain You can turn on tracing for the SDK that shows details on what we are sending. I suggest if that looks ok take log information to #fabric-peer-endorser-committer channel and ask them what creator identity they were expecting. If they can't I think thats a worthy of opening a JIRA on that component.

rickr (Fri, 19 Jan 2018 18:43:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RnGxM85jHohGQx9Mu) @asaningmaxchain You can turn on tracing for the SDK that shows details on what we are sending. I suggest if that looks ok take fabric log information to #fabric-peer-endorser-committer channel and ask them what creator identity they were expecting. If they can't I think thats a worthy of opening a JIRA on that component.

rickr (Fri, 19 Jan 2018 18:43:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RnGxM85jHohGQx9Mu) @asaningmaxchain You can turn on tracing for the SDK that shows details on what we are sending. I suggest if that looks ok take fabric log information to #fabric-peer-endorser-committer channel and ask them what creator identity they were expecting. If they can't I think thats a worthy of opening a JIRA bug on that component.

hpurmann (Fri, 19 Jan 2018 18:49:35 GMT):
@rickr Thank you, I've been looking at that. The problem is that the program just terminates. I expected it to function like a watcher and continuously do something with the incoming events. How can I achieve this?

hpurmann (Fri, 19 Jan 2018 18:50:37 GMT):
Thanks for the link to the javadoc btw. I thought this would be published as a website somewhere but looking at it locally is fine with me ;)

rickr (Fri, 19 Jan 2018 18:50:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WPowFQc4G6gKRM7ft) @vijay5378 Mostly. The SDK should have the public signing CA cert that the proposals have been signed aka verified when they are received. The only private key needed is the one when the proposal is created that is sent as the user context

rickr (Fri, 19 Jan 2018 18:50:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WPowFQc4G6gKRM7ft) @vijay5378 Mostly. The SDK should have the public signing CA cert that the proposals have been signed aka verified when they are received. The only private key needed is the one when the proposal is created that is set as the user context

rickr (Fri, 19 Jan 2018 18:52:57 GMT):
@hpurmann Your application needs _stay running_ for the events to keep coming in. You need to determine how it will terminate.

hpurmann (Fri, 19 Jan 2018 18:54:01 GMT):
Thank you, so I guess a separate thread might be a good option :)

rickr (Fri, 19 Jan 2018 18:55:47 GMT):
Not sure that would really be needed .. If you register that block listener and then do a long sleep in a forever loop that would work too

rickr (Fri, 19 Jan 2018 19:05:00 GMT):
I should have said .. after you initialize the channel you could put that forever loop.

hpurmann (Fri, 19 Jan 2018 19:16:21 GMT):
I think I did something like that but it still doesn't log anything. https://0bin.net/paste/BGTWGWNILxngOlPw#S0L+n57eJb6BgN7FKdTZduaFazn90NF-RzBb+mnkSaZ

hpurmann (Fri, 19 Jan 2018 19:17:43 GMT):
I guess I'm still missing something :/ I have a node block listener running for comparison. It picks up all the block events as expected

hpurmann (Fri, 19 Jan 2018 19:17:43 GMT):
I guess I'm still missing something :/ I have a node block listener running for comparison, picks up all the block events as expected

hpurmann (Fri, 19 Jan 2018 19:17:43 GMT):
I guess I'm still missing something :/ I have a node block listener running for comparison which picks up all the block events as expected

rickr (Fri, 19 Jan 2018 19:28:01 GMT):
add the event hub and block listener before the initialize

hpurmann (Fri, 19 Jan 2018 20:32:43 GMT):
Oooh yeah it worked :) nice, thank you

praveentalari (Sat, 20 Jan 2018 15:21:50 GMT):
Can someone help? How can you guys able to proceed?Working on local fabric image instead of docker ? I am having compilation errors(esp in End2endIT) when I did the following ? git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java git checkout tags/v1.0.1 -b mybranch cd ./src/test/fixture/sdkintegration/ ./fabric.sh clean ./fabric.sh up

asaningmaxchain (Sat, 20 Jan 2018 15:25:51 GMT):
can you show the error by using pastebin

praveentalari (Sat, 20 Jan 2018 15:42:55 GMT):
unable to import some classes for eg

praveentalari (Sat, 20 Jan 2018 15:42:55 GMT):
unable to import some classes for eg import org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset;

praveentalari (Sat, 20 Jan 2018 15:42:55 GMT):
unable to import some classes for eg import org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset; in End2endIT.java

asaningmaxchain (Sat, 20 Jan 2018 15:44:30 GMT):
do you generate the grpc code?

praveentalari (Sat, 20 Jan 2018 15:48:26 GMT):
Do you mean ./fabric.sh up ?

praveentalari (Sat, 20 Jan 2018 15:52:18 GMT):
docker ps gives me CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7b50695973bb hyperledger/fabric-peer:x86_64-1.0.1 "peer node start" 54 seconds ago Up 54 seconds 0.0.0.0:8056->7051/tcp, 0.0.0.0:8058->7053/tcp peer1.org2.example.com 48cb0380dfaa hyperledger/fabric-peer:x86_64-1.0.1 "peer node start" 54 seconds ago Up 54 seconds 0.0.0.0:7056->7051/tcp, 0.0.0.0:7058->7053/tcp peer1.org1.example.com a6ed7c44c9bb hyperledger/fabric-peer:x86_64-1.0.1 "peer node start" 55 seconds ago Up 55 seconds 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer0.org2.example.com eaf1498ff482 hyperledger/fabric-peer:x86_64-1.0.1 "peer node start" 55 seconds ago Up 55 seconds 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com a06490d0738f hyperledger/fabric-ca:x86_64-1.0.1 "sh -c 'fabric-ca-se…" 57 seconds ago Up 56 seconds 0.0.0.0:7054->7054/tcp ca_peerOrg1 58448880a069 hyperledger/fabric-ca:x86_64-1.0.1 "sh -c 'fabric-ca-se…" 57 seconds ago Up 57 seconds 0.0.0.0:8054->7054/tcp ca_peerOrg2 48062785f2a5 hyperledger/fabric-orderer:x86_64-1.0.1 "orderer" 57 seconds ago Up 56 seconds 0.0.0.0:7050->7050/tcp orderer.example.com 2b6e5138845e hyperledger/fabric-tools:x86_64-1.0.1 "/usr/local/bin/conf…" 57 seconds ago Up 57 seconds 0.0.0.0:7059->7059/tcp configtxlator

hpurmann (Sat, 20 Jan 2018 16:39:25 GMT):
I try to get the payload of the transactions of a block. When I execute ```Common.Block block = blockEvent.getBlock(); BlockData blockData = block.getData(); System.out.println(blockData); ``` I get all of it but completely unstructured. How can I get structure in this? Is this a protobuf message? Do I somehow need to parse it?

MartinStepien (Sat, 20 Jan 2018 18:54:21 GMT):
Has joined the channel.

niteshsolanki (Sun, 21 Jan 2018 16:48:36 GMT):
Has joined the channel.

rickr (Sun, 21 Jan 2018 18:20:33 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/ee34177257b8ebb55b30e15ef1c565e4e000aa01/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L777

rickr (Sun, 21 Jan 2018 18:20:33 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/ee34177257b8ebb55b30e15ef1c565e4e000aa01/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L777

rickr (Sun, 21 Jan 2018 18:20:33 GMT):
Good luck parsing that. https://github.com/hyperledger/fabric-sdk-java/blob/ee34177257b8ebb55b30e15ef1c565e4e000aa01/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L777

niteshsolanki (Sun, 21 Jan 2018 18:32:46 GMT):
Hi folks,

niteshsolanki (Sun, 21 Jan 2018 18:33:06 GMT):
How do I generate grpc code for Hyperledger java SDK?

rickr (Sun, 21 Jan 2018 19:56:50 GMT):
Have looked at the README.md ?

niteshsolanki (Mon, 22 Jan 2018 02:56:31 GMT):
Thanks @rickr I was able to generate the grpc code

Ashish (Mon, 22 Jan 2018 06:35:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pGDKjpctNiGJTQn8Q) @rickr That was my understanding too - that the application has to do it,. But do you have plans to get automatic orderer switching done in the SDK ? In which release ?

Ashish (Mon, 22 Jan 2018 06:44:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nTmmErXXWgqqtA8gq) @rickr Thanks Rick, I corrected my POM and now its working fine with Tomcat v8.5,

ryokawajp (Mon, 22 Jan 2018 08:16:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iZiDecDP7WyNdo8dz) @asaningmaxchain @ibmamnt For usual transactions, one of the available orderers added by addOrderer() is used. So it supports multiple orderers. While I realized that a function called Channel.initialize() also accesses an orderer to get a configuration block but it does not support multiple orderers because it calls getRandomOrderer(), as metioned by @asaningmaxchain .

rickr (Mon, 22 Jan 2018 09:16:41 GMT):
Multiple orders can be used to balance workload amoung them. Currently it does not support fail over

ryokawajp (Mon, 22 Jan 2018 09:26:04 GMT):
@rickr I see. Thanks!

pekayde (Mon, 22 Jan 2018 14:41:52 GMT):
Has joined the channel.

vijay5378 (Mon, 22 Jan 2018 15:09:08 GMT):
I have instantiated a chaincode with -P "AND ('Org1MSP.member','Org2MSp.member')". I am trying to add a key, value to the ledger using the chaincode. Now even when the transaction is endorsed by just one MSP, it still writes to the ledger...am I missing something?

rickr (Mon, 22 Jan 2018 15:16:34 GMT):
Not familiar with ` -P "AND ('Org1MSP.member','Org2MSp.member')".` but if you think it needs endorsing of two org member and it's committing it without that I would take that to the #fabric-peer-endorser-committer channel as they could probably more quickly tell you why.

rickr (Mon, 22 Jan 2018 15:16:34 GMT):
Not familiar with ` -P "AND ('Org1MSP.member','Org2MSp.member')".` but if you think it needs endorsing of two org member and it's committing it without that I would take that to the #fabric-peer-endorser-committer channel as they could probably more quickly tell you why. I would have logs from the peer for them so they could better help you.

vijay5378 (Mon, 22 Jan 2018 15:42:46 GMT):
thanks rickr

rameshthoomu (Mon, 22 Jan 2018 15:57:36 GMT):
@rickr I see latest merge job has been failed https://jenkins.hyperledger.org/view/fabric-sdk-java/job/fabric-sdk-java-merge-x86_64/215/console

rameshthoomu (Mon, 22 Jan 2018 15:57:50 GMT):
could you please check

rickr (Mon, 22 Jan 2018 18:08:24 GMT):
@rameshthoomu very latest merges seem to be ok

rickr (Mon, 22 Jan 2018 18:09:54 GMT):
@rameshthoomu fyi : https://chat.hyperledger.org/channel/fabric-ca?msg=G92cizeeuYHA6Qmq5

krisava (Mon, 22 Jan 2018 21:22:47 GMT):
Hi. I am getting the below error while trying to post the transaction from PeerOrg2. Can you please help? 2018-01-22 16:43:27.403 UTC [vscc] Invoke -> WARN 02f Endorsement policy failure for transaction txid=, err: Failed to authenticate policy 2018-01-22 16:43:27.403 UTC [txvalidator] VSCCValidateTxForCC -> ERRO 030 VSCC check failed for transaction txid=, error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 16:43:27.403 UTC [txvalidator] Validate -> ERRO 031 VSCCValidateTx for transaction txId = returned error VSCC error: policy evaluation failed, err Failed to authenticate policy 2018-01-22 16:43:27.403 UTC [statevalidator] ValidateAndPrepareBatch -> WARN 032 Block [35] Transaction index [0] marked as invalid by committer. Reason code [10]

rickr (Mon, 22 Jan 2018 21:42:13 GMT):
Best asked on #fabric-peer-endorser-committer channel

rickr (Mon, 22 Jan 2018 21:45:05 GMT):
10 := ENDORSEMENT_POLICY_FAILURE

rickr (Mon, 22 Jan 2018 21:48:18 GMT):
Sometimes docker log on the docker instance that is the chaincode you're running may show something interesting

krisava (Mon, 22 Jan 2018 22:05:09 GMT):
thanks @rickr

zhmz1326 (Tue, 23 Jan 2018 07:56:01 GMT):
Has joined the channel.

samuel.alencar (Tue, 23 Jan 2018 17:31:15 GMT):
Has joined the channel.

niteshsolanki (Wed, 24 Jan 2018 10:27:37 GMT):
Hi @rickr I am using java SDK v1.0 and trying to make an invoke call. I am not able to get and event in the Future of sendtransaction function used to send to the orderer. However I could see block being emitted by the peer on peer container logs.

VipulMakwana (Wed, 24 Jan 2018 11:05:18 GMT):
Has joined the channel.

VipulMakwana (Wed, 24 Jan 2018 11:07:02 GMT):
Hi, When will the chaincode support for JAVA will be re-enabled? I guess it's still unavailable in the latest v1.1.0-preview release. Please guide. Thanks in advance.

aatkddny (Wed, 24 Jan 2018 13:10:25 GMT):
Has anyone anywhere ever managed to submit a transaction requiring AND endorsement from peers from multiple MSPs using the Java SDK?

rickr (Wed, 24 Jan 2018 14:14:52 GMT):
The integration test don't really do that. Is there a specific issue you're seeing?

rickr (Wed, 24 Jan 2018 14:15:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EtPmoBYssyAWp8bPn) @niteshsolanki You have created eventhubs on your channel ?

rickr (Wed, 24 Jan 2018 14:17:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RyTN8TDzRfMypNnod) @VipulMakwana Asking in the wrong place. JSDK and any chaincode language support are entirely different. Try #fabric-java-chaincode channel

niteshsolanki (Wed, 24 Jan 2018 14:27:55 GMT):
@rickr I was able to receive an event after calling.get(600,√

niteshsolanki (Wed, 24 Jan 2018 14:27:55 GMT):
@rickr I was able to receive an event after calling.get() method. The get function was missing while resolving the future.

aatkddny (Wed, 24 Jan 2018 14:31:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WorgpMNigPgXL49Sn) @rickr If that was in response to the AND endorsement question, the answer is yes. Two orgs in a consortium - two CAs and separate peers for each org with AND endorsement required. I think it boils down to the channel only supporting a single HFClient rather than a list (for the list of orgs that are party to the transaction - like the JS code in the corresponding node SDK). I can provide more details but this encapsulates my issue.

rickr (Wed, 24 Jan 2018 15:02:08 GMT):
It's not realistic in a single application you would credentials for both orgs. If you, wanted try this in a single application .. create a client for org1 create the channel join the peerOrg1 to the channel. install CC to peerOrg1 instantiate CC to peerOrg1 .. now _pretend_ you're anther org org2 create a new Client create new Channel (same name) join peerOrg2 to the channel install CC on peerOrg2 (no need to instantiate it done before by org1) send invoke endorsement proposal to peerOrg1 and peerOrg2 send endorsed proposals to ordererer

rickr (Wed, 24 Jan 2018 15:02:08 GMT):
It's not realistic in a single application you would credentials for both orgs. If you, wanted try this in a single application .. create a client for org1 create the channel join the peerOrg1 to the channel. install CC to peerOrg1 instantiate CC to peerOrg1 .. now _pretend_ you're anther org org2 ( _realistically this would be in another application owned and run by org2 not org1_) create a new Client create new Channel (same name) join peerOrg2 to the channel install CC on peerOrg2 (no need to instantiate it done before by org1) send invoke endorsement proposal to peerOrg1 and peerOrg2 send endorsed proposals to ordererer

rickr (Wed, 24 Jan 2018 15:02:08 GMT):
It's not realistic in a single application you would credentials for both orgs. If you, wanted try this in a single application .. create a client for org1 create the channel join the peerOrg1 to the channel. install CC to peerOrg1 instantiate CC to peerOrg1 .. now _pretend_ you're anther org org2 ( _realistically this would be in another application owned and run by org2 not org1_) create a new Client create new Channel *Object* (same name) join peerOrg2 to the channel install CC on peerOrg2 (no need to instantiate it done before by org1) send invoke endorsement proposal to peerOrg1 and peerOrg2 send endorsed proposals to ordererer

aatkddny (Wed, 24 Jan 2018 15:16:12 GMT):
It doesn't work.

aatkddny (Wed, 24 Jan 2018 15:16:12 GMT):
It doesn't work. That's kind of my point. When you collect the responses and submit on the channel in the way you describe you get a security exception because the channel doesn't know about the second peer and it's trying to package with the wrong certs.

aatkddny (Wed, 24 Jan 2018 15:16:12 GMT):
It doesn't work. That's kind of my point. When you collect the responses and submit on the channel in the way you describe you get a security exception because the channel doesn't know about the second peer and it's trying to package with the wrong certs. This is specific to the Java SDK. It works just fine from the CLI

rickr (Wed, 24 Jan 2018 15:26:28 GMT):
As org2 you added (not joined) a new peer object from client2 created from the second client to peerOrg1 url?

aatkddny (Wed, 24 Jan 2018 15:28:40 GMT):
>As org2 you added (not joined) a new peer object from client2 created from the second client to peerOrg1 url? You mean to the channel -> with a channel.addPeer? Then yes.

rickr (Wed, 24 Jan 2018 15:29:33 GMT):
I'm kind of busy at the moment .. in the coming days I'll give this a try

rickr (Wed, 24 Jan 2018 15:30:01 GMT):
what exactly is the exception you're seeing ?

rickr (Wed, 24 Jan 2018 15:30:47 GMT):
and exactly what are you doing when that occurs

aatkddny (Wed, 24 Jan 2018 15:31:39 GMT):
I'll rerun and post in a few. It comes when you do the sendTransaction(...) to the channel after you aggregate all the successful ProposalResponse responses.

rickr (Wed, 24 Jan 2018 15:32:19 GMT):
Hmm you got then all the correct endorsements

aatkddny (Wed, 24 Jan 2018 15:34:10 GMT):
Of course. The problem (I think) is that the channel wraps with HFClient for Org1 but there are certs for Org2 mixed in there that it doesn't know about and it doesn't like the mismatch.

rickr (Wed, 24 Jan 2018 15:37:30 GMT):
Not understand that. If you have two separate clients how anything like that is possible. When you created client2 you should have set a user context from a user with CA from org2 likewise for org1

aatkddny (Wed, 24 Jan 2018 15:38:03 GMT):
Yes but you submit to the channel. Which has one HFClient in it.

rickr (Wed, 24 Jan 2018 15:38:17 GMT):
Like to see the actual exception on this ..

aatkddny (Wed, 24 Jan 2018 15:45:42 GMT):
I haven't run this since December and there's a new version of Fabric underneath, but now it's failing with a PolicyManager exception. `2018-01-24 10:41:36.717 ERROR 26234 --- [nio-8096-exec-3] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer0.org2.com failed because of: gRPC failure=Status{code=UNKNOWN, description=error executing chaincode: transaction returned with failure: Failed to get policy manager for channel [org1-org2channel], cause=null}` (Obviously) I'm connected to Org1

rickr (Wed, 24 Jan 2018 15:46:22 GMT):
The only thing the client has the default user context. That context identifies and signs any request. There is only on any request a single signer

rickr (Wed, 24 Jan 2018 15:48:03 GMT):
I thought you said you got all the endorsements .. this looks like it failed when trying to get that endorsement

aatkddny (Wed, 24 Jan 2018 15:51:36 GMT):
When I originally ran this I got all the endorsements. Back in mid December. I haven't run it like this in a long time - we changed the app to require individual endorsements and invoked serially with the orgs. Now that all worked I wanted to revisit this so I asked if anyone had done it. Now we are on a newer version of Fabric - 1.1.0 iirc and the error has changed. Mea culpa - I should have rerun it before stating that it was failing on the sendTransaction - where I left off. But it ~is~ still failing so my question stands. Has anyone actually managed to do this?

aatkddny (Wed, 24 Jan 2018 15:51:36 GMT):
When I originally ran this I got all the endorsements. Back in mid December. I haven't run it like this in a long time - we changed the app to require OR endorsements and invoked serially with the orgs, keeping track of state in the saved object. Now that change all works - for the POC piece - I wanted to revisit this to fulfill the actual use case, so I asked if anyone had done it. We are on a newer version of Fabric - 1.1.0 iirc and I have made changes ITMT so the error has changed. Mea culpa - I should have rerun it before stating that it was failing on the sendTransaction - where I left off. But it ~is~ still failing so my question stands. Has anyone actually managed to do this?

aatkddny (Wed, 24 Jan 2018 15:51:36 GMT):
When I originally ran this I got all the endorsements. Back in mid December. I haven't run it like this in a long time - we changed the app to require OR endorsements and invoked serially with the orgs, keeping track of state in the saved object. Now that change all works - for the POC piece - I wanted to revisit this to fulfill the actual use case, so I asked if anyone had done it. We are on a newer version of Fabric - 1.1.0 iirc and I have made changes ITMT (there's also a problem with event hubs that's related to more than one party on the channel) so the error has changed. Mea culpa - I should have rerun it to check functionality before stating that it was failing on the sendTransaction - where I left off. But it is still failing so my question stands. Has anyone actually managed to do this?

aatkddny (Wed, 24 Jan 2018 15:51:36 GMT):
When I originally ran this I got all the endorsements. Back in mid December. I haven't run it like this in a long time - we changed the app to require OR endorsements and invoked serially with the orgs, keeping track of state in the saved object. Now that change all works - for the POC piece - I wanted to revisit this to fulfill the actual use case, so I asked if anyone had done it. We are on a newer version of Fabric - 1.1.0 iirc and I have made changes ITMT (there's also a problem with event hubs that's related to more than one party on the channel) so the error has changed. Mea culpa - I should have rerun it to check functionality before stating that it was failing on the sendTransaction - where I left off. But it is still failing so my question stands. Has anyone actually managed to do this?

rickr (Wed, 24 Jan 2018 15:56:56 GMT):
Things are rather hectic right now .. in coming days .. maybe next week even I will try and give this a shot.

aatkddny (Wed, 24 Jan 2018 16:03:24 GMT):
Getting the set of multi-party containers up and playing nice together is a joy if you haven't done it before. I have a set of pre-canned scripts if you need to circumvent some of the issues. PM me if you need copies.

jyellick (Wed, 24 Jan 2018 16:32:35 GMT):
Has joined the channel.

jyellick (Wed, 24 Jan 2018 16:42:14 GMT):
@aatkddny Are you very certain that your peerOrg2 peer is actually joined to your channel

jyellick (Wed, 24 Jan 2018 16:43:24 GMT):
The error about not finding the policy manager would indicate to me that the peer is not joined to the channel

daygee (Wed, 24 Jan 2018 19:21:57 GMT):
hey guys

daygee (Wed, 24 Jan 2018 19:22:08 GMT):
so I set up a fabric network on a server

daygee (Wed, 24 Jan 2018 19:22:44 GMT):
and have an app using the java sdk to invoke chaincode on the network

daygee (Wed, 24 Jan 2018 19:23:01 GMT):
but when I try to invoke I get org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.interswitchgroup failed to connect in 1000 ms. at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:853) at com.interswitch.wallet.WalletApplicationTests.constructChannel(WalletApplicationTests.java:92) at com.interswitch.wallet.WalletApplicationTests.invokeChaincode(WalletApplicationTests.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.interswitchgroup failed to connect in 1000 ms. at org.hyperledger.fabric.sdk.EventHub.connect(EventHub.java:286) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:835)

daygee (Wed, 24 Jan 2018 19:23:27 GMT):
failed to connect

daygee (Wed, 24 Jan 2018 19:23:39 GMT):
and I'm not sure where my issue might be

daygee (Wed, 24 Jan 2018 19:23:49 GMT):
please help

daygee (Wed, 24 Jan 2018 19:24:22 GMT):
I can invoke from cli on the server btw

asaningmaxchain123 (Thu, 25 Jan 2018 02:07:52 GMT):
Has joined the channel.

asaningmaxchain123 (Thu, 25 Jan 2018 02:18:11 GMT):
@rickr i use the new java sdk to test the e2e

asaningmaxchain123 (Thu, 25 Jan 2018 02:18:32 GMT):

Selection_014.png

asaningmaxchain123 (Thu, 25 Jan 2018 02:19:20 GMT):
it's always running.seem the operation has finished

asaningmaxchain123 (Thu, 25 Jan 2018 02:40:45 GMT):
i think it's a bug,because i use the old sdk ,it's good

blockhash (Thu, 25 Jan 2018 05:29:44 GMT):
Has joined the channel.

VipulMakwana (Thu, 25 Jan 2018 08:45:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yWNpKZvz7NgB6Mz7d) Thanks @rickr , I will look in #fabric-java-chaincode thanks a ton. :)

ascatox (Thu, 25 Jan 2018 08:45:42 GMT):
Hi All! I've the need to manage events coming from the Ledger. I've thought about the EventHub, not yet managed by the Java SDK. Someone in this channel has got some experiences in managing events with the Java SDK using the SNAPSHOT releases?

ascatox (Thu, 25 Jan 2018 08:45:42 GMT):
Hi All! I've the need to manage events coming from the Ledger. I've thought about the **EventHub**, not yet managed by the Java SDK. Someone in this channel has got some experiences in managing events with the Java SDK using the SNAPSHOT releases?

ascatox (Thu, 25 Jan 2018 08:45:42 GMT):
Hi All! I've the need to manage events coming from the Ledger. I've thought about the **EventHub**, not yet managed by the Java SDK. Someone in this channel has got some experiences in **managing events** with the Java SDK using the SNAPSHOT releases?

aatkddny (Thu, 25 Jan 2018 12:59:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=i9RCFiuesn3uBDsfR) @jyellick

aatkddny (Thu, 25 Jan 2018 12:59:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=i9RCFiuesn3uBDsfR) @jyellick Pretty sure. I check when I set things up. ### peer0.org2.com:7051 attempting to join org1-org2channel 2018-01-24 15:32:59.992 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-01-24 15:32:59.992 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-01-24 15:33:00.003 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized 2018-01-24 15:33:00.008 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A98070A5B08011A0B08ACCEA2D30510...AA6B131A65041A080A000A000A000A00 2018-01-24 15:33:00.009 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 3444217F6A6A574BD3E85881F1E936321224FD68F65D9E492A3D4238F3755221 2018-01-24 15:33:00.248 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel! 2018-01-24 15:33:00.248 UTC [main] main -> INFO 007 Exiting..... ##################################################################################################### Listing channels for peer0.org2.com:7051 ##################################################################################################### 2018-01-24 15:33:04.258 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-01-24 15:33:04.258 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-01-24 15:33:04.282 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized 2018-01-24 15:33:04.283 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A99070A5C08031A0C08B0CEA2D30510...631A0D0A0B4765744368616E6E656C73 2018-01-24 15:33:04.283 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 99793C6F3275025C457A5BE2EB4C3544C626E4BA541DE511A43889FF6E9CD766 Channels peer has joined: org1-org2channel 2018-01-24 15:33:04.300 UTC [main] main -> INFO 006 Exiting.....

aatkddny (Thu, 25 Jan 2018 12:59:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=i9RCFiuesn3uBDsfR) @jyellick Pretty sure. I check when I set things up. Plus remember this all works in the CLI without issue. ### peer0.org2.com:7051 attempting to join org1-org2channel 2018-01-24 15:32:59.992 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-01-24 15:32:59.992 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-01-24 15:33:00.003 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized 2018-01-24 15:33:00.008 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A98070A5B08011A0B08ACCEA2D30510...AA6B131A65041A080A000A000A000A00 2018-01-24 15:33:00.009 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 3444217F6A6A574BD3E85881F1E936321224FD68F65D9E492A3D4238F3755221 2018-01-24 15:33:00.248 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel! 2018-01-24 15:33:00.248 UTC [main] main -> INFO 007 Exiting..... ##################################################################################################### Listing channels for peer0.org2.com:7051 ##################################################################################################### 2018-01-24 15:33:04.258 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-01-24 15:33:04.258 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-01-24 15:33:04.282 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized 2018-01-24 15:33:04.283 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A99070A5C08031A0C08B0CEA2D30510...631A0D0A0B4765744368616E6E656C73 2018-01-24 15:33:04.283 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 99793C6F3275025C457A5BE2EB4C3544C626E4BA541DE511A43889FF6E9CD766 Channels peer has joined: org1-org2channel 2018-01-24 15:33:04.300 UTC [main] main -> INFO 006 Exiting.....

rickr (Thu, 25 Jan 2018 13:20:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=joi9hNWDLkJcbkEZz) @asaningmaxchain123 Can you enable TRACE on the client ?

rickr (Thu, 25 Jan 2018 13:22:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QfoqNacpm4LidhSwv) @daygee I only can think that you don't have the host/port

asaningmaxchain123 (Thu, 25 Jan 2018 13:24:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qjGNTdAwA2wHQ9P2A) @rickr how to do it

daygee (Thu, 25 Jan 2018 13:29:33 GMT):
@rickr you're probably right, just can't figure out what I'm missing though

rickr (Thu, 25 Jan 2018 13:38:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6HqQFTBN6s9X53JzW) @asaningmaxchain123 Maybe try this for all the places you add or join peers there's a new option ... `createPeerOptions().setPeerRoles(PeerRole.NO_EVENT_SOURCE))` https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L732

rickr (Thu, 25 Jan 2018 13:38:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6HqQFTBN6s9X53JzW) @asaningmaxchain123 Maybe try this for all the places you add or join peers there's a new option ... `createPeerOptions().setPeerRoles(PeerRole.NO_EVENT_SOURCE))` see this as an example https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L732

asaningmaxchain123 (Thu, 25 Jan 2018 13:40:41 GMT):
``` /** * Possible roles a peer can perform. */ public enum PeerRole { /** * Endorsing peer installs and runs chaincode. */ ENDORSING_PEER("endorsingPeer"), /** * Chaincode query peer will be used to invoke chaincode on chaincode query requests. */ CHAINCODE_QUERY("chaincodeQuery"), /** * Ledger Query will be used when query ledger operations are requested. */ LEDGER_QUERY("ledgerQuery"), /** * Peer will monitor block events for the channel it belongs to. */ EVENT_SOURCE("eventSource"); /** * All roles. */ public static final EnumSet ALL = EnumSet.allOf(PeerRole.class); /** * All roles except event source. */ public static final EnumSet NO_EVENT_SOURCE = EnumSet.complementOf(EnumSet.of(PeerRole.EVENT_SOURCE)); private final String propertyName; PeerRole(String propertyName) { this.propertyName = propertyName; } public String getPropertyName() { return propertyName; } }```

asaningmaxchain123 (Thu, 25 Jan 2018 13:40:57 GMT):
the peer should classifies by role?

rickr (Thu, 25 Jan 2018 13:41:07 GMT):
y

rickr (Thu, 25 Jan 2018 13:41:13 GMT):
the default is all

rickr (Thu, 25 Jan 2018 13:41:20 GMT):
which expects an eventing peer

asaningmaxchain123 (Thu, 25 Jan 2018 13:41:33 GMT):
in the fabric,it doesn't do it

asaningmaxchain123 (Thu, 25 Jan 2018 13:41:33 GMT):
in the fabric,it doesn't do it,can you give more detail about it?

rickr (Thu, 25 Jan 2018 13:41:46 GMT):
give that a shot

rickr (Thu, 25 Jan 2018 13:42:10 GMT):
if you're going to 1.0.x fabric

asaningmaxchain123 (Thu, 25 Jan 2018 13:42:12 GMT):
which FAB-

asaningmaxchain123 (Thu, 25 Jan 2018 13:43:35 GMT):
`ENDORSING_PEER`,`CHAINCODE_QUERY` `LEDGER_QUERY` all need install and run chaincode

asaningmaxchain123 (Thu, 25 Jan 2018 13:43:35 GMT):
`ENDORSING_PEER`,`CHAINCODE_QUERY`, `LEDGER_QUERY` all need install and run chaincode

asaningmaxchain123 (Thu, 25 Jan 2018 13:43:35 GMT):
`ENDORSING_PEER`,`CHAINCODE_QUERY`` , `LEDGER_QUERY` all need install and run chaincode

asaningmaxchain123 (Thu, 25 Jan 2018 13:43:35 GMT):
`ENDORSING_PEER`,`CHAINCODE_QUERY`, `LEDGER_QUERY` all need install and run chaincode

asaningmaxchain123 (Thu, 25 Jan 2018 13:44:42 GMT):
the chaincode is only one way to interact with the ledger

rickr (Thu, 25 Jan 2018 13:45:18 GMT):
none of that has anything at all to do with chaincode

asaningmaxchain123 (Thu, 25 Jan 2018 13:45:54 GMT):
so how to do classify it?

rickr (Thu, 25 Jan 2018 13:46:03 GMT):
I showed you

rickr (Thu, 25 Jan 2018 13:46:28 GMT):
Are you running against a 1.0.x version of fabric

asaningmaxchain123 (Thu, 25 Jan 2018 13:46:56 GMT):
yes

rickr (Thu, 25 Jan 2018 13:47:05 GMT):
then do as I showed up above

asaningmaxchain123 (Thu, 25 Jan 2018 13:47:39 GMT):
ok

asaningmaxchain123 (Thu, 25 Jan 2018 13:47:53 GMT):
where i can find it

rickr (Thu, 25 Jan 2018 13:47:56 GMT):
You're channel is waiting on events from the peer which will never happen in 1.0.x

asaningmaxchain123 (Thu, 25 Jan 2018 13:47:58 GMT):
the peer logs?

asaningmaxchain123 (Thu, 25 Jan 2018 13:48:40 GMT):
the peer doesn't send the event to the client?

asaningmaxchain123 (Thu, 25 Jan 2018 13:48:40 GMT):
the peer doesn't produce the event to the client?

asaningmaxchain123 (Thu, 25 Jan 2018 13:48:40 GMT):
the peer doesn't produce the event to the client?when the chaincode init

asaningmaxchain123 (Thu, 25 Jan 2018 13:48:40 GMT):
the peer doesn't produce the event to the client?when the chaincode instantiation

rickr (Thu, 25 Jan 2018 13:50:24 GMT):
in 1.1 eventhubs will go away ... just create and add peers

rickr (Thu, 25 Jan 2018 13:50:24 GMT):
eventhubs will eventually go away ... for 1.1 on you should just create and add peers

rickr (Thu, 25 Jan 2018 13:50:45 GMT):
The java peer object will give you're events

rickr (Thu, 25 Jan 2018 13:50:45 GMT):
In 1.1 and later the java peer object will give you're events

asaningmaxchain123 (Thu, 25 Jan 2018 13:55:25 GMT):
so in the 1.1 how the sdk get the event from the peer? can you provide more detail?

asaningmaxchain123 (Thu, 25 Jan 2018 13:57:09 GMT):
the orderer seems wrong

asaningmaxchain123 (Thu, 25 Jan 2018 13:57:18 GMT):
```private Channel constructChannel(String name, HFClient client, SampleOrg sampleOrg) throws Exception```

asaningmaxchain123 (Thu, 25 Jan 2018 13:57:49 GMT):
in this method,`Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin()));`

asaningmaxchain123 (Thu, 25 Jan 2018 13:57:49 GMT):
in this method,```Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin()));```

rickr (Thu, 25 Jan 2018 13:58:24 GMT):
https://jira.hyperledger.org/browse/FAB-5695

rickr (Thu, 25 Jan 2018 13:58:24 GMT):
https://jira.hyperledger.org/browse/FAB-5695 and https://jira.hyperledger.org/browse/FAB-6911

dperritano (Thu, 25 Jan 2018 19:04:37 GMT):
Has joined the channel.

dockeryounger (Fri, 26 Jan 2018 01:29:23 GMT):
Has joined the channel.

zhishui (Fri, 26 Jan 2018 02:24:41 GMT):
How to get the blockNumber based on the data on the chain

toffee.beanns (Fri, 26 Jan 2018 04:45:05 GMT):
Has joined the channel.

toffee.beanns (Fri, 26 Jan 2018 04:50:27 GMT):
Hi everyone! I have new to fabric and am currently trying out the java-sdk. I am following the Endtoend tutorial on youtube by tuand and got stuck with an error. Would really be grateful if someone can help explain where I got it wrong. I started running the test as suggested by the video (EndtoendIT) and got caught with this exception. org.hyperledger.fabric.sdk.exception.EnrollmentException: Failed to enroll user admin Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:7054 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) I also ran docker ps -a to see my running docker images, and true enough, the CA is not running The docker-compose.yml file does include a CA and I can't figure out why. Did anyone encounter the same problem?

markthedark (Fri, 26 Jan 2018 07:55:24 GMT):
hello, dunno if this is the right channel, but my couchDB query is not using the 'limit' i set in the query, it is working fine in project fauxton if i copy&paste the query in there. `{"selector":{"event.type":{"$in":["C","D","R","E","U"]},"createTimestamp":{"$gt":0,"$lt":1516953157}},"sort": [{"createTimestamp": "asc"}], "limit": 10}`

markthedark (Fri, 26 Jan 2018 08:15:24 GMT):
ok, seems this is a open issues.. https://jira.hyperledger.org/browse/FAB-5369

markthedark (Fri, 26 Jan 2018 08:16:34 GMT):
another queston, getting an gRPC error when polling larger amount of data from couchDB. ```09:07:32,688 ERROR [org.hyperledger.fabric.sdk.Channel] (default task-30) Sending proposal to peer failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=io.grpc.netty.NettyClientTransport$3: Frame size 5601493 exceeds maximum: 4194304. , cause=null}: java.lang.Exception: io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: io.grpc.netty.NettyClientTransport$3: Frame size 5601493 exceeds maximum: 4194304. at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2285) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2199) at org.hyperledger.fabric.sdk.Channel.queryByChaincode(Channel.java:2160) at si.lucis.fabric.chainreader.FabricChainReader.performRichQueryForLogs(FabricChainReader.java:202) at si.lucis.fabric.chainreader.FabricChainReader.queryForLogs(FabricChainReader.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) ...``` can i increase the frame size or something ?

rickr (Fri, 26 Jan 2018 08:34:31 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L725

rickr (Fri, 26 Jan 2018 08:40:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=akfpWbccCSm2pujZd) @toffee.beanns Did you look a the docker logs from the fabric ca container instance ?

toffee.beanns (Fri, 26 Jan 2018 08:52:58 GMT):
@rickr Thanks for reverting! I type this command `docker logs ca`, where ca is the name of the container, and this is what it returned: sh: 1: fabric-ca: not found

toffee.beanns (Fri, 26 Jan 2018 08:54:21 GMT):
I do have hyperledger/fabric-ca installed as one of my images in docker

markthedark (Fri, 26 Jan 2018 09:00:10 GMT):
thanx!

niteshsolanki (Fri, 26 Jan 2018 10:21:04 GMT):
@rickr is there any way to get confirmation of joinChannel was successful or not?

rickr (Fri, 26 Jan 2018 14:37:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NmNmtPXoPN4PpKm67) @niteshsolanki https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L659 ??

rickr (Fri, 26 Jan 2018 14:37:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NmNmtPXoPN4PpKm67) @niteshsolanki If the peer didn't join the channel for any reason you'd most likely see an exception. https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L659 ??

niteshsolanki (Fri, 26 Jan 2018 15:34:51 GMT):
thank @rickr .I am trying a different approach here by listening for a block event and then fetching the channelID from block envelopeInfo. i am facing an issue of returning boolean value in the following code: newChannel.registerBlockListener(blockEvent -> { int i = 0; for (BlockInfo.EnvelopeInfo envelopeInfo : blockEvent .getEnvelopeInfos()) { ++i; final String channelId = envelopeInfo.getChannelId(); if (channelId==newChannel.getName()){ System.out.println("channel is present"); return true; } } });

niteshsolanki (Fri, 26 Jan 2018 15:34:51 GMT):
thank @rickr .I am trying a different approach here by listening for a block event and then fetching the channelID from block envelopeInfo. i am facing an issue of returning boolean value in the following code: newChannel.registerBlockListener(blockEvent -> { int i = 0; for (BlockInfo.EnvelopeInfo envelopeInfo : blockEvent .getEnvelopeInfos()) { ++i; final String channelId = envelopeInfo.getChannelId(); if (channelId==newChannel.getName()){ System.out.println("channel is present"); return true; } } }); How do I return from the callback function?

fanjianhang (Sat, 27 Jan 2018 02:17:23 GMT):
what is the detailed time of the newest sdk release?

medhak19 (Sat, 27 Jan 2018 06:06:58 GMT):
Has joined the channel.

Zoha131 (Sun, 28 Jan 2018 13:04:09 GMT):
Has joined the channel.

example (Mon, 29 Jan 2018 13:26:26 GMT):
Has joined the channel.

rickr (Mon, 29 Jan 2018 14:27:17 GMT):
@niteshsolanki You can't return anything from it as it's an asynchronous. You'll need some strategy like creating a queue and have that thread put a value on it and have you're main thread wait on that queue for it.

rickr (Mon, 29 Jan 2018 14:32:09 GMT):
The next release we're working on is a v1.1 compatible release. There SNAPSHOT images of that available now.

rickr (Mon, 29 Jan 2018 14:32:09 GMT):
The next release we're working on is a v1.1 compatible release. There are SNAPSHOTs continuously being published that are work in progress available now.

niteshsolanki (Tue, 30 Jan 2018 04:25:58 GMT):
oh ok. thanks @rickr

absingh0 (Tue, 30 Jan 2018 05:21:55 GMT):
@rickr Hi! Can you please point me to fabric java sdk documentation?

absingh0 (Tue, 30 Jan 2018 05:47:09 GMT):
Is there any difference between addPeer and joinPeer function of Channel class in java-sdk?

rickr (Tue, 30 Jan 2018 09:13:19 GMT):
You `join` the peer once to the channel .. there after when you reconstruct the chain you would just add it.

NeerajKumar (Tue, 30 Jan 2018 17:57:29 GMT):
Has joined the channel.

ManjeetGambhir (Tue, 30 Jan 2018 20:00:12 GMT):
@rickr I am trying to load channel from TLS enabled orderer (FABRIC eco system is TLS enabled ) but getting below error:

ManjeetGambhir (Tue, 30 Jan 2018 20:00:14 GMT):
Orderer Properties Details : Properties ordererProperties = new Properties(); //ordererProperties.setProperty("pemFile", "PEM File Location for Member Pem File "); ordererProperties.setProperty("pemFile", "Tried with PEM File Location for Orderer Pem File "); // ret.setProperty("trustServerCertificate", "true"); //testing // environment only NOT FOR PRODUCTION! // ordererProperties.setProperty("hostnameOverride", orderName); ordererProperties.setProperty("sslProvider", "openSSL"); ordererProperties.setProperty("negotiationType", "TLS"); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] { 5L, TimeUnit.MINUTES }); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] { 20L, TimeUnit.SECONDS }); ordererProperties.setProperty("ordererWaitTimeMilliSecs", "10000"); ordererProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 99999999); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveWithoutCalls", new Object[] { true }); newChain.addOrderer( client.newOrderer(orderName, clsMemberOrg.getOrdererLocation(orderName), ordererProperties)); Fabric SDK Error: 2018-01-30 14:46:21.126 [main] ERROR *** - Error in initializing Chaneel... org.hyperledger.fabric.sdk.exception.TransactionException: Channel public sendDeliver failed on orderer orderer0. Reason: UNAVAILABLE: Channel closed while performing protocol negotiation Orderer Log Error: 2018-01-30 19:46:20.433 UTC [grpc] Printf -> DEBU 512c grpc: Server.Serve failed to complete security handshake from "10.2.28.204:64214": remote error: tls: internal error

ManjeetGambhir (Tue, 30 Jan 2018 20:00:39 GMT):
@rickr Can you please suggest where could be issue

ManjeetGambhir (Tue, 30 Jan 2018 20:12:09 GMT):
@rickr all grpc urls I am starting with grpcs

ManjeetGambhir (Tue, 30 Jan 2018 20:13:17 GMT):
I can see SslContext sslContext = GrpcSslContexts.forClient() .trustManager(new File(pem)) .sslProvider(sslprovider) .build(); this.channelBuilder = NettyChannelBuilder.forAddress(addr, port) .sslContext(sslContext) .negotiationType(ntype); if (cn != null) { channelBuilder.overrideAuthority(cn); } addNettyBuilderProps(channelBuilder, properties);

ManjeetGambhir (Tue, 30 Jan 2018 20:13:50 GMT):
populated successfully in Endpoint.java

ManjeetGambhir (Tue, 30 Jan 2018 20:14:03 GMT):
@rickr Can you please suggest

rickr (Tue, 30 Jan 2018 20:15:47 GMT):
most likely case is your certificate is not matching hostname

rickr (Tue, 30 Jan 2018 20:16:27 GMT):
or wrong certificate

ManjeetGambhir (Tue, 30 Jan 2018 20:20:00 GMT):
what should be the cert type ?

ManjeetGambhir (Tue, 30 Jan 2018 20:20:15 GMT):
Cert or Orderer?

ManjeetGambhir (Tue, 30 Jan 2018 20:20:26 GMT):
Cert of Orderer?**

ManjeetGambhir (Tue, 30 Jan 2018 20:21:50 GMT):
or certificate of Authorized member of Channel

rickr (Tue, 30 Jan 2018 20:23:08 GMT):
If you're connecting to the correct url and tls negotiation is failing the only thing I can think off the bat is your certificate ``` ordererProperties.setProperty("pemFile", "Tried with PEM File Location for Orderer Pem File "); ```

ManjeetGambhir (Tue, 30 Jan 2018 20:28:22 GMT):
but tried with peer cli but working fine

rickr (Tue, 30 Jan 2018 20:30:15 GMT):
http://support.qacafe.com/knowledge-base/how-do-i-display-the-contents-of-a-ssl-certificate/

rickr (Tue, 30 Jan 2018 20:30:24 GMT):
display out your certificate

rickr (Tue, 30 Jan 2018 20:30:30 GMT):
using openssl

rickr (Tue, 30 Jan 2018 20:32:15 GMT):
what jdk ?

ManjeetGambhir (Tue, 30 Jan 2018 20:33:29 GMT):
Certificate: Data: Version: 3 (0x2) Serial Number: 10213724175086464640 (0x8dbe7005c9d92e80) Signature Algorithm: ecdsa-with-SHA256 Issuer: commonName = Test TLS ICA organizationName = cls Validity Not Before: Oct 27 19:12:42 2017 GMT Not After : Oct 27 19:12:42 2018 GMT Subject: commonName = ord01.clsorder.cit.clsnet organizationalUnitName = clsorder organizationName = clsorder Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:57:7c:09:eb:91:2e:8d:14:39:ec:cb:92:7c:e0: 05:81:05:eb:b8:2e:e3:56:6c:86:d6:1d:e7:7c:9b: 29:4b:13:32:4a:14:17:8a:25:74:d3:45:c3:ff:09: 59:54:6c:03:ce:e1:9c:0d:00:d8:42:01:73:56:0f: af:ad:d0:e5:72 ASN1 OID: prime256v1 X509v3 extensions: X509v3 Subject Key Identifier: B3:45:69:07:52:9C:10:41:B3:DC:45:83:04:70:FB:E2:32:68:C6:F8 Signature Algorithm: ecdsa-with-SHA256 30:45:02:21:00:df:9b:a1:17:fb:e3:7e:ab:a4:83:0a:16:cb: 3b:67:6a:25:df:57:d0:7b:50:9b:9a:8e:52:3c:b6:55:3b:7c: 44:02:20:77:f1:34:9c:f1:7e:16:f6:c2:17:b7:f3:8b:93:06: 98:db:41:c6:25:c7:94:0c:71:84:87:74:7b:5e:77:f3:7f -----BEGIN CERTIFICATE----- MIIBhzCCAS2gAwIBAgIJAI2+cAXJ2S6AMAoGCCqGSM49BAMCMCUxDDAKBgNVBAoM A2NsczEVMBMGA1UEAwwMVGVzdCBUTFMgSUNBMB4XDTE3MTAyNzE5MTI0MloXDTE4 MTAyNzE5MTI0MlowSjERMA8GA1UEChMIY2xzb3JkZXIxETAPBgNVBAsTCGNsc29y ZGVyMSIwIAYDVQQDExlvcmQwMS5jbHNvcmRlci5jaXQuY2xzbmV0MFkwEwYHKoZI zj0CAQYIKoZIzj0DAQcDQgAEV3wJ65EujRQ57MuSfOAFgQXruC7jVmyG1h3nfJsp SxMyShQXiiV000XD/wlZVGwDzuGcDQDYQgFzVg+vrdDlcqMhMB8wHQYDVR0OBBYE FLNFaQdSnBBBs9xFgwRw++IyaMb4MAoGCCqGSM49BAMCA0gAMEUCIQDfm6EX++N+ q6SDChbLO2dqJd9X0HtQm5qOUjy2VTt8RAIgd/E0nPF+FvbCF7fzi5MGmNtBxiXH lAxxhId0e153838= -----END CERTIFICATE-----

ManjeetGambhir (Tue, 30 Jan 2018 20:33:46 GMT):
using jdk1.8

rickr (Tue, 30 Jan 2018 20:39:58 GMT):
open ? oracle .

rickr (Tue, 30 Jan 2018 20:41:04 GMT):
is this the location you have in your url ? ord01.clsorder.cit.clsnet

ManjeetGambhir (Tue, 30 Jan 2018 20:43:18 GMT):
nope

ManjeetGambhir (Tue, 30 Jan 2018 20:44:12 GMT):
this is just the common name

MartinKrmer (Tue, 30 Jan 2018 20:46:50 GMT):
Has joined the channel.

rickr (Tue, 30 Jan 2018 20:48:48 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/9b87b73b72c654de154141a003c1d558d4c98250/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L495

rickr (Tue, 30 Jan 2018 20:49:11 GMT):
try setting that property to that name

ManjeetGambhir (Tue, 30 Jan 2018 22:19:39 GMT):
Thanks Rick

ManjeetGambhir (Tue, 30 Jan 2018 22:19:51 GMT):
It's working now

ManjeetGambhir (Tue, 30 Jan 2018 22:19:58 GMT):
issue was with CN Name

ManjeetGambhir (Tue, 30 Jan 2018 23:04:28 GMT):
Hi Rick , one quick question , in application code we are fetching peer object from channel but over there there is no way to set PEM file {grpc.NettyChannelBuilderOption.keepAliveWithoutCalls=[Ljava.lang.Object;@270d54ea, negotiationType=TLS, grpc.NettyChannelBuilderOption.keepAliveTimeout=[Ljava.lang.Object;@4c0ac628, grpc.NettyChannelBuilderOption.maxInboundMessageSize=99999999, sslProvider=openSSL, hostnameOverride=peer0, grpc.NettyChannelBuilderOption.keepAliveTime=[Ljava.lang.Object;@78363803}

ManjeetGambhir (Tue, 30 Jan 2018 23:05:13 GMT):
Can you please suggest how to do that ..Call is failing in blockchainInfo = channel.queryBlockchainInfo(peer);

ManjeetGambhir (Tue, 30 Jan 2018 23:05:20 GMT):
with SSL error

rickr (Tue, 30 Jan 2018 23:15:28 GMT):
I don't follow the issue. When you create the Peer from the client you can give it any connections properties the same for the orderer

ManjeetGambhir (Tue, 30 Jan 2018 23:27:48 GMT):
resolved it ..

ManjeetGambhir (Tue, 30 Jan 2018 23:27:50 GMT):
thx

ManjeetGambhir (Tue, 30 Jan 2018 23:28:02 GMT):
missing one place in code to set pem file

ManjeetGambhir (Tue, 30 Jan 2018 23:28:14 GMT):
thanks for your prmopt supprt

ManjeetGambhir (Tue, 30 Jan 2018 23:28:34 GMT):
prompt response*

asaningmaxchain123 (Wed, 31 Jan 2018 06:50:52 GMT):
@rickr ```Reason: UNIMPLEMENTED: unknown service protos.Deliver``` when i run the End2endIT

asaningmaxchain123 (Wed, 31 Jan 2018 06:50:52 GMT):
@rickr ```Reason: UNIMPLEMENTED: unknown service protos.Deliver``` when i run the End2endIT ,can you take a look

rickr (Wed, 31 Jan 2018 13:20:57 GMT):
running latest again 1.0.x Fabric ?

rickr (Wed, 31 Jan 2018 13:20:57 GMT):
running latest against 1.0.x Fabric ?

asaningmaxchain123 (Wed, 31 Jan 2018 13:40:48 GMT):
es

asaningmaxchain123 (Wed, 31 Jan 2018 13:40:48 GMT):
yes

rickr (Wed, 31 Jan 2018 13:43:01 GMT):
Just running the integration by default assumes running against >v1.1

rickr (Wed, 31 Jan 2018 13:43:01 GMT):
Just running the integration by default assumes running against >=v1.1

asaningmaxchain123 (Wed, 31 Jan 2018 13:43:32 GMT):
@rickr i am sorry,let me check it ,

asaningmaxchain123 (Wed, 31 Jan 2018 13:44:35 GMT):

Clipboard - January 31, 2018 9:44 PM

asaningmaxchain123 (Wed, 31 Jan 2018 13:44:53 GMT):

Clipboard - January 31, 2018 9:44 PM

asaningmaxchain123 (Wed, 31 Jan 2018 13:46:04 GMT):
``` fabric-sdk-java jar 1.1.0-SNAPSHOT```

rickr (Wed, 31 Jan 2018 13:50:56 GMT):
think if you're running that against a

rickr (Wed, 31 Jan 2018 13:50:56 GMT):
think if you're running that against a

asaningmaxchain123 (Wed, 31 Jan 2018 13:56:10 GMT):

Clipboard - January 31, 2018 9:55 PM

asaningmaxchain123 (Wed, 31 Jan 2018 14:01:30 GMT):
@rickr i think i use the fabric v1.1 can match the fabric-java-sdk

asaningmaxchain123 (Wed, 31 Jan 2018 14:02:35 GMT):
for the foo channel,it acts the role without `NO_EVENT_SOURCE`

asaningmaxchain123 (Wed, 31 Jan 2018 14:02:45 GMT):
but the bar channel ,it doesn't

rickr (Wed, 31 Jan 2018 14:04:42 GMT):
I'll check the latest is passing

asaningmaxchain123 (Wed, 31 Jan 2018 14:36:43 GMT):

Clipboard - January 31, 2018 10:36 PM

asaningmaxchain123 (Wed, 31 Jan 2018 14:36:57 GMT):
i don't know why to do it,just for testing

rickr (Wed, 31 Jan 2018 14:40:29 GMT):
It also our tests

rickr (Wed, 31 Jan 2018 14:40:29 GMT):
It also our tests what does the comment a few lines above it say?

asaningmaxchain123 (Wed, 31 Jan 2018 14:41:18 GMT):
the error ocurr

asaningmaxchain123 (Wed, 31 Jan 2018 14:41:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jwTYeQpFwqWH5zQRM) @rickr yes

asaningmaxchain123 (Wed, 31 Jan 2018 14:42:05 GMT):

Clipboard - January 31, 2018 10:41 PM

asaningmaxchain123 (Wed, 31 Jan 2018 14:42:05 GMT):

Clipboard - January 31, 2018 10:41 PM

asaningmaxchain123 (Wed, 31 Jan 2018 14:42:05 GMT):

Clipboard - January 31, 2018 10:41 PM

rickr (Wed, 31 Jan 2018 14:42:12 GMT):
End2end passed

rickr (Wed, 31 Jan 2018 14:43:00 GMT):
End2endandBack had a tmeout but thats cause we run on slow machines .. trying it again

rickr (Wed, 31 Jan 2018 14:43:33 GMT):
I don't see your issue

asaningmaxchain123 (Wed, 31 Jan 2018 14:45:30 GMT):
can you take a look the picture

rickr (Wed, 31 Jan 2018 14:45:51 GMT):
ok

rickr (Wed, 31 Jan 2018 14:45:51 GMT):
ok nice picture :)

asaningmaxchain123 (Wed, 31 Jan 2018 14:47:33 GMT):
@rickr how can open the logging in the fabric-sdk-java

asaningmaxchain123 (Wed, 31 Jan 2018 14:47:33 GMT):
@rickr how can open the logging in the fabric-sdk-java itself

rickr (Wed, 31 Jan 2018 14:48:18 GMT):
see readme

asaningmaxchain123 (Wed, 31 Jan 2018 14:49:12 GMT):
got it

rickr (Wed, 31 Jan 2018 14:50:20 GMT):
The first error you showed me looked like a protobuf incompatibility most likely is latest going to v1.0.x peer

PhineasClick (Wed, 31 Jan 2018 14:50:26 GMT):
Has joined the channel.

asaningmaxchain123 (Wed, 31 Jan 2018 14:53:28 GMT):
please look this picture, the other ignores

asaningmaxchain123 (Wed, 31 Jan 2018 14:53:50 GMT):

Clipboard - January 31, 2018 10:52 PM

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:12 GMT):
it constructs the bar channel,

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:22 GMT):
from the source code ``` if (doPeerEventing && everyother) { newChannel.joinPeer(peer, createPeerOptions()); //Default is all roles. } else { // Set peer to not be all roles but eventing. newChannel.joinPeer(peer, createPeerOptions().setPeerRoles(PeerRole.NO_EVENT_SOURCE)); }```

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:41 GMT):
the peer1.org2.exmaple.com go to the if

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:41 GMT):
the peer1.org2.exmaple.com go to the `if`

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:41 GMT):
the peer1.org2.exmaple.com go to the `else`

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:41 GMT):
the peer1.org2.exmaple.com go to the `else`and then ```newChannel.joinPeer(peer, createPeerOptions().setPeerRoles(PeerRole.NO_EVENT_SOURCE))```

asaningmaxchain123 (Wed, 31 Jan 2018 14:55:41 GMT):
the peer1.org2.exmaple.com go to the `else`and then ```newChannel.joinPeer(peer, createPeerOptions().setPeerRoles(PeerRole.NO_EVENT_SOURCE))```,it will send join proposal to peer1.org2.example.com

rickr (Wed, 31 Jan 2018 14:56:15 GMT):
ok

rickr (Wed, 31 Jan 2018 14:57:26 GMT):
its providing a mix

rickr (Wed, 31 Jan 2018 14:57:39 GMT):
That test is passing

asaningmaxchain123 (Wed, 31 Jan 2018 14:57:52 GMT):
it doesn't pass

rickr (Wed, 31 Jan 2018 14:58:16 GMT):
for you

asaningmaxchain123 (Wed, 31 Jan 2018 14:58:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=onc69RgtFjcTWHtov) @rickr yes

asaningmaxchain123 (Wed, 31 Jan 2018 14:59:25 GMT):
it tell me the ```java.lang.Exception: io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service protos.Endorser```

asaningmaxchain123 (Wed, 31 Jan 2018 14:59:33 GMT):

Clipboard - January 31, 2018 10:58 PM

rickr (Wed, 31 Jan 2018 15:00:46 GMT):
docker ps -a ?

asaningmaxchain123 (Wed, 31 Jan 2018 15:01:51 GMT):

Clipboard - January 31, 2018 11:01 PM

rickr (Wed, 31 Jan 2018 15:02:46 GMT):
docker images

asaningmaxchain123 (Wed, 31 Jan 2018 15:03:44 GMT):
wait a moment,it's uploading

asaningmaxchain123 (Wed, 31 Jan 2018 15:03:58 GMT):

Clipboard - January 31, 2018 11:03 PM

rickr (Wed, 31 Jan 2018 15:04:05 GMT):
You can just paste the text :)

asaningmaxchain123 (Wed, 31 Jan 2018 15:04:15 GMT):
ok

asaningmaxchain123 (Wed, 31 Jan 2018 15:05:03 GMT):
i will do it later

rickr (Wed, 31 Jan 2018 15:05:16 GMT):
what tag does the peer have on `docker ps ` ?

asaningmaxchain123 (Wed, 31 Jan 2018 15:05:55 GMT):
it use the latest

rickr (Wed, 31 Jan 2018 15:06:09 GMT):
and what is that on docker images

asaningmaxchain123 (Wed, 31 Jan 2018 15:06:36 GMT):
it uses the latest too

asaningmaxchain123 (Wed, 31 Jan 2018 15:07:27 GMT):
can you tell me what's tag on docker images which you use

rickr (Wed, 31 Jan 2018 15:07:34 GMT):
look what latest is matched with on images

asaningmaxchain123 (Wed, 31 Jan 2018 15:07:41 GMT):
yes

rickr (Wed, 31 Jan 2018 15:08:07 GMT):
look

rickr (Wed, 31 Jan 2018 15:08:24 GMT):
Isn't latest an alias for beta something right below it ?

asaningmaxchain123 (Wed, 31 Jan 2018 15:08:41 GMT):
yes

asaningmaxchain123 (Wed, 31 Jan 2018 15:09:20 GMT):
so the peer images tag is x86_64-1.1.0-beta-snapshot-d7dd231

asaningmaxchain123 (Wed, 31 Jan 2018 15:09:20 GMT):
so the peer images tag is `x86_64-1.1.0-beta-snapshot-d7dd231`

rickr (Wed, 31 Jan 2018 15:09:46 GMT):
can you switch with alpha ?

rickr (Wed, 31 Jan 2018 15:10:05 GMT):
how recent is that beta

asaningmaxchain123 (Wed, 31 Jan 2018 15:10:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4dJFdmvjZmFYJhW8r) @rickr which commit should i use

asaningmaxchain123 (Wed, 31 Jan 2018 15:10:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4dJFdmvjZmFYJhW8r) @rickr which commit should i use?can you provide it

asaningmaxchain123 (Wed, 31 Jan 2018 15:11:27 GMT):
0f38dbc4d432fe07e63643966026ec9cfb44c358

asaningmaxchain123 (Wed, 31 Jan 2018 15:11:34 GMT):
https://github.com/hyperledger/fabric/commit/0f38dbc4d432fe07e63643966026ec9cfb44c358

rickr (Wed, 31 Jan 2018 15:12:56 GMT):
I'll try it with latest master in about an hour but I don't see that on our builds

rickr (Wed, 31 Jan 2018 15:13:06 GMT):
which pull latest

asaningmaxchain123 (Wed, 31 Jan 2018 15:14:56 GMT):
i use the master branch

asaningmaxchain123 (Wed, 31 Jan 2018 15:14:56 GMT):
before i use the master branch

asaningmaxchain123 (Wed, 31 Jan 2018 15:16:27 GMT):
where i can see the unit test End2endIT

asaningmaxchain123 (Wed, 31 Jan 2018 15:16:27 GMT):
where i can see the unit test End2endIT which you don't see error

rickr (Wed, 31 Jan 2018 15:16:49 GMT):
https://jenkins.hyperledger.org/job/fabric-sdk-java-verify-x86_64/1569/console

rickr (Wed, 31 Jan 2018 15:16:53 GMT):
just ran

rickr (Wed, 31 Jan 2018 15:17:16 GMT):
run against latest

rickr (Wed, 31 Jan 2018 15:17:52 GMT):

Clipboard - January 31, 2018 10:17 AM

asaningmaxchain123 (Wed, 31 Jan 2018 15:20:27 GMT):
@rickr no,i want to see where you run the End2endIT.java

asaningmaxchain123 (Wed, 31 Jan 2018 15:20:27 GMT):
@rickr no,i want to see where you run the End2endIT.java test

rickr (Wed, 31 Jan 2018 15:22:57 GMT):
it's thre

rickr (Wed, 31 Jan 2018 15:22:57 GMT):
it's there

asaningmaxchain123 (Wed, 31 Jan 2018 15:24:47 GMT):
yes,i am wrong

asaningmaxchain123 (Wed, 31 Jan 2018 15:29:26 GMT):
which version of the fabric

asaningmaxchain123 (Wed, 31 Jan 2018 15:29:50 GMT):
x86_64-1.1.0-beta-snapshot-d7dd231

asaningmaxchain123 (Wed, 31 Jan 2018 15:33:18 GMT):
it still exists

asaningmaxchain123 (Wed, 31 Jan 2018 15:34:01 GMT):

Clipboard - January 31, 2018 11:33 PM

asaningmaxchain123 (Wed, 31 Jan 2018 15:42:27 GMT):
x86_64-1.1.0-beta-snapshot-d7dd231 can you provide full commit id

asaningmaxchain123 (Wed, 31 Jan 2018 16:00:34 GMT):
@rickr you are right

asaningmaxchain123 (Wed, 31 Jan 2018 16:01:01 GMT):
i run it successfully

rickr (Wed, 31 Jan 2018 16:04:07 GMT):
commits > https://github.com/hyperledger/fabric/commits/master

asaningmaxchain123 (Wed, 31 Jan 2018 16:21:23 GMT):
i should use the 1.1.0-alpha

asaningmaxchain123 (Wed, 31 Jan 2018 16:21:23 GMT):
it must use the `1.1.0-alpha` can't use the ` 1.1.0-SNAPSHOT`

asaningmaxchain123 (Wed, 31 Jan 2018 16:30:58 GMT):
i diff it,i find the source code it doesn't different

asaningmaxchain123 (Wed, 31 Jan 2018 16:30:58 GMT):
i diff it,i find the source code it has nothing different

niteshsolanki (Wed, 31 Jan 2018 17:54:56 GMT):
Hi @rickr Is it possible to build a light wallet sdk using JAVA-sdk running on android phone?

rickr (Wed, 31 Jan 2018 18:02:34 GMT):
I don't think its a case of just running it there. Most likely the crypto libraries would be an issue .

niteshsolanki (Wed, 31 Jan 2018 18:05:05 GMT):
oh. You mean to say the crypto libraries used wil not be compatible to run on Android?

rickr (Wed, 31 Jan 2018 18:08:03 GMT):
I'm _guessing_ that would be one area of issue in porting

niteshsolanki (Wed, 31 Jan 2018 18:15:26 GMT):
Ok. Thanks @rickr

niteshsolanki (Wed, 31 Jan 2018 18:19:56 GMT):
@rickr which crypto library java SDK uses?

niteshsolanki (Wed, 31 Jan 2018 18:28:09 GMT):
@rickr is the crypto lib same as described below: https://developer.android.com/reference/java/security/package-summary.html

rickr (Wed, 31 Jan 2018 18:38:09 GMT):
We make use in many cases bouncy castle because JCA?JCE does not cover what we needed. We've tried to minimize but its still present.

niteshsolanki (Thu, 01 Feb 2018 04:43:42 GMT):
ok. thanks @rickr . any guidelines on how do we build a lightweight version of the current java SDK ? which specific lib should be replaced and make them compatible to be executed on light devices?

absingh0 (Thu, 01 Feb 2018 05:35:26 GMT):
HI @rickr! Thanks for your reply. I have another problem now. I have two organisations say org1 and org2 and each of these orgs have 2 peers. I have create a channel name foo using peer0 of org1 and now I am trying to join the peers from both the organisations. But I am getting an error while joining peers of org2. ```java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err Expected MSP ID Org2MSP, received Org1MSP ```

absingh0 (Thu, 01 Feb 2018 05:35:26 GMT):
Hi @rickr! Thanks for your reply. I have another problem now. I have two organisations say org1 and org2 and each of these orgs have 2 peers. I have create a channel name foo using peer0 of org1 and now I am trying to join the peers from both the organisations. But I am getting an error while joining peers of org2. ```java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: Failed to deserialize creator identity, err Expected MSP ID Org2MSP, received Org1MSP ```

Sahas 2 (Thu, 01 Feb 2018 08:16:59 GMT):
Has joined the channel.

zerppen (Thu, 01 Feb 2018 09:01:33 GMT):
@rickr Hi rickr,I found there are some misunderstood in fabric-sdk-java:

zerppen (Thu, 01 Feb 2018 09:02:18 GMT):
`defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.mspid", "Org1MSP"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.domname", "org1.example.com"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.ca_location", "http://localhost:7054"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.caName", "ca0"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.peer_locations", "peer0.org1.example.com@grpc://localhost:7051, peer1.org1.example.com@grpc://localhost:7056"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.orderer_locations", "orderer.example.com@grpc://localhost:7050"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.eventhub_locations", "peer0.org1.example.com@grpc://localhost:7053,peer1.org1.example.com@grpc://localhost:7058"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.mspid", "Org2MSP"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.domname", "org2.example.com"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.ca_location", "http://localhost:8054"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.peer_locations", "peer0.org2.example.com@grpc://localhost:8051,peer1.org2.example.com@grpc://localhost:8056"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.orderer_locations", "orderer.example.com@grpc://localhost:7050"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.eventhub_locations", "peer0.org2.example.com@grpc://localhost:8053, peer1.org2.example.com@grpc://localhost:8058");`

zerppen (Thu, 01 Feb 2018 09:03:29 GMT):
` defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.orderer_locations", "orderer.example.com@grpc://localhost:7050"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.orderer_locations", "orderer.example.com@grpc://localhost:7050")`

zerppen (Thu, 01 Feb 2018 09:03:58 GMT):
` defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.orderer_locations", "orderer.example.com@grpc://localhost:7050") `

zerppen (Thu, 01 Feb 2018 09:05:16 GMT):
` orderer ` must be a * indenpendent organization *

daygee (Thu, 01 Feb 2018 10:11:51 GMT):
hey guys, something to note, in a case when you're not using tls in your network configuration, in the network-config.yaml file that the sdk uses, you can change the negotiationType to plainText, especially for the fabcar network

gauravgiri (Thu, 01 Feb 2018 11:10:28 GMT):
Hi @rickr , any plans for implementing connection profile in fabric-sdk-java v1.1, like one being part of fabric-sdk-node https://jira.hyperledger.org/browse/FAB-5363, https://fabric-sdk-node.github.io/tutorial-network-config.html?

bfuentes@fr.ibm.com (Thu, 01 Feb 2018 13:42:46 GMT):
@rickr is the SDK compatible with Android development ?

bfuentes@fr.ibm.com (Thu, 01 Feb 2018 13:47:59 GMT):
I ask the question because I see in documentation "JDK 1.8 "

bfuentes@fr.ibm.com (Thu, 01 Feb 2018 13:49:12 GMT):
and also this => "JCE libraries"

bfuentes@fr.ibm.com (Thu, 01 Feb 2018 15:08:38 GMT):
@rickr does not look to work, even targeting java 1.8

bfuentes@fr.ibm.com (Thu, 01 Feb 2018 15:08:39 GMT):
Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar

bfuentes@fr.ibm.com (Thu, 01 Feb 2018 15:09:06 GMT):
Desugar feature does not work with fabric-sdk-java

tsnyder (Thu, 01 Feb 2018 16:03:32 GMT):
Using the E2E test code as a pattern, I have written some wrapper code around the java sdk wrapper to instantiate and maintain the channel information. After calling the channel.initialize() function I check the initialized and shutdown flags - they are fine ( true, false). Prior to invoking channel.sendTransaction() I check again and find that the initialized and shutdown flags are ( true, true). Any ideas on why the shutdown flag is subsequently being set to true?

rickr (Thu, 01 Feb 2018 17:48:54 GMT):
@tsnyder I don't see a case of that running the integration tests. I put in additional assert and ran in debugger with bkpts on when the shutdown field changed. Only times I seen was when the channel was explicitly called to shutdown or when it finalized.

rickr (Thu, 01 Feb 2018 17:50:36 GMT):
@zerppen The really is just one orderer as dockercompose only starts one. Just two reference to the same one.

rickr (Thu, 01 Feb 2018 17:52:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Kd5w9KeA7r7K6T5rL) @absingh0 You can't join peers from two seperate orgs into the same channel join one and add the other.

Lesforest (Thu, 01 Feb 2018 21:46:27 GMT):
Has joined the channel.

NiranjanKulkarni (Fri, 02 Feb 2018 06:34:56 GMT):
Has joined the channel.

absingh0 (Fri, 02 Feb 2018 09:31:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=XGhSM9qeq8ACtLPpJ) @rickr How about doing this way? ```SampleOrg sampleOrg = testConfig.getIntegrationTestsSampleOrg("peerOrg1"); Channel fooChannel = constructChannel(FOO_CHANNEL_NAME, client, sampleOrg); // testSampleOrgs.remove(sampleOrg); for (SampleOrg testOrg : testSampleOrgs) { client.setUserContext(testOrg.getPeerAdmin()); for (String peerName : testOrg.getPeerNames()) { String peerLocation = testOrg.getPeerLocation(peerName); Properties peerProperties = testConfig.getPeerProperties(peerName); if (peerProperties == null) { peerProperties = new Properties(); } peerProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); Peer peer = client.newPeer(peerName, peerLocation, peerProperties); fooChannel.joinPeer(peer); out("Peer %s joined channel %s", peerName, FOO_CHANNEL_NAME); testOrg.addPeer(peer); } for (String eventHubName : testOrg.getEventHubNames()) { final Properties eventHubProperties = testConfig.getEventHubProperties(eventHubName); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] { 5L, TimeUnit.MINUTES }); eventHubProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] { 8L, TimeUnit.SECONDS }); EventHub eventHub = client.newEventHub(eventHubName, testOrg.getEventHubLocation(eventHubName), eventHubProperties); fooChannel.addEventHub(eventHub); } fooChannel.initialize(); } ```

absingh0 (Fri, 02 Feb 2018 09:32:15 GMT):
```private Channel constructChannel(String name, HFClient client, SampleOrg sampleOrg) throws Exception { //////////////////////////// // Construct the channel // out("Constructing channel %s", name); // Only peer Admin org client.setUserContext(sampleOrg.getPeerAdmin()); Collection orderers = new LinkedList<>(); for (String orderName : sampleOrg.getOrdererNames()) { Properties ordererProperties = testConfig.getOrdererProperties(orderName); // example of setting keepAlive to avoid timeouts on inactive http2 // connections. // Under 5 minutes would require changes to server side to accept // faster ping rates. ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] { 5L, TimeUnit.MINUTES }); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] { 8L, TimeUnit.SECONDS }); orderers.add(client.newOrderer(orderName, sampleOrg.getOrdererLocation(orderName), ordererProperties)); } // Just pick the first orderer in the list to create the channel. Orderer anOrderer = orderers.iterator().next(); orderers.remove(anOrderer); ChannelConfiguration channelConfiguration = new ChannelConfiguration( new File(TEST_FIXTURES_PATH + "/sdkintegration/e2e-2Orgs/channel/" + name + ".tx")); // Create channel that has only one signer that is this orgs peer admin. // If channel creation policy needed more signature they would need to // be added too. Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin())); out("Created channel %s", name); for (Orderer orderer : orderers) { // add remaining orderers if any. newChannel.addOrderer(orderer); } // newChannel.initialize(); out("Finished initialization channel %s", name); return newChannel; } ``` And this is my constructChannel function..

siddesh_sangodkar (Fri, 02 Feb 2018 10:31:46 GMT):
Has joined the channel.

tsnyder (Fri, 02 Feb 2018 15:44:23 GMT):
@rickr - Figured out the shutdown flag turning to false. It resulted from the TransactionProposalRequest fqn not being set.

rickr (Fri, 02 Feb 2018 18:00:00 GMT):
huh ? Don't follow that shuts down the application ?

rickr (Fri, 02 Feb 2018 18:00:00 GMT):
huh ? Don't follow that shuts down the channel ?

rickr (Fri, 02 Feb 2018 18:00:00 GMT):
huh ? Don't follow that shuts down the channel ? Give more details please.

tsnyder (Fri, 02 Feb 2018 19:36:14 GMT):
If I comment out the line where I am setting the fqn method I get the following errors. The second set of errors is from the retry.

tsnyder (Fri, 02 Feb 2018 19:36:25 GMT):
Channel = mgmtorg3channel; initialized flag = true; shutdown flag = false 19:33:58.378 [main] ERROR sdkwrapper.service.FabricServices - Endorsement Exception. Exception = java.lang.NullPointerException org.hyperledger.fabric.sdk.exception.ProposalException: java.lang.NullPointerException at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2160) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2103) at sdkwrapper.service.FabricServices.requestTransaction(FabricServices.java:188) at sdkwrapper.kafka.WrapperKafkaConsumer.consume(WrapperKafkaConsumer.java:106) at sdkwrapper.runtimemgr.RuntimeMgrEmbedded.initialize(RuntimeMgrEmbedded.java:76) at sdkwrapper.runtimemgr.RuntimeMgrEmbedded.main(RuntimeMgrEmbedded.java:222) Caused by: java.lang.NullPointerException at com.google.protobuf.ByteString.copyFrom(ByteString.java:389) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.createChaincodeInvocationSpec(ProposalBuilder.java:161) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.createFabricProposal(ProposalBuilder.java:121) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.build(ProposalBuilder.java:101) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2154) ... 5 more Endorsement URL for peer0.Org2 = grpc://peer0-org2:7051 Endorsement URL for peer0.Org1 = grpc://peer0-org1:7051 Orderer URL for orderer.service = grpc://orderer-service:7050 Event Hub URL for peer0.Org1 = grpc://peer0-org1:7053 Channel = mgmtorg2channel; initialized flag = true; shutdown flag = false 19:33:58.414 [main] ERROR sdkwrapper.service.FabricServices - Endorsement Exception. Exception = Channel mgmtorg2channel has been shutdown. org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Channel mgmtorg2channel has been shutdown. at org.hyperledger.fabric.sdk.Channel.checkChannelState(Channel.java:1517) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2135) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:2103) at sdkwrapper.service.FabricServices.requestTransaction(FabricServices.java:188) at sdkwrapper.kafka.WrapperKafkaConsumer.consume(WrapperKafkaConsumer.java:106) at sdkwrapper.runtimemgr.RuntimeMgrEmbedded.initialize(RuntimeMgrEmbedded.java:76) at sdkwrapper.runtimemgr.RuntimeMgrEmbedded.main(RuntimeMgrEmbedded.java:222)

rickr (Fri, 02 Feb 2018 20:12:24 GMT):
Ok - reproduce the NPE in our e2e integration test my not setting fqn when we do the move as you stated. Something we need to address :) However I captured the exception around the test method that runs the whole chaincode .. and the channel was *not* shutdown

rickr (Fri, 02 Feb 2018 20:12:24 GMT):
Ok - reproduce the NPE in our e2e integration test by not setting fqn when we do the move as you stated. Something we need to address :) However I captured the exception around the test method that runs the whole chaincode .. and the channel was *not* shutdown

rickr (Fri, 02 Feb 2018 20:13:36 GMT):
Tim, any chance you could debug ? set a break pt on the shutdown method and see what is actually calling that ?

rickr (Fri, 02 Feb 2018 20:13:36 GMT):
@tsnyder , any chance you could debug ? set a break pt on the shutdown method and see what is actually calling that ?

rickr (Fri, 02 Feb 2018 20:13:36 GMT):
@tsnyder , any chance you could debug ? set a break pt on the shutdown method and see what is actually calling that ? Make sure if you do capture it that name is your channel name .. the sdk sometimes creates system channel under the cover that will finalize .. but should not have your name

rickr (Fri, 02 Feb 2018 20:16:26 GMT):
The only time the SDK I think calls that on it's own is if the channel is finalized

tsnyder (Fri, 02 Feb 2018 20:35:46 GMT):
@rickr - Figuring out how to debug in a docker container inside kubernetes is my next learning task. Pointers will be appreciated. :)

rickr (Fri, 02 Feb 2018 20:40:40 GMT):
put your IDE in the container and use xwindows for a session ... :) :)

rickr (Fri, 02 Feb 2018 20:45:16 GMT):
If you can change the SDK you could log a stack trace in the shutdown method .. like I said log name of the channel too

albert.lacambra (Sun, 04 Feb 2018 13:19:19 GMT):
Hi

albert.lacambra (Sun, 04 Feb 2018 13:20:17 GMT):
there is some way to validate that the received endorsements satisfy the chaincode policies?

albert.lacambra (Sun, 04 Feb 2018 13:21:15 GMT):
something like ChaincodeEndorsementPolicy.isStatisfied(Collection endorments)

albert.lacambra (Sun, 04 Feb 2018 13:21:16 GMT):
?

krisava (Sun, 04 Feb 2018 17:24:06 GMT):
Hi, This is regarding the "Blockchain Instance on Bluemix", in the "Blockchain-GUI". What is the purpose of the "Certificates tab under Members"? As I could able to post a transaction or read a transaction from the client connecting to the "Peer" without even uploading the "Client side certificate" on to the "Certificates tab under Members". So, I am not sure what is the purpose of "Certificates tab under Members". And how is it secure to control the client to Post or Read transactions from Blockchain? Thanks.

rickr (Sun, 04 Feb 2018 18:20:41 GMT):
@albert.lacambra No not really. As the application/SDK you don't know for sure what the endorsement policies are currently. Even if you created the chaincode with a specific endorsement policy there's no quarantine that someone from some other organization has modified it in the interim.

rickr (Sun, 04 Feb 2018 18:20:41 GMT):
@albert.lacambra No not really. As the application/SDK you don't know for sure what the endorsement policies are currently. Even if you instantiated the chaincode with a specific endorsement policy there's no quarantine that someone from some other organization has modified it in the interim.

rickr (Sun, 04 Feb 2018 18:20:41 GMT):
@albert.lacambra No not really. As the application/SDK you don't know for sure what the endorsement policies are currently. Even if you instantiated the chaincode with a specific endorsement policy there's no guarantee that someone from some other organization has modified it in the interim.

rickr (Sun, 04 Feb 2018 18:20:41 GMT):
@albert.lacambra No not really. As the application/SDK you don't know for sure what the endorsement policies are currently. Even if you instantiated the chaincode with a specific endorsement policy there's no guarantee that someone from some other organization has modified it in the interim. Our integration tests do check for testing purposes - that all proposals we sent got valid endorsements which may be a _little_ misleading. The application should make sure that all returned endorsements are verfied.

rickr (Sun, 04 Feb 2018 18:45:38 GMT):
@krisava IBM Blockchain is not supported here. I've been told you should open a ticket with IBM for support.

rickr (Sun, 04 Feb 2018 18:45:38 GMT):
@krisava IBM Blockchain is not supported here. I've been told you should open a ticket with IBM for support. I think you can also look at developerworks and maybe even stackoverflow with tags ibm, ibm-cloud, blockchain

rickr (Sun, 04 Feb 2018 18:45:38 GMT):
@krisava IBM Blockchain is not supported here. I've been told you should open a ticket with IBM for support. I think you can also look at developerworks and maybe even stackoverflow with tags ibm, ibm-cloud, blockchain

albert.lacambra (Sun, 04 Feb 2018 19:08:37 GMT):
wouldn't it be useful to have the possivility to "extract" the current policies, so that they could be verified before to be sent?

albert.lacambra (Sun, 04 Feb 2018 19:10:11 GMT):
how should then the client choose to which peers should be the proposal request sent?

rickr (Sun, 04 Feb 2018 19:18:27 GMT):
Knowing which other organization and peer location is currently _out of bound_ information_. Given you know what they are I would send them to all peers for endorsements. On return, select those endorsements that are successful and verified Send them to the orderer .. let it and the committing peers do their work. The future you get back will fail if there were insufficient endorsements. Or you can monitor the blocks for transactions to see if failed.

albert.lacambra (Sun, 04 Feb 2018 21:21:00 GMT):
Exist a way to discover peers and Anchor peers taking part in a channel or must be this information being known in forehand?

rickr (Sun, 04 Feb 2018 21:28:32 GMT):
There is a way to know anchor peers but not enough information to reliably connect. Today you should assume you need to know that before hand. There is something planned in the future to do peer discovery

rickr (Sun, 04 Feb 2018 21:28:32 GMT):
There is a way to know anchor peers but not enough information to reliably connect. Today you should assume you need to know that before hand. There is something planned in the future to do peer discovery FAB-5451

zzylmt (Mon, 05 Feb 2018 02:17:43 GMT):
Has joined the channel.

krisava (Mon, 05 Feb 2018 14:22:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=f4Juz8RnZKwd7xoRM) @rickr Thanks @rickr

niteshsolanki (Mon, 05 Feb 2018 16:32:09 GMT):
@rickr i am getting following issue while trying to connect to orderer "Jetty ALPN/NPN has not been properly configured". how do i handle this issue ?

aatkddny (Mon, 05 Feb 2018 16:52:15 GMT):
Caveat - I'm using spring boot, but adding io.netty netty-tcnative 2.0.6.Final provided fixed it [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zTNooHHFXNkhQDB3A) @niteshsolanki

aatkddny (Mon, 05 Feb 2018 16:52:15 GMT):
Caveat - I'm using spring boot, but adding io.netty netty-tcnative 2.0.6.Final provided fixed it [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zTNooHHFXNkhQDB3A) @niteshsolanki

niteshsolanki (Mon, 05 Feb 2018 17:05:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=69zRqqdikJ5fAFpJq) @aatkddny thanks for the solution

siddesh_sangodkar (Tue, 06 Feb 2018 09:11:47 GMT):
Hi! i tried adding fabric-sdk-java-1.0.1.jar in an android project. `Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process`

siddesh_sangodkar (Tue, 06 Feb 2018 09:11:47 GMT):
Hi! i tried adding fabric-sdk-java-1.0.1.jar in an android project. ` Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process `

siddesh_sangodkar (Tue, 06 Feb 2018 09:11:47 GMT):
Hi! i tried adding fabric-sdk-java-1.0.1.jar in an android project. ` Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process `

siddesh_sangodkar (Tue, 06 Feb 2018 09:11:47 GMT):
Hi! i tried adding fabric-sdk-java-1.0.1.jar in an android project (JDK 1.8). Getting this error ``` Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process ```

siddesh_sangodkar (Tue, 06 Feb 2018 09:11:47 GMT):
Hi! i tried adding fabric-sdk-java-1.0.1.jar in an android project (JDK 1.8). Getting this error ``` Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process ``` @rickr @bfuentes@fr.ibm.com

siddesh_sangodkar (Tue, 06 Feb 2018 09:11:47 GMT):
Hi! i tried adding fabric-sdk-java-1.0.1.jar in an android project (Android studio 2.3, JDK 1.8). Getting this error ``` Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process ``` @rickr @bfuentes@fr.ibm.com

krisava (Tue, 06 Feb 2018 17:25:15 GMT):
Hi, getting the below exception. Can anyone help?

krisava (Tue, 06 Feb 2018 17:25:17 GMT):
UNIMPLEMENTED: unknown service protos.Deliver

rickr (Tue, 06 Feb 2018 19:26:31 GMT):
most likely this https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fabric-v10-considerations

krisava (Tue, 06 Feb 2018 19:31:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pdi3GkGPrzqBHFQLX) @rickr Looks like, as I was not having issues till early this week and just started seeing when I did the maven update. Also, I see compilation issues with respect to the fabric-sdk-java latest update Channel.setTransactionWaitTime Channel.setDeployWaitTime Any idea on how to get this resolved, "UNIMPLEMENTED: unknown service protos.Deliver" issue?

rickr (Tue, 06 Feb 2018 19:32:13 GMT):
remove them

krisava (Tue, 06 Feb 2018 19:33:52 GMT):
yes, I have commented them. but still I get this error "UNIMPLEMENTED: unknown service protos.Deliver".

rickr (Tue, 06 Feb 2018 19:34:36 GMT):
most like your using the v1.1 client against a v1.0.x fabric

rickr (Tue, 06 Feb 2018 19:34:36 GMT):
most likely your using the v1.1 client against a v1.0.x fabric

krisava (Tue, 06 Feb 2018 19:37:22 GMT):
Thanks, @rickr

crj (Wed, 07 Feb 2018 06:57:22 GMT):
Has joined the channel.

deepbreath (Wed, 07 Feb 2018 09:26:52 GMT):
Has joined the channel.

markthedark (Wed, 07 Feb 2018 13:08:12 GMT):
hello, I'm having some troubles communicating with peer using the SDK, after sending a query request, i get: Sending proposal to peer failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: http: read on closed response body), cause=null}: java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: http: read on closed response body)

markthedark (Wed, 07 Feb 2018 13:08:12 GMT):
hello, I'm having some troubles communicating with peer using the SDK, after sending a query request, i get: ```Sending proposal to peer failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 500, message: http: read on closed response body), cause=null}: java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: chaincode error (status: 500, message: http: read on closed response body)```

schwinnez (Wed, 07 Feb 2018 16:08:21 GMT):
Has joined the channel.

WaheedShahani (Thu, 08 Feb 2018 22:40:21 GMT):
Has joined the channel.

gauravgiri (Fri, 09 Feb 2018 04:02:53 GMT):
Hi @rickr , This is regarding the implementation of Network Profile in fabric-sdk-java mentioned in JIRA "https://jira.hyperledger.org/browse/FAB-5632". As per the JIRA the fix version for this is v1.2, and also it is NOT mentioned as one of the release features for fabric v1.1.0-alpha at: https://github.com/hyperledger/fabric/releases/tag/v1.1.0-alpha However, if I pull the source of fabric-sdk-java with tag "v1.1.0-alpha", I could see that Network Profile is implemented in class "org.hyperledger.fabric.sdk.NetworkConfig". Also, there is a reference implementation in tests at: src\test\java\org\hyperledger\fabric\sdkintegration\NetworkConfigIT.java Request you to please clarify, if this feature is available for use for fabric-sdk-java on v1.1.0-alpha?

gauravgiri (Fri, 09 Feb 2018 04:02:53 GMT):
Hi @rickr , This is regarding the implementation of Network Profile in fabric-sdk-java mentioned in JIRA "https://jira.hyperledger.org/browse/FAB-5632". As per the JIRA the fix version for this is v1.2, and also it is NOT mentioned as one of the release features for fabric v1.1.0-alpha at: https://github.com/hyperledger/fabric/releases/tag/v1.1.0-alpha However, if I pull the source of fabric-sdk-java with tag "v1.1.0-alpha", I could see that Network Profile is implemented in class "org.hyperledger.fabric.sdk.NetworkConfig". Also, there is a reference implementation in tests at: src\test\java\org\hyperledger\fabric\sdkintegration\NetworkConfigIT.java Request you to please clarify, if this feature of Network Config is available for use for production applications on fabric-sdk-java for fabric version v1.1.0-alpha?

rickr (Fri, 09 Feb 2018 04:07:37 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fab-5632-implement-connection-profile-for-java-sdk

gauravgiri (Fri, 09 Feb 2018 04:10:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H6iKD3ZAc6nZMQRje) @rickr Thanks @rickr for clarifying. That means the JIRA https://jira.hyperledger.org/browse/FAB-5632 should be correctly updated with fix version as v1.1 instead of current v1.2?

rickr (Fri, 09 Feb 2018 04:12:00 GMT):
did it

gauravgiri (Fri, 09 Feb 2018 04:15:55 GMT):
Thank you @rickr

rickr (Fri, 09 Feb 2018 04:17:47 GMT):
yw

Brandon (Sun, 11 Feb 2018 08:40:35 GMT):
Has joined the channel.

rickr (Sun, 11 Feb 2018 23:56:34 GMT):
Following shows an application using peers for two separate organizations. Creating the channel. Having each organization join their peers. Installing chaincode and setting an endorsement policy for both organizations needing to sign. Having each organization request endorsements from the others peers executing the chaincode. Finally having a user with a member level credentials reconstructing the channel and invoking the chaincode. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Sun, 11 Feb 2018 23:56:34 GMT):
Following is a demo using peers from two separate organizations. Creating the channel. Having each organization join their peers. Installing chaincode and setting an endorsement policy for both organizations needing to sign. Having each organization request endorsements from the others peers executing the chaincode. Finally having a user with a member level credentials reconstructing the channel and invoking the chaincode. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Sun, 11 Feb 2018 23:56:34 GMT):
Following is a demo using peers from two separate organizations. Creating the channel. Having each organization join their peers. Installing chaincode and setting an endorsement policy for both organizations needing to sign. Having each organization request endorsements from the others peers executing the chaincode. Finally having a user with a member level credentials reconstructing the channel and invoking the chaincode. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Mon, 12 Feb 2018 00:14:40 GMT):

shubhamvrkr (Mon, 12 Feb 2018 05:03:28 GMT):
Has joined the channel.

parags (Wed, 14 Feb 2018 06:54:11 GMT):
Has joined the channel.

rezalesmana (Wed, 14 Feb 2018 07:30:46 GMT):
Has joined the channel.

parags (Wed, 14 Feb 2018 08:24:47 GMT):
Hi all... i am trying to build the fabric-java-sdk. I've started a sample network using 'network.sh' which is part of fabric src. 'mvn install' tests are failing. Among the first interesting logs are the following... "2018-02-14 08:18:30,822 main WARN SampleStore:90 - Could not find the file "/tmp/HFCSampletest.properties" 2018-02-14 08:18:30,856 main ERROR HFCAClient:1324 - org.hyperledger.fabric.sdk.exception.CryptoException: Unable to add CA certificate to trust store. Error: File 'nofile.pem' does not exist. Can somebody please help here, so that I can continue to make progress. Can you please send me a sample "HFCSampletest.properties". Thanks

shalinigpt (Wed, 14 Feb 2018 09:09:03 GMT):
Has joined the channel.

masanchez (Wed, 14 Feb 2018 11:31:59 GMT):
Has joined the channel.

rickr (Wed, 14 Feb 2018 14:30:14 GMT):
there is no `network.sh`

rickr (Wed, 14 Feb 2018 14:30:41 GMT):
You need to start the docker image provided by the SDK

parags (Wed, 14 Feb 2018 16:00:35 GMT):
Thanks @rickr ... by docker image provided by the SDK, I hope you mean './src/test/fixture/sdkintegration/fabric.sh'. I tried with this too. Still get the same issue... also get a connection refused to localhost:99. Please see below.

parags (Wed, 14 Feb 2018 16:00:38 GMT):
2018-02-14 15:55:25,379 main ERROR HFCAClient:1324 - org.hyperledger.fabric.sdk.exception.CryptoException: Unable to add CA certificate to trust store. Error: File 'nofile.pem' does not exist 2018-02-14 15:55:25,381 main WARN SampleStore:90 - Could not find the file "/tmp/HFCSampletest.properties" 2018-02-14 15:55:25,381 main WARN SampleStore:90 - Could not find the file "/tmp/HFCSampletest.properties" 2018-02-14 15:55:25,383 main WARN SampleStore:90 - Could not find the file "/tmp/HFCSampletest.properties" 2018-02-14 15:55:25,383 main WARN SampleStore:90 - Could not find the file "/tmp/HFCSampletest.properties" 2018-02-14 15:55:26,116 main ERROR HFCAClient:444 - Connect to localhost:99 [localhost/127.0.0.1] failed: Connection refused (Connection refused) org.apache.http.conn.HttpHostConnectException: Connect to localhost:99 [localhost/127.0.0.1] failed: Connection refused (Connection refused) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)

parags (Wed, 14 Feb 2018 16:01:59 GMT):
i am simply firing off a "mvn install" from fabric-sdk-java directory after starting the fabric as above. What am I doing wrong?

rickr (Wed, 14 Feb 2018 16:08:56 GMT):
is there at the bottom https://github.com/hyperledger/fabric-sdk-java#running-the-unit-tests

rickr (Wed, 14 Feb 2018 16:08:56 GMT):
https://github.com/hyperledger/fabric-sdk-java#running-the-unit-tests

rickr (Wed, 14 Feb 2018 16:09:37 GMT):
https://github.com/hyperledger/fabric-sdk-java#running-the-integration-tests

parags (Wed, 14 Feb 2018 16:29:43 GMT):
Thanks @rickr ... i had success running the integration tests. Tests run: 42, Failures: 0, Errors: 2, Skipped: 2. Got a BUILD SUCCESS.

parags (Wed, 14 Feb 2018 16:30:07 GMT):
Running unit tests still fails though (BUILD FAILURE).

parags (Wed, 14 Feb 2018 16:30:54 GMT):
Thanks for your help. I can continue working with the integration test artifacts.

DipenChawla (Wed, 14 Feb 2018 19:48:54 GMT):
Has joined the channel.

gauravgiri (Thu, 15 Feb 2018 14:32:25 GMT):
Hi @rickr, I created a blockchain network using docker images for version "x86_64-1.1.0-alpha", that is using fabric-sdk-java/src/test/fixture/sdkintegration/docker-compose.yaml. Then, i ran the End2endIT tests using: fabric-sdk-java/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java However, i get the below error while creating the channel: "java.lang.IndexOutOfBoundsException: readerIndex(0) + length(10) exceeds writerIndex(0): PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 30)", any idea? RUNNING: End2endIT. 2018-02-15 14:23:06,422 main WARN SampleStore:90 - Could not find the file "C:\Gaurav\IBM\workspace\AIG\source\fabric-sdk-java\HFCSampletest.properties" 2018-02-15 14:23:06,427 main WARN SampleStore:90 - Could not find the file "C:\Gaurav\IBM\workspace\AIG\source\fabric-sdk-java\HFCSampletest.properties" Constructing channel foo 2018-02-15 14:23:09,345 grpc-default-executor-0 ERROR OrdererClient:152 - Received error on channel foo, orderer orderer.example.com, url grpc://localhost:7050, UNKNOWN io.grpc.StatusRuntimeException: UNKNOWN at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException: readerIndex(0) + length(10) exceeds writerIndex(0): PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 30) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1403) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1390) at io.netty.buffer.AbstractByteBuf.readSlice(AbstractByteBuf.java:856) at io.netty.handler.codec.http2.DefaultHttp2FrameWriter$DataFrameHeader.slice(DefaultHttp2FrameWriter.java:644) at io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(DefaultHttp2FrameWriter.java:160) at io.netty.handler.codec.http2.Http2OutboundFrameLogger.writeData(Http2OutboundFrameLogger.java:44) at io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder$FlowControlledData.write(DefaultHttp2ConnectionEncoder.java:411) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$FlowState.writeAllocatedBytes(DefaultHttp2RemoteFlowController.java:372) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$WritabilityMonitor$1.write(DefaultHttp2RemoteFlowController.java:562)

gauravgiri (Thu, 15 Feb 2018 14:33:37 GMT):
Hi @rickr, I created a blockchain network using docker images for version "x86_64-1.1.0-alpha", that is using fabric-sdk-java/src/test/fixture/sdkintegration/docker-compose.yaml. Then, i ran the End2endIT tests using: fabric-sdk-java/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java However, i get the below error while creating the channel: "java.lang.IndexOutOfBoundsException: readerIndex(0) + length(10) exceeds writerIndex(0): PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 30)", any idea? RUNNING: End2endIT. 2018-02-15 14:23:06,422 main WARN SampleStore:90 - Could not find the file "C:\Gaurav\workspace\source\fabric-sdk-java\HFCSampletest.properties" 2018-02-15 14:23:06,427 main WARN SampleStore:90 - Could not find the file "C:\Gaurav\workspace\source\fabric-sdk-java\HFCSampletest.properties" Constructing channel foo 2018-02-15 14:23:09,345 grpc-default-executor-0 ERROR OrdererClient:152 - Received error on channel foo, orderer orderer.example.com, url grpc://localhost:7050, UNKNOWN io.grpc.StatusRuntimeException: UNKNOWN at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IndexOutOfBoundsException: readerIndex(0) + length(10) exceeds writerIndex(0): PooledUnsafeDirectByteBuf(ridx: 0, widx: 0, cap: 30) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1403) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1390) at io.netty.buffer.AbstractByteBuf.readSlice(AbstractByteBuf.java:856) at io.netty.handler.codec.http2.DefaultHttp2FrameWriter$DataFrameHeader.slice(DefaultHttp2FrameWriter.java:644) at io.netty.handler.codec.http2.DefaultHttp2FrameWriter.writeData(DefaultHttp2FrameWriter.java:160) at io.netty.handler.codec.http2.Http2OutboundFrameLogger.writeData(Http2OutboundFrameLogger.java:44) at io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder$FlowControlledData.write(DefaultHttp2ConnectionEncoder.java:411) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$FlowState.writeAllocatedBytes(DefaultHttp2RemoteFlowController.java:372) at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$WritabilityMonitor$1.write(DefaultHttp2RemoteFlowController.java:562) at io.netty.handler.codec.http2.WeightedFairQueueByteDistributor$State.write(WeightedFairQueueByteDistributor.java:612) at io.netty.handler.codec.http2.WeightedFairQueueByteDistributor.distribute(WeightedFairQueueByteDistributor.java:293)

bfuentes@fr.ibm.com (Thu, 15 Feb 2018 16:04:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EqQfXxPW8ribFSYi8) @rickr Do you use a sample network where users are already set on the CA yaml files ?

bfuentes@fr.ibm.com (Thu, 15 Feb 2018 16:12:07 GMT):
ok this one I suppose : https://github.com/hyperledger/fabric-sdk-java#running-the-integration-tests

bfuentes@fr.ibm.com (Thu, 15 Feb 2018 16:15:45 GMT):
so you are using autogenerated user account Users: Count: 1

bfuentes@fr.ibm.com (Thu, 15 Feb 2018 16:19:25 GMT):
I am using new users not defined on the configuration and theses ones cannot get channels blocks after being enrolled by the registrar :(

bfuentes@fr.ibm.com (Thu, 15 Feb 2018 16:21:18 GMT):
I am not using any endorsing policy at the moment, I don't think this have an impact on my 403 error

ionionascu (Thu, 15 Feb 2018 17:01:19 GMT):
Has joined the channel.

rickr (Thu, 15 Feb 2018 17:05:58 GMT):
Didn't the multi org demo register a new user.

rickr (Thu, 15 Feb 2018 17:11:07 GMT):
Bring this up in fabric can channel maybe how you're defining them

rickr (Thu, 15 Feb 2018 17:11:07 GMT):
Bring this up in fabric ca channel maybe how you're defining them

rickr (Thu, 15 Feb 2018 17:15:50 GMT):
The demo does not have any users defined in any config file when I ran it that I know of.

rickr (Thu, 15 Feb 2018 17:20:32 GMT):
Do not use SDK alpha use SNAPSHOT for v1.1

rickr (Fri, 16 Feb 2018 00:22:19 GMT):
@gauravgiri I have not seen that error before. Anything on the orderer logs ?

rickr (Fri, 16 Feb 2018 00:42:02 GMT):
@bfuentes@fr.ibm.com Did the peer admin already create the channel and join the peers to the channel, install chaincode. Members can't do that. Only once that's been done they can reconconstruct the channel as that demo code shows and then run chaincode

gauravgiri (Fri, 16 Feb 2018 04:29:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=23mcmzLRML9GsY9Nm) @rickr, only logs i get in the orderer are: 2018-02-16 04:26:23.498 UTC [orderer/common/server] Broadcast -> DEBU 0b7 Starting new Broadcast handler 2018-02-16 04:26:23.499 UTC [orderer/common/broadcast] Handle -> DEBU 0b8 Starting new broadcast loop for 10.0.2.2:50606 2018-02-16 04:26:23.506 UTC [orderer/common/broadcast] Handle -> WARN 0b9 Error reading from 10.0.2.2:50606: rpc error: code = Canceled desc = context canceled 2018-02-16 04:26:23.506 UTC [orderer/common/server] func1 -> DEBU 0ba Closing Broadcast stream

gauravgiri (Fri, 16 Feb 2018 04:29:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=23mcmzLRML9GsY9Nm) @rickr, only logs i get in the orderer during the time of this error are: 2018-02-16 04:26:23.498 UTC [orderer/common/server] Broadcast -> DEBU 0b7 Starting new Broadcast handler 2018-02-16 04:26:23.499 UTC [orderer/common/broadcast] Handle -> DEBU 0b8 Starting new broadcast loop for 10.0.2.2:50606 2018-02-16 04:26:23.506 UTC [orderer/common/broadcast] Handle -> WARN 0b9 Error reading from 10.0.2.2:50606: rpc error: code = Canceled desc = context canceled 2018-02-16 04:26:23.506 UTC [orderer/common/server] func1 -> DEBU 0ba Closing Broadcast stream

bfuentes@fr.ibm.com (Fri, 16 Feb 2018 08:50:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jic3oErTXq37w3FNa) @rickr Actually, the channel creation, join and chaincode install and instantiate are created on network startup by Kubernetes scripts. When i check on the java SDK side with the peerAdmin context, all is fine. Do I really need to do all theses steps from the Java SDK and not from the Kubernetes scripts using the CLI ?

bfuentes@fr.ibm.com (Fri, 16 Feb 2018 08:52:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=D2qHz7AAduudf8MQ7) @rickr If you are using the demo network, it creates generated users named "user-$INDEX" for each organisation. I will try to use my code using a pre-generated user to see if any difference. Also I will try your integration test using a non-generated user. I keep you informed next week. Thanks Rickr !!!

mujji89 (Fri, 16 Feb 2018 14:25:10 GMT):
Has joined the channel.

mujji89 (Fri, 16 Feb 2018 14:26:23 GMT):
Hi guys, new here I am getting this error RUNNING: End2endIT. 2018-02-16 14:24:50,202 main ERROR HFCAClient:1083 - POST request to http://localhost:7054/api/v1/cainfo with request body: {"caname":"ca0"}, failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"CA 'ca0' does not exist"}],"messages":[]} 2018-02-16 14:24:50,205 main ERROR HFCAClient:508 - POST request to http://localhost:7054/api/v1/cainfo with request body: {"caname":"ca0"}, failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"CA 'ca0' does not exist"}],"messages":[]} java.lang.Exception: POST request to http://localhost:7054/api/v1/cainfo with request body: {"caname":"ca0"}, failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"CA 'ca0' does not exist"}],"messages":[]}

mujji89 (Fri, 16 Feb 2018 14:28:15 GMT):
I am using windows the command ./startfabric.sh was executed successfully and I can also see VirtualBox running

mujji89 (Fri, 16 Feb 2018 14:28:15 GMT):
I am using windows the command ./startfabric.sh was executed successfully and I can also see VirtualBox running.....am I missing something?

rickr (Fri, 16 Feb 2018 14:47:03 GMT):
Yes - you need to use the network that those tests expect

rickr (Fri, 16 Feb 2018 14:49:11 GMT):
src/test/fixture/sdkintegration/docker-compose.yaml

mujji89 (Fri, 16 Feb 2018 14:54:59 GMT):

vBox.JPG

mujji89 (Fri, 16 Feb 2018 14:55:10 GMT):
I got these ports already in my virtual box

rickr (Fri, 16 Feb 2018 14:58:46 GMT):
That's not enough you 'll find what you need in the vagrant session. As stated before. Take the time to read the READM.md once *fully*. Then read it again :) Will go a long way to helping you. https://github.com/hyperledger/fabric-sdk-java#working-with-the-fabric-vagrant-environment

rickr (Fri, 16 Feb 2018 14:59:19 GMT):
But ports I don't think are your problem

huy.tranibm (Fri, 16 Feb 2018 17:26:04 GMT):
Has joined the channel.

huy.tranibm (Fri, 16 Feb 2018 17:29:58 GMT):
Hello Friends: I am running the 1.1alpha e2e test. Before i ran the test, inside of test.fixture.sdkintegration.docker-compose.yaml for ca0, i had to remove both ```${V11_IDENTITIES_ALLOWREMOVE} ${V11_AFFILIATIONS_ALLOWREMOVE}``` from the command as it wasn't recognized. Second, after i ran the End2endIT.java test, i was successful for all of channel foo's operation but when i got to channel bar's operation things started failing. I've noticed in the readme.md of the fabric java sdk git it says : ```End to end test environment The test defines one Fabric orderer and two organizations (peerOrg1, peerOrg2), each of which has 2 peers, one fabric-ca service.```. and when checking the logs, for channel bar, its using a fabric ca for org2

huy.tranibm (Fri, 16 Feb 2018 17:30:23 GMT):
here is my log:

huy.tranibm (Fri, 16 Feb 2018 17:32:20 GMT):
``` RUNNING: End2endIT. 2018-02-16 17:20:50,078 main WARN SampleStore:90 - Could not find the file "/var/folders/wd/hf1n64c13xj454jhd5qyhhzh0000gn/T/HFCSampletest.properties" 2018-02-16 17:20:50,084 main WARN SampleStore:90 - Could not find the file "/var/folders/wd/hf1n64c13xj454jhd5qyhhzh0000gn/T/HFCSampletest.properties" Constructing channel foo 2018-02-16 17:20:52,794 main WARN Channel:1374 - Bad deliver expected status 200 got 404, Channel foo Created channel foo 2018-02-16 17:20:53,131 main INFO Channel:698 - Peer peer0.org1.example.com joined into channel foo Peer peer0.org1.example.com joined channel foo 2018-02-16 17:20:53,204 main INFO Channel:698 - Peer peer1.org1.example.com joined into channel foo Peer peer1.org1.example.com joined channel foo Finished initialization channel foo Running channel foo Creating install proposal Sending install proposal 2018-02-16 17:20:53,405 main INFO InstallProposalBuilder:175 - Installing 'example_cc_go::github.com/example_cc::1' Go chaincode from directory: '/Users/huytranibm/FabricFolder/fabirc-sdk-java-1.1.0-alpha/fabric-sdk-java/src/test/fixture/sdkintegration/gocc/sample1/src/github.com/example_cc' with source location: 'src/github.com/example_cc'. chaincodePath:'github.com/example_cc' Successful install proposal response Txid: 34ba3190c0170eb98083c9a28db8aa1475db9c3199f9b8d3e3572b0a77a10c77 from peer peer1.org1.example.com Successful install proposal response Txid: 34ba3190c0170eb98083c9a28db8aa1475db9c3199f9b8d3e3572b0a77a10c77 from peer peer0.org1.example.com Received 2 install proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively Succesful instantiate proposal response Txid: 6f07a2e6098f1e7a832653011ac2d55ba960114bdcfefba99d8a49f576b612d3 from peer peer1.org1.example.com Succesful instantiate proposal response Txid: 6f07a2e6098f1e7a832653011ac2d55ba960114bdcfefba99d8a49f576b612d3 from peer peer0.org1.example.com Received 2 instantiate proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiateTransaction to orderer with a and b set to 100 and 200 respectively Finished instantiate transaction with transaction id 6f07a2e6098f1e7a832653011ac2d55ba960114bdcfefba99d8a49f576b612d3 sending transactionProposal to all peers with arguments: move(a,b,100) Successful transaction proposal response Txid: 0c6a1b33ec80158e7e5fc56a4a40e789a304d3a9318e897dff967fe93f732e2c from peer peer1.org1.example.com Successful transaction proposal response Txid: 0c6a1b33ec80158e7e5fc56a4a40e789a304d3a9318e897dff967fe93f732e2c from peer peer0.org1.example.com Received 2 transaction proposal responses. Successful+verified: 2 . Failed: 0 Successfully received transaction proposal responses. Sending chaincode transaction(move a,b,100) to orderer. Finished transaction with transaction id 0c6a1b33ec80158e7e5fc56a4a40e789a304d3a9318e897dff967fe93f732e2c Now query chaincode for the value of b. RECEIVED Chaincode event with handle: CHAINCODE_EVENTS_HANDLE6cef6436-425e-4d4c-9957-7b9cfc5f8314CHAINCODE_EVENTS_HANDLE, chaincode Id: example_cc_go, chaincode event name: event, transaction id: 0c6a1b33ec80158e7e5fc56a4a40e789a304d3a9318e897dff967fe93f732e2c, event payload: "!", from eventhub: peer0.org1.example.com RECEIVED Chaincode event with handle: CHAINCODE_EVENTS_HANDLE6cef6436-425e-4d4c-9957-7b9cfc5f8314CHAINCODE_EVENTS_HANDLE, chaincode Id: example_cc_go, chaincode event name: event, transaction id: 0c6a1b33ec80158e7e5fc56a4a40e789a304d3a9318e897dff967fe93f732e2c, event payload: "!", from eventhub: peer1.org1.example.com Query payload of b from peer peer1.org1.example.com returned 300 Query payload of b from peer peer0.org1.example.com returned 300 Channel info for : foo Channel height: 3 Chain current block hash: f9c64724aa7fad2564ac3c7b15acac1676d210b6a08fe79217c243d090efeb24 Chainl previous block hash: 39e57bd135a3d47531d3a65592ff9d2f14946d1711e9b85488b14eddfeb8f212 queryBlockByNumber returned correct block with blockNumber 2 previous_hash 39e57bd135a3d47531d3a65592ff9d2f14946d1711e9b85488b14eddfeb8f212 queryBlockByHash returned block with blockNumber 1 queryBlockByTxID returned block with blockNumber 2 QueryTransactionByID returned TransactionInfo: txID 0c6a1b33ec80158e7e5fc56a4a40e789a304d3a9318e897dff967fe93f732e2c validation code 0 Running for Channel foo done```

huy.tranibm (Fri, 16 Feb 2018 17:32:54 GMT):
```Constructing channel bar 2018-02-16 17:21:11,298 main WARN Channel:1374 - Bad deliver expected status 200 got 404, Channel bar Created channel bar 2018-02-16 17:21:11,571 main INFO Channel:698 - Peer peer0.org2.example.com joined into channel bar Peer peer0.org2.example.com joined channel bar 2018-02-16 17:21:11,624 main INFO Channel:698 - Peer peer1.org2.example.com joined into channel bar Peer peer1.org2.example.com joined channel bar 2018-02-16 17:21:11,679 grpc-default-executor-1 ERROR PeerEventServiceClient:239 - Received error on channel bar, peer peer0.org2.example.com, url grpc://localhost:8051, UNIMPLEMENTED: unknown service protos.Deliver io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service protos.Deliver at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2018-02-16 17:21:11,680 main ERROR PeerEventServiceClient:286 - Channel bar connect failed on peer eventing service peer0.org2.example.com. Reason: UNIMPLEMENTED: unknown service protos.Deliver org.hyperledger.fabric.sdk.exception.TransactionException: Channel bar connect failed on peer eventing service peer0.org2.example.com. Reason: UNIMPLEMENTED: unknown service protos.Deliver at org.hyperledger.fabric.sdk.PeerEventServiceClient.connectEnvelope(PeerEventServiceClient.java:284) ```

huy.tranibm (Fri, 16 Feb 2018 17:37:13 GMT):
@mujji89 inside of the docker-compose.yaml you need to get rid of ```${V11_IDENTITIES_ALLOWREMOVE} ${V11_AFFILIATIONS_ALLOWREMOVE}``` as that is what's causing your ca0 not to run. Im not sure why that is there can someone here explain?

jeffguo (Fri, 16 Feb 2018 17:37:38 GMT):
Has joined the channel.

jeffguo (Fri, 16 Feb 2018 18:24:46 GMT):
in the java sdk, is there an asset registry concept similar to composer?

rickr (Fri, 16 Feb 2018 18:34:31 GMT):
No persistence.

mujji89 (Fri, 16 Feb 2018 19:53:53 GMT):
@rickr and @huy.tranibm . No luck with vagrant or removing those lines :(

mujji89 (Fri, 16 Feb 2018 19:53:56 GMT):
still same

mujji89 (Fri, 16 Feb 2018 19:53:56 GMT):
still same error

huy.tranibm (Fri, 16 Feb 2018 19:54:21 GMT):
@mujji89 are you sure ca0 is running?

huy.tranibm (Fri, 16 Feb 2018 19:54:57 GMT):
Oh

mujji89 (Fri, 16 Feb 2018 19:55:01 GMT):
2018/02/16 19:44:38 [DEBUG] Received request POST /api/v1/cainfo Authorization: {"caname":"ca0"} 2018/02/16 19:44:38 [DEBUG] Directing traffic to CA ca0

huy.tranibm (Fri, 16 Feb 2018 19:55:15 GMT):
i recognize that error, it has something to do with your ca name

huy.tranibm (Fri, 16 Feb 2018 19:55:24 GMT):
how many orgs, peers, ca are you running?

rickr (Fri, 16 Feb 2018 19:56:09 GMT):
My gut feel is you're not running the docker-compose that's provide by the SDK

mujji89 (Fri, 16 Feb 2018 19:56:22 GMT):
default config, I am running first time. I think its 1 ca and 2 peers

huy.tranibm (Fri, 16 Feb 2018 19:57:17 GMT):
can you point us to the repo you are bringing up your network?

rickr (Fri, 16 Feb 2018 19:58:27 GMT):
for the Integration test the SDK provides you need have this https://github.com/hyperledger/fabric-sdk-java/blob/09776f0610193982cdee6ec8e00d5244bb82e65d/src/test/fixture/sdkintegration/docker-compose.yaml

rickr (Fri, 16 Feb 2018 19:59:31 GMT):
Take note of the `-n ca0` https://github.com/hyperledger/fabric-sdk-java/blob/09776f0610193982cdee6ec8e00d5244bb82e65d/src/test/fixture/sdkintegration/docker-compose.yaml#L15

mujji89 (Fri, 16 Feb 2018 19:59:32 GMT):
yep its there, haven't changed single thing in sdk

mujji89 (Fri, 16 Feb 2018 20:00:04 GMT):
can I check if ca name is changed

mujji89 (Fri, 16 Feb 2018 20:00:04 GMT):
can I check if ca name is changed?

huy.tranibm (Fri, 16 Feb 2018 20:02:00 GMT):
mujj what test are you running?

huy.tranibm (Fri, 16 Feb 2018 20:02:06 GMT):
End2endIT.java?

mujji89 (Fri, 16 Feb 2018 20:02:44 GMT):
yes

huy.tranibm (Fri, 16 Feb 2018 20:04:56 GMT):
can you do docker ps -a and show me what u have

mujji89 (Fri, 16 Feb 2018 20:09:13 GMT):

Capture.JPG

huy.tranibm (Fri, 16 Feb 2018 20:12:33 GMT):
mujj, are you failing on the test for channel foo or bar?

mujji89 (Fri, 16 Feb 2018 20:14:12 GMT):
where can I check that

huy.tranibm (Fri, 16 Feb 2018 20:15:01 GMT):
for the e2e test, it test first with channel foo then bar, you can see this from lines 242-270 in the End2endIT.java

huy.tranibm (Fri, 16 Feb 2018 20:16:25 GMT):
can you comment outlines 254-269(commenting out the test for channel bar), restart your networking using ./fabric.sh down, then clean then up again

huy.tranibm (Fri, 16 Feb 2018 20:17:17 GMT):
ensure that inside of your network-config.yaml has the correct credentials for org1( by default it should)

huy.tranibm (Fri, 16 Feb 2018 20:21:23 GMT):
everytime you run the test make sure you take down your network, as the user your trying to register is already registered and the ca will reject(had you ran the test already)

mujji89 (Fri, 16 Feb 2018 20:22:43 GMT):
HFCAInfo info = ca.info(); //just check if we connect at all.

mujji89 (Fri, 16 Feb 2018 20:22:53 GMT):
this is where it's breaking

mujji89 (Fri, 16 Feb 2018 20:23:17 GMT):
ok I will check

huy.tranibm (Fri, 16 Feb 2018 20:24:16 GMT):
i also just realized that you are running a windows and i won't know too much about the differences as i am on a mac

mujji89 (Fri, 16 Feb 2018 20:24:47 GMT):
Yes, sadly I am on windows

huy.tranibm (Fri, 16 Feb 2018 20:25:15 GMT):
i was able to get both channel foo and bar working(foo for org1 and bar for org2) but i had to run them separately

huy.tranibm (Fri, 16 Feb 2018 20:25:48 GMT):
at line 690&691, i had to edit that also

huy.tranibm (Fri, 16 Feb 2018 20:26:07 GMT):
so line 690 for channel foo, and 691 for channel bar

huy.tranibm (Fri, 16 Feb 2018 20:26:21 GMT):
and my network-config.yaml i replaced the org1 credentials with org2

huy.tranibm (Fri, 16 Feb 2018 22:10:14 GMT):
@mujji89 hey i was able to reproduced your error at HFCAInfo info = ca.info(); //just check if we connect at all.

huy.tranibm (Fri, 16 Feb 2018 22:10:29 GMT):
are you using testutils.properties?

mujji89 (Fri, 16 Feb 2018 22:44:45 GMT):
Hi, I did nothing on that, so I assume no

huy.tranibm (Fri, 16 Feb 2018 22:49:52 GMT):
ok nvm

mujji89 (Fri, 16 Feb 2018 22:51:39 GMT):
how were you able to reproduce?

huy.tranibm (Fri, 16 Feb 2018 22:52:14 GMT):
i accidently included the tls properties into the testutils.properties and set the value at null

huy.tranibm (Fri, 16 Feb 2018 22:52:25 GMT):
and it gave me the same error, but after removing it, it worked

mujji89 (Fri, 16 Feb 2018 22:53:48 GMT):
where do you have testutils.properties?

huy.tranibm (Fri, 16 Feb 2018 22:54:27 GMT):
i created it into test.java.org.hyperledger.fabric.sdk

huy.tranibm (Fri, 16 Feb 2018 22:54:42 GMT):
using the default values provided by TestConfig.java

mujji89 (Fri, 16 Feb 2018 22:58:05 GMT):
I don't have testutils.properties

huy.tranibm (Fri, 16 Feb 2018 22:58:13 GMT):
i know i said i created it

huy.tranibm (Fri, 16 Feb 2018 22:58:38 GMT):
```org.hyperledger.fabric.sdktest.InvokeWaitTime = 120 org.hyperledger.fabric.sdktest.DeployWaitTime = 120000 org.hyperledger.fabric.sdktest..ProposalWaitTime = 120000 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.mspid = Org1MSP org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.domname = org1.example.com org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.ca_location = http://localhost:7054 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.caName = ca0 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.peer_locations = peer0.org1.example.com@grpc://localhost:7051, peer1.org1.example.com@grpc://localhost:7056 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.orderer_locations = orderer.example.com@grpc://localhost:7050 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg1.eventhub_locations = peer0.org1.example.com@grpc://localhost:7053,peer1.org1.example.com@grpc://localhost:7058 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg2.mspid = Org2MSP org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg2.domname = org2.example.com org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg2.ca_location = http://localhost:8054 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg2.peer_locations = peer0.org2.example.com@grpc://localhost:8051,peer1.org2.example.com@grpc://localhost:8056 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg2.orderer_locations = orderer.example.com@grpc://localhost:7050 org.hyperledger.fabric.sdktest.integrationTests.org.peerOrg2.eventhub_locations = peer0.org2.example.com@grpc://localhost:8053, peer1.org2.example.com@grpc://localhost:8058 ```

huy.tranibm (Fri, 16 Feb 2018 22:58:57 GMT):
thats what i have in it, basically its the same setting as the default value

huy.tranibm (Fri, 16 Feb 2018 22:59:10 GMT):
i just wanted to test a properties file

mujji89 (Fri, 16 Feb 2018 23:02:32 GMT):
ok

mujji89 (Fri, 16 Feb 2018 23:10:19 GMT):
Thanks for your efforts and concern :)

huy.tranibm (Sat, 17 Feb 2018 00:32:25 GMT):
Hi guys, when i run the network from the test.java.sdk fabric.sh, am I running peers version 1.1 alpha or 1.0.5?

schwinnez (Sat, 17 Feb 2018 15:21:21 GMT):
Hi, I am trying to install chaincode as in https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java via Java-SDK. Looks like installation works fine... but i can not find the chaincode in the filesystem after installation and instantiation of chaincode fails for the same reason ("...can't load package: package [CHAIN_CODE_PATH] ..."). I am having the chaincode in resources of my java project.

schwinnez (Sat, 17 Feb 2018 15:27:44 GMT):
(according to the peer logs, the peer is looking for chaincode in /chaincode/input/src/vgmchain/chaincode/[CHAINCODE_PATH] I also don't understand why it is looking there. There is even no /chaincode directory...) Any ideas?

rickr (Sat, 17 Feb 2018 15:47:30 GMT):
During install chaincode is sent to the peer you should see it there in `/var/hyperledger/production/chaincodes/'`

rickr (Sat, 17 Feb 2018 15:49:48 GMT):
I'm thinking your packaging of the chaincode and chaincode path specified is off. Double check to make sure it's similar to what's done in the integration tests.

M4rcelNo4ck (Sat, 17 Feb 2018 18:06:03 GMT):
Has joined the channel.

schwinnez (Sat, 17 Feb 2018 18:55:29 GMT):
checked it again but so far I didn't spot any major differences. Peer logs say: `FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="prodchain_go" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 2018-02-17 18:49:25.978 UTC [util] DockerBuild -> DEBU 3a0 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-02-17 18:49:26.543 UTC [chaincode-platform] func1 -> ERRO 3a1 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package prodchain/chaincode: no buildable Go source files in /chaincode/input/src/prodchain/chaincode` As you said, I can see a file called /var/hyperledger/production/chaincodes/prodchain_go.1 . I currently do not understand where the path "/chaincode/input/src/prodchain/chaincode/' comes from (especially the first two directories). Can I untar the chaincode with tools that are available on the peers to have a closer look in there?

schwinnez (Sat, 17 Feb 2018 18:55:29 GMT):
checked it again but so far I didn't spot any major differences. Peer logs say: `FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="prodchain_go" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 2018-02-17 18:49:25.978 UTC [util] DockerBuild -> DEBU 3a0 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-02-17 18:49:26.543 UTC [chaincode-platform] func1 -> ERRO 3a1 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package prodchain/chaincode: no buildable Go source files in /chaincode/input/src/prodchain/chaincode` As you said, I can see a file called /var/hyperledger/production/chaincodes/prodchain_go.1 . I currently do not understand where the path "/chaincode/input/src/prodchain/chaincode/' comes from (especially the first two directories). Can I untar the chaincode with tools that are available on the peers to have a closer look in there?

mujji89 (Sat, 17 Feb 2018 21:14:09 GMT):
Hi guys I am back again I fixed previous errors but now I am getting this error while running End2endIT test

mujji89 (Sat, 17 Feb 2018 21:14:10 GMT):
2018-02-17 20:35:07,604 main ERROR Channel:973 - Channel bar connect failed on peer eventing service peer0.org2.example.com. Reason: UNIMPLEMENTED: unknown service protos.Deliver

mujji89 (Sat, 17 Feb 2018 21:15:56 GMT):
the foo test passes but has problem with bar

schwinnez (Sat, 17 Feb 2018 21:47:55 GMT):
okay i got a little further. The problem now is, that it looks like hyperledger fabric go libs are not installed on my peer. I am using the same docker images as for the integration test. Where should the hyperledger fabric libs be located?

schwinnez (Sat, 17 Feb 2018 21:47:55 GMT):
okay i got a little further. A refactoring changed a dependency of my chaincode :unamused: mea culpa. But the instantiation is still not getting through. I get the following error from the peer: {"message":"oci runtime error: container_linux.go:295: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\"\n"} I found, that this might be due to a missing chaincode dependency. But I am using only the following which are quite common: ` import ( "bytes" "encoding/json" "fmt" "time" "github.com/hyperledger/fabric/core/chaincode/shim" sc "github.com/hyperledger/fabric/protos/peer" ) `

Thinh 2 (Sun, 18 Feb 2018 11:46:30 GMT):
Has joined the channel.

rickr (Sun, 18 Feb 2018 14:51:34 GMT):
@mujji89 SDK is connecting to a 1.0.x running integration suit for 1.1.x

rickr (Sun, 18 Feb 2018 14:51:34 GMT):
@mujji89 SDK is connecting to a Fabric 1.0.x running integration suit for 1.1.x

mujji89 (Sun, 18 Feb 2018 15:00:25 GMT):
hey, thanks but how can I fix that? I checked I have latest sdk

mujji89 (Sun, 18 Feb 2018 16:10:39 GMT):
POST request to http://localhost:7054/api/v1/cainfo with request body: {"caname":"ca0"}, failed with status code: 500. Response: {"success":false,"result":null,"errors":[{"code":0,"message":"CA 'ca0' does not exist"}],"messages":[]}

mujji89 (Sun, 18 Feb 2018 16:10:53 GMT):
fixed that and now this

mujji89 (Sun, 18 Feb 2018 16:13:11 GMT):
back to same error :(

rickr (Sun, 18 Feb 2018 16:22:50 GMT):
Not sure why you're having so much problems. Should work _out of the box_ . No need to change anything. The docker-compose expects you to have the network built locally if you get the latest. If you don't do that pull in the alpha fabric setting/exporting two env vars *before* you start it up. ``` IMAGE_TAG_FABRIC=x86_64-1.1.0-alpha IMAGE_TAG_FABRIC_CA=x86_64-1.1.0-alpha ```

rickr (Sun, 18 Feb 2018 16:22:50 GMT):
Not sure why you're having so much problems. Should work _out of the box_ . No need to change anything. The docker-compose expects you to have the network built locally if you get the latest. If you don't do that pull in the alpha fabric setting/exporting two env vars *before* you start it up. ``` IMAGE_TAG_FABRIC=":x86_64-1.1.0-alpha" IMAGE_TAG_FABRIC_CA=":x86_64-1.1.0-alpha" ```

rickr (Sun, 18 Feb 2018 16:22:50 GMT):
Not sure why you're having so much problems. Should work _out of the box_ . No need to change anything. The docker-compose expects you to have the network built locally if you get the latest. If you don't do that pull in the v1.1 alpha Fabric setting/exporting two env vars *before* you start it up. ``` IMAGE_TAG_FABRIC=":x86_64-1.1.0-alpha" IMAGE_TAG_FABRIC_CA=":x86_64-1.1.0-alpha" ```

prasad.sripathi (Mon, 19 Feb 2018 02:00:41 GMT):
Has joined the channel.

chaitanya (Mon, 19 Feb 2018 09:56:15 GMT):
@rickr Hey, I'm having the following issue with Java-SDK. I wrote it following End2EndIT.java from the v1.0.0-beta and now I'm trying to run it against Fabric images of v1.0.3. I've replaced the SDK jar with that of v1.0.1 (the latest tag available). The compilation doesn't fail but for some reason when I try to do certain invokes through the SDK, I see them erring, saying : ```2018-02-19 09:42:02.707 UTC [chaincode] func1 -> DEBU 18d0 [22c68c85] launching chaincode contentList on channel mychannel 2018-02-19 09:42:02.707 UTC [chaincode] 2 -> ERRO 18d1 [[22c68c85 ERROR]]Failed to launch invoked chaincode. Sending %!s(MISSING) 2018-02-19 09:42:02.707 UTC [chaincode] 1 -> DEBU 18d2 [22c68c85]enterBusyState trigger event ERROR 2018-02-19 09:42:02.707 UTC [chaincode] processStream -> DEBU 18d3 [22c68c85]Move state message ERROR 2018-02-19 09:42:02.707 UTC [chaincode] HandleMessage -> DEBU 18d4 [22c68c85]Fabric side Handling ChaincodeMessage of type: ERROR in state ready 2018-02-19 09:42:02.707 UTC [chaincode] HandleMessage -> DEBU 18d5 [22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0]HandleMessage- COMPLETED. Notify 2018-02-19 09:42:02.707 UTC [chaincode] notify -> DEBU 18d6 notifying Txid:22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0 2018-02-19 09:42:02.707 UTC [chaincode] processStream -> DEBU 18d7 [22c68c85]sending state message ERROR 2018-02-19 09:42:02.708 UTC [chaincode] Execute -> DEBU 18d8 Exit 2018-02-19 09:42:02.708 UTC [chaincode] ExecuteChaincode -> ERRO 18d9 Error executing chaincode: Transaction returned with failure: premature execution - chaincode (contentList :1.0) is being launched 2018-02-19 09:42:02.708 UTC [endorser] callChaincode -> DEBU 18da Exit 2018-02-19 09:42:02.708 UTC [endorser] simulateProposal -> ERRO 18db failed to invoke chaincode path:"github.com/hyperledger/fabric/examples/chaincode/go/chaincodes_offchain/re questList" name:"requestList" version:"1.0" on transaction 22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0, error: Error executing chaincode: Transaction retu rned with failure: premature execution - chaincode (contentList:1.0) is being launched 2018-02-19 09:42:02.708 UTC [endorser] simulateProposal -> DEBU 18dc Exit 2018-02-19 09:42:02.708 UTC [lockbasedtxmgr] Done -> DEBU 18dd Done with transaction simulation / query execution [7ea8388f-27df-42a7-a7ea-b4a910bff5fc] 2018-02-19 09:42:02.708 UTC [endorser] ProcessProposal -> DEBU 18de Exit 2018-02-19 09:42:02.709 UTC [chaincode] processStream -> DEBU 18df [22c68c85]Received message COMPLETED from shim 2018-02-19 09:42:02.709 UTC [chaincode] HandleMessage -> DEBU 18e0 [22c68c85]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready 2018-02-19 09:42:02.709 UTC [chaincode] HandleMessage -> DEBU 18e1 [22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0]HandleMessage- COMPLETED. Notify 2018-02-19 09:42:02.709 UTC [chaincode] notify -> DEBU 18e2 notifier Txid:22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0 does not exist 2018-02-19 09:42:04.546 UTC [dockercontroller] stopInternal -> DEBU 18e3 Stopped container e2ecli_default-peer0_org1_example.com-contentList-1.0 2018-02-19 09:42:04.550 UTC [dockercontroller] stopInternal -> DEBU 18e4 Kill container e2ecli_default-peer0_org1_example.com-contentList-1.0 (API error (409): {"message":"Cann ot kill container: e2ecli_default-peer0_org1_example.com-contentList-1.0: Container edc0f2af260f96e9b9efd6603b75785bea0c29c8112b7869e7ea714942c845f0 is not running"} ```

chaitanya (Mon, 19 Feb 2018 09:56:15 GMT):
@rickr Hey, I'm having the following issue with Java-SDK. I wrote it following End2EndIT.java from the v1.0.0-beta and now I'm trying to run it against Fabric images of v1.0.3. I've replaced the SDK jar with that of v1.0.1 (the latest tag available). The compilation doesn't fail but for some reason when I try to do certain invokes through the SDK, I see them erring, saying : ```2018-02-19 09:42:02.707 UTC [chaincode] func1 -> DEBU 18d0 [22c68c85] launching chaincode contentList on channel mychannel 2018-02-19 09:42:02.707 UTC [chaincode] 2 -> ERRO 18d1 [[22c68c85 ERROR]]Failed to launch invoked chaincode. Sending %!s(MISSING) 2018-02-19 09:42:02.707 UTC [chaincode] 1 -> DEBU 18d2 [22c68c85]enterBusyState trigger event ERROR 2018-02-19 09:42:02.707 UTC [chaincode] processStream -> DEBU 18d3 [22c68c85]Move state message ERROR 2018-02-19 09:42:02.707 UTC [chaincode] HandleMessage -> DEBU 18d4 [22c68c85]Fabric side Handling ChaincodeMessage of type: ERROR in state ready 2018-02-19 09:42:02.707 UTC [chaincode] HandleMessage -> DEBU 18d5 [22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0]HandleMessage- COMPLETED. Notify 2018-02-19 09:42:02.707 UTC [chaincode] notify -> DEBU 18d6 notifying Txid:22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0 2018-02-19 09:42:02.707 UTC [chaincode] processStream -> DEBU 18d7 [22c68c85]sending state message ERROR 2018-02-19 09:42:02.708 UTC [chaincode] Execute -> DEBU 18d8 Exit 2018-02-19 09:42:02.708 UTC [chaincode] ExecuteChaincode -> ERRO 18d9 Error executing chaincode: Transaction returned with failure: premature execution - chaincode (contentList :1.0) is being launched 2018-02-19 09:42:02.708 UTC [endorser] callChaincode -> DEBU 18da Exit 2018-02-19 09:42:02.708 UTC [endorser] simulateProposal -> ERRO 18db failed to invoke chaincode path:"github.com/hyperledger/fabric/examples/chaincode/go/chaincodes_offchain/re questList" name:"requestList" version:"1.0" on transaction 22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0, error: Error executing chaincode: Transaction retu rned with failure: premature execution - chaincode (contentList:1.0) is being launched 2018-02-19 09:42:02.708 UTC [endorser] simulateProposal -> DEBU 18dc Exit 2018-02-19 09:42:02.708 UTC [lockbasedtxmgr] Done -> DEBU 18dd Done with transaction simulation / query execution [7ea8388f-27df-42a7-a7ea-b4a910bff5fc] 2018-02-19 09:42:02.708 UTC [endorser] ProcessProposal -> DEBU 18de Exit 2018-02-19 09:42:02.709 UTC [chaincode] processStream -> DEBU 18df [22c68c85]Received message COMPLETED from shim 2018-02-19 09:42:02.709 UTC [chaincode] HandleMessage -> DEBU 18e0 [22c68c85]Fabric side Handling ChaincodeMessage of type: COMPLETED in state ready 2018-02-19 09:42:02.709 UTC [chaincode] HandleMessage -> DEBU 18e1 [22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0]HandleMessage- COMPLETED. Notify 2018-02-19 09:42:02.709 UTC [chaincode] notify -> DEBU 18e2 notifier Txid:22c68c8523415c6e3990381fe46dd96250fa9e88499d9772e4655521ad39e8f0 does not exist 2018-02-19 09:42:04.546 UTC [dockercontroller] stopInternal -> DEBU 18e3 Stopped container e2ecli_default-peer0_org1_example.com-contentList-1.0 2018-02-19 09:42:04.550 UTC [dockercontroller] stopInternal -> DEBU 18e4 Kill container e2ecli_default-peer0_org1_example.com-contentList-1.0 (API error (409): {"message":"Cannot kill container: e2ecli_default-peer0_org1_example.com-contentList-1.0: Container edc0f2af260f96e9b9efd6603b75785bea0c29c8112b7869e7ea714942c845f0 is not running"} ```

chaitanya (Mon, 19 Feb 2018 09:56:25 GMT):
can u help me with this?

chaitanya (Mon, 19 Feb 2018 09:56:25 GMT):
could u please help me with this?

bfuentes@fr.ibm.com (Mon, 19 Feb 2018 10:14:11 GMT):
Hi @rickr, I ran successfully your integration test with the fabric v1.1.0-alpha network

bfuentes@fr.ibm.com (Mon, 19 Feb 2018 10:15:07 GMT):
It seems "configtxlator" from your docker-compose file is not existing in the fabric-tools image on the V1.0.0 and it throws an error

vitiko (Mon, 19 Feb 2018 11:44:40 GMT):
Has joined the channel.

rickr (Mon, 19 Feb 2018 12:13:41 GMT):
yes that was added later. You running I think with sdk v1.1 integration test with a docker-compose that v 1.0 level

rickr (Mon, 19 Feb 2018 12:22:20 GMT):
@chaitanya You shouldn't just replace the SDK jar it probably had other dependencies jar updates. That said, not sure its the problem here. First thoughts is the sdk is sending the invoke so it looks to be on the fabric side failing the chaincode. Have you looked at the chaincode docker instance logs ? Maybe something there. BTW latest fabric release is v1.0.5

chaitanya (Mon, 19 Feb 2018 12:23:40 GMT):
@rickr sure. The chaincode logs do not show any errrors, and the containers stay up after having instantiated chaincodes. It is the peer container which shows the above logs

rickr (Mon, 19 Feb 2018 12:27:07 GMT):
So the chaincode itself executed ok .. you have some log info in your CC that prints that out I assume. Does this happen on all invokes ? You probably need to take this to the #fabric-peer-endorser-committer channel for them to understand what's going on first .. not saying it's not an sdk issue but need to know why that's happening.

rickr (Mon, 19 Feb 2018 12:29:40 GMT):
BTW the most likely thing they'll ask is to be on the latest :wink:

rickr (Mon, 19 Feb 2018 12:32:00 GMT):
Make sure you have some log statement at the very end of your CC after all is done that states ending successfully. Something here seem to me it's not.

huy.tranibm (Mon, 19 Feb 2018 23:36:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4ZMaCmXwbWGvBoKJa) @mujji89 Hi, at line 691, comment out the boolean for channel foo, then uncomment for channel bar

huy.tranibm (Mon, 19 Feb 2018 23:51:03 GMT):
@rickr when i use ```IMAGE_TAG_FABRIC=":x86_64-1.1.0-alpha" IMAGE_TAG_FABRIC_CA=":x86_64-1.1.0-alpha"``` in my .env for sdkintegration, i get this credential error pulling the images

huy.tranibm (Mon, 19 Feb 2018 23:51:15 GMT):
```huys-mbp:sdkintegration huytranibm$ ./fabric.sh up Creating network "sdkintegration_default" with the default driver Pulling orderer.example.com (hyperledger/fabric-orderer:x86_64-1.1.0-alpha)... Traceback (most recent call last): File "docker-compose", line 6, in File "compose/cli/main.py", line 68, in main File "compose/cli/main.py", line 121, in perform_command File "compose/cli/main.py", line 938, in up File "compose/project.py", line 430, in up File "compose/service.py", line 311, in ensure_image_exists File "compose/service.py", line 1024, in pull File "site-packages/docker/api/image.py", line 381, in pull File "site-packages/docker/auth.py", line 50, in get_config_header File "site-packages/docker/auth.py", line 97, in resolve_authconfig File "site-packages/docker/auth.py", line 142, in _resolve_authconfig_credstore docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-osxkeychain exited with "The user name or passphrase you entered is not correct.".',) Failed to execute script docker-compose huys-mbp:sdkintegration huytranibm$ ```

huy.tranibm (Tue, 20 Feb 2018 00:15:12 GMT):
@mujji89 also check your .env and make sure that you are using ver 1.1, uncomment these lines ```IMAGE_TAG_FABRIC=:x86_64-1.1.0-alpha IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0-alpha```

rickr (Tue, 20 Feb 2018 10:10:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JPYrgpbgxFCSQsuKp) @huy.tranibm Should be no need to make any changes in the tests to pass. If you are more then like something is not set up properly.

mujji89 (Tue, 20 Feb 2018 10:36:12 GMT):
Thanks guys for response, well I changed nothing in code and I am using the same image tags as mentioned above

mujji89 (Tue, 20 Feb 2018 10:36:18 GMT):
now there is a different error

mujji89 (Tue, 20 Feb 2018 10:36:19 GMT):
Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively 2018-02-20 10:35:16,875 main ERROR Channel:2412 - Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=failed to execute transaction: timeout expired while executing transaction, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: failed to execute transaction: timeout expired while executing transaction

mujji89 (Tue, 20 Feb 2018 10:37:24 GMT):
I have followed vagrant* instructions on the sdk git page

rickr (Tue, 20 Feb 2018 11:22:45 GMT):
Try setting env var ORG_HYPERLEDGER_FABRIC_SDK_PROPOSAL_WAIT_TIME=80000 Before you start the SDK tests Where you start the docker-compose use ./fabric restart

rickr (Tue, 20 Feb 2018 11:24:55 GMT):
Instantiate will need to start docker container the first time and maybe your env is too slow ... just a guess

rickr (Tue, 20 Feb 2018 11:39:42 GMT):
After a closer look it seems that the timeout is occurring on the server side. Look at the peer docker logs

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 15:31:39 GMT):
@rickr it seems I encounter difficulties when I use a binary channel file .tx from a CLI command. The Java SDK is not enable to do a parse.from on it.

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 15:32:03 GMT):

differences between foo.tx and channel1.tx

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 15:32:18 GMT):
org.hyperledger.fabric.sdk.exception.InvalidArgumentException: com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type. at org.hyperledger.fabric.sdk.Channel.getChannelConfigurationSignature(Channel.java:2683) at org.hyperledger.fabric.sdk.HFClient.getChannelConfigurationSignature(HFClient.java:602) at com.ibm.controller.MyController.constructChannel(MyController.java:779)

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 15:33:04 GMT):
the foo.tx is correctly parsed but channel1.tx which is generated from fabric-tools

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 15:33:21 GMT):
any idea ? any proto file missing ?

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 15:38:28 GMT):
i am using for the network 1.1.0-preview and javaSDK 1.1.0-SNAPSHOT

nebsterboy (Tue, 20 Feb 2018 15:54:24 GMT):
Has joined the channel.

rickr (Tue, 20 Feb 2018 16:20:08 GMT):
can you point me to the exact file github you tried

rickr (Tue, 20 Feb 2018 16:23:26 GMT):
I'm not seeing channel1.tx

rickr (Tue, 20 Feb 2018 16:24:24 GMT):
this is one you created

dave.enyeart (Tue, 20 Feb 2018 16:45:44 GMT):
@muralisr @jimthematrix @mastersingh24 When node chaincode is packaged into a tar it is packaged under a "src" directory. This is not typical for node.js in general. Is there any reason we had to automatically inject this "src" directory? Or could we remove it? That would help with the packaging that @rickr is looking at, as part of packaging up chaincode indexes during chaincode install step. ( @rickr was suggesting that user could add the src directory when they author node chaincode, but that is messy, I'd rather do away with src directory if possible for node chaincode).

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 16:46:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eNwmLqfXooLdP9mwE) @rickr yes, you can see the image displaying difference between the 2 files .tx

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 16:47:50 GMT):
I can send you the binary if you want to test it

rickr (Tue, 20 Feb 2018 16:48:31 GMT):
would rather have the source you used to generate

rickr (Tue, 20 Feb 2018 16:49:04 GMT):
if you can send the binary too

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 16:52:28 GMT):
I sent you the folder with the configuration in MP

bfuentes@fr.ibm.com (Tue, 20 Feb 2018 16:53:30 GMT):
you can also use the image that is generated directly , it is published on dockerhub

jimthematrix (Tue, 20 Feb 2018 17:00:51 GMT):
@dave.enyeart I can't remember a specific reason for the `src` root folder structure, might have just been a random decision to make the content checking logic (for illegal files by extension and permissions) on the peer side easier

jimthematrix (Tue, 20 Feb 2018 17:00:51 GMT):
@dave.enyeart I can't remember a specific reason for the `src` root folder structure, might have just been a random decision to make the content checking logic (for illegal files by extension and permissions) on the peer side easier to implement

jimthematrix (Tue, 20 Feb 2018 17:01:34 GMT):
in fact I think that was the only reason for the src folder

mastersingh24 (Tue, 20 Feb 2018 17:55:23 GMT):
@dave.enyeart @rickr - I think we can remove the src folder ;)

rickr (Tue, 20 Feb 2018 18:52:24 GMT):
@mastersingh24 read that to mean we should remove the need for the tar ball to have the `src` directory .. which would mean a change on the Peer

rickr (Tue, 20 Feb 2018 18:54:22 GMT):
Isn't this as easy as if node then md src and untar in src

mastersingh24 (Tue, 20 Feb 2018 19:09:51 GMT):
We don't need to do anything on the peer actually

muralisr (Tue, 20 Feb 2018 19:09:57 GMT):
@dave.enyeart I can't think of a reason for packaging under src/ for node either

mastersingh24 (Tue, 20 Feb 2018 19:10:35 GMT):
We can double check, but I'm not sure why we would need to change the peer

mujji89 (Tue, 20 Feb 2018 22:15:04 GMT):
@rickr it waits some second after this in log Blocks -> DEBU 3ca [channel: foo] Received seekInfo (0xc4209b2a60) start: > stop: > from 172.18. 0.8:34608 orderer.example.com | 2018-02-20 22:12:50.396 UTC [fsblkstorage] waitForBl ock -> DEBU 3cb Going to wait for newer blocks. maxAvailaBlockNumber=[0], waitFo rBlockNum=[1]

mujji89 (Tue, 20 Feb 2018 22:15:04 GMT):
@rickr it waits some second after this in log Blocks -> DEBU 3ca [channel: foo] Received seekInfo (0xc4209b2a60) start: > stop: > from 172.18. 0.8:34608 orderer.example.com | 2018-02-20 22:12:50.396 UTC [fsblkstorage] waitForBl ock -> DEBU 3cb Going to wait for newer blocks. maxAvailaBlockNumber=[0], waitFo rBlockNum=[1]

mujji89 (Tue, 20 Feb 2018 22:15:04 GMT):
@rickr it waits some second after this in log ....... Blocks -> DEBU 3ca [channel: foo] Received seekInfo (0xc4209b2a60) start: > stop: > from 172.18. 0.8:34608 orderer.example.com | 2018-02-20 22:12:50.396 UTC [fsblkstorage] waitForBl ock -> DEBU 3cb Going to wait for newer blocks. maxAvailaBlockNumber=[0], waitFo rBlockNum=[1]

mujji89 (Tue, 20 Feb 2018 22:19:30 GMT):
it gives the same error after setting up the env variable

rickr (Tue, 20 Feb 2018 23:53:10 GMT):
hmm what's so _unique_ about your situation ? :thinking: You would need to ask on the #fabric-peer-endorser-committer what's going on.

vudathasaiomkar (Wed, 21 Feb 2018 11:18:02 GMT):
Has joined the channel.

dave.enyeart (Wed, 21 Feb 2018 13:32:15 GMT):
@rickr I looked deeper into node chaincode docker creation. The “src” directory is used to ensure that nothing besides the intended source code gets included in the ultimate chaincode image, only the content under src gets copied: https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/node/platform.go#L187 META-INF and anything else that may be lingering at the top level of the package therefore get excluded from the chaincode image, as desired. I think we need to keep the package contract as it is, and follow the existing design as mentioned in the FAB-8345 comment (separate src and META-INF directories in the chaincode package. I think your idea of asking application for a src location and a META-INF location is a good solution.

dave.enyeart (Wed, 21 Feb 2018 13:32:15 GMT):
@rickr @bretharrison I looked deeper into node chaincode docker creation. The “src” directory is used to ensure that nothing besides the intended source code gets included in the ultimate chaincode image, only the content under src gets copied: https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/node/platform.go#L187 META-INF and anything else that may be lingering at the top level of the package therefore get excluded from the chaincode image, as desired. I think we need to keep the package contract as it is, and follow the existing design as mentioned in the FAB-8345 comment (separate src and META-INF directories in the chaincode package. I think your idea of asking application for a src location and a META-INF location is a good solution.

rickr (Wed, 21 Feb 2018 13:41:42 GMT):
@dave.enyeart Where in Fabric documentation is the META-INF directory layout described ? What needs to be there and what exact format for CouchDB indices ?

dave.enyeart (Wed, 21 Feb 2018 13:43:31 GMT):
@rickr Here it is:

dave.enyeart (Wed, 21 Feb 2018 13:43:31 GMT):
http://hyperledger-fabric.readthedocs.io/en/master/couchdb_as_state_database.html#using-couchdb-from-chaincode

rickr (Wed, 21 Feb 2018 13:44:08 GMT):
To be clear too. We will package this directory but not care what's in it. SDKs will not inspect what's there

dave.enyeart (Wed, 21 Feb 2018 13:44:47 GMT):
right, we do validation of the META-INF content on the peer side. chaincode install will fail if bad content is passed in.

rickr (Wed, 21 Feb 2018 13:52:36 GMT):
why not PEER-INF ? :)

donald86trung (Wed, 21 Feb 2018 14:10:57 GMT):
Has joined the channel.

schwinnez (Wed, 21 Feb 2018 17:23:42 GMT):
In case anyone is interested. The problem i was talking about a few days ago comes from some go dependencies. The strange thing is, it only appears when intalling chaincode via Java-SDK. Could this be a bug. And how can I use the go dependencies described there? I think they are pretty basic and it should work in general, right? https://stackoverflow.com/questions/48852755/oci-runtimer-error-when-installing-hyperledger-chaincode-via-java-sdk

rickr (Wed, 21 Feb 2018 18:33:28 GMT):
Related to this maybe ? https://github.com/hyperledger/fabric-sdk-java#go-lang-chaincode

schwinnez (Wed, 21 Feb 2018 19:46:25 GMT):
But can you explain, why this problem only occurrs when deploying chaincode via sdk? They use the same peer api, i think?

rickr (Wed, 21 Feb 2018 20:10:41 GMT):
they?

schwinnez (Wed, 21 Feb 2018 20:37:54 GMT):
sorry, i mean the cli peer tool and the java sdk.

rickr (Wed, 21 Feb 2018 21:54:11 GMT):
@muralisr ^^^

muralisr (Wed, 21 Feb 2018 21:56:43 GMT):
so if I understand it right @rickr @schwinnez ... the only non-GO packages are ``` "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/protos/peer"```

muralisr (Wed, 21 Feb 2018 21:59:46 GMT):
these are already in ccenv and hence don't need to be provided

muralisr (Wed, 21 Feb 2018 22:01:37 GMT):
pretty much what example02 uses

muralisr (Wed, 21 Feb 2018 22:02:48 GMT):
sure that would have worked with java SDK too ? ... not sure what you are running into @schwinnez ...the stack overflow just says ` {"message":"oci runtime error: container_linux.go:295: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\"\n"}`

muralisr (Wed, 21 Feb 2018 22:02:57 GMT):
perhaps some more infor from the peer logs will help

muralisr (Wed, 21 Feb 2018 22:02:57 GMT):
perhaps some more infor from the peer debug level logs will help

aatkddny (Thu, 22 Feb 2018 03:18:29 GMT):
So i'm just getting back to looking at a piece of channel generation logic using the sdk. I can do the newChannel using the base genesis block I get from running configtxgen no problem. What i can't see is the analog to the peer channel update calls for the anchor peers for each org msp. Do I need them? It seems to be working without them as far as I can tell. If I do actually need them, is there a sample call in the SDK?

schwinnez (Thu, 22 Feb 2018 07:13:48 GMT):
@muralisr if you're installing a chaincode which uses bytes, json and time (i'm not sure which one lead to the problem) and you do the installation/instantiation as in the End2EndIT you should run into the same problem. I tried it on several environments... same result. I am currently doing a workaround. If you can't reproduce this, then I can produce some DEBUG logs for you, okay? You can also have a look at https://stackoverflow.com/questions/47593097/oci-runtime-error-when-sending-hyperledger-fabrics-chaincode-instantiation-requ. In this case, scrypt (i think also a standard go package) caused the problem. In that thread you will have detailed log.

schwinnez (Thu, 22 Feb 2018 07:13:48 GMT):
@muralisr if you're installing a chaincode which uses bytes, json and time (i'm not sure which one lead to the problem) and you do the installation/instantiation as in the End2EndIT you should run into the same problem. I tried it on several environments... same result. I am currently doing a workaround. If you can't reproduce this, then I can produce some DEBUG logs for you, okay? You can also have a look at https://stackoverflow.com/questions/47593097/oci-runtime-error-when-sending-hyperledger-fabrics-chaincode-instantiation-requ. In this case, scrypt caused the problem (scrypt is contained in sub-repo, but the error seems to be very similar and i don't understand where it comes from) In that thread you will have detailed log.

zzylmt (Thu, 22 Feb 2018 08:05:16 GMT):
hi,everyone.while i test End2endIT in fabric-sdk-java,it's said can't Connect to localhost:7054.i have run the script named network_setup.sh in fabric/example/e2e_cli,and it's worked.anybody can tell me what wrong?

zzylmt (Thu, 22 Feb 2018 08:05:25 GMT):

qq.png

rickr (Thu, 22 Feb 2018 12:06:43 GMT):
Java SDK does not use any network_setup.sh

rickr (Thu, 22 Feb 2018 12:15:40 GMT):
@muralisr Can you see if the what's needed there is vendoring of the packages ? As is described here https://github.com/hyperledger/fabric/blob/master/docs/source/chaincode4ade.rst#managing-external-dependencies-for-chaincode-written-in-go

zzylmt (Thu, 22 Feb 2018 13:18:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2gYmWMCbrz2BbrJCW) @rickr how should i do?plz,ths

zzylmt (Thu, 22 Feb 2018 13:24:52 GMT):
@rickr In fact, I did nothing to change the codes that come from the github

zzylmt (Thu, 22 Feb 2018 13:27:36 GMT):
@rickr In fact, I have not changed anything for the code that comes from github

rickr (Thu, 22 Feb 2018 13:51:10 GMT):
cd src/test/fixture/sdkintegration ./fabric.sh restart

dharuq (Thu, 22 Feb 2018 21:41:08 GMT):
hi! i am trying to run the End2endIT test and followed all the steps from the readme. but i have this error: java.lang.NoSuchFieldError: id_dsa_with_sha3_224 at org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder.(Unknown Source) at org.bouncycastle.operator.jcajce.JcaContentSignerBuilder.(Unknown Source) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.generateCertificationRequest(CryptoPrimitives.java:758) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:395) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:348) at org.hyperledger.fabric.sdkintegration.End2endIT.enrollUsersSetup(End2endIT.java:286) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:184) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206) Anyone knows how to solve it? Thanks :)

rickr (Thu, 22 Feb 2018 21:50:40 GMT):
never seen that one before :scream: What platform/jdk ?

rickr (Thu, 22 Feb 2018 21:54:17 GMT):
`java -XshowSettings:properties -version`

rickr (Thu, 22 Feb 2018 21:55:58 GMT):
Looks like your in eclipse .. can you first try running the integration test as the README.md states from a commnad line.

dharuq (Thu, 22 Feb 2018 22:19:08 GMT):

Screen Shot 2018-02-22 at 22.14.38.png

dharuq (Thu, 22 Feb 2018 22:26:15 GMT):

TerminalSavedOutput.txt

dharuq (Thu, 22 Feb 2018 22:26:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JHWZbzmSuAbFmw63L) I run mvn test and get this..

dharuq (Thu, 22 Feb 2018 22:29:24 GMT):

integrationTests.txt

rickr (Thu, 22 Feb 2018 22:29:43 GMT):
https://github.com/hyperledger/fabric-sdk-java#running-the-integration-tests ?

dharuq (Thu, 22 Feb 2018 22:31:09 GMT):
it is the last log

rickr (Thu, 22 Feb 2018 22:31:41 GMT):
did it run ?

dharuq (Thu, 22 Feb 2018 22:34:04 GMT):
i tried to run and the result was : Tests run: 44, Failures: 2, Errors: 40, Skipped: 2 as shown in the integrationTests.txt

rickr (Thu, 22 Feb 2018 22:35:14 GMT):
did you get your fabric started ?

dharuq (Thu, 22 Feb 2018 22:36:05 GMT):

Screen Shot 2018-02-22 at 22.35.31.png

rickr (Thu, 22 Feb 2018 22:38:08 GMT):
not sure .. every time you run that test you need to restart ``` cd src/test/fixture/sdkintegration ./fabric.sh restart ```

dharuq (Thu, 22 Feb 2018 22:39:06 GMT):
i always do that

rickr (Thu, 22 Feb 2018 22:39:17 GMT):
can you restart go back to the main directory `mvn clean install -DskipITs=false`

dharuq (Thu, 22 Feb 2018 22:42:18 GMT):

it2.txt

dharuq (Thu, 22 Feb 2018 22:42:50 GMT):
same thing.. build failure -- Tests run: 347, Failures: 7, Errors: 3, Skipped: 5

rickr (Thu, 22 Feb 2018 22:44:16 GMT):
https://ctrlv.it/ :wink:

rickr (Thu, 22 Feb 2018 22:45:57 GMT):
`CryptoPrimitivesTest.testCertificationRequestToPEM:661 » NoSuchField id_dsa_wi`

rickr (Thu, 22 Feb 2018 22:46:25 GMT):
At the moment stumped. I've not see this error before.

rickr (Thu, 22 Feb 2018 22:46:45 GMT):
mac os ?

dharuq (Thu, 22 Feb 2018 22:51:25 GMT):
yes..

rickr (Thu, 22 Feb 2018 22:52:24 GMT):
2018-02-22 22:40:53,691 main ERROR InstallProposalBuilder:194 - The project source directory does not exist: /Users/dharuqueshil/fabric-sdk-java/some/dir 2018-02-22 22:40:53,701 main ERROR InstallProposalBuilder:199 - The project source directory is not a directory: /var/folders/zq/kznflx_d6f93_0_3tzg0h8980000gn/T/junit456394595548618200/src/myapp 2018-02-22 22:40:53,704 main INFO InstallProposalBuilder:217 - Installing 'mycc::null::1.0' Java chaincode chaincodePath:'null' from input stream 2018-02-22 22:40:53,720 main ERROR InstallProposalBuilder:105 - java.io.IOException: Cannot read! Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.514 sec - in org.hyperledger.fabric.sdk.transaction.InstallProposalBuilderTest

rickr (Thu, 22 Feb 2018 22:53:05 GMT):
never seen those messages before

rickr (Thu, 22 Feb 2018 22:56:24 GMT):
`mvn --version` ?

dharuq (Thu, 22 Feb 2018 22:56:53 GMT):
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00) Maven home: /usr/local/Cellar/maven/3.2.5/libexec Java version: 1.8.0_31, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"

rickr (Thu, 22 Feb 2018 23:05:43 GMT):
did you ever change anything in your jdk with the security providers ?

rickr (Thu, 22 Feb 2018 23:07:18 GMT):
https://docs.oracle.com/cd/E19830-01/819-4712/ablsc/index.html ?

andersoncarubelli (Thu, 22 Feb 2018 23:23:18 GMT):
Has joined the channel.

dharuq (Thu, 22 Feb 2018 23:30:05 GMT):
i had bouncy castle on 11 position.. i change it to the 2 but i am getting build failure -- Tests run: 44, Failures: 16, Errors: 14, Skipped: 2 the log is here: https://ctrlv.it/id/98355/3233020318

huy.tranibm (Thu, 22 Feb 2018 23:32:37 GMT):
Hi guys, i am using java sdk e2e test for version 1.0.5. I need to connect to the cloud and TLS is enabled. I have set this property here in the TestConfig.java ``` defaultProperty(INTEGRATIONTESTSTLS, "/Users/huytranibm/FabricFolder/fabric-sdk-java-1.0/fabric-sdk-java/src/test/fixture/sdkintegration/e2e-2Orgs/channel/crypto-config/3.secure.blockchain.ibm.com.rootcert"); ``` but i am still getting some errors. Am i supplying the correct value for this TLS property?

huy.tranibm (Thu, 22 Feb 2018 23:32:55 GMT):
this is my log

huy.tranibm (Thu, 22 Feb 2018 23:33:44 GMT):
```RUNNING: End2endIT. 2018-02-22 23:26:19,770 main ERROR HFCAClient:444 - sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) at sun.security.ssl.Handshaker.process_record(Handshaker.java:961) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) at org.apache.http.conn.ssl.SSLSocketFactory.createLayeredSocket(SSLSocketFactory.java:573) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:557) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:1071) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:404) at org.hyperledger.fabric.sdkintegration.End2endIT.enrollUsersSetup(End2endIT.java:264) ```

dharuq (Thu, 22 Feb 2018 23:37:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mB2NNRM44ordY7yXc) @huy.tranibm maybe your problem is similar to my.. i change the order of the providers in the java.security file.. the bouncy castle has to be in the 2nd position -- https://docs.oracle.com/cd/E19830-01/819-4712/ablsc/index.html

huy.tranibm (Thu, 22 Feb 2018 23:38:27 GMT):
thanks @dharuq i'll give this a try, have you resolve your problem?

dharuq (Thu, 22 Feb 2018 23:40:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yzX5k7qBGMe7ncDig) when i executed the End2endIT test i still have failure.. with this output now: org.hyperledger.fabric.sdk.exception.TransactionException: Channel bar connect failed on peer eventing service peer0.org2.example.com. Reason: UNIMPLEMENTED: unknown service protos.Deliver at org.hyperledger.fabric.sdk.PeerEventServiceClient.connectEnvelope(PeerEventServiceClient.java:291) at org.hyperledger.fabric.sdk.PeerEventServiceClient.peerVent(PeerEventServiceClient.java:354) at org.hyperledger.fabric.sdk.PeerEventServiceClient.connect(PeerEventServiceClient.java:324) at org.hyperledger.fabric.sdk.Peer.initiateEventing(Peer.java:114) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:958) at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:858) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:214) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:185) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206) Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service protos.Deliver at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:391) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

dharuq (Thu, 22 Feb 2018 23:41:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DkzDdy7xL6HEbLLXu) @huy.tranibm not yet.. :(

huy.tranibm (Thu, 22 Feb 2018 23:45:18 GMT):
i suspect that it has something to do with this property here in the TestConfig.java

rickr (Fri, 23 Feb 2018 00:14:14 GMT):
@dharuq Your executing against v1.0x Fabric running SDK1.1.

rickr (Fri, 23 Feb 2018 00:17:02 GMT):
uncomment in src/test/fixture/sdkintegration/.env the alpha tags and restart fabric

huy.tranibm (Fri, 23 Feb 2018 00:26:13 GMT):
rickr, any clue what im doing wrong on my part?

huy.tranibm (Fri, 23 Feb 2018 00:26:43 GMT):
i was able to successfully use the credentials from a node sdk e2e test that worked

huy.tranibm (Fri, 23 Feb 2018 00:27:01 GMT):
but the java i dont know where i should be supplying the tls cert

dharuq (Fri, 23 Feb 2018 00:30:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F853depxSAmheKqE7) Thanks @rickr :D

huy.tranibm (Fri, 23 Feb 2018 00:36:30 GMT):
hey guys is there any documentation on full list of properties for config

rickr (Fri, 23 Feb 2018 00:50:27 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/a44c2aa80887dbea7797f847046a0ef5ad8b5ae5/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java The Javadoc on the methods is a good as it gets at the moment. I'll admit something definitely needs improvement

rickr (Fri, 23 Feb 2018 00:50:27 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/a44c2aa80887dbea7797f847046a0ef5ad8b5ae5/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java The Javadoc on the methods is as good as it gets at the moment. I'll admit it's something that definitely needs improvement

huy.tranibm (Fri, 23 Feb 2018 01:06:02 GMT):
thanks rick

zzylmt (Fri, 23 Feb 2018 02:48:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H6qsD9yLNGAL5fMzs) @rickr i do as you say,but the wrong continue.i have no idea now.what should i do next?

zzylmt (Fri, 23 Feb 2018 02:48:21 GMT):

1.png

zzylmt (Fri, 23 Feb 2018 02:48:24 GMT):

2.png

huy.tranibm (Fri, 23 Feb 2018 03:01:54 GMT):
Hi guys, i am running 1.0.1 mvn test, i've made no changes to any files, i started up the network from sdkintegration ./fabric up and all containers are running. After running mvn test i get this error

huy.tranibm (Fri, 23 Feb 2018 03:01:58 GMT):
```Results : Failed tests: CryptoPrimitivesTest.testValidateCertificate:489 CryptoPrimitivesTest.testValidateCertificateByteArray:436 CryptoPrimitivesTest.testVerify:529 CryptoPrimitivesTest.testVerifyBadSig Expected exception: org.hyperledger.fabric.sdk.exception.CryptoException Tests run: 288, Failures: 4, Errors: 0, Skipped: 2 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.135 s [INFO] Finished at: 2018-02-22T20:55:37-06:00 [INFO] Final Memory: 36M/598M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project fabric-sdk-java: There are test failures. [ERROR] [ERROR] Please refer to /Users/huytranibm/FabricFolder/fabric-sdk-java-1.0/fabric-sdk-java/target/surefire-reports for the individual test results. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Huys-MacBook-Pro:fabric-sdk-java huytranibm$ ```

huy.tranibm (Fri, 23 Feb 2018 03:02:26 GMT):
i tried to search and cant find any related topic with the cryptoPrimitivesTest

nebsterboy (Fri, 23 Feb 2018 08:22:58 GMT):
Hi, I want to provide an own CryptoSuite implementation. In order to achieve this, which components do I have to adopt as well? I'm wondering if the configuration transaction of a channel has to be set up in the right way, such that the right hash function is used for example. So which aspects do I have to concern about when providing an own CryptoSuite? I'm thankful for any advice.

SyneBlockChainTeam (Fri, 23 Feb 2018 10:41:51 GMT):
Has joined the channel.

SyneBlockChainTeam (Fri, 23 Feb 2018 10:44:15 GMT):
Hi I want to use two org's with one channel, how should I do it using fabric java sdk?

rickr (Fri, 23 Feb 2018 11:45:11 GMT):
@huy.tranibm https://docs.oracle.com/cd/E19830-01/819-4712/ablsc/index.html ?

rickr (Fri, 23 Feb 2018 11:45:11 GMT):
@huy.tranibm https://docs.oracle.com/cd/E19830-01/819-4712/ablsc/index.html ? The only time I've seen it fail is if you have configured different security providers

rickr (Fri, 23 Feb 2018 11:50:04 GMT):
@nebsterboy The *only* reason I know of to change crypto behavior is to support hardware encryption. I know one group that has done this. There was no need to replace the current crypto implementation but just provide a different java security provider.

rickr (Fri, 23 Feb 2018 11:54:00 GMT):
@SyneBlockChainTeam Here is an example of how two organization would work together on a single channel. It shows each of their own channel object having peers of the other to do transactions. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

nebsterboy (Fri, 23 Feb 2018 12:06:04 GMT):
@rickr we want to include post quantum crypto. If i'm right, this can bei done by providing a new CrypoSuite. Do you agree?

rickr (Fri, 23 Feb 2018 12:10:38 GMT):
I don't know enough about quantum crypto to answer that. If it has a java security provider implementation I'd try that.

rickr (Fri, 23 Feb 2018 12:10:38 GMT):
I don't know enough about quantum crypto to answer that. If it has a java security provider implementation I'd try that. Currently the encryption signing is done with elliptical curve and specific strength. This is what fabric and fabric ca expect. They need to work together. If quantum crypto doesn't do that you'd also need to change Fabric and Fabric ca to use quantum crypto ( my gut feis it doesn't ) I think that would be quite a bit of undertaking.

rickr (Fri, 23 Feb 2018 12:10:38 GMT):
I don't know enough about quantum crypto to answer that. If it has a java security provider implementation I'd try that. Currently the encryption signing is done with elliptical curve and specific strength. This is what fabric and fabric ca expect. They need to work together. If quantum crypto doesn't do that you'd also need to change Fabric and Fabric ca to use quantum crypto ( my gut feel it doesn't ) I think that would be quite a bit of undertaking.

rickr (Fri, 23 Feb 2018 12:28:13 GMT):
I would take this to the #fabric-crypto channel

SyneBlockChainTeam (Fri, 23 Feb 2018 13:18:40 GMT):
Thanks @rickr

nebsterboy (Fri, 23 Feb 2018 13:20:55 GMT):
Thanks @rickr

huy.tranibm (Fri, 23 Feb 2018 14:37:51 GMT):
thanks @rickr

Jeff.Ran (Sat, 24 Feb 2018 02:43:03 GMT):
Has joined the channel.

gauravgiri (Sat, 24 Feb 2018 11:58:46 GMT):

Clipboard - February 24, 2018 5:28 PM

gauravgiri (Sat, 24 Feb 2018 11:59:17 GMT):
Hi @rickr, I Installed chaincode on cloud environment(AWS EC2 instance), using fabric-sdk-java default test network at fabric-sdk-java/src/test/fixture/sdkintegration/docker-compose.yaml The End2endIT.java tests ran fine within this cloud environment. However, when from my local laptop i tried to run the End2endAndBackAgainIT.java tests, connecting to this remote blockchain network at AWS EC2 instance got the below error: Any idea why these errors only in case of remote connectivity from local fabric-sdk-java client to the remote blockchain network at AWS EC2 instance? I have checked connectivity, and all the necessary ports are opened in the remote cloud AWS EC2 instance. fabric-sdk-java client logs: RUNNING: End2endAndBackAgainIT 2018-02-24 11:41:17,303 main ERROR Channel:703 - org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.org1.example.com failed to connect in 1000 ms. org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.org1.example.com failed to connect in 1000 ms. at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:702) at org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT.reconstructChannel(End2endAndBackAgainIT.java:517) at org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT.setup(End2endAndBackAgainIT.java:164) AWS EC2 instance Peer logs attached file(aws-ec2-peer logs image attached): The peer logs in this cloud AWS EC2 instance show that the local client was able to connect to the AWS peer.

gauravgiri (Sat, 24 Feb 2018 11:59:17 GMT):
Hi @rickr, I Installed chaincode on cloud environment(AWS EC2 instance), using fabric-sdk-java default test network at fabric-sdk-java/src/test/fixture/sdkintegration/docker-compose.yaml The End2endIT.java tests ran fine within this cloud environment. However, when from my local laptop i tried to run the End2endAndBackAgainIT.java tests, connecting to this remote blockchain network at AWS EC2 instance got the below error: Any idea why these errors only in case of remote connectivity from local fabric-sdk-java client to the remote blockchain network at AWS EC2 instance? I have checked connectivity, and all the necessary ports are opened in the remote cloud AWS EC2 instance. fabric-sdk-java client logs: mention "EventHub peer0.org1.example.com failed to connect in 1000 ms" RUNNING: End2endAndBackAgainIT 2018-02-24 11:41:17,303 main ERROR Channel:703 - org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.org1.example.com failed to connect in 1000 ms. org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.org1.example.com failed to connect in 1000 ms. at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:702) at org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT.reconstructChannel(End2endAndBackAgainIT.java:517) at org.hyperledger.fabric.sdkintegration.End2endAndBackAgainIT.setup(End2endAndBackAgainIT.java:164) AWS EC2 instance Peer logs attached file(aws-ec2-peer logs image attached): The peer logs in this cloud AWS EC2 instance show that the local client was able to connect to the AWS peer.

rickr (Sat, 24 Feb 2018 14:08:13 GMT):
There is an event hub time out config param up that.

mujji89 (Sun, 25 Feb 2018 09:53:40 GMT):
Hey guys, finally today I successfully ran the end2endTest after a lot of struggle with windows, vbox and vagrant issues. Thanks for all of you for helping me. If someone is facing issue with setting up on windows I would gladly help, so feel free to disturb me.

rickr (Sun, 25 Feb 2018 12:19:24 GMT):
I now and then fire up a Windows 7 kvm on my native Linux system running Fabric. With some minor tweaks to the test configuration to address the native host instead of localhost the tests have run _for me_ without a hitch. If you think it's worth doing feel free to contribute a WindowsConsiderations.MD in https://github.com/hyperledger/fabric-sdk-java/tree/master/docs We can reference it from the main README.md

rickr (Sun, 25 Feb 2018 12:19:24 GMT):
I now and then fire up a Windows 7 kvm on my native Linux system running Fabric. With some minor tweaks to the test configuration to address the native host instead of localhost the tests have run _for me_ without a hitch. If you think it's worth doing feel free to contribute a WindowsConsiderations.MD in https://github.com/hyperledger/fabric-sdk-java/tree/master/docs We can reference it from the main README.md If there are just a few minor points maybe add to https://github.com/hyperledger/fabric-sdk-java#basic-troubleshooting

mujji89 (Sun, 25 Feb 2018 16:09:55 GMT):
I am using windows 8 and I think my problems were more specific to my OS and VBox settings, there was always something missing or were old versions, I think the current README should be good for most of the people doing fresh installations

yzhivkov (Sun, 25 Feb 2018 18:33:14 GMT):
Has joined the channel.

SwatiRaj (Mon, 26 Feb 2018 05:24:26 GMT):
I am currently trying to add a new peer to a running hyperledger network, so I followed IBM's aricle ont he same : https://www.ibm.com/developerworks/cloud/library/cl-add-an-organization-to-your-hyperledger-fabric-blockchain/index.html, but its showing me to go to a peer docker container, and run some commands to get configuration from peer container itself , but I have to setup the environment on dev mode, so each peer has to be on different VM, and thet dont have access to other VMs peers, how to configure a new peer in that scenerio. It would be of great help if anyone has tried something of this sort

rickr (Mon, 26 Feb 2018 07:35:07 GMT):
I have not read that article yet and not sure I understand your question. There is a much more basic example of how this is done by changing the channel batch size in the JSDK. Yes it's much simpler undertaking :) It dependents on previous integration test End2endIT to have run before it that already _created_ the channel and joined the peers. It first reconstructs the object of the channel so the SDK can work with it and the goes through the steps of updating the batch size with the configtxlator

rickr (Mon, 26 Feb 2018 07:35:07 GMT):
I have not read that article yet and not sure I understand your question. There is a much more basic example of how this is done by changing the channel batch size in the JSDK. Yes it's much simpler undertaking :) It dependents on previous integration test End2endIT to have run before it that already _created_ the channel and joined the peers. It first reconstructs the object of the channel so the SDK can work with it and the goes through the steps of updating the batch size with the configtxlator https://github.com/hyperledger/fabric-sdk-java/blob/cd935433a87d081b25445e34259f3d2e5cb5b9a2/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java#L90-L225 Not sure if that will help you but just wanted to point that out.

rickr (Mon, 26 Feb 2018 07:35:07 GMT):
I have not read that article yet and not sure I understand your question. There is a much more basic example of how updating a channel is done by changing the channel batch size in the JSDK. Yes it's much simpler undertaking :) It dependents on previous integration test End2endIT to have run before it that already _created_ the channel and joined the peers. It first reconstructs the object of the channel so the SDK can work with it and the goes through the steps of updating the batch size with the configtxlator https://github.com/hyperledger/fabric-sdk-java/blob/cd935433a87d081b25445e34259f3d2e5cb5b9a2/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java#L90-L225 Not sure if that will help you but just wanted to point that out.

rickr (Mon, 26 Feb 2018 07:35:07 GMT):
I have not read that article yet and not sure I understand your question. There is a much more basic example of how updating a channel is done by changing the channel batch size in the JSDK. Yes it's much simpler undertaking :) It dependents on previous integration test End2endIT to have run before it that already _created_ the channel and joined the peers. It first reconstructs the object of the channel so the SDK can work with it and then goes through the steps of updating the batch size with the configtxlator https://github.com/hyperledger/fabric-sdk-java/blob/cd935433a87d081b25445e34259f3d2e5cb5b9a2/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java#L90-L225 Not sure if that will help you but just wanted to point that out.

smartheye (Mon, 26 Feb 2018 15:04:33 GMT):
Has joined the channel.

Kavaz (Mon, 26 Feb 2018 16:09:13 GMT):
Has joined the channel.

aatkddny (Mon, 26 Feb 2018 16:16:01 GMT):
Is he looking to add a new peer or a new org?

Mittsommerregen (Mon, 26 Feb 2018 16:26:15 GMT):
Has joined the channel.

Kavaz (Mon, 26 Feb 2018 16:26:19 GMT):

ErrorSuccessBUILD.png

Kavaz (Mon, 26 Feb 2018 16:26:21 GMT):
Hello everybody Is it normal that I get more than 900 errors on the Eclipse IDE while following this guide ( https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md ) to the setup of the SDK environment but when I try to the execute the command "mvn test" in the ubuntu shell I get build success instead? Did I forget something?

Kavaz (Mon, 26 Feb 2018 16:26:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WiNLiBHiYL7HNEFcn) @skarim I tried to do it but unfortunately the problem was not solved [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ui6cQxBAbdxH3t8QQ) @aatkddny No, I have only done exactly the steps as they are described at https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md This is my first time trying to use fabric java sdk. I just tried to do "Run As> Maven Generate Sources" and "Debug As> Maven Generate Sources" on eclipse and I get "build failed". I discovered that the problem is caused by the fact that from bash I run "mvn test" as SU / Root, while on Eclipse I do not and therefore I get the following error: fabric-sdk-java/target/protoc-dependencies/d5e526ad09e0fad2f6c8a7f40d8bcab5/google/protobuf/struct.proto unable to be deleted. -> [Help 1] I understood this because if I write in the bash "mvn test" without using "sudo" or "sudo su", I get the same error How can I solve this?

Kavaz (Mon, 26 Feb 2018 16:26:21 GMT):
Hello everybody Is it normal that I get more than 900 errors on the Eclipse IDE while following this guide ( https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md ) to the setup of the SDK environment but when I try to the execute the command "mvn test" in the ubuntu shell I get build success instead? Did I forget something?

Kavaz (Mon, 26 Feb 2018 16:26:21 GMT):
Hello everybody Is it normal that I get more than 900 errors on the Eclipse IDE while following this guide ( https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md ) to the setup of the SDK environment but when I try to the execute the command "mvn test" in the ubuntu shell I get build success instead? Did I forget something?

skarim (Mon, 26 Feb 2018 17:03:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5PF4noqyABoAcxmx3) @Kavaz Can you try right clicking on your project and do Maven > Update Project and see it resolves those errors

sunshinek31 (Tue, 27 Feb 2018 03:26:19 GMT):
Has joined the channel.

albert.lacambra (Tue, 27 Feb 2018 15:33:13 GMT):
exist something in the sdk like https://github.com/hyperledger/blockchain-explorer/blob/master/service/blockscanner.js?

aatkddny (Tue, 27 Feb 2018 15:38:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5PF4noqyABoAcxmx3) @Kavaz Did you do a maven>generate sources?

huy.tranibm (Tue, 27 Feb 2018 17:57:41 GMT):
For version 1.1 alpha, will the SDK automatically detect TSL from https and grpcs and use the tlsCaCerts property in the config file?

huy.tranibm (Tue, 27 Feb 2018 18:06:48 GMT):
or do i have to setProperties sslProvider and negotiationType manually?

aatkddny (Tue, 27 Feb 2018 18:55:40 GMT):
it fails without the openssl one for sure. not sure about detecting tls - i just set everything.

rickr (Tue, 27 Feb 2018 18:58:47 GMT):
It runs with tls enabled in our IT tests

huy.tranibm (Tue, 27 Feb 2018 19:24:02 GMT):
thanks guys

VikasJakhar (Tue, 27 Feb 2018 20:09:28 GMT):
Has joined the channel.

Kavaz (Tue, 27 Feb 2018 22:08:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WiNLiBHiYL7HNEFcn) @skarim I tried to do it but unfortunately the problem was not solved [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ui6cQxBAbdxH3t8QQ) @aatkddny No, I have only done exactly the steps as they are described at https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md This is my first time trying to use fabric java sdk. I just tried to do "Run As> Maven Generate Sources" and "Debug As> Maven Generate Sources" on eclipse and I get "build failed". I discovered that the problem is caused by the fact that from bash I run "mvn test" as SU / Root, while on Eclipse I do not and therefore I get the following error: fabric-sdk-java/target/protoc-dependencies/d5e526ad09e0fad2f6c8a7f40d8bcab5/google/protobuf/struct.proto unable to be deleted. -> [Help 1] I understood this because if I write in the bash "mvn test" without using "sudo" or "sudo su", I get the same error How can I solve this?

Kavaz (Tue, 27 Feb 2018 22:08:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ui6cQxBAbdxH3t8QQ) @aatkddny No, I have only done exactly the steps as they are described at https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md This is my first time trying to use fabric java sdk. I just tried to do "Run As> Maven Generate Sources" and "Debug As> Maven Generate Sources" on eclipse and I get "build failed". I discovered that the problem is caused by the fact that from bash I run "mvn test" as SU / Root, while on Eclipse I do not and therefore I get the following error: fabric-sdk-java/target/protoc-dependencies/d5e526ad09e0fad2f6c8a7f40d8bcab5/google/protobuf/struct.proto unable to be deleted. -> [Help 1] I understood this because if I write in the bash "mvn test" without using "sudo" or "sudo su", I get the same error How can I solve this?

SwatiRaj (Wed, 28 Feb 2018 09:15:33 GMT):
@rickr Thanks for replying , Yes I am looking to add new organization with one peer into the network,

SwatiRaj (Wed, 28 Feb 2018 09:16:13 GMT):
I understood I have to reconfigure it using configtxlator tool, I ll have a look at the link provided and get back to you :)

SwatiRaj (Wed, 28 Feb 2018 09:17:15 GMT):
@aatkddny Yes I am looking to add new org with 1 peer into the network, if you have any leads ?

SwatiRaj (Wed, 28 Feb 2018 09:17:54 GMT):
The hyperledger network is already running, with 2 orgs, 1 orderer and one CA

Kavaz (Wed, 28 Feb 2018 09:33:21 GMT):
Ok I solved my last problem by directly starting eclipse as SU Now I get "BUILD SUCCESS" also from eclipse and the errors have become only 2 So Maven> Generate sources has worked, thanks

gauravgiri (Wed, 28 Feb 2018 12:44:18 GMT):
Hi @rickr, Can you please provide some pointers, on why the enroll function to fabric_ca results in error for: "Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty ". Detailed trace below... org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Url:https://localhost:7054, Failed to enroll user admin at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:346) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:254) at org.hyperledger.fabric.sdkintegration.TestJavaSDKHyperledger_101_IBP.registrationAndEnrollmentUsers(TestJavaSDKHyperledger.java:180) ... Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1889) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1410) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ... Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.validator.PKIXValidator.(PKIXValidator.java:90) at sun.security.validator.Validator.getInstance(Validator.java:179) at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312) at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ...

gauravgiri (Wed, 28 Feb 2018 12:44:18 GMT):
Hi @rickr, Can you please provide some pointers, on why the enroll function to fabric_ca results in error for: "Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty ". Detailed trace below... org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Url:https://localhost:7054, Failed to enroll user admin at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:346) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:254) at org.hyperledger.fabric.sdkintegration.TestJavaSDKHyperledger.registrationAndEnrollmentUsers(TestJavaSDKHyperledger.java:180) ... Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906) at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1889) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1410) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ... Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.validator.PKIXValidator.(PKIXValidator.java:90) at sun.security.validator.Validator.getInstance(Validator.java:179) at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312) at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ...

aatkddny (Wed, 28 Feb 2018 13:37:07 GMT):
So I'll confess to a basic lack of understanding - something - here. I'm trying to do this: `BASE_CRYPTO=/crypto-config ORDERER_CA=${BASE_CRYPTO}/ordererOrganizations/orderer.com/orderers/orderer.orderer.com/msp/tlscacerts/tlsca.orderer.com-cert.pem CORE_PEER_LOCALMSPID="OrdererMSP" CORE_PEER_TLS_ROOTCERT_FILE=$ORDERER_CA CORE_PEER_MSPCONFIGPATH=${BASE_CRYPTO}/ordererOrganizations/orderer.com/users/Admin@orderer.com/msp peer channel fetch config sys_config_block.pb -o orderer:7050 -c testchainid --tls --cafile $ORDERER_CA` using the SDK. It fetches the system channel config block. I'm having terrible trouble getting the peer - any peer - to join the system channel. I've tried just about every combination of parameters of joinPeer and addPeer I can think of. I've created a new peer org with the certs for the organizer and tried using that. I set up a user with the org enrolled using the same code i use to create a peer admin. Same code works to create and join any other channel. What am I missing? I can see the block is there if I step through the code in channel.java. It fails pretty much in the same spot no matter what - looking at the responses in sendProposalToPeers. I ripped off the code from UpdateChannelIT to act as the base. It works for anything but getting the "testchainid" channel. Is there a trick I'm missing?

aatkddny (Wed, 28 Feb 2018 13:37:07 GMT):
So I'll confess to a basic lack of understanding - something - here. I'm trying to do this: ```BASE_CRYPTO=/crypto-config ORDERER_CA=${BASE_CRYPTO}/ordererOrganizations/orderer.com/orderers/orderer.orderer.com/msp/tlscacerts/tlsca.orderer.com-cert.pem CORE_PEER_LOCALMSPID="OrdererMSP" CORE_PEER_TLS_ROOTCERT_FILE=$ORDERER_CA CORE_PEER_MSPCONFIGPATH=${BASE_CRYPTO}/ordererOrganizations/orderer.com/users/Admin@orderer.com/msp peer channel fetch config sys_config_block.pb -o orderer:7050 -c testchainid --tls --cafile $ORDERER_CA``` using the SDK. It fetches the system channel config block. I'm having terrible trouble getting the peer - any peer - to join the system channel. I've tried just about every combination of parameters of joinPeer and addPeer I can think of. I've created a new peer org with the certs for the organizer and tried using that. I set up a user with the org enrolled using the same code i use to create a peer admin. Same code works to create and join any other channel. What am I missing? I can see the block is there if I step through the code in channel.java. It fails pretty much in the same spot no matter what - looking at the responses in sendProposalToPeers. I ripped off the code from UpdateChannelIT to act as the base. It works for anything but getting the "testchainid" channel. Is there a trick I'm missing?

rickr (Wed, 28 Feb 2018 14:02:34 GMT):
Peers don't join any system channel. The code from UpdateChannelIT is updating the "foo" channel. You should join peers to channels you or some other organization is created for you.

rickr (Wed, 28 Feb 2018 14:03:51 GMT):
You should update channels you've created or again some other Org created for you to collaborate on.

aatkddny (Wed, 28 Feb 2018 14:13:58 GMT):
This is to update the system channel to add an org to the consortium.

aatkddny (Wed, 28 Feb 2018 14:13:58 GMT):
This is to update the system channel to add an org to the consortium. From here: `https://github.com/rohitadivi/Reconfigure-BYFN/blob/master/Create_channel.md`

aatkddny (Wed, 28 Feb 2018 14:13:58 GMT):
This is to update the system channel to add an org to the consortium. From here: `https://github.com/rohitadivi/Reconfigure-BYFN/blob/master/Create_channel.md` That allows me to enroll a new org in the consortium so I can create channels for them to transact. If it isn't possible I'll stop beating my head against the wall and script it.

rickr (Wed, 28 Feb 2018 14:16:42 GMT):
Let me work on it :) Very hectic here at the moment.

aatkddny (Wed, 28 Feb 2018 14:18:43 GMT):
Thx. I'll throw it all into a script until I hear there's a way to do it.

aatkddny (Wed, 28 Feb 2018 14:18:43 GMT):
Thx. I'll throw it all into a script until I hear there's a way to do it. Tired of the squishy sound of my head hitting the wall.

rickr (Wed, 28 Feb 2018 16:04:34 GMT):
Are you trying to update an existing channel ?

rickr (Wed, 28 Feb 2018 16:05:42 GMT):
Or just have that new org in the consortium when you create new channels ?

rickr (Wed, 28 Feb 2018 16:19:02 GMT):
Updating the `orderer system channel` may have issues and need to look into it. However if you are trying to update an existing channel updating the `orderer system channel` will have no affect on any existing channels. You will need to update that specific channel. Loosely, think of it as the channel get's it's own copy of `orderer system channel` information when it's created.

aatkddny (Wed, 28 Feb 2018 19:34:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vD3owB24u62JYh58P) I added the new org to the consortium so I can create new channels for it. Privacy concerns restrict my application to channels between pairs of orgs. New customers need to be integrated into the consortium and have transaction channels created. I have the code to create a channel down pat - I just needed to get them into the list.

aatkddny (Wed, 28 Feb 2018 19:34:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vD3owB24u62JYh58P) I added the new org to the consortium so I can create new channels for it. Privacy concerns restrict my application to channels between pairs of orgs. New customers need to be integrated into the consortium and have transaction channels created. I have the code to create a channel down pat - I just needed to get them into the list. The instructions in the link I added work just fine, so I need a way to duplicate the two peer calls from the CLI inside the SDK. I already did a different piece of code to add an extant org to an extant channel - I ripped it off the UpdateChannelIT. That was fine - I had a peer to come in from.

rickr (Fri, 02 Mar 2018 08:18:32 GMT):
@Here nice

IgorSim (Fri, 02 Mar 2018 08:50:30 GMT):
Has joined the channel.

Ricardo-Neisse (Fri, 02 Mar 2018 14:37:40 GMT):
Has joined the channel.

schwinnez (Sat, 03 Mar 2018 11:44:27 GMT):
Hey, I justrealized, that when using `channel.addPeer(peer)` without specifying the peer options, that peer is given all peer roles. Especially when calling channel.initialize(), this will fail if added peer is not available yet (i think due to added eventing). I am wondering now, what roles should external peers have (if the should endorse chaincode) but i don't want something to fail, i.e. i don't want exceptions when peers are not available. In general, my question is, what channel operations assume peers to be availlable and what can savely be used even when one or the other is not available?

schwinnez (Sat, 03 Mar 2018 11:44:27 GMT):
Hey, I justrealized, that when using `channel.addPeer(peer)` without specifying the peer options, that peer is given all peer roles. Especially when calling `channel.initialize()`, this will fail if added peer is not available yet (i think due to added eventing). I am wondering now, what roles should external peers have (if the should endorse chaincode) but i don't want something to fail, i.e. i don't want exceptions when peers are not available. In general, my question is, what channel operations assume peers to be availlable and what can savely be used even when one or the other is not available?

rickr (Sat, 03 Mar 2018 14:55:03 GMT):
You've probably hit something we need to address in the initialize. The issue with having endorsing peers with no event listening for when the transaction is committed is that you'd need to deal with inconsistent endorsements. If the peer you are listening on has committed the block with the transaction and you then send a new proposals to all peers they may not have committed the previous transaction and you'd get inconsistent endorsements. The SDK checks for that by default when you submit to the orderer but even if it didn't it would get rejected by all the committing peers .

schwinnez (Sat, 03 Mar 2018 18:37:21 GMT):
This means it should not happen that it get an exception when a peer is not available?

schwinnez (Sat, 03 Mar 2018 18:37:21 GMT):
This means it should not happen that I get an exception when a peer is not available?

schwinnez (Sat, 03 Mar 2018 18:37:30 GMT):
*I get

mustd (Sun, 04 Mar 2018 10:36:24 GMT):
Has joined the channel.

SantoshShahane (Sun, 04 Mar 2018 16:11:06 GMT):
First received frame was not SETTINGS.

SantoshShahane (Sun, 04 Mar 2018 16:11:12 GMT):
First received frame was not SETTINGS

anil.k (Sun, 04 Mar 2018 18:11:39 GMT):
Has joined the channel.

rickr (Sun, 04 Mar 2018 20:29:40 GMT):
@schwinnez With out a single peer active there is no way to get the config block which has the certificate CAs to validate endorsements. Also there is no way to do any endorsements either. The SDK probably only right now looks for one then fails, something that should be addressed soon. If initialize and asked that a peer should be doing eventing but it's not available to do I think it's reasonable to not start the channel. Note that after the channel starts if eventing source do become unavailable the SDK continues to trying to connect to it till it does become available. I suppose another option would be to let the channel intiailze anyway and try to continue connect from the start.

rickr (Sun, 04 Mar 2018 20:29:40 GMT):
@schwinnez With out a single peer active there is no way to get the config block which has the certificate CAs to validate endorsements. Also there is no way to do any endorsements either. The SDK probably only right now looks for one then fails, something that should be addressed soon. If initialize and asked that a peer should be doing eventing but it's not available to do I think it's reasonable to not start the channel. Note that after the channel starts if eventing source do become unavailable the SDK continues to trying to connect to it till it does become available. I suppose another option would be to let the channel intiailze anyway and try to continue connect from the start.

kiattchaip (Mon, 05 Mar 2018 03:53:10 GMT):
Has joined the channel.

kiattchaip (Mon, 05 Mar 2018 03:59:00 GMT):
Hi all, does someone know how to check if a peer is available before adding it to a channel. Now, channel initialization will fail if channel contain an unavailable peer.

kiattchaip (Mon, 05 Mar 2018 03:59:00 GMT):
Hi all, does someone know how to check if a peer is available before adding it to a channel? Now, channel initialization will fail if channel contain an unavailable peer.

kiattchaip (Mon, 05 Mar 2018 03:59:00 GMT):
Hi all, does someone know how to check if a peer is available before adding it to a channel? Now, channel initialization will fail if channel contains an unavailable peer.

kiattchaip (Mon, 05 Mar 2018 04:23:27 GMT):
I think it will be great if the SDK allows me to add peers to the channel although some of them are not available and perform the peer availability checking internally. I add 4 peers to the channel when endorsement from 2 peers are required because some of them may be down a that time.

kiattchaip (Mon, 05 Mar 2018 04:23:27 GMT):
I think it will be great if the SDK allows me to add peers to the channel although some of them are not available and perform the peer availability checking internally. I add 4 peers to the channel when endorsement from 2 peers are required because some of them may be down at that time.

kiattchaip (Mon, 05 Mar 2018 04:23:27 GMT):
I think it will be great if the SDK allows me to add peers to the channel although some of them are not available and performs the peer availability checking internally. I add 4 peers to the channel when endorsement from 2 peers are required because some of them may be down at that time.

kiattchaip (Mon, 05 Mar 2018 04:23:27 GMT):
I think it will be great if the SDK allows me to add peers to the channel although some of them are not available and performs the peer availability checking internally. I add 4 peers to the channel when endorsement from 2 peers is required because some of them may be down at that time.

kiattchaip (Mon, 05 Mar 2018 04:24:38 GMT):
* at that time

abhinkraj (Mon, 05 Mar 2018 10:38:09 GMT):
Has joined the channel.

fanjianhang (Mon, 05 Mar 2018 12:03:09 GMT):
Hi all, if i import fabric-sdk-java into eclipse on windows 10, but my fabric network is built on the virtual machine, my question is that should i need to create a configuration files(such as config.properties) about peers/order/certs' location? I can't find any sample configuration in the fabric-sdk-java project.

fanjianhang (Mon, 05 Mar 2018 12:09:38 GMT):
What i am concerned is how to find the best way to debug the fabric-sdk-java's every functions, i think fabric-sdk-java is developed on windows, so i need a way to connect sdk to the fabric network on linux ,if someone has good idea, just tell me .

IgorSim (Mon, 05 Mar 2018 13:53:44 GMT):
Guys, i saw few examples with 'fabric-sdk-java' where 'Admin' identity of organization is set to user context (client.setUserContext()) and then transaction proposal is sent. Does Admin identity have default write policy for channel and that's the reason to use this identity?

rickr (Mon, 05 Mar 2018 15:42:30 GMT):
@aatkddny I have a `solution` for updating the orderer channel (aka default testchainid ) Need to first when creating the orderer block add an Application section to the Orderer ..

rickr (Mon, 05 Mar 2018 15:42:30 GMT):
@aatkddny I have a `solution` for updating the orderer channel (aka default testchainid ) Need to first when creating the orderer block add an Application section to the Orderer ..

rickr (Mon, 05 Mar 2018 15:42:36 GMT):

Clipboard - March 5, 2018 10:42 AM

rickr (Mon, 05 Mar 2018 15:43:29 GMT):
Next step create a Peer for the orderer ...

rickr (Mon, 05 Mar 2018 15:44:04 GMT):
``` peer0.orderer.example.com: container_name: peer0.orderer.example.com extends: file: peer-base/peer-base.yaml service: peer-base environment: - CORE_PEER_ID=peer0.orderer.example.comm - CORE_PEER_ADDRESS=peer0.orderer.example.com:9051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.orderer.example.com:9051 # - CORE_PEER_GOSSIP_ORGLEADER=true - CORE_PEER_LOCALMSPID=OrdererMSP volumes: - /var/run/:/host/var/run/ - ./e2e-2Orgs/${FAB_CONFIG_GEN_VERS}/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com:/etc/hyperledger/msp/peer:ro ports: - 9051:7051 - 9053:7053 depends_on: - orderer.example.com ```

rickr (Mon, 05 Mar 2018 15:49:46 GMT):
The rest is close to UpdateChannelIT except it joins that peer to the orderer channel since that was not done in End2end. Everything is done with usercontext of Orderer Admin Somewhat hacked example of this .. but sure you can follow --> https://ctrlv.it/id/102661/3421586726

siyuyifang (Tue, 06 Mar 2018 08:24:06 GMT):
Has joined the channel.

plutotulpo (Tue, 06 Mar 2018 10:49:32 GMT):
Has joined the channel.

jichangwei (Tue, 06 Mar 2018 10:55:54 GMT):
Has joined the channel.

jichangwei (Tue, 06 Mar 2018 11:13:14 GMT):
Guys, i run fabric-sdk-java 1.1.0-alpha End2endIT test with idea, fabric.sh up is ok and End2endIT gets error like this

jichangwei (Tue, 06 Mar 2018 11:16:27 GMT):
hi , i run fabric-sdk-java 1.1.0-alpha End2endIT test and get error like this ``` ```

aatkddny (Tue, 06 Mar 2018 12:45:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Thanks Rick, I'll look at it today. I've been distracted by an ongoing power outage for the last few days. I'm assuming the green highlighted lines in the block above are the magic that makes this all happen here - the rest of the code is very similar to the stuff I was trying, albeit with an older configtx - mind doesn't have the Capabilities stuff in it.

aatkddny (Tue, 06 Mar 2018 12:45:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Thanks Rick, I'll look at it today. I've been distracted by an ongoing power outage for the last few days. I'm assuming the green highlighted lines in the block above are the magic that makes this all happen here - the rest of the code is very similar to the stuff I was trying, albeit with an older configtx - mine doesn't have the Capabilities stuff in it - it looks like I need samples at rc1 to get this.

aatkddny (Tue, 06 Mar 2018 12:45:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Thanks Rick, I'll look at it today. I've been distracted by an ongoing power outage for the last few days. I'm assuming the green highlighted lines in the block above are the magic that makes this all happen here - the rest of the code is very similar to the stuff I was trying, albeit with an older configtx - mine doesn't have the Capabilities stuff in it - it looks like I need samples at rc1 to get this.

aatkddny (Tue, 06 Mar 2018 12:45:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Thanks Rick, I'll look at it today. I've been distracted by an ongoing power outage for the last few days. I'm assuming the green highlighted lines in the block above are the magic that makes this all happen here - the rest of the code is very similar to the stuff I was trying, albeit with an older configtx - mine doesn't have the Capabilities stuff in it - it looks like I need samples at rc1 to get this. Edit: Ugh - alpha to RC1 is chock full of breaking changes.

aatkddny (Tue, 06 Mar 2018 12:45:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Thanks Rick, I'll look at it today. I've been distracted by an ongoing power outage for the last few days. I'm assuming the green highlighted lines in the block above are the magic that makes this all happen here - the rest of the code is very similar to the stuff I was trying, albeit with an older configtx - mine doesn't have the Capabilities stuff in it - it looks like I need samples at rc1 to get this. :rage: Edit: Ugh - Fabric alpha to RC1 is chock full of breaking changes.

rickr (Tue, 06 Mar 2018 13:01:18 GMT):
@IgorSim Essentaily with regard to channel _out of the box_ a memeber can only invoke chaincode and query operations. Everything else is left to the Peer admin (admin role)

rjones (Tue, 06 Mar 2018 18:07:15 GMT):
dave.enyeart

rjones (Tue, 06 Mar 2018 18:07:20 GMT):
cbf

dave.enyeart (Tue, 06 Mar 2018 20:15:58 GMT):
rickr

fanjianhang (Wed, 07 Mar 2018 01:14:04 GMT):
@rickr Hi, it runs errors when i run IT test, it mentions "main ERROR HFCAClient:509 - null", what does it means?

fanjianhang (Wed, 07 Mar 2018 01:15:43 GMT):

Clipboard - 2018年3月7日上午9点15分

rjones (Wed, 07 Mar 2018 01:49:49 GMT):
Has joined the channel.

rjones (Wed, 07 Mar 2018 01:50:07 GMT):
@dave.enyeart why did you demote @rickr?

rickr (Wed, 07 Mar 2018 01:50:29 GMT):
No discussion on this ?

rjones (Wed, 07 Mar 2018 01:50:42 GMT):
oh, you're still an owner, you're just also a moderator.

dave.enyeart (Wed, 07 Mar 2018 01:50:56 GMT):
no demotion

dave.enyeart (Wed, 07 Mar 2018 01:51:00 GMT):
just added moderator

dave.enyeart (Wed, 07 Mar 2018 01:51:10 GMT):
so that rickr can do at-here

rjones (Wed, 07 Mar 2018 01:51:11 GMT):
I see that now.

rjones (Wed, 07 Mar 2018 01:51:18 GMT):
owners also can do that.

rickr (Wed, 07 Mar 2018 01:51:21 GMT):
ok -- not sure for the game playing

rjones (Wed, 07 Mar 2018 01:51:53 GMT):
we're going to roll out new chat permissions soon, anyway.

rjones (Wed, 07 Mar 2018 01:52:18 GMT):
My ad-hoc solution is unwieldy and can't easily be maintained.

rickr (Wed, 07 Mar 2018 01:52:19 GMT):
really

dave.enyeart (Wed, 07 Mar 2018 01:54:01 GMT):
i didnt know who all the owners were on all the channels... i just did a quick pass to ensure every channel had a moderator

rjones (Wed, 07 Mar 2018 01:54:46 GMT):
that is a bug in the UI. There's no way for me to tell who all the owners/moderators of channels are, either, short of looking in the database directly

rjones (Wed, 07 Mar 2018 01:55:00 GMT):
well, missing feature in the UI.

rickr (Wed, 07 Mar 2018 02:01:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Hfwu97yuSDgLkBT3v) @fanjianhang Not seen that ever reported or witnessed it myself.

jichangwei (Wed, 07 Mar 2018 03:44:52 GMT):
hi guys, i run fabric-sdk-java 1.1.0-alpha End2endIT test and get error like this ```*Constructing channel foo 2018-03-06 11:06:52,962 main ERROR Channel:1410 - Bad newest block expected status 200 got 400, Channel foo*``` ``` i did not change any code or config file and fabric.sh up is success. Has anyone ever met this and how to solve?

jichangwei (Wed, 07 Mar 2018 03:44:52 GMT):
hi guys, i run fabric-sdk-java 1.1.0-alpha End2endIT test and get error like this: ```*Constructing channel foo 2018-03-06 11:06:52,962 main ERROR Channel:1410 - Bad newest block expected status 200 got 400, Channel foo*```

jichangwei (Wed, 07 Mar 2018 03:44:52 GMT):
hi guys, i run fabric-sdk-java 1.1.0-alpha End2endIT test and get error like this: ```*Constructing channel foo 2018-03-06 11:06:52,962 main ERROR Channel:1410 - Bad newest block expected status 200 got 400, Channel foo*``` i did not change any code or config file and fabric.sh up is success. Has anyone ever met this and how to solve?

rjones (Wed, 07 Mar 2018 04:04:11 GMT):
Has left the channel.

rickr (Wed, 07 Mar 2018 12:20:21 GMT):
Running latest SDK ? Shouldn't make a difference but probably should now be use Fabric RC1 `IMAGE_TAG_FABRIC=:x86_64-1.1.0-rc1 IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0-rc1 ./fabric.sh restart`

rickr (Wed, 07 Mar 2018 12:47:30 GMT):

huy.tranibm (Wed, 07 Mar 2018 18:55:12 GMT):
Hello guys, running some test for 1.1.0alpha sdk and im receiving these weird "Expected MSP org1 but received org2" errors. After further investigation I found this in the code...

huy.tranibm (Wed, 07 Mar 2018 18:55:26 GMT):

Clipboard - March 7, 2018 12:55 PM

huy.tranibm (Wed, 07 Mar 2018 18:55:33 GMT):

Clipboard - March 7, 2018 12:55 PM

huy.tranibm (Wed, 07 Mar 2018 18:55:59 GMT):
this seems to be had left uncommented out by the tester by mistake?

huy.tranibm (Wed, 07 Mar 2018 18:56:08 GMT):
just FYI for anyone getting that error

huy.tranibm (Wed, 07 Mar 2018 18:56:17 GMT):

Clipboard - March 7, 2018 12:56 PM

huy.tranibm (Wed, 07 Mar 2018 19:00:52 GMT):
@rickr is there a 1.1.0-rc1 tag for java sdk? i only see 1.1.0alpha

schwinnez (Wed, 07 Mar 2018 19:28:59 GMT):
I can see the following Log when creating a channel: ` "org.hyperledger.fabric.sdk.Channel", "Bad deliver expected status 200 got 404, Channel testchannel`. It looks like everything is working fine though. Maybe there is a retry mechanism?

rickr (Wed, 07 Mar 2018 21:47:07 GMT):
there is a retry

rickr (Wed, 07 Mar 2018 21:49:03 GMT):
No RC1 If you're using the SDK get the latest code that is 1.1.0-rc1 If you want to use in applicaition SNAPSHOT-1.1.0

rickr (Wed, 07 Mar 2018 21:49:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GzDfiPmZEoq4mbNDa) @huy.tranibm Hard to tell from that where you're referencing

rickr (Wed, 07 Mar 2018 21:50:44 GMT):
You can run the sdk fabric at RC1 by `IMAGE_TAG_FABRIC=:x86_64-1.1.0-rc1 IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0-rc1 ./fabric.sh restart`

huy.tranibm (Wed, 07 Mar 2018 21:51:33 GMT):
@rickr its in Channel.java line 1150 from 1.1.0alpha sdk

huy.tranibm (Wed, 07 Mar 2018 21:51:48 GMT):
thanks for the rc1 info

huy.tranibm (Wed, 07 Mar 2018 21:56:06 GMT):
@rickr whats the version value should i use in my maven dependency? i tried latest, 1.1.0-rc1, and SNAPSHOT-1.1.0 and maven still can't resolve it. I want to pull rc1

huy.tranibm (Wed, 07 Mar 2018 22:00:13 GMT):

Clipboard - March 7, 2018 4:00 PM

rickr (Wed, 07 Mar 2018 22:01:29 GMT):
https://github.com/hyperledger/fabric-sdk-java#110-snapshot-builds

huy.tranibm (Wed, 07 Mar 2018 22:01:36 GMT):
thanks!

huy.tranibm (Wed, 07 Mar 2018 22:02:53 GMT):
sorry didn't check there but thanks!

huy.tranibm (Thu, 08 Mar 2018 02:27:10 GMT):
Hi guys, I am trying to add an orderer into multiple channels but i am getting this error ```Caused by: org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Can not add orderer orderer.example.com to channel bar because it already belongs to channel foo.``` This doesn't seem right? Can someone tell me if 1.1.0 doesn't allow an orderer to join multiple channel? If so i'll further investigate, i believe this has something to do with the network-config profile.

arunmitteam (Thu, 08 Mar 2018 02:42:44 GMT):
Has joined the channel.

arunmitteam (Thu, 08 Mar 2018 03:18:59 GMT):
Hi, where can i find examples of fabric-sdk-java?

fanjianhang (Thu, 08 Mar 2018 03:22:33 GMT):
@rickr Hi, i used the latest fabric-sdk-java but in the fabric version 1.0.6 , i got errors as follows:

fanjianhang (Thu, 08 Mar 2018 03:22:43 GMT):
Tests in error: End2endAndBackAgainNodeIT.setup:35->End2endAndBackAgainIT.runFabricTest:268->End2endAndBackAgainIT.reconstructChannel:712 » Transaction End2endIT.setup:185->runFabricTest:202->constructChannel:801 » Transaction Cha... End2endNodeIT.setup:49->End2endIT.runFabricTest:202->constructChannel:59 NullPointer NetworkConfigIT.doMainSetup:111->deployChaincodeIfRequired:121->constructChannel:459 » Transaction HFCAClientIT.testCertificateRevoke:423->getRevokes:570 » GenerateCRL POST requ... HFCAClientIT.testCreateAffiliation:839 » Affiliation [Code: 404] - Error while... HFCAClientIT.testCreateAndGetIdentity:595 » Identity [Code: 404] - Error while... HFCAClientIT.testDeleteAffiliationNoForce:1026 » Affiliation [Code: 404] - Err... HFCAClientIT.testGetAffiliation:780 » Affiliation [Code: 404] - Error while ge... HFCAClientIT.testGetAllAffiliation:795 » Affiliation [HTTP Status Code: 404] -... HFCAClientIT.testGetAllIdentity:642 » Identity [Code: 404] - Error while creat... HFCAClientIT.testGetIdentityNotExist:627 » Identity Error while getting user '... HFCAClientIT.testGetInfo:1095 NullPointer HFCAClientIT.testModifyIdentity:671 » Identity [Code: 404] - Error while creat... HFCAClientIT.testUpdateAffiliation:857 » Affiliation [Code: 404] - Error while... HFCAClientIT.testUpdateAffiliationNoForce:925 » Affiliation [Code: 404] - Erro... Tests run: 44, Failures: 15, Errors: 16, Skipped: 2

fanjianhang (Thu, 08 Mar 2018 03:43:44 GMT):
@rickr As you mentioned above, i use Fabric RC1, but i still get errors:``` Tests in error: End2endAndBackAgainNodeIT.setup:35->End2endAndBackAgainIT.runFabricTest:268->End2endAndBackAgainIT.reconstructChannel:712 » Transaction End2endIT.setup:185->runFabricTest:202->constructChannel:801 » Transaction Cha... End2endNodeIT.setup:49->End2endIT.runFabricTest:202->constructChannel:59 NullPointer NetworkConfigIT.doMainSetup:111->deployChaincodeIfRequired:121->constructChannel:459 » Transaction HFCAClientIT.testDeleteAffiliationNoForce:1027 » Affiliation [Code: 401] - Err... Tests run: 44, Failures: 6, Errors: 5, Skipped: 2 ```

kiattchaip (Thu, 08 Mar 2018 06:07:57 GMT):
I think src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java in https://github.com/hyperledger/fabric-sdk-java is the best example which is available right now.

zzylmt (Thu, 08 Mar 2018 08:48:35 GMT):
hi,experts,anybody can tell me what the error mean?

zzylmt (Thu, 08 Mar 2018 08:48:48 GMT):

2.png

zzylmt (Thu, 08 Mar 2018 08:48:49 GMT):

1.png

zzylmt (Thu, 08 Mar 2018 08:50:36 GMT):
what's the mean of "not enough endorsers for instantiate "?what should i do next

rickr (Thu, 08 Mar 2018 08:53:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wXGeS7wLbEpE5AyKg) @arunmitteam There is also a application shows multiple organizations .. since that seems to be asked a lot https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Thu, 08 Mar 2018 08:58:36 GMT):
@zzylmt Seems like the system you're testing with is real slow. To avoid build time outs in our own environment we upped some of the values. You can try these env. vars before you start the client and see if that may help. https://github.com/hyperledger/fabric-sdk-java/blob/8f65202c98b9ec6907202d1f7687e9be2a53803e/src/test/cirun.sh#L20

rickr (Thu, 08 Mar 2018 08:58:36 GMT):
@zzylmt Seems like the system you're testing with is real slow. To avoid build time outs in our own environment we upped some of the values. You can try these env. vars before you start the client and see if that may help. https://github.com/hyperledger/fabric-sdk-java/blob/8f65202c98b9ec6907202d1f7687e9be2a53803e/src/test/cirun.sh#L20-L26

zzylmt (Thu, 08 Mar 2018 09:02:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bbXmFR6Ergfcjwsq6) @rickr thank you:kissing_smiling_eyes:

rickr (Thu, 08 Mar 2018 09:09:08 GMT):
also add these ``` ORG_HYPERLEDGER_FABRIC_SDKTEST_INVOKEWAITTIME=300000 ORG_HYPERLEDGER_FABRIC_SDKTEST_DEPLOYWAITTIME=300000 ORG_HYPERLEDGER_FABRIC_SDKTEST_PROPOSALWAITTIME=300000 ```

kiattchaip (Thu, 08 Mar 2018 10:13:14 GMT):
@rickr Hi Rick, I have another case similar to the problem that the channel initialization fail when some peers on the list are down.`java.util.concurrent.TimeoutException at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) `

kiattchaip (Thu, 08 Mar 2018 10:26:40 GMT):
@rickr Hi Rick, I have another case similar to the problem that the channel fail to initialize if some peers on the list are down. A TimeoutExcecption will be thrown when I call channel.sendTransaction(successResponese).get(10, TimeUnit.SECONDS) if some peers on the list are down (after the channel is initialized). The transaction is completely committed to a ledger but the exception is thrown. Could you help to analyze this together with the channel initialization problem?

kiattchaip (Thu, 08 Mar 2018 10:26:40 GMT):
@rickr Hi Rick, I have another case similar to the problem that the channel fail to initialize if some peers on the list are down. A TimeoutExcecption will be thrown if I call channel.sendTransaction(successResponese).get(10, TimeUnit.SECONDS) when some peers on the list are down (after the channel is initialized). The transaction is completely committed to a ledger but the exception is thrown. Could you help to analyze this together with the channel initialization problem?

jichangwei (Thu, 08 Mar 2018 10:36:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vu38L25STZY29YcN9) @rickr hi i use fabric RC1 and get another error like this ``` Peer peer1.org1.example.com joined channel foo org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.EventHubException: EventHub peer0.org1.example.com failed to connect in 1000 ms. ``` and how to change this env config

SyneBlockChainTeam (Thu, 08 Mar 2018 11:26:54 GMT):
Hi, which will be the right approach to separate out configuration logic(setup organization and channel) and business logic(transaction calls to chaincode) as two different services?

rickr (Thu, 08 Mar 2018 12:39:53 GMT):
@jichangwei export ORG_HYPERLEDGER_FABRIC_SDK_EVENTHUB_CONNECTION_WAIT_TIME=10000 try upping this. Set that prior to starting the SDK. Work is being done on addressing the channel initialize when peers are not connecting.

aatkddny (Thu, 08 Mar 2018 13:25:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vu38L25STZY29YcN9) @rickr The couchdb images appear to have breaking changes. It's not the SDK - I can't even get a clean install of them to come up, which means (in my case) no peers.

huy.tranibm (Fri, 09 Mar 2018 02:22:45 GMT):
Does anyone know where the DefaultCryptoSuite stores the certs?

huy.tranibm (Fri, 09 Mar 2018 02:23:28 GMT):
refering to 1.1.0alpha

fanjianhang (Fri, 09 Mar 2018 02:25:44 GMT):
I ran the End2endIT test, but still got errors``` main ERROR OrdererClient:185 - sendTransaction error Channel foo, send transaction failed on orderer orderer.example.com. Reason: Channel foo orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during order registration org.hyperledger.fabric.sdk.exception.TransactionException: Channel foo, send transaction failed on orderer orderer.example.com. Reason: Channel foo orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during order registration ```

dave.enyeart (Fri, 09 Mar 2018 03:45:49 GMT):
@rickr I noticed there is no `release` branch in fabric-sdk-java. I expect this will be needed if any bugs come in for fabric-sdk-java 1.0.x , so that we can provide fixes on top of the last 1.0 commit. This is what we do for all the other project. Do you agree?

dave.enyeart (Fri, 09 Mar 2018 03:45:49 GMT):
@rickr I noticed there is no `release` branch in fabric-sdk-java. I expect this will be needed if any bugs come in for fabric-sdk-java 1.0.x , so that we can provide fixes on top of the last 1.0 commit. This is what we do for all the other project. Do you agree? Or is there some other maintenance mechanism for fabric-sdk-java?

dave.enyeart (Fri, 09 Mar 2018 03:47:19 GMT):
Actually, the reason this is coming up now, is that for the other projects we are moving to naming scheme like `release-1.0` and `release-1.1` for the maintenance branches. Can we do the same for fabric-sdk-java?

dave.enyeart (Fri, 09 Mar 2018 03:47:52 GMT):
@rameshthoomu is also interested in your answer, as this will dictate what we do for e2e CI in each of the release branches.

absingh0 (Fri, 09 Mar 2018 09:33:31 GMT):
Hi all, anyone knows how to get the commit time of the transaction after sending transaction to the orderer? TransactionEvent return by channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS) is actual commit transaction event or just event of transaction being successfully submitted at orderer?

rickr (Fri, 09 Mar 2018 13:25:23 GMT):
@dave.enyeart Don't see a need for `release` When we do decide to do maintenance for a release I can see a `release-1.0` and a `release-1.1` maintenance branch stream created from the tags we have for them on the development master stream. Not sure why those are needed at this time.

rickr (Fri, 09 Mar 2018 13:25:23 GMT):
@dave.enyeart Don't see a need for `release` When we do decide to do maintenance for a release I can see a `release-1.0` and a `release-1.1` maintenance branch stream created from the tags we have for them on the development master stream. Not sure why those are needed at this time. _For once it's me that's being optimistic ? :fingers_crossed_tone2:

rickr (Fri, 09 Mar 2018 13:25:23 GMT):
@dave.enyeart Don't see a need for `release` When we do decide to do maintenance for a release I can see a `release-1.0` and a `release-1.1` maintenance branch stream created from the tags we have for them on the development master stream. Not sure why those are needed at this time. _For once it's me that's being optimistic ? :fingers_crossed_tone2:

rickr (Fri, 09 Mar 2018 13:25:23 GMT):
@dave.enyeart Don't see a need for `release` When we do decide to do maintenance for a release I can see a `release-1.0` and a `release-1.1` maintenance branch stream created from the tags we have for them on the development master stream. Not sure why those are needed at this time. _For once it's me that's being optimistic ? _ :fingers_crossed_tone2:

dave.enyeart (Fri, 09 Mar 2018 13:30:28 GMT):
@rickr I see two reasons why the release branches are needed: 1) If you need to check-in a fix for 1.0.x or 1.1.x, it will need to be checked in on top of the last 1.0.x or 1.1.x commit. 2) CI for fabric release-1.0 does e2e tests using the SDKs. For this CI, it should utilize SDKs at the same release-1.0 level.

bfuentes@fr.ibm.com (Fri, 09 Mar 2018 14:34:12 GMT):
@rickr for the "/src" folder, it seems done for go compilation with vendoring . using govendor command, it searches for a src folder on GOPATH :s

rickr (Fri, 09 Mar 2018 14:38:59 GMT):
@dave.enyeart Created release-1.0 branch if it helps out CI. release-1.1 is _still in the oven_

dave.enyeart (Fri, 09 Mar 2018 14:42:13 GMT):
@rickr agreed thanks!

rickr (Fri, 09 Mar 2018 14:42:43 GMT):
@bfuentes@fr.ibm.com Not sure I follow. Is that a statement, issue or a question ?

rickr (Fri, 09 Mar 2018 14:50:40 GMT):
@dave.enyeart @rameshthoomu As an aside. There is something fundamentally wrong with git pulling *RELEASED* SDKs from gerrit to do Fabric CI. Both Node and Java publish snapshots/releases to npm and maven repos. Ideally those are what we should be testing against.

rickr (Fri, 09 Mar 2018 14:50:40 GMT):
@dave.enyeart @rameshthoomu As an aside. There is something fundamentally wrong with git pulling *RELEASED* SDKs from gerrit to do Fabric CI. Both Node and Java publish snapshots/releases to npm and maven repos. Ideally those are what we should be testing Fabric against.

bfuentes@fr.ibm.com (Fri, 09 Mar 2018 15:06:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QLQGCPgNqu9vKhNqw) @rickr just statement

rickr (Fri, 09 Mar 2018 15:20:12 GMT):
https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/fixture/sdkintegration/gocc/sample_11/src/github.com/example_cc Has vendored .. just to make sure it works.

schwinnez (Sat, 10 Mar 2018 12:44:51 GMT):
Hi again, I just want to go into this eventing thing again, which assumes all peers to be available on channel#instantiate time. In my application, I am maintaining many channels, say around 50, which 50 external organisation. If I only have one endorsing peer per external organisation and I restart my application (for whatever reason), I would need all 50 external peers to be available. Of course, this is very hard to guarantee and the operations of my application would not be an easy task. Since the peers are external to my application, I even have no influence on them. So the only workaround I can see now, is to change my endorsement policy (currently states one of my peers AND one of the other orgs peer) to an OR-policy and just ignore external peers. But this can't be in the sense of hyperledge right? The AND policy is much more what fits my use case and OR esentially means that I am not using endorsement feature at all. How do you think about this?

schwinnez (Sat, 10 Mar 2018 12:44:51 GMT):
Hi again, I just want to go into this eventing thing again, which assumes all peers to be available on channel#initialize time. In my application, I am maintaining many channels, say around 50, with 50 external organisations. If I only have one endorsing peer per external organisation and I restart my application (for whatever reason), I would need all 50 external peers to be available. Of course, this is very hard to guarantee and the operations of my application would not be an easy task. Since the peers are external to my application, I even have no influence on them. So the only workaround I can see now, is to change my endorsement policy (currently states one of my peers AND one of the other orgs peer) to an OR-policy and just ignore external peers. But this can't be in the sense of hyperledge right? The AND policy is much more what fits my use case and OR esentially means that I am not using endorsement feature at all. How do you think about this?

huy.tranibm (Sat, 10 Mar 2018 20:39:39 GMT):
If the members are trusted and guarantees no fraudulent transactions then u should be ok

ohori (Sun, 11 Mar 2018 12:16:26 GMT):
Has joined the channel.

schwinnez (Sun, 11 Mar 2018 13:00:22 GMT):
It might be okay, but it is not in the sense of hyperledger. I mean then I don't need endorsement policies at all, right? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sXo3S8dDFwFS7CX2W) @huy.tranibm

cunsheng (Mon, 12 Mar 2018 07:44:42 GMT):
Has joined the channel.

kiattchaip (Mon, 12 Mar 2018 09:13:00 GMT):
Is it safe to cache a channel instance and use it across multiple threads?

atishaya11 (Mon, 12 Mar 2018 09:32:33 GMT):
Has joined the channel.

absingh0 (Mon, 12 Mar 2018 11:35:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Hz76npAFgAdiaHAcE) @rickr Can you please comment on this?

rickr (Mon, 12 Mar 2018 12:01:40 GMT):
Of the bat I don't know of any commit time. Each committing peer writes to it's own ledger so when it's written could be different

rickr (Mon, 12 Mar 2018 12:04:37 GMT):
@kiattchaip Methods that explicitly supply the user context should work fine on different threads. If there is no need to change the user context on the client all methods should also work too.

MuditVerma (Mon, 12 Mar 2018 12:07:06 GMT):
Has joined the channel.

MuditVerma (Mon, 12 Mar 2018 12:10:27 GMT):
@rickr what does channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS) returns? Our usecase: We want to submit multiple transactions from clients to load test our system. Issue is if we use "channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS)" it only returns after the block is generated (only includes 1 transaction in block). If we only use channel.sendTransaction(successful) and continue sending more transactions in a loop, we get BAD_REQUEST from the order. What we are doing: setup: 4 peer, 4 org, 1 orderer with kafka, each org on peer! Client side: 4 threads, each thread pushes 50 transactions and each thread pushes transactions on a different org.

MuditVerma (Mon, 12 Mar 2018 12:10:27 GMT):
@rickr when does channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS) returns? Our usecase: We want to submit multiple transactions from clients to load test our system. Issue is if we use "channel.sendTransaction(successful).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS)" it only returns after the block is generated (only includes 1 transaction in block). If we only use channel.sendTransaction(successful) and continue sending more transactions in a loop, we get BAD_REQUEST from the order. What we are doing: setup: 4 peer, 4 org, 1 orderer with kafka, each org on peer! Client side: 4 threads, each thread pushes 50 transactions and each thread pushes transactions on a different org.

rickr (Mon, 12 Mar 2018 12:17:12 GMT):
Sending many `sendTransaction` _should_ work. You'd need to take that first to the #fabric-orderer channel with logs and details to help out why it's not working.

rickr (Mon, 12 Mar 2018 12:17:12 GMT):
Sending many `sendTransaction` _should_ work. You'd need to take that first to the #fabric-orderer channel with Orderer logs and details to help out why it's not working.

rickr (Mon, 12 Mar 2018 12:17:12 GMT):
Sending many `sendTransaction` even in parallel at the same time_should_ work. You'd need to take that first to the #fabric-orderer channel with Orderer logs and details to help out why it's not working.

rickr (Mon, 12 Mar 2018 12:17:12 GMT):
Sending many `sendTransaction` even in parallel at the same time _should_ work. You'd need to take that first to the #fabric-orderer channel with Orderer logs and details to help out why it's not working.

rickr (Mon, 12 Mar 2018 12:34:51 GMT):
@schwinnez I thought I mentioned that's being _reworked_. The plan is to have it initialize without peers being available. The eventing services already once started would continue to try and reconnect. That said, when you send a transaction to Orderer and you want to know when it completed if the eventing services is not available the future if you specified a timeout will .. timeout. At that point your application will either accept that or go into some recovery mode that does queries (queryBlockByTransactionID) to all the peers that are important to find what the true state of whether that transaction got successfully committed. Take note that eventhubs and peer eventing service are actually on the peer it'self too, so there's a fair chance those will fail too.

rickr (Mon, 12 Mar 2018 12:34:51 GMT):
@schwinnez I thought I mentioned that's being _reworked_. The plan is to have it initialize without peers being available. The eventing services already once started would continue to try and reconnect. That said, when you send a transaction to Orderer and you want to know when it completed if the eventing services is not available the future if you specified a timeout will .. timeout. At that point your application will either accept that or go into some recovery mode that does queries (queryBlockByTransactionID) to all the peers that are important to find what the true state of whether that transaction got successfully committed. Take note that eventhubs and peer eventing service are actually on the peer it'self, so there's a fair chance those will fail too.

schwinnez (Mon, 12 Mar 2018 17:11:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=AyJgKPopougZXqJaq) @rickr Okay, sorry I thought you mean, that you are reworking only that it works when they loose their connection but that connection still needs to be available at #initialize time. So this sounds good to me =). Will it come with the 1.1 release or do you plan to include the change later? Regarding your remark: Wouldn't it be okay to be "optmistic" about the commitment? I mean, If everything is fine with that transaction and I got the endorsement, eventually it should be commited by every committing peer? Of course, if I do a transaction that changes uncommitted keys, I could have inconsistend RW-Sets. What to you think is the best practise to handle this in the application? Optimistic (is eventing then necessary?) or handlig explicitly?

ScottB 6 (Mon, 12 Mar 2018 18:44:46 GMT):
Has joined the channel.

kiattchaip (Tue, 13 Mar 2018 02:59:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MW32HaiFGiXgwyxX2) @rickr I got it. Thanks.

darapich92 (Tue, 13 Mar 2018 03:21:59 GMT):
Has joined the channel.

darapich92 (Tue, 13 Mar 2018 03:27:08 GMT):
hi everybody, i am new in fabric java sdk. i meet a warnning when i first build, can anybody help me? thank you very much.

darapich92 (Tue, 13 Mar 2018 03:27:26 GMT):

Screenshot from 2018-03-13 12-26-09.png

kiattchaip (Tue, 13 Mar 2018 03:34:43 GMT):
I am not sure about how to build the SDK from the source but I think you need not to build it by yourself. You can download the 1.1.0-alpha or other release version from maven central repository. https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java

kiattchaip (Tue, 13 Mar 2018 03:34:43 GMT):
I am not sure how to build the SDK from the source but I think you need not to build it by yourself. You can download the 1.1.0-alpha or other release version from maven central repository. https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java

kiattchaip (Tue, 13 Mar 2018 03:34:43 GMT):
I am not sure how to build the SDK from the source but I think you need not to build it by yourself. You can download the 1.1.0-alpha or other release versions from maven central repository. https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java

kiattchaip (Tue, 13 Mar 2018 03:34:43 GMT):
I am not sure how to build the SDK from the source but I think you don't need to build it by yourself. You can download the 1.1.0-alpha or other release versions from maven central repository. https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java

darapich92 (Tue, 13 Mar 2018 04:51:24 GMT):
@kiattchaip actually, i don't build by myself. i just pull fabric java sdk from github and i run in eclipse. then i got that failure.

kiattchaip (Tue, 13 Mar 2018 05:40:48 GMT):
@darapich92 If you want to use the SDK, you don't need to run it in your eclipse. Just create a new maven project and add the SDK dependency. The src/test/java/org/hyperledger/fabric/integration/End2endIT.java in the source that you clone from the github can be use as an example of how to you the SDK. I tried to import the SDK source like you but I got many errors. Some configuration may be required to setup the SDK project.

kiattchaip (Tue, 13 Mar 2018 05:40:48 GMT):
@darapich92 If you want to use the SDK, you don't need to run it in your eclipse. Just create a new maven project and add the SDK dependency. The src/test/java/org/hyperledger/fabric/integration/End2endIT.java in the source that you clone from the github can be use as an example of how to use the SDK. I tried to import the SDK source like you but I got many errors. Some configuration may be required to setup the SDK project.

kiattchaip (Tue, 13 Mar 2018 05:40:48 GMT):
@darapich92 If you want to use the SDK, you don't need to run it in your eclipse. Just create a new maven project and add the SDK dependency. The src/test/java/org/hyperledger/fabric/integration/End2endIT.java in the source that you clone from the github is a good example of how to use the SDK. I tried to import the SDK source like you but I got many errors. Some configuration may be required to setup the SDK project.

darapich92 (Tue, 13 Mar 2018 06:38:18 GMT):
@kiattchaip thanks for your advise. since i am new in fabric sdk java, do you any source to start configuration fabric sdk java? i have no idea how to start.

kiattchaip (Tue, 13 Mar 2018 06:40:42 GMT):
@darapich92 Did you try building a fabric network?

darapich92 (Tue, 13 Mar 2018 06:42:58 GMT):
@kiattchaip i try with their sample and it worked. now i try with java sdk and i'm willing to build a fabric network with java. i am stuck in building with Java.

SyneBlockChainTeam (Tue, 13 Mar 2018 06:47:45 GMT):
Hi, I want to add new organization to existing fabric network. How can I do it?

kiattchaip (Tue, 13 Mar 2018 06:48:10 GMT):
@darapich92 I think you misunderstand about the SDK. It is not for building a network. You have to build a fabric network first. The SDK is just a tool that helps you to interact with the fabric network such as install a chaincode, send a transaction and query data. It acts like the cli in the Building Your First Network tutorial.

kiattchaip (Tue, 13 Mar 2018 06:53:30 GMT):
@SyneBlockChainTeam http://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html can help you to do that.

darapich92 (Tue, 13 Mar 2018 07:00:04 GMT):
@kiattchaip thank you very much, you help to me to answer what i don't know.

kiattchaip (Tue, 13 Mar 2018 07:04:46 GMT):
@darapich92 You're welcome.

SyneBlockChainTeam (Tue, 13 Mar 2018 07:12:41 GMT):
@kiattchaip thanks..

kiattchaip (Tue, 13 Mar 2018 07:14:42 GMT):
@SyneBlockChainTeam No problem.

ijaxon (Tue, 13 Mar 2018 09:20:32 GMT):
Has joined the channel.

ijaxon (Tue, 13 Mar 2018 09:22:44 GMT):
Hi all, does anyone know an example where network is built from scratch and then using java sdk ? Thanks a lot.

mne (Tue, 13 Mar 2018 10:00:25 GMT):
Has joined the channel.

mne (Tue, 13 Mar 2018 10:01:38 GMT):
@ijaxon have a look at the integration test (End2EndIT.java), the docker-compse for the corresponding network is in `/src/test/fixture/sdkintegration`

mne (Tue, 13 Mar 2018 10:01:38 GMT):
@ijaxon have a look at the integration test (End2EndIT.java), the docker-compose.yaml for the corresponding network is in `/src/test/fixture/sdkintegration`

jspark84 (Tue, 13 Mar 2018 13:21:57 GMT):
Has joined the channel.

dharuq (Tue, 13 Mar 2018 13:24:19 GMT):
Hi! Anyone knows how to run the End2endIT with tls enabled in the .env file? the readme says that should exist a tls folder with certificates, but in the current version that folder doesn't exist. I am running with IMAGE_TAG_FABRIC=:x86_64-1.1.0-rc1 IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0-rc1. I have this error in the test: https://ctrlv.it/id/104734/3077020197 , and this message in the network log: ca_peerOrg1 | 2018/03/13 13:03:16 http: TLS handshake error from 172.19.0.1:36720: tls: oversized record received with length 21536

kmadala (Tue, 13 Mar 2018 14:30:13 GMT):
Hi, Anyone know, how to validate endorsement proposal response in client side? i.e It has come from expected peer or some other peer? This is related to security check testing

dharuq (Tue, 13 Mar 2018 15:54:50 GMT):
e1

aatkddny (Tue, 13 Mar 2018 18:54:04 GMT):
so i'm concerned i did something wrong creating channels through the SDK. I have multiple orgs. I use the peer admin from one of them to do the client.newchannel with the configuration and the sigs from all of them. I then go through all of the peers for all of the orgs and do a joinPeer (using the peer Admin for that org). I then do a channel initialize. It works most of the time. But then sometimes it fails with a proposal exception in getConfigBlock in the initialize.

aatkddny (Tue, 13 Mar 2018 18:54:04 GMT):
So i'm concerned i did something wrong creating channels through the SDK. I have multiple orgs. I use the peer admin from one of them to do the client.newchannel with the configuration and the sigs from all of them. I then go through all of the peers for all of the orgs and do a joinPeer (using the peer Admin for that org). I then do a channel initialize. It works most of the time. But then sometimes it fails with a proposal exception in getConfigBlock in the initialize. It has the wrong MSP. I'm wondering if joining all the channels like this is a mistake - the randomPeer in the initialize is the only thing I can come up with as to why this isn't working. If that IS my problem, how am I supposed to create a multi-org channel?

aatkddny (Tue, 13 Mar 2018 18:54:04 GMT):
So i'm concerned i did something wrong creating channels through the SDK. I have multiple orgs. I use the peer admin from one of them to do the client.newchannel with the configuration and the sigs from all of them. I then go through all of the peers for all of the orgs and do a joinPeer (using the peer Admin for that org). I then do a channel initialize using the same peer admin as I used for the newChannel. It works most of the time, but then it sometimes fails randomly with a proposal exception in getConfigBlock in the initialize. Error is that it has the wrong MSP. I'm wondering if joining all the channels like this is a mistake - the randomPeer in the initialize is the only thing I can come up with as to why this isn't working. If that IS my problem, how am I supposed to create a multi-org channel?

aatkddny (Tue, 13 Mar 2018 18:54:04 GMT):
So i'm concerned i did something wrong creating channels through the SDK. I have multiple orgs. I use the peer admin from one of them to do the client.newchannel with the configuration and the sigs from all of the orgs - I build an array of getChannelConfigurationSignature signatures for each of the org peer admins. I then go through all of the peers for all of the orgs and do a joinPeer (using the peer Admin for that org). I then do a channel initialize using the same peer admin as I used for the newChannel. It works most of the time, but then it sometimes fails randomly with a proposal exception in getConfigBlock in the initialize. Error is that it has the wrong MSP. I'm wondering if joining all the channels like this is a mistake - the randomPeer in the initialize is the only thing I can come up with as to why this isn't working. If that IS my problem, how am I supposed to create a multi-org channel?

aatkddny (Tue, 13 Mar 2018 18:54:04 GMT):
So i'm concerned i did something wrong creating channels through the SDK. Using SDK 1.1.0-alpha and Fabric 1.1.0-rc1 I have multiple orgs in a consortium and want to create a channel to join three of them. I use the peer admin from one to do the client.newchannel with the channel configuration block and the sigs from all of the orgs - I build an array of getChannelConfigurationSignature signatures for each of the three org peer admins. I then go through all of the defined peers for all of the orgs and do a joinPeer (swapping in the peer admin for that org into the HFClient) for each. I then put back the original peer admin into the HFClient and do a channel initialize. It works most of the time, but then it sometimes fails randomly with a proposal exception in getConfigBlock in the initialize. Error is that it has the wrong MSP - it has the original one when it wanted the one for the peer that proposal is going to. I'm wondering if joining all the channels like this is a mistake - the randomPeer in the initialize is the only thing I can come up with as to why this isn't working. Unless joinPeer is asynchronous and expects the HFClient to always have the admin for the same peer in it. Ok, I'm grasping at straws, but if doing it this way IS my problem, how am I supposed to create a multi-org channel? If not, any hints as to what I could have messed up.

ManjeetGambhir (Tue, 13 Mar 2018 19:50:06 GMT):
@rickr I am trying to get submitting party certificate from transaction in event , can you please suggest how to get it ?

darapich92 (Wed, 14 Mar 2018 00:50:11 GMT):
hi everybody, do you know how to get start implement using fabric java sdk or tutorial? thank you very much.

kiattchaip (Wed, 14 Mar 2018 03:26:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cwpi7r3h7Y93esova) @aatkddny I found this issue either. It was fixed but not released yet. Instead, you can use the snapshot version that includes the fix for this issue.

kiattchaip (Wed, 14 Mar 2018 03:26:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cwpi7r3h7Y93esova) @aatkddny I found this issue either. It was fixed but not released yet. Instead, you can use the snapshot version that includes the fix for this.

kiattchaip (Wed, 14 Mar 2018 03:26:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cwpi7r3h7Y93esova) @aatkddny I found this issue either. It was fixed but not released yet. Instead, you can use the SDK snapshot version that includes the fix for this.

kiattchaip (Wed, 14 Mar 2018 03:26:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cwpi7r3h7Y93esova) @aatkddny I found this issue either. It was fixed but not released yet. Instead, you can use SDK snapshot version that includes the fix for this.

WHATISOOP (Wed, 14 Mar 2018 08:06:49 GMT):
Hi all, when i use java-sdk to invoke the method 'queryTransactionByID(txId)' , it got the error "Entry not found in index".

NiallC (Wed, 14 Mar 2018 10:09:10 GMT):
Has joined the channel.

aatkddny (Wed, 14 Mar 2018 11:53:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H5rM3rM4xjpoJeKNX) @kiattchaip So actually I revisited it after posting this and thought it through. It seems the first time you create a channel that if you only do the joinPeer calls for each org that's sufficient. There's no need to do the initialize in this case. Of course the next time through creating the channel instance you need to do addPeer(s) and initialize. I'm using SDK 1.1.0-alpha against Fabric 1.1.0-rc1. I'll

aatkddny (Wed, 14 Mar 2018 11:53:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H5rM3rM4xjpoJeKNX) @kiattchaip So actually I revisited it after posting this and thought it through. It seems the first time you create a channel that if you only do the joinPeer calls for each org that's sufficient. There's no need to do the initialize in this case. Of course the next time through creating the channel instance you need to do addPeer(s) and initialize. I'm using SDK 1.1.0-alpha against Fabric 1.1.0-rc1. I'm hoping this behaviour hasn't changed.

aatkddny (Wed, 14 Mar 2018 11:53:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H5rM3rM4xjpoJeKNX) @kiattchaip So actually I revisited it after posting this and thought it through. It seems the first time you create a channel that if you only do the joinPeer calls for each org that's sufficient. There's no need to do the initialize in this case. Of course the next time through creating the channel instance you need to do addPeer(s) and initialize. The constructChannel code in the End2EndIT sample was throwing me off. I'll enumerate the solution I found for anyone else facing this situation, as it was an unpleasant time sink. The code sample works for a single org because it does the newChannel with the CCB, followed by the peer joinPeer calls and then the initialize in one go. If you want to do joins for multiple orgs you must do the newChannel with the CCB for followed by the peer joinPeer calls for all the orgs. You then build a channel for your org using newChannel(name) and addPeer followed by initialize. You can't do newChannel with the CCB more than once - you get into the "modify a channel to add orgs" stuff that came in with the last go-around of fabric changes. Caveat: I didn't write any of the underlying SDK. This is observed behaviour. I'm using SDK 1.1.0-alpha against Fabric 1.1.0-rc1. I'm hoping this behaviour hasn't changed.

aatkddny (Wed, 14 Mar 2018 11:53:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H5rM3rM4xjpoJeKNX) @kiattchaip So actually I revisited it after posting this and thought it through. It seems the first time you create a channel that if you only do the joinPeer calls for each org that's sufficient. There's no need to do the initialize in this case. Of course the next time through creating the channel instance you need to do addPeer(s) and initialize. The constructChannel code in the End2EndIT sample was throwing me off. I'll enumerate the solution I found for anyone else facing this situation, as it was an unpleasant time sink. The code sample works for a single org because it does the newChannel with the CCB, followed by the peer joinPeer calls and then the initialize in one go. If you want to do joins for multiple orgs you must do the newChannel with the CCB for one org followed by the peer joinPeer calls for all the orgs. You then build a channel for your org using newChannel(name) and addPeer followed by initialize. You can't do newChannel with the CCB more than once - you get into the "modify a channel to add orgs" stuff that came in with the last go-around of fabric changes. Caveat: I didn't write any of the underlying SDK. This is observed behaviour. I'm using SDK 1.1.0-alpha against Fabric 1.1.0-rc1. I'm hoping this behaviour hasn't changed.

aatkddny (Wed, 14 Mar 2018 12:11:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Apologies that it took me a week to get back to this. I had no power at home and have been stuck looking at a different issue. This all works fine, although I needed to modify my peer create code to account for the different certs. ``` Map x = (Map) updatedresult.get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Consortiums"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get("AllMember-Consortium"); Map x5 = (Map) x4.get("groups"); x5.put(YOURMSP, updateJson); ```` It should be obvious that the structure inside the JSON payload is a tree. The code snippet above may help to simplify the update path for those who don't use jq regularly.

aatkddny (Wed, 14 Mar 2018 12:11:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Apologies that it took me a week to get back to this. I had no power at home and have been stuck looking at a different issue. This all works fine, although I needed to modify my peer create code to account for the different certs. ``` public Map map(String s) throws JsonParseException, JsonMappingException, IOException { MapType type = TypeFactory.defaultInstance().constructMapType(HashMap.class, String.class, Object.class); ObjectMapper mapper = new ObjectMapper(); Map result = mapper.readValue(s, type); return result; } ``` ``` Map x = (Map) map(resultAsString).get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Consortiums"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get("AllMember-Consortium"); Map x5 = (Map) x4.get("groups"); x5.put(YOURMSP, updateJson); ```` It should be obvious that the structure inside the JSON payload is a tree. The code snippets above may help to simplify the update path for those who don't use jq regularly and want to use a pure java solution. (As an aside I used a ProcessBuilder to run the printOrg to create my update JSON).

aatkddny (Wed, 14 Mar 2018 12:11:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Apologies that it took me a week to get back to this. I had no power at home and have been stuck looking at a different issue. This all works fine, although I needed to modify my peer create code to account for the different certs. ``` public Map map(String s) throws JsonParseException, JsonMappingException, IOException { MapType type = TypeFactory.defaultInstance().constructMapType(HashMap.class, String.class, Object.class); ObjectMapper mapper = new ObjectMapper(); Map result = mapper.readValue(s, type); return result; } ``` ``` Map x = (Map) map(resultAsString).get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Consortiums"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get("YOURCONSORTIUM"); Map x5 = (Map) x4.get("groups"); x5.put("YOURMSP", updateJson); ```` It should be obvious that the structure inside the JSON payload is a tree. The code snippets above may help to simplify the update path for those who don't use jq regularly and want to use a pure java solution. (As an aside I used a ProcessBuilder to run the printOrg to create my update JSON).

aatkddny (Wed, 14 Mar 2018 12:11:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CMkh5TPs2bttqZLu9) @rickr Apologies that it took me a week to get back to this. I had no power at home and have been stuck looking at a different issue. This all works fine, although I needed to modify my peer create code to account for the different certs. ``` public Map map(String s) throws JsonParseException, JsonMappingException, IOException { MapType type = TypeFactory.defaultInstance().constructMapType(HashMap.class, String.class, Object.class); ObjectMapper mapper = new ObjectMapper(); Map result = mapper.readValue(s, type); return result; } ``` ``` Map x = (Map) map(resultAsString).get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Consortiums"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get("YOURCONSORTIUM"); Map x5 = (Map) x4.get("groups"); x5.put("YOURMSP", updateJson); ```` It should be obvious that the structure inside the JSON payload is a tree. The code snippets above may help to simplify the update path for those who don't use jq regularly and want to use a pure java solution to add a new org to the consortium. The updateJson string here is the output of the -printOrg for the new org mapped through configtxlator . (As an aside I used a ProcessBuilder to run the printOrg to create my update JSON).

dharuq (Wed, 14 Mar 2018 14:29:38 GMT):

Screen Shot 2018-03-14 at 14.27.41.png

dharuq (Wed, 14 Mar 2018 14:29:38 GMT):

Screen Shot 2018-03-14 at 14.27.41.png

dharuq (Wed, 14 Mar 2018 14:29:38 GMT):

Screen Shot 2018-03-14 at 14.27.41.png

dharuq (Wed, 14 Mar 2018 14:29:38 GMT):

Screen Shot 2018-03-14 at 14.27.41.png

dharuq (Wed, 14 Mar 2018 14:57:28 GMT):

End2endIT output

dharuq (Wed, 14 Mar 2018 14:57:28 GMT):

End2endIT output

huy.tranibm (Wed, 14 Mar 2018 17:00:56 GMT):
Hello guys, trying to register user, any idea what this error mean? ```POST /api/v1/register 401 30 "Certificate not found with AKI '```

huy.tranibm (Wed, 14 Mar 2018 17:05:30 GMT):
@dharuq are you sure your fabric-ca is up and running? do docker ps -a and make sure both ca is running

zzylmt (Fri, 16 Mar 2018 03:35:49 GMT):
while i test the End2endIT,i got the error below,it's means i lost something?what should i do

zzylmt (Fri, 16 Mar 2018 03:35:59 GMT):

1.png

zzylmt (Fri, 16 Mar 2018 03:36:02 GMT):

2.png

zzylmt (Fri, 16 Mar 2018 03:36:03 GMT):

3.png

yopep (Fri, 16 Mar 2018 04:01:39 GMT):
Has joined the channel.

amolpednekar (Fri, 16 Mar 2018 10:27:47 GMT):
Has joined the channel.

rickr (Fri, 16 Mar 2018 11:25:57 GMT):
don't see any fabric ca running

Mihai.A (Fri, 16 Mar 2018 14:55:27 GMT):
Has joined the channel.

VinayChaudhary (Sat, 17 Mar 2018 15:48:58 GMT):
Has joined the channel.

ChrisZhang (Sun, 18 Mar 2018 08:36:36 GMT):
Has joined the channel.

amolpednekar (Mon, 19 Mar 2018 03:44:49 GMT):
Does the java SDK (1.0.0 and onwards) use any Java 9 features?

amolpednekar (Mon, 19 Mar 2018 05:40:12 GMT):
^ * or any of its dependencies

Hundredwz (Mon, 19 Mar 2018 07:28:12 GMT):
@zzylmt according to the screenshots,you failed to connect to 192.168.245.128.i dont know if you run all the servers on one machine or multi-machine.If multi-machine,I guess you could check the firewall or whether you could connect to that machine with 192.168.245.128 ip.

zhaoyulong (Mon, 19 Mar 2018 08:29:12 GMT):
Has joined the channel.

dushyantbehl (Mon, 19 Mar 2018 08:32:54 GMT):
Hi, Is the fabric-sdk-java v1.0.0-alpha compatible with fabric v1.1.0?

kelvinzhong (Mon, 19 Mar 2018 10:40:21 GMT):
@rickr hi, when i cloned the fabric-sdk-java into idea, there are plenty of errors, because idea default have not protobuf plugin support. I think it might be better to have a simple tutorial about protobuf config in READ ME for the people who new to the project.

SyneBlockChainTeam (Mon, 19 Mar 2018 11:18:43 GMT):
Hi everyone, I was going through "Adding an Org to a Channel" tutorial and created a network based on fabric-network sample application, but while interacting with this network using Java SDK I am getting an error while user enrollment and channel construction. If anyone has tried with the same, please help me with Java SDK part.

rickr (Mon, 19 Mar 2018 12:55:11 GMT):
@dushyantbehl Yes, but it may not have all the enablement for all the features in latest Fabric v1.1.0. For Fabric v1.1.0 I'd highly recommend if using the SDK get the latest. If using in an application use 1.1.0-SNAPSHOT. These are now _feature complete_ .

rickr (Mon, 19 Mar 2018 12:55:11 GMT):
@dushyantbehl Yes, but it may not have all the enablement for all the features in latest Fabric v1.1.0. For Fabric v1.1.0 I'd highly recommend if using the SDK get the latest. If using in an application use 1.1.0-SNAPSHOT. These are now _feature complete_ . I use in intellij with no need of any protobuf plugin.

rickr (Mon, 19 Mar 2018 12:55:11 GMT):
@dushyantbehl Yes, but it may not have all the enablement for all the features in latest Fabric v1.1.0. For Fabric v1.1.0 I'd highly recommend if using the SDK get the latest. If using in an application use 1.1.0-SNAPSHOT. These are now _feature complete_

rickr (Mon, 19 Mar 2018 12:56:56 GMT):
@kelvinzhong all protobuf are built if you follow the README.md

rickr (Mon, 19 Mar 2018 12:56:56 GMT):
@kelvinzhong all protobuf are built if you follow the README.md . I use in intellij with no need of any protobuf plugin.

dushyantbehl (Mon, 19 Mar 2018 12:59:06 GMT):
@rickr Thanks

rickr (Mon, 19 Mar 2018 13:22:22 GMT):
To run the JSDK integration tests with Fabric V1.1.0 use `IMAGE_TAG_FABRIC=:x86_64-1.1.0 IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0 ./fabric.sh restart` To start and restart Fabric network.

chaitanya (Mon, 19 Mar 2018 14:07:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EsZnAG73zaCKXQrwj) @rickr if I set my pom.xml to point to `1.1.0-SNAPSHOT`, I get an error saying `Failed to read artifact descriptor for org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.1.0-SNAPSHOT`

chaitanya (Mon, 19 Mar 2018 14:07:56 GMT):
Also, as per artifactory , the latest is 1.1.0-alpha: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.hyperledger.fabric-sdk-java%22%20AND%20a%3A%22fabric-sdk-java%22

rickr (Mon, 19 Mar 2018 14:26:55 GMT):
You may need this in your pom.xml : ``` snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true ``` I just wiped my .m2 repo and it built for a sample application with : ``` org.hyperledger.fabric-sdk-java fabric-sdk-java 1.1.0-SNAPSHOT ```

rickr (Mon, 19 Mar 2018 14:26:55 GMT):
You may need this in your pom.xml : ``` snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true ``` I just wiped my .m2 repo and it built for a sample application with : ``` org.hyperledger.fabric-sdk-java fabric-sdk-java 1.1.0-SNAPSHOT ``` No issues seen.

chaitanya (Mon, 19 Mar 2018 14:52:01 GMT):
@rickr thanks, adding that repository fixed it

chaitanya (Mon, 19 Mar 2018 15:02:35 GMT):
@rickr using the 1.1.0-SNAPSHOT shows errors on `channel.setTransactionWaitTime(...)` and `channel.setDeployWaitTime(...)`. Can you point me to someplace where I could read about how to get this functionality, without these APIs?

rickr (Mon, 19 Mar 2018 15:10:28 GMT):
They never worked. The closest equivalent for transaction wait time set a time out on the get of the Future returned by sendTransaction . For setDeployWaitTime see Config.java see PROPOSAL_WAIT_TIME

schwinnez (Mon, 19 Mar 2018 19:33:39 GMT):
I just realized, that in my channel and orderer configuration, there is no information about anchor peers at all. I had a look into the configurations and genesis block and I couldn't find the anchor peer information. I thought, that since i configured it in the config-tx.yaml, that it is contained in the orderer genisis or channel genesis. But the it looks like anchor peers have to be configured separately by configuration updates. Looks like my network is working without the anchor peers. In the End2EndIT, I can not see AnchorPeer Updates as well. What exactly do I need the anchor peers for? A similar question has been asekd here : https://stackoverflow.com/questions/45632859/what-is-anchor-peer-in-fabric . But i still didn't get what i need the anchors for? What am I missing or what problems might happen without any anchor peer information? What SDK method would I have to use to define Anchor Peers? ConfigUpdate for the channel?

rickr (Mon, 19 Mar 2018 20:51:19 GMT):
The SDK itself does not care about whether a peer is an anchor peer or not. The anchor peers are defined in a config block which the genesis blocks is one. The anchor peers are only there for the Fabric side where they are used to discover other peers between organizations. The SDK can change the channel as described by this: https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9PWkWvFBRuJLwLyZk

rickr (Mon, 19 Mar 2018 20:51:19 GMT):
The SDK itself does not care about whether a peer is an anchor peer or not. The anchor peers are defined in a config block which the genesis block is one. The anchor peers are only there for the Fabric side where they are used to discover other peers between organizations. The SDK can change the channel as described by this: https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9PWkWvFBRuJLwLyZk

huy.tranibm (Tue, 20 Mar 2018 01:00:21 GMT):
Hello guys, i am trying to update my channelconfig using ```chan.updateChannelConfiguration(updateChannelConfiguration, clientOrderer.getUpdateChannelConfigurationSignature(updateChannelConfiguration,ordererUser ))`` and am getting an error. My channel is correct but my orderer log is showing ```2018-03-19 22:18:16.313 UTC [policies] Evaluate -> DEBU 659 == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Writers 2018-03-19 22:18:16.313 UTC [orderer/common/broadcast] Handle -> WARN 65a [channel: foo] Rejecting broadcast of config message from 172.23.0.1:55700 because of error: error authorizing update: Update not for correct channel: "foo� � foo Application```

huy.tranibm (Tue, 20 Mar 2018 01:00:33 GMT):
any idea?

huy.tranibm (Tue, 20 Mar 2018 01:02:28 GMT):
here is my envelope

huy.tranibm (Tue, 20 Mar 2018 01:08:04 GMT):
and orderer logs

huy.tranibm (Tue, 20 Mar 2018 01:08:21 GMT):

ordererLogs.txt

huy.tranibm (Tue, 20 Mar 2018 01:09:21 GMT):

foo_payload.txt

yuseven (Tue, 20 Mar 2018 01:34:12 GMT):
Has joined the channel.

kelvinzhong (Tue, 20 Mar 2018 06:08:02 GMT):
@schwinnez the anchor peer is prepare for the gossip protocol, peers need to know all other peers location, anchor peer is only used to exchange the peer info between different MSP

SyneBlockChainTeam (Tue, 20 Mar 2018 07:06:25 GMT):
Hi, I am getting below error while creating new channel.

SyneBlockChainTeam (Tue, 20 Mar 2018 07:06:27 GMT):
org.hyperledger.fabric.sdk.exception.TransactionException: New channel foo error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.(Channel.java:224) ~[fabric-sdk-java-1.0.0.jar:na] at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1121) ~[fabric-sdk-java-1.0.0.jar:na] at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) ~[fabric-sdk-java-1.0.0.jar:na]

rhansharief (Tue, 20 Mar 2018 07:58:33 GMT):
Has joined the channel.

jastisriradheshyam (Tue, 20 Mar 2018 08:01:35 GMT):
Has joined the channel.

amolpednekar (Tue, 20 Mar 2018 10:02:49 GMT):
Was trying to build the java-sdk by cloning it, had to convert proto files to java. however there are some proto files not present such as EndorserGrpc.proto, DevlierGrpc, EventsGrpc, AtomicBroadcastGrpc Where do I get these?

amolpednekar (Tue, 20 Mar 2018 10:38:49 GMT):
@rickr

schwinnez (Tue, 20 Mar 2018 11:49:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4GHxpxTksC2orkdh6) @kelvinzhong @rickr Thanks for the reply. So do I understand it right, that it makes peers explicitly kown to peers of different organizations. So actually this is something that can be unwanted right? There is no disadvantage (except maybe a bit lost of availability or putting more load on the orderers) in using no anchor peer, right?

schwinnez (Tue, 20 Mar 2018 11:49:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4GHxpxTksC2orkdh6) @kelvinzhong Thanks for the reply (also @rickr). So do I understand it right, that it makes peers explicitly kown to peers of different organizations. So actually this is something that can be unwanted right? There is no disadvantage (except maybe a bit lost of availability or putting more load on the orderers) in using no anchor peer, right?

schwinnez (Tue, 20 Mar 2018 11:49:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4GHxpxTksC2orkdh6) @kelvinzhong, @rickr Thanks for the reply.. So do I understand it right, that it makes peers explicitly kown to peers of different organizations. So actually this is something that can be unwanted right? There is no disadvantage (except maybe a bit lost of availability or putting more load on the orderers) in using no anchor peer, right?

rickr (Tue, 20 Mar 2018 11:54:49 GMT):
@amolpednekar All proto class files are generated when doing the build.

rickr (Tue, 20 Mar 2018 11:57:08 GMT):
@SyneBlockChainTeam You need to look at the Orderer logs and maybe take it to the #fabric-orderer channel Also if running the integration test make sure you restart the fabric network.

amolpednekar (Tue, 20 Mar 2018 12:09:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8ZensSmoa4tRuRQrc) @rickr I need to recompile the SDK because I'm making some changes to the SDK code so that I can get it to work with Android, not use it as is.

amolpednekar (Tue, 20 Mar 2018 12:09:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8ZensSmoa4tRuRQrc) @rickr I need to recompile the SDK because I'm making some changes to the SDK code so that I can get it to work with Android, not build it as is.

amolpednekar (Tue, 20 Mar 2018 12:09:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8ZensSmoa4tRuRQrc) @rickr I need to recompile the SDK because I'm making some changes to the SDK code so that I can get it to work with Android, not build it as is. (I got this error even before changing anything though) Steps 1) Cloned fabric-sdk-java version (tag: 1.1.0-alpha) in IntelliJ 2) Downloaded all required dependencies 3) Build -> Build project

mujji89 (Tue, 20 Mar 2018 16:48:27 GMT):
In End2End example I have replaced chaincode example_cc.go code to my custom code, restarted the network and now when I am running it, it is loading old chaincode

mujji89 (Tue, 20 Mar 2018 16:50:19 GMT):
Where exactly I have to specify. I was under impression it loads from sdkintegraion/gocc but it doesn't seem like it

mujji89 (Tue, 20 Mar 2018 16:59:30 GMT):
I am using vagrant, I reloaded it and I can see my updated chaincode in this path "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration/gocc"

mujji89 (Tue, 20 Mar 2018 16:59:30 GMT):
I am using vagrant, I reloaded it and I can see my updated chaincode in this path "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration/gocc" not sure why on peers its the old one

rickr (Tue, 20 Mar 2018 17:19:48 GMT):
Did you restart the fabric .. and delete the docker images for the CC ? try using ./fabric restart

mujji89 (Tue, 20 Mar 2018 17:29:09 GMT):
I have reloaded vagrant which probably means everything including docker gets restarted right?

mujji89 (Tue, 20 Mar 2018 17:30:56 GMT):
or should I do vagrant destroy and delete the machine

rickr (Tue, 20 Mar 2018 17:31:30 GMT):
did you try that commad ?

mujji89 (Tue, 20 Mar 2018 17:35:06 GMT):
where exactly I have to do that?

mujji89 (Tue, 20 Mar 2018 17:35:07 GMT):
cd ../fabric/sdkintegration docker-compose down; rm -rf /var/hyperledger/*; docker-compose up --force-recreate

mujji89 (Tue, 20 Mar 2018 17:35:17 GMT):
these are the command how I am bringing up the network

mujji89 (Tue, 20 Mar 2018 19:28:52 GMT):
Increasing version number or changing file name fixes this

mujji89 (Tue, 20 Mar 2018 19:29:26 GMT):
just wondering is that the right way to update the chaincode everytime?

ShikarSharma (Tue, 20 Mar 2018 22:46:01 GMT):
Has joined the channel.

kelvinzhong (Wed, 21 Mar 2018 02:03:30 GMT):
@schwinnez yes, i do prefer the anchor peer could removed from the design, which it is not helpful for the business, basically is a infrastructure and should not sensed by the normal developer

kelvinzhong (Wed, 21 Mar 2018 02:03:30 GMT):
@schwinnez yes, i do prefer the anchor peer could be removed from the design, which it is not helpful for the business, basically it is a infrastructure and should not sensed by the normal developer

kiattchaip (Wed, 21 Mar 2018 03:08:31 GMT):
@mujji89 Try `docker images` and you will see the images of the old chaincode available on your machine. Remove them first with `docker rmi ` if you want to update the chaincode but don't want to increase the version.

kiattchaip (Wed, 21 Mar 2018 03:08:31 GMT):
@mujji89 Try `docker images` and you will see the images of the old chaincode available on your machine. Remove them first with `docker rmi` if you want to update the chaincode but don't want to increase the version.

krishna108 (Wed, 21 Mar 2018 04:36:33 GMT):
Has joined the channel.

krishna108 (Wed, 21 Mar 2018 04:42:54 GMT):
I am unable to import the 'fabric-sdk-java-master' project .I am getting the error message of "Invalid .project file"

krishna108 (Wed, 21 Mar 2018 04:42:59 GMT):
https://github.com/hyperledger/fabric-sdk-java

amolpednekar (Wed, 21 Mar 2018 06:11:57 GMT):
@krishna108 Remove the comments at the top of the file. Do the same for .classpath file. Should work after that.

krishna108 (Wed, 21 Mar 2018 06:20:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3BuT8Kt2TMixHf8XC) @amolpednekar Ok,thank you.It worked

gopal_07 (Wed, 21 Mar 2018 06:25:59 GMT):
Has joined the channel.

gopal_07 (Wed, 21 Mar 2018 06:33:58 GMT):
Unable to import .proto files in fabric-sdk-java-master project

rhansharief (Wed, 21 Mar 2018 07:32:44 GMT):
hi just wanna ask what does this mean?

rhansharief (Wed, 21 Mar 2018 07:32:44 GMT):
git reset --hard fabric-ca_commitlevel from above

jbanares (Wed, 21 Mar 2018 09:52:49 GMT):
Has joined the channel.

kelvinzhong (Wed, 21 Mar 2018 10:52:43 GMT):
@rickr hi, the Admin user need attributes "hf.Registrar.Roles=user" so can register a new user, I saw there could set the new user's attribute during register, but I couldn't find where to query what attribute a user have. Is the attribute info only kept by CA and unknown to others?

huy.tranibm (Wed, 21 Mar 2018 12:32:41 GMT):
@kelvinzhong what version sdk are u using?

huy.tranibm (Wed, 21 Mar 2018 12:34:10 GMT):
for 1.1.0alpha, the SampleUser has a Set field that keep tracks of roles and the sampleuser is serialized to storage

SyneBlockChainTeam (Wed, 21 Mar 2018 12:59:33 GMT):
Getting error while fetching the most recent config block for the channel.. Error: failed to create deliver client: orderer client failed to connect to orderer.mortgage.com:7050: failed to create new connection: tls: first record does not look like a TLS handshake

SyneBlockChainTeam (Wed, 21 Mar 2018 12:59:33 GMT):
Getting error while fetching the most recent config block for the channel.. Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: tls: first record does not look like a TLS handshake

aatkddny (Thu, 22 Mar 2018 00:36:41 GMT):
Question about adding an anchor peer using the SDK. Has anyone done it? It looks like a channel update, but when I try to decode the anchor peer block using protolator I get: proto: bad wiretype for field common.Config.Sequence: got wiretype 2, want 0 On a whim I tried to just use the tx bytes as an update channel and see this in the orderer log: Rejecting broadcast of config message from 172.18.0.1:46596 because of error: error authorizing update: Update not for correct channel: I'm obviously missing a step, but wondered if anyone had a sample?

aatkddny (Thu, 22 Mar 2018 01:07:33 GMT):
s

aatkddny (Thu, 22 Mar 2018 01:07:33 GMT):
So to respond to my own question... The anchor peer block decodes with protolator using common.Envelope rather than common.Config. The rest of it is like adding a member to the channel but you need to update the channel config json with something more like this: ``` private Map addAnchorPeer(String msp, Map config, Map configJson) { Map x = (Map) config.get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Application"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get(msp); Map x5 = (Map) x4.get("values"); Map y = (Map) configJson.get("payload"); Map y1 = (Map) y.get("data"); Map y2 = (Map) y1.get("config_update"); Map y3 = (Map) y2.get("write_set"); Map y4 = (Map) y3.get("groups"); Map y5 = (Map) y4.get("Application"); Map y6 = (Map) y5.get("groups"); Map y7 = (Map) y6.get(msp); Map y8 = (Map) y7.get("values"); Map y9 = (Map) y8.get("AnchorPeers"); x5.put("AnchorPeers", y9); return config; ``` If anyone actually has done this then I'd appreciate a second look. This update completes normally and the channel config the second time through appears to reflect the "AnchorPeers" fragment, but I've pretty much hacked it. I'm none too sanguine that it's in the correct place and will work as I would wish it to.

kelvinzhong (Thu, 22 Mar 2018 03:21:35 GMT):
@huy.tranibm roles is different from the attributes I'm talking about

Mqy402590161 (Thu, 22 Mar 2018 03:22:33 GMT):
Has joined the channel.

danfeng (Thu, 22 Mar 2018 03:32:28 GMT):
Has joined the channel.

huy.tranibm (Thu, 22 Mar 2018 04:51:07 GMT):
@kelvinzhong you should be able to add an attribute field to SampleUser and implementing it and use it as a persistence store.

huy.tranibm (Thu, 22 Mar 2018 04:51:07 GMT):
@kelvinzhong you should be able to add an attribute field to SampleUser and manage it through your persistence store.

Vincent Fremaux (Thu, 22 Mar 2018 08:50:23 GMT):
Has joined the channel.

Vincent Fremaux (Thu, 22 Mar 2018 08:51:14 GMT):
Hi, i m using Java SDK but since upgrade to 1.1 (basic-network) i have errors that i m not understanding when i try to query chaincode on channel "mychannel"

Vincent Fremaux (Thu, 22 Mar 2018 08:51:54 GMT):
someone could help me : getConfigBlock for channel mychannel failed with peer peer0.org1.example.com. Status FAILURE, details: Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNIMPLEMENTED, description=unknown service protos.Endorser, cause=null}

darunk67 (Thu, 22 Mar 2018 09:55:53 GMT):
Has joined the channel.

pawanrpawar (Thu, 22 Mar 2018 10:14:51 GMT):
Has joined the channel.

rickr (Thu, 22 Mar 2018 12:04:04 GMT):
Most of the times that's the case when your trying to connect a JSDK 1.1 to a 1.0 Fabric. If that's what's happening look at release notes for 1.1.0

rickr (Thu, 22 Mar 2018 12:07:15 GMT):
@SyneBlockChainTeam Looks pretty much what the error says .. one of your systems is set for TLS and the other is not.

Vincent Fremaux (Thu, 22 Mar 2018 12:09:46 GMT):
ah... ok i check

rickr (Thu, 22 Mar 2018 13:23:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tuWG3mSprCqKRHMex) @kelvinzhong https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fab-7383-implement-the-fabric-ca-identities-and-affiliations-api ?

schwinnez (Thu, 22 Mar 2018 17:43:39 GMT):
Hey, i am currently getting "ALPN is not configured properly" error when using TLS with the application. I am using spring boot with tomcat-embed-core:jar:8.5.4 and grpc-netty:jar:1.9.0. It looks like the combination of This tomcat and grpc-netty are causing the issue. Is anyone using SpringBoot/embedded Tomact as well and knows some versions that are working together?

aatkddny (Thu, 22 Mar 2018 19:12:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TG3o77ouxMmwNQN6y) @schwinnez I went through this. The solution I found that worked for me was ridiculously easy in the end. Spring-boot 1.5.7 and cloud Dalston.SR4 ``` io.netty netty-tcnative 2.0.6.Final provided ```

schwinnez (Thu, 22 Mar 2018 20:07:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tr2LBRTbNXxG7cFus) @aatkddny Unfortunately not working for me. Even running on a windows machine it's not working. Tried also using spring 1.5.7

aatkddny (Thu, 22 Mar 2018 20:30:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TMNuen2YNPuwxN9PZ) @schwinnez I have two projects. The one I enumberated interfaced with the running fabric. The one that creates things has a bootstrap directory with ``` alpn-boot-8.1.11.v20170118.jar netty-tcnative-2.0.6.Final.jar netty-tcnative-boringssl-static-2.0.6.Final.jar ```

aatkddny (Thu, 22 Mar 2018 20:30:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TMNuen2YNPuwxN9PZ) @schwinnez Mea culpa - I have two projects. The one I enumerated interfaces with the running fabric. The one that creates things has a bootstrap directory with the following entries ``` alpn-boot-8.1.11.v20170118.jar netty-tcnative-2.0.6.Final.jar netty-tcnative-boringssl-static-2.0.6.Final.jar ``` I'm pointing the source

schwinnez (Thu, 22 Mar 2018 22:07:22 GMT):
@aatkddny thanks, will try this out tomorrow.

kelvinzhong (Fri, 23 Mar 2018 02:33:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=z2vEWxifwurjHy5QF) @rickr cool!!! so now could register a peer identity!and the enrollmentID is the name using for ca.enroll() right?

kelvinzhong (Fri, 23 Mar 2018 02:57:32 GMT):
@rickr i'm not sure why when i try to run the unit test, i found all grpc relate proto file are missing,like org.hyperledger.fabric.protos.peer.EventsGrpc; is not found

PrashantS (Fri, 23 Mar 2018 03:15:38 GMT):
Has joined the channel.

kelvinzhong (Fri, 23 Mar 2018 09:56:17 GMT):
@rickr I saw that the peer needs to be added to a channel manually in e2eBackAgainIT, but peers should know all other peers in the same channel because of the gossip protocol have done this, is that possible to get all peers in the channel automatically?

rickr (Fri, 23 Mar 2018 12:31:42 GMT):
No not at the moment. Gossip is only on the Fabric side and not exposed on the clients. There is work being done for a client side discovery service.

yacovm (Fri, 23 Mar 2018 17:30:29 GMT):
@kelvinzhong , Rick is right. It is coming in the next version. Stay tuned.

rickr (Fri, 23 Mar 2018 17:51:25 GMT):
@yacovm _Rick is right_ just keep that train of thought :wink:

LLLL123 (Sat, 24 Mar 2018 07:14:44 GMT):
Has joined the channel.

LLLL123 (Sat, 24 Mar 2018 07:20:54 GMT):
Hello everyone,I'd like to use this SDK to connet to a Fabric network what is running in Ubuntu virtual machine , What should I do and How to write the code? THanks a lot:grinning:

schwinnez (Sat, 24 Mar 2018 13:05:52 GMT):
@aatkddny Adding the libraries worked for me on windows =) On alpine linux i still have problems, but looks like this is a problems with the native libraries available there. Another question to all: How to disable hostname checks on Java SDK for testing pruposes. I think usually this is done for netty at channelBuilder. But this is implicitly used by the SDK, so i don't see a way yet to disable this.

huy.tranibm (Mon, 26 Mar 2018 00:18:49 GMT):
@LLLL123 please reference the test end2end examples

LLLL123 (Mon, 26 Mar 2018 01:43:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4mcQfAkcGo8QFFrdk) @huy.tranibm OK!I will try it !:grinning:

martinvaller (Mon, 26 Mar 2018 03:32:00 GMT):
Has joined the channel.

KarmoH (Mon, 26 Mar 2018 06:50:55 GMT):
Has joined the channel.

aatkddny (Mon, 26 Mar 2018 12:34:44 GMT):
Is there an ETA for support of FAB-1151 - I get it'll be after it goes GA in Fabric, but wondered if it was scheduled roughly how long after?

SyneBlockChainTeam (Mon, 26 Mar 2018 14:44:38 GMT):
Hi, I am working on adding an Org to a channel tutorial. The installed chaincode on new org peer is not getting removed even after stopping and removing docker. root@68ad1db150e7:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode list --installed Get installed chaincodes on peer: Name: chaincode_ccr199, Version: 1, Path: github.com/example_cc, Id: e3aa8e5f63bb0e5568ef6b17311feb2542733f420c4859f8b98de14fc7980698 Name: chaincode_ccr199, Version: 2.0, Path: github.com/chaincode/chaincode_example02/go/, Id: 70e1ad71d8aedee21d68433b0b1e30c4169e88c32d743916060c6a5ee1d25bf2 Name: chaincode_ccr211, Version: 2.0, Path: github.com/chaincode, Id: 2fa79a4783aa280d1f87af0c2d9910e21dda8fe8fb7642ced2cb04a6df5c608c Name: chaincode_ccr212, Version: 2.0, Path: github.com/chaincode, Id: 6a85e8cadfdba45dfedb5fb41cd0e664e0a7b6a9f44bea7299de63fc8857400d Name: foo, Version: 2.0, Path: github.com/chaincode/chaincode_example02/go/, Id: 891b685b36de23072cd51ab96636cd384cdb7d330f6c969890eb277b66c4df85 It leads to the error "Error installing chaincode code chaincode_ccr212. already exists.."

aatkddny (Mon, 26 Mar 2018 14:59:39 GMT):
You need to delete the chaincode containers manually. This will do it - substitute {NETWORK} appropriately - `docker images | awk '{ print $1,$3 }' | grep {NETWORK} | awk '{ print $2}' | xargs -I {} docker rmi -f {}`

SyneBlockChainTeam (Mon, 26 Mar 2018 15:16:20 GMT):
Hi @aatkddny, thanks for replaying. I have tried this command with substituting my network name but the chaincode are not get removed.

aatkddny (Mon, 26 Mar 2018 15:28:28 GMT):
odd because it works fine on my system - I have {NETWORK} set to what I substituted in here from compose ```networks: {NETWORK}: ```

aatkddny (Mon, 26 Mar 2018 15:28:28 GMT):
odd because it works fine on my system - I have {NETWORK} set to what I substituted in here from my compose template file ```networks: {NETWORK}: ```

aatkddny (Mon, 26 Mar 2018 15:28:28 GMT):
odd because it works fine on my system - I have {NETWORK} set to what I substituted in here from my compose template file. Are you sure you removed the {} around the substitute? ```networks: {NETWORK}: ```

SyneBlockChainTeam (Mon, 26 Mar 2018 15:42:23 GMT):
Yes, I have removed {} around and substitute my network name but doesn't work. Thanks.

andreamagagna (Mon, 26 Mar 2018 15:49:45 GMT):
Has joined the channel.

waqar92 (Mon, 26 Mar 2018 19:20:36 GMT):
Has joined the channel.

huy.tranibm (Mon, 26 Mar 2018 20:29:28 GMT):
Hello guys i am getting this ```java.lang.NoSuchFieldError: DEFAULT_KEEPALIVE_TIMEOUT_NANOS``` error

huy.tranibm (Mon, 26 Mar 2018 20:30:03 GMT):
```java.lang.NoSuchFieldError: DEFAULT_KEEPALIVE_TIMEOUT_NANOS at io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:81) ~[grpc-netty-1.9.0.jar:1.9.0] at io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:115) ~[grpc-netty-1.9.0.jar:1.9.0] at io.grpc.netty.NettyChannelBuilder.forAddress(NettyChannelBuilder.java:101) ~[grpc-netty-1.9.0.jar:1.9.0] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:178) ~[fabric-sdk-java-1.1.0-alpha.jar:na] at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:194) ~[fabric-sdk-java-1.1.0-alpha.jar:na] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2357) ~[fabric-sdk-java-1.1.0-alpha.jar:na] at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:741) ~[fabric-sdk-java-1.1.0-alpha.jar:na] at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1150) ~[fabric-sdk-java-1.1.0-alpha.jar:na] at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:948) ~[fabric-sdk-java-1.1.0-alpha.jar:na] at ibm.cic.br.bc.utils.ChannelUtil.constructChannel(ChannelUtil.java:94) ~[fabric-connector-1.0-SNAPSHOT.jar:na] ```

huy.tranibm (Mon, 26 Mar 2018 20:30:07 GMT):
any ideas?

yinzhiwu (Tue, 27 Mar 2018 02:51:17 GMT):
Has joined the channel.

danfeng (Tue, 27 Mar 2018 05:21:47 GMT):
There is no fabric- SDK - Java documentation support.

IgorSim (Tue, 27 Mar 2018 07:14:27 GMT):
Hi, i have question about channel initialization. For example if HF network have 2 orgs that have peers and 1 org with orderer(similar to 'fabric-ca' example), each org have 1 peer. Chaincode is installed with AND policy. When adding new peer to channel object, do we need to add peers from both orgs? For ex like: channel.addPeer(peer from org1) channel.addPeer(peer from org2) If we add only one peer then trx will fail during validation with Reason code [ENDORSEMENT_POLICY_FAILURE] because trx.proposal was sent only to one peer.

kiattchaip (Tue, 27 Mar 2018 09:32:19 GMT):
@IgorSim For now, the answer is yes. In 1.2.x version, however, Fabric will have an ability to discover peers and we don't need to do this anymore.

IgorSim (Tue, 27 Mar 2018 10:52:37 GMT):
@kiattchaip thanks

anik (Tue, 27 Mar 2018 11:06:16 GMT):
@rickr how do i change the log level to debug for fabric client if it is added as dependency ? Thanks

donsonZhang (Tue, 27 Mar 2018 12:12:46 GMT):
i get the fabric branch release-1.1, make bulid,found the result is the "VERSION=1.1.1-snapshot-"

donsonZhang (Tue, 27 Mar 2018 12:13:19 GMT):
it should be the VERSION=1.1 ?

akapustin (Tue, 27 Mar 2018 12:20:32 GMT):
Hi. Why was java marked as experimental?

huy.tranibm (Tue, 27 Mar 2018 19:53:11 GMT):
Hello guys, I am getting ```sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target``` at httpPost in the HFCAClient.java. Im pretty sure im passing it the correct tls certs(tried this in file and bytes). Just wondering if anyone faced this issue that can help. This is using fabric 1.1-alpha

vatsal.shah (Tue, 27 Mar 2018 20:24:24 GMT):
Has joined the channel.

ctan (Tue, 27 Mar 2018 23:45:44 GMT):
Has joined the channel.

donsonZhang (Wed, 28 Mar 2018 05:23:25 GMT):
why invoke chaincode : this.channel.sendTransaction(successful).thenApply((transactionEvent) -> {} need 2 seconds ?

donsonZhang (Wed, 28 Mar 2018 05:23:28 GMT):
why invoke chaincode : this.channel.sendTransaction(successful).thenApply((transactionEvent) -> {} need 2 seconds ?

andreamagagna (Wed, 28 Mar 2018 08:56:02 GMT):
Has left the channel.

ghindle (Wed, 28 Mar 2018 09:34:52 GMT):
Has joined the channel.

SyneBlockChainTeam (Wed, 28 Mar 2018 15:23:56 GMT):
Hi, I have added new org to the channel and only able to access data updated before adding that new org. I am updating the state but not getting updated values. If anyone faced this issue that can help..

huy.tranibm (Wed, 28 Mar 2018 19:15:53 GMT):
sorry

master-starcloud (Thu, 29 Mar 2018 07:12:26 GMT):
Has joined the channel.

QwertyJack (Thu, 29 Mar 2018 08:27:25 GMT):
Has joined the channel.

zzylmt (Thu, 29 Mar 2018 08:53:46 GMT):
hello guys,anyone can help me fix the problem?``` ` main ERROR OrdererClient:179 - sendTransaction error Channel foo, send transactions failed on orderer orderer.example.com. Reason: timeout after 10000 ms.` ```

master-starcloud (Thu, 29 Mar 2018 10:53:12 GMT):
@zzylmt have more error information? And told us which step caused the Error

SyneBlockChainTeam (Thu, 29 Mar 2018 12:40:25 GMT):
@huy.tranibm I am adding new org to existing channel, but the old org is not able to change the state. I tried changing the state using old org but it's not reflecting the changes. While the new org is able to change the state. Is it happen because I am installing a new version of chaincode?

jackyLee (Thu, 29 Mar 2018 14:59:10 GMT):
Has joined the channel.

jackyLee (Thu, 29 Mar 2018 14:59:20 GMT):
spring

aatkddny (Thu, 29 Mar 2018 18:15:58 GMT):
has anyone managed to integrate the java sdk with the ibm offering on bluemix with any success?

huy.tranibm (Thu, 29 Mar 2018 19:52:51 GMT):
yes @aatkddny i made connectivity but still a lot of testing oging on

huy.tranibm (Thu, 29 Mar 2018 19:54:39 GMT):
@SyneBlockChainTeam when u say changing state of the channel do u mean changing the channel's config?

huy.tranibm (Thu, 29 Mar 2018 19:56:57 GMT):
Hi Rick, when placing a query and receiving ```Failed query proposal from peer org1-peer1 status: SUCCESS. Messages: OK. Was verified : false``` does this mean that the client's crypto signature isn't matching up with the msp? Not sure why my query is failing here

aatkddny (Thu, 29 Mar 2018 21:19:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZoCZZn7RwrLvMMbGG) Where are you getting the _sk values from?

aatkddny (Thu, 29 Mar 2018 21:19:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZoCZZn7RwrLvMMbGG) Where are you getting the _sk values from? I'm pulling the rest of the stuff I need (or I think I am) from the connection_profile endpoint, but can't find any way to generate a private key from there. I'd get it from my admin keystore if I was generating the crypto myself, but its all provided in this case.

huy.tranibm (Fri, 30 Mar 2018 15:48:15 GMT):
@aatkddny what's your IBM w3 id? i can reach out to you there

huy.tranibm (Fri, 30 Mar 2018 15:50:50 GMT):
@aatkddny you can either generate the admin's sk from SDK with the fabric-ca username:password or you can generate them through CLI. If you go to Get Help>Getting Started>docs>howto>developing applications> then scroll down to command line it shows u how

huy.tranibm (Fri, 30 Mar 2018 15:51:40 GMT):
@aatkddny are you part of IBM?

huy.tranibm (Fri, 30 Mar 2018 15:58:43 GMT):
@rickr When making a query to blockchain and receiving back the ProposalResponse, I am receiving a Status of 200 and also able to see my payload but proposalResponse.isVerified() is returning false. I've debug to where its using crypto.verify() to verify the signatures but I am still lost why crypto.verify() is returning false. Can you tell me what is expected and some reasons why crypto.verify() is returning false? It will help me understand better why is the signature(from the org's admin) isn't matching up. This is happening when im running the same CC with same query code on IBP starter plan but testing locally with the end2end test's fixture network, the verify is able to return true. Thank you rick

aatkddny (Fri, 30 Mar 2018 22:09:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GraW2C6qtJ8ayktQw) @huy.tranibm No, I work elsewhere. My actual problem was that the 1.1 bluemix api is returning the wrong cert path for the CA (which was the piece I was testing), so my pemBytes byte[] proprety to the HFCA client was wrong. After I OpenSSL -showcert'd the server and hard coded in the correct ones it all started working the same as my local copy.

aatkddny (Fri, 30 Mar 2018 22:09:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GraW2C6qtJ8ayktQw) @huy.tranibm No, I work elsewhere. My actual problem was that I"m trying to connect automatically to the the 1.1 bluemix api, but it is returning the wrong cert path for the CA (which was the piece I was testing), so my pemBytes byte[] proprety to the HFCA client was wrong. After I OpenSSL -showcert'd the server and hard coded in the correct ones it all started working the same as my local copy. I was in a rush last night when I posted - and the first stack trace the x509 layer trying to find a non-existent secret. No matter, it's fixed. Just bear this in mind if anyone else is trying to do the same - make sure the certs match.

aatkddny (Fri, 30 Mar 2018 22:09:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GraW2C6qtJ8ayktQw) @huy.tranibm No, I work elsewhere. My actual problem was that I"m trying to connect automatically to the the 1.1 bluemix api, but it is returning the wrong cert path for the CA (which was the piece I was testing), so my pemBytes byte[] proprety to the HFCA client was wrong. After I OpenSSL -showcert'd the server and hard coded in the correct ones it all started working the same as my local copy. I was in a rush last night when I posted - and the first stack trace the x509 layer was trying to find a non-existent secret. No matter, it's fixed. Just bear this in mind if anyone else is trying to do the same - make sure the certs match what the server actually says it has.

fanjianhang (Sun, 01 Apr 2018 14:44:42 GMT):
@rickr Hi, rick, i got this error when i ran the End2endIT test. `Error starting container: API error (400): {"message":"OCI runtime create failed: container_linux.go:348: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"}`

fanjianhang (Sun, 01 Apr 2018 14:47:25 GMT):
I changed default chaincodeSourceLocation path to my chaincode path. I think it would be fine , but i got error. Could you help me?

karthi-gee (Sun, 01 Apr 2018 15:22:32 GMT):
Has joined the channel.

aatkddny (Sun, 01 Apr 2018 16:16:19 GMT):
I've added two jiras recently - FAB-9282 and FAB-9267. It's less work for me to fix them both in the code than it is to code the workaround for the second (have one for 9267). I'm more than willing to do so, unless they are going to be assigned in short order or have been addressed in the next snapshot. How can I make that happen?

souvik (Mon, 02 Apr 2018 09:00:05 GMT):
Has joined the channel.

souvik (Mon, 02 Apr 2018 09:02:50 GMT):
Is java-sdk stable?

SharonDevasia (Mon, 02 Apr 2018 09:28:16 GMT):
Has joined the channel.

rickr (Mon, 02 Apr 2018 13:30:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ue8s2p9QuhWbKniRB) @aatkddny AFAIK all that is required for the SDK for this is support for sending transient data which the End2end integration test show

rickr (Mon, 02 Apr 2018 13:33:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wAa8hfjveE8Q4w6Ld) @SyneBlockChainTeam There is as of today now way to really remove chaincode from a Peer. No API for the SDK to call.

rickr (Mon, 02 Apr 2018 13:33:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wAa8hfjveE8Q4w6Ld) @SyneBlockChainTeam There is as of today no way to really remove chaincode from a Peer. No API for the SDK to call.

rickr (Mon, 02 Apr 2018 13:36:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Yr6wuYM6eMdqCGTL7) @akapustin You are referencing I think Java CC and that's entirely different effort. Please refer to #fabric-java-chaincode channel

albert.lacambra (Mon, 02 Apr 2018 13:40:20 GMT):
Hi @rickr . I am upgrading our applications to fabric 1.1.0 and I wanted to upgrade the java sdk to.

rickr (Mon, 02 Apr 2018 13:40:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eeqtqvi45cW3zvcRw) @donsonZhang What you're probably waiting on is for all the events to be seen by peer event services and event hubs in their blocks. That's not atypical

albert.lacambra (Mon, 02 Apr 2018 13:40:38 GMT):
However I am not seeing any v1.1.0 and only the alpha version is there

albert.lacambra (Mon, 02 Apr 2018 13:41:08 GMT):
is the alpha version stable enough or should I better take from master?

albert.lacambra (Mon, 02 Apr 2018 13:41:42 GMT):
there are issues if keep with version 1.0.1 if we keep working with eventhubs and are not using the peereventing feature?

rickr (Mon, 02 Apr 2018 13:43:26 GMT):
Use 1.1.0-SNAPSHOT

rickr (Mon, 02 Apr 2018 13:43:26 GMT):
Use 1.1.0-SNAPSHOT which is master/latest

albert.lacambra (Mon, 02 Apr 2018 13:44:42 GMT):
ok. thx.

albert.lacambra (Mon, 02 Apr 2018 13:47:35 GMT):
from wich mvn repo should I take it?

rickr (Mon, 02 Apr 2018 13:48:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LxWFJ3dZDAgqK4mSZ) @aatkddny I did a long while back using my own code to read the network config that is provided. But you need to work through IBM channels with any issues you have with bluemix

rickr (Mon, 02 Apr 2018 13:52:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZoCZZn7RwrLvMMbGG) @huy.tranibm When the channel is initialized it gets the root CA certs from the latest config block. The signature from the endorser needs to be in one of CAs. I'm guessing it's not.

aatkddny (Mon, 02 Apr 2018 13:56:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Edobi7C9HLTHsKTrA) @rickr My problem's in the SDK. You'll see when you get closer to current in these messages...

albert.lacambra (Mon, 02 Apr 2018 14:45:31 GMT):
Hi @rickr

albert.lacambra (Mon, 02 Apr 2018 14:45:36 GMT):
I am having again this error

albert.lacambra (Mon, 02 Apr 2018 14:45:37 GMT):
Exception in thread "main" java.lang.RuntimeException: org.hyperledger.fabric.sdk.exception.ProposalException: java.lang.IllegalArgumentException: chaincodePath must be null for Java chaincode

albert.lacambra (Mon, 02 Apr 2018 14:45:45 GMT):
from 1.1.0-SNAPSHOT

rickr (Mon, 02 Apr 2018 14:45:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CCdX4zJLy8i3b3EwP) @fanjianhang Too many variables unknown. Was the actual name the same ?

albert.lacambra (Mon, 02 Apr 2018 14:46:04 GMT):
Until now we have gone ahead of it using our own patch.

albert.lacambra (Mon, 02 Apr 2018 14:46:18 GMT):
Is not yet fixed or is not a bug and we are doing something really wrong

albert.lacambra (Mon, 02 Apr 2018 14:46:30 GMT):
the ChaincodeID builder does not allow null values, so, ....

rickr (Mon, 02 Apr 2018 14:46:52 GMT):
Yes --- Java chaincode is not supported.

rickr (Mon, 02 Apr 2018 14:47:22 GMT):
and when it is it would NOT have a chaincode path

albert.lacambra (Mon, 02 Apr 2018 14:53:38 GMT):
well, it is not that I set it. It autmoatically set an emptyString

albert.lacambra (Mon, 02 Apr 2018 14:53:42 GMT):
""

albert.lacambra (Mon, 02 Apr 2018 14:53:53 GMT):
so there is no way to get rid of that without the patch

albert.lacambra (Mon, 02 Apr 2018 15:00:33 GMT):
I have seen on github several time the patch to be merged. Even it is not "officially" supported, we will be thankful if you just add this small fix check

albert.lacambra (Mon, 02 Apr 2018 15:00:41 GMT):
specifically if (null != this.chaincodePath && !this.chaincodePath.isEmpty()) { throw new IllegalArgumentException("chaincodePath must be null for Java chaincode"); }

albert.lacambra (Mon, 02 Apr 2018 15:00:41 GMT):
specifically if (null != this.chaincodePath ----->&& !this.chaincodePath.isEmpty()<----) { throw new IllegalArgumentException("chaincodePath must be null for Java chaincode"); }

albert.lacambra (Mon, 02 Apr 2018 15:01:17 GMT):
that would solve the issue

albert.lacambra (Mon, 02 Apr 2018 15:01:22 GMT):
:D

albert.lacambra (Mon, 02 Apr 2018 15:31:58 GMT):
What do you think @rickr ? If you are interesting I can even send the patch...

rickr (Mon, 02 Apr 2018 15:40:48 GMT):
I don't think I want it fixed that way.

huy.tranibm (Mon, 02 Apr 2018 15:44:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pzAFCvsY5fXF5fPtF) @rickr the signature in this case of the endorser would be the peer's signature correct? If i am calling the transaction to the peer that belongs to the correct MSP, what can cause the signature to be invalid? I am able to pull the payload from my Local network(verifies true) ```endorser: "\n\aOrg1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRAN+BUbj4gov+odYv6jy9DvEwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIyMTIwODQyWhcNMjcwNjIwMTIwODQy\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLFA9FtcDx7boZZjFDpYKacetc1L7prt\noIA6wqJlyoWFtHDmtnXVzjyukb4w4YKz5Sx2QPG2fp8a5RZKU+3TmUejTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIPz3drAqBWAE\nCNC+nZdSr8WfZJULchyss2O1uVoP6mIWMAoGCCqGSM49BAMCA0cAMEQCIFYW5mIq\nUepXXCOSqzcE1+2g6hwTJD6/OzJyKKjjkTFLAiAlRzawN2DFzNul5b7DTUu4LC/u\nWDgZByFLh91JGyzWtw==\n-----END CERTIFICATE-----\n" signature: "0D\002 etY\023F\357i\\\t\334\v\366\224\350>\b\250Z\372[c\352:U\302\026q\253F\334\337\202\002 N\201p!U\343\037\223l=\350\261\227|\017\331w\301\227b\305\302\205\263\256*\322\326=\256 b"```

huy.tranibm (Mon, 02 Apr 2018 15:44:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pzAFCvsY5fXF5fPtF) @rickr the signature in this case of the endorser would be the peer's signature correct? If i am calling the transaction to the peer that belongs to the correct MSP, what can cause the signature to be invalid? I am able to pull the payload from my Local network(verifies true). Could it be the peer's signature isn't synced with the channel's config root_cert? ```endorser: "\n\aOrg1MSP\022\226\006-----BEGIN CERTIFICATE-----\nMIICGTCCAcCgAwIBAgIRAN+BUbj4gov+odYv6jy9DvEwCgYIKoZIzj0EAwIwczEL\nMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG\ncmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh\nLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIyMTIwODQyWhcNMjcwNjIwMTIwODQy\nWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN\nU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNvbTBZ\nMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLFA9FtcDx7boZZjFDpYKacetc1L7prt\noIA6wqJlyoWFtHDmtnXVzjyukb4w4YKz5Sx2QPG2fp8a5RZKU+3TmUejTTBLMA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIPz3drAqBWAE\nCNC+nZdSr8WfZJULchyss2O1uVoP6mIWMAoGCCqGSM49BAMCA0cAMEQCIFYW5mIq\nUepXXCOSqzcE1+2g6hwTJD6/OzJyKKjjkTFLAiAlRzawN2DFzNul5b7DTUu4LC/u\nWDgZByFLh91JGyzWtw==\n-----END CERTIFICATE-----\n" signature: "0D\002 etY\023F\357i\\\t\334\v\366\224\350>\b\250Z\372[c\352:U\302\026q\253F\334\337\202\002 N\201p!U\343\037\223l=\350\261\227|\017\331w\301\227b\305\302\205\263\256*\322\326=\256 b"```

huy.tranibm (Mon, 02 Apr 2018 15:47:09 GMT):
@rickr what information would i need from IBP's starter plan team to verify this?

huy.tranibm (Mon, 02 Apr 2018 15:58:14 GMT):
im only using 1org and 1 peer in the credential profile

rickr (Mon, 02 Apr 2018 16:45:45 GMT):
Hi If you want to create a patch for the empty string go ahead but look at how it's done in the node case just below

rickr (Mon, 02 Apr 2018 16:46:15 GMT):
``` if (!Utils.isNullOrEmpty(chaincodePath)) { throw new IllegalArgumentException("chaincodePath must be null for Node chaincode"); }```

rickr (Mon, 02 Apr 2018 16:46:32 GMT):
You also need to open up a JIRA for it too

huy.tranibm (Mon, 02 Apr 2018 17:15:13 GMT):
this is from logs

huy.tranibm (Mon, 02 Apr 2018 17:15:15 GMT):
[2018-04-02 16:58:37.221 UTC] [ERROR ] CryptoPrimitives - Cannot validate certificate. Error is: signature check failed Certificate [0] Version: 3 SerialNumber: 691421494508340622449513986251042671289474849592 IssuerDN: C=US,ST=North Carolina,O=Hyperledger,OU=Fabric,CN=fabric-ca-server-org1CA Start Date: Fri Mar 30 10:19:00 CDT 2018 Final Date: Tue Feb 26 17:24:00 CST 2019 SubjectDN: C=US,ST=North Carolina,O=Hyperledger,OU=client+OU=org1,CN=peer1d57 Public Key: EC Public Key [36:43:9d:1b:7e:20:c7:52:df:ea:85:19:de:7d:51:2e:37:89:7d:ee] X: d205ee3ba92429e21f58b317c8f8f8171db7e91dc5096c98e287ea5061427166 Y: c7cd41f2dc446ae6069a8b88d748518a7b9a7c1a12a919228d0682172953daac Signature Algorithm: SHA256WITHECDSA Signature: 3045022100bf504c8a9229798fb5efcfebb1bd32 c1df6ad862f682018601c73f7a5534a83602204d e3ff86a6b443599fb5e38b73d80fc3f7c1f85bb6 9fda1b65eea7f65b6b617a Extensions: critical(true) KeyUsage: 0x4 critical(true) BasicConstraints: isCa(false) critical(false) 2.5.29.14 value = DER Octet String[20] critical(false) 2.5.29.35 value = Sequence Tagged [0] IMPLICIT DER Octet String[20] critical(false) 2.5.29.17 value = Sequence Tagged [2] IMPLICIT DER Octet String[0] critical(false) 1.2.3.4.5.6.7.8.1 value = java.io.EOFException: DEF length 116 object truncated by 84 [2018-04-02 16:58:37.231 UTC] [ERROR ] CryptoPrimitives - Cannot validate certificate. Error is: signature check failed

huy.tranibm (Mon, 02 Apr 2018 17:15:15 GMT):
```[2018-04-02 16:58:37.221 UTC] [ERROR ] CryptoPrimitives - Cannot validate certificate. Error is: signature check failed Certificate [0] Version: 3 SerialNumber: 691421494508340622449513986251042671289474849592 IssuerDN: C=US,ST=North Carolina,O=Hyperledger,OU=Fabric,CN=fabric-ca-server-org1CA Start Date: Fri Mar 30 10:19:00 CDT 2018 Final Date: Tue Feb 26 17:24:00 CST 2019 SubjectDN: C=US,ST=North Carolina,O=Hyperledger,OU=client+OU=org1,CN=peer1d57 Public Key: EC Public Key [36:43:9d:1b:7e:20:c7:52:df:ea:85:19:de:7d:51:2e:37:89:7d:ee] X: d205ee3ba92429e21f58b317c8f8f8171db7e91dc5096c98e287ea5061427166 Y: c7cd41f2dc446ae6069a8b88d748518a7b9a7c1a12a919228d0682172953daac Signature Algorithm: SHA256WITHECDSA Signature: 3045022100bf504c8a9229798fb5efcfebb1bd32 c1df6ad862f682018601c73f7a5534a83602204d e3ff86a6b443599fb5e38b73d80fc3f7c1f85bb6 9fda1b65eea7f65b6b617a Extensions: critical(true) KeyUsage: 0x4 critical(true) BasicConstraints: isCa(false) critical(false) 2.5.29.14 value = DER Octet String[20] critical(false) 2.5.29.35 value = Sequence Tagged [0] IMPLICIT DER Octet String[20] critical(false) 2.5.29.17 value = Sequence Tagged [2] IMPLICIT DER Octet String[0] critical(false) 1.2.3.4.5.6.7.8.1 value = java.io.EOFException: DEF length 116 object truncated by 84 [2018-04-02 16:58:37.231 UTC] [ERROR ] CryptoPrimitives - Cannot validate certificate. Error is: signature check failed```

rickr (Mon, 02 Apr 2018 17:16:10 GMT):
Is this only on a query ? If you send a proposal to execute CC it fails too ?

huy.tranibm (Mon, 02 Apr 2018 17:17:45 GMT):
yes its a query, when i send an invoke, i get the txId but the verify() still is false

huy.tranibm (Mon, 02 Apr 2018 17:17:53 GMT):
im using the same example_cc_go CC

rickr (Mon, 02 Apr 2018 17:18:04 GMT):
so it's on both ?

huy.tranibm (Mon, 02 Apr 2018 17:18:17 GMT):
spoked to IBP members and they said the default endorsement policy is one from either org

rickr (Mon, 02 Apr 2018 17:18:38 GMT):
that has nothing to do with that

huy.tranibm (Mon, 02 Apr 2018 17:18:53 GMT):
yes its on both. When i run the same code on the same CC on my locally deployed network the verify returned is True

rickr (Mon, 02 Apr 2018 17:19:18 GMT):
So all proposals are not verified

huy.tranibm (Mon, 02 Apr 2018 17:19:18 GMT):
could it be that im using alpha and ibp is using rc?

rickr (Mon, 02 Apr 2018 17:19:35 GMT):
no

huy.tranibm (Mon, 02 Apr 2018 17:19:37 GMT):
correct rickr, both invoke/query is not verified

rickr (Mon, 02 Apr 2018 17:19:45 GMT):
what jdk ?

huy.tranibm (Mon, 02 Apr 2018 17:19:54 GMT):
1.8

rickr (Mon, 02 Apr 2018 17:20:04 GMT):
sun ibm open?

huy.tranibm (Mon, 02 Apr 2018 17:20:34 GMT):
not sure, how can i check?

rickr (Mon, 02 Apr 2018 17:21:31 GMT):
java -XshowSettings:properties -version

huy.tranibm (Mon, 02 Apr 2018 17:23:10 GMT):
don't see any sun.ibm

rickr (Mon, 02 Apr 2018 17:23:20 GMT):
can you paste it here

huy.tranibm (Mon, 02 Apr 2018 17:24:12 GMT):
```Huys-MacBook-Pro-2:fabricconnector huytranibm$ java -XshowSettings:properties -version Property settings: awt.toolkit = sun.lwawt.macosx.LWCToolkit file.encoding = UTF-8 file.encoding.pkg = sun.io file.separator = / gopherProxySet = false java.awt.graphicsenv = sun.awt.CGraphicsEnvironment java.awt.printerjob = sun.lwawt.macosx.CPrinterJob java.class.path = . java.class.version = 52.0 java.endorsed.dirs = /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/endorsed java.ext.dirs = /Users/huytranibm/Library/Java/Extensions /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/ext /Library/Java/Extensions /Network/Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java java.home = /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre java.io.tmpdir = /var/folders/wd/hf1n64c13xj454jhd5qyhhzh0000gn/T/ java.library.path = /Users/huytranibm/Library/Java/Extensions /Library/Java/Extensions /Network/Library/Java/Extensions /System/Library/Java/Extensions /usr/lib/java . java.runtime.name = Java(TM) SE Runtime Environment java.runtime.version = 1.8.0_144-b01 java.specification.name = Java Platform API Specification java.specification.vendor = Oracle Corporation java.specification.version = 1.8 java.vendor = Oracle Corporation java.vendor.url = http://java.oracle.com/ java.vendor.url.bug = http://bugreport.sun.com/bugreport/ java.version = 1.8.0_144 java.vm.info = mixed mode java.vm.name = Java HotSpot(TM) 64-Bit Server VM java.vm.specification.name = Java Virtual Machine Specification java.vm.specification.vendor = Oracle Corporation java.vm.specification.version = 1.8 java.vm.vendor = Oracle Corporation java.vm.version = 25.144-b01 line.separator = \n os.arch = x86_64 os.name = Mac OS X os.version = 10.13.3 path.separator = : sun.arch.data.model = 64 sun.boot.class.path = /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/resources.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/sunrsasign.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jsse.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jce.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/charsets.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/jfr.jar /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/classes sun.boot.library.path = /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib sun.cpu.endian = little sun.cpu.isalist = sun.io.unicode.encoding = UnicodeBig sun.java.launcher = SUN_STANDARD sun.jnu.encoding = UTF-8 sun.management.compiler = HotSpot 64-Bit Tiered Compilers sun.os.patch.level = unknown user.country = US user.dir = /Users/huytranibm/SpringCustom/fabricconnector user.home = /Users/huytranibm user.language = en user.name = huytranibm user.timezone = java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode) ```

rickr (Mon, 02 Apr 2018 17:25:00 GMT):
sun jdk

rickr (Mon, 02 Apr 2018 17:25:35 GMT):
actually now Oracle :)

rickr (Mon, 02 Apr 2018 17:25:37 GMT):
ava.specification.vendor = Oracle Corporation

huy.tranibm (Mon, 02 Apr 2018 17:27:06 GMT):
anything missing?

rickr (Mon, 02 Apr 2018 17:27:13 GMT):
``` java.io.EOFException: DEF length 116 object truncated by 84 [2018-04-02 16:58:37.231 UTC] [ERROR ] CryptoPrimitives - Cannot validate certificate. Error is: signature check failed ```

rickr (Mon, 02 Apr 2018 17:27:41 GMT):
I think you need to work with bluemix team unless you can reproduce out of that environment

huy.tranibm (Mon, 02 Apr 2018 17:27:50 GMT):
Ok

huy.tranibm (Mon, 02 Apr 2018 17:28:02 GMT):
im going to get the channelConfigBytes and look at the root_certs

huy.tranibm (Mon, 02 Apr 2018 17:28:06 GMT):
and see whats going on

huy.tranibm (Mon, 02 Apr 2018 17:28:17 GMT):
but that's as far as my knowledge can take me

rickr (Mon, 02 Apr 2018 17:28:20 GMT):
My gut tells me they're producing certificates that are not being tolerated by the SDK

huy.tranibm (Mon, 02 Apr 2018 17:28:26 GMT):
actually i was told to contact u

rickr (Mon, 02 Apr 2018 17:28:27 GMT):
or I should say java

huy.tranibm (Mon, 02 Apr 2018 17:28:58 GMT):
do you think this is set differently on IBP side? org.hyperledger.fabric.sdk.crypto.default_signature_algorithm = SHA256withECDSA

rickr (Mon, 02 Apr 2018 17:29:00 GMT):
NO -- If this only is being reproduce in BMX it needs to be addressed by them

rickr (Mon, 02 Apr 2018 17:29:46 GMT):
I don't think there's anything you can do on the client side that's going to make that work

huy.tranibm (Mon, 02 Apr 2018 17:29:59 GMT):
because crypto.verify() uses that property

huy.tranibm (Mon, 02 Apr 2018 17:30:15 GMT):
thanks Rick, i'll address this with BMX

huy.tranibm (Mon, 02 Apr 2018 17:30:37 GMT):
i'll reference this conversation if u dont mind

rickr (Mon, 02 Apr 2018 17:30:46 GMT):
sure

rickr (Mon, 02 Apr 2018 17:31:30 GMT):
If you or they can reproduce this outside of bluemix then it should be brought back here

huy.tranibm (Mon, 02 Apr 2018 17:31:48 GMT):
ok

huy.tranibm (Mon, 02 Apr 2018 17:32:22 GMT):
thanks @rickr

rickr (Mon, 02 Apr 2018 17:37:49 GMT):
Here is what I've seen in the past. BMX team only test Node and GO. These implementations from what I've experienced are extremely tolerant of loosely defined certificates. Java is more strict. Note we only call JCE so there's really little here for the Java SDK to do different. You may try IBM JDK too but also from what I've *experienced* it's even more strict than Oracle and Open JDK

huy.tranibm (Mon, 02 Apr 2018 17:39:13 GMT):
man o man

rickr (Mon, 02 Apr 2018 17:41:20 GMT):
The fact that they even excepted the proposal and verified it was ok, most likely means the we are signing and using the same crypto/curve strengh and hash. So there little chance those are wrong and trying to change any of that is not IMO going to get you anywhere

rickr (Mon, 02 Apr 2018 17:41:20 GMT):
The fact that they even excepted the proposal and verified it was ok most likely means that we are signing and using the same crypto/curve strength and hash. So there little chance those are wrong and trying to change any of that is not IMO is not going to get you anywhere

huy.tranibm (Mon, 02 Apr 2018 17:42:11 GMT):
makes sense

huy.tranibm (Mon, 02 Apr 2018 17:47:44 GMT):
@aatkddny are you receiving the same results as mines above?

aatkddny (Mon, 02 Apr 2018 18:17:05 GMT):
I can

aatkddny (Mon, 02 Apr 2018 18:17:05 GMT):
I can't even get my chaincode to instantiate from the console. There's some problem that the logs aren't helping with to do with either peers not connecting properly to the orderer or to the channel. I mocked up a channel connect and after getting past the openssl and tls debacle that let me connect.

aatkddny (Mon, 02 Apr 2018 18:17:05 GMT):
I can't even get my chaincode to instantiate from the console. There's some problem that the logs aren't helping with to do with either peers not connecting properly to the orderer or to the channel. I mocked up a channel connect and after getting past the openssl and tls debacle that let me connect. I'm at the point where I'm going to rip the whole thing down and reconstitute - which will be a half days job.

aatkddny (Mon, 02 Apr 2018 18:17:05 GMT):
I can't even get my chaincode to instantiate from the console. There's some problem that the logs aren't helping with to do with either peers not connecting properly to the orderer or to the channel. I mocked up a channel connect and after getting past the openssl and tls debacle that let me connect. I'm at the point where I'm going to rip the whole thing down and reconstitute - which will be a half days job. I'll let you know when this thing is back on line and I try to run a simple Tx through.

aatkddny (Mon, 02 Apr 2018 18:17:05 GMT):
I can't even get my chaincode to instantiate from the console. There's some problem that the logs aren't helping with to do with either peers not connecting properly to the orderer or to the channel. I mocked up a channel connect and after getting past the openssl and tls debacle that let me connect. I'm at the point where I'm going to rip the whole thing down and reconstitute - which will be a half days job. I'll let you know when this thing is back on line and I try to run a simple Tx through. edit: There was a comment about it getting the root CA certs. This isn't related to the CA having the wrong cert by any chance is it?

davidtoro92 (Mon, 02 Apr 2018 19:45:05 GMT):
Has joined the channel.

davidtoro92 (Mon, 02 Apr 2018 19:45:54 GMT):
Hi all! I would like to implement a block listener with java sdk! I've already searched in google, but i really want an expert opinion about how to start to implement that! Anyone here have a link o papper where I can find that info out? Thanks in advance.

rickr (Mon, 02 Apr 2018 19:58:15 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/6ef1bc801dfdb8533952b69f11fe712dffc5aa91/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L900-L1049 In large part been done

davidtoro92 (Mon, 02 Apr 2018 20:00:44 GMT):
thanks @rickr i will check that!

rickr (Mon, 02 Apr 2018 20:02:28 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/6ef1bc801dfdb8533952b69f11fe712dffc5aa91/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3460

davidtoro92 (Mon, 02 Apr 2018 20:08:21 GMT):
Ok, I've already checked that but in my research. I was checking how to get the channel config and info according a json config that I have

davidtoro92 (Mon, 02 Apr 2018 20:09:02 GMT):
'cause the params of that method are HFClient and Channel

davidtoro92 (Mon, 02 Apr 2018 20:10:12 GMT):
In addition y see `Channel barChannel = constructChannel(BAR_CHANNEL_NAME, client, sampleOrg);`

davidtoro92 (Mon, 02 Apr 2018 20:10:40 GMT):
the assert is generating a channel "on the fly". But I have a remote channel to listen

zhulg (Tue, 03 Apr 2018 03:43:08 GMT):
Has joined the channel.

deepakvparmar (Tue, 03 Apr 2018 08:12:45 GMT):
Hi All, I am getting following exception while installing chaincode through CLI, *Error: Error endorsing chaincode: rpc error: code = Unknown desc = access denied: channel [] creator org [DEFAULT]* Any pointer or suggestion would be very helpful,

papegaaij (Tue, 03 Apr 2018 08:54:33 GMT):
Has joined the channel.

SyneBlockChainTeam (Tue, 03 Apr 2018 11:51:52 GMT):
upgrade

SyneBlockChainTeam (Tue, 03 Apr 2018 11:51:52 GMT):
while adding new org to existing network, how to avoid init in upgrade call?

aatkddny (Tue, 03 Apr 2018 12:43:11 GMT):
is there a formal definition of the NetworkConfig anywhere? Curious as to whether there's a problem with the SDK or IBMs implementation. In particular (or more accurately my actual issue right now) is the "registrar" field in the SDK. The ` JsonObject registrar = getJsonValueAsObject(jsonCA.get("registrar")); ` implies a single value, but IBM is returning an array. Trying to figure out which is correct, or if it's a free for all.

aatkddny (Tue, 03 Apr 2018 12:52:41 GMT):
NM - found FAB-5363.

Rumeel_Hussain (Tue, 03 Apr 2018 15:06:41 GMT):
Has joined the channel.

hzrari (Tue, 03 Apr 2018 16:51:21 GMT):
Has joined the channel.

hzrari (Tue, 03 Apr 2018 16:51:53 GMT):
Hi all, I wanted to know if there is any way to get transaction data (Key / Value) based on the transactionId

hzrari (Tue, 03 Apr 2018 16:51:55 GMT):
?

aatkddny (Tue, 03 Apr 2018 17:40:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8DJjdcDBpbujj2eBt) @rickr Just as an fyi. It's not just @huy.tranibm - I'm getting the same problem. Same code works locally.

aatkddny (Tue, 03 Apr 2018 17:40:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8DJjdcDBpbujj2eBt) @rickr Just as an fyi. It's not just @huy.tranibm - I'm getting the same problem. Same code works locally, so there's a fair likelihood it's BMX issue.

varadatibm (Tue, 03 Apr 2018 18:17:29 GMT):
Has joined the channel.

huy.tranibm (Tue, 03 Apr 2018 20:40:17 GMT):
@rickr @aatkddny i decoded the cert from the endorser and this is what we see, looks like ObjectId 1.2.3.4.5.6.7.8.9.1 is throwing the exception. Isn't this the bug that 1.1 is still trying to fix( attribute controls), also hf.Client seems incorrect to me, shouldn't it be hf.Peer? ```huys-mbp-2:Desktop huytranibm$ vim ibpEndorserCert.pem huys-mbp-2:Desktop huytranibm$ keytool -printcert -file ibpEndorserCert.pem -v Owner: CN=peer1d57, OU=client + OU=org1, O=Hyperledger, ST=North Carolina, C=US Issuer: CN=fabric-ca-server-org1CA, OU=Fabric, O=Hyperledger, ST=North Carolina, C=US Serial number: 791c69801442cba468a801a8c118f5c2678d9b38 Valid from: Fri Mar 30 10:19:00 CDT 2018 until: Tue Feb 26 17:24:00 CST 2019 Certificate fingerprints: MD5: DE:A3:35:0D:11:19:A8:DC:2A:90:15:6C:21:A8:FB:2F SHA1: 56:E0:E3:2E:FB:A1:F8:DE:0F:BB:15:3D:98:EA:76:51:32:A8:26:AB SHA256: 83:80:23:FD:09:21:7D:AC:8B:7F:16:98:43:36:5D:28:F7:8C:75:2B:E9:11:5D:C3:EA:DC:42:E9:B1:D2:03:0E Signature algorithm name: SHA256withECDSA Version: 3 Extensions: #1: ObjectId: 1.2.3.4.5.6.7.8.1 Criticality=false 0000: 7B 22 61 74 74 72 73 22 3A 7B 22 68 66 2E 41 66 ."attrs":."hf.Af 0010: 66 69 6C 69 61 74 69 6F 6E 22 3A 22 6F 72 67 31 filiation":"org1 0020: 22 2C 22 68 66 2E 45 6E 72 6F 6C 6C 6D 65 6E 74 ","hf.Enrollment 0030: 49 44 22 3A 22 70 65 65 72 31 64 35 37 22 2C 22 ID":"peer1d57"," 0040: 68 66 2E 54 79 70 65 22 3A 22 63 6C 69 65 6E 74 hf.Type":"client 0050: 22 7D 7D ".. #2: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 66 3A 7C 1D 41 C9 B7 48 29 EC D7 3C D5 A7 35 D7 f:..A..H)..<..5. 0010: F4 04 58 1C ..X. ] ] #3: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:false PathLen: undefined ] #4: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ Key_CertSign ] #5: ObjectId: 2.5.29.17 Criticality=false SubjectAlternativeName [ DNSName: ] #6: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 8D 65 5A 1F ED E9 60 BE DB B9 D8 F2 DB F8 24 EC .eZ...`.......$. 0010: 38 94 7F 4C 8..L ] ] huys-mbp-2:Desktop huytranibm$ ```

huy.tranibm (Tue, 03 Apr 2018 20:40:17 GMT):
@rickr @aatkddny i decoded the cert from the endorser and this is what we see, looks like ObjectId 1.2.3.4.5.6.7.8.9.1 is throwing the exception. Isn't this the bug that 1.1 is still trying to fix( attribute controls), also hf.Type = Client seems incorrect to me, shouldn't it be hf.Peer? ```huys-mbp-2:Desktop huytranibm$ vim ibpEndorserCert.pem huys-mbp-2:Desktop huytranibm$ keytool -printcert -file ibpEndorserCert.pem -v Owner: CN=peer1d57, OU=client + OU=org1, O=Hyperledger, ST=North Carolina, C=US Issuer: CN=fabric-ca-server-org1CA, OU=Fabric, O=Hyperledger, ST=North Carolina, C=US Serial number: 791c69801442cba468a801a8c118f5c2678d9b38 Valid from: Fri Mar 30 10:19:00 CDT 2018 until: Tue Feb 26 17:24:00 CST 2019 Certificate fingerprints: MD5: DE:A3:35:0D:11:19:A8:DC:2A:90:15:6C:21:A8:FB:2F SHA1: 56:E0:E3:2E:FB:A1:F8:DE:0F:BB:15:3D:98:EA:76:51:32:A8:26:AB SHA256: 83:80:23:FD:09:21:7D:AC:8B:7F:16:98:43:36:5D:28:F7:8C:75:2B:E9:11:5D:C3:EA:DC:42:E9:B1:D2:03:0E Signature algorithm name: SHA256withECDSA Version: 3 Extensions: #1: ObjectId: 1.2.3.4.5.6.7.8.1 Criticality=false 0000: 7B 22 61 74 74 72 73 22 3A 7B 22 68 66 2E 41 66 ."attrs":."hf.Af 0010: 66 69 6C 69 61 74 69 6F 6E 22 3A 22 6F 72 67 31 filiation":"org1 0020: 22 2C 22 68 66 2E 45 6E 72 6F 6C 6C 6D 65 6E 74 ","hf.Enrollment 0030: 49 44 22 3A 22 70 65 65 72 31 64 35 37 22 2C 22 ID":"peer1d57"," 0040: 68 66 2E 54 79 70 65 22 3A 22 63 6C 69 65 6E 74 hf.Type":"client 0050: 22 7D 7D ".. #2: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 66 3A 7C 1D 41 C9 B7 48 29 EC D7 3C D5 A7 35 D7 f:..A..H)..<..5. 0010: F4 04 58 1C ..X. ] ] #3: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:false PathLen: undefined ] #4: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ Key_CertSign ] #5: ObjectId: 2.5.29.17 Criticality=false SubjectAlternativeName [ DNSName: ] #6: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 8D 65 5A 1F ED E9 60 BE DB B9 D8 F2 DB F8 24 EC .eZ...`.......$. 0010: 38 94 7F 4C 8..L ] ] huys-mbp-2:Desktop huytranibm$ ```

huy.tranibm (Tue, 03 Apr 2018 20:40:17 GMT):
@rickr @aatkddny i decoded the cert from the endorser and this is what we see, looks like ObjectId 1.2.3.4.5.6.7.8.9.1 is throwing the exception. Isn't this the bug that 1.1 is still trying to fix( attribute controls), also hf.Type = Client seems incorrect to me, shouldn't it be hf.Type = Peer? ```huys-mbp-2:Desktop huytranibm$ vim ibpEndorserCert.pem huys-mbp-2:Desktop huytranibm$ keytool -printcert -file ibpEndorserCert.pem -v Owner: CN=peer1d57, OU=client + OU=org1, O=Hyperledger, ST=North Carolina, C=US Issuer: CN=fabric-ca-server-org1CA, OU=Fabric, O=Hyperledger, ST=North Carolina, C=US Serial number: 791c69801442cba468a801a8c118f5c2678d9b38 Valid from: Fri Mar 30 10:19:00 CDT 2018 until: Tue Feb 26 17:24:00 CST 2019 Certificate fingerprints: MD5: DE:A3:35:0D:11:19:A8:DC:2A:90:15:6C:21:A8:FB:2F SHA1: 56:E0:E3:2E:FB:A1:F8:DE:0F:BB:15:3D:98:EA:76:51:32:A8:26:AB SHA256: 83:80:23:FD:09:21:7D:AC:8B:7F:16:98:43:36:5D:28:F7:8C:75:2B:E9:11:5D:C3:EA:DC:42:E9:B1:D2:03:0E Signature algorithm name: SHA256withECDSA Version: 3 Extensions: #1: ObjectId: 1.2.3.4.5.6.7.8.1 Criticality=false 0000: 7B 22 61 74 74 72 73 22 3A 7B 22 68 66 2E 41 66 ."attrs":."hf.Af 0010: 66 69 6C 69 61 74 69 6F 6E 22 3A 22 6F 72 67 31 filiation":"org1 0020: 22 2C 22 68 66 2E 45 6E 72 6F 6C 6C 6D 65 6E 74 ","hf.Enrollment 0030: 49 44 22 3A 22 70 65 65 72 31 64 35 37 22 2C 22 ID":"peer1d57"," 0040: 68 66 2E 54 79 70 65 22 3A 22 63 6C 69 65 6E 74 hf.Type":"client 0050: 22 7D 7D ".. #2: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 66 3A 7C 1D 41 C9 B7 48 29 EC D7 3C D5 A7 35 D7 f:..A..H)..<..5. 0010: F4 04 58 1C ..X. ] ] #3: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:false PathLen: undefined ] #4: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ Key_CertSign ] #5: ObjectId: 2.5.29.17 Criticality=false SubjectAlternativeName [ DNSName: ] #6: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 8D 65 5A 1F ED E9 60 BE DB B9 D8 F2 DB F8 24 EC .eZ...`.......$. 0010: 38 94 7F 4C 8..L ] ] huys-mbp-2:Desktop huytranibm$ ```

rickr (Tue, 03 Apr 2018 22:44:42 GMT):
critical(false) 1.2.3.4.5.6.7.8.1 value = java.io.EOFException: DEF length 116 object truncated by 84

rickr (Tue, 03 Apr 2018 22:44:50 GMT):
I thought I pointed that out already

rickr (Tue, 03 Apr 2018 22:45:35 GMT):
Is that not the exception you're still seeing ?

huy.tranibm (Tue, 03 Apr 2018 22:51:26 GMT):
yes that is the exception, i was just pointing out what the decoded cert contains

huy.tranibm (Tue, 03 Apr 2018 22:53:30 GMT):
does that seem right to you rick? hf.Type is client when it should be peer?

rickr (Tue, 03 Apr 2018 22:53:50 GMT):
I think it will say client on v1.1 till you turn on v1.1 capabilities

huy.tranibm (Tue, 03 Apr 2018 22:54:04 GMT):
but besides from that it seems to have some reading issues

rickr (Tue, 03 Apr 2018 22:54:15 GMT):
I'm assuming that this is now v1.1

huy.tranibm (Tue, 03 Apr 2018 22:54:35 GMT):
yes, its been 1.1

huy.tranibm (Tue, 03 Apr 2018 22:54:48 GMT):
all of this is 1.1

rickr (Tue, 03 Apr 2018 22:56:06 GMT):
I'm still going with my *theory* that BMX is generating bad certs and Node and GO are tolerant

huy.tranibm (Tue, 03 Apr 2018 22:56:34 GMT):
im with you!

huy.tranibm (Tue, 03 Apr 2018 22:57:44 GMT):
Rick, the root_certs in the channelConfig should match up with the peer's signcerts correct?

rickr (Tue, 03 Apr 2018 22:57:45 GMT):
Can you capture that cert (pem) and paste it there ?

huy.tranibm (Tue, 03 Apr 2018 22:57:54 GMT):
that is what i see from my local network

huy.tranibm (Tue, 03 Apr 2018 22:58:36 GMT):
```endorsement { endorser: "\n\004org1\022\335\a-----BEGIN CERTIFICATE-----\nMIICrjCCAlSgAwIBAgIUeRxpgBRCy6RoqAGowRj1wmeNmzgwCgYIKoZIzj0EAwIw\nbzELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQK\nEwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFicmljMSAwHgYDVQQDExdmYWJyaWMt\nY2Etc2VydmVyLW9yZzFDQTAeFw0xODAzMzAxNTE5MDBaFw0xOTAyMjYyMzI0MDBa\nMG0xCzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEUMBIGA1UE\nChMLSHlwZXJsZWRnZXIxHDANBgNVBAsTBmNsaWVudDALBgNVBAsTBG9yZzExETAP\nBgNVBAMTCHBlZXIxZDU3MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0gXuO6kk\nKeIfWLMXyPj4Fx236R3FCWyY4ofqUGFCcWbHzUHy3ERq5gaai4jXSFGKe5p8GhKp\nGSKNBoIXKVParKOBzzCBzDAOBgNVHQ8BAf8EBAMCAgQwDAYDVR0TAQH/BAIwADAd\nBgNVHQ4EFgQUjWVaH+3pYL7budjy2/gk7DiUf0wwHwYDVR0jBBgwFoAUZjp8HUHJ\nt0gp7Nc81ac11/QEWBwwCwYDVR0RBAQwAoIAMF8GCCoDBAUGBwgBBFN7ImF0dHJz\nIjp7ImhmLkFmZmlsaWF0aW9uIjoib3JnMSIsImhmLkVucm9sbG1lbnRJRCI6InBl\nZXIxZDU3IiwiaGYuVHlwZSI6ImNsaWVudCJ9fTAKBggqhkjOPQQDAgNIADBFAiEA\nv1BMipIpeY+178/rsb0ywd9q2GL2ggGGAcc/elU0qDYCIE3j/4amtENZn7Xji3PY\nD8P3wfhbtp/aG2Xup/Zba2F6\n-----END CERTIFICATE-----\n" signature: "0E\002!\000\337

huy.tranibm (Tue, 03 Apr 2018 22:58:47 GMT):
here is the root_cert from the channelConfig

rickr (Tue, 03 Apr 2018 22:58:58 GMT):
is that cert from bmx ?

huy.tranibm (Tue, 03 Apr 2018 22:59:02 GMT):
This is root_cert decoded base64 -----BEGIN CERTIFICATE----- MIICITCCAcigAwIBAgIUFL1dOvLOrKFTDfjnoA+ic6AD10UwCgYIKoZIzj0EAwIw bzELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQK EwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFicmljMSAwHgYDVQQDExdmYWJyaWMt Y2Etc2VydmVyLW9yZzFDQTAeFw0xODAzMTYyMjA1MDBaFw0zMzAzMTIyMjA1MDBa MG8xCzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEUMBIGA1UE ChMLSHlwZXJsZWRnZXIxDzANBgNVBAsTBkZhYnJpYzEgMB4GA1UEAxMXZmFicmlj LWNhLXNlcnZlci1vcmcxQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAS/Po9K xQh5kQjZEqOH18Ei1d7fZe8AXc4C6c3kz1XPafK5nCAuphzx30B8xJtqtiI1Th7y HkAtMgasFyInlR1xo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB /zAdBgNVHQ4EFgQUZjp8HUHJt0gp7Nc81ac11/QEWBwwCgYIKoZIzj0EAwIDRwAw RAIgWmVSbSCRrubu2u4wYol8LzheiZIuszuZTfnfhyM/dBECIC0KBoBCmiwsCqU0 Nq7dUfxwfhb7ed/dV4sDKnsgtJaB -----END CERTIFICATE-----

huy.tranibm (Tue, 03 Apr 2018 22:59:05 GMT):
yes bmx

huy.tranibm (Tue, 03 Apr 2018 23:01:45 GMT):
here's the channel's root_cert info ```huys-mbp-2:Desktop huytranibm$ keytool -printcert -file ibpChanRootCert.pem -v Owner: CN=fabric-ca-server-org1CA, OU=Fabric, O=Hyperledger, ST=North Carolina, C=US Issuer: CN=fabric-ca-server-org1CA, OU=Fabric, O=Hyperledger, ST=North Carolina, C=US Serial number: 14bd5d3af2ceaca1530df8e7a00fa273a003d745 Valid from: Fri Mar 16 17:05:00 CDT 2018 until: Sat Mar 12 16:05:00 CST 2033 Certificate fingerprints: MD5: 87:E3:EA:20:EE:70:8A:EC:63:36:9F:EB:4C:70:9D:3D SHA1: 56:CF:97:C6:2A:AC:4B:96:AE:FE:93:13:13:49:09:CB:59:60:BC:92 SHA256: 2B:FC:AD:0E:3B:BC:9D:72:59:A7:42:98:3F:D6:DF:5F:AF:60:85:97:9D:6B:94:F7:40:0D:37:EC:3A:4A:6B:3A Signature algorithm name: SHA256withECDSA Version: 3 Extensions: #1: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:true PathLen:2147483647 ] #2: ObjectId: 2.5.29.15 Criticality=true KeyUsage [ Key_CertSign Crl_Sign ] #3: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 66 3A 7C 1D 41 C9 B7 48 29 EC D7 3C D5 A7 35 D7 f:..A..H)..<..5. 0010: F4 04 58 1C ..X. ] ] huys-mbp-2:Desktop huytranibm$ ```

huy.tranibm (Tue, 03 Apr 2018 23:04:00 GMT):
Here's the local fabric network peer's cert and channel config root_cert

huy.tranibm (Tue, 03 Apr 2018 23:04:27 GMT):
THis is the peer's signcert ```-----BEGIN CERTIFICATE----- MIICGTCCAcCgAwIBAgIRAN+BUbj4gov+odYv6jy9DvEwCgYIKoZIzj0EAwIwczEL MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIyMTIwODQyWhcNMjcwNjIwMTIwODQy WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNvbTBZ MBMGByqGSM49AgEGCCqGSM49AwEHA0IABLFA9FtcDx7boZZjFDpYKacetc1L7prt oIA6wqJlyoWFtHDmtnXVzjyukb4w4YKz5Sx2QPG2fp8a5RZKU+3TmUejTTBLMA4G A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIPz3drAqBWAE CNC+nZdSr8WfZJULchyss2O1uVoP6mIWMAoGCCqGSM49BAMCA0cAMEQCIFYW5mIq UepXXCOSqzcE1+2g6hwTJD6/OzJyKKjjkTFLAiAlRzawN2DFzNul5b7DTUu4LC/u WDgZByFLh91JGyzWtw== -----END CERTIFICATE-----```

huy.tranibm (Tue, 03 Apr 2018 23:04:51 GMT):
this is the channelconfig root_cert ```"root_certs": [ "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNSRENDQWVxZ0F3SUJBZ0lSQUtQdTBPSkw3VUR1M3NzTTVva0NrVFl3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpFdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekV1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGN3TmpJeU1USXdPRFF5V2hjTk1qY3dOakl3TVRJd09EUXkKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dBMVVFQ2hNUWIzSm5NUzVsZUdGdGNHeGxMbU52YlRFY01Cb0dBMVVFCkF4TVRZMkV1YjNKbk1TNWxlR0Z0Y0d4bExtTnZiVEJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUEKQklJUnI4Sld0RFRZUXR5N0NMS1d6dkRIOE9EWWkxcXl4S0wwdzNoY0lUQ0s1Y2tYem1WQzFIMWdEMTdVd0YzUQplR1pRVWJUS25tRGtWeG9FbVdTQXU0aWpYekJkTUE0R0ExVWREd0VCL3dRRUF3SUJwakFQQmdOVkhTVUVDREFHCkJnUlZIU1VBTUE4R0ExVWRFd0VCL3dRRk1BTUJBZjh3S1FZRFZSME9CQ0lFSVB6M2RyQXFCV0FFQ05DK25aZFMKcjhXZlpKVUxjaHlzczJPMXVWb1A2bUlXTUFvR0NDcUdTTTQ5QkFNQ0EwZ0FNRVVDSVFDbzE5S2NPQTlCNEd1Two5RlI5czlVYVJxYlNlRHZYUzVxTW9SMktJdDRTMGdJZ0ZXMG1KQjNqUk1IMERPVnhTYUZuTnhTZ1dlbkxNd3JBCllUTFNkMnF1K1FnPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg\u003d\u003d"```

huy.tranibm (Tue, 03 Apr 2018 23:05:08 GMT):
if you decode that base64, you'll see that its the same cert as peer's signcert

rickr (Tue, 03 Apr 2018 23:08:06 GMT):
Have you opened up a ticket ?

huy.tranibm (Tue, 03 Apr 2018 23:08:12 GMT):
nope

huy.tranibm (Tue, 03 Apr 2018 23:08:32 GMT):
i've scheduled a meeting with paul and andrew sometime next week, did you get the invite?

huy.tranibm (Tue, 03 Apr 2018 23:09:04 GMT):
i think explaining all of this would be hell, rather i show everything through debug session

rickr (Tue, 03 Apr 2018 23:09:21 GMT):
no look on bmx they must have instruction for support .. and that's opening up ticket

huy.tranibm (Tue, 03 Apr 2018 23:09:57 GMT):
they know about it already, they're looking into it by reproducing

rickr (Tue, 03 Apr 2018 23:10:13 GMT):
Do they have a ticket for it ?

huy.tranibm (Tue, 03 Apr 2018 23:10:29 GMT):
i didn't turn in ticket

rickr (Tue, 03 Apr 2018 23:12:59 GMT):
https://console.bluemix.net/docs/services/blockchain/ibmblockchain_support.html#ibmblockchain_support

huy.tranibm (Tue, 03 Apr 2018 23:16:18 GMT):
team lead matt and andrew already allocated resource to this issue already

xiao8 (Wed, 04 Apr 2018 01:18:54 GMT):
Has joined the channel.

yoyokeen (Wed, 04 Apr 2018 02:20:16 GMT):
```2018-04-04 02:08:57,526 grpc-default-executor-1 ERROR OrdererClient:158 - Received error on channel foo, orderer orderer.example.com, url grpc://112.126.87.91:7050, UNKNOWN io.grpc.StatusRuntimeException: UNKNOWN at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:391) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.nio.channels.UnresolvedAddressException at sun.nio.ch.Net.checkAddress(Net.java:101) ```

yoyokeen (Wed, 04 Apr 2018 02:20:43 GMT):
I already add the orderer domain in hosts.

yoyokeen (Wed, 04 Apr 2018 02:21:06 GMT):
how to fix it?

yoyokeen (Wed, 04 Apr 2018 02:58:26 GMT):
That's my mac env problem, fixed.

kelvinzhong (Wed, 04 Apr 2018 06:01:21 GMT):
@rickr

kelvinzhong (Wed, 04 Apr 2018 06:01:21 GMT):
@rickr hi rick, i wonder if the feature of support the private data is decided to implement in v1.2?

jinyu18 (Wed, 04 Apr 2018 07:17:32 GMT):
Has joined the channel.

pankajcheema (Wed, 04 Apr 2018 07:53:19 GMT):
Has joined the channel.

pankajcheema (Wed, 04 Apr 2018 07:54:36 GMT):
Hi experts

pankajcheema (Wed, 04 Apr 2018 07:55:05 GMT):
If anyone has the tutorial of java sdk implementation please share

pankajcheema (Wed, 04 Apr 2018 07:55:59 GMT):
Anyone knows how to create http Rest Api's using java sdk ? Is it even possible?

aatkddny (Wed, 04 Apr 2018 11:57:24 GMT):
you can create rest apis that use the sdk...

davidtoro92 (Wed, 04 Apr 2018 13:16:57 GMT):
I think the same that @aatkddny

aatkddny (Wed, 04 Apr 2018 14:11:51 GMT):
Anyone ever see this error? ``` 2018-04-04 10:03:05.326 ERROR 59487 --- [ault-executor-2] o.h.fabric.sdk.PeerEventServiceClient : Received error on channel , peer , url grpcs://-obfuscated-.com:, UNAVAILABLE: HTTP/2 error code: NO_ERROR Received Rst Stream io.grpc.StatusRuntimeException: UNAVAILABLE: HTTP/2 error code: NO_ERROR Received Rst Stream at io.grpc.Status.asRuntimeException(Status.java:526) ~[grpc-core-1.9.0.jar:1.9.0] at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:419) [grpc-stub-1.9.0.jar:1.9.0] at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [grpc-core-1.9.0.jar:1.9.0] at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) [grpc-core-1.9.0.jar:1.9.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_162] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162] Exception in thread "pool-5-thread-1" java.lang.NullPointerException at org.hyperledger.fabric.sdk.PeerEventServiceClient.(PeerEventServiceClient.java:78) at org.hyperledger.fabric.sdk.Peer.lambda$reconnectPeerEventServiceClient$0(Peer.java:306) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ``` It looks to be dying here: ` this.filterBlock = peerOptions.isRegisterEventsForFilteredBlocks(); ` Called from here: ` PeerEventServiceClient lpeerEventingClient = new PeerEventServiceClient(this, new Endpoint(url, properties).getChannelBuilder(), properties, null); ` That's clearly wrong. The call is passing a null to the constructor.

aatkddny (Wed, 04 Apr 2018 14:20:25 GMT):
NM. It's clearly a bug. I'll add a jira

huy.tranibm (Wed, 04 Apr 2018 14:26:10 GMT):
why is it passing a null?

huy.tranibm (Wed, 04 Apr 2018 14:26:48 GMT):

Clipboard - April 4, 2018 9:26 AM

huy.tranibm (Wed, 04 Apr 2018 14:26:55 GMT):
that's the constructor that i see?

aatkddny (Wed, 04 Apr 2018 14:27:55 GMT):
right. and its passing a null. that's not what was expected i'm sure. FAB-9333 covers it

rickr (Wed, 04 Apr 2018 18:12:06 GMT):
@kelvinzhong I'm not certain what feature you are referencing but if it's related to FAB-8718 The only support that the SDK needs for it is sending transient data with the proposals. The JSDK has had that for quite some time. You should find examples of how it's used in the End2endXX integration tests.

rickr (Wed, 04 Apr 2018 18:21:32 GMT):
@pankajcheema Many have asked for it but no one will step up to do it. As for me I would never use it and probably not recommend it. Look at Fabric docs to get the concepts. Each SDK should not have to provide that. Get the End2endITxx.java integration to pass. Get a debugger and spend a day walking through the code. It's like your own personal demo you can step through and observe all the variables and see whats going on. Even the asserts for testing can at times be helpful or just ignored. You know the code and what you're looking at is up todate because it' passing :) You also then have a base of code you steal from for your own application Tutorials IMO don't get updated as the should. I'm not opposed for someone doing a tutorial if they're so inclined and want to offer it.

rickr (Wed, 04 Apr 2018 18:21:32 GMT):
@pankajcheema Many have asked for it but no one will step up to do it. As for me I would never use it and probably not recommend it. Look at Fabric docs to get the concepts. Each SDK should not have to provide that. Get the End2endITxx.java integration to pass. Get a debugger and spend a day walking through the code. It's like your own personal demo you can step through and observe all the variables and see whats going on. Even the asserts for testing can at times be helpful or just ignored. You know the code and what you're looking at is up todate because it' passing :) You also then have a base of code you steal from for your own application Tutorials IMO don't get updated as they should. I'm not opposed for someone doing a tutorial if they're so inclined and want to offer it.

rickr (Wed, 04 Apr 2018 18:29:51 GMT):
If you're wanting to be on v1.1.0 of the SDK please either get the latest code or if you're already embedding in an application use the SNAPSHOT-1.1.0 for the version in your pom.xml dependencies. This will help the SDK to find bugs that are current that we have missed. If you do have issues the first thing we'll as is to move to that level.

rickr (Wed, 04 Apr 2018 18:29:51 GMT):
If you're wanting to be on v1.1.0 of the SDK please either get the latest code or if you're already embedding in an application use the SNAPSHOT-1.1.0 for the version in your pom.xml dependencies. This will help the SDK to find bugs that are current that we have missed. If you do have issues the first thing we'll ask is to move to that level.

aatkddny (Wed, 04 Apr 2018 19:01:26 GMT):
If you are open to a suggestion - one of the things that might cut down on "how do I" questions would be to add a few more comments to the code. In particular where things changed between versions. A few lines there may save a lot here. I'll give you a slightly contrived for instance - I see that a channel can be serialized and deserialized. Great. I'm sure it does something valuable, but I still have no idea why I'd do that over just reconstructing it. Two lines in the comment to say why would stop me having to ask.

aatkddny (Wed, 04 Apr 2018 19:01:26 GMT):
If you are open to a suggestion - one of the things that might cut down on "how do I" questions would be to add a few more comments to the code. In particular where things changed between versions. A few lines there may save a lot here. I'll give you a slightly contrived for instance since I know it hasn't changed for a while - I see that a channel can be serialized and deserialized. Great. I'm sure it does something valuable, but I still have no idea why I'd do that over just reconstructing it. Two lines in the comment to say why would stop me having to ask.

rickr (Wed, 04 Apr 2018 19:27:44 GMT):
And the release notes don't cover that ? https://github.com/hyperledger/fabric-sdk-java#v11-release-notes

aatkddny (Wed, 04 Apr 2018 19:32:34 GMT):
Yes. Absolutely they do. But I was looking at your suggestion to "get a debugger and step through the code". There's no substitute for knowing *why* something is going on as you see it happen as a learning tool.

rickr (Wed, 04 Apr 2018 19:37:26 GMT):
Well being close to something makes it a little more difficult at times because it's clear in your mind. I more than welcome comments to clarify or even provide gerrit patches to any of the code to just clarify something.

huy.tranibm (Wed, 04 Apr 2018 20:58:54 GMT):
For anyone new, before diving into sdk, it should be suggested that they understand the docs and know how transaction flows work first

aatkddny (Thu, 05 Apr 2018 00:25:48 GMT):
i have some eventing requirements that require updates on a channel to be propagated to another channel. the original user doesn't have access to the second channel. it all works fine. my question is one of style. is there any reason i shouldn't connect to all my channels and register my event handlers when i stand up my application, rather than piecemeal as required?

huy.tranibm (Thu, 05 Apr 2018 00:59:54 GMT):
updates as in channel configuration updates?

aatkddny (Thu, 05 Apr 2018 01:10:16 GMT):
no - adding or updating an asset.

aatkddny (Thu, 05 Apr 2018 01:10:45 GMT):
i need to trigger on that to then serially update a different asset on another channel

huy.tranibm (Thu, 05 Apr 2018 01:10:58 GMT):
Ah i c ok

aatkddny (Thu, 05 Apr 2018 01:11:11 GMT):
so is there any reason not to stand everything up up front was my Q

huy.tranibm (Thu, 05 Apr 2018 01:11:39 GMT):
that's a good question it seems a little risky

balaji.viswanathan (Thu, 05 Apr 2018 06:40:56 GMT):
Has joined the channel.

balaji.viswanathan (Thu, 05 Apr 2018 06:47:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MW32HaiFGiXgwyxX2) @rickr just want to confirm, this is true for release-1.0 of fabric-sdk-java. correct?

aatkddny (Thu, 05 Apr 2018 12:23:54 GMT):
Has anyone try to run the java sdk multithreaded? My question - to be a little more precise - is that a tight coupling between the HFClient and the Channel objects exists.

aatkddny (Thu, 05 Apr 2018 12:23:54 GMT):
Has anyone try to run the java sdk multithreaded? My question - to be a little more precise - is that a tight coupling between the HFClient and the Channel objects exists. The HFClient requires a user to be set in the UserContext. In a high performance environment with multiple users, must I wait until a dispatched transaction completes (which implies I'd need either a channel per thread or a synchronization or queuing mechanism) or is the whole thing already thread safe?

aatkddny (Thu, 05 Apr 2018 12:37:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=K3urWXXz5LEmzZRyq) So does this imply that in a multithreaded environment that if I dispatch transactions against a predefined channel, I must wait for completion before dispatching on a new thread with a different User set in the HFClient for that Channel? Or to put it another way I either need multiple channel instances - perhaps per thread, synchronization on the client, some kind of queueing mechanism to be thread-safe?

aatkddny (Thu, 05 Apr 2018 12:37:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=K3urWXXz5LEmzZRyq) So does this imply that in a multithreaded environment that if I dispatch transactions against a predefined channel, I must wait for completion before dispatching on a new thread with a different User set in the HFClient for that Channel? Or to put it another way I either need multiple channel instances - perhaps per thread, synchronization on the client or some kind of queueing mechanism to be thread-safe?

rickr (Thu, 05 Apr 2018 13:03:20 GMT):
Not sure how you come to that conclusion. All methods for proposals endorsement allow you to specify a client context.

rickr (Thu, 05 Apr 2018 13:03:20 GMT):
Not sure how you come to that conclusion. All methods for proposals endorsement allow you to specify a user context. Those are synchronous so they'll complete on the same thread they were issued. Many threads _should_ be able to submit proposals for endorsement independently. The sendTransaction to the orderer also has several options to give a user context and _should_ allow for many threads to submit transactions to orderer independently. For sendTransaction the Future it returns _should_ be able to be also processed (waited on) by yet another independent thread than what submitted it to the orderer. The reason for the _should_ is that I attempted to make all of those thread safe. I had some bandwidth a long time ago to do some testing but that's been _along time ago_. I'll be the first to admit that muti-threading testing has not be done heavily so it would be no surprise if there are *issues* yet to be found. Just to make sure it's clear that if you create proposals on independent threads that modify on a channel/chain the same key data you'll will get alot of invalid transactions.

aatkddny (Thu, 05 Apr 2018 13:27:48 GMT):
Vis-a-vis the latter - I know. :D It's not my code and I'm not throwing stones, but it seems that the singleton HFClient in the channel makes it implicitly unsafe. I can't see how I can safely modify the user context in a second thread while a `channel.sendTransactionProposal` is in flight. It's probably fine until I get to a multi-user multi-thread scenario. In that case do you have a recommendation between create a channel pool or synchronize?

rajeshlc (Thu, 05 Apr 2018 13:31:36 GMT):
Has joined the channel.

rickr (Thu, 05 Apr 2018 13:33:19 GMT):
Please open a JIRA to provide an option to supply user context

aatkddny (Thu, 05 Apr 2018 13:34:02 GMT):
will do. thx.

rickr (Thu, 05 Apr 2018 13:40:07 GMT):
Nope -- I'm sure I had that covered -- not enough coffee yet: https://github.com/hyperledger/fabric-sdk-java/blob/aa14f2e05786e5ef5cac22f881bcbce9fdee5e78/src/main/java/org/hyperledger/fabric/sdk/TransactionRequest.java#L75

aatkddny (Thu, 05 Apr 2018 13:42:00 GMT):
I know I can set it, but is it not set for the duration of the transaction - meaning I can't safely modify it in flight with a second Tx in a different thread that sets it. I didn't see a clone of the HFClient or even the User.

aatkddny (Thu, 05 Apr 2018 13:42:00 GMT):
I know I can set it, but is it not set for the duration of the transaction - meaning I can't safely modify it in flight with a second Tx in a different thread that sets it. I didn't see a clone of the HFClient or even the User. `getTransactionContext` falls back to the client if it isn't specified.

aatkddny (Thu, 05 Apr 2018 13:42:00 GMT):
I know I can set it, but is it not set for the duration of the transaction - meaning I can't safely modify it in flight with a second Tx in a different thread that sets it. I didn't see a clone of the HFClient or even the User. `getTransactionContext` falls back to the client if the User in the proposal isn't specified.

rickr (Thu, 05 Apr 2018 13:44:57 GMT):
Each thread should have it's own transactionRequests

aatkddny (Thu, 05 Apr 2018 13:48:00 GMT):
NM - I see you are pulling the context in getTransactionContext. My exposure then should only between setting the UserContext in the HFClient and doing the `client.newTransactionProposalRequest()` and I can refactor to minimize that.

aatkddny (Thu, 05 Apr 2018 13:48:00 GMT):
NM - I see you are pulling the context in `client.getTransactionContext`. My exposure then should only between setting the UserContext in the HFClient and doing the `client.newTransactionProposalRequest()` and I can refactor to minimize that.

aatkddny (Thu, 05 Apr 2018 13:48:00 GMT):
NM - I see you are pulling the context in `client.newTransactionContext`. My exposure then should only between setting the UserContext in the HFClient and doing the `client.newTransactionProposalRequest()` and I can refactor to minimize that.

aatkddny (Thu, 05 Apr 2018 13:48:00 GMT):
NM - I see you are pulling the context in `client.getTransactionContext`. My exposure then should only between setting the UserContext in the HFClient and doing the `client.newTransactionProposalRequest()` and I can refactor to minimize that.

rickr (Thu, 05 Apr 2018 13:52:06 GMT):
Do a `client.newTransactionProposalRequest()` If you have no threading issue in your application your good. If you do and they're switch the user context either your application needs to coordinate that (rather ugly) Or just ignore what it defaults to in your thread and always set TransactionRequest.setUserContext to the user context that your thread expects the context to be

aatkddny (Thu, 05 Apr 2018 13:53:14 GMT):
I'll adopt the brute force approach and do the latter. Thx.

hendry19901990 (Thu, 05 Apr 2018 15:11:34 GMT):
hello

hendry19901990 (Thu, 05 Apr 2018 15:11:43 GMT):
help me please

hendry19901990 (Thu, 05 Apr 2018 15:11:54 GMT):
i've got the following error

hendry19901990 (Thu, 05 Apr 2018 15:12:00 GMT):
```Channel mychannel connect failed on peer eventing service peer0.org1.example.com. Reason: UNIMPLEMENTED: unknown service protos.Deliver```

rickr (Thu, 05 Apr 2018 15:21:51 GMT):
if you're connect to a fabric 1.0.x you need to when adding or joining peers provide a PeerOptions https://github.com/hyperledger/fabric-sdk-java/blob/9224fa3f45a70392d1b244c080bf41bd561470d3/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L732

hendry19901990 (Thu, 05 Apr 2018 15:36:46 GMT):
my code is

hendry19901990 (Thu, 05 Apr 2018 15:36:53 GMT):
```caClient = user.getCaClient(); client = HFClient.createNewInstance(); cs = caClient.getCryptoSuite(); /* * Connect */ client.setCryptoSuite(cs); caClient.setCryptoSuite(cs); client.setUserContext(user); // Instantiate channel channel = client.newChannel("mychannel"); Peer peer0 = client.newPeer("peer0.org1.example.com", peerURL); channel.addPeer(peer0); // It always wants orderer, otherwise even query does not work channel.addOrderer(client.newOrderer("orderer.example.com", ordererURL)); channel.initialize(); /* * Connect */ ChaincodeID chaincodeID = ChaincodeID.newBuilder().setName("fabcar").build(); QueryByChaincodeRequest queryByChaincodeRequest = QueryByChaincodeRequest.newInstance(user); queryByChaincodeRequest.setChaincodeID(chaincodeID); queryByChaincodeRequest.setFcn("queryAllCars"); queryByChaincodeRequest.setChaincodeVersion("1.0"); // queryByChaincodeRequest.setArgs("CAR1"); Collection response = channel.queryByChaincode(queryByChaincodeRequest, Arrays.asList(peer0));```

hendry19901990 (Thu, 05 Apr 2018 15:37:46 GMT):
i'm using compile 'org.hyperledger.fabric-sdk-java:fabric-sdk-java:1.1.0-alpha'

hendry19901990 (Thu, 05 Apr 2018 15:37:46 GMT):
i'm using ```compile 'org.hyperledger.fabric-sdk-java:fabric-sdk-java:1.1.0-alpha'```

hendry19901990 (Thu, 05 Apr 2018 16:08:52 GMT):
i just solved the error

hendry19901990 (Thu, 05 Apr 2018 16:09:21 GMT):
i changed the version to ```compile group: 'org.hyperledger.fabric-sdk-java', name: 'fabric-sdk-java', version: '1.0.1'```

hendry19901990 (Thu, 05 Apr 2018 17:42:49 GMT):
thanks @rickr

damien75 (Thu, 05 Apr 2018 18:44:30 GMT):
Has joined the channel.

damien75 (Thu, 05 Apr 2018 18:53:08 GMT):
Hi, I am trying to use the Java SDK to connect to my running fabcar example on a MAC OS. On `channel.initialize()` I get the following error: ``` org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel cohortchannel failed with peer peer. Status FAILURE, details: Sending proposal to peer failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null} at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:750) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1150) ``` Has anyone faced similar issues?

damien75 (Thu, 05 Apr 2018 21:10:53 GMT):
in more details: ``` 17:10:10.027 [grpc-default-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0xd9736a41, L:/10.10.137.70:63441 - R:damiens-mbp.montreal.imagia.com/10.10.137.70:7051] OUTBOUND SETTINGS: ack=false settings={ENABLE_PUSH=0, MAX_CONCURRENT_STREAMS=0, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=8192} 17:10:10.047 [grpc-default-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0xd9736a41, L:/10.10.137.70:63441 - R:damiens-mbp.montreal.imagia.com/10.10.137.70:7051] OUTBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041 17:10:10.053 [grpc-default-worker-ELG-1-2] DEBUG io.grpc.netty.NettyClientHandler - [id: 0xd9736a41, L:/10.10.137.70:63441 - R:damiens-mbp.montreal.imagia.com/10.10.137.70:7051] OUTBOUND GO_AWAY: lastStreamId=0 errorCode=1 length=77 bytes=4669727374207265636569766564206672616d6520776173206e6f742053455454494e47532e204865782064756d7020666f7220666972737420352062797465... 17:10:10.055 [grpc-default-worker-ELG-1-2] DEBUG io.netty.handler.codec.http2.Http2ConnectionHandler - [id: 0xd9736a41, L:/10.10.137.70:63441 - R:damiens-mbp.montreal.imagia.com/10.10.137.70:7051] Sent GOAWAY: lastStreamId '0', errorCode '1', debugData 'First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002'. Forcing shutdown of the connection. ```

hzrari (Thu, 05 Apr 2018 21:30:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iMXkNsb8ink7dA58C)

hzrari (Thu, 05 Apr 2018 21:30:32 GMT):
Hi, any answer for my question please ?

XingqiangMao (Thu, 05 Apr 2018 22:28:27 GMT):
Has joined the channel.

rickr (Fri, 06 Apr 2018 00:32:26 GMT):
@damien75 anything logged at all on the peer side ?

huy.tranibm (Fri, 06 Apr 2018 00:35:27 GMT):
@rickr ``` 2018-04-05T19:34:37.23-0500 [APP/PROC/WEB/0] OUT java.lang.NoSuchMethodError: io.grpc.MethodDescriptor.newBuilder()Lio/grpc/MethodDescriptor$Builder; 2018-04-05T19:34:37.23-0500 [APP/PROC/WEB/0] OUT at org.hyperledger.fabric.protos.peer.EndorserGrpc.getProcessProposalMethodHelper(EndorserGrpc.java:51) ~[fabric-sdk-java-1.1.0-SNAPSHOT.jar!/:na] 2018-04-05T19:34:37.23-0500 [APP/PROC/WEB/0] OUT at org.hyperledger.fabric.protos.peer.EndorserGrpc.(EndorserGrpc.java:33) ~[fabric-sdk-java-1.1.0-SNAPSHOT.jar!/:na] ``` Any idea what im missing here? been trying to figure out this dependency issue all day

rickr (Fri, 06 Apr 2018 00:38:06 GMT):
What's it calling ? Full stack trace ? and enable sdk logging

rickr (Fri, 06 Apr 2018 00:39:43 GMT):
try wiping out your whole .m2 repository (maven) and rebuild ?

huy.tranibm (Fri, 06 Apr 2018 00:42:55 GMT):
so the the error isn't being thrown when im running it locally but its throwing it on CF, i've made sure that all the dependencies are packaged into the jar, do you think my .m2 repo is still the issue?

rickr (Fri, 06 Apr 2018 00:43:18 GMT):
@hzrari The end2end**IT integration show 95% of what the SDK can do. Take a couple of hours with a debugger and step through it. Think that will pay off in the long run. There is apis to get block by transaciton id

rickr (Fri, 06 Apr 2018 00:44:08 GMT):
@huy.tranibm probably not then.

rickr (Fri, 06 Apr 2018 00:53:44 GMT):
I assume you have a grpc-core-1.10.0.jar

rickr (Fri, 06 Apr 2018 00:58:09 GMT):
unpacked that and see: ``` find -iname '*' | grep -i MethodDescriptor ./io/grpc/MethodDescriptor$Marshaller.class ./io/grpc/InternalMethodDescriptor.class ./io/grpc/MethodDescriptor$ReflectableMarshaller.class ./io/grpc/MethodDescriptor$Builder.class ./io/grpc/MethodDescriptor$1.class ./io/grpc/MethodDescriptor$MethodType.class ./io/grpc/MethodDescriptor$PrototypeMarshaller.class ./io/grpc/MethodDescriptor.class ```

rickr (Fri, 06 Apr 2018 01:11:31 GMT):
decompile MethodDescriptor ``` @CheckReturnValue public static MethodDescriptor.Builder newBuilder() { return newBuilder((MethodDescriptor.Marshaller)null, (MethodDescriptor.Marshaller)null); } ```

rickr (Fri, 06 Apr 2018 01:15:37 GMT):
``` find -iname '*' | grep -i MethodDescriptor | xargs sum 28783 1 ./MethodDescriptor$Marshaller.class 30460 2 ./InternalMethodDescriptor.class 53364 1 ./MethodDescriptor$ReflectableMarshaller.class 61331 4 ./MethodDescriptor$Builder.class 18517 1 ./MethodDescriptor$1.class 63807 2 ./MethodDescriptor$MethodType.class 02186 1 ./MethodDescriptor$PrototypeMarshaller.class 01385 9 ./MethodDescriptor.class ```

maxd001 (Fri, 06 Apr 2018 11:19:08 GMT):
Has joined the channel.

maxd001 (Fri, 06 Apr 2018 11:20:32 GMT):
hi All - I am new to this channel and java SDK, so apologies if question has been asked and answered previously. I am trying to reconnect to an existing channel using sdk. Is that possible? How can do I go about doing that?

maxd001 (Fri, 06 Apr 2018 11:21:11 GMT):
i am using SDK v1.0.1

maxd001 (Fri, 06 Apr 2018 11:21:21 GMT):
the error I am getting is: 2018-04-06 11:15:08,177 main ERROR Channel:386 - Channel bar error: New channel bar error. StatusValue 400. Status BAD_REQUEST org.hyperledger.fabric.sdk.exception.TransactionException: New channel bar error. StatusValue 400. Status BAD_REQUEST at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:378) at org.hyperledger.fabric.sdk.Channel.(Channel.java:194) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:1304) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:135) at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:577) at org.hyperledger.fabric.sdkintegration.MDTestSDK.main(MDTestSDK.java:91)

maxd001 (Fri, 06 Apr 2018 11:21:35 GMT):
from orderer: 2018-04-06 11:15:07.382 UTC [orderer/common/broadcast] Handle -> WARN 95b Rejecting CONFIG_UPDATE because: Error authorizing update: Error validating ReadSet: Readset expected key [Groups] /Channel/Application at version 0, but got version 1

maxd001 (Fri, 06 Apr 2018 11:22:27 GMT):
following SDK unit tests - this is the java code where this error happens:

maxd001 (Fri, 06 Apr 2018 11:22:30 GMT):
Channel barChannel = End2endIT.constructChannel(BAR_CHANNEL_NAME, client, sampleOrg);

rickr (Fri, 06 Apr 2018 12:42:51 GMT):
Why would you construct a channel if it was already there ? https://github.com/hyperledger/fabric-sdk-java/blob/aa14f2e05786e5ef5cac22f881bcbce9fdee5e78/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L596 Walk through both End2endIT.java and End2endAndBackAgainIT.java best if you can debug

rickr (Fri, 06 Apr 2018 12:42:51 GMT):
Why would you construct a channel if it was already there ? https://github.com/hyperledger/fabric-sdk-java/blob/aa14f2e05786e5ef5cac22f881bcbce9fdee5e78/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L596 Walk through both End2endIT.java and End2endAndBackAgainIT.java best if you can debug. Will go a long way in getting started.

aatkddny (Fri, 06 Apr 2018 16:57:30 GMT):
anyone seen one of these? it's in an event handler. `Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 77dd170d328618036855d5861cefcad73b971671103daff06f3c22d1177cd59d status 11 `

aatkddny (Fri, 06 Apr 2018 16:57:30 GMT):
anyone seen one of these? it's in an event handler. ` Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 77dd170d328618036855d5861cefcad73b971671103daff06f3c22d1177cd59d status 11 `

aatkddny (Fri, 06 Apr 2018 16:57:30 GMT):
anyone seen one of these? it's in an event handler. ``` Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 77dd170d328618036855d5861cefcad73b971671103daff06f3c22d1177cd59d status 11 ```

aatkddny (Fri, 06 Apr 2018 16:58:44 GMT):
I'm doing an invoke on a channel as an event fired from an asset update on a different channel. I'm wondering where to find the status errors.

rickr (Fri, 06 Apr 2018 17:18:41 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/aa14f2e05786e5ef5cac22f881bcbce9fdee5e78/src/main/proto/peer/transaction.proto#L137

aatkddny (Fri, 06 Apr 2018 17:22:30 GMT):
Perfect. Thanks. That jibes with what I thought my issue was - the event's firing twice even though the NOT FOR ME is set on one peer.

aatkddny (Fri, 06 Apr 2018 17:22:30 GMT):
Perfect. Thanks. That jibes with what I thought my issue was - the event's firing twice, once for each org with a listener - it doesn't filter by org. So I need to track it outside of the HFClient -> channel methodology that everything else uses.

aatkddny (Fri, 06 Apr 2018 17:22:30 GMT):
Perfect. Thanks. That jibes with what I thought my issue was - the event's firing twice, once for each org attached to the channel - it doesn't filter by org despite the fact that I only attach once. So I need to track it outside of the HFClient -> channel methodology that everything else uses.

aatkddny (Fri, 06 Apr 2018 18:37:20 GMT):
Actually it's firing three times - each time for the same user/client/channel/peer in the same org for the same handler for the same transaction id. Now I'm totally stumped.

maxd001 (Fri, 06 Apr 2018 20:06:52 GMT):
thanks @rickr, will take a look

aatkddny (Fri, 06 Apr 2018 22:03:50 GMT):
I was totally wrong above. Snapshot does something unexpected. It sends the same event from both Peer and EventHub. Is this expected? ``` org.hyperledger.fabric.sdk.Channel : Channel eventqueue got block event with block number: 101 for channel: , from Eventhub: org2-peer1 org.hyperledger.fabric.sdk.Channel : Channel eventqueue got block event NOT FOR ME channelId from Channel eventqueue got block event with block number: 101 for channel: , from Eventhub: org2-peer1 org.hyperledger.fabric.sdk.Channel : Channel eventqueue got block event with block number: 101 for channel: , from Peer: org2-peer1 org.hyperledger.fabric.sdk.Channel : Sending block event 'Channel eventqueue got block event with block number: 101 for channel: , from Peer: org2-peer1' to block listener BLOCK_LISTENER_HANDLEb2cc0e55-3ecd-4e39-b0ec-1fcc52cb3596BLOCK_LISTENER_HANDLE org.hyperledger.fabric.sdk.Channel : Channel got event for transaction 87271b0cbcc56868e47c316b35d4d83f81bce530d2f2a0fe694569dfe37d06c0 org.hyperledger.fabric.sdk.Channel : Channel seen transaction event 87271b0cbcc56868e47c316b35d4d83f81bce530d2f2a0fe694569dfe37d06c0 for peer org2-peer1 org.hyperledger.fabric.sdk.Channel : Channel eventqueue got block event with block number: 101 for channel: , from Eventhub: org2-peer1 org.hyperledger.fabric.sdk.Channel : Sending block event 'Channel eventqueue got block event with block number: 101 for channel: , from Eventhub: org2-peer1' to block listener BLOCK_LISTENER_HANDLEb2cc0e55-3ecd-4e39-b0ec-1fcc52cb3596BLOCK_LISTENER_HANDLE ```

aatkddny (Fri, 06 Apr 2018 22:04:21 GMT):
Which means events in this case need to be idempotent.

kkado (Sat, 07 Apr 2018 04:17:13 GMT):
Has joined the channel.

rickr (Sat, 07 Apr 2018 15:07:14 GMT):
yes

rickr (Sat, 07 Apr 2018 15:07:14 GMT):
yes - in a blocklistener you'll see an event (block) for each peer eventing service and each eventhub. The event has the source that received the event.

aatkddny (Sat, 07 Apr 2018 15:38:47 GMT):
So simply as a point of style. Idempotent transactions in this case are failing with a "status 11" - which means an MVCC exception. Which makes sense - the same transaction firing one event in the CC is triggered multiple times at the listener. This in turn dispatches the same Tx twice concurrently. One works, one fails with an MVCC exception. I really need to only dispatch once. Or to serialize so that a Tx event can only be in flight once (if event is idempotent). So I can either try to turn off either the event or the peer notifications. I'm guessing poking in one of those peer properties into my NetworkConfig might help there. My second option is to keep track of the Tx Id and if I already dispatched elsewhere don't dispatch here. I'm not worried about the additional complexity but I'm not a fan of the additional external reference, even if I keep it cached and time it out rather than persistent somewhere. My third would be similar to 2 but to latch - suspend the second dispatch until the first has completed. My final option would be to figure out the source of the event and only dispatch from (say) a peer.

aatkddny (Sat, 07 Apr 2018 15:38:47 GMT):
So simply as a best practices question... Idempotent transactions in this case are failing with a "status 11" - which means an MVCC exception. Which makes sense - the same transaction firing one event in the CC is triggered multiple times at the listener. This in turn dispatches the same Tx twice concurrently. One works, one fails with an MVCC exception. I really need to only dispatch once. Or to serialize so that a Tx event can only be in flight once (if event is idempotent). So I can either try to turn off either the event or the peer notifications. I'm guessing poking in one of those peer properties into my NetworkConfig might help there. My second option is to keep track of the Tx Id and if I already dispatched elsewhere don't dispatch here. I'm not worried about the additional complexity but I'm not a fan of the additional external reference, even if I keep it cached and time it out rather than persistent somewhere. My third would be similar to 2 but to latch - suspend the second dispatch until the first has completed. My final option would be to figure out the source of the event and only dispatch from (say) a peer. A few minutes of quality time with the debugger shows the eventhub and peer are mutually exclusive (one is null if the other is set) in the BlockEvent object. Which I assume is the source you are referring to above. If that's the case, and I choose the final option, am I correct in the assumption that I"m better to trigger from the Peer - I understood that the EventHub was being deprecated. Or did I misunderstand?

aatkddny (Sat, 07 Apr 2018 15:38:47 GMT):
So simply as a best practices question... Idempotent transactions in this case are failing with a "status 11" - which means an MVCC exception. Which makes sense - the same transaction firing one event in the CC is triggered multiple times at the listener. This in turn dispatches the same Tx twice concurrently. One works, one fails with an MVCC exception. I really need to only dispatch once. Or to serialize so that a Tx event can only be in flight once (if event is idempotent). So I can either try to turn off either the event or the peer notifications. I'm guessing poking in one of those peer properties into my NetworkConfig might help there. My second option is to keep track of the Tx Id and if I already dispatched elsewhere don't dispatch here. I'm not worried about the additional complexity but I'm not a fan of the additional external reference, even if I keep it cached and time it out rather than persistent somewhere. My third would be similar to 2 but to latch - suspend the second dispatch until the first has completed. My final option would be to figure out the source of the event and only dispatch from (say) a peer. A few minutes of quality time with the debugger shows the eventhub and peer are mutually exclusive (one is null if the other is set) in the BlockEvent object. Which I assume is the source you are referring to above. If that's the case, and I choose the final option, am I correct in the assumption that I would be better served to trigger from the event that sets the Peer - I understood that the EventHub was being deprecated. Or did I misread that?

aatkddny (Sat, 07 Apr 2018 15:38:47 GMT):
So simply as a best practices question... Idempotent transactions in this case are failing with a "status 11" - which means an MVCC exception. Which makes sense - the same transaction firing one event in the CC is triggered multiple times at the listener. This in turn dispatches the same Tx twice concurrently. One works, one fails with an MVCC exception. I really need to only dispatch once. Or to serialize so that a Tx event can only be in flight once (if event is idempotent). So I can either try to turn off either the event or the peer notifications. I'm guessing poking in one of those peer properties into my NetworkConfig might help there. My second option is to keep track of the Tx Id and if I already dispatched elsewhere don't dispatch here. I'm not worried about the additional complexity but I'm not a fan of the additional external reference, even if I keep it cached and time it out rather than persistent somewhere. My third would be similar to 2 but to latch - suspend the second dispatch until the first has completed. My final option would be to figure out the source of the event and only dispatch from (say) a peer. A few minutes of quality time with the debugger shows the eventhub and peer are mutually exclusive (one is null if the other is set) in the BlockEvent object. Which I assume is the source you are referring to above. If that's the case, and I choose the final option, am I correct in the assumption that I would be better served to trigger from the event that sets the Peer - I understood that the EventHub was being deprecated. Or did I misread that? And as a followup - since setting it up to test will be a chore. Does anyone know if an event is dispatched for *every* peer. So if I had 4 peers I'd either get 5 or 8 events? This network has one peer per org and I'm hesitant to extrapolate.

rickr (Sat, 07 Apr 2018 16:07:42 GMT):
You'll see an event for each Peer that is an event source and each event hub. My understanding is eventhubs will eventually be removed. No shoe fit's all sizes - In general an approach I would take in a block listener is that the block numbers are increasing. Keep track of the latest block number, throw out what you've already processed. Should mean you process that block just once and you'd get redundancy if one Peer eventing service or eventhub is not reporting the block listener would continue processing the events. I would move away from using eventhubs to just using peer eventing services

rickr (Sat, 07 Apr 2018 16:22:14 GMT):
Should note in the approach above that because a block has been committed on one peer and your blocklistener thus gets that event does not mean that any other peer has yet committed it :wink:

hmahidhara (Sat, 07 Apr 2018 16:23:50 GMT):
Has joined the channel.

hmahidhara (Sat, 07 Apr 2018 16:25:41 GMT):
I have a Java SDK based client for the Hyperledger fabric and am able to connect and send transaction proposal requests, create entries in the ledger and query the ledger. I am struggling with registering and listening to BLOCK and CHAINCODE events. I want to start a separate thread on the client that is dedicated to listening and processing these events. What I found so far: HFClient client = HFClient.createNewInstance(); Channel channel = client.newChannel("channel01"); EventHub eventHub = client.newEventHub("eh01", "grpc://abc.xyz.us:7053"); channel.addEventHub(eventHub); Beyond this I am lost. Can someone please post a sample of how to do this?

rickr (Sat, 07 Apr 2018 16:33:06 GMT):
Take the time to follow the End2endIT and End2endAndBackAgainIT there's example of how to do it there.

rickr (Sat, 07 Apr 2018 16:33:06 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/e88221b509d9a4507a1583a403153ba4946b8203/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L834

aatkddny (Sat, 07 Apr 2018 16:55:47 GMT):
There's also - as an fyi for anyone else in this situation - a retry mechanism. It singly retries if the fired event hasn't been committed after 10 minutes - meaning you don't get a second one after 20 minutes. Retry is coming from the peer. I'm waiting to see if responding to the event hub but suspending in the peer still triggers it.

aatkddny (Sat, 07 Apr 2018 16:55:47 GMT):
There's also - as an fyi for anyone else in this situation - a retry mechanism. It singly retries if the fired event hasn't been committed after 10 minutes - meaning you don't get a second one after 20 minutes. Retry is coming from the peer. I'm waiting to see if responding to the event hub but suspending in the peer still triggers it. Edit - it still does. So as an additional wrinkle the peer eventing has a time-based retry. Complete your events in 10 minutes or it'll refire.

kelvinzhong (Sun, 08 Apr 2018 02:37:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2t2W5cmfgqL3dgtjt) @rickr yes, FAB-8718 is what I'm looking for, so it would be implemented in v1.2 says in the JIRA

mengluo668 (Sun, 08 Apr 2018 02:38:43 GMT):
Has joined the channel.

kelvinzhong (Sun, 08 Apr 2018 02:41:31 GMT):
but it says that this feature has already implements in v1.1 as a experimental feature?!

zhenbing (Sun, 08 Apr 2018 03:20:12 GMT):
Has joined the channel.

nivant9091 (Sun, 08 Apr 2018 06:21:29 GMT):
Has joined the channel.

donsonZhang (Sun, 08 Apr 2018 07:52:41 GMT):
Is there a demo for chaincodeendorsementpolicy.yaml to show like “ -P OR ('Org1.admin', AND ('Org2.member','Org3.member'))”

donsonZhang (Sun, 08 Apr 2018 07:53:13 GMT):
Is there a demo for chaincodeendorsementpolicy.yaml to show like “ -P OR ('Org1.admin', AND ('Org2.member','Org3.member'))”

rickr (Sun, 08 Apr 2018 12:03:45 GMT):
@kelvinzhong and ?

rickr (Sun, 08 Apr 2018 12:05:39 GMT):
@donsonZhang Don't know what you mean by _demo_ The integration tests show how you can set it.

HofmT (Sun, 08 Apr 2018 16:31:02 GMT):
Has joined the channel.

HofmT (Sun, 08 Apr 2018 16:33:47 GMT):
Hello guys, I am just testing out the java sdk version 1.1.0-alpha. As network environment I use the provided docker images used in the integration tests however i write my own application code. I managed to create the 'foo' channel. However I cannot find it anymore with the client.getChannel("foo") method. Any ideas?

HofmT (Sun, 08 Apr 2018 16:56:15 GMT):
I found the solution. Instead of using method getChannel you have to use method newChannel(String name). This is very confusing. :D Can anybody explain me why there even is the getChannel() method?

HofmT (Sun, 08 Apr 2018 16:56:15 GMT):
I found the solution. Instead of using method getChannel you have to use method newChannel(String name). This is very confusing. :D Can anybody explain me what the purpose of the getChannel() method is?

rickr (Sun, 08 Apr 2018 17:45:20 GMT):
https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario

rickr (Sun, 08 Apr 2018 17:45:20 GMT):
@HofmT https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario Did you try this ? Walking through this once your setup should take a few hours top IMO.

rickr (Sun, 08 Apr 2018 17:45:20 GMT):
@HofmT https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario Did you try this ? Walking through this once your setup should take a few hours tops IMO.

HofmT (Sun, 08 Apr 2018 17:55:50 GMT):
@rickr Yes, I'm reading through the End to End Test Scenario code. But they perform all the operation with the channel once it is created. In my code I just create the channel and then when i rerun the code I want to use the previously created channel however there is no real method to get the already configured channel.

SmartContract2018 (Sun, 08 Apr 2018 19:12:48 GMT):
Has joined the channel.

rickr (Sun, 08 Apr 2018 20:08:42 GMT):
The second paragraph in that link I posted ?

rickr (Sun, 08 Apr 2018 20:09:28 GMT):
``` The src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java Shows recreating the channel objects created in End2endIT.java and upgrading chaincode and invoking the up graded chaincode. ```

HofmT (Sun, 08 Apr 2018 20:33:02 GMT):
@rickr Thanks, now I got it. So just a quick summary for me: If a channel already exists then I create it with the method that only accepts a String and readd the peers and orderers ?

rickr (Sun, 08 Apr 2018 21:39:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YadXDx2vCd8E72gJR) @albert.lacambra FYI Was published in a recent 1.1.0-SNAPSHOT

sv2011 (Mon, 09 Apr 2018 01:48:09 GMT):
Has joined the channel.

kelvinzhong (Mon, 09 Apr 2018 03:16:19 GMT):
@rickr but I didn't find any test in java sdk is related to create private data, and I have no idea what the Transient data is used for by only looking at the e2eTest...

kelvinzhong (Mon, 09 Apr 2018 03:16:19 GMT):
@rickr but I didn't find any test in java sdk is related to create private data, and I not sure if the Transient data is used to create the private data since the chaincode only show the example of set an event with the data from transient map

kelvinzhong (Mon, 09 Apr 2018 03:16:19 GMT):
@rickr but I didn't find any test in java sdk is related to create private data, and I not sure if the Transient data is used to create the private data since the chaincode only shows the example of set an event with the data from transient map

donsonZhang (Mon, 09 Apr 2018 06:28:09 GMT):
how to constructChannel to contains two orgs belong to two msp?

donsonZhang (Mon, 09 Apr 2018 06:28:50 GMT):
when join the other orgs peer node, i get the err: UNKNOWN: access denied: channel [] creator org [ArchMSP]

donsonZhang (Mon, 09 Apr 2018 06:59:21 GMT):
construct channel, first set org1's peerAdmin: client.setUserContext(peerAdmin); and join org1's peer node; and then set org2's peerAdmin: client.setUserContext(peerAdmin2);

donsonZhang (Mon, 09 Apr 2018 06:59:32 GMT):
this can init channel success

donsonZhang (Mon, 09 Apr 2018 07:00:18 GMT):
but when install chaincode , i get the same err:UNKNOWN: access denied: channel [] creator org [ArchMSP]

donsonZhang (Mon, 09 Apr 2018 07:01:16 GMT):
org1's peer node install chaincode success, but the org2'peer node install failed

donsonZhang (Mon, 09 Apr 2018 07:18:20 GMT):
so user belong to different msp, cann't operate other msp's node?

SyneBlockChainTeam (Mon, 09 Apr 2018 07:24:58 GMT):
Hi, I am able to add an organization to the network, but while trying to add third organization to the same network, I am getting below error on channel update command. 2018-04-06 14:26:39.876 UTC [cauthdsl] func2 -> DEBU 7a6 0xc4203deaf0 principal evaluation succeeds for identity 0 2018-04-06 14:26:39.876 UTC [cauthdsl] func1 -> DEBU 7a7 0xc4203deaf0 gate 1523024799876358713 evaluation succeeds 2018-04-06 14:26:39.876 UTC [policies] Evaluate -> DEBU 7a8 Signature set satisfies policy /Channel/Application/Org1MSP/Admins 2018-04-06 14:26:39.876 UTC [policies] Evaluate -> DEBU 7a9 == Done Evaluating *cauthdsl.policy Policy /Channel/Application/Org1MSP/Admins 2018-04-06 14:26:39.876 UTC [policies] func1 -> DEBU 7aa Evaluation Failed: Only 1 policies were satisfied, but needed 2 of [ Org2MSP.Admins Org1MSP.Admins ] 2018-04-06 14:26:39.876 UTC [policies] Evaluate -> DEBU 7ab Signature set did not satisfy policy /Channel/Application/Admins 2018-04-06 14:26:39.876 UTC [policies] Evaluate -> DEBU 7ac == Done Evaluating *policies.implicitMetaPolicy Policy /Channel/Application/Admins 2018-04-06 14:26:39.877 UTC [orderer/common/broadcast] Handle -> WARN 7ad [channel: foo] Rejecting broadcast of config message from 172.23.0.5:55242 because of error: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: Failed to reach implicit threshold of 2 sub-policies, required 1 remaining 2018-04-06 14:26:39.877 UTC [orderer/common/server] func1 -> DEBU 7ae Closing Broadcast stream 2018-04-06 14:26:39.880 UTC [common/deliver] Handle -> WARN 7af Error reading from 172.23.0.5:55240: rpc error: code = Canceled desc = context canceled 2018-04-06 14:26:39.880 UTC [orderer/common/server] func1 -> DEBU 7b0 Closing Deliver stream

rickr (Mon, 09 Apr 2018 12:23:24 GMT):
@donsonZhang at this time this link is broken because I've not updated the crypto artifacts but this give you an idea https://github.com/cr22rc/fabricSDKJavaMultiDomainSample I'll try to get it updated sometime this week.

rickr (Mon, 09 Apr 2018 12:23:24 GMT):
@donsonZhang at this time this link is an example but is broken because I've not updated the crypto artifacts but this give you an idea https://github.com/cr22rc/fabricSDKJavaMultiDomainSample I'll try to get it updated sometime this week.

rickr (Mon, 09 Apr 2018 12:23:24 GMT):
@donsonZhang This is link a link to a example but is broken because I've not updated the crypto artifacts but this give you an idea https://github.com/cr22rc/fabricSDKJavaMultiDomainSample I'll try to get it updated sometime this week.

rickr (Mon, 09 Apr 2018 12:28:11 GMT):
@kelvinzhong That feature had no SDK impact AFAIK. The SDK is not providing examples for every feature that the Fabric can do. Try to cover a base that exercise and show the API.

rickr (Mon, 09 Apr 2018 12:28:11 GMT):
@kelvinzhong That feature had no SDK impact AFAIK. The SDK is not providing examples for every feature that the Fabric can do. Try to cover a base that exercise and show the API. Get the documentation for that feature and try it. If you find that the SDK is lacking in needing to provide some means to make it work open a JIRA for an improvement to support it once it's not *experimental*

rickr (Mon, 09 Apr 2018 12:28:11 GMT):
@kelvinzhong That feature had no SDK impact AFAIK. The SDK is not providing examples for every feature that the Fabric can do. Try to cover a base that exercise and show the API. Get the documentation for that feature and try it. If you find that the SDK is lacking in needing to provide some means to make it work open a JIRA for an improvement to support it. Once it's not *experimental* (which mean they can break it an time and isn't guaranteed to _work out the box_) so it can't break an tests that the sdk might need for it.

rickr (Mon, 09 Apr 2018 12:28:11 GMT):
@kelvinzhong That feature had no SDK impact AFAIK. The SDK is not providing examples for every feature that the Fabric can do. Try to cover a base that exercise and show the API. Get the documentation for that feature and try it. If you find that the SDK is lacking in needing to provide some means to make it work open a JIRA for an improvement to support it. Once it's not *experimental* (which mean they can break it an time and isn't guaranteed to _work out the box_) so it can't break any tests that the sdk might need for it we'll work on it.

rickr (Mon, 09 Apr 2018 12:28:11 GMT):
@kelvinzhong That feature had no SDK impact AFAIK. The SDK is not providing examples for every feature that the Fabric can do. Try to cover a base that exercise and show the API. Get the documentation for that feature and try it. If you find that the SDK is lacking in needing to provide some means to make it work open a JIRA for an improvement to support it. Once it's not *experimental* (which means they can break it any time and isn't guaranteed to _work out the box_) so it can't break any tests that the sdk might need for it we'll work on it.

rickr (Mon, 09 Apr 2018 13:29:28 GMT):
Talking to the developers private db is not ready yet. Whether there is impact on the SDKs or not is still an uncertainty.

donsonZhang (Mon, 09 Apr 2018 13:33:34 GMT):
@rickr thanks, it works and prove of my codes

huy.tranibm (Mon, 09 Apr 2018 15:47:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9qh3ij6sGJezfy6u7) @rickr found grpc-core in the jar's lib, but im still getting no method exception found. ```Huys-MBP-2:libs huytranibm$ unzip -l demo-0.0.1-SNAPSHOT.jar | grep grpc 557292 04-09-2018 10:16 BOOT-INF/lib/grpc-all-0.13.2.jar 192718 04-09-2018 10:16 BOOT-INF/lib/grpc-netty-1.10.0.jar 6862 04-09-2018 10:16 BOOT-INF/lib/grpc-protobuf-1.10.0.jar 38673 04-09-2018 10:16 BOOT-INF/lib/grpc-stub-1.10.0.jar 8186 04-09-2018 10:16 BOOT-INF/lib/grpc-protobuf-lite-1.10.0.jar 4846 04-09-2018 10:16 BOOT-INF/lib/grpc-auth-0.13.2.jar 4206 04-09-2018 10:16 BOOT-INF/lib/grpc-protobuf-nano-0.13.2.jar 133576 04-09-2018 10:16 BOOT-INF/lib/grpc-okhttp-0.13.2.jar 586038 04-09-2018 10:16 BOOT-INF/lib/grpc-core-1.10.0.jar 10709 04-09-2018 10:16 BOOT-INF/lib/opencensus-contrib-grpc-metrics-0.11.0.jar 27353 04-09-2018 10:16 BOOT-INF/lib/grpc-context-1.10.0.jar ``` Any other ideas why EndorserGrpc wouldn't be able to recognize MethodDescriptor.newBuilder()?

hzrari (Mon, 09 Apr 2018 15:49:58 GMT):
Hi guys, I am facing a random timeout when sending proposal to peers: java.util.concurrent.TimeoutException: Waited 30000 milliseconds for io.grpc.stub.ClientCalls$GrpcFuture@773572de[status=PENDING] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:468)

hzrari (Mon, 09 Apr 2018 15:51:25 GMT):
when it happens, it happens with all the peers generally

huy.tranibm (Mon, 09 Apr 2018 16:42:35 GMT):
@rickr shim-client is using grpc-all:0.13.2 ```+--- org.hyperledger:shim-client:1.0 | +--- com.google.protobuf:protobuf-java:3.0.0 -> 3.5.1 | +--- com.google.protobuf:protobuf-java-util:3.0.0 -> 3.5.1 (*) | +--- io.grpc:grpc-all:0.13.2 | | +--- io.grpc:grpc-netty:0.13.2 -> 1.10.0 (*) | | +--- io.grpc:grpc-auth:0.13.2 | | | +--- io.grpc:grpc-core:0.13.2 -> 1.10.0 (*) | | | \--- com.google.auth:google-auth-library-oauth2-http:0.3.0 | | | +--- com.google.auth:google-auth-library-credentials:0.3.0 | | | +--- com.google.http-client:google-http-client:1.19.0 | | | | +--- com.google.code.findbugs:jsr305:1.3.9 -> 3.0.0 | | | | \--- org.apache.httpcomponents:httpclient:4.0.1 -> 4.5.5 (*) | | | \--- com.google.http-client:google-http-client-jackson2:1.19.0 | | | +--- com.google.http-client:google-http-client:1.19.0 (*) | | | \--- com.fasterxml.jackson.core:jackson-core:2.1.3 -> 2.9.5 ``` I think this may be messing up my dependencies

rickr (Mon, 09 Apr 2018 17:15:30 GMT):
Sound like an environment issue. Have you looked at the Peer logs to see what may be going on there ?

danfeng (Tue, 10 Apr 2018 01:49:26 GMT):

Clipboard - 2018年4月10日上午9点48分

danfeng (Tue, 10 Apr 2018 03:44:34 GMT):

Clipboard - 2018年4月10日中午11点44分

danfeng (Tue, 10 Apr 2018 03:49:28 GMT):
Some people?

huy.tranibm (Tue, 10 Apr 2018 03:51:39 GMT):
@danfeng , it says user1 is already registered. you'll either have to change the test user1 in end2end or restart your network to clean up the fabric-ca db and then run the end2end test again

huy.tranibm (Tue, 10 Apr 2018 03:52:19 GMT):
i think if u change the test username, you may run into other problems with the end2end test of installing/instantiating CC

danfeng (Tue, 10 Apr 2018 03:52:26 GMT):

Clipboard - 2018年4月10日中午11点52分

danfeng (Tue, 10 Apr 2018 03:52:48 GMT):
Use this command to clean up?

huy.tranibm (Tue, 10 Apr 2018 04:58:21 GMT):
./fabric.sh down

huy.tranibm (Tue, 10 Apr 2018 04:58:46 GMT):
then ./fabric.sh up to restart

xuntu (Tue, 10 Apr 2018 06:33:30 GMT):
Has joined the channel.

xuntu (Tue, 10 Apr 2018 07:06:41 GMT):
andorid

donsonZhang (Tue, 10 Apr 2018 08:28:19 GMT):
chaincodeendorsementpolicy.yaml

donsonZhang (Tue, 10 Apr 2018 08:29:18 GMT):
`identities: # list roles to be used in the policy user1: {"role": {"name": "member", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP user2: {"role": {"name": "member", "mspId": "Org2MSP"}} admin1: {"role": {"name": "admin", "mspId": "Org1MSP"}} # admin role. admin2: {"role": {"name": "admin", "mspId": "Org2MSP"}} policy: # the policy .. could have been flat but show grouping. 2-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "admin1" - signed-by: "admin2"`

donsonZhang (Tue, 10 Apr 2018 08:30:46 GMT):
when the policy set signed by admin1 and admin2 , client get err: Received invalid transaction event status 10

donsonZhang (Tue, 10 Apr 2018 08:31:11 GMT):
peer logs: signature set did not satisfy policy

donsonZhang (Tue, 10 Apr 2018 08:33:43 GMT):
I tryed client.setUserContext(user|admin|peerAdmin) , none of them can success

WarWolf89 (Tue, 10 Apr 2018 08:53:22 GMT):
Has joined the channel.

kiattchaip (Tue, 10 Apr 2018 09:07:33 GMT):
@donsonZhang The user context is used as a creator of a transaction and it is nothing to do with the endorsement policy. The transaction need to be sent to and signed by the number of peers (endorsers) depending on the endorsement policy to make it valid. However, I don't know how to assign role (member or admin) to the peer. I have asked this question at stackoverflow but it has not been answered.

chenxl (Tue, 10 Apr 2018 10:04:35 GMT):
Has joined the channel.

chenxl (Tue, 10 Apr 2018 10:05:20 GMT):
I use fabric-sdk-java channel.sendTransaction(successful), the time cost 10 seconds ervery time?

chenxl (Tue, 10 Apr 2018 10:05:32 GMT):
[10/04/18 06:01:38:038 CST] main DEBUG sdk.Orderer: Order.sendTransaction name: orderer.example.com, url: grpc://192.168.44.163:7050 [10/04/18 06:01:47:047 CST] grpc-default-executor-0 DEBUG sdk.OrdererClient: resp status value: 200, resp: SUCCESS [10/04/18 06:01:47:047 CST] main DEBUG sdk.OrdererClient: Done waiting for reply! Got:status: SUCCESS

chenxl (Tue, 10 Apr 2018 10:06:12 GMT):
what's happened?

chenxl (Tue, 10 Apr 2018 10:10:08 GMT):
V1.1.0-ALPHA

chenxl (Tue, 10 Apr 2018 10:11:21 GMT):
and v1.0.0 has no this problem

rickr (Tue, 10 Apr 2018 11:54:32 GMT):
@chenxl I don't know if it will address your issue but consider using 1.1.0-SNAPSHOT https://github.com/hyperledger/fabric-sdk-java#110-snapshot-builds

rickr (Tue, 10 Apr 2018 12:04:14 GMT):
From a recent log from a build machine which are *extremely* slow : ``` 00:09:50.393 2018-04-09 22:57:29,750 main DEBUG Orderer:143 - Order.sendTransaction name: orderer.example.com, url: grpcs://localhost:7050 00:09:51.962 2018-04-09 22:57:31,318 grpc-default-executor-0 DEBUG OrdererClient:144 - resp status value: 200, resp: SUCCESS ```

rickr (Tue, 10 Apr 2018 12:17:39 GMT):
@donsonZhang There is an example that shows endorsement policies being used .. see run demo once it should work. both peers have endorsed. do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L541 Now only one peer is endorsing and it fails ... Now do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L431 rerun and it should work because only one endorsement is then needed.

rickr (Tue, 10 Apr 2018 12:17:39 GMT):
@donsonZhang There is an example that shows endorsement policies being used .. see run demo once it should work. both peers have endorsed. do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L541 rerun Now only one peer is endorsing and it fails ... Now do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L431 rerun and it should work because only one endorsement is then needed. each time you rerun need restart fabric

rickr (Tue, 10 Apr 2018 12:17:39 GMT):
@donsonZhang There is an example that shows endorsement policies being used .. see run demo once it should work. both peers have endorsed. do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L541 rerun Now only one peer is endorsement is used and it fails ... Now do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L431 rerun and it should work because only one endorsement is then needed. each time you rerun need restart fabric

rickr (Tue, 10 Apr 2018 12:17:39 GMT):
@donsonZhang There is an example that shows endorsement policies being used .. see run demo once it should work. both peers have endorsed. do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L541 rerun Now only one peer's endorsement is used and it fails ... Now do: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/main/java/org/cr22rc/MultiDomainSample.java#L431 rerun and it should work because only one endorsement is then needed. each time you rerun need restart fabric

hzrari (Tue, 10 Apr 2018 14:15:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mp52QxkEeCtTzF3ns) @rickr I didn't had the time to check the logs peer. I had to demo my work quickly. However, I workarounded the issue. Indeed, it should be a network issue between the SDK and the peer when listening the events over the eventhub. My Java application is deployed on the same machine as the 4 peers ran by the byfn.sh. I configured the SDK (channel.addPeer) to reach the peers and the eventhub using the public DNS Name. Thus the SDK resolve the public DNS entries, to public IP addresses, go out from my Azure machine to Internet and get back to the same machine on the peers ports. As the communication is using 'grcps' protocol which seems to be a streaming protocol (I am not an expert here), the socket should be maintained. I think this is prohibited by Azure (at least in the default config). To workaround this, I put my Java application running the SDK on a docker container running on the same network as byfn.sh. Thus, my SDK resolves the peers addresses locally (to docker network), and communicate with the locally. The grcps protocol is not interrupted anymore by Azure equipment (or policy) and the problem is gone. I had also to disable my local firewall (ufw & iptables) on my Ubunut 16.04.

rickr (Tue, 10 Apr 2018 17:02:59 GMT):
Maybe this would help with that network and not co-locating your app there ? https://github.com/hyperledger/fabric-sdk-java#basic-troubleshooting

rickr (Tue, 10 Apr 2018 17:02:59 GMT):
Maybe this would help with that network and not co-locating your app there ? https://github.com/hyperledger/fabric-sdk-java#basic-troubleshooting see Firewalls, load.....

hmahidhara (Tue, 10 Apr 2018 19:13:54 GMT):
How do I use QuerySCCRequest to query a transaction by its id? I am trying to find out how I will make the call from Java SDk client

hzrari (Tue, 10 Apr 2018 20:55:05 GMT):
Ok, I plan to build another instance of my network and app. I will give it a try and let you know

donsonZhang (Wed, 11 Apr 2018 03:07:58 GMT):
@rickr i know you said, the demo chaincodeendorsementpolicy.yaml https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/40f6db99a2131d4922d25c75092ad922bbbe2005/src/test/fixture/sdkintegration/chaincodeendorsementpolicyAllMembers.yaml

donsonZhang (Wed, 11 Apr 2018 03:08:16 GMT):
in the demo,the policy is

donsonZhang (Wed, 11 Apr 2018 03:08:36 GMT):
`policy: # the policy .. could have been flat but show grouping. 2-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "*user1*" - signed-by: "*user2*"`

donsonZhang (Wed, 11 Apr 2018 03:09:03 GMT):
when the policy set signed by admin1 and admin2 , client get err: Received invalid transaction event status 10 peer logs: signature set did not satisfy policy I tryed client.setUserContext(user|admin|peerAdmin) , none of them can success

donsonZhang (Wed, 11 Apr 2018 03:09:29 GMT):
`policy: # the policy .. could have been flat but show grouping. 2-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "*admin1*" - signed-by: "*admin2*"`

donsonZhang (Wed, 11 Apr 2018 03:09:52 GMT):
the demo can work well

donsonZhang (Wed, 11 Apr 2018 03:10:07 GMT):
but when the policy set signed by admin1 and admin2 , client get err: Received invalid transaction event status 10

AbhijeetPal (Wed, 11 Apr 2018 06:39:08 GMT):
Has joined the channel.

SyneBlockChainTeam (Wed, 11 Apr 2018 07:25:54 GMT):
different chaincode

rickr (Wed, 11 Apr 2018 11:43:44 GMT):
For chaincode enforcement it's the peers that do the endorsing. The endorse as a member .

rickr (Wed, 11 Apr 2018 11:43:44 GMT):
For chaincode endorsement it's the peers that do the endorsing. The endorse as a member .

SyneBlockChainTeam (Wed, 11 Apr 2018 11:46:18 GMT):
Is there any example on chaincode invoking another chaincode to access its state?

rickr (Wed, 11 Apr 2018 11:48:55 GMT):
better asked on #fabric-chaincode-dev

markthedark (Wed, 11 Apr 2018 13:13:55 GMT):
Hello, i'm trying to connect to the fabcar example, but i'm getting ```getConfigBlock for channel mychannel failed with peer peer. Status FAILURE, details: Sending proposal to peer failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null}: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel mychannel failed with peer peer. Status FAILURE, details: Sending proposal to peer failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null}``` what exactly is the problem here? the certificates, or?

markthedark (Wed, 11 Apr 2018 13:34:30 GMT):
peer log shows: Principal deserialization failure (could not decode the PEM structure) for identity 0a.....

rickr (Wed, 11 Apr 2018 13:55:09 GMT):
life cycle ---> no mention or consideration of sdk

rickr (Wed, 11 Apr 2018 14:03:46 GMT):
need to look at usercontext and what creds/msp being used I think

markthedark (Thu, 12 Apr 2018 07:18:29 GMT):
I exported the admin certs by following the instructions from here https://stackoverflow.com/a/46540806 .. It worked fine with version 1.0, but now that i updated to 1.1 i'm getting those errors.

WarWolf89 (Thu, 12 Apr 2018 08:47:26 GMT):
Hi all, I am trying to build a very basic channel creation Java app on top of the fabcar network. When I call the .initialize() method on the channel I get this exception: ```Exception in thread "main" java.lang.NoSuchMethodError: io.netty.util.internal.ReflectionUtil.trySetAccessible(Ljava/lang/reflect/AccessibleObject;)Ljava/lang/Throwable; at io.netty.channel.nio.NioEventLoop$5.run(NioEventLoop.java:217) at java.security.AccessController.doPrivileged(Native Method) at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:210) at io.netty.channel.nio.NioEventLoop.(NioEventLoop.java:149) at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:127) at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:36) at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:84) at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:58) at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:47) at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:59) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:77) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:72) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:59) at io.grpc.netty.Utils$DefaultEventLoopGroupResource.create(Utils.java:190) at io.grpc.netty.Utils$DefaultEventLoopGroupResource.create(Utils.java:174) at io.grpc.internal.SharedResourceHolder.getInternal(SharedResourceHolder.java:104) at io.grpc.internal.SharedResourceHolder.get(SharedResourceHolder.java:74) at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.(NettyChannelBuilder.java:491) at io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:325) at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:362) at org.hyperledger.fabric.sdk.EndorserClient.(EndorserClient.java:47) at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:208) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2716) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:775) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1187) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1023) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:969) at main.java.HFJavaSDKMiddleWare.getChannel(HFJavaSDKMiddleWare.java:107) at main.java.HFJavaSDKMiddleWare.main(HFJavaSDKMiddleWare.java:53) ``` this seems to be a Netty issue, has anyone experienced anything remotely similiar? versions: fabric-java-sdk : 1.1.0 fabric : 1.1.0 netty : 4.1.17

HofmT (Thu, 12 Apr 2018 10:07:20 GMT):
Hi all, I'm creating an instatantiateProposalRequest just like in the EndtoEnd example with setFcn('init') and setArgs(new String[] {"a","100"}). However when sending the proposal to the blockchain it always keeps adding the function name to the arguments array. Inside my chaincode code I use the function: getFunctionAndParameters() in order to seperate between function name and arguments but it keeps the function name inside the arguments array. What do I forget?

BhaveshPatadiya (Thu, 12 Apr 2018 11:56:32 GMT):
Has joined the channel.

rickr (Thu, 12 Apr 2018 12:53:22 GMT):
Given the tests are running the only thing comes to mind is you don't have the right dependencies needed.

rickr (Thu, 12 Apr 2018 12:55:35 GMT):
``` io.grpc:grpc-stub:jar:1.10.0 commons-cli:commons-cli:jar:1.4 io.grpc:grpc-context:jar:1.10.0 com.google.api.grpc:proto-google-common-protos:jar:1.0.0 log4j:log4j:jar:1.2.17 com.google.protobuf:protobuf-java:jar:3.5.1 io.netty:netty-codec:jar:4.1.17.Final com.google.guava:guava:jar:19.0 io.grpc:grpc-protobuf:jar:1.10.0 org.apache.httpcomponents:httpclient:jar:4.5.5 io.grpc:grpc-protobuf-lite:jar:1.10.0 io.netty:netty-tcnative-boringssl-static:jar:2.0.7.Final org.bouncycastle:bcprov-jdk15on:jar:1.59 com.google.code.findbugs:jsr305:jar:3.0.0 org.objenesis:objenesis:jar:2.6 commons-io:commons-io:jar:2.6 io.netty:netty-transport:jar:4.1.17.Final com.google.protobuf:protobuf-java-util:jar:3.5.1 commons-codec:commons-codec:jar:1.10 org.bouncycastle:bcpkix-jdk15on:jar:1.59 io.netty:netty-buffer:jar:4.1.17.Final org.miracl.milagro.amcl:milagro-crypto-java:jar:0.1.0 org.apache.commons:commons-math3:jar:3.6.1 com.google.code.gson:gson:jar:2.7 io.netty:netty-codec-http:jar:4.1.17.Final io.netty:netty-common:jar:4.1.17.Final org.yaml:snakeyaml:jar:1.20 org.hamcrest:hamcrest-core:jar:1.3:test io.opencensus:opencensus-api:jar:0.11.0 javax.json:javax.json-api:jar:1.1.2 junit:junit:jar:4.12:test io.netty:netty-handler:jar:4.1.17.Final commons-logging:commons-logging:jar:1.2 org.apache.commons:commons-compress:jar:1.16.1 io.opencensus:opencensus-contrib-grpc-metrics:jar:0.11.0 io.netty:netty-resolver:jar:4.1.17.Final org.glassfish:javax.json:jar:1.1.2 com.google.errorprone:error_prone_annotations:jar:2.1.2 io.netty:netty-handler-proxy:jar:4.1.17.Final io.grpc:grpc-core:jar:1.10.0 org.apache.httpcomponents:httpcore:jar:4.4.9 io.netty:netty-codec-socks:jar:4.1.17.Final io.netty:netty-codec-http2:jar:4.1.17.Final org.apache.httpcomponents:httpmime:jar:4.5.5:test io.grpc:grpc-netty:jar:1.10.0 ```

rickr (Thu, 12 Apr 2018 12:55:35 GMT):
``` com.google.api.grpc:proto-google-common-protos:jar:1.0.0 com.google.code.findbugs:jsr305:jar:3.0.0 com.google.code.gson:gson:jar:2.7 com.google.errorprone:error_prone_annotations:jar:2.1.2 com.google.guava:guava:jar:19.0 com.google.protobuf:protobuf-java-util:jar:3.5.1 com.google.protobuf:protobuf-java:jar:3.5.1 commons-cli:commons-cli:jar:1.4 commons-codec:commons-codec:jar:1.10 commons-io:commons-io:jar:2.6 commons-logging:commons-logging:jar:1.2 io.grpc:grpc-context:jar:1.10.0 io.grpc:grpc-core:jar:1.10.0 io.grpc:grpc-netty:jar:1.10.0 io.grpc:grpc-protobuf-lite:jar:1.10.0 io.grpc:grpc-protobuf:jar:1.10.0 io.grpc:grpc-stub:jar:1.10.0 io.netty:netty-buffer:jar:4.1.17.Final io.netty:netty-codec-http2:jar:4.1.17.Final io.netty:netty-codec-http:jar:4.1.17.Final io.netty:netty-codec-socks:jar:4.1.17.Final io.netty:netty-codec:jar:4.1.17.Final io.netty:netty-common:jar:4.1.17.Final io.netty:netty-handler-proxy:jar:4.1.17.Final io.netty:netty-handler:jar:4.1.17.Final io.netty:netty-resolver:jar:4.1.17.Final io.netty:netty-tcnative-boringssl-static:jar:2.0.7.Final io.netty:netty-transport:jar:4.1.17.Final io.opencensus:opencensus-api:jar:0.11.0 io.opencensus:opencensus-contrib-grpc-metrics:jar:0.11.0 javax.json:javax.json-api:jar:1.1.2 junit:junit:jar:4.12:test log4j:log4j:jar:1.2.17 org.apache.commons:commons-compress:jar:1.16.1 org.apache.commons:commons-math3:jar:3.6.1 org.apache.httpcomponents:httpclient:jar:4.5.5 org.apache.httpcomponents:httpcore:jar:4.4.9 org.apache.httpcomponents:httpmime:jar:4.5.5:test org.bouncycastle:bcpkix-jdk15on:jar:1.59 org.bouncycastle:bcprov-jdk15on:jar:1.59 org.glassfish:javax.json:jar:1.1.2 org.hamcrest:hamcrest-core:jar:1.3:test org.miracl.milagro.amcl:milagro-crypto-java:jar:0.1.0 org.objenesis:objenesis:jar:2.6 org.yaml:snakeyaml:jar:1.20 ```

rickr (Thu, 12 Apr 2018 13:01:14 GMT):
@markthedark Not familiar with that sample. Update what to 1.1 ? SDK ? Fabric , both ? Looks like your certificate is not good.

rickr (Thu, 12 Apr 2018 13:01:14 GMT):
@markthedark Not familiar with that sample. Update what to 1.1 ? SDK ? Fabric , both ? Looks like your certificate is not good. Try enabling trace

rickr (Thu, 12 Apr 2018 13:01:14 GMT):
@markthedark Not familiar with that sample. Update what to 1.1 ? SDK ? Fabric , both ? Looks like your certificate is not good. Try enabling trace maybe give some insight ?

markthedark (Thu, 12 Apr 2018 13:19:22 GMT):
I've upgraded both, i'll try enabling trace and do some more tests..

rickr (Thu, 12 Apr 2018 13:22:15 GMT):
Might take it to #fabric-peer-endorser-committer ask them if the dump the certificate out in logs so that someone might figure out what if anything they're claiming is bad about it

markthedark (Thu, 12 Apr 2018 13:41:57 GMT):
thanx for the tip

shubhamvrkr (Thu, 12 Apr 2018 14:21:39 GMT):
Hi guys..tried making fabric-java-sdk v1.1 Making compatible with android ( currently only works on API >=26) https://github.com/shubhamvrkr/android-fabric-sdk

WarWolf89 (Thu, 12 Apr 2018 16:21:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KRTDKJ4ZeFCS9KvMH) @rickr thank you for the answer, it was a maven assembly issue, switching to shade solved it.

aatkddny (Thu, 12 Apr 2018 18:14:54 GMT):
I looked in the samples and didn't find it. It's entirely possible I overlooked it. This is a clarifying question... It appears that when you are installing a newer version of the chaincode - say 1.1 on top of 1.0 - that at the point where you would instantiate it if it were the first time, you need to check that the name matches - and only the name (ignoring version and path) - and if (and only if) there's a match, switch from `newInstantiationProposalRequest` to `newUpgradeProposalRequest`. The reason I'm asking the clarifying question is because the checks in End2endAndBackAgainIT all seem to check the version (and optionally path). The error from fabric if you try to instantiate the 1.1 implies it only cares about the name though. Is that expected behavior?

rickr (Thu, 12 Apr 2018 20:37:55 GMT):
yes

rickr (Thu, 12 Apr 2018 20:38:49 GMT):
Only the name matters in the instantiate invoke

huy.tranibm (Fri, 13 Apr 2018 00:57:24 GMT):
@rickr what image tags for peers/orderers/ca using for SNAPSHOT?

huy.tranibm (Fri, 13 Apr 2018 00:57:37 GMT):
or which image tags are you using?

gopal_07 (Fri, 13 Apr 2018 12:05:42 GMT):
What is the difference between organization, peers and users?

gopal_07 (Fri, 13 Apr 2018 12:05:42 GMT):
What is the relation between organization, peers and users?

rickr (Fri, 13 Apr 2018 13:20:25 GMT):
@huy.tranibm https://github.com/hyperledger/fabric-sdk-java#latest-builds-of-fabric-and-fabric-ca-v110

rickr (Fri, 13 Apr 2018 13:25:22 GMT):
users are in organizations. peers sort of represent an organization doing endorsing proposals for it - is _my simplistic_ view. I'd hope Fabric project would have some documentation explaining the basic concepts. ask on #fabric-questions

huy.tranibm (Fri, 13 Apr 2018 16:11:31 GMT):
thanks rick

maxd001 (Fri, 13 Apr 2018 18:35:39 GMT):
hi All - I am getting the following error when trying to reconstruct a channel. I have my java SDK running on a win machine and fabric network is running on a VirtualBox (on the same host). 'ERROR org.hyperledger.fabric.sdk.Channel - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=null, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: lcalhost/0:0:0:0:0:0:0:1:7051'

maxd001 (Fri, 13 Apr 2018 18:36:19 GMT):
I have port forwarding setup from my windows host to the VirtualBox and curl to localhost:7051 returns binary response

maxd001 (Fri, 13 Apr 2018 18:36:51 GMT):
Anyone can suggest any ideas as to what issue might be or how to go about debugging it?

rickr (Fri, 13 Apr 2018 19:09:22 GMT):
could `lcalhost/0:0:0:0:0:0:0:1:7051` instead of `localhost/0:0:0:0:0:0:0:1:7051` have anything to do with it ?

rickr (Fri, 13 Apr 2018 19:11:04 GMT):
or maybe just `localhost:7051` ?

maxd001 (Fri, 13 Apr 2018 20:43:00 GMT):
sorry that's just me re-typing what I see on the other screen

maxd001 (Fri, 13 Apr 2018 20:43:49 GMT):
The values, from what I can gather are read from TestConfig.java

maxd001 (Fri, 13 Apr 2018 20:43:55 GMT):
peer0.org1.example.com@grpc://localhost:7051

maxd001 (Fri, 13 Apr 2018 20:44:16 GMT):
I assume the 0:0:0:... is inserted by the framework as part of gRPC communication

lmars (Sat, 14 Apr 2018 04:37:49 GMT):
@maxd001 is there TLS enabled on peer0?

bdu 5 (Sat, 14 Apr 2018 20:59:33 GMT):
Has joined the channel.

asharora78 (Mon, 16 Apr 2018 07:53:25 GMT):
I have a simple fabric network setup which is easily accesible by Node SDK, however when I am trying to access it through a simpla Java program I am getting following exception, any help would be appreciated

asharora78 (Mon, 16 Apr 2018 07:53:25 GMT):
I have a simple fabric network setup which is easily accesible by Node SDK, however when I am trying to access it through a simpla Java program I am getting following exception, any help would be appreciated ERROR OrdererClient - Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:282) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:172) at org.hyperledger.fabric.sdk.Channel.seekBlock(Channel.java:1198) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1274) at org.hyperledger.fabric.sdk.Channel.getLastConfigIndex(Channel.java:1097) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:1028) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:949) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:676) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.getChannel(HFJavaSDKBasicExample.java:128) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.main(HFJavaSDKBasicExample.java:71)

asharora78 (Mon, 16 Apr 2018 07:53:25 GMT):
I have a simple fabric network setup which is easily accesible by Node SDK, however when I am trying to access it through a simpla Java program I am getting following exception, any help would be appreciated ERROR OrdererClient - Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:282) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:172) at org.hyperledger.fabric.sdk.Channel.seekBlock(Channel.java:1198) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1274) at org.hyperledger.fabric.sdk.Channel.getLastConfigIndex(Channel.java:1097) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:1028) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:949) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:676) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.getChannel(HFJavaSDKBasicExample.java:128) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.main(HFJavaSDKBasicExample.java:71)

asharora78 (Mon, 16 Apr 2018 07:53:25 GMT):
I have a simple fabric network setup which is easily accesible by Node SDK, however when I am trying to access it through a simpla Java program I am getting following exception, any help would be appreciated ERROR OrdererClient - Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:282) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:172) at org.hyperledger.fabric.sdk.Channel.seekBlock(Channel.java:1198) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1274) at org.hyperledger.fabric.sdk.Channel.getLastConfigIndex(Channel.java:1097) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:1028) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:949) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:676) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.getChannel(HFJavaSDKBasicExample.java:128) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.main(HFJavaSDKBasicExample.java:71)

asharora78 (Mon, 16 Apr 2018 07:53:25 GMT):
I have a simple fabric network setup which is easily accesible by Node SDK, however when I am trying to access it through a simpla Java program I am getting following exception, any help would be appreciated ERROR OrdererClient - Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000 at org.hyperledger.fabric.sdk.OrdererClient.sendDeliver(OrdererClient.java:282) at org.hyperledger.fabric.sdk.Orderer.sendDeliver(Orderer.java:172) at org.hyperledger.fabric.sdk.Channel.seekBlock(Channel.java:1198) at org.hyperledger.fabric.sdk.Channel.getLatestBlock(Channel.java:1274) at org.hyperledger.fabric.sdk.Channel.getLastConfigIndex(Channel.java:1097) at org.hyperledger.fabric.sdk.Channel.getConfigurationBlock(Channel.java:1028) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:949) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:676) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.getChannel(HFJavaSDKBasicExample.java:128) at lkolisko.hyperledger.example.HFJavaSDKBasicExample.main(HFJavaSDKBasicExample.java:71)

szlaci1983 (Mon, 16 Apr 2018 12:34:34 GMT):
hi guys, just a quick question: we would like to use Java or Node SDK for our project. The main part of the system is written in Java so the easiest solution would be to use the java sdk, however it seems it is not as developed a the Node one. What do you guys think?

aatkddny (Mon, 16 Apr 2018 12:44:08 GMT):
well it doesn't have a ui and the manual is mostly follow the code, but it's certainly functional. So are you asking if it's as slick as the node version - no. does it do everything you need to interact with a fabric - yes. or at least it does everything we need it to in the application we have running. does that help?

aatkddny (Mon, 16 Apr 2018 12:44:08 GMT):
well it doesn't have a ui and the manual is mostly follow the code, but it's certainly functional. So are you asking if it's as slick as the node version - no. does it do everything you need to interact with a fabric - yes. or at least it does everything we need it to in the application we have running. does that help?

szlaci1983 (Mon, 16 Apr 2018 12:57:35 GMT):
thanks @aatkddny . Yepp I am mostly interested about functionality. and if it is deveoped in parallel with the Node version, or is it behind in terms of functionality?

aatkddny (Mon, 16 Apr 2018 13:01:17 GMT):
you'd have to ask the guys that develop it. it seems to keep pace with HL releases afaict - but I've only used it for 1.0 and 1.1.

szlaci1983 (Mon, 16 Apr 2018 13:03:19 GMT):
ok thanks @aatkddny

rickr (Mon, 16 Apr 2018 13:21:03 GMT):
From a functionality of working with Fabric there is nothing I know of that the JSDK doesn't do that Node SDK does. Outside of that the JSDK does not provide persistence that is left to the application. Given that there are so many persistent technologies to do it right (technology persistent agnostic, not enforce any schema) would mean defining numerous callback and an whole architecture/api to do so. It's just as easy for any application to do so on it's own. Having said that the Java SDK can Java serialize/deserialize channels -- I'm not certain but I don't think there's any such mechanism in the Node SDK. The JSDK when going to the orderer gives you a future/promise with now options that resolve the promise when the transaction is observed to be completed - AFAIK the node sdk leaves it to you create your own block listener. The JSDK when going to orderer or for many queries will try all orderers or peers to try to complete the request -- Last I seen the Node SDK doesn't do that. For peer eventing service the JSDK allows the definition of handler to restart the service and default will retry where it left off -- the Node SDK last I seen wont' do that it just gets the next block. There may be things the JSDK does not do that Node does that I'm not really aware of and I don't want to get in some heated debate on it. If you know that there some lacking functionality please open a JIRA for it.

rickr (Mon, 16 Apr 2018 13:21:03 GMT):
From a functionality of working with Fabric there is nothing I know of that the JSDK doesn't do that Node SDK does. Outside of that the JSDK does not provide persistence that is left to the application. Given that there are so many persistent technologies to do it right (technology persistent agnostic, not enforce any schema) would mean defining numerous callback and an whole architecture/api to do so. It's just as easy for any application to do so on it's own. Having said that the Java SDK can Java serialize/deserialize channels The JSDK does provide a trivial example in the integration tests that show it being persisted. -- I'm not certain but I don't think there's any such mechanism in the Node SDK. The JSDK when going to the orderer gives you a future/promise with now options that resolve the promise when the transaction is observed to be completed - AFAIK the node sdk leaves it to you create your own block listener. The JSDK when going to orderer or for many queries will try all orderers or peers to try to complete the request -- Last I seen the Node SDK doesn't do that. For peer eventing service the JSDK allows the definition of handler to restart the service and default will retry where it left off -- the Node SDK last I seen wont' do that it just gets the next block. There may be things the JSDK does not do that Node does that I'm not really aware of and I don't want to get in some heated debate on it. If you know that there some lacking functionality please open a JIRA for it.

rickr (Mon, 16 Apr 2018 13:37:34 GMT):
I will say.. from a testing perspective the Node SDK has more thoroughly flushed out -- because it's used by hypleger composer and I know there is a lot of resources to make sure that is working --- even to the fact that it was more important to have Node CC supported while Java CC is still just experimental!

rickr (Mon, 16 Apr 2018 13:37:34 GMT):
I will say.. from a testing perspective the Node SDK has more thoroughly flushed out -- because it's used by hypleger composer and I know there is a lot of resources to make sure that is working --- even to the fact that it was more important to have Node CC supported while Java CC is still just experimental! Thus far, I have not seen significant issues raised on the JSDK.. either it's perfect or probably no one is using it :wink:

rickr (Mon, 16 Apr 2018 13:37:34 GMT):
I will say.. from a testing perspective the Node SDK has been more thoroughly flushed out -- because it's used by hypleger composer and I know there is a lot of resources to make sure that is working --- even to the fact that it was more important to have Node CC supported while Java CC is still just experimental! Thus far, I have not seen significant issues raised on the JSDK.. either it's perfect or probably no one is using it :wink:

aatkddny (Mon, 16 Apr 2018 14:48:15 GMT):
the bar to entry is higher.

szlaci1983 (Mon, 16 Apr 2018 15:15:09 GMT):
thanks @rickr next is: hands up who is using JSDK :D

rickr (Mon, 16 Apr 2018 15:23:44 GMT):
`The bar to entry is higher.` How so? I think it depends heavily on your skill and maybe how you can learn. I know of people who have followed the README.md , They know Java/ an IDE / maven and the basics of Fabric. Is that too high of a bar to ask for? They got their environment up and running in minutes and validate the the integration test were working. Then took the time in a IDE debugger to look at those examples/ I've heard about four hours to walk through the integration examples. After that they were pretty much ready to take the code from those and get their apps working.

aatkddny (Mon, 16 Apr 2018 15:31:53 GMT):
` I think it depends heavily on your skill and maybe how you can learn ` <- doesn't that pretty much define the bar to entry?

aatkddny (Mon, 16 Apr 2018 15:31:53 GMT):
` I think it depends heavily on your skill and maybe how you can learn ` <- doesn't that pretty much define the bar to entry? You can do something in composer almost instantly, knowing nothing. Here there's a certain bar you need to meet before you can do the same.

aatkddny (Mon, 16 Apr 2018 15:31:53 GMT):
` I think it depends heavily on your skill and maybe how you can learn ` <- doesn't that pretty much define the bar to entry? You can do something in composer almost instantly, knowing nothing. They gave you a UI and a ton of pretty manuals to hand hold you through the process. Here there's a certain bar you need to meet before you can do the same.

aatkddny (Mon, 16 Apr 2018 15:31:53 GMT):
` I think it depends heavily on your skill and maybe how you can learn ` <- doesn't that pretty much define the bar to entry? You can do something in composer almost instantly, knowing nothing. They gave you a UI and a ton of pretty manuals to hand hold you through the process. Here there's a certain bar you need to meet before you can do the same. You'll note I didn't say it was too high, just higher...

rickr (Mon, 16 Apr 2018 15:40:52 GMT):
I don't think that's a fair comparison at all. Compare both SDKs. Not some UI code generator on top of one and an SDK. Also provide a whole team for a Java Composer equivalent and then compare those.

rickr (Mon, 16 Apr 2018 15:55:33 GMT):
BTW not to knock composer at all. It's probable a GREAT interface and yes gives you a much better _initial experience_ working with Fabric. However, it's my own *general* experience that all of these code/generates work great at first but when the _rubber hits the road_ and you get more requirements for what you're doing you find what it creates won't easily meet that your left with a bunch of code that you know little of and can't really maintain or improve upon what the `framework` allows you.

rickr (Mon, 16 Apr 2018 15:55:33 GMT):
BTW not to knock composer at all. It's probable a GREAT interface and yes gives you a much better _initial experience_ working with Fabric. However, it's my own *general* experience that all of these code/generators work great at first but when the _rubber hits the road_ and you get more requirements for what you're doing you find what it creates won't easily meet that your left with a bunch of code that you know little of and can't really maintain or improve upon what the `framework` allows you.

huy.tranibm (Mon, 16 Apr 2018 15:56:57 GMT):
i learned through the NODE sdk examples

huy.tranibm (Mon, 16 Apr 2018 15:57:08 GMT):
took those steps and applied it to Java sdk

huy.tranibm (Mon, 16 Apr 2018 15:59:06 GMT):
but rick is right, best way to learn without a manual is debug, but even with a manual, how many would really read through it?

rickr (Mon, 16 Apr 2018 16:05:29 GMT):
Exactly. How many come here asking questions that are blatantly obvious they haven't spent the ten minutes tops to read through the README.md. So what's the hope they'll what to spend that on reading a manual that may take a day or possible two? :scream:

rickr (Mon, 16 Apr 2018 16:05:29 GMT):
Exactly. How many come here asking questions that are blatantly obvious they haven't spent the ten minutes tops to read through the README.md. So what's the hope they'll want to spend that on reading a manual that may take a day or possible two? :scream:

maxd001 (Mon, 16 Apr 2018 16:55:00 GMT):
@lmars, thanks. I've disabled TLS on peer0 and SDK is now able to connect. Any idea why would TLS prevent connectivity between host and the guest OSs?

rickr (Mon, 16 Apr 2018 16:57:47 GMT):
So TLS was enabled on both sides and then you disabled them both and it worked ?

rickr (Mon, 16 Apr 2018 17:02:32 GMT):
Also I've never seen logs or output like ``localhost/0:0:0:0:0:0:0:1:7051`` what generally is displayed in just the logs is ```loc

rickr (Mon, 16 Apr 2018 17:02:32 GMT):
Also I've never seen logs or output like ``localhost/0:0:0:0:0:0:0:1:7051`` what generally is displayed in just the logs is `grpc://localhost:7051`

rickr (Mon, 16 Apr 2018 17:15:41 GMT):
@asharora78 Doesn't look like the sdk is current from that stacktrace .. How about sharing what version of the SDK and Fabric you're using might be helpful. What was on the Orderer did you look at that ?

asharora78 (Mon, 16 Apr 2018 17:50:48 GMT):
@rickr java sdk version is 1.0.1, fabric version is 1.0 and I specifically put up orderer logs in follow mode and didn't see any request coming there.....:(

rickr (Mon, 16 Apr 2018 17:58:03 GMT):
Probably should put at least the Orderer in debug mode the JSDK has that set on it's docker-compose by default. In the readme.md too. You can also put the SDK into trace mode it's documented too. Maybe helpful

rickr (Mon, 16 Apr 2018 18:00:03 GMT):
Another option is to use the latest SDK it should be backward compatible

asharora78 (Mon, 16 Apr 2018 18:07:19 GMT):
@rickr - Orderer is in debug mode, I have following property set in compose file ORDERER_GENERAL_LOGLEVEL=debug, however I didn't see any log coming up when I ran java program, let me try putting SDK in trace mode if that doesn't work ... then would upgrade SDK version if it still doesn't work, would come back to you....however I thought this error " ERROR OrdererClient - Channel mychannel sendDeliver time exceeded for orderer orderer.gsa.com, timed out at 10000" might be saying something obvious which I am not able to see :(

rickr (Mon, 16 Apr 2018 18:10:05 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/d75fe66dd72240284b2a6be5927091728b662453/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L53 ?

rickr (Mon, 16 Apr 2018 18:10:34 GMT):
try to up that .. though 10 sec seems excessive.

asharora78 (Mon, 16 Apr 2018 18:11:19 GMT):
It was initially set to 3 sec, I thought it was less so I added property with 10 seconds

rickr (Mon, 16 Apr 2018 18:13:50 GMT):
Try to up it to a minute ... just for the _fun of it_

asharora78 (Mon, 16 Apr 2018 18:14:01 GMT):
sure :)

lmars (Mon, 16 Apr 2018 18:25:25 GMT):
@maxd001, you should configure TLS on client side before use. Please, see for example: https://github.com/hyperledger/fabric-sdk-java/blob/11bd160a95fa8529d93582ec68556bb1c4652c21/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L289

aatkddny (Tue, 17 Apr 2018 00:26:54 GMT):
Anyone have an example of configuring the HFCAClient to use TLS on the CA? I thought it was as simple as setting up the Properties like this (so the same as for a channel). Ignore the getters - this is from a persisted definition. ``` Properties p = new Properties(); if (ca.getProtocol().equals(Protocol.HTTPS)) { p.put("sslProvider", ca.getSslProvider()); p.put("hostnameOverride", ca.getName()); p.put("negotiationType", ca.getNegotiationType()); p.put("pemBytes", Encryption.base64Decode(ca.getPemBytes())); } ``` But it doesn't seem to work. The PEM here is the CA cert in the org directory (ca-{org}-cert.com. It's set in the CA compose. Name is the domain name - which is the same as for a peer. My error is: o.hyperledger.fabric_ca.sdk.HFCAClient : Certificate for doesn't match any of the subject alternative names: [] I'm sure it's something stupid, but figuring our what the stupid thing I did is will be easier with a working example to compare against.

aatkddny (Tue, 17 Apr 2018 00:26:54 GMT):
Anyone have an example of configuring the HFCAClient to use TLS on the CA? I thought it was as simple as setting up the Properties in the newInstance like this (so the same as for a channel). Ignore the getters - this is from a persisted definition. ``` Properties p = new Properties(); if (ca.getProtocol().equals(Protocol.HTTPS)) { p.put("sslProvider", ca.getSslProvider()); p.put("hostnameOverride", ca.getName()); p.put("negotiationType", ca.getNegotiationType()); p.put("pemBytes", Encryption.base64Decode(ca.getPemBytes())); } ``` But it doesn't seem to work. The PEM here is the CA cert in the org directory (ca-{org}-cert.com. It's set in the CA compose. Name is the domain name - which is the same as for a peer. My error is: o.hyperledger.fabric_ca.sdk.HFCAClient : Certificate for doesn't match any of the subject alternative names: [] I'm sure it's something stupid, but figuring our what the stupid thing I did is will be easier with a working example to compare against.

huy.tranibm (Tue, 17 Apr 2018 00:33:38 GMT):
@aatkddny the updated snapshot takes care of it

huy.tranibm (Tue, 17 Apr 2018 00:33:49 GMT):
manually adding the pem is no long required

huy.tranibm (Tue, 17 Apr 2018 00:35:55 GMT):
but that still doesn't explain your error

aatkddny (Tue, 17 Apr 2018 00:36:05 GMT):
i have a self hosted network. i'm not using the configuration.

huy.tranibm (Tue, 17 Apr 2018 00:37:19 GMT):
you generated your own certs from configtx.yaml?

aatkddny (Tue, 17 Apr 2018 00:38:33 GMT):
yes

huy.tranibm (Tue, 17 Apr 2018 00:38:34 GMT):
i think its your certs not matching up, your code looks fine

huy.tranibm (Tue, 17 Apr 2018 00:38:55 GMT):
Oh wait what is getSslProvider?

huy.tranibm (Tue, 17 Apr 2018 00:39:16 GMT):
HFCAClient has its own setupSSL() method

aatkddny (Tue, 17 Apr 2018 00:39:43 GMT):
i get that. but i'm not seeing why not. i figured localhost in the alternate names would suffice here for this test. sslprovider is the usual "openSSL".

huy.tranibm (Tue, 17 Apr 2018 00:41:15 GMT):
this is mines

huy.tranibm (Tue, 17 Apr 2018 00:41:18 GMT):
``` /** Private method to use connection for tls or not * TODO Deprecated, 1.1 added support for fabric-ca tls extraction * **/ private Properties getConnectionProperties(CAInfo ca) { //Create property for for TLS boolean tlsOn = null != util.getPropValues("tls"); Properties tlsProp = new Properties(); Properties finalProp = new Properties(); if(tlsOn){ log.debug("Using TLS certs"); tlsProp.put("pemBytes",util.getTlsBytes().getBytes()); finalProp.putAll(tlsProp); finalProp.putAll(ca.getHttpOptions()); }else{ finalProp.putAll(ca.getHttpOptions()); } return finalProp; }```

huy.tranibm (Tue, 17 Apr 2018 00:41:40 GMT):
if i was to test locally then i'd add hostnameOverride but nothing else

aatkddny (Tue, 17 Apr 2018 00:42:08 GMT):
so you are only adding the pem. not the provider or negotiation type. let me try that.

huy.tranibm (Tue, 17 Apr 2018 00:42:15 GMT):
yup try that

huy.tranibm (Tue, 17 Apr 2018 00:42:28 GMT):
leave your hostnameOverride, i believe that's required for local

aatkddny (Tue, 17 Apr 2018 00:44:26 GMT):
didn't make a bit of difference. tried "localhost" in my hostnameoverride. also tried the actual domain in there. neither worked.

huy.tranibm (Tue, 17 Apr 2018 00:49:58 GMT):
your using docker right?

huy.tranibm (Tue, 17 Apr 2018 00:50:02 GMT):
do docker ps

huy.tranibm (Tue, 17 Apr 2018 00:50:19 GMT):
and use the fabric-ca name or endpoint

huy.tranibm (Tue, 17 Apr 2018 00:50:30 GMT):
its tricky

huy.tranibm (Tue, 17 Apr 2018 00:50:50 GMT):
its either the endpoint, or the container name

aatkddny (Tue, 17 Apr 2018 00:54:33 GMT):
yes

huy.tranibm (Tue, 17 Apr 2018 00:55:05 GMT):
try it without the hostnameOverride

huy.tranibm (Tue, 17 Apr 2018 00:58:55 GMT):
this is an example from end2end test

huy.tranibm (Tue, 17 Apr 2018 00:58:59 GMT):
```if (runningFabricCATLS) { String cert = "src/main/java/fixture/sdkintegration/e2e-2Orgs/FAB_CONFIG_GEN_VERS/crypto-config/peerOrganizations/DNAME/ca/ca.DNAME-cert.pem" .replaceAll("DNAME", domainName).replaceAll("FAB_CONFIG_GEN_VERS", FAB_CONFIG_GEN_VERS); File cf = new File(cert); if (!cf.exists() || !cf.isFile()) { throw new RuntimeException("TEST is missing cert file " + cf.getAbsolutePath()); } Properties properties = new Properties(); properties.setProperty("pemFile", cf.getAbsolutePath()); properties.setProperty("allowAllHostNames", "true"); //testing environment only NOT FOR PRODUCTION! sampleOrg.setCAProperties(properties); }```

huy.tranibm (Tue, 17 Apr 2018 00:59:12 GMT):
try the "allowAllHostNames" to true property

huy.tranibm (Tue, 17 Apr 2018 00:59:18 GMT):
and leave out hostnameOverride

aatkddny (Tue, 17 Apr 2018 00:59:34 GMT):
well yes but that sort of defeats the purpose :)

huy.tranibm (Tue, 17 Apr 2018 01:00:05 GMT):
interesting!

aatkddny (Tue, 17 Apr 2018 01:00:29 GMT):
has to be the container name - it's the only one that wasn't tried.

aatkddny (Tue, 17 Apr 2018 01:01:00 GMT):
let me reconstitute the network and try that.

huy.tranibm (Tue, 17 Apr 2018 01:01:00 GMT):
``` private void setUpSSL() throws InvalidArgumentException { if (cryptoPrimitives == null) { try { cryptoPrimitives = new CryptoPrimitives(); cryptoPrimitives.init(); } catch (Exception e) { throw new InvalidArgumentException(e); } } if (isSSL && null == registry) { if (properties.containsKey("pemBytes") && properties.containsKey("pemFile")) { throw new InvalidArgumentException("Properties can not have both \"pemBytes\" and \"pemFile\" specified. "); } try { if (properties.containsKey("pemBytes")) { byte[] pemBytes = (byte[]) properties.get("pemBytes"); cryptoPrimitives.addCACertificateToTrustStore(pemBytes, pemBytes.toString()); } else { String pemFile = properties.getProperty("pemFile"); if (pemFile != null) { cryptoPrimitives.addCACertificateToTrustStore(new File(pemFile), pemFile); } } SSLContext sslContext = SSLContexts.custom() .loadTrustMaterial(cryptoPrimitives.getTrustStore(), null) .build(); ConnectionSocketFactory sf; if (null != properties && "true".equals(properties.getProperty("allowAllHostNames"))) { AllHostsSSLSocketFactory msf = new AllHostsSSLSocketFactory(cryptoPrimitives.getTrustStore()); msf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); sf = msf; } else { sf = new SSLConnectionSocketFactory(sslContext); } registry = RegistryBuilder.create() .register("https", sf) .register("http", new PlainConnectionSocketFactory()) .build(); } catch (Exception e) { logger.error(e); throw new InvalidArgumentException(e); } } }```

huy.tranibm (Tue, 17 Apr 2018 01:01:47 GMT):
HFCAClient.setupSsl() doesn't seem to use any other properties than pemBytes, pemFile, and allowAllHostNames

aatkddny (Tue, 17 Apr 2018 01:13:08 GMT):
hmm. wonder if that explains my bmx problem - the one where i have to hardcode the actual server openssl showcerts values into the pem for the ca when i do a loadfromconfig.

huy.tranibm (Tue, 17 Apr 2018 01:25:18 GMT):
@aatkddny i had a different workaround then yours

huy.tranibm (Tue, 17 Apr 2018 01:26:19 GMT):
out of the 4 provided certs, i eliminated the 3 certs that it didn't need and left the one the handshake needed

aatkddny (Tue, 17 Apr 2018 02:30:20 GMT):
interesting - allowallhostnames doesn't work for me either.

donsonZhang (Tue, 17 Apr 2018 03:28:24 GMT):
is there a example to show add org3 into fabric network by use java sdk

donsonZhang (Tue, 17 Apr 2018 03:28:30 GMT):
is there a example to show add org3 into fabric network by use java sdk

donsonZhang (Tue, 17 Apr 2018 03:28:32 GMT):
is there a example to show add org3 into fabric network by use java sdk

lanic (Tue, 17 Apr 2018 04:38:31 GMT):
Has joined the channel.

QwertyJack (Tue, 17 Apr 2018 08:16:01 GMT):
help about fabric-sample.

QwertyJack (Tue, 17 Apr 2018 08:16:36 GMT):
java-sdk recieves 403 after `generate` at fabric-sample/fasic-network

Clod16 (Tue, 17 Apr 2018 09:51:14 GMT):
Has joined the channel.

samkolli (Tue, 17 Apr 2018 10:49:21 GMT):
Has joined the channel.

samkolli (Tue, 17 Apr 2018 10:58:35 GMT):
I am working with the Java SDK (v.1.1.0-alpha) to bring up a fabric network and got a question regarding Channel Initialization. In the java code from the channel initialize function, we call the parseConfigBlock func, which in turn calls the getConfigBlock, which uses a randomly selected peer (which is given by the getRandomPeer func). And eventually, we call the sendProposalToPeers function as part of channel initialization. When there are multiple MSPs involved, how do we ensure that the peer returned by the getRandomPeer function has the same MSP as the userContext used in the HFClient when calling the sendProposalToPeers? Is there a relevance to using a randomly selected peer? In other words, if I can tell the channel initialize function to use a specific peer, is there anything incorrect in doing so? More detail: My Scenario: In my code, I am doing this (for simplicity, assuming multiple org, with each org having its own MSP and each org having one peer) : ` for (FabricOrg org : myOrganizationCollection) { setup-hfclient-with-org-msp-usercontext Peer peer = define-org-peer-using-hfClient.newPeer(...) mychannel.joinPeer(peer) } if (myChannel is not initialized) { myChannel.initialize() } ` As you can see, when I call myChannel.initialize(), the hfClient's user context would be the user context of the last organization from the myOrganizationCollection; however, since initialize func uses a randomPeer, the MSP from hfClient UserContext may not match the random Peer's MSP. As a test, I ended up modifying the sdk code to use a specific peer supplied by me, which works, but Is there a correct way to do this?

samkolli (Tue, 17 Apr 2018 10:58:35 GMT):
I am working with the Java SDK (v.1.1.0-alpha) to bring up a fabric network and got a question regarding Channel Initialization. In the java code from the channel initialize function, we call the parseConfigBlock func, which in turn calls the getConfigBlock, which uses a randomly selected peer (which is given by the getRandomPeer func). And eventually, we call the sendProposalToPeers function as part of channel initialization. When there are multiple MSPs involved, how do we ensure that the peer returned by the getRandomPeer function has the same MSP as the userContext used in the HFClient when calling the sendProposalToPeers? Is there a relevance to using a randomly selected peer? In other words, if I can tell the channel initialize function to use a specific peer, is there anything incorrect in doing so?

kiattchaip (Tue, 17 Apr 2018 11:16:36 GMT):
@samkolli The problem was fixed but it has not released yet. However, you can use the snaphot version that includes the fix.

samkolli (Tue, 17 Apr 2018 11:18:23 GMT):
oh sweet... thank you @kiattchaip ... will use the snapshot version

rickr (Tue, 17 Apr 2018 11:43:54 GMT):
@aatkddny Appears to be working when integration tests are enabled for TLS. If your url hostname of server does not match the CN of the cert from the server you'll need to add that `allowAllHostNames`. Something that shouldn't be an issue in production where that should never be the case.

rickr (Tue, 17 Apr 2018 11:43:54 GMT):
@aatkddny Appears to be working when integration tests are enabled for TLS. If your url hostname of server does not match the CN of the cert from the server you'll need to add that `allowAllHostNames` property for your HFCAClient. Something that shouldn't be an issue in production where that should never be the case.

rickr (Tue, 17 Apr 2018 11:47:31 GMT):
@donsonZhang Not a full example but here's the general idea : https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9PWkWvFBRuJLwLyZk

rickr (Tue, 17 Apr 2018 11:50:16 GMT):
@QwertyJack Too little info. Need to look at orderer and peers. Also you don't provide what version of the SDK and Fabric .. not providing to much to help out

rickr (Tue, 17 Apr 2018 11:50:16 GMT):
@QwertyJack Too little info. Need to look at orderer and peers. Also you don't provide what version of the SDK and Fabric .. not providing too much to help out

rickr (Tue, 17 Apr 2018 11:54:03 GMT):
@samkolli I see at this time no real need for that. What's gotten from the are CA certs. Those could be published in a pubic web site .

shubham_aggarwal (Tue, 17 Apr 2018 12:03:14 GMT):
Has joined the channel.

aatkddny (Tue, 17 Apr 2018 12:27:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2kB24kC2rRKKaYBts)

aatkddny (Tue, 17 Apr 2018 12:27:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2kB24kC2rRKKaYBts) I did. And there's part of my confusion because that didn't help.

aatkddny (Tue, 17 Apr 2018 12:27:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2kB24kC2rRKKaYBts) I did. And there's part of my confusion because that didn't help. I thought I did it the same as in the test - turned on --tls.enabled, used the server cert as the tls cert and connected with the same cert in pembytes. `javax.net.ssl.SSLPeerUnverifiedException: Certificate for doesn't match any of the subject alternative names: [] : Url:https://localhost:7054`

aatkddny (Tue, 17 Apr 2018 12:27:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2kB24kC2rRKKaYBts) I did. And there's part of my confusion because that didn't help. I thought I did it the same as in the test - turned on --tls.enabled, used the server cert as the tls cert and connected with the same cert in pembytes. The error is still the same though - `javax.net.ssl.SSLPeerUnverifiedException: Certificate for doesn't match any of the subject alternative names: [] : Url:https://localhost:7054`

rickr (Tue, 17 Apr 2018 12:28:24 GMT):
what's the actual error again please ?

aatkddny (Tue, 17 Apr 2018 12:30:41 GMT):
see above. was still typing and hit enter by accident. haven't got used to this new mac keyboard still.

rickr (Tue, 17 Apr 2018 12:33:38 GMT):
You have the source available to you can you I think. Can you double check in a debugger that in the HFCAClient it following the path for that property ?

rickr (Tue, 17 Apr 2018 12:33:38 GMT):
You have the source available to you I think. Can you double check in a debugger that in the HFCAClient it following the path for that property ?

rickr (Tue, 17 Apr 2018 12:36:04 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/d75fe66dd72240284b2a6be5927091728b662453/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L1358

aatkddny (Tue, 17 Apr 2018 12:42:55 GMT):
Took me a minute to rebuild. And that ladies and gentlemen is why you don't code late at night. `p.put("allowAllHostNames", true);` is not the same as `p.put("allowAllHostNames", "true");` Mea culpa. My apologies.

rickr (Tue, 17 Apr 2018 12:47:51 GMT):
That's what I expected and why I asked to look at that with a debugger :)

samkolli (Tue, 17 Apr 2018 12:56:04 GMT):
@ricj

samkolli (Tue, 17 Apr 2018 12:56:40 GMT):
@rickr ... is this message intended for me ? < I see at this time no real need for that. What's gotten from the are CA certs. Those could be published in a pubic web site .>

Yakechi (Tue, 17 Apr 2018 14:47:50 GMT):
Has joined the channel.

huy.tranibm (Tue, 17 Apr 2018 20:36:33 GMT):
:joy:

rjones (Tue, 17 Apr 2018 22:42:04 GMT):
Has joined the channel.

rjones (Tue, 17 Apr 2018 22:42:12 GMT):
I wish to make a possible controversial change to Gerrit. I'm asking all the teams that use Gerrit. May I require JIRA links in all Gerrit changes? this isn't something I can enable on a per-project basis.

rickr (Tue, 17 Apr 2018 23:43:40 GMT):
Well my feedback I'm surprised that maintainers can not be trusted to not merge a gerrit CR without there being a JIRA for it ? I'm mean if they can't do that can they really be trusted to give a reasonable code review ? Since I've been working on the JAVA sdk I have nor has anyone else merged a change that didn't have a JIRA item associated with it. So to me this looks like a solution looking for a problem to fix. Given that : I don't think the should be required for draft changes put to gerrit those should be exempt. They can't be merged till published anyway. Unlikely, but what if JIRA is out and we need to push something through ASAP (once again it seems maintainer should be able to use their discretion ) I prefer link that just have FAB-xxx then the [FAB-xxx] there's too little allowed characters on that line which is actually for a bigger issue that this. If really really needed I think the check should be on the merge just like the build verify with maintaineers being able push come to shove override.

rickr (Tue, 17 Apr 2018 23:44:28 GMT):
@rjones ^^^

rjones (Tue, 17 Apr 2018 23:45:14 GMT):
I agree with your feedback on [JIRA-NUMBER] versus JIRA-NUMBER.

rickr (Tue, 17 Apr 2018 23:45:44 GMT):
and nothing else I guess ? really where is the problem here ?

rjones (Tue, 17 Apr 2018 23:46:27 GMT):
another project puts the JIRA in the block at the bottom, which I also think is nicer, but I also think that's a style thing.

rjones (Tue, 17 Apr 2018 23:46:44 GMT):
It's easier to do a short log if the JIRA is in the first line of the commit

rickr (Tue, 17 Apr 2018 23:47:33 GMT):
Where are we seeing this as a problem ?

rickr (Tue, 17 Apr 2018 23:47:55 GMT):
Maybe some maintainers shouldn't be ?

rjones (Tue, 17 Apr 2018 23:48:15 GMT):
we aren't. Other projects have this enabled and I would like to get Hyperledger inline with other projects to make moving people from project to project easier

rjones (Tue, 17 Apr 2018 23:48:54 GMT):
(people on the LF side)

rickr (Tue, 17 Apr 2018 23:49:18 GMT):
drafts need to exempt

rickr (Tue, 17 Apr 2018 23:49:18 GMT):
drafts need to be exempt

rickr (Tue, 17 Apr 2018 23:49:29 GMT):
and why can't this be done on the merge ?

rjones (Tue, 17 Apr 2018 23:49:46 GMT):
which part on the merge?

rickr (Tue, 17 Apr 2018 23:50:03 GMT):
merge in the stream

rickr (Tue, 17 Apr 2018 23:51:19 GMT):
just like a job builder .. check the commit .. no link -1 it. Then a maintaneer has to manually remove to merge

rickr (Tue, 17 Apr 2018 23:52:54 GMT):
Have to leave now ..

LW-Ricarido (Wed, 18 Apr 2018 02:20:46 GMT):
Has joined the channel.

LW-Ricarido (Wed, 18 Apr 2018 02:22:49 GMT):
I have clong fabric-sdk-java from github. But there is not package "org.hyperledger.fabric.protos". Where can I get it?

kiattchaip (Wed, 18 Apr 2018 03:34:15 GMT):
@rickr Could we expect the SDK 1.1.0 to be released soon?

dampuero (Wed, 18 Apr 2018 07:41:35 GMT):
Has joined the channel.

hzrari (Wed, 18 Apr 2018 09:27:09 GMT):
Hello guys, is there any way to get the data of a given transaction ? Something similar to channel.queryByChaincode but by transactionId. I tried to use queryTransactionByID, but it returned a byte array for me with marker and a lot of structure stuff, I can see my data in, but I didn't find any way to parse my data. Thanks

rickr (Wed, 18 Apr 2018 11:14:19 GMT):
Returns TransactionInfo ? there's more data that needs parsing to make it easier to get to it.

rickr (Wed, 18 Apr 2018 11:15:05 GMT):
@LW-Ricarido Have the integration tests run successfully ? Look at the README.md ?

rickr (Wed, 18 Apr 2018 11:19:46 GMT):
@kiattchaip Needs more testing/ feed back. Currently master branch is 1.1.0. Applications can get it from 1.1.0-SNAPSHOT see README.MD. JSDK 1.1.0 is feature complete. There's nothing I'm aware of that doesn't support Fabric/CA 1.1.0

deepbatwayne (Wed, 18 Apr 2018 12:26:10 GMT):
Has joined the channel.

vloup (Wed, 18 Apr 2018 13:31:34 GMT):
Has joined the channel.

asaningmaxchain123 (Wed, 18 Apr 2018 16:28:06 GMT):
@rickr why the sdk to distinguish peer like endorse_peer,chaincode_query,ledger_query,event_source, if one peer join the specified channel,it has the endroser feature,if one peer install/instantiate chaincode,it can chaincode_query,ledger_query,Is this what you mean?

kiattchaip (Thu, 19 Apr 2018 03:07:04 GMT):
@rickr Thank you for the information. I am using the SDK 1.1.0-SNAPSHOT but I am just concerned about its stability. Like you said that it needs more testing.

kiattchaip (Thu, 19 Apr 2018 03:07:04 GMT):
@rickr Thank you for the information. I am using the SDK 1.1.0-SNAPSHOT but I am just concerned about its stability. Like you said that it may need more testing.

deepbatwayne (Thu, 19 Apr 2018 05:52:42 GMT):
Hi, can anyone guide me with the error while registering the chaincode for the example code. MacOS "SEVERE: Unable to connect to peer server: UNKNOWN: Error handling message, ending stream: transition canceled with error: peer will not accepting external chaincode connection name:"hello" (except in dev mode) "

deepbatwayne (Thu, 19 Apr 2018 05:53:00 GMT):
It's something around port forwarding if I am not wrong?

deepbatwayne (Thu, 19 Apr 2018 05:56:21 GMT):
"Apr 19, 2018 11:28:19 AM org.hyperledger.java.shim.ChaincodeBase$1 onError SEVERE: Unable to connect to peer server: UNIMPLEMENTED: unknown service protos.ChaincodeSupport"

hzrari (Thu, 19 Apr 2018 07:38:28 GMT):
this is what I am doing: TransactionInfo txInfo = this.channel.queryTransactionByID(transactionId); Payload p = Payload.parseFrom(txInfo.getEnvelope().getPayload()); String str = new String(p.getData().toByteArray()); BufferedReader bufReader = new BufferedReader(new StringReader(str)); But unfortunately, I didn't find any stuff in the SDK to parse the transaction data. I was hoping something like payload.getData(), and the returned datas should be structured as they are saved by chaincode... We can collaborate in the SDK of course :-) to implement that if we have the structure's doc...

huy.tranibm (Thu, 19 Apr 2018 11:59:16 GMT):
@deepbatwayne check your fabric sdk version and your network version, they need to be the same

huy.tranibm (Thu, 19 Apr 2018 12:06:30 GMT):
@hzrari did you check method blockWalker in End2endIT.java?

huy.tranibm (Thu, 19 Apr 2018 12:09:06 GMT):

Clipboard - April 19, 2018 7:09 AM

kesavants (Thu, 19 Apr 2018 20:46:45 GMT):
Has joined the channel.

kesavants (Thu, 19 Apr 2018 20:49:01 GMT):
After small period of inactivity sending transaction proposal fails with java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2191) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:2105) Caused by: java.io.IOException: Connection reset by peer Are there any settings that could cause this

luomin (Fri, 20 Apr 2018 02:00:27 GMT):
Hi, is there a planning to multi-threading the REST-API connection?

SyneBlockChainTeam (Fri, 20 Apr 2018 06:48:58 GMT):
Event listener

rickr (Fri, 20 Apr 2018 10:38:15 GMT):
load balancer in involved ? https://github.com/hyperledger/fabric-sdk-java#basic-troubleshooting

rickr (Fri, 20 Apr 2018 10:49:49 GMT):
@asaningmaxchain123 all peers should be able to handle but those are used to tell the sdk which peers to use for those functions if you want to separate the workload amount several peers.

rickr (Fri, 20 Apr 2018 10:49:49 GMT):
@asaningmaxchain123 all peers should be able to handle but those are used to tell the sdk which peers to use for those functions if you want to separate the workload amount among several peers.

hzrari (Sun, 22 Apr 2018 13:20:30 GMT):
@kesavants : Hi I had also this problem, is your SDK running on the same machine as your ordered and peers ?

amolpednekar (Mon, 23 Apr 2018 04:06:42 GMT):
@rickr When is the release version for 1.1.0 for Java SDK expected to come out?

donsonZhang (Mon, 23 Apr 2018 09:44:36 GMT):
set the anchor peer

donsonZhang (Mon, 23 Apr 2018 09:45:16 GMT):
`UpdateChannelConfiguration updateChannelConfiguration = new UpdateChannelConfiguration(new File("Org1MSPAnchors.tx")); client.setUserContext(ordererAdmin); channel.updateChannelConfiguration(updateChannelConfiguration, new byte[][]{client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin)});`

donsonZhang (Mon, 23 Apr 2018 09:45:49 GMT):
java client get the err:

donsonZhang (Mon, 23 Apr 2018 09:46:33 GMT):
`Caused by: io.grpc.StatusRuntimeException: INTERNAL: Invalid protobuf byte sequence at io.grpc.Status.asRuntimeException(Status.java:517) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:174) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:88) at io.grpc.MethodDescriptor.parseResponse(MethodDescriptor.java:265) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:530) ... 5 more Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message had invalid UTF-8. at com.google.protobuf.InvalidProtocolBufferException.invalidUtf8(InvalidProtocolBufferException.java:148) at com.google.protobuf.CodedInputStream$ArrayDecoder.readStringRequireUtf8(CodedInputStream.java:830) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse.(Ab.java:104) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse.(Ab.java:59) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse$1.parsePartialFrom(Ab.java:665) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse$1.parsePartialFrom(Ab.java:660) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:91) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parseFrom(ProtoLiteUtils.java:179) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:171) ... 8 more 17:21:32,383 ERROR OrdererClient:185 - sendTransaction error Channel mychannel, send transaction failed on orderer orderer.example.com. Reason: CANCELLED: Failed to read message.`

donsonZhang (Mon, 23 Apr 2018 09:46:54 GMT):
-----------------------------------------------------------------------------------------

donsonZhang (Mon, 23 Apr 2018 09:46:56 GMT):
the orderer err:

donsonZhang (Mon, 23 Apr 2018 09:47:22 GMT):
` because of error: error authorizing update: Update not for correct channel: " mychannel mychannelWU Application: Org1MSP/ MSP" Readers" Writers" Admins*Admins Application| Org1MSPq MSP6 AnchorPeers' peer0.org1.example.comAdmins" Writers" Admins" Readers*Admins*Admins for mychannel`

huy.tranibm (Mon, 23 Apr 2018 12:25:50 GMT):
@donsonZhang ```channel.updateChannelConfiguration(updateChannelConfiguration, new byte[][]{client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin)}); ``` should be ```channel.updateChannelConfiguration(updateChannelConfiguration,client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));```

huy.tranibm (Mon, 23 Apr 2018 12:25:50 GMT):
@donsonZhang ``channel.updateChannelConfiguration(updateChannelConfiguration, new byte[][]{client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin)});`` should be ``channel.updateChannelConfiguration(updateChannelConfiguration,client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));``

huy.tranibm (Mon, 23 Apr 2018 12:25:50 GMT):
@donsonZhang this ```channel.updateChannelConfiguration(updateChannelConfiguration, new byte[][]{client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin)});``` should be ```channel.updateChannelConfiguration(updateChannelConfiguration,client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));```

aatkddny (Mon, 23 Apr 2018 12:31:31 GMT):
So i have a question about using a fabric that's been configured and stood up. When I construct a channel, so far i've done everything manually. add the peers, add the orgs, blah blah blah.

aatkddny (Mon, 23 Apr 2018 12:31:31 GMT):
So i have a question about using a fabric that's been configured and stood up. When I construct a channel, so far i've done everything manually. add the peers, add the orgs, blah blah blah. When I use someone else's Fabric it's all "loadFromNetworkConfig" - or more accurately the one I've used is. Is the intent to switch over to this form so that I'll need to change my definitions to fit into that structure or will both types of initialization be supported in parallel?

nikolas (Mon, 23 Apr 2018 12:45:29 GMT):
Has joined the channel.

nikolas (Mon, 23 Apr 2018 12:47:26 GMT):
hi i try to go through the integration tests of the sdk to see how things work, but when i try to open the project with eclipse, it throws an error, saying the description file is corrupted. any hints?

huy.tranibm (Mon, 23 Apr 2018 12:50:36 GMT):
@aatkddny you may want to use both ways. Consider when you want to join a peer to another channel. When using loadFromNetworkConfig, the peers/orderers instances are already assigned to the channel object it came from. So when you get your peers/orderers from loadFromNetworkConfig and try to join them to another channel, you'll get an "**** is already in channel ****" error.

nikolas (Mon, 23 Apr 2018 12:51:19 GMT):
i have tried both cloning the repo and downloading/extracting the zip file of the project

rickr (Mon, 23 Apr 2018 12:54:07 GMT):
I don't see either going ways -- but there will be a third option for service discovery that will do a lot of that

rickr (Mon, 23 Apr 2018 12:54:07 GMT):
I don't see either going away -- but there will be a third option for service discovery that will do a lot of that

huy.tranibm (Mon, 23 Apr 2018 12:54:08 GMT):
@aatkddny you can get them and create a new instance of peer/orderer with a new Channel name using the existing instance variables

aatkddny (Mon, 23 Apr 2018 12:54:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KEvGtyxWvw9xKdgzW) I have two types of project. One that handles maintenance on the fabric and one that acts as a client to it. I had common code for simple things like joining a client to a channel, but if the networkconfig stuff is going to be ubiquitous i may rewrite the common to support that and have my management functions seperate.

aatkddny (Mon, 23 Apr 2018 12:54:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KEvGtyxWvw9xKdgzW) I have two types of project. One that handles maintenance on the fabric and one that acts as a client to it. I had common code for simple things like joining a client to a channel, but if the networkconfig stuff is going to be ubiquitous i may rewrite the common to support that and have my management functions seperate. That way it can become agnostic

rickr (Mon, 23 Apr 2018 13:52:38 GMT):
@nikolas don't use the zip definitely use the clone. I've not heard anyone else report an issue like that

nikolas (Mon, 23 Apr 2018 13:54:38 GMT):
hi @rickr thanks for the answer. No clue what the issue with eclipse is :( it is a fresh install on a windows 10 machine

rickr (Mon, 23 Apr 2018 13:58:09 GMT):
I don't use eclipse nor windows I seen there was checked in a .project .class files which I think shouldn't be there try to delete them Look at README.md it include some eclipse instructions

rickr (Mon, 23 Apr 2018 13:58:55 GMT):
You should import the project as a maven project

rickr (Mon, 23 Apr 2018 13:59:29 GMT):
before you do that I would see the integration tests are completing

nikolas (Mon, 23 Apr 2018 14:02:25 GMT):
i will try and will report back

nikolas (Mon, 23 Apr 2018 14:02:28 GMT):
tnx

nikolas (Mon, 23 Apr 2018 14:09:41 GMT):
@rickr after removing the .project file, at least imports successfully as maven project. so this should be out of the repo

nikolas (Mon, 23 Apr 2018 14:15:15 GMT):
are there any examples of the java sdk, using user keys & certs generated by the cryptogen tools instead of enrolling via ca?

huy.tranibm (Mon, 23 Apr 2018 16:15:20 GMT):
@nikolas its mostly all using cryptos generated from cryptogen except for when registering/enrolling user1

donsonZhang (Tue, 24 Apr 2018 03:20:33 GMT):
@huy.tranibm the`channel.updateChannelConfiguration(updateChannelConfiguration, new byte[][]{client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin)});`

donsonZhang (Tue, 24 Apr 2018 03:20:55 GMT):
is the result of build, it is the same to

donsonZhang (Tue, 24 Apr 2018 03:21:14 GMT):
` channel.updateChannelConfiguration(updateChannelConfiguration, client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));`

donsonZhang (Tue, 24 Apr 2018 03:21:53 GMT):
and my code is

donsonZhang (Tue, 24 Apr 2018 03:22:02 GMT):
`channel.updateChannelConfiguration(updateChannelConfiguration, client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));`

donsonZhang (Tue, 24 Apr 2018 03:23:41 GMT):
so my question:

donsonZhang (Tue, 24 Apr 2018 03:24:08 GMT):
`set the anchor peer `UpdateChannelConfiguration updateChannelConfiguration = new UpdateChannelConfiguration(new File("Org1MSPAnchors.tx")); client.setUserContext(ordererAdmin); channel.updateChannelConfiguration(updateChannelConfiguration, new byte[][]{client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin)});` java client get the err: `Caused by: io.grpc.StatusRuntimeException: INTERNAL: Invalid protobuf byte sequence at io.grpc.Status.asRuntimeException(Status.java:517) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:174) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:88) at io.grpc.MethodDescriptor.parseResponse(MethodDescriptor.java:265) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:530) ... 5 more Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message had invalid UTF-8. at com.google.protobuf.InvalidProtocolBufferException.invalidUtf8(InvalidProtocolBufferException.java:148) at com.google.protobuf.CodedInputStream$ArrayDecoder.readStringRequireUtf8(CodedInputStream.java:830) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse.(Ab.java:104) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse.(Ab.java:59) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse$1.parsePartialFrom(Ab.java:665) at org.hyperledger.fabric.protos.orderer.Ab$BroadcastResponse$1.parsePartialFrom(Ab.java:660) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:91) at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parseFrom(ProtoLiteUtils.java:179) at io.grpc.protobuf.lite.ProtoLiteUtils$2.parse(ProtoLiteUtils.java:171) ... 8 more 17:21:32,383 ERROR OrdererClient:185 - sendTransaction error Channel mychannel, send transaction failed on orderer orderer.example.com. Reason: CANCELLED: Failed to read message.` ----------------------------------------------------------------------------------------- the orderer err: ` because of error: error authorizing update: Update not for correct channel: " mychannel mychannelWU Application: Org1MSP/ MSP" Readers" Writers" Admins*Admins Application| Org1MSPq MSP6 AnchorPeers' peer0.org1.example.comAdmins" Writers" Admins" Readers*Admins*Admins for mychannel``

donsonZhang (Tue, 24 Apr 2018 03:24:25 GMT):
--------------------------------------------------------------------

donsonZhang (Tue, 24 Apr 2018 03:25:08 GMT):
and there anyone can set the anchor success by the java sdk ?

donsonZhang (Tue, 24 Apr 2018 03:25:13 GMT):
and there anyone can set the anchor success by the java sdk ?

donsonZhang (Tue, 24 Apr 2018 03:25:14 GMT):
and there anyone can set the anchor success by the java sdk ?

rjones (Tue, 24 Apr 2018 03:28:18 GMT):
Has left the channel.

amolpednekar (Tue, 24 Apr 2018 05:09:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wyLi9HjPtpGh8tn46) @rickr About this, dont need an exact date or something, but even an approximate idea would do, thanks! :)

amolpednekar (Tue, 24 Apr 2018 07:08:56 GMT):
Another question, in the readme, its mentioned under "Known limitations and restrictions", that "HSM not supported. JIRA FAB-3137" But according to https://jira.hyperledger.org/browse/FAB-3137, it's marked as resolved?

rickr (Tue, 24 Apr 2018 11:28:41 GMT):
I've not personally tested HSM. I do know of a group that provided some fixes and claimed they had HSM working. Most of the function's we now use are JCE/JCA. The SDK doesn't do any key management so there should be no issues with that.

amolpednekar (Tue, 24 Apr 2018 12:03:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aKyeccMaj4xJZcjhz) @rickr Thanks, are you referring to the LunaHSM group? Did they create any readme for that? Also, I'm guessing there's no concrete idea about the 1.1.0-release date

rickr (Tue, 24 Apr 2018 12:35:31 GMT):
Yup think it was Luna

asharora78 (Tue, 24 Apr 2018 12:54:46 GMT):
If I am using a two org (peer) setup and have the endorsement policy such that both peers need to endorse the transaction, then do I need to do anything extra from my client other than just sending the request to one peer, what I mean is, do I need to send transaction to both the peers and once I get back the proposal response than I need to assemble the endorsement and send the request to transaction service?

rickr (Tue, 24 Apr 2018 13:01:53 GMT):
Mostly handled for you other than tell which peers to send to and then verify that they have been endorsed and verified .. see end2end integration tests.

rickr (Tue, 24 Apr 2018 13:05:30 GMT):
You do need to specify which endorsement you want to send to the Orderer

dave.enyeart (Tue, 24 Apr 2018 13:13:30 GMT):
@rickr For the (relatively small) SDK task for side db support that I've mentioned previously, I've created Jira FAB-9680

hzrari (Tue, 24 Apr 2018 13:15:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4tMtbHw5AP6CTgvxS) @rickr indeed, I don't know the structure to parse it

asharora78 (Tue, 24 Apr 2018 13:19:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hvJZcCswvuqgNQPKM) @rickr was this response to [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qg6eFdFdpCScrNvcD)

asharora78 (Tue, 24 Apr 2018 13:19:03 GMT):
Ok, so as a client I don't have to worry about endorsement sending to Orderer, however if any transaction needs to be endorsed by multiple peers then I do need to send request proposal to each and every peer. The reason I am asking this is, I would assume that in a multi party setup every org app client would be sending request to their org peer without worrying about the other peers,

asharora78 (Tue, 24 Apr 2018 13:19:03 GMT):
Ok, that means if a new peer has been added into the channel it follows the AND endorsement policy then app client needs to be updated as well.

rickr (Tue, 24 Apr 2018 13:20:30 GMT):
y

asharora78 (Tue, 24 Apr 2018 13:31:06 GMT):
Ok, so as a client I don't have to worry about endorsement sending to Orderer, however if any transaction needs to be endorsed by multiple peers then I do need to send request proposal to each and every peer. The reason I am asking this is, I would assume that in a multi party setup every org app client would be sending request to their org peer without worrying about the other peers,

aatkddny (Tue, 24 Apr 2018 13:31:47 GMT):
yes

aatkddny (Tue, 24 Apr 2018 13:31:59 GMT):
you need to add all the peers

aatkddny (Tue, 24 Apr 2018 13:32:15 GMT):
which is both a pain and seems counterintuitive.

aatkddny (Tue, 24 Apr 2018 13:32:34 GMT):
since you need the addresses of them but there's no network discovery

asharora78 (Tue, 24 Apr 2018 13:34:07 GMT):
Ok, that means if a new peer has been added into the channel it follows the AND endorsement policy then app client needs to be updated as well.

aatkddny (Tue, 24 Apr 2018 13:35:22 GMT):
you mean the HFClient? You may need to reinitialize the channel from the top. I haven't tried just adding a peer to one that's already there. If you do I'd like to know if it works.

asharora78 (Tue, 24 Apr 2018 13:38:26 GMT):
There has been a sample with 1.1 release that lets you add a new org in a running network, so what I wanted to know was if a new peer has been added into the network by virtue of new org being added to the network and there are already app client being used to connect with network then do we need to upgrade the client as well if the newly added peer is a must to endorse the transaction

khalifa (Tue, 24 Apr 2018 13:39:37 GMT):
Has joined the channel.

aatkddny (Tue, 24 Apr 2018 13:40:59 GMT):
You will need to add it if it's an AND for the endorsement. Which was my point. I don't know if *just* adding it works. You may need to start over and re-initialize the channel from scratch.

asharora78 (Tue, 24 Apr 2018 13:44:25 GMT):
Ok, got it, would try and see if that works. And for multi peer endorsement rickr suggested that I shudl have a look at end2end integration test.

aatkddny (Tue, 24 Apr 2018 14:35:04 GMT):
this may serve better if you mean multi-org. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

anillewis (Tue, 24 Apr 2018 18:23:34 GMT):
Has joined the channel.

amolpednekar (Wed, 25 Apr 2018 05:09:52 GMT):
I was trying to get transaction creator from the queryTransactionByID(txid). it returned a value of type tranasctionInfo, then did getEnvelope(), and then did getPayload() to get a ByteString (google.protobuf) How do I convert this to a normal string? what charset to give to the method toString(CHARSET) ??

fanjianhang (Wed, 25 Apr 2018 07:11:24 GMT):
@rickr Hi, rick. I read the annotation``` //Persistence is not part of SDK. Sample file store is for demonstration purposes only! // MUST be replaced with more robust application implementation (Database, LDAP) ```

fanjianhang (Wed, 25 Apr 2018 07:15:53 GMT):
@rickr Hi, rick, i read the End2endIT code, find the below codes ``` //Persistence is not part of SDK. Sample file store is for demonstration purposes only! // MUST be replaced with more robust application implementation (Database, LDAP) ``` Here is my question, is there a sample to use Database such as MySQL, to make fabric-sdk more flexible.

rickr (Wed, 25 Apr 2018 11:06:18 GMT):
No -- Would seem simple Come up with your own schema - just save what you need to manually reconstruct. https://github.com/hyperledger/fabric-sdk-java/blob/202de7a439f144626ac93c2331c7801f32f4cbf1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L620-L684

rickr (Wed, 25 Apr 2018 11:06:18 GMT):
No -- Would seem simple Come up with your own schema - just save what you need to manually reconstruct. https://github.com/hyperledger/fabric-sdk-java/blob/202de7a439f144626ac93c2331c7801f32f4cbf1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L620-L684 Would be something someone could contribute to fabric samples

rickr (Wed, 25 Apr 2018 11:06:18 GMT):
No -- Would seem simple Come up with your own schema - just save what you need to manually reconstruct. https://github.com/hyperledger/fabric-sdk-java/blob/202de7a439f144626ac93c2331c7801f32f4cbf1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L620-L684 _Would be nice_ to have someone contribute to fabric samples project.

rickr (Wed, 25 Apr 2018 11:06:18 GMT):
No -- Would seem simple. Come up with your own schema - just save what you need to manually reconstruct. https://github.com/hyperledger/fabric-sdk-java/blob/202de7a439f144626ac93c2331c7801f32f4cbf1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L620-L684 _Would be nice_ to have someone contribute to fabric samples project.

aatkddny (Wed, 25 Apr 2018 12:32:47 GMT):
It's pretty simple if you use a document oriented database. We picked MongoDB - mostly because we are using it elsewhere so it was a good fit. One tip - if you run your crypto first and save the PEMs in your orgs, the rest of the code

aatkddny (Wed, 25 Apr 2018 12:32:47 GMT):
It's pretty simple if you use a document oriented database. We picked MongoDB - mostly because we are using it elsewhere so it was a good fit. One tip - if you run your crypto first and save the PEMs in your orgs, the rest of the code gets a lot simpler.

aatkddny (Wed, 25 Apr 2018 12:32:47 GMT):
It's pretty simple if you use a document oriented database. We picked MongoDB - mostly because we are using it elsewhere so it was a good fit. One tip - if you run your crypto first and save the PEMs in your orgs, the rest of the code gets a lot simpler. We chose to Base64 encode them to obfusticate. Since it's internal it's good enough.

rickr (Wed, 25 Apr 2018 12:38:41 GMT):
.. right all you need to do construct a NetworkConfig json file stuff it into a string .. then pull it out and reload !! LOL

aatkddny (Wed, 25 Apr 2018 12:41:03 GMT):
Actually for full disclosure we went the other way - we build the whole network from the org records - including running the cryptogens and the configtxgens and building a docker compose file for each org that participates. It's actually quite doable if you template it all out, and one touch instantiation with the ability to add an org by changing some config is a real time saver for development.

aatkddny (Wed, 25 Apr 2018 12:41:03 GMT):
Actually for full disclosure we went the other way - we build the whole network from the org records - including running the cryptogens and the configtxgens and building a docker compose file for each org that participates. It's actually quite doable if you template it all out, and one touch instantiation with the ability to add an org by changing some config is a real time saver for development. Lots of processbuilders...

sheehan (Wed, 25 Apr 2018 14:25:33 GMT):
Has joined the channel.

maxd001 (Wed, 25 Apr 2018 14:42:25 GMT):
Hi All - getting an error whilst creating container dev-peer1.org1.example.com-example_cc_go-1. The error message from peer1.org1.example.com docker log is: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package github.com/example_cc: no buildable Go source files in /chaincode/input/src/github.com/example_cc". I am not able to figure out where the path /chaincode/input/src/github.com/example_cc is referenced or where the chaincode should be deployed, i.e. does it need to be deployed on the docker instance for peer1.org1.example.com or the orderer or the java SDK side etc. Any thoughts?

mrkiouak (Wed, 25 Apr 2018 15:01:18 GMT):
Has left the channel.

maxd001 (Wed, 25 Apr 2018 17:31:36 GMT):
any suggestions/ideas anyone?

albert.lacambra (Wed, 25 Apr 2018 21:29:24 GMT):
Hi

albert.lacambra (Wed, 25 Apr 2018 21:29:32 GMT):
I am having some policies trouble

albert.lacambra (Wed, 25 Apr 2018 21:30:04 GMT):
If I have 3 peers belonging to the same company, and I want all of them endorsing a transaction,

albert.lacambra (Wed, 25 Apr 2018 21:30:13 GMT):
is the following config correct?

albert.lacambra (Wed, 25 Apr 2018 21:30:13 GMT):
identities: # list roles to be used in the policy admin1: {"role": {"name": "admin", "mspId": "dcentraMSP"}} # admin role. admin2: {"role": {"name": "admin", "mspId": "dcentraMSP"}} # admin role. admin3: {"role": {"name": "admin", "mspId": "dcentraMSP"}} # admin role. policy: # the policy .. could have been flat but show grouping. 3-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "admin1" - signed-by: "admin2" - signed-by: "admin3"

AishwaryaKudalkar (Thu, 26 Apr 2018 04:11:51 GMT):
Has joined the channel.

AishwaryaKudalkar (Thu, 26 Apr 2018 04:27:37 GMT):
Hi all, Do we have a proto file for System channel Configuration block? I could find the proto file for regular channels. Configtx.proto is the proto file for regular channels located at "fabric-sdk-java-master/src/main/proto/common/configtx.proto" Currently I'm using Hyperledger Fabric 1.0.1,is it available in newer versions?

SyneBlockChainTeam (Thu, 26 Apr 2018 07:37:39 GMT):
Can we send extra params with event generated on invoke call?

soladnet (Thu, 26 Apr 2018 10:47:29 GMT):
Has joined the channel.

amolpednekar (Thu, 26 Apr 2018 10:53:37 GMT):
@rickr Was just looking at the register API in https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L350 Has the register API accept user entered secrets not implemented yet? (like in the NodeJS sdk?) It seems to just use the one returned by the CA server

amolpednekar (Thu, 26 Apr 2018 10:53:37 GMT):
@rickr Was just looking at the register API in https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L350 Does the register API not accept enrollment secret from the sdk? (like in the NodeJS sdk?) It seems to just use the random one returned by the CA server

rickr (Thu, 26 Apr 2018 11:27:42 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/202de7a439f144626ac93c2331c7801f32f4cbf1/src/main/java/org/hyperledger/fabric_ca/sdk/RegistrationRequest.java#L97 ?

rickr (Thu, 26 Apr 2018 11:36:44 GMT):
@albert.lacambra a better example of endorcement policies is provided here https://github.com/cr22rc/fabricSDKJavaMultiDomainSample If you look through the code you'll there are comments that let you sort of _play_ with endorcements policies. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/cd7a114cebd48ff50b6ec14e47d62cf79bda9d3d/src/main/java/org/cr22rc/MultiDomainSample.java#L541

rickr (Thu, 26 Apr 2018 11:43:53 GMT):
@maxd001 Done in the SDK integration tests check them out .. Follow what's there

rickr (Thu, 26 Apr 2018 12:18:44 GMT):
@SyneBlockChainTeam If you're asking if the chaincode can do this probably better asked on #fabric-chaincode-dev

maxd001 (Thu, 26 Apr 2018 13:29:05 GMT):
Thanks @rickr, On the client side, where SDK is running, I can see _2018-04-26 09:09:28,520 main INFO InstallProposalBuilder:175 - Installing 'example_cc_go::github.com/example_cc::1' Go chaincode from directory: '/Users/maxd001/Documents/fabric/sdk-project/src/test/resources/src/github.com/example_cc' with source location: 'src/github.com/example_cc'. chaincodePath:'github.com/example_cc'_ So from this I assume that SDK is able to locate the source files successfully. But the issue I am facing seems to originate from the peer where it is trying to create an image with hyperledger/fabric-ccenv:x86-1.0.5 but it is not able to find the source files and hence crashes _2018-04-26 09:09:29.742 UTC [dockercontroller] Start -> DEBU 34e start-could not find image (contai er id ), because of ...attempt to recreate image 2018-04-26 09:09:29.743 UTC [chaincode-platform] generateDockerfile -> DEBU 34f FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_go" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 2018-04-26 09:09:29.756 UTC [util] DockerBuild -> DEBU 350 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-04-26 09:09:29.756 UTC [chaincode-platform] func1 -> ERRO 356 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no buildable Go source files in /chaincode/input/src/github.com/example_cc " _

maxd001 (Thu, 26 Apr 2018 13:29:05 GMT):
Thanks @rickr, On the client side, where SDK is running, I can see _2018-04-26 09:09:28,520 main INFO InstallProposalBuilder:175 - Installing 'example_cc_go::github.com/example_cc::1' Go chaincode from directory: '/Users/maxd001/Documents/fabric/sdk-project/src/test/resources/src/github.com/example_cc' with source location: 'src/github.com/example_cc'. chaincodePath:'github.com/example_cc'_ So from this I assume that SDK is able to locate the source files successfully. But the issue I am facing seems to originate from the peer where it is trying to create an image with hyperledger/fabric-ccenv:x86-1.0.5 but it is not able to find the source files and hence crashes _2018-04-26 09:09:29.742 UTC [dockercontroller] Start -> DEBU 34e start-could not find image (contai er id ), because of ...attempt to recreate image 2018-04-26 09:09:29.743 UTC [chaincode-platform] generateDockerfile -> DEBU 34f FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_go" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 2018-04-26 09:09:29.756 UTC [util] DockerBuild -> DEBU 350 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-04-26 09:09:29.756 UTC [chaincode-platform] func1 -> ERRO 356 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no buildable Go source files in /chaincode/input/src/github.com/example_cc "_

maxd001 (Thu, 26 Apr 2018 13:29:05 GMT):
Thanks @rickr, On the client side, where SDK is running, I can see `2018-04-26 09:09:28,520 main INFO InstallProposalBuilder:175 - Installing 'example_cc_go::github.com/example_cc::1' Go chaincode from directory: '/Users/maxd001/Documents/fabric/sdk-project/src/test/resources/src/github.com/example_cc' with source location: 'src/github.com/example_cc'. chaincodePath:'github.com/example_cc'` So from this I assume that SDK is able to locate the source files successfully. But the issue I am facing seems to originate from the peer where it is trying to create an image with hyperledger/fabric-ccenv:x86-1.0.5 but it is not able to find the source files and hence crashes `2018-04-26 09:09:29.742 UTC [dockercontroller] Start -> DEBU 34e start-could not find image (contai er id ), because of ...attempt to recreate image 2018-04-26 09:09:29.743 UTC [chaincode-platform] generateDockerfile -> DEBU 34f FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_go" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 2018-04-26 09:09:29.756 UTC [util] DockerBuild -> DEBU 350 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-04-26 09:09:29.756 UTC [chaincode-platform] func1 -> ERRO 356 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no buildable Go source files in /chaincode/input/src/github.com/example_cc "`

maxd001 (Thu, 26 Apr 2018 13:29:05 GMT):
Thanks @rickr, On the client side, where SDK is running, I can see `2018-04-26 09:09:28,520 main INFO InstallProposalBuilder:175 - Installing 'example_cc_go::github.com/example_cc::1' Go chaincode from directory: '/Users/maxd001/Documents/fabric/sdk-project/src/test/resources/src/github.com/example_cc' with source location: 'src/github.com/example_cc'. chaincodePath:'github.com/example_cc'` So from this I assume that SDK is able to locate the source files successfully. But the issue I am facing seems to originate from the peer where it is trying to create an image with hyperledger/fabric-ccenv:x86-1.0.5 but it is not able to find the source files and hence crashes 2018-04-26 09:09:29.742 UTC [dockercontroller] Start -> DEBU 34e start-could not find image (contai er id ), because of ...attempt to recreate image 2018-04-26 09:09:29.743 UTC [chaincode-platform] generateDockerfile -> DEBU 34f FROM hyperledger/fabric-baseos:x86_64-0.3.2 ADD binpackage.tar /usr/local/bin LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_go" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="GOLANG" \ org.hyperledger.fabric.version="1.0.5" \ org.hyperledger.fabric.base.version="0.3.2" ENV CORE_CHAINCODE_BUILDLEVEL=1.0.5 2018-04-26 09:09:29.756 UTC [util] DockerBuild -> DEBU 350 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.0.5 2018-04-26 09:09:29.756 UTC [chaincode-platform] func1 -*> ERRO 356 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no buildable Go source files in /chaincode/input/src/github.com/example_cc* "

rickr (Thu, 26 Apr 2018 13:42:22 GMT):
make sure you do the /fabric.sh restart and wipe out all existing CC deployments

maxd001 (Thu, 26 Apr 2018 13:46:46 GMT):
i've done ./fabric.sh restart/clean, with no effect. regarding wiping all existing CC deployments. What are the specific steps that need to be taken for this?

rickr (Thu, 26 Apr 2018 13:47:29 GMT):
k just wanted to make sure you tried that .

rickr (Thu, 26 Apr 2018 13:48:20 GMT):
I take it this is not the CC supplied by the SDK

maxd001 (Thu, 26 Apr 2018 13:59:12 GMT):
no it is the CC code that came with the SDK. what is different with my setup is that I have SDK jar imported into my project and CC structure created on one host and the fabric network setup on another host. I am also re-using TestConfig classes that came supplied with the SDK, but I have had to change the folder paths to suite my project structure.

maxd001 (Thu, 26 Apr 2018 13:59:12 GMT):
no it is the CC code that came with the SDK. what is different with my setup is that I have SDK jar imported into my project and CC structure created on one host and the fabric network setup on another host. I am also re-using TestConfig & Org/User etc. classes that came supplied with the SDK, but I have had to change the folder paths to suite my project structure.

maxd001 (Thu, 26 Apr 2018 14:00:15 GMT):
What i can't figure out is where the path /chaincode/input is being specified - it's not something I've provided. Do you know if this is something being referenced in the docker images somewhere for ccenv?

maxd001 (Thu, 26 Apr 2018 14:00:15 GMT):
What i can't figure out is where the path /chaincode/input is being specified - it's not one I've provided. Do you know if this is something being referenced in the docker images somewhere for ccenv?

rickr (Thu, 26 Apr 2018 14:10:06 GMT):
Not sure if this will help but ... if you sent env var ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR to full path to a temp dir and you have trace on it should dump a tgz file and A LOT of other stuff

rickr (Thu, 26 Apr 2018 14:11:58 GMT):
``` tar -tvf /tmp/diagdump/diagnostic_2018-04-26T14-04-07_912P10988_1_15.tgz -rw-r--r-- 0/0 5852 2018-04-11 13:38 src/github.com/example_cc/example_cc.go ```

randomp (Fri, 27 Apr 2018 02:11:50 GMT):
Has joined the channel.

maxd001 (Fri, 27 Apr 2018 10:44:01 GMT):
hmm... i've set the ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR to a full path and upped the logging to TRACE (ORG_HYPERLEDGERFABRIC_SDK_LOGLEVEL=TRACE), however no tgz was generated...

maxd001 (Fri, 27 Apr 2018 10:53:13 GMT):
however I think I figured out where the /chaincode/input is specified. As mentioned previously, it's the ccenv image that is failing to be built. ccenv image has a corresponding Dockerfile.in that has the following line ``` `RUN mkdir -p /chaincode/input /chaincode/output```` so now I am thinking that something is not quite right with the ccenv image perhaps ``` ```

maxd001 (Fri, 27 Apr 2018 10:53:13 GMT):
however I think I figured out where the /chaincode/input is specified. As mentioned previously, it's the ccenv image that is failing to be built. ccenv image has a corresponding Dockerfile.in that has the following line ``` `RUN mkdir -p /chaincode/input /chaincode/output```` so now I am thinking that something is not quite right with the ccenv image perhaps ```

maxd001 (Fri, 27 Apr 2018 10:53:13 GMT):
however I think I figured out where the /chaincode/input is specified. As mentioned previously, it's the ccenv image that is failing to be built. ccenv image has a corresponding Dockerfile.in that has the following line `RUN mkdir -p /chaincode/input /chaincode/output` so now I am thinking that something is not quite right with the ccenv image perhaps

rickr (Fri, 27 Apr 2018 13:08:55 GMT):
What version of the SDK ?

rickr (Fri, 27 Apr 2018 13:10:27 GMT):
I'm guessing that's just where the Fabric deposits the chaincode

NeerajKumar (Sat, 28 Apr 2018 14:30:37 GMT):
hey someone please tell me how to set a client certificate for providing communication access to only authorised clients for communicating with fabric blockchain??

albert.lacambra (Mon, 30 Apr 2018 11:33:20 GMT):
thx @rickr

albert.lacambra (Mon, 30 Apr 2018 11:36:25 GMT):
I see that in the polcies only MSPs are used.

albert.lacambra (Mon, 30 Apr 2018 11:36:47 GMT):
In case I would like to have several endorsments (from different peers) of the same organization using the same role, would it be possible?

albert.lacambra (Mon, 30 Apr 2018 11:37:44 GMT):
the objective is in case some server has been hacked, be able to detect it using missmatching in the endrosments

douglasthiel (Mon, 30 Apr 2018 20:29:36 GMT):
Has joined the channel.

wenjian (Tue, 01 May 2018 14:23:09 GMT):
Has joined the channel.

hihiboss (Tue, 01 May 2018 14:48:47 GMT):
Has joined the channel.

rlalgowdar (Tue, 01 May 2018 20:22:18 GMT):
Has joined the channel.

Sedmar (Wed, 02 May 2018 09:37:22 GMT):
Has joined the channel.

gravity (Wed, 02 May 2018 12:02:50 GMT):
Has joined the channel.

gravity (Wed, 02 May 2018 12:03:08 GMT):
Hello I'm trying to connect to the CA, but getting an exception: `Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:7054 [localhost/127.0.0.1] failed: Connection refused (Connection refused)` `HFCAClient hfcaClient = HFCAClient.createNewInstance("http://localhost:7054", null);` `hfcaClient.info();` Any suggestions?

gravity (Wed, 02 May 2018 12:03:08 GMT):
Hello I'm trying to connect to the CA, but getting an exception: `Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:7054 [localhost/127.0.0.1] failed: Connection refused (Connection refused)` ` HFCAClient hfcaClient = HFCAClient.createNewInstance("http://localhost:7054", null);` ` hfcaClient.info();` Any suggestions?

rickr (Wed, 02 May 2018 12:57:54 GMT):
can you telnet to the location? Was there anything in the CA logs ?

gravity (Wed, 02 May 2018 13:07:47 GMT):
@rickr `$ telnet localhost 7054` `Trying 127.0.0.1...` `telnet: Unable to connect to remote host: Connection refused` last logs from the `rca-org0.log` 2018/05/02 13:00:10 [DEBUG] Checking CSR fields to make sure that they do not exceed maximum character limits 2018/05/02 13:00:10 [DEBUG] DB: Getting identity rca-org0-admin 2018/05/02 13:00:10 [DEBUG] Finished processing sign request 2018/05/02 13:00:10 [DEBUG] DB: Getting identity rca-org0-admin 2018/05/02 13:00:10 [INFO] signed certificate with serial number 618118975243457028367356820274007323147323305032 2018/05/02 13:00:10 [DEBUG] DB: Insert Certificate 2018/05/02 13:00:10 [DEBUG] Saved serial number as hex 6c4569d8d63ca41677f67281ddd25060d85fec48 2018/05/02 13:00:10 [DEBUG] saved certificate with serial number 618118975243457028367356820274007323147323305032 2018/05/02 13:00:10 [DEBUG] Successfully incremented state for identity rca-org0-admin to 1 2018/05/02 13:00:10 [INFO] 172.21.0.6:35616 POST /enroll 201 0 "OK"

gravity (Wed, 02 May 2018 13:23:46 GMT):
@rickr 2018/05/02 13:00:09 [DEBUG] TLS Certificate: /etc/hyperledger/fabric-ca/tls-cert.pem, TLS Key: 2018/05/02 13:00:09 [DEBUG] Client authentication type requested: noclientcert 2018/05/02 13:00:09 [INFO] Listening on https://0.0.0.0:7054 `2018/05/02 13:00:09 http: TLS handshake error from 172.21.0.6:35614: EOF` this string looks suspicious

rickr (Wed, 02 May 2018 13:26:32 GMT):
I'm guessing you're trying to connect with non tls to ca expecting TLS

rickr (Wed, 02 May 2018 13:27:17 GMT):
your url has http not https

gravity (Wed, 02 May 2018 13:31:00 GMT):
could you give me a clue how to start CA without TLS or how to setup a tls connection from sdk to ca server?

troyronda (Wed, 02 May 2018 18:38:27 GMT):
Has joined the channel.

amolpednekar (Thu, 03 May 2018 03:40:57 GMT):
Easier option for now would be to start without TLS to get up & running, just set FABRIC_CA_SERVER_TLS_ENABLED flag in your compose to false

amolpednekar (Thu, 03 May 2018 03:40:57 GMT):
Easier option for now would be to start without TLS to get up & running, just set FABRIC_CA_SERVER_TLS_ENABLED flag in your docker-compose file to false

amolpednekar (Thu, 03 May 2018 03:44:36 GMT):
@rickr Any methods in the JavaSDK to modify (change password, add attributes, etc) an identity? ( like in http://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#modifying-an-identity )

hussein.knight (Thu, 03 May 2018 07:29:21 GMT):
Has joined the channel.

hussein.knight (Thu, 03 May 2018 07:34:32 GMT):
hello all need some help, i write my fabric newtork and install chaincode and i instantiate the chaincode(i use marble example but i will use later my own chaincode) so now i want to interact with the blockchain from the client(user) and query his information how can i do that? i want to write mobile app to do this but i need help to start.

SunshineHan (Thu, 03 May 2018 08:20:57 GMT):
Has joined the channel.

amolpednekar (Thu, 03 May 2018 09:22:20 GMT):
I'm using sdk 1.1.0-SNAPSHOT in eclipse, does anyone know how to attach source files so that I can directly view them in the IDE? (the previous jars had it packaged along with them)

gravity (Thu, 03 May 2018 09:34:15 GMT):
Hello is it possible to add new orgs and channel via sdk?

aatkddny (Thu, 03 May 2018 12:09:17 GMT):
yes

gravity (Thu, 03 May 2018 12:11:01 GMT):
ls

skarim (Thu, 03 May 2018 13:49:35 GMT):
@amolpednekar You can update an identity, including changing its password, by creating an HFCAIdentity object by passing the ID of the identity you want to update in it's constructor and then you can set the new password you want on this object and call the create method and it should update the identity's password.

aatkddny (Fri, 04 May 2018 01:22:43 GMT):
so i'm trying to do a roll your own connection profile - similar to the bluemix one, so I can use the code interchangeably no matter where its hosted. i'm all good apart from eventing. bluemix is throwing both the peer event and the eventhub one. mine isn't. anyone know what controls those two triggering before I go digging in the code?

aatkddny (Fri, 04 May 2018 01:29:01 GMT):
nm - found it

rickr (Fri, 04 May 2018 01:32:44 GMT):
The Java network config code will produce an eventhub if the peer has an `eventUrl` and an peer eventing service if it has a `eventSource:true` I've told the IBM Block chain for the starter option which is 1.1.0 to not put in the eventUrl but I'm sure they didn't listen

aatkddny (Fri, 04 May 2018 01:45:25 GMT):
In the config I was copying there's always an eventUrl. As an aside, the sdk load code was failing if eventUrl is null. I had to add both it to the config and open port 7053 on my peers before it worked. There's also no eventSource property anywhere in the BMX return, but I for sure get both hub and peer events there. Had to write filtering code for exactly that issue. The only thing that might be throwing mine off is when I create the channel I don't set *all* of my peers as `po.setPeerRoles(allPeerRoles());` I'd expect the ones I did to get events, but no go there. I think I'll try futzing with that to turn it on everywhere and see if that changes anything.

aatkddny (Fri, 04 May 2018 01:45:25 GMT):
In the config I was copying there's always an eventUrl. As an aside, the sdk load code was failing if eventUrl is null. I had to add both it to the config and open port 7053 on my peers before it worked. There's also no eventSource property anywhere in the BMX return, but I for sure get both hub and peer events there. Had to write filtering code for exactly that issue. That might be because if peerRoles in the PeerOptions is null it defaults to ALL though. The only thing that might be throwing mine off is when I create the channel I don't set *all* of my peers as `po.setPeerRoles(allPeerRoles());` I'd expect the ones I did to get events, but no go there. I think I'll try futzing with that to turn it on everywhere and see if that changes anything.

rickr (Fri, 04 May 2018 02:07:04 GMT):
BMX starter or enterprise plan ?

rickr (Fri, 04 May 2018 02:07:50 GMT):
and have you update (build) to get the latest SNAPSHOT ?

Getitswan (Fri, 04 May 2018 07:44:24 GMT):
Has joined the channel.

amolpednekar (Fri, 04 May 2018 09:31:00 GMT):
Do eventHubs not work with the current SNAPSHOT build? isConnected always seems to give me a "false" even after doing channel.addEventHubs(eh) & channel.initialize()

aatkddny (Fri, 04 May 2018 12:02:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=X6bkkbsPMkjf9Qpou) Enterprise is still on 1.0 afaik. This was starter because it is on 1.1.

aatkddny (Fri, 04 May 2018 12:02:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=X6bkkbsPMkjf9Qpou) Enterprise is still on 1.0 afaik. This was starter because it is on 1.1. And it's using snapshot as of about 2 weeks ago.

aatkddny (Fri, 04 May 2018 12:02:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=X6bkkbsPMkjf9Qpou) Enterprise is still on 1.0 afaik. This was starter because it is on 1.1. And it was using the snapshot as of about 2 weeks ago, which was when I last used BMX. The problem is with my fabric - I'm not getting the peer events for some reason.

aatkddny (Fri, 04 May 2018 12:02:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=X6bkkbsPMkjf9Qpou) Enterprise is still on 1.0 afaik. This was starter because it is on 1.1. And it was using the snapshot as of about 2 weeks ago, which was when I last used BMX. The problem is with my fabric - I'm not getting the peer events for some reason. That afaict is using the latest snapshot.

sbaxter (Fri, 04 May 2018 12:16:46 GMT):
Has joined the channel.

rickr (Fri, 04 May 2018 12:41:23 GMT):
fabric-sdk-java-1.1.0-20180430.125343-42.jar latest and there were fixes in that area

rickr (Fri, 04 May 2018 12:42:12 GMT):
@amolpednekar integration test pass and eventhubs are checked during it.

aatkddny (Fri, 04 May 2018 12:50:43 GMT):
I just pulled and rebuilt - I'll try it locally again.

aatkddny (Fri, 04 May 2018 12:50:43 GMT):
I just pulled source rebuilt - I'll try it locally again.

aatkddny (Fri, 04 May 2018 12:50:43 GMT):
I just pulled source and rebuilt - I'll try it locally again.

rickr (Fri, 04 May 2018 13:10:02 GMT):
There was also added a getChannelNames to find what channels can be loaded _something nice to have :) _ and I think the eventUrl should be not necessary

aatkddny (Fri, 04 May 2018 13:38:27 GMT):
Well it turns out that I have to connect all the participants to all the channels up front otherwise I miss events, something I hadn't even considered until this juncture so it was a useful exercise purely from that perspective. I turn the network config into a java object to "fix" some of the problems before converting it back so I do it from there, but as a really nice to have feature from my perspective, all the channels for an org is more useful by far. What would be totally awesome of course would be a way to prime the pump - connect to everything for that org - automagically.

aatkddny (Fri, 04 May 2018 13:38:27 GMT):
Well it turns out that I have to connect all the participants to all the channels up front otherwise I miss events, something I hadn't even considered until this juncture so it was a useful exercise purely from that perspective. I turn the network config into a java object to "fix" some of the problems before converting it back so I do it from there. What would be totally awesome of course would be a way to prime the pump - connect to everything for that org - automagically. The other one that would be super useful would be all the members associated with a channel, but that's probably a bit specialized - we can load chaincode across orgs and this would simplify that process.

aatkddny (Fri, 04 May 2018 13:38:27 GMT):
Well it turns out that I have to connect all the participants to all the channels up front otherwise I miss events, something I hadn't even considered until this juncture so it was a useful exercise purely from that perspective. I turn the network config into a java object to "fix" some of the problems before converting it back so I do it from there. What would be totally awesome of course would be a way to prime the pump - connect to everything for that org - automagically. And BMX doesn't send out the flags - which took me some work to figure out where to shove them (I initially thought they were properties) - so the newest change will have it responding to the event hub url but not to issue peer events. This is a change from a couple of weeks ago. I don't really care now I know how to set it, but wondered if it was intended behavior.

aatkddny (Fri, 04 May 2018 13:38:27 GMT):
Well it turns out that I have to connect all the participants to all the channels up front otherwise I miss events, something I hadn't even considered until this juncture so it was a useful exercise purely from that perspective. I turn the network config into a java object to "fix" some of the problems before converting it back so I do it from there. What would be totally awesome of course would be a way to prime the pump - connect to everything for that org - automagically. And BMX doesn't send out the flags - which took me some work to figure out where to shove them (I initially thought they were properties) - so the newest SDK change here will have it responding to the event hub url but not to issue peer events. This is a change from a couple of weeks ago. I don't really care now I know how to set it, but wondered if it was intended behavior.

aatkddny (Fri, 04 May 2018 14:47:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JWiYZZj9vG5EdBzXd) It works on my machine. Tested it this morning.

aatkddny (Fri, 04 May 2018 14:47:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JWiYZZj9vG5EdBzXd) as an fyi: It works on my machine. Tested it this morning.

aatkddny (Fri, 04 May 2018 14:47:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JWiYZZj9vG5EdBzXd) as an fyi: It works on my machine. Tested it this morning. Are you registering your listeners properly?

aatkddny (Fri, 04 May 2018 15:01:58 GMT):
So here's a conundrum. Say I have a channel with three organizations A, B, C and two sets of chaincode - CC_AB and CC_BC. Endorsement policy on CC_AB is A and B, and on CC_BC it is B AND C. How should that be represented in a NetworkConfig for B so that the correct peers are invoked to endorse? It's simpler for A and C since they only need access to one set of CC, but I'm not sure the correct way to do it (other than manually) for B.

rickr (Fri, 04 May 2018 18:09:46 GMT):
Don't get what you're _fixing_. Yes as stated I informed the BMX team for 1.1 they should not be including the eventUrl and should include a endorsingPeer role. Also stated that it probably went nowhere. I'm not aware the NetworkConfig aka Connection Profile address endorsements needed on chaincode. To me it is a failure to even have any mention of chaincode at all as it is static document and chaincode is too dynamic Version 1.2 of the SDK via service discovery will figure out a lot of the _Network_ for you and when you want to invoke chaincode it will determine what endorsers are needed. I was hoping it will tell what chaincode you can invoke to but that's still _iffy_ Basically the only thing the Network Config will be useful for is the CAs in the Network and probably which Peer(s) should be used for the initial service discovery.

rickr (Fri, 04 May 2018 18:09:46 GMT):
Don't get what you're _fixing_. Yes as stated I informed the BMX team for 1.1 they should not be including the eventUrl and should include a endorsingPeer role. Also stated that it probably went nowhere. I'm not aware the NetworkConfig aka Connection Profile addressing endorsements needed on chaincode. To me it is a failure to even have any mention of chaincode at all as it is static document and chaincode is too dynamic Version 1.2 of the SDK via service discovery will figure out a lot of the _Network_ for you and when you want to invoke chaincode it will determine what endorsers are needed. I was hoping it will tell what chaincode you can invoke to but that's still _iffy_ Basically the only thing the Network Config will be useful for is the CAs in the Network and probably which Peer(s) should be used for the initial service discovery.

rickr (Fri, 04 May 2018 18:09:46 GMT):
Don't get what you're _fixing_. Yes as stated I informed the BMX team for 1.1 they should not be including the eventUrl and should include a endorsingPeer role. Also stated that it probably went nowhere. I'm not aware the NetworkConfig aka Connection Profile addressing endorsements needed on chaincode. To me it is a failure to even have any mention of chaincode at all as it is static document and chaincode is too dynamic Version 1.2 of the SDK via service discovery will figure out a lot of the _Network_ for you and when you want to invoke chaincode it will determine what endorsers are needed. I was hoping it will tell what chaincode you can invoke too but that's still _iffy_ Basically the only thing the Network Config will be useful for is the CAs in the Network and probably which Peer(s) should be used for the initial service discovery.

aatkddny (Fri, 04 May 2018 18:54:44 GMT):
The CA cert is wrong. Also have to put in sslProvider and negotiationType into grpcOptions all over the shop or it choked.

aatkddny (Fri, 04 May 2018 18:54:44 GMT):
The CA cert is wrong. Also have to put in sslProvider and negotiationType into grpcOptions all over the shop or it choked.

aatkddny (Fri, 04 May 2018 18:54:44 GMT):
Since you mentioned it... The CA cert is wrong. Also have to put in sslProvider and negotiationType into grpcOptions all over the shop or it choked. I think FAB-9267 covered the latter, but it's been a couple of weeks since I went back and looked at it.

rickr (Fri, 04 May 2018 22:15:27 GMT):
sslProvider and negotiationType for the most part should never need any explicit setting at all anymore. They default to openSSL and TLS with config properties to change that default. Not aware of any issue with CA cert either.

rickr (Fri, 04 May 2018 22:21:13 GMT):
The most likely thing that would need tweaking are the connection properties there have been methods added to the NetworkConfig to get/set them.

rickr (Fri, 04 May 2018 22:21:13 GMT):
The most likely thing that would need tweaking are the connection properties. There have been methods added to the NetworkConfig to get/set them.

httran88 (Sat, 05 May 2018 20:58:04 GMT):
Has joined the channel.

amolpednekar (Sun, 06 May 2018 14:37:23 GMT):
So I'm getting proper events after disabling tls

amolpednekar (Sun, 06 May 2018 15:12:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ywXnoPkwWbxFg4kGZ) @aatkddny I just disabled TLS and it started working. Then saw that I forgot to add peer TLS certs while doing channel.newEventHub() :triumph: :face_palm:

amolpednekar (Sun, 06 May 2018 15:15:14 GMT):
Guess I should move to PeerEventing anyway since thats the preferred approach now. Btw, whats the major advantage with this? One is obviously that I need to open and connect to a single port instead of requiring a separate one for events, but anything else?

amolpednekar (Sun, 06 May 2018 15:15:14 GMT):
Guess I should move to PeerEventing anyway since thats the preferred approach now. Btw, whats the major advantage with this? One is obviously that I need to open and connect to a single port instead of requiring a separate one for events, but what else?

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying ` The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {}) ` My code is: `channel.sendTransaction(successful, newChannel.getOrderers()).thenApply(event -> { // do something }); ` I'm having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: `channel.sendTransaction(successful, newChannel.getOrderers()).thenApply(event -> { // do something });` I'm having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: `channel.sendTransaction(successful, newChannel.getOrderers()).thenApply(event -> { // do something });` I'm having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: ` channel.sendTransaction(successful, newChannel.getOrderers()).thenApply(event -> { // do something }); ` I'm having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: ` channel.sendTransaction(successful, channel.getOrderers()).thenApply(event -> { // do something }); ` I'm having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: `channel.sendTransaction(successful, channel.getOrderers()).thenApply(event -> { // do something}); ` I'm having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: `channel.sendTransaction(successful, channel.getOrderers()).thenApply(event -> { // do something}); ` Am I missing something here? Having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal.

amolpednekar (Sun, 06 May 2018 15:23:02 GMT):
@rickr When I use .thenApply on sendTransaction as per the integration test examples, I get a compile error on ".thenApply" saying `The method thenApply(Function) in the type CompletableFuture is not applicable for the arguments (( event) -> {})` My code is: `channel.sendTransaction(successful, channel.getOrderers()).thenApply(event -> { // do something}); ` Am I missing something here? Having to end up assigning the response to a variable of CompletableFuture and then doing .get(time).getTxId() instead which isnt ideal. (and times out often even if its high)

akshaynet (Sun, 06 May 2018 15:37:45 GMT):
Has joined the channel.

yanjunli (Sun, 06 May 2018 18:27:27 GMT):
Has joined the channel.

kiattchaip (Mon, 07 May 2018 03:47:59 GMT):
@rickr Do you have any update about the release date of the SDK v1.1.0?

clydedacruz (Mon, 07 May 2018 04:36:48 GMT):
Has joined the channel.

sudharsand (Mon, 07 May 2018 13:15:19 GMT):
Has joined the channel.

example (Tue, 08 May 2018 06:02:36 GMT):
hi all~ I am running fabric-sdk-java End2EndIT.java test, and I am running into this error [Error deserializing key Capabilities for group /Channel/Application: Unexpected key Capabilities] when constructing channel foo, could anyone help me explain what this mean?

example (Tue, 08 May 2018 06:05:58 GMT):
common/configtx] processConfig -> DEBU 1b3 Beginning new config for channel foo 2018-05-08 06:05:17.055 UTC [common/config] NewStandardValues -> DEBU 1b4 Initializing protos for *config.ChannelProtos 2018-05-08 06:05:17.055 UTC [common/config] initializeProtosStruct -> DEBU 1b5 Processing field: HashingAlgorithm 2018-05-08 06:05:17.055 UTC [common/config] initializeProtosStruct -> DEBU 1b6 Processing field: BlockDataHashingStructure 2018-05-08 06:05:17.055 UTC [common/config] initializeProtosStruct -> DEBU 1b7 Processing field: OrdererAddresses 2018-05-08 06:05:17.055 UTC [common/config] initializeProtosStruct -> DEBU 1b8 Processing field: Consortium 2018-05-08 06:05:17.055 UTC [policies] ProposePolicy -> DEBU 1b9 Proposed new policy Writers for Channel 2018-05-08 06:05:17.055 UTC [policies] ProposePolicy -> DEBU 1ba Proposed new policy Admins for Channel 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1bb Proposed new policy Readers for Channel 2018-05-08 06:05:17.056 UTC [common/config] NewStandardValues -> DEBU 1bc Initializing protos for *config.OrdererProtos 2018-05-08 06:05:17.056 UTC [common/config] initializeProtosStruct -> DEBU 1bd Processing field: ConsensusType 2018-05-08 06:05:17.056 UTC [common/config] initializeProtosStruct -> DEBU 1be Processing field: BatchSize 2018-05-08 06:05:17.056 UTC [common/config] initializeProtosStruct -> DEBU 1bf Processing field: BatchTimeout 2018-05-08 06:05:17.056 UTC [common/config] initializeProtosStruct -> DEBU 1c0 Processing field: KafkaBrokers 2018-05-08 06:05:17.056 UTC [common/config] initializeProtosStruct -> DEBU 1c1 Processing field: ChannelRestrictions 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1c2 Proposed new policy Writers for Orderer 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1c3 Proposed new policy Admins for Orderer 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1c4 Proposed new policy BlockValidation for Orderer 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1c5 Proposed new policy Readers for Orderer 2018-05-08 06:05:17.056 UTC [common/config] NewStandardValues -> DEBU 1c6 Initializing protos for *config.OrganizationProtos 2018-05-08 06:05:17.056 UTC [common/config] initializeProtosStruct -> DEBU 1c7 Processing field: MSP 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1c8 Proposed new policy Admins for OrdererOrg 2018-05-08 06:05:17.056 UTC [policies] ProposePolicy -> DEBU 1c9 Proposed new policy Readers for OrdererOrg 2018-05-08 06:05:17.057 UTC [policies] ProposePolicy -> DEBU 1ca Proposed new policy Writers for OrdererOrg 2018-05-08 06:05:17.057 UTC [common/config] NewStandardValues -> DEBU 1cb Initializing protos for *struct {} 2018-05-08 06:05:17.057 UTC [orderer/common/broadcast] Handle -> WARN 1cc Rejecting CONFIG_UPDATE because: Error processing updated config: Error deserializing key Capabilities for group /Channel/Application: Unexpected key Capabilities 2018-05-08 06:05:17.057 UTC [orderer/main] func1 -> DEBU 1cd Closing Broadcast stream

Othman.Darwish (Tue, 08 May 2018 07:24:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aKyeccMaj4xJZcjhz) @rickr

Othman.Darwish (Tue, 08 May 2018 07:27:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aKyeccMaj4xJZcjhz) @rickr Hi is there any POC show how to interact with HSM , what will happen for User interface which current default crypto provider depends on ?

rickr (Tue, 08 May 2018 10:53:23 GMT):
Trying to close out one thing yet for 1.1.0 but things keeping getting in the way.

rickr (Tue, 08 May 2018 10:54:33 GMT):
@example I've never seen that error reported. Are you starting the fabric network as suggested in the README.md ?

rickr (Tue, 08 May 2018 10:56:53 GMT):
@Othman.Darwish I don't know of any. As stated, I only know it's been done.

Starseven (Tue, 08 May 2018 11:52:26 GMT):
Has joined the channel.

KenBodnar (Tue, 08 May 2018 22:54:27 GMT):
Has joined the channel.

amolpednekar (Thu, 10 May 2018 10:20:30 GMT):
Is devMode available in Java SDK?

gravity (Thu, 10 May 2018 13:00:39 GMT):
Hello Can someone help me to understand the difference between users(created via sdk) and peers? For example, there is an org0 with two peers (crypto materials are generated by fabric-ca). If I create a new user using sdk, should I run a new peer for this user? Or I missunderstood the difference between users and peers?

rickr (Thu, 10 May 2018 13:39:07 GMT):
There is no devMode in the sense of running the CC locally for quick testing. There is that capability with the command line . @sanchezl should be able to help

rickr (Thu, 10 May 2018 13:39:07 GMT):
There is no devMode in the sense of running the CC locally for quick testing. There is that capability with the fabric command line . @sanchezl should be able to help

rickr (Thu, 10 May 2018 13:48:34 GMT):
Cryptogen provides a ChannelAdmin and PeerAdmin. The channel admin can create and update the channel itself. The PeerAdmin can join the peer to the channel, update peer organization and install instantiate chaincode on the peer they're an admin on. There is another _Admin_ that is more appropriately should be considered to be a certificate authority registrar. With regard to the channels and peers this user is just a _regular member_ except with the certificate authority can register additional _regular members_. These _regular members_ can invoke/query chaincode.

gravity (Thu, 10 May 2018 13:59:00 GMT):
@rickr suppose I've registered a new user and later enroll this users. As a result I retrieved an Enrollment object with keys and certs. Should I store these keys and certificates in a separate storage? Or it better to enroll a user each time I want to invoke/query chaincode?

rickr (Thu, 10 May 2018 14:01:53 GMT):
that's up to your application choice

gravity (Thu, 10 May 2018 14:04:00 GMT):
@rickr you really helped me, thanks a lot!

gravity (Thu, 10 May 2018 15:11:19 GMT):
I'm trying to query a chaincode and getting this error: `channel [mychannel]: creator certificate is not valid: could not obtain certification chain: invalid validation chain. Parent certificate should be a leaf of the certification tree` I've registered and enrolled a user previously using sdk any suggestions?

gravity (Thu, 10 May 2018 15:12:39 GMT):
``` [channel: mychannel] Client authorization revoked for deliver request from 172.18.0.1:32992: Failed evaluating policy on signed data during check policy on channel [mychannel] with policy [/Channel/Application/Readers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining ```

gravity (Thu, 10 May 2018 15:12:45 GMT):
one more log message

yacovm (Thu, 10 May 2018 15:14:04 GMT):
yeah... i can explain what it means @gravity

yacovm (Thu, 10 May 2018 15:14:18 GMT):
so, imagine you have a root CA that has under it an intermediate CA

yacovm (Thu, 10 May 2018 15:14:24 GMT):
lets call the root CA - rCA

yacovm (Thu, 10 May 2018 15:14:30 GMT):
and the intermediate CA - iCA

yacovm (Thu, 10 May 2018 15:14:46 GMT):
now, in fabric - any client certificate must be issued only by iCA and not by rCA

yacovm (Thu, 10 May 2018 15:14:59 GMT):
so, in other words- if you have a tree of CAs

yacovm (Thu, 10 May 2018 15:15:13 GMT):
then all client or peer identities must be issued by the leaf CAs ;)

gravity (Thu, 10 May 2018 15:16:27 GMT):
now it makes sense. I've used a root CA to register and enroll a user. thanks for the explanation, very helpful :)

yacovm (Thu, 10 May 2018 15:16:42 GMT):
glad to know the code works

AntonyKakoudakis (Thu, 10 May 2018 16:07:20 GMT):
Has joined the channel.

adave (Thu, 10 May 2018 16:44:07 GMT):
Has joined the channel.

crj (Fri, 11 May 2018 03:27:24 GMT):
1.10.1

deep123 (Fri, 11 May 2018 04:25:36 GMT):
Has joined the channel.

deep123 (Fri, 11 May 2018 04:26:46 GMT):
Hi I am trying to use hyperledger fabric java sdk I am following the steps at https://github.com/hyperledger/fabric-sdk-java To run the integration tests, I run the command "mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc" . I get the following error: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (failsafe-integration-tests) on project fabric-sdk-java: There are test failures.

wangpan22 (Fri, 11 May 2018 05:42:50 GMT):
with IBM Java, when running the end 2 end test cases, i always got below exception,

wangpan22 (Fri, 11 May 2018 05:42:55 GMT):
Caught an exception running channel foo org.hyperledger.fabric.sdk.exception.ProposalException: java.lang.IllegalArgumentException at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1542) at org.hyperledger.fabric.sdkintegration.End2endIT.runChannel(End2endIT.java:490) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:206) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77) at org.junit.runner.JUnitCore.main(JUnitCore.java:36) Caused by: java.lang.IllegalArgumentException at sun.security.provider.certpath.AdaptableX509CertSelector.setSerialNumber(AdaptableX509CertSelector.java:107) at java.security.cert.X509CertSelector.(X509CertSelector.java:283) at sun.security.provider.certpath.AdaptableX509CertSelector.(AdaptableX509CertSelector.java:50) at sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:93) at sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:79) at java.security.cert.CertPathValidator.validate(CertPathValidator.java:278) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.validateCertificate(CryptoPrimitives.java:574) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.verify(CryptoPrimitives.java:321) at org.hyperledger.fabric.sdk.ProposalResponse.verify(ProposalResponse.java:133) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2775) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:1540) ... 33 more

wangpan22 (Fri, 11 May 2018 05:43:24 GMT):
anyone met this before or have any ideas? it works well for other JDK

VadimOzarinskiy (Fri, 11 May 2018 06:33:18 GMT):
Has joined the channel.

VadimOzarinskiy (Fri, 11 May 2018 06:37:53 GMT):
Hello to all. I'm investigating hyperledger fabric and trying to build my own custom network that is based on BYFN. But I'm interesting how to connect to network thought SDK if I already have generated MSP files thought cryptogen. In different samples showing how to generate and enroll by admin, but how to enroll if I already have files? Mb I'm thinking in wrong way. I want just to know how to connect to network via SDK so I could play with it and build my own simple project. Thanks for any help

VadimOzarinskiy (Fri, 11 May 2018 06:37:53 GMT):
Hello to all. I'm investigating hyperledger fabric and trying to build my own custom network that is based on BYFN. But I'm interesting how to connect to network thought SDK if I already have generated MSP files thought cryptogen. In different samples showing how to generate and enroll by admin via fabric-CA, but how to enroll if I already have files, do I realy need CA? As I now CA only generate new certificates, but I've generate one via cryptogen. Mb I'm thinking in wrong way. I want just to know how to connect to network via SDK so I could play with it and build my own simple project. Thanks for any help

rjain0701 (Sat, 12 May 2018 08:49:53 GMT):
Has joined the channel.

rjain0701 (Sat, 12 May 2018 08:54:15 GMT):
Hi All,

rjain0701 (Sat, 12 May 2018 08:58:16 GMT):
Hi All, I am new to Hyperledger Fabric. I am able to start test fabric network. Just started playing with fabric-java-sdk and able to run Junit unit test cases. I was struggling with my below queries. My queries might be silly. Please bear with me. 1.When a peer will be added at runtime then how to create the docker container for that and bring it up.Do we need to update the docker-compose.yaml file and run it again? 2. Is there any way to generate channel tx file from java sdk or we can only create it via configtx tool? Thanks in advance

gravity (Sat, 12 May 2018 10:22:59 GMT):
@rjain0701 2. Is there any way to generate channel tx file from java sdk or we can only create it via configtx tool? https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L785 If I understand correctly this sample, you can create a channel via SDK

ShivajiBose (Sat, 12 May 2018 10:43:54 GMT):
Has joined the channel.

rjain0701 (Sat, 12 May 2018 13:17:56 GMT):
@gravity Thanks for your reply. I have already run this test case. We can create the channel for which we already have the tx files. Let say if I need to create channel at run time then we I need to generate tx file first and then run the channel code from java

rjain0701 (Sat, 12 May 2018 13:17:56 GMT):
@gravity Thanks for your reply. I have already run this test case. We can create the channel for which we already have the tx files. Let say if I need to create channel at run time then we I need to generate tx file first and then run the channel code from java

rjain0701 (Sat, 12 May 2018 13:20:41 GMT):
@gravity When I am creating a new channel for which tx file is not present. Then it gives me a exception that corresponding tx file is not present. Please le me know if I am missing any of the step

papillon88 (Sun, 13 May 2018 01:25:03 GMT):
Has joined the channel.

jpgalmeida (Sun, 13 May 2018 09:59:41 GMT):
Has joined the channel.

dodangquan (Mon, 14 May 2018 03:32:43 GMT):
Has joined the channel.

deep123 (Mon, 14 May 2018 03:45:54 GMT):
Hi I am trying to use hyperledger fabric java sdk I am following the steps at https://github.com/hyperledger/fabric-sdk-java To run the integration tests, I run the command "mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc" . I get the following error: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (failsafe-integration-tests) on project fabric-sdk-java: There are test failures.

deep123 (Mon, 14 May 2018 03:46:07 GMT):
Can anyone help me with this.

ascatox (Mon, 14 May 2018 06:17:54 GMT):
Hi All! i'm interested to use this java sdk to build an **Android Application**

ascatox (Mon, 14 May 2018 06:18:25 GMT):
Has someone experiences in the mobile world with this sdk?

gravity (Mon, 14 May 2018 08:47:39 GMT):
hi is there any way to install hyperledger java sdk v. 1.1 via mvn repository? there are no instructions in README.md after update

rickr (Mon, 14 May 2018 14:17:30 GMT):
The readme describes how to get 1.1.0-SNAPSHOT

rickr (Mon, 14 May 2018 14:18:10 GMT):
@ascatox is not supporting Android

rickr (Mon, 14 May 2018 14:18:10 GMT):
@ascatox The JSDK is not supporting Android

rickr (Mon, 14 May 2018 14:21:00 GMT):
@deep123 you don't show what the error is .. the integration tests are working

ascatox (Mon, 14 May 2018 14:33:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CC7ADtwHJmB2XyYjc) @rickr There's a technical motivation because the SDK doesn't work on Android?

gravity (Mon, 14 May 2018 17:54:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dYkxsEPCBxo5rJYwx) thanks, I've found it.

rickr (Mon, 14 May 2018 18:03:33 GMT):
btw `1.1.0` should work now too.

deep123 (Tue, 15 May 2018 05:38:23 GMT):

Clipboard - May 15, 2018 11:12 AM

deep123 (Tue, 15 May 2018 05:42:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nb2zNeyXgSJEb3jQB) @rickr : Please find the screen shot above. If -Dmaven.test.failure.ignore=true, then will it hide errors?

ascatox (Tue, 15 May 2018 06:49:43 GMT):
Someone knows if it's possible to use the library with a corporate proxy?

rickr (Tue, 15 May 2018 11:35:26 GMT):
@deep123 I can't tell what errors If you're running the integration test make sure you started the fabric as in the README.md

rickr (Tue, 15 May 2018 11:36:55 GMT):
@ascatox There are _hints_ in the README.md regarding proxies.

gravity (Tue, 15 May 2018 14:08:25 GMT):
@rickr Hello Is it possible to create a new Organization via SDK?

aatkddny (Tue, 15 May 2018 14:18:34 GMT):
yes

aatkddny (Tue, 15 May 2018 14:18:46 GMT):
you need a peer that uses the orderer crypto

aatkddny (Tue, 15 May 2018 14:19:48 GMT):
then add it into the genesis block using this as a pattern: ``` private void addMemberToConsortium(String consortium, String msp, Map config, Map configJson) { Map x = (Map) config.get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Consortiums"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get(consortium); Map x5 = (Map) x4.get("groups"); x5.put(msp, configJson); } ```

gravity (Tue, 15 May 2018 14:40:46 GMT):
thanks for a help. there is one more question: how to add a new organization to a network without joining existing channels? the case is to create new org in an existing network, create a new channel and join org from the previous step to this channel

gravity (Tue, 15 May 2018 14:41:37 GMT):
actually, I'm wondering is it reasonable to create single org channels?

aatkddny (Tue, 15 May 2018 14:59:20 GMT):
you need to put it into the consortium before you can create a channel for it.

aatkddny (Tue, 15 May 2018 15:01:27 GMT):
ok so i'm missing something silly. anyone hit this? ```2018-05-15 10:55:32.493 ERROR 3144 --- [nio-8096-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V] with root cause java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V at io.grpc.Metadata$Key.validateName(Metadata.java:628) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.Metadata$Key.(Metadata.java:636) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.Metadata$Key.(Metadata.java:566) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:740) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:735) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.Metadata$Key.of(Metadata.java:592) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.Metadata$Key.of(Metadata.java:588) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.internal.GrpcUtil.(GrpcUtil.java:82) ~[grpc-core-1.11.0.jar:1.11.0] at io.grpc.internal.AbstractManagedChannelImplBuilder.(AbstractManagedChannelImplBuilder.java:82) ~[grpc-core-1.11.0.jar:1.11.0] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:248) ~[fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Orderer.getClientTLSCertificateDigest(Orderer.java:69) ~[fabric-sdk-java-1.1.0.jar:na] ``` This is on a second machine. Same code works on my local machine. I reinstalled the latest set of docker containers and binaries. It has a build of the latest sdk 1.1.0-SNAPSHOT in the local maven repo. did a local go install of the latest grpc (which I'm not convinced was necessary) it still throws this exception. what did i miss?

rickr (Tue, 15 May 2018 15:15:11 GMT):
double check your dependencies make sure you're doing a fully rebuild

rickr (Tue, 15 May 2018 15:15:14 GMT):
https://ctrlv.it/id/121313/4160180560

rickr (Tue, 15 May 2018 15:16:23 GMT):
probablly `com.google.guava:guava:jar:20.0:compile` was upped

rickr (Tue, 15 May 2018 15:16:46 GMT):
btw there is now 1.1.0

huy.tranibm (Tue, 15 May 2018 15:27:35 GMT):
is it still at the same repo ``` url "https://oss.sonatype.org/content/repositories/snapshots" ``` for 1.1.0?

huy.tranibm (Tue, 15 May 2018 15:34:10 GMT):
sorry stupid question

rickr (Tue, 15 May 2018 15:34:30 GMT):
You only need that for snapshot -- once published to maven (a real release) you can remove any reference to another repository

jtrayfield (Tue, 15 May 2018 17:01:01 GMT):
Has joined the channel.

jtrayfield (Tue, 15 May 2018 17:01:28 GMT):
Is there any way to get the chaincode-name from BlockInfo?

rickr (Tue, 15 May 2018 18:00:45 GMT):
Ouch I'm afraid not... https://jira.hyperledger.org/browse/FAB-10075

jtrayfield (Tue, 15 May 2018 18:32:10 GMT):
Thanks. would be on the ChaincodeEvent class?

jtrayfield (Tue, 15 May 2018 18:32:22 GMT):
would it be....

rickr (Tue, 15 May 2018 18:41:39 GMT):
You can get it on a chaincode event .. look at blockwalker in end2endit

jtrayfield (Tue, 15 May 2018 18:42:07 GMT):
thanks

rickr (Tue, 15 May 2018 18:42:40 GMT):
its missing on just the transactionAction

rickr (Tue, 15 May 2018 18:42:49 GMT):
https://pasteboard.co/Hlkr9SA.png

jtrayfield (Tue, 15 May 2018 20:02:57 GMT):
how about the chain function called (e.g., "invoke")?

rickr (Tue, 15 May 2018 20:22:27 GMT):
the setFcn ? that just comes out as an argument ``` Transaction action 1 has 4 chaincode input arguments Transaction action 1 has chaincode input argument 0 is: move Transaction action 1 has chaincode input argument 1 is: a Transaction action 1 has chaincode input argument 2 is: b Transaction action 1 has chaincode input argument 3 is: 100 ```

jtrayfield (Tue, 15 May 2018 20:30:36 GMT):
for example, my first txn (block 1) is:

jtrayfield (Tue, 15 May 2018 20:30:37 GMT):
Channel = mychannel Timestamp = Mon May 14 19:50:51 UTC 2018 TxId = 9bcfa18c29ba724937cbf302571feb76e1a50d082f9c7ce79341a2bfcc1668b3 type = TRANSACTION_ENVELOPE Command = deploy, mychannel, @ &github.ibm.com/xxx0.0.1 init, Org1MSP Org2MSP Org1MSP Org2MSP,

jtrayfield (Tue, 15 May 2018 20:31:20 GMT):
so I need to distinguish between deploys and invokes.

AthiyamanMuthukumarasamy (Wed, 16 May 2018 02:56:21 GMT):
Has joined the channel.

deep123 (Wed, 16 May 2018 04:21:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xNPhbswjPuGyMW7ho) @rickr : Yes, I am following the instructions from readme.md in the link : https://github.com/hyperledger/fabric-sdk-java. To start the network , I run this command: IMAGE_TAG_FABRIC=:x86_64-1.1.0 IMAGE_TAG_FABRIC_CA=:x86_64-1.1.0 ./fabric.sh restart.

ascatox (Wed, 16 May 2018 05:31:34 GMT):
Hi All!!!

ascatox (Wed, 16 May 2018 05:32:54 GMT):
I'm trying to use this project https://github.com/shubhamvrkr/android-fabric-sdk in my Android Application. Has someone feedback on this? Thanks in advance

amolpednekar (Wed, 16 May 2018 06:47:39 GMT):
fabric_ca's logger keeps giving warnings on my console, how to disable it? ``` log4j:WARN No appenders could be found for logger (org.hyperledger.fabric_ca.sdk.helper.Config). ```

rickr (Wed, 16 May 2018 11:20:03 GMT):
Look at log4j docs on setting up an appender

rickr (Wed, 16 May 2018 11:22:07 GMT):
@deep123 I don't see the actual errors. Tests are passing on all build machines must be something unique to your environment setup.

rickr (Wed, 16 May 2018 12:55:03 GMT):
@jtrayfield when you `deploy` the transaction action with have a chaincode name of `lscc` the fist argument should be deploy , the next is the channel , then is the `ChaincodeDeploymentSpec` this is a serialized protobuf `org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec` you need to deserialize it. Chaincode.ChaincodeDeploymentSpec.parseFrom()

rickr (Wed, 16 May 2018 12:55:03 GMT):
@jtrayfield when you `deploy` the transaction action with have a chaincode name of `lscc` the fist argument should be deploy , the next is the channel , then is the `ChaincodeDeploymentSpec` this is a serialized protobuf `org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec` you need to deserialize it. Chaincode.ChaincodeDeploymentSpec.parseFrom() that should have info like : type: GOLANG chaincode_id { path: "github.com/example_cc" name: "example_cc_go" version: "1" } input { args: "init" args: "a" args: "500" args: "b" args: "300"

rickr (Wed, 16 May 2018 12:55:03 GMT):
@jtrayfield when you `deploy` the transaction action will have a chaincode name of `lscc` The fist argument should be deploy , the next is the channel name , then there is the `ChaincodeDeploymentSpec` this is a serialized protobuf `org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec` you need to deserialize it. Chaincode.ChaincodeDeploymentSpec.parseFrom() that should have info like : type: GOLANG chaincode_id { path: "github.com/example_cc" name: "example_cc_go" version: "1" } input { args: "init" args: "a" args: "500" args: "b" args: "300"

jtrayfield (Wed, 16 May 2018 13:20:11 GMT):
@rickr so the only action allowed on "my" chaincode is ```invoke```, right?

rickr (Wed, 16 May 2018 13:22:36 GMT):
no

jtrayfield (Wed, 16 May 2018 13:30:14 GMT):
please say more.....

rickr (Wed, 16 May 2018 13:34:35 GMT):
yes it will call Invoke on your CC from there you can call other functions

gravity (Wed, 16 May 2018 15:55:59 GMT):
Hi all How to give an access to the channel (to read/update) for a particular user (registered and enrolled using fabric-ca) in Hyperledger?

gravity (Wed, 16 May 2018 18:20:17 GMT):
Hi @rickr is it possible to restrict chaincode invocation for particular users? I mean, if there is an organization, with 4 peers, peer0 and peer1 are in channel A, peer2 and peer3 are in channel B. there are 4 users registered with fabric-ca. is it possible to allow user0 and user1 to have an access only to channel A, and user2 and user3 to have only an access to channel B? Thanks in advance

rickr (Wed, 16 May 2018 18:24:28 GMT):
let me get the expert :) @jyellick ^^^

jyellick (Wed, 16 May 2018 18:25:38 GMT):
@gravity There is a new feature in v1.2 which allows you to do exactly this.

jyellick (Wed, 16 May 2018 18:26:03 GMT):
You may set a policy as to which users are allowed to invoke chaincode on a per channel basis as part of your channel creation transaction, or as a later update.

jyellick (Wed, 16 May 2018 18:26:50 GMT):
https://github.com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml#L384-L385

gravity (Wed, 16 May 2018 18:28:59 GMT):
@jyellick Do you mean v1.2 of Fabric? or what?

jyellick (Wed, 16 May 2018 18:30:42 GMT):
Correct, the current development version of Fabric, scheduled to be released next month

gravity (Wed, 16 May 2018 18:35:16 GMT):
@jyellick thanks, got it!

dushyantbehl (Wed, 16 May 2018 22:48:22 GMT):
Hi everyone I'm getting *grpc max message size exceeded error* while doing query by block number on my fabric v1.1 deployment (using fabric sdk java snapshot). Due to some performance reasons I have to use larger blocksizes. Is there anyway to increase the client side max message size of java sdk from 4MB to some higher value? or any other way to overcome this issue. Thanks in advance

rickr (Wed, 16 May 2018 22:53:03 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/d186e02f3f7de0a058166bb0925464c0e71f3e57/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L837

dushyantbehl (Wed, 16 May 2018 23:07:24 GMT):
Thanks @rickr will try this

IgorSim (Thu, 17 May 2018 05:53:55 GMT):
Hi, i'm trying to set custom message in pb.Response when i return result from my chaincode(i don't use shim.Success, instead i use pb.Response). For example when chaincode return response with Status=200 i see that on Java SDK side message is always OK and message set from chaincode is missing. Is this correct behavior, bug or i'm missing something here? Also, i tried to extend 'error handling' in the chaincode and for example return status=404 in case when some asset can't be found. But, JDK always set status=500(on ProposalResponse object) and message contains 404 but it contains other stuff, looks like this: Sending proposal to peer failed because of: gRPC failure=Status{code=UNKNOWN, description=chaincode error (status: 404, message: {"code":500,"message":"Asset does not exist for id =: 1122334455"}), cause=null} I was expecting ProposalResponse status (ChaincodeResponse.Status) to be set to UNDEFINED because chaincode return 404.

amolpednekar (Fri, 18 May 2018 05:38:54 GMT):
Whenever I make any transaction with JSDK (I'm guessing this'll also happen with the NodeSDK), the peer logs show this ``` 2018-05-18 05:33:35.970 UTC [kvledger] CommitWithPvtData -> INFO 17e Channel [mychanneltest]: Committed block [60] with 2 transaction(s) 2018-05-18 05:33:36.007 UTC [common/deliver] deliverBlocks -> WARN 17f [channel: mychanneltest] Error sending to 10.xxx.xx.xxx:60105: rpc error: code = Canceled desc = context canceled 2018-05-18 05:33:36.008 UTC [common/deliver] deliverBlocks -> WARN 180 [channel: mychanneltest] Error sending to 10.xxx.xx.xxx:60176: rpc error: code = Unavailable desc = transport is closing ``` My guess is that the latter two warnings/errors are because my program stopped running; how to handle this?

amolpednekar (Fri, 18 May 2018 05:38:54 GMT):
Whenever I make any transaction with JSDK (I'm guessing this'll also happen with the NodeSDK), the peer logs show these warnings after a commit block log ``` 2018-05-18 05:33:35.970 UTC [kvledger] CommitWithPvtData -> INFO 17e Channel [mychanneltest]: Committed block [60] with 2 transaction(s) 2018-05-18 05:33:36.007 UTC [common/deliver] deliverBlocks -> WARN 17f [channel: mychanneltest] Error sending to 10.xxx.xx.xxx:60105: rpc error: code = Canceled desc = context canceled 2018-05-18 05:33:36.008 UTC [common/deliver] deliverBlocks -> WARN 180 [channel: mychanneltest] Error sending to 10.xxx.xx.xxx:60176: rpc error: code = Unavailable desc = transport is closing ``` My guess is that the latter two warnings/errors are because my program stopped running; how to handle this?

rickr (Fri, 18 May 2018 12:28:15 GMT):
I think those are when the eventhubs and or peer eventing service disconnect. As the first level indicates WARN I would not be concerned about them.

rickr (Fri, 18 May 2018 12:36:01 GMT):
@IgorSim It relates to this FAB-9421 I think

IgorSim (Fri, 18 May 2018 13:53:48 GMT):
@rickr Yes, its exactly that problem, i wasn't aware that is already reported and planned to be fixed in 1.2. Tnx a lot.

amolpednekar (Sun, 20 May 2018 10:11:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nmjcnrv69nTyDKBTQ) @rickr This issue still seems to be unresolved (updated to 1.1.0 release)

amolpednekar (Sun, 20 May 2018 10:11:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nmjcnrv69nTyDKBTQ) @rickr This issue still seems to be unresolved (updated to 1.1.0 release) At the moment, I do CompletableFuture future = channel.sendTransaction() and future.getTransactionId(), which is good enough, but wanted to know why the lambda expn approach gives that error :)

baoanlol (Sun, 20 May 2018 14:52:55 GMT):
Has joined the channel.

baoanlol (Sun, 20 May 2018 15:02:00 GMT):
Hi all, I'm a new comer to Fabric. I'm done with "Byfn.sh" example and I tried to start with Java Sdk. But I was stuck with the usage of client. I have created a channel "mychannel" by "byfn.sh", how to use this channel in Java code? I only found "newChannel", "loadChannelFromConfig" which api creates a new channel. I tried with "getChannel" but it didn't work, so which one should I used? Thanks a lot in advance!!!

amolpednekar (Sun, 20 May 2018 15:04:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HsiMsyoZXhmA3Hj4g) @baoanlol Use this as reference to get started, very useful: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

amolpednekar (Sun, 20 May 2018 15:04:56 GMT):
@baoanlol Use this as reference to get started, very useful: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

amolpednekar (Sun, 20 May 2018 15:04:56 GMT):
@baoanlol Use this as reference to get started: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

baoanlol (Sun, 20 May 2018 15:10:11 GMT):

Clipboard - May 20, 2018 11:10 PM

baoanlol (Sun, 20 May 2018 15:10:12 GMT):
@amolpednekar thanks for response! Sorry, for my stupid brain, I still find something that creates a new channel?

kiattchaip (Mon, 21 May 2018 10:50:43 GMT):
@rickr Thank you for the SDK v1.1.0, especially the FAB-8842. It really helps me out. However, I have a question about transaction status. In case I get ExecutionException or TimeoutException from `channel.sendTransaction(responses).get(5000L, TimeUnit.MILLISECONDS)`, I now fix it by getting the transaction status from TransactionEvent (when the cause of the ExecutionException is TransactionEventException) or querying it from peers but what If I can't get the TransactionEvent or find it on any peer, how can I get the transaction status? Can I check that the transaction was already placed on the orderer and will finally be sent to the peers?

rickr (Mon, 21 May 2018 11:13:49 GMT):
If you get an exception that is not a timeout either it didn't get on the orderer or the peer committers marked it bad. The most likely reason for getting a timeout is the peers your listening for the transaction has failed. In a high fail over recovery requirement you should have more peers that your application can query to see the status of the transaction.

rickr (Mon, 21 May 2018 11:16:38 GMT):
@amolpednekar Isn't the lambda expression used in the integration tests and compile and work ? How is yours different ?

kiattchaip (Tue, 22 May 2018 03:33:14 GMT):
@rickr So, I can assume that the transaction will be invalid or not happen if I get an exception that is not a TimeoutException right?

kiattchaip (Tue, 22 May 2018 03:33:14 GMT):
@rickr So, I need to check transaction status from available peers if I get a TimeoutException and I can assume that the transaction will be invalid or not happen if I get an exception that is not a TimeoutException right?

tantd9x (Tue, 22 May 2018 08:15:47 GMT):
Has joined the channel.

rickr (Tue, 22 May 2018 12:56:46 GMT):
Barring any bugs I think that's generally true. If you're application needs to be certain of any transactions completion/status and the cost to query for the transaction can be tolerated it would probably best to do that for additional checking.

chriszhenghf (Tue, 22 May 2018 16:36:22 GMT):
Has joined the channel.

joe-alewine (Tue, 22 May 2018 17:03:44 GMT):
Has joined the channel.

kiattchaip (Wed, 23 May 2018 03:16:44 GMT):
@rickr Got it. Thanks a lot. :slight_smile:

kelvinzhong (Wed, 23 May 2018 08:06:10 GMT):
@rickr hi rick, i wonder if we could using the sdk to register the cert for new org or new peer from ca? and dynicmic

kelvinzhong (Wed, 23 May 2018 08:06:10 GMT):
@rickr hi rick, i wonder if we could using the sdk to register the cert for new org or new peer from ca? and dynamic add into the channel?

kelvinzhong (Wed, 23 May 2018 08:06:10 GMT):
@rickr hi rick, i wonder is there any special usage of NOfEvents in v1.1, it seems not much different when there are only eventhub in v1.0 during a transaction.

kelvinzhong (Wed, 23 May 2018 08:21:59 GMT):
i saw a tutorial for this....https://hyperledger-fabric.readthedocs.io/en/latest/channel_update_tutorial.html

rickr (Wed, 23 May 2018 11:23:28 GMT):
createNoEvents ? If all you want is to send it to the Orderer and don't care about when/if transaction is completed.

adc (Wed, 23 May 2018 13:42:39 GMT):
@rickr, how can I debug a test like UpdateChannelIT from an IDE like IntelliJ?

dharuq (Wed, 23 May 2018 13:43:13 GMT):
Hello! In the End2endIT code says that the sample store must be replaces with more robust implementation a database or ldap or is database and ldap? Another question, this database and ldap should be the same that is defined that would be used by the fabric_ca_server? Thanks in advance!

aatkddny (Wed, 23 May 2018 13:51:29 GMT):
its up to you.

aatkddny (Wed, 23 May 2018 13:51:39 GMT):
i did it with a nosql database. ymmv

dharuq (Wed, 23 May 2018 13:52:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TYTRErMdai8M9nFzm) @aatkddny thanks :D

dharuq (Wed, 23 May 2018 14:00:34 GMT):
I changed in the fabric_ca_server_config.yaml to use postgresql and tried to run the End2EndIT but i got this error: org.hyperledger.fabric_ca.sdk.exception.RegistrationException: Error while registering the user pt.ulisboa.tecnico.config.SampleUser@59e7564b url: https://localhost:8054 POST request to https://localhost:8054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} In the https://localhost:8054 its running the ca2. Anyone knows how to solve this?

vick (Wed, 23 May 2018 17:03:09 GMT):
Has joined the channel.

vick (Wed, 23 May 2018 17:03:22 GMT):
hi

vick (Wed, 23 May 2018 17:03:54 GMT):
i am trying to build the fabric-sdk-java and i get the messagel `[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.2:revision (get-the-git-infos) on project fabric-sdk-java: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml`

vick (Wed, 23 May 2018 17:04:09 GMT):
what is the .git directory and what do i put in it?

vick (Wed, 23 May 2018 17:04:32 GMT):
when i create the .git directory, the next error says; `[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.2:revision (get-the-git-infos) on project fabric-sdk-java: Could not complete Mojo execution...: Error: Could not get HEAD Ref, are you sure you have set the dotGitDirectory property of this plugin to a valid path? -> [Help 1]`

vick (Wed, 23 May 2018 17:04:44 GMT):
so it's definitely looking for something in there ..

aatkddny (Wed, 23 May 2018 19:00:51 GMT):
I may have missed something but doesn't the createCa in NetworkConfig need to support a "hostnamesOverride" flag? ```Properties properties = new Properties(); if (null != httpOptions && "false".equals(httpOptions.getProperty("verify"))) { properties.setProperty("allowAllHostNames", "true"); } getTLSCerts(name, jsonCA, properties); caInfo.setProperties(properties); return caInfo;``` I'm trying to use some config I created to load a channel (I was doing it manually) and I'm getting this: ```2018-05-23 14:54:33.965 WARN 34411 --- [ main] org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel yy-xx-channel failed with peer xx-peer0.xx.com. Status FAILURE, details: Sending proposal to xx-peer0.xx.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [yy-xx-channel] creator org [xxMSP], cause=null} 2018-05-23 14:54:33.967 ERROR 34411 --- [ main] org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel yy-xx-channel failed with peer xx-peer0.xx.com. Status FAILURE, details: Sending proposal to xx-peer0.xx.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [yy-xx-channel] creator org [xxMSP], cause=null} org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel ibm-mediaocean-channel failed with peer xx-peer0.xx.com. Status FAILURE, details: Sending proposal to xx-peer0.xx.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [yy-xx-channel] creator org [xxMSP], cause=null} at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:786) [fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1187) [fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1023) [fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:969) [fabric-sdk-java-1.1.0.jar:na]``` (A lot) further down I see: ```the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.xx.com")]].``` The only difference I can see between the properties in the generated config and the manual one is that "hostnamesOverride" is set to the domain name of the CA. I am setting verify to false. same code works on BMX with verify = true coming from connection_profile.

aatkddny (Wed, 23 May 2018 19:00:51 GMT):
I may have missed something but doesn't the createCa in NetworkConfig need to support a "hostnamesOverride" flag? ```Properties properties = new Properties(); if (null != httpOptions && "false".equals(httpOptions.getProperty("verify"))) { properties.setProperty("allowAllHostNames", "true"); } getTLSCerts(name, jsonCA, properties); caInfo.setProperties(properties); return caInfo;``` I'm trying to use some config I created to load a channel (I was doing it manually) and I'm getting this: ```2018-05-23 14:54:33.965 WARN 34411 --- [ main] org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel yy-xx-channel failed with peer xx-peer0.xx.com. Status FAILURE, details: Sending proposal to xx-peer0.xx.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [yy-xx-channel] creator org [xxMSP], cause=null} 2018-05-23 14:54:33.967 ERROR 34411 --- [ main] org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel yy-xx-channel failed with peer xx-peer0.xx.com. Status FAILURE, details: Sending proposal to xx-peer0.xx.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [yy-xx-channel] creator org [xxMSP], cause=null} org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel yy-xx-channel failed with peer xx-peer0.xx.com. Status FAILURE, details: Sending proposal to xx-peer0.xx.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [yy-xx-channel] creator org [xxMSP], cause=null} at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:786) [fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1187) [fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1023) [fabric-sdk-java-1.1.0.jar:na] at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:969) [fabric-sdk-java-1.1.0.jar:na]``` (A lot) further down I see: ```the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.xx.com")]].``` The only difference I can see between the properties in the generated config and the manual one is that "hostnamesOverride" is set to the domain name of the CA. I am setting verify to false. same code works on BMX with verify = true coming from connection_profile.

rickr (Wed, 23 May 2018 19:23:42 GMT):
I think the difference here is that verify=false turns on allowAllHostNames So all this avoids is the checking of the CN matches the hostname in the certificate. But I think what you might be seeing as the cert is being signed by a CA or no CA at all that it trusts.

rickr (Wed, 23 May 2018 19:24:27 GMT):
@vick please pull down via git and not download

dharuq (Wed, 23 May 2018 22:30:11 GMT):
Hello! I am using postgresql as fabric_ca_server database, and i am trying to run End2EndIT but i am getting this error: Error while registering the user pt.ulisboa.tecnico.config.SampleUser@74c121d4 url: https://localhost:8054 POST request to https://localhost:8054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} The ca_peerOrg1 is enrolling and registering the user1 and putting the values in the fabric_ca database. In the ca_peerOrg2 container the last print is: ca_peerOrg2 | 2018/05/23 14:52:05 [INFO] 172.18.0.1:34540 POST /api/v1/register 500 0 "Registration of 'user1' failed: Identity 'user1' is already registered" Anyone knows how to solve this?

dharuq (Wed, 23 May 2018 22:30:11 GMT):
Hello! I am using postgresql as fabric_ca_server database, and i am trying to run End2EndIT but i am getting this error: Error while registering the user pt.ulisboa.tecnico.config.SampleUser@74c121d4 url: https://localhost:8054 POST request to https://localhost:8054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} In the https://localhost:8054 its running the ca2_peerOrg2. The ca_peerOrg1 is enrolling and registering the user1 and putting the values in the fabric_ca database. In the ca_peerOrg2 container the last print is: ca_peerOrg2 | 2018/05/23 14:52:05 [INFO] 172.18.0.1:34540 POST /api/v1/register 500 0 "Registration of 'user1' failed: Identity 'user1' is already registered" Anyone knows how to solve this?

rickr (Wed, 23 May 2018 22:40:27 GMT):
ahh ==> `'user1' is already registered"`

rickr (Wed, 23 May 2018 22:40:58 GMT):
you need to clear out the database and start over

dharuq (Thu, 24 May 2018 00:16:52 GMT):
when i run i crear the database and ./fabric.sh restart

dharuq (Thu, 24 May 2018 00:17:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d6t3d8i6oipH5ubWP) @rickr when i run i clear the database and ./fabric.sh restart

dharuq (Thu, 24 May 2018 00:17:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d6t3d8i6oipH5ubWP) @rickr when i run i clear the database and ./fabric.sh restart When i define the postgresql in the fabric_ca_server_config it is supposed to exist 2 saperated databases for the CAs? The users to access access the database could be the same?

rickr (Thu, 24 May 2018 00:39:18 GMT):
I don't have any experience with running the fabric_ca with postgresql please ask on the #fabric-ca channel.

dharuq (Thu, 24 May 2018 00:46:53 GMT):
I have already done that.. thanks @rickr

dharuq (Thu, 24 May 2018 00:50:20 GMT):
@rickr have you run it with MySQL?

aatkddny (Thu, 24 May 2018 01:25:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=37N2jjcwMwpm93Krk) @rickr So now I'm really confused. I had an ID10T error - I was using my admin id instead of my peer admin id to try to connect to the channel. The reason I did that was because I was extrapolating from the loadChannelFromConfig code I had for BMX, where I don't have a peer admin and I needed to stick something in there to get round the null user context issue. I've totally switched it around. From being unsure why my local wasn't working, now I have no idea now why the remote call works with the "wrong" user.

gravity (Thu, 24 May 2018 07:36:57 GMT):
Hi all to send a transaction via sdk, should I send it to all peers or it can be any single peer?

kiattchaip (Thu, 24 May 2018 08:02:13 GMT):
@gravity A transaction (proposal responses) will be sent to an orderer, not a peer or peers. For a transaction proposal, it depends on the endorsement policy. You don't need to send it to all peers but it isn't wrong to do that. Just meet the number of peer specified the endorsement policy is enough to make the transaction valid.

gravity (Thu, 24 May 2018 08:03:27 GMT):
@kiattchaip thanks, got it

aatkddny (Thu, 24 May 2018 13:59:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=37N2jjcwMwpm93Krk) @rickr You were 100% right - I missed the most obvious thing possible. I had the wrong spring profile - which meant that I was pointing to the wrong database and so the wrong set of saved user credentials. Trying to connect to a local instance with users saved with the non-local certs doesn't work. :rolling_eyes: Last time I try to code at night... Apologies for the waste of time.

vick (Thu, 24 May 2018 14:16:35 GMT):
@rickr thanks i have done that now and i can build without a problem

vick (Thu, 24 May 2018 14:17:22 GMT):
which ide are you using? i am using intellij but for some reason it's not able to resolve library com.google.protobf

vick (Thu, 24 May 2018 14:20:38 GMT):
protobuf

vick (Thu, 24 May 2018 14:20:50 GMT):
but i can see that the library has been downloaded in to the dependencies ...

vick (Thu, 24 May 2018 14:20:55 GMT):
have tried restarting intellij

vick (Thu, 24 May 2018 14:34:39 GMT):
ok managed to solve that one

vick (Thu, 24 May 2018 14:34:49 GMT):
now i am stuck with this one, how do i get this depedency? import org.hyperledger.fabric.protos.msp.Identities;

rickr (Thu, 24 May 2018 14:40:04 GMT):
Follow README.md get the integration test working

vick (Thu, 24 May 2018 16:28:01 GMT):
thanks @rickr i followed the readme.md and had to install docker toolbox because i am running windows 10 home edition

vick (Thu, 24 May 2018 16:28:18 GMT):
after installing that i came back to run the fabric.sh in the docker terminal and it downloaded all the images

vick (Thu, 24 May 2018 16:28:25 GMT):
when it tried to start the containers i got this message;

vick (Thu, 24 May 2018 16:28:26 GMT):
FAB_CONFIG_GEN_VERS

vick (Thu, 24 May 2018 16:28:44 GMT):
`peer0.org2.example.com | 2018-05-24 16:26:44.885 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/msp/peer/msp folder`

vick (Thu, 24 May 2018 16:29:21 GMT):
i checked the volume mapping in the docker-compose.yaml and it is mapped to; `./e2e-2Orgs/${FAB_CONFIG_GEN_VERS}/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/:/etc/hyperledger/msp/peer:ro`

vick (Thu, 24 May 2018 16:29:42 GMT):
i can confirm that directory exists with the relevant crypto artifacts

vick (Thu, 24 May 2018 16:31:11 GMT):
do you know why it might be complaining that it can't find it?

vick (Thu, 24 May 2018 16:31:31 GMT):
${FAB_CONFIG_GEN_VERS}, maybe this variable is not being set?

vick (Thu, 24 May 2018 16:35:55 GMT):
i can see that's being exported in the .env file, also tried to run the command like this; `FAB_CONFIG_GEN_VERS=v1.1 ./fabric.sh restart`

vick (Thu, 24 May 2018 16:36:01 GMT):
but gave the same error

vick (Thu, 24 May 2018 18:26:28 GMT):
have just tried to regenerate the crypto artifacts but getting the same issue

vick (Thu, 24 May 2018 18:26:50 GMT):
so i am using this through the docker quick terminal, if anyone has any pointers would be much appreciated, thanks

dharuq (Thu, 24 May 2018 20:36:52 GMT):
Hello! Anyone has used Postgresql or MySQL for fabric_ca server and run the End2EndIT? If so which of the databases? Any tips?

vick (Thu, 24 May 2018 22:21:41 GMT):
org.hyperledger.fabric.protos.msp.Identities..SerializedIdentity

vick (Thu, 24 May 2018 22:21:45 GMT):
anyone know where this class is?

nvmadhav (Fri, 25 May 2018 02:39:03 GMT):
Has joined the channel.

gravity (Fri, 25 May 2018 09:23:44 GMT):
Hi there is it possible to generate `channel.tx` using java sdk?

gravity (Fri, 25 May 2018 10:29:47 GMT):
Hi all one more question here: how to register organization admin via java sdk?

vick (Fri, 25 May 2018 11:17:01 GMT):
i think there is some sample code you can look at for that @gravity

vick (Fri, 25 May 2018 11:17:32 GMT):
https://github.com/IBM-Blockchain/JSDKIntegrationSample have a look at this project @gravity

gravity (Fri, 25 May 2018 11:17:57 GMT):
@vick thanks, I'll take a look

vick (Fri, 25 May 2018 11:20:03 GMT):
@gravity this one might be more relevant; https://github.com/cr22rc/BMXHyperledgerFabricJSDKIntegrationSample

rickr (Fri, 25 May 2018 11:29:14 GMT):
All protos are built during mvn install

rickr (Fri, 25 May 2018 11:33:36 GMT):
@vick I would consider using vagrant I run on linux and still use that for other reasons to run Fabric I really can't help you much with windows/fabric environment I don't have any experience with it. https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/DeveloperInstructions.md

vick (Fri, 25 May 2018 11:34:20 GMT):
ok thanks, i managed to get the protos just couldn't get the rest of the integration test running

vick (Fri, 25 May 2018 11:34:27 GMT):
will do the vagrant setup instead

rickr (Fri, 25 May 2018 11:35:13 GMT):
@gravity no you can't generate channel tx to create the channel The readme.md states how the ones the SDK uses was created.

aatkddny (Fri, 25 May 2018 12:06:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6MGG6unpydhtzG46x) @gravity Well you kind of can if you hack it and use a ProcessBuilder to run configtxgen Something like this - `String command = String.format("%s -profile %s -channelID %s -outputBlock %s", CONFIGTXGEN, genesisprofile, genesischannel, genesisfilename);` That one will build the genesis block for the network if you set the variables appropriately and stick it in here `ProcessBuilder pb = pb(Paths.get(fabric, channel)).command("sh", "-c", command)`. There's a bit more to it - setting up the environment and deciding how to handle logging - but it does work. You can do all the crypto the same so you can do everything from a java app if you want to go to all the trouble.

aatkddny (Fri, 25 May 2018 12:06:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6MGG6unpydhtzG46x) @gravity Well you kind of can if you hack it and use a ProcessBuilder to run configtxgen Something like this - `String command = String.format("%s -profile %s -channelID %s -outputBlock %s", CONFIGTXGEN, genesisprofile, genesischannel, genesisfilename);` That one will build the genesis block for the network if you stick it in here `ProcessBuilder pb = pb(Paths.get(fabric, channel)).command("sh", "-c", command)`. There's a bit more to it - setting up the environment and deciding how to handle logging - but it does work. You can do all the crypto the same so you can do everything from a java app if you want to go to all the trouble.

gravity (Fri, 25 May 2018 12:30:48 GMT):
@vick @aatkddny @rickr thanks all, I'll take the given options into account

gravity (Fri, 25 May 2018 13:32:48 GMT):
Now I'm trying to create a channel via SDK. Admin user is enrolled, but request is failed with the next message: ``` orderer1-demoOrderer | 2018-05-25 12:59:08.069 UTC [msp] SatisfiesPrincipal -> DEBU a19 Checking if identity satisfies ADMIN role for demoDefaultOrgMSP orderer1-demoOrderer | 2018-05-25 12:59:08.069 UTC [cauthdsl] func2 -> DEBU a1a 0xc42000e7f8 identity 0 does not satisfy principal: This identity is not an admin orderer1-demoOrderer | 2018-05-25 12:59:08.069 UTC [cauthdsl] func2 -> DEBU a1b 0xc42000e7f8 principal evaluation fails orderer1-demoOrderer | 2018-05-25 12:59:08.070 UTC [cauthdsl] func1 -> DEBU a1c 0xc42000e7f8 gate 1527253148069895858 evaluation fails orderer1-demoOrderer | 2018-05-25 12:59:08.070 UTC [policies] Evaluate -> DEBU a1d Signature set did not satisfy policy /Channel/Application/demoDefaultOrg/Admins orderer1-demoOrderer | 2018-05-25 12:59:08.070 UTC [policies] Evaluate -> DEBU a1e == Done Evaluating *cauthdsl.policy Policy /Channel/Application/demoDefaultOrg/Admins orderer1-demoOrderer | 2018-05-25 12:59:08.070 UTC [policies] func1 -> DEBU a1f Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ demoDefaultOrg.Admins ] orderer1-demoOrderer | 2018-05-25 12:59:08.070 UTC [policies] Evaluate -> DEBU a20 Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy ``` SDK version 1.1.0 Fabric version 1.1

gravity (Fri, 25 May 2018 13:36:17 GMT):
``` fabric-ca-client register -d --id.name adminDemoDefaultOrg --id.secret adminDemoDefaultOrgpw --id.attrs "hf.Registrar.Roles=client,hf.Registrar.Attributes=*,hf.Revoker=true,hf.GenCRL=true,admin=true:ecert,abac.init=true:ecert" ``` admin was registered in this way

gravity (Fri, 25 May 2018 13:48:09 GMT):
is it correct to assume that all required certificates are in the enrollment object if I enrolled the user using fabric-ca?

aatkddny (Fri, 25 May 2018 15:47:49 GMT):
yes.

tencniveltekliko (Sat, 26 May 2018 12:07:22 GMT):
Has joined the channel.

tencniveltekliko (Sat, 26 May 2018 12:09:16 GMT):
shutdown

rjain0701 (Sun, 27 May 2018 02:09:15 GMT):
Created channel from java SDK Channel newChannel = hfclient. newChannel("foo", anOrderer, channelConfiguration, channelConfig); In the docker container log channel created successfully Questions: 1. How can I get created channel? 2. How can I check list of existing channels from docker container ?

rjain0701 (Sun, 27 May 2018 02:09:15 GMT):
Created channel from java SDK Channel newChannel = hfclient. newChannel("foo", anOrderer, channelConfiguration, channelConfig); In the docker container log channel created successfully Questions: 1. How can I get created channel? 2. How can I check list of existing channels from docker container ?

hussein.knight (Sun, 27 May 2018 11:48:18 GMT):
any one know to develop a mobile app that query from the ledger.

gravity (Sun, 27 May 2018 11:54:21 GMT):
https://jira.hyperledger.org/browse/FAB-6975 this issue still appears. tried to create a new channel via sdk and received exctly the same error any suggestions?

gravity (Sun, 27 May 2018 16:56:15 GMT):
actually, channel creation via sdk doesn't work if admin is enrolled via fabric-ca client. orderer responds that `0xc4201f67c0 identity 0 does not satisfy principal: This identity is not an admin`

gravity (Sun, 27 May 2018 19:30:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RxLRjox9XJTGXydrF) @rjain0701 1. use `hfClient.newChannel(String channelName)` with single param. it retrieves a channel object and then you can add peers(that joined that channel previously) and orderer: ``` channel = hfClient.newChannel("mychannel"); channel.addPeer(peer); channel.addOrderer(orderer); channel.initialize(); ``` 2. login into peer container and user `peer channel list` to list channel where that peer participates

gravity (Sun, 27 May 2018 19:30:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RxLRjox9XJTGXydrF) 1. use `hfClient.newChannel(String channelName)` with single param. it retrieves a channel object and then you can add peers(that joined that channel previously) and orderer: ``` channel = hfClient.newChannel("mychannel"); channel.addPeer(peer); channel.addOrderer(orderer); ``` 2. login into peer container and user `peer channel list` to list channel where that peer participates

gravity (Sun, 27 May 2018 19:30:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RxLRjox9XJTGXydrF) 1. use `hfClient.newChannel(String channelName)` with single param. it retrieves a channel object and then you can add peers(that joined that channel previously) and orderer: ``` channel = hfClient.newChannel("mychannel"); channel.addPeer(peer); channel.addOrderer(orderer); ``` 2. login into peer container and user `peer channel list` to list channel where that peer participates

gravity (Sun, 27 May 2018 19:30:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RxLRjox9XJTGXydrF) 1. use `hfClient.newChannel(String channelName)` with single param. it retrieves a channel object and then you can add peers(that joined that channel previously) and orderer: ``` channel = hfClient.newChannel("mychannel"); channel.addPeer(peer); channel.addOrderer(orderer); channel.initialize(); ``` 2. login into peer container and user `peer channel list` to list channel where that peer participates

kelvinzhong (Mon, 28 May 2018 01:38:33 GMT):
@rickr hi rick, i have got into some confusion, it seems that a client can only connect to the peer of it's own MSP, but what if a endorsement policy need other MSP's signature? how can a client send the transaction to the peer of the other MSPs.

kelvinzhong (Mon, 28 May 2018 01:38:33 GMT):
@rickr hi rick, i have got into some confusions, it seems that a client can only connect to the peer of it's own MSP, but what if a endorsement policy need other MSP's signature? how can a client send the transaction to the peer of the other MSPs.

kelvinzhong (Mon, 28 May 2018 01:38:33 GMT):
@rickr hi rick, i have got into some confusions, it seems that a client can only connect to the peer of it's own MSP, but what if a endorsement policy need the other MSP's signature? how can a client send the transaction to the peer of the other MSPs.

deep123 (Mon, 28 May 2018 06:12:11 GMT):
@rickr Hi, which REST API method should I use with fabric-sdk-java?

deep123 (Mon, 28 May 2018 06:19:56 GMT):
I want to develop a web application with fabric-sdk-java, whiich REST API can I use

zjqpower (Mon, 28 May 2018 06:21:34 GMT):
Has joined the channel.

adc (Mon, 28 May 2018 12:46:02 GMT):
@rickr, please, have a look at https://gerrit.hyperledger.org/r/#/c/22117/ I have changed the code towards your request. The change-set has merge conflicts but I will address later cause there are change-sets in the stack that need to be finished first. Thanks for your time.

MeghaGupta (Mon, 28 May 2018 14:09:14 GMT):
Has joined the channel.

MeghaGupta (Mon, 28 May 2018 14:14:39 GMT):
Hi, I am trying to create my own sample for demo pupose. I have added fiber-sdk-java in my pom, but in my code I am not able to resolve org.hyperledger.fabric.sdkintegration.SampleOrg

MeghaGupta (Mon, 28 May 2018 14:14:49 GMT):
any pointers

MeghaGupta (Mon, 28 May 2018 14:17:38 GMT):
ok got it

MeghaGupta (Mon, 28 May 2018 14:17:40 GMT):
thanks

snakejerusalem (Mon, 28 May 2018 14:36:50 GMT):
Has joined the channel.

snakejerusalem (Mon, 28 May 2018 14:40:40 GMT):
Greetings everybody. I am trying to use the java sdk to deserialize and parse the Config proto message that is used in configuration blocks, but I can't figure out how to do it. I am able to deserialize both the block and the envelope where the structure is contained, but once I try to deserialize the structure it self, I rget the following excpetion: `com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).`

snakejerusalem (Mon, 28 May 2018 16:26:39 GMT):
Nevermind, I just realized what was happening. I was trying to deserialize a ConfigEnvelope message, not a Config message.

sklymenko (Tue, 29 May 2018 06:05:07 GMT):
Has joined the channel.

zhenbing (Tue, 29 May 2018 08:58:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=P2mPCvf2c7pkaJmyo) what if I create a channel thu go binary and peers join, now I want to got the channel info?

zhenbing (Tue, 29 May 2018 08:58:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=P2mPCvf2c7pkaJmyo) @gravity @rickr With Java SDK, how can I join a channel created by go binary and how can I get the channel info tru SDK?

zhenbing (Tue, 29 May 2018 08:58:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=P2mPCvf2c7pkaJmyo) @gravity With Java SDK, how can I join a channel created by go binary and how can I get the channel info tru SDK?

kelvinzhong (Tue, 29 May 2018 09:39:24 GMT):
@rickr it seems that the fabric-sdk-go can support dynamic looking for peer base on endorsement policy, but java sdk can only choose the peer that has been add to the channel instance. Is that a bug can not support multi MSP transaction within a channel in java sdk?[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yjoZLp7kK7A2bpps2)

vick (Tue, 29 May 2018 10:47:16 GMT):
what do you have in this file when running the integration tests?

vick (Tue, 29 May 2018 10:47:29 GMT):
`/tmp/HFCSampletest.properties`

vick (Tue, 29 May 2018 10:47:39 GMT):
@rickr

rickr (Tue, 29 May 2018 11:18:52 GMT):
@gravity Creating the channel is all done/shown in End2endIT.java have to be PeerAdmin which is not a CA registered user.

gravity (Tue, 29 May 2018 11:19:43 GMT):
@rickr now I see that. but is there any way to create one more admin identity?

rickr (Tue, 29 May 2018 11:20:44 GMT):
you can create with CA admin more users that can invoke chanincod .. see the End2endIT.java all done there.

rickr (Tue, 29 May 2018 11:23:52 GMT):
@kelvinzhong Example of two orgs/domains working together is here https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Tue, 29 May 2018 11:25:50 GMT):
@vick the integration test has a simplistic sample store that show an application persisting that's what's stored there.

vick (Tue, 29 May 2018 11:27:32 GMT):
@rickr just adding in more ports to forward at the moment in the VagrantFile ... should be able to run it after that, i wasn't sure if that file was necessary for the rest since it seems to look fro it but doesn't complain if it can't find it

rickr (Tue, 29 May 2018 11:27:59 GMT):
@deep123 I seen #fabric-sdk channel someone talk of REST client but I don't any details.

kelvinzhong (Tue, 29 May 2018 11:29:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pA9j5kqcpTEw865Ab) @rickr Thanks for this! I will look into it. but this feature could be very important in actual business model, why not include to the sdk test?

rickr (Tue, 29 May 2018 11:30:23 GMT):
@snakejerusalem in most cases we wrapper the protobuf I think theres one exception we should fix.

rickr (Tue, 29 May 2018 11:32:53 GMT):
@kelvinzhong finding endorsers for a specific chaincode is what your asking that's a 1.2 feature not available yet.

aatkddny (Tue, 29 May 2018 12:14:45 GMT):
Anyone ever see this? ```2018-05-25 15:32:42.673 UTC [shim] handlePutState -> ERRO 007 [dcc05043]Received ERROR. Payload: [[dcc05043 PUT_STATE ERROR]]No ledger context for %!s(MISSING). Sending %!s(MISSING) 2018-05-25 15:32:42.673 UTC [sacc] Errorf -> ERRO 008 [[dcc05043 PUT_STATE ERROR]]No ledger context for %!!(MISSING)s(MISSING). Sending %!!(MISSING)s(MISSING) ``` Chaincode worked until I connected using a networkconfig rather than a manual build. Not sure how I screwed things up.

gravity (Tue, 29 May 2018 14:16:49 GMT):
@rickr thanks

gravity (Tue, 29 May 2018 14:18:18 GMT):
As far as I know, each chaincode runs in its own docker container. what actually happens when we install and instantiate a new chaincode from SDK? should we create a new docker container before instantiation?

aatkddny (Tue, 29 May 2018 14:23:33 GMT):
it does it for you.

gravity (Tue, 29 May 2018 14:41:15 GMT):
I'm trying to instantiate a chaincode from the sdk, but getting errors:

gravity (Tue, 29 May 2018 14:41:15 GMT):
I'm trying to instantiate a chaincode from the sdk, but getting errors: ``` peer1-defaultOrg | 2018-05-29 14:37:59.843 UTC [util] DockerBuild -> DEBU 1639 Attempting build with image hyperledger/fabric-ccenv:x86_64-1.1.0 peer1-defaultOrg | 2018-05-29 14:38:02.106 UTC [chaincode-platform] func1 -> ERRO 163a Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package go: no Go files in /opt/go/src/go peer1-defaultOrg | " peer1-defaultOrg | 2018-05-29 14:38:02.107 UTC [dockercontroller] deployImage -> ERRO 163b Error building images: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package go: no Go files in /opt/go/src/go peer1-defaultOrg | " peer1-defaultOrg | 2018-05-29 14:38:02.107 UTC [dockercontroller] deployImage -> ERRO 163c Image Output: peer1-defaultOrg | ******************** peer1-defaultOrg | peer1-defaultOrg | ******************** peer1-defaultOrg | 2018-05-29 14:38:02.107 UTC [container] unlockContainer -> DEBU 163d container lock deleted(dev-peer1-defaultOrg-testcc5-1) peer1-defaultOrg | 2018-05-29 14:38:02.107 UTC [chaincode] launchAndWaitForRegister -> DEBU 163e stopping due to error while launching: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package go: no Go files in /opt/go/src/go peer1-defaultOrg | " peer1-defaultOrg | error starting container peer1-defaultOrg | 2018-05-29 14:38:02.107 UTC [container] lockContainer -> DEBU 163f waiting for container(dev-peer1-defaultOrg-testcc5-1) lock peer1-defaultOrg | 2018-05-29 14:38:02.107 UTC [container] lockContainer -> DEBU 1640 got container (dev-peer1-defaultOrg-testcc5-1) lock peer1-defaultOrg | 2018-05-29 14:38:02.108 UTC [dockercontroller] stopInternal -> DEBU 1641 Stop container dev-peer1-defaultOrg-testcc5-1(No such container: dev-peer1-defaultOrg-testcc5-1) peer1-defaultOrg | 2018-05-29 14:38:02.109 UTC [dockercontroller] stopInternal -> DEBU 1642 Kill container dev-peer1-defaultOrg-testcc5-1 (No such container: dev-peer1-defaultOrg-testcc5-1) peer1-defaultOrg | 2018-05-29 14:38:02.110 UTC [dockercontroller] stopInternal -> DEBU 1643 Remove container dev-peer1-defaultOrg-testcc5-1 (No such container: dev-peer1-defaultOrg-testcc5-1) peer1-defaultOrg | 2018-05-29 14:38:02.110 UTC [container] unlockContainer -> DEBU 1644 container lock deleted(dev-peer1-defaultOrg-testcc5-1) peer1-defaultOrg | 2018-05-29 14:38:02.110 UTC [chaincode] func1 -> DEBU 1645 chaincode testcc5:1 launch seq completed peer1-defaultOrg | 2018-05-29 14:38:02.110 UTC [chaincode] Launch -> ERRO 1646 launchAndWaitForRegister failed: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package go: no Go files in /opt/go/src/go peer1-defaultOrg | " peer1-defaultOrg | error starting container peer1-defaultOrg | 2018-05-29 14:38:02.110 UTC [endorser] callChaincode -> DEBU 1647 [testchannel][7ffbfb2a] Exit peer1-defaultOrg | 2018-05-29 14:38:02.110 UTC [endorser] simulateProposal -> ERRO 1648 [testchannel][7ffbfb2a] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package go: no Go files in /opt/go/src/go peer1-defaultOrg | " peer1-defaultOrg | error starting container peer1-defaultOrg | 2018-05-29 14:38:02.111 UTC [endorser] simulateProposal -> DEBU 1649 [testchannel][7ffbfb2a] Exit peer1-defaultOrg | 2018-05-29 14:38:02.111 UTC [lockbasedtxmgr] Done -> DEBU 164a Done with transaction simulation / query execution [7ffbfb2a7d475167edcccab0c061fbec784d5f393b2643424a210f954fef0e37] peer1-defaultOrg | 2018-05-29 14:38:02.111 UTC [endorser] ProcessProposal -> DEBU 164b Exit: request from%!(EXTRA string=172.18.0.1:58932) ```

gravity (Tue, 29 May 2018 14:42:05 GMT):
but the chaincode was installed successfully on previous step

gravity (Tue, 29 May 2018 14:42:21 GMT):
any suggestions? thanks in advance.

gravity (Tue, 29 May 2018 14:57:15 GMT):
Why peer container tries to find Go files in /opt/go directory?

aatkddny (Tue, 29 May 2018 15:53:20 GMT):
that's in the container. go is served from GOPATH which defaults iirc to that. Have a line in your peer volumes like this - `- {CHAINCODE}:/opt/gopath/src/chaincode/` to set it to a local path

aatkddny (Tue, 29 May 2018 15:53:39 GMT):
{CHAINCODE} obviously being the local path

aatkddny (Tue, 29 May 2018 15:54:22 GMT):
Or if you want to make it really easy generate a zipped install

aatkddny (Tue, 29 May 2018 15:55:24 GMT):
``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.debug("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ```

aatkddny (Tue, 29 May 2018 15:55:45 GMT):
The Util.generate... referenced here is ripped off from the samples.

aatkddny (Tue, 29 May 2018 15:55:45 GMT):
The Util.generate... referenced here is ripped off from the samples. Well to be more accurate the whole thing is ripped off from the example, but changed around to fit a spring boot environment.

aatkddny (Tue, 29 May 2018 15:55:45 GMT):
The Util.generate... referenced here is ripped off from the samples. Well to be more accurate the whole thing is ripped off from the example, but changed around to fit a spring boot environment.

kesavants (Tue, 29 May 2018 19:19:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tjTaBShaKHEkLp3jT) @hzrari The settings grpc.NettyChannelBuilderOption.keepAliveTime, grpc.NettyChannelBuilderOption.keepAliveTimeout, grpc.NettyChannelBuilderOption.keepAliveWithoutCalls as specifed by @rickr rickr in previous post https://github.com/hyperledger/fabric-sdk-java#basic-troubleshooting resolved this for sdk client connecting remotely to external network

kesavants (Tue, 29 May 2018 19:28:06 GMT):
Does java sdk have a equivalent docs like node sdk https://fabric-sdk-node.github.io/index.html

kelvinzhong (Wed, 30 May 2018 02:46:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iGeqkWhcYH8MmfpLd) @rickr thanks~ I see

kelvinzhong (Wed, 30 May 2018 02:56:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pA9j5kqcpTEw865Ab) @rickr I have try this, it works, but still it's wired to implement this way, we need to reconstruct the channel to add the peer of the other MSP after they join into the channel, to instantiate a channel every time seems not a good design.

kelvinzhong (Wed, 30 May 2018 02:56:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pA9j5kqcpTEw865Ab) @rickr I have tried this, it works, but still it's wired to implement this way, we need to reconstruct the channel to add the peer of the other MSP after they join into the channel, to instantiate a channel every time seems not a good design.

kelvinzhong (Wed, 30 May 2018 02:57:25 GMT):
Besides, the peers of different MSP in the same channel is able to add to the channel instance, but not the eventhub. I'm not sure how this eventhub works, why can't add the eventhub of the other MSP to the channel instance, how does the sdk suppose to get the transaction result from the peers of the other MSP?

gravity (Wed, 30 May 2018 08:41:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zJFAhm6NbTfF52W4c) @aatkddny So it looks like chaincode source code must be inside of a container and located by path `{CHAINCODE}:/opt/gopath/src/chaincode/`. Is there any way to install a chaincode without providing a volume for it?

zhenbing (Wed, 30 May 2018 10:17:42 GMT):
@gravity With Java SDK, how can I join a channel created by go binary or how can I get the channel info tru SDK?

gravity (Wed, 30 May 2018 10:20:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3ifEMoheMeziqKeYp) @zhenbing ``` CryptoSuite cryptoSuite = CryptoSuite.Factory.getCryptoSuite(); HFClient hfClient = HFClient.createNewInstance(); hfClient.setCryptoSuite(cryptoSuite); hfClient.setUserContext(); Channel channel = hfClient.newChannel("channel_name"); //get existing channel channel.joinPeer(); // join peer to this channel ```

gravity (Wed, 30 May 2018 10:20:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3ifEMoheMeziqKeYp) @zhenbing ``` CryptoSuite cryptoSuite = CryptoSuite.Factory.getCryptoSuite(); this.hfClient = HFClient.createNewInstance(); this.hfClient.setCryptoSuite(cryptoSuite); this.hfClient.setUserContext(); Channel channel = this.hfClient.newChannel("channel_name"); //get existing channel channel.joinPeer(); // join peer to this channel ```

gravity (Wed, 30 May 2018 10:28:34 GMT):
@aatkddny Hi Still trying to instantiate a chaincode, but getting errors: ``` peer1-defaultOrg | 2018-05-30 10:23:52.828 UTC [endorser] simulateProposal -> ERRO d1a [testchannel][dade9226] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincode/chaincode/abac/go: cannot find package "chaincode/chaincode/abac/go" in any of: peer1-defaultOrg | /opt/go/src/chaincode/chaincode/abac/go (from $GOROOT) peer1-defaultOrg | /chaincode/input/src/chaincode/chaincode/abac/go (from $GOPATH) peer1-defaultOrg | /opt/gopath/src/chaincode/chaincode/abac/go ``` But I mounted chaincode to a peer container: `${CHAINCODE_DIR}:/opt/gopath/src/chaincode` Code to install and instantiate a chaincode: ``` ChaincodeID.Builder chaincodeIDBuilder = ChaincodeID.newBuilder().setName("abac3") .setVersion(CHAIN_CODE_VERSION); final File cc = context.getResource("classpath:chaincodes/chaincode/chaincode").getFile(); chaincodeIDBuilder.setPath("chaincode/chaincode/abac/go"); final ChaincodeID chaincodeID = chaincodeIDBuilder.build(); InstallProposalRequest installProposalRequest = hfClient.newInstallProposalRequest(); installProposalRequest.setChaincodeID(chaincodeID); installProposalRequest.setChaincodeInputStream(Utils.generateTarGzInputStream( (Paths.get(cc.getAbsolutePath(), "abac/go").toFile()), Paths.get("abac/go").toString())); ... InstantiateProposalRequest instantiateProposalRequest = this.hfClient.newInstantiationProposalRequest(); instantiateProposalRequest.setProposalWaitTime(10000); instantiateProposalRequest.setChaincodeID(chaincodeID); instantiateProposalRequest.setChaincodeLanguage(CHAIN_CODE_LANG); ... ```

zhenbing (Wed, 30 May 2018 10:40:09 GMT):
@gravity @aatkddny Try to start the path after $GOROOT/src, when I instantiate a chaincode in go binary, only need parameter "-p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02", the actual chaincode file is located at $GORROT/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

zhenbing (Wed, 30 May 2018 10:40:09 GMT):
@gravity @aatkddny Try to start the path from $GOROOT/src, when I instantiate a chaincode in go binary, only need parameter "-p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02", the actual chaincode file is located at $GORROT/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

gravity (Wed, 30 May 2018 10:58:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MhHTvzCcMyXf54QAu) @zhenbing this will work if you instantiate a chaincode from a container but I'm trying to instantiate it via sdk

AlexanderZhovnuvaty (Wed, 30 May 2018 11:38:31 GMT):
Has joined the channel.

gravity (Wed, 30 May 2018 12:49:01 GMT):
Hi all. Stuck with this error. peer cannot locate a chaincode source even if I mount chaincode source folder to a peer container: `${CHAINCODE_DIR}:/opt/gopath/src/chaincode` Any suggestions? Thanks in advance ``` peer1-defaultOrg | 2018-05-30 10:23:52.828 UTC [endorser] simulateProposal -> ERRO d1a [testchannel][dade9226] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincode/chaincode/abac/go: cannot find package "chaincode/chaincode/abac/go" in any of: peer1-defaultOrg | /opt/go/src/chaincode/chaincode/abac/go (from $GOROOT) peer1-defaultOrg | /chaincode/input/src/chaincode/chaincode/abac/go (from $GOPATH) peer1-defaultOrg | /opt/gopath/src/chaincode/chaincode/abac/go ```

rickr (Wed, 30 May 2018 13:00:56 GMT):
https://github.com/hyperledger/fabric-sdk-java#go-lang-chaincode ?

MeghaGupta (Wed, 30 May 2018 13:08:05 GMT):
Hi I am new to fabric-sdk. I want to know If we can create a channel without configtxgen tool. any pointer will help

gravity (Wed, 30 May 2018 13:12:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=62Ps6ZvjmsKzBRvkY) @rickr It makes sense If we use abac example where the vendor folder presented. But I tried another example and getting the same error. https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kWibwmM6FuHiBjBmr here is an example of a chaincode instantiation from sdk. looks like I missed something related to chaincode path, but I can't get what is wrong

aatkddny (Wed, 30 May 2018 13:53:06 GMT):
what's in your compose script?

gravity (Wed, 30 May 2018 13:58:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EjNugGiMSA9HPbCMA) @aatkddny ``` peer1-defaultOrg: container_name: peer1-defaultOrg image: hyperledger/fabric-ca-peer environment: - GOPATH=/opt/gopath - FABRIC_CA_CLIENT_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer - ENROLLMENT_URL=http://peer1-defaultOrg:peer1-defaultOrgpw@ica-defaultOrg:7054 - PEER_NAME=peer1-defaultOrg - PEER_HOME=/opt/gopath/src/github.com/hyperledger/fabric/peer - PEER_HOST=peer1-defaultOrg - PEER_NAME_PASS=peer1-defaultOrg:peer1-defaultOrgpw - CORE_PEER_ID=peer1-defaultOrg - CORE_PEER_ADDRESS=peer1-defaultOrg:7051 - CORE_PEER_LOCALMSPID=defaultOrgMSP - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/msp - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_default-network - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1-defaultOrg:7051 - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - ORG=defaultOrg - ORG_ADMIN_CERT=/data/orgs/defaultOrg/msp/admincerts/cert.pem - CORE_PEER_TLS_ENABLED=false - CORE_PEER_GOSSIP_BOOTSTRAP=peer1-defaultOrg:7051 working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: /bin/bash -c '/scripts/start-peer.sh -oo defaultOrderer -nn default-network -po defaultOrg -np 5 2>&1 | tee /data/logs/peer1-defaultOrg.log' volumes: - ./scripts:/scripts - ./data:/data - /var/run:/host/var/run - $HOME/fabric-samples/chaincode:/opt/gopath/src networks: - default-network depends_on: - setup ports: - 7066:7051 ```

aatkddny (Wed, 30 May 2018 14:08:03 GMT):
make your directory path inside the zip "src" like this `Path src = Paths.get("src", ccid.getPath());`. It automagically does the rest for you.

aatkddny (Wed, 30 May 2018 14:08:26 GMT):
Go has a peculiarity where it adds the "src" to stuff.

gravity (Wed, 30 May 2018 14:13:14 GMT):
@aatkddny Now it works as expected. Many thanks! you saved me a lot of time :)

aatkddny (Wed, 30 May 2018 14:16:21 GMT):
NP. It took me a little while to figure out.

kesavants (Wed, 30 May 2018 20:07:49 GMT):
Using java fabric SDK 1.1 implemented a channel instantiation i get error status: 500, message: instantiation policy violation: signature set did not satisfy policy any idea what this error means

tencniveltekliko (Thu, 31 May 2018 07:35:37 GMT):
@kesavants I have the same problem after switching the state database to CouchDB

Adhavpavan (Thu, 31 May 2018 09:11:35 GMT):
Has joined the channel.

Alex0 (Thu, 31 May 2018 10:09:26 GMT):
Has joined the channel.

gravity (Thu, 31 May 2018 10:45:48 GMT):
Hi all I've installed and instantiated a chaincode via sdk, received SUCCESS response, no errors in logs, but when I query a list of instantiated chaincodes in this channel on peer - it's empty. any suggestions? thanks in advance.

gravity (Thu, 31 May 2018 10:58:08 GMT):
containers for new chaincodes are up and running.

gravity (Thu, 31 May 2018 11:03:44 GMT):
Sorry, my bad forgot to send a transaction to orderer

rickr (Thu, 31 May 2018 11:59:58 GMT):
@kesavants Make sure the identity is the peer admin need to have both correct mspid and peer admin key/credentials in Enrolllment

kesavants (Thu, 31 May 2018 14:07:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gsHWBBE2Hr2CJKiNu) @rickr thx yes I use HFCACleint.enroll("admin") and set the user context for that enrollment

kesavants (Thu, 31 May 2018 16:10:34 GMT):
Trying to import fabric project cloned from https://github.com/hyperledger/fabric-sdk-java.git in eclipse fails with message project file is corrupt. Looking at error log "The processing instruction target matching "[xX][mM][lL]" is not allowed." Fixing the xml declaration in the .project seems to fix the issue not sure if any one has seen this

rickr (Thu, 31 May 2018 16:56:51 GMT):
remove the .project file

rickr (Thu, 31 May 2018 16:57:09 GMT):
import it as a maven type project

kesavants (Thu, 31 May 2018 17:49:49 GMT):
Thanks import as maven gives Failed to read the project description file (.project) for 'fabric-sdk-java'. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state.

aatkddny (Thu, 31 May 2018 18:08:03 GMT):
it's the comments at the top. delete them.

aatkddny (Thu, 31 May 2018 18:08:03 GMT):
it's the comments at the top of the project file that are causing the problem. restore it and delete them.

aatkddny (Thu, 31 May 2018 18:09:50 GMT):
Since I don't use it I also have to delete ``` net.sf.eclipsecs.core.CheckstyleBuilder ``` and `net.sf.eclipsecs.core.CheckstyleNature`

kesavants (Thu, 31 May 2018 18:50:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RDT3Gixoyfw4kyeoo) @aatkddny thx that works

kesavants (Thu, 31 May 2018 20:24:45 GMT):
I registered and enrolled an user but lost both secret and the enrollment key is there a way to register user again. I tried HFCAClient.getHFCAIdentities but does not return seem to return the secret

rickr (Thu, 31 May 2018 20:35:51 GMT):
You can only register a user once. There's a setting on the Fabric CA on the limit on how many times you can enroll

xo-Lai (Fri, 01 Jun 2018 07:00:42 GMT):
Has joined the channel.

kesavants (Fri, 01 Jun 2018 13:53:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JxkCeeQrNySQfds7v) @rickr Thx if I lose the secret is there no way to retrieve it via HFCAClient getHFCAIdentities has secret as null always

rickr (Fri, 01 Jun 2018 13:59:55 GMT):
If you could would it really be a secret ? LOL Seriously , Need to take this to the #fabric-ca channel @skarim ^^ ?

skarim (Fri, 01 Jun 2018 14:03:23 GMT):
Right, the secret is not going to be returned for a get identity request

kesavants (Fri, 01 Jun 2018 15:08:51 GMT):
Yes would not have expected secret but my client program dropped the secret and I was stuck looking for workaround

kesavants (Fri, 01 Jun 2018 15:09:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=354kf4Esijv3yRG45) Is there a way to enroll new msp admin what role would I need to regsiter user with

vick (Fri, 01 Jun 2018 16:11:28 GMT):
@rickr is there an API for the fabric-sdk yet?

rickr (Fri, 01 Jun 2018 17:17:18 GMT):
@kesavants If you lost the CA admin I don't know of any way via the api .. like I mentioned the folks on the #fabric-ca channel would know best.

kesavants (Fri, 01 Jun 2018 18:41:18 GMT):
Is there a way to register a new peer admin via java sdk

kesavants (Fri, 01 Jun 2018 19:56:35 GMT):
Upgraded to java 1.1 the application is now getting warning "eventqueue got block event NOT FOR ME" any idea what can cause this warning

rogermylife (Sun, 03 Jun 2018 13:01:15 GMT):
Has joined the channel.

tencniveltekliko (Sun, 03 Jun 2018 15:56:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Fgk9QWdnYKfLNJSug)

tencniveltekliko (Sun, 03 Jun 2018 16:03:43 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. And in the definition of peer0.org1.example.com, I have set ` - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= `

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: `environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0` And couchdb0 is defines as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0 And couchdb0 is defines as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: `environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0` And couchdb0 is defines as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following:

 environment:
   ...
   - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
   - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
   - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=
   - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=
 depends_on:
   ...
   - couchdb0
And couchdb0 is defined as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: \[environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0\] And couchdb0 is defined as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0 And couchdb0 is defined as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: ```environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0``` And couchdb0 is defined as : couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"

tencniveltekliko (Sun, 03 Jun 2018 16:07:39 GMT):
when using the example ledger given in 'src/test/fixture/sdkintegration'. If I change the docker-compose file to switch to couchDB I cannot instantiate the chaincodes anymore. For peer0.org1.example.com, 'couchdb0' is specified as the following: ```environment: ... - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= depends_on: ... - couchdb0``` And couchdb0 is defined as : ```couchdb0: container_name: couchdb0 image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, # for example map it to utilize Fauxton User Interface in dev environments. ports: - "5984:5984"```

akoenig (Mon, 04 Jun 2018 06:38:01 GMT):
Has joined the channel.

ymjnudt (Mon, 04 Jun 2018 08:17:12 GMT):
Has joined the channel.

kelvinzhong (Mon, 04 Jun 2018 11:08:35 GMT):
@rickr hi rick, is there an example of the distributed deployment in fabric? I'm not sure about the network config, my test application can install and instantiate chaincode but still have some network connection problem...

SyneBlockChainTeam (Mon, 04 Jun 2018 13:40:50 GMT):
Hi all, I am tring to create fabric-ca affiliation using java sdk 1.1 version, but I am getting *Authorization failure* error. Any help regarding this..

vick (Mon, 04 Jun 2018 14:20:56 GMT):
@rickr hey rick, have you been able to wire up the sdk to a remote debug version of fabric running?

vick (Mon, 04 Jun 2018 14:21:21 GMT):
i am trying to replicate a bug i've noticed in but trying to isolate where it's originating

valerio (Tue, 05 Jun 2018 09:46:27 GMT):
Has joined the channel.

valerio (Tue, 05 Jun 2018 09:56:33 GMT):
Hi all, I'm trying to run the hyperledger fabric java sdk, I followed the instruction on the eclipse setup guide (https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md) but I get the error: the import org.hyperledger.fabric.protos cannot be resolved. Any idea?

IgorSim (Tue, 05 Jun 2018 10:16:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gp8Ws9oSZgMWCpSXv) @kesavants Hi, as far i understand its not a problem to register new identity with right attributes, what you need to do next is to enroll with the 'new' identity, take the certificate and put into 'admincerts' folder of Peer MSP. And i guess peer should be restarted because documentation says Local MSP can't be reconfigured. Can someone shed more light on this?

IgorSim (Tue, 05 Jun 2018 10:16:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gp8Ws9oSZgMWCpSXv) @kesavants Hi, as far i understand its not a problem to register new identity with right attributes, what you need to do next is to enroll with the 'new' identity, take the certificate and put into 'admincerts' folder of Peer MSP. And i guess peer should be restarted because documentation says Local MSP can't be reconfigured, except manually. Can someone shed more light on this?

akoenig (Tue, 05 Jun 2018 11:01:43 GMT):
Hi all, is there a way to delete a channel? Not only shut down

akoenig (Tue, 05 Jun 2018 11:05:08 GMT):
In case of some UnitTests I want to remove the channels at the end of the UnitTest and the next one create the same channel and so on. But the only method i could find is "shut down" and "shut down" is not enough

rickr (Tue, 05 Jun 2018 11:27:08 GMT):
@kesavants I don't know of anyway to register a new peer admin .. maybe ask on the #fabric channel

rickr (Tue, 05 Jun 2018 11:29:11 GMT):
@tencniveltekliko did you remove all chaincode before you switched ? Need to find the error on the peer logs and ask on the #fabric-peer-endorser-committer channel

rickr (Tue, 05 Jun 2018 11:32:17 GMT):
@vick I'v only debugged the SDK itself running in an IDE

rickr (Tue, 05 Jun 2018 11:33:50 GMT):
@valerio Before trying eclipse or and IDE try to get the integration tests running as in the README.md. If they complete ok you know you have all the classes/protos.

rickr (Tue, 05 Jun 2018 11:36:13 GMT):
@akoenig I don't know of a way to delete the actual channel. The integration tests simply recycle fabric docker containers which just wipes everything.

akoenig (Tue, 05 Jun 2018 11:37:05 GMT):
@rickr exactly my problem is that i just want to create the same channel again

akoenig (Tue, 05 Jun 2018 11:37:35 GMT):
but when i do this i get "because of error: error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1" because there is already a channel with this name on this orderer

akoenig (Tue, 05 Jun 2018 11:37:54 GMT):
but the orderer class has no public method for the channel ... :/

rickr (Tue, 05 Jun 2018 11:38:34 GMT):
I don't think there's any means to delete a channel from the Fabric itself

akoenig (Tue, 05 Jun 2018 11:39:19 GMT):
mhm so my idea was to try to get the channel by name and restart it

akoenig (Tue, 05 Jun 2018 11:39:48 GMT):
but there is no option for this, because the client is new and the orderer can't give me the info because it's private and and not public

rickr (Tue, 05 Jun 2018 11:40:06 GMT):
the very same channel ?

akoenig (Tue, 05 Jun 2018 11:42:24 GMT):
My idea was to have an init method for the channel in the UnitTests (Because i can't delete it). To look if there is already a channel with this name

akoenig (Tue, 05 Jun 2018 11:43:16 GMT):
but when the client is a new instance there is no channel on this client (correct), but the orderer HAS already this channel (see the correct error above) but i can't get this info, because the method is not public

akoenig (Tue, 05 Jun 2018 11:43:21 GMT):
or am i wrong? :)

akoenig (Tue, 05 Jun 2018 11:44:19 GMT):
my UnitTests in Java are in a random orderer thats why i need to this

akoenig (Tue, 05 Jun 2018 11:44:19 GMT):
my UnitTests in Java are in a random order thats why i need to this

rickr (Tue, 05 Jun 2018 11:48:24 GMT):
Integrations test store the channel in the sampestore you could do the same. Check if it's in there https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L594

rickr (Tue, 05 Jun 2018 11:49:05 GMT):
If all you're asking is reconstruct the channel on the client side.

akoenig (Tue, 05 Jun 2018 11:52:10 GMT):
I will have a look at this

akoenig (Tue, 05 Jun 2018 12:10:59 GMT):
@rickr okay, for the first Implementation this will do the trick, thanks.

skarim (Tue, 05 Jun 2018 13:51:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ADkeQ8cCwY9uDobox) @SyneBlockChainTeam Does the user that you are using to create affiliations have the `hf.AffiliationMgr` attribute?

kesavants (Tue, 05 Jun 2018 18:59:18 GMT):
Does class ChaincodeEndorsementPolicy do any of the from method to create endorsement policy support cli syntax OR('Org1.member','Org2.member') if not what is the spec for fromBytes

donsonZhang (Wed, 06 Jun 2018 01:38:38 GMT):
java chaincode is now support in fabric v1.1 ?

kiattchaip (Wed, 06 Jun 2018 05:08:47 GMT):
No, it isn't. Find more detail at https://jira.hyperledger.org/browse/FAB-8063.

kiattchaip (Wed, 06 Jun 2018 05:08:47 GMT):
No. Find more detail at https://jira.hyperledger.org/browse/FAB-8063.

SyneBlockChainTeam (Wed, 06 Jun 2018 07:15:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PK7eXFAEazrbqrZD7) @skarim Thanks for the response. I am using HFCAClient to create affiliation which has hf.AffiliationMgr as a static variable. Do I need to explicitly set that attribute while creating new affiliation?

MarvinBechtold (Wed, 06 Jun 2018 08:14:14 GMT):
Has joined the channel.

dharuq (Wed, 06 Jun 2018 08:45:49 GMT):
Hello! I am using mongodb for the sampleStore trying to run my version of End2endAndBackAgainIT, but when i try to register a new user this peace of code: sampleOrg.getCAClient().register(rr, sampleOrg.getAdmin()) (retrive the enrollment Secret) is throwing this: org.hyperledger.fabric_ca.sdk.exception.InvalidArgumentException: Crypto primitives not set. Anyone can help me?

dharuq (Wed, 06 Jun 2018 08:45:49 GMT):
Hello! I am using mongodb for the sampleStore trying to run my version of End2endAndBackAgainIT, but when i try to register a new user this peace of code: *sampleOrg.getCAClient().register(rr, sampleOrg.getAdmin(*)) (retrive the enrollment Secret) is throwing this: *org.hyperledger.fabric_ca.sdk.exception.InvalidArgumentException: Crypto primitives not set.* Anyone can help me?

kiattchaip (Wed, 06 Jun 2018 09:28:23 GMT):
Did you set an crypto suite to an HFCAClient instance before using? In the End2endIT, it has something like this `ca.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite())`.

kiattchaip (Wed, 06 Jun 2018 09:28:23 GMT):
Did you set a crypto suite to a HFCAClient instance before using? In the End2endIT, it has something like this `ca.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite())`.

dharuq (Wed, 06 Jun 2018 10:08:45 GMT):

setup.png

dharuq (Wed, 06 Jun 2018 10:08:45 GMT):

setup.png

dharuq (Wed, 06 Jun 2018 10:08:45 GMT):

setup.png

dharuq (Wed, 06 Jun 2018 10:08:45 GMT):

setup.png

dharuq (Wed, 06 Jun 2018 10:08:46 GMT):

reconstruct channel.png

gravity (Wed, 06 Jun 2018 10:15:33 GMT):
Hello I'm trying to invoke a chaincode but getting an exception: `Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 54cb3b8795144a1ca775bab0555369a1c62b1e82c955fe5ee9da8bd72aa8ddb9 status 10` when `channel.sendTransaction` is called, I also call a `get()` to block until receiving a response. Any suggestions?

CasperPS (Wed, 06 Jun 2018 10:29:12 GMT):
Has joined the channel.

gravity (Wed, 06 Jun 2018 10:55:57 GMT):
solved: have set a correct MspId value in endorsement policy.

rickr (Wed, 06 Jun 2018 11:27:48 GMT):
@kiattchaip @donsonZhang No Java chaincode is not supported last I heard.

gravity (Wed, 06 Jun 2018 11:52:29 GMT):
Hi @rickr could you please explain what transientMap means for query/invoke requests? ``` Map tm2 = new HashMap<>(); tm2.put("HyperLedgerFabric", "QueryByChaincodeRequest:JavaSDK".getBytes(UTF_8)); tm2.put("method", "QueryByChaincodeRequest".getBytes(UTF_8)); ``` Thanks in advance

rickr (Wed, 06 Jun 2018 12:28:39 GMT):
You can pass any data/parameter you want to you chaincode without it showing up in the ledger like arguments do showing what invoke the chaincode.

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: ```io.grpc.StatusRuntimeException: UNAVAILABLE: io exception```

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: `2018-06-06 08:24:41.829 ERROR 96745 --- [nio-8096-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.block.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer ` which comes back to this: ```io.grpc.StatusRuntimeException: UNAVAILABLE: io exception``` from here `at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2764) [fabric-sdk-java-1.1.0.jar:na]`

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: ```2018-06-06 08:24:41.829 ERROR 96745 --- [nio-8096-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.block.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer ``` which comes back to this: ```io.grpc.StatusRuntimeException: UNAVAILABLE: io exception``` from here `at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2764) [fabric-sdk-java-1.1.0.jar:na]`

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: ```2018-06-06 08:24:41.829 ERROR 96745 --- [nio-8096-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.block.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer ``` which comes back to this: ```io.grpc.StatusRuntimeException: UNAVAILABLE: io exception``` from here `at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2764) [fabric-sdk-java-1.1.0.jar:na]` that comes from this ```Caused by: java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_162] ``` The full stack trace is silly long so I won't print it all. Anyone come across an issue where things start having problems when you increase the number of channels in a single peer? In this case it isn't even that many - there's about 20 or so. This is mature code - it's been working for weeks. Literally the only change is to my internal configuration file to up the number of orgs and the number of channels. Everything comes up fine until we get to the instantiate.

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: ``` 2018-06-06 08:24:41.829 ERROR 96745 --- [nio-8096-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.block.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer ``` which comes back to this: ``` io.grpc.StatusRuntimeException: UNAVAILABLE: io exception ``` from here ```at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2764) [fabric-sdk-java-1.1.0.jar:na]``` that comes from this ```Caused by: java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_162] ``` The full stack trace is silly long so I won't print it all. Anyone come across an issue where things start having problems when you increase the number of channels in a single peer? In this case it isn't even that many - there's about 20 or so. This is mature code - it's been working for weeks. Literally the only change is to my internal configuration file to up the number of orgs and the number of channels. Everything comes up fine until we get to the instantiate.

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: ``` 2018-06-06 08:24:41.829 ERROR 96745 --- [nio-8096-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.block.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer ``` which comes back to this: ``` io.grpc.StatusRuntimeException: UNAVAILABLE: io exception ``` from here ```at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2764) [fabric-sdk-java-1.1.0.jar:na]``` that comes from this ```Caused by: java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_162] ``` The full stack trace is silly long so I won't print it all. Anyone come across an issue where things start having problems when you increase the number of channels in a single peer? In this case it isn't even that many - there's about 20 or so. This is mature code - it's been working for weeks. Literally the only change is to my internal configuration file to up the number of orgs and the number of channels. Everything comes up fine until we get to the instantiate.

aatkddny (Wed, 06 Jun 2018 12:32:18 GMT):
So I'm facing an odd problem instantiating chaincode. I've added a bunch more channels to my fabric network and all of a sudden I'm getting these: ``` 2018-06-06 08:24:41.829 ERROR 96745 --- [nio-8096-exec-2] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1.block.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer ``` which comes back to this: ``` io.grpc.StatusRuntimeException: UNAVAILABLE: io exception ``` from here ``` at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:2764) [fabric-sdk-java-1.1.0.jar:na] ``` that comes from this ```Caused by: java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_162] ``` The full stack trace is silly long so I won't print it all. Anyone come across an issue where things start having problems when you increase the number of channels in a single peer? In this case it isn't even that many - there's about 20 or so. This is mature code - it's been working for weeks. Literally the only change is to my internal configuration file to up the number of orgs and the number of channels. Everything comes up fine until we get to the instantiate.

rickr (Wed, 06 Jun 2018 12:38:31 GMT):
What's the status of the peer you're sending it to ? Is it still up ? Were there any logs produced by it ?

aatkddny (Wed, 06 Jun 2018 12:38:47 GMT):
It's up. It appears normal. No errors or exceptions.

aatkddny (Wed, 06 Jun 2018 12:39:27 GMT):
The last message pair is for the prior channel ``` 2018-06-06 12:24:36.415 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 0ff Created state database amazon-block-channel_sacc 2018-06-06 12:24:36.422 UTC [kvledger] CommitWithPvtData -> INFO 100 Channel [amazon-block-channel]: Committed block [1] with 1 transaction(s) ```

aatkddny (Wed, 06 Jun 2018 12:39:27 GMT):
The last message pair is for the prior channel ``` 2018-06-06 12:24:36.415 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 0ff Created state database amazon-block-channel_sacc 2018-06-06 12:24:36.422 UTC [kvledger] CommitWithPvtData -> INFO 100 Channel [amazon-block-channel]: Committed block [1] with 1 transaction(s) ``` Then nothing for this one.

rickr (Wed, 06 Jun 2018 12:42:39 GMT):
Maybe add client trace see if it shows anything ? Where it's sending etc ..

aatkddny (Wed, 06 Jun 2018 12:52:01 GMT):
I will. My first thought was to see if anyone else had run across this. I'm in preparing a demo of this puppty and the last minute request to add more participants has uncovered this little gem.

aatkddny (Wed, 06 Jun 2018 12:52:01 GMT):
I will. My first thought was to see if anyone else had run across this. I'm in preparing a demo of this puppy and the last minute request to add more participants has uncovered this little gem.

aatkddny (Wed, 06 Jun 2018 13:00:57 GMT):
Last part of peer log ``` 2018-06-06 12:58:29.914 UTC [common/deliverevents] Deliver -> DEBU 299a Starting new Deliver handler 2018-06-06 12:58:29.914 UTC [common/deliver] Handle -> DEBU 299b Starting new deliver loop for 172.23.0.1:36680 2018-06-06 12:58:29.915 UTC [common/deliver] Handle -> DEBU 299c Attempting to read seek info message from 172.23.0.1:36680 2018-06-06 12:58:29.916 UTC [common/deliver] deliverBlocks -> DEBU 299d [channel: hulu-block-channel] Received seekInfo (0xc422483820) start: > stop: > from 172.23.0.1:36680 2018-06-06 12:58:29.916 UTC [fsblkstorage] Next -> DEBU 299e Initializing block stream for iterator. itr.maxBlockNumAvailable=0 2018-06-06 12:58:29.917 UTC [fsblkstorage] newBlockfileStream -> DEBU 299f newBlockfileStream(): filePath=[/var/hyperledger/production/ledgersData/chains/chains/hulu-block-channel/blockfile_000000], startOffset=[0] 2018-06-06 12:58:29.926 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 29a0 Remaining bytes=[13120], Going to peek [8] bytes 2018-06-06 12:58:29.928 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 29a1 Returning blockbytes - length=[13118], placementInfo={fileNum=[0], startOffset=[0], bytesOffset=[2]} 2018-06-06 12:58:29.928 UTC [fsblkstorage] nextBlockBytesAndPlacementInfo -> DEBU 29a2 blockbytes [13118] read from file [0] 2018-06-06 12:58:29.928 UTC [common/deliver] deliverBlocks -> DEBU 29a3 [channel: hulu-block-channel] Delivering block for (0xc422483820) for 172.23.0.1:36680 2018-06-06 12:58:29.929 UTC [fsblkstorage] waitForBlock -> DEBU 29a4 Going to wait for newer blocks. maxAvailaBlockNumber=[0], waitForBlockNum=[1] ``` First attempt to turn on tracing for the SDK was a dismal failure.

kesavants (Wed, 06 Jun 2018 13:43:03 GMT):
I had a similar error for which @rickr pointed me to https://github.com/hyperledger/fabric-sdk-java#basic-troubleshooting setting these values grpc.NettyChannelBuilderOption.keepAliveTime, grpc.NettyChannelBuilderOption.keepAliveTimeout, grpc.NettyChannelBuilderOption.keepAliveWithoutCalls but my scenario was different connected to network on cloud

dharuq (Wed, 06 Jun 2018 13:49:16 GMT):
@rickr you know how to solve this? [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iEwTnDGT62aQzM4NW)

aatkddny (Wed, 06 Jun 2018 14:15:05 GMT):
HFCA client needs hfca.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite());

aatkddny (Wed, 06 Jun 2018 14:15:57 GMT):
Assuming you did this somewhere: Security.addProvider(new BouncyCastleProvider());

dharuq (Wed, 06 Jun 2018 14:35:02 GMT):
Yes, I am doing that.. as showed in the images that I have uploaded @aatkddny [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yG2W7uxeoEhZz9oqv)

aatkddny (Wed, 06 Jun 2018 18:59:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kyGMEQqmzZrTccKJq) Has to be a Docker issue. Upping the memory limit to 16G from 14 fixed that particular issue. Although as an aside, it's really really struggling with a network of this size on a single machine. I'm getting device errors all over the place.

kiattchaip (Thu, 07 Jun 2018 04:08:20 GMT):
@dharuq You have to set the crypto suite to a HFCAClient instance. From your snapshots, you set the crypto suite to the HFClient client, not the HFCAClient instance.

kiattchaip (Thu, 07 Jun 2018 04:08:20 GMT):
@dharuq You have to set the crypto suite to a HFCAClient instance. From your snapshots, you set the crypto suite to the HFClient instance, not the HFCAClient instance.

kiattchaip (Thu, 07 Jun 2018 04:08:20 GMT):
@dharuq You have to set a crypto suite to a HFCAClient instance. From your snapshots, you set a crypto suite to a HFClient instance, not a HFCAClient instance.

KarandeepSingh (Thu, 07 Jun 2018 05:27:49 GMT):
Has joined the channel.

dharuq (Thu, 07 Jun 2018 08:06:30 GMT):
Thanks @kiattchaip 😁 @kiattchaip [ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RJvkJk2qgxMHzbwiz)

MeghaGupta (Thu, 07 Jun 2018 13:47:57 GMT):
Hi, Is anyone tried to store any assets in blockchain with help of fiber-sdk-java

jayjaybillings (Thu, 07 Jun 2018 16:00:39 GMT):
Has joined the channel.

jayjaybillings (Thu, 07 Jun 2018 16:06:01 GMT):
I have fabric-sdk-java mostly building in Eclipse, but I'm getting two build errors saying that the Payload and Envelope classes are missing. Anyone seen this before?

jayjaybillings (Thu, 07 Jun 2018 16:09:47 GMT):
It looks like the Payload and Envelope protocol buffers did not build.

rickr (Thu, 07 Jun 2018 16:48:47 GMT):
Make sure you have run the integration tests as suggested in the README.md if they pass your environment is good and all classes must have been built.

MarceloAzevedo (Thu, 07 Jun 2018 16:51:15 GMT):
Has joined the channel.

MarceloAzevedo (Thu, 07 Jun 2018 16:53:49 GMT):
Hello guys! I'm starting to use java sdk now... Is there any first tutorial like byfn?

jayjaybillings (Thu, 07 Jun 2018 17:47:22 GMT):
Got it. The problem was with the order in which I ran the mvn commands.

jayjaybillings (Fri, 08 Jun 2018 01:55:14 GMT):
@rickr Thanks! It was g2g with mvn in a shell, just not showing up right with Eclipse.

abraham (Fri, 08 Jun 2018 05:31:44 GMT):
Has joined the channel.

akoenig (Fri, 08 Jun 2018 10:59:12 GMT):
Hi, based on the E2E-Test i want to install a second chaincode. So I created a new .go-file and have written some methods. The installProposalRequest has a directory of the go-path

akoenig (Fri, 08 Jun 2018 10:59:41 GMT):
if (isFooChain) { // on foo chain install from directory. installProposalRequest.setChaincodeSourceLocation(Paths.get(TEST_FIXTURES_PATH, CHAIN_CODE_FILEPATH).toFile());

akoenig (Fri, 08 Jun 2018 11:01:13 GMT):
(thats from the E2E-Tests example) and then i set the installProposalRequest.chainCodeName to one of these files. But it has no effect. How can I install different chaincodes? Or must they placed in different folders?

akoenig (Fri, 08 Jun 2018 11:04:10 GMT):
and when both files are in the same folder i get exceptions like Error returned from build: 1 "can't load package: package github.com/example_cc: found packages test (minting_example_cc.go) and main (move_example_cc.go) in /chaincode/input/src/github.com/example_cc

akoenig (Fri, 08 Jun 2018 11:04:36 GMT):
so is there a way to install more than one chaincode on the peers with the current sdk?

aatkddny (Fri, 08 Jun 2018 12:51:28 GMT):
trying to load a bunch of data into a channel to use as reference data. the app doing the load is single threaded and it brought to light something i hadn't considered. this particular job is literally persisting k,v as strings - which get cast to byte[] in the go chaincode, so it couldn't be much simpler. v is small - less than 500 bytes of text. the r/t time is around two seconds. which makes it seem like the put to the orderer is waiting until the next block is cut until it returns. it's not the end of the world, but it will change how we think about writing to the blockchain at scale - lots more threads than we first thought. has anyone else noticed this or did i manage to mess up my (very simple) test somehow.

rickr (Fri, 08 Jun 2018 13:44:57 GMT):
Is that just the time to put it on the orderer itself ?

aatkddny (Fri, 08 Jun 2018 14:23:00 GMT):
No that's the total R/T. The time sending to the orderer is here - it's a little less than 2.1s so the vast majority of the time. Don't worry about the names, they've been obfuscated ``` 2018-06-08 10:20:03.434 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Sending transaction to orderer 2018-06-08 10:20:05.499 WARN 64704 --- [pool-5-thread-1] org.hyperledger.fabric.sdk.Channel : Channel repchannel eventqueue got block event NOT FOR ME channelId xxxchannel from Channel xxxchannel eventqueue got block event with block number: 1531 for channel: xxxchannel, from Eventhub: xxx-peer1.xxx.com 2018-06-08 10:20:05.514 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Finished transaction a298b4925e02dd41cc3997972d043625bdf65cc2ce8a1a689bf9f3263e5c4358. Status was SUCCESS ```

aatkddny (Fri, 08 Jun 2018 14:23:00 GMT):
No that's the total R/T. The time sending to the orderer is here - it's a little less than 2.1s so the vast majority of the time. Don't worry about the names, they've been obfuscated, the two log messages from InvokeFabric are around the `TransactionEvent te = channel.sendTransaction(successful).get(invokeTime, TimeUnit.SECONDS);` call. ``` 2018-06-08 10:20:03.434 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Sending transaction to orderer 2018-06-08 10:20:05.499 WARN 64704 --- [pool-5-thread-1] org.hyperledger.fabric.sdk.Channel : Channel repchannel eventqueue got block event NOT FOR ME channelId xxxchannel from Channel xxxchannel eventqueue got block event with block number: 1531 for channel: xxxchannel, from Eventhub: xxx-peer1.xxx.com 2018-06-08 10:20:05.514 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Finished transaction a298b4925e02dd41cc3997972d043625bdf65cc2ce8a1a689bf9f3263e5c4358. Status was SUCCESS ```

aatkddny (Fri, 08 Jun 2018 14:23:00 GMT):
No that's the total R/T. The time sending to the orderer is here - it's a little less than 2.1s so the vast majority of the time. Don't worry about the names, they've been obfuscated, the two log messages from InvokeFabric are around the `TransactionEvent te = channel.sendTransaction(successful).get(invokeTime, TimeUnit.SECONDS);` call. InvokeTime here is silly high, so it isn't that. ``` 2018-06-08 10:20:03.434 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Sending transaction to orderer 2018-06-08 10:20:05.499 WARN 64704 --- [pool-5-thread-1] org.hyperledger.fabric.sdk.Channel : Channel repchannel eventqueue got block event NOT FOR ME channelId xxxchannel from Channel xxxchannel eventqueue got block event with block number: 1531 for channel: xxxchannel, from Eventhub: xxx-peer1.xxx.com 2018-06-08 10:20:05.514 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Finished transaction a298b4925e02dd41cc3997972d043625bdf65cc2ce8a1a689bf9f3263e5c4358. Status was SUCCESS ```

aatkddny (Fri, 08 Jun 2018 14:23:00 GMT):
The time sending to the orderer is here - it's a little less than 2.1s so the vast majority of the time. Don't worry about the names, they've been obfuscated, the two log messages from InvokeFabric are around the `TransactionEvent te = channel.sendTransaction(successful).get(invokeTime, TimeUnit.SECONDS);` call. InvokeTime here is silly high, so it isn't that. ``` 2018-06-08 10:20:03.434 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Sending transaction to orderer 2018-06-08 10:20:05.499 WARN 64704 --- [pool-5-thread-1] org.hyperledger.fabric.sdk.Channel : Channel repchannel eventqueue got block event NOT FOR ME channelId xxxchannel from Channel xxxchannel eventqueue got block event with block number: 1531 for channel: xxxchannel, from Eventhub: xxx-peer1.xxx.com 2018-06-08 10:20:05.514 INFO 64704 --- [-blockchain/agy] com.mo.fabric.facade.InvokeFabric : Finished transaction a298b4925e02dd41cc3997972d043625bdf65cc2ce8a1a689bf9f3263e5c4358. Status was SUCCESS ```

kelvinzhong (Sat, 09 Jun 2018 09:24:23 GMT):
@rickr hi rick, I have deploy a distributed network in docker swarm, and started the application, but if there have no transaction for a while the eventhub could not received the event any more, is there any config could set the keep alive for the eventhub?

kelvinzhong (Sat, 09 Jun 2018 09:24:23 GMT):
@rickr hi rick, I have deploy a distributed network in docker swarm, and started the application, but seems the eventhub would lost the connection if there have no transaction for a while, how can I debug this? BTW, I have already set the keep alive param for the eventhub when I construct it.

MarvinBechtold (Sat, 09 Jun 2018 16:11:43 GMT):
Hello, I hope somebody can help me. When I send my successful ProposalResponses to the orderer with channel.sendTransaction(successfulProposals), I get this log on the console: ERROR Channel - Channel channelname unsuccessful sendTransaction to orderer orderer.example.com (grpcs://localhost:7050).

MarvinBechtold (Sat, 09 Jun 2018 16:12:04 GMT):
Does anyone have an idea what goes wrong?

httran88 (Sun, 10 Jun 2018 04:03:46 GMT):
try grpc instead of grpcs, normally local testing isn't using tls

khalifa (Sun, 10 Jun 2018 07:18:46 GMT):
Hi all I am developping a java client that communicate with my blockchain. In my java code, I enroll again the admin and I try to send a query However, i got this error ERROR CryptoPrimitives - Cannot validate certificate. Error is: signature check failed Certificate [0] Version: 3 SerialNumber: 169195925483891049291001689070156112549517931656 IssuerDN: C=US,ST=North Carolina,O=Hyperledger,OU=Fabric,CN=rca-org0 Start Date: Fri Jun 08 15:40:00 CEST 2018 Final Date: Sat Jun 08 15:45:00 CEST 2019 SubjectDN: C=US,ST=North Carolina,O=Hyperledger,OU=peer+OU=org1,CN=peer1-xxxx Public Key: EC Public Key [ad:0a:4a:40:c7:2e:b1:47:a2:7c:eb:30:20:6a:f0:4e:e8:64🇧🇩3e] X: e59844b344cb38e0515710b6f0969c754ebfb836d1f65259e78a11bf1ddc587e Y: fbc9b643dc860a3c849bef704e8608bad44f2efa010a6f6c6ae9cfcd6cd46f92 Signature Algorithm: SHA256withECDSA Signature: 304402206f66e7c32503e02caaed291affe60407 1d9adeea1a2d7f24a6783448c099fe250220091d fb66eded141b1a4f406fd0fc20305a230ef84f36 a927a57fa9cc366c4c74 Extensions: critical(true) KeyUsage: 0x80 critical(true) BasicConstraints: isCa(false) critical(false) 2.5.29.14 value = DER Octet String[20] critical(false) 2.5.29.35 value = Sequence Tagged [0] IMPLICIT DER Octet String[20] critical(false) 2.5.29.17 value = Sequence Tagged [2] IMPLICIT DER Octet String[12] critical(false) 1.2.3.4.5.6.7.8.1 value = java.io.EOFException: DEF length 116 object truncated by 84 Have you any idea how to follow this issue. Thanks in advance

MarvinBechtold (Sun, 10 Jun 2018 08:22:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=E6JbsjnhLcKHNHMra) @httran88 There was a problem with the tls. I disabled it and now it works.

httran88 (Sun, 10 Jun 2018 18:53:17 GMT):
@khalifa what SDK version are you using? make sure you are using SNAPSHOT or 1.1.0

khalifa (Mon, 11 Jun 2018 07:52:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=88aK9Cubn9HFCGQBM) @httran88 Thank you for your response. This was the problem, I changed the version to 1.1.0 and it works :)

MarceloAzevedo (Mon, 11 Jun 2018 12:44:38 GMT):
Hello, can someone teach me how to run End2endIT test example?

MarceloAzevedo (Mon, 11 Jun 2018 12:45:11 GMT):
I tried to execute this test but I got an error

MarceloAzevedo (Mon, 11 Jun 2018 12:45:28 GMT):

Clipboard - 11 de Junho de 2018 às 09:45

vick (Mon, 11 Jun 2018 12:48:11 GMT):
@MarceloAzevedo what have you done so far?, what's your current setup?

MarceloAzevedo (Mon, 11 Jun 2018 12:48:35 GMT):
I followed the README.md file and setup the eclipse environment

MarceloAzevedo (Mon, 11 Jun 2018 12:48:35 GMT):
@vick I followed the README.md file and setup the eclipse environment

vick (Mon, 11 Jun 2018 12:49:21 GMT):
ok, is your code compiling? it looks like you're not running the right test ... no Junit tests found seems to be a setup problem

MarceloAzevedo (Mon, 11 Jun 2018 12:49:46 GMT):
yes, the build was successful

MarceloAzevedo (Mon, 11 Jun 2018 12:50:13 GMT):
@vick I did the mvn install command and everything went good

vick (Mon, 11 Jun 2018 12:50:52 GMT):
did you bring up a sample fabric network?

MarceloAzevedo (Mon, 11 Jun 2018 12:51:07 GMT):
no...

vick (Mon, 11 Jun 2018 12:51:28 GMT):
you will need to do that but that is not the cause of the error you are getting above @MarceloAzevedo

vick (Mon, 11 Jun 2018 12:52:02 GMT):
can you please check if you need a junit plugin for eclipse? @MarceloAzevedo

vick (Mon, 11 Jun 2018 12:52:43 GMT):
@MarceloAzevedo maybe check on google, here; https://stackoverflow.com/questions/20057771/no-junit-tests-found-in-eclipse

MarceloAzevedo (Mon, 11 Jun 2018 12:52:59 GMT):
let me check!

MarceloAzevedo (Mon, 11 Jun 2018 12:54:49 GMT):
@vick using the link you sent solved the problem but another one came up :(

MarceloAzevedo (Mon, 11 Jun 2018 12:55:02 GMT):

Clipboard - 11 de Junho de 2018 às 09:54

vick (Mon, 11 Jun 2018 12:56:01 GMT):
hmm ... you'll have to check that one for google too ... not sure i haven't seen it when i was running mine

MarceloAzevedo (Mon, 11 Jun 2018 13:03:20 GMT):
I looking for it too

aatkddny (Mon, 11 Jun 2018 13:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kv47DEuHM5Yj7fkMx) So I spent a few minutes adding a line or two to the camel route that's invoking the fabric to do this particular processing to run in parallel. It looks (to me at least) like it doesn't return until a block is cut. I see a steady procession of puts to the orderer as one would expect, and every couple of seconds a rash of completions for everything from the last couple of seconds. Just something to be aware of if anyone is trying to push data in at scale...

aatkddny (Mon, 11 Jun 2018 13:20:20 GMT):
Oh and if you really load it the eventhub bombs out...

aatkddny (Mon, 11 Jun 2018 13:20:20 GMT):
Oh and if you really load it the eventhub bombs out... ``` 2018-06-11 13:18:45.760 UTC [kvledger] CommitWithPvtData -> INFO 092 Channel [stationchannel]: Committed block [34] with 10 transaction(s) 2018-06-11 13:18:46.120 UTC [kvledger] CommitWithPvtData -> INFO 093 Channel [stationchannel]: Committed block [35] with 10 transaction(s) 2018-06-11 13:18:46.385 UTC [kvledger] CommitWithPvtData -> INFO 094 Channel [stationchannel]: Committed block [36] with 10 transaction(s) 2018-06-11 13:18:46.549 UTC [kvledger] CommitWithPvtData -> INFO 095 Channel [stationchannel]: Committed block [37] with 10 transaction(s) 2018-06-11 13:18:47.048 UTC [kvledger] CommitWithPvtData -> INFO 096 Channel [stationchannel]: Committed block [38] with 10 transaction(s) 2018-06-11 13:18:47.397 UTC [kvledger] CommitWithPvtData -> INFO 097 Channel [stationchannel]: Committed block [39] with 10 transaction(s) 2018-06-11 13:18:47.844 UTC [kvledger] CommitWithPvtData -> INFO 098 Channel [stationchannel]: Committed block [40] with 10 transaction(s) 2018-06-11 13:18:48.121 UTC [kvledger] CommitWithPvtData -> INFO 099 Channel [stationchannel]: Committed block [41] with 10 transaction(s) 2018-06-11 13:18:48.626 UTC [kvledger] CommitWithPvtData -> INFO 09a Channel [stationchannel]: Committed block [42] with 10 transaction(s) 2018-06-11 13:18:49.002 UTC [kvledger] CommitWithPvtData -> INFO 09b Channel [stationchannel]: Committed block [43] with 10 transaction(s) 2018-06-11 13:18:49.329 UTC [kvledger] CommitWithPvtData -> INFO 09c Channel [stationchannel]: Committed block [44] with 10 transaction(s) 2018-06-11 13:18:49.477 UTC [eventhub_producer] Chat -> ERRO 09e error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.477 UTC [eventhub_producer] Chat -> ERRO 09d error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.479 UTC [eventhub_producer] Chat -> ERRO 09f error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.481 UTC [eventhub_producer] Chat -> ERRO 0a0 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.482 UTC [kvledger] CommitWithPvtData -> INFO 0a1 Channel [stationchannel]: Committed block [45] with 10 transaction(s) 2018-06-11 13:18:49.561 UTC [common/deliver] deliverBlocks -> WARN 0a2 [channel: stationchannel] Error sending to 172.24.0.1:51252: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.600 UTC [kvledger] CommitWithPvtData -> INFO 0a3 Channel [stationchannel]: Committed block [46] with 10 transaction(s) 2018-06-11 13:18:49.695 UTC [kvledger] CommitWithPvtData -> INFO 0a4 Channel [stationchannel]: Committed block [47] with 10 transaction(s) 2018-06-11 13:18:49.811 UTC [kvledger] CommitWithPvtData -> INFO 0a5 Channel [stationchannel]: Committed block [48] with 10 transaction(s) 2018-06-11 13:18:49.922 UTC [kvledger] CommitWithPvtData -> INFO 0a6 Channel [stationchannel]: Committed block [49] with 10 transaction(s) ```

aatkddny (Mon, 11 Jun 2018 13:20:20 GMT):
Oh and if you really load it with eventing set true in the peer definition the eventhub bombs out... ``` 2018-06-11 13:18:45.760 UTC [kvledger] CommitWithPvtData -> INFO 092 Channel [stationchannel]: Committed block [34] with 10 transaction(s) 2018-06-11 13:18:46.120 UTC [kvledger] CommitWithPvtData -> INFO 093 Channel [stationchannel]: Committed block [35] with 10 transaction(s) 2018-06-11 13:18:46.385 UTC [kvledger] CommitWithPvtData -> INFO 094 Channel [stationchannel]: Committed block [36] with 10 transaction(s) 2018-06-11 13:18:46.549 UTC [kvledger] CommitWithPvtData -> INFO 095 Channel [stationchannel]: Committed block [37] with 10 transaction(s) 2018-06-11 13:18:47.048 UTC [kvledger] CommitWithPvtData -> INFO 096 Channel [stationchannel]: Committed block [38] with 10 transaction(s) 2018-06-11 13:18:47.397 UTC [kvledger] CommitWithPvtData -> INFO 097 Channel [stationchannel]: Committed block [39] with 10 transaction(s) 2018-06-11 13:18:47.844 UTC [kvledger] CommitWithPvtData -> INFO 098 Channel [stationchannel]: Committed block [40] with 10 transaction(s) 2018-06-11 13:18:48.121 UTC [kvledger] CommitWithPvtData -> INFO 099 Channel [stationchannel]: Committed block [41] with 10 transaction(s) 2018-06-11 13:18:48.626 UTC [kvledger] CommitWithPvtData -> INFO 09a Channel [stationchannel]: Committed block [42] with 10 transaction(s) 2018-06-11 13:18:49.002 UTC [kvledger] CommitWithPvtData -> INFO 09b Channel [stationchannel]: Committed block [43] with 10 transaction(s) 2018-06-11 13:18:49.329 UTC [kvledger] CommitWithPvtData -> INFO 09c Channel [stationchannel]: Committed block [44] with 10 transaction(s) 2018-06-11 13:18:49.477 UTC [eventhub_producer] Chat -> ERRO 09e error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.477 UTC [eventhub_producer] Chat -> ERRO 09d error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.479 UTC [eventhub_producer] Chat -> ERRO 09f error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.481 UTC [eventhub_producer] Chat -> ERRO 0a0 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.482 UTC [kvledger] CommitWithPvtData -> INFO 0a1 Channel [stationchannel]: Committed block [45] with 10 transaction(s) 2018-06-11 13:18:49.561 UTC [common/deliver] deliverBlocks -> WARN 0a2 [channel: stationchannel] Error sending to 172.24.0.1:51252: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.600 UTC [kvledger] CommitWithPvtData -> INFO 0a3 Channel [stationchannel]: Committed block [46] with 10 transaction(s) 2018-06-11 13:18:49.695 UTC [kvledger] CommitWithPvtData -> INFO 0a4 Channel [stationchannel]: Committed block [47] with 10 transaction(s) 2018-06-11 13:18:49.811 UTC [kvledger] CommitWithPvtData -> INFO 0a5 Channel [stationchannel]: Committed block [48] with 10 transaction(s) 2018-06-11 13:18:49.922 UTC [kvledger] CommitWithPvtData -> INFO 0a6 Channel [stationchannel]: Committed block [49] with 10 transaction(s) ```

aatkddny (Mon, 11 Jun 2018 13:20:20 GMT):
Oh and if you really load it with eventing set true in the peer definition the eventhub bombs out. *edit* It does it with eventing false also. It doesn't like a lot of load... ``` 2018-06-11 13:18:45.760 UTC [kvledger] CommitWithPvtData -> INFO 092 Channel [stationchannel]: Committed block [34] with 10 transaction(s) 2018-06-11 13:18:46.120 UTC [kvledger] CommitWithPvtData -> INFO 093 Channel [stationchannel]: Committed block [35] with 10 transaction(s) 2018-06-11 13:18:46.385 UTC [kvledger] CommitWithPvtData -> INFO 094 Channel [stationchannel]: Committed block [36] with 10 transaction(s) 2018-06-11 13:18:46.549 UTC [kvledger] CommitWithPvtData -> INFO 095 Channel [stationchannel]: Committed block [37] with 10 transaction(s) 2018-06-11 13:18:47.048 UTC [kvledger] CommitWithPvtData -> INFO 096 Channel [stationchannel]: Committed block [38] with 10 transaction(s) 2018-06-11 13:18:47.397 UTC [kvledger] CommitWithPvtData -> INFO 097 Channel [stationchannel]: Committed block [39] with 10 transaction(s) 2018-06-11 13:18:47.844 UTC [kvledger] CommitWithPvtData -> INFO 098 Channel [stationchannel]: Committed block [40] with 10 transaction(s) 2018-06-11 13:18:48.121 UTC [kvledger] CommitWithPvtData -> INFO 099 Channel [stationchannel]: Committed block [41] with 10 transaction(s) 2018-06-11 13:18:48.626 UTC [kvledger] CommitWithPvtData -> INFO 09a Channel [stationchannel]: Committed block [42] with 10 transaction(s) 2018-06-11 13:18:49.002 UTC [kvledger] CommitWithPvtData -> INFO 09b Channel [stationchannel]: Committed block [43] with 10 transaction(s) 2018-06-11 13:18:49.329 UTC [kvledger] CommitWithPvtData -> INFO 09c Channel [stationchannel]: Committed block [44] with 10 transaction(s) 2018-06-11 13:18:49.477 UTC [eventhub_producer] Chat -> ERRO 09e error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.477 UTC [eventhub_producer] Chat -> ERRO 09d error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.479 UTC [eventhub_producer] Chat -> ERRO 09f error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.481 UTC [eventhub_producer] Chat -> ERRO 0a0 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.482 UTC [kvledger] CommitWithPvtData -> INFO 0a1 Channel [stationchannel]: Committed block [45] with 10 transaction(s) 2018-06-11 13:18:49.561 UTC [common/deliver] deliverBlocks -> WARN 0a2 [channel: stationchannel] Error sending to 172.24.0.1:51252: rpc error: code = Canceled desc = context canceled 2018-06-11 13:18:49.600 UTC [kvledger] CommitWithPvtData -> INFO 0a3 Channel [stationchannel]: Committed block [46] with 10 transaction(s) 2018-06-11 13:18:49.695 UTC [kvledger] CommitWithPvtData -> INFO 0a4 Channel [stationchannel]: Committed block [47] with 10 transaction(s) 2018-06-11 13:18:49.811 UTC [kvledger] CommitWithPvtData -> INFO 0a5 Channel [stationchannel]: Committed block [48] with 10 transaction(s) 2018-06-11 13:18:49.922 UTC [kvledger] CommitWithPvtData -> INFO 0a6 Channel [stationchannel]: Committed block [49] with 10 transaction(s) ```

kesavants (Mon, 11 Jun 2018 14:24:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=E53e3ESg4XLD7cnfz) Anyone knows what is the cause for warning "got block event NOT FOR ME"

rahulhegde (Mon, 11 Jun 2018 21:31:00 GMT):
we are suddenly receiving a protocol negotiation error on Fabric Release v1.0.6. This is using the Java SDK. ``` 2018-06-11 11:27:16.457 [grpc-default-executor-1] ERROR EventHub - EventHub:peer01zyabgb40.jas.clsnet terminated is false shutdown is false has error UNAVAILABLE: Channel closed while performing protocol negotiation org.hyperledger.fabric.sdk.exception.EventHubException: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at org.hyperledger.fabric.sdk.EventHub$1.onError(EventHub.java:229) [fabric-sdk-java-1.0.1.jar!/:?] at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:380) [grpc-stub-1.5.0.jar!/:1.5.0] at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:419) [grpc-core-1.5.0.jar!/:1.5.0] at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:60) [grpc-core-1.5.0.jar!/:1.5.0] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:493) [grpc-core-1.5.0.jar!/:1.5.0] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$500(ClientCallImpl.java:422) [grpc-core-1.5.0.jar!/:1.5.0] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:525) [grpc-core-1.5.0.jar!/:1.5.0] at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [grpc-core-1.5.0.jar!/:1.5.0] at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:102) [grpc-core-1.5.0.jar!/:1.5.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Channel closed while performing protocol negotiation at io.grpc.Status.asRuntimeException(Status.java:526) ~[grpc-core-1.5.0.jar!/:1.5.0] ``` Do we have any help.

Marc.K (Tue, 12 Jun 2018 08:41:25 GMT):
Has joined the channel.

vijay5378 (Tue, 12 Jun 2018 11:54:10 GMT):
I am having a ssl issue with fabric-ca server when I try to enroll a user. I have the registration code in a tomcat servlet. The error is `javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:328) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:322) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1614) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052) at sun.security.ssl.Handshaker.process_record(Handshaker.java:987) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:1122) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:454) at org.hyperledger.fabric_ca.sdk.HFCAClient.enroll(HFCAClient.java:398) at org.proxycapital.EB5.registration.RegisterOrganization.enrollBootStrapAdmin(RegisterOrganization.java:426) at org.proxycapital.EB5.registration.RegisterOrganization.generateMSP(RegisterOrganization.java:386) at org.proxycapital.web.UserRegistration.setup(UserRegistration.java:103) at org.proxycapital.web.UserRegistration.doGet(UserRegistration.java:41) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:486) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)'

vijay5378 (Tue, 12 Jun 2018 11:54:33 GMT):
I have tried adding ca-cert to tomcat's keystore but doesnt seem to help...any pointers?

rickr (Tue, 12 Jun 2018 12:28:13 GMT):
@aatkddny There is a batch time out .. The orderer will wait that number of seconds before cutting a new block. Discuss on #fabric-orderer channel to discuss the consequence of tampering with that. Can you move off of eventhub and use the peer eventing services ?

aatkddny (Tue, 12 Jun 2018 12:37:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JCSEmhXnt9AamgM3i) So here's the rub @rickr. I *am* using peer eventing. I don't actually want the event hub stuff, I just get it as part of the fabric. The `CORE_PEER_EVENTS_ADDRESS=127.0.0.1:7053` hack causes connection reset exceptions in the SDK whether I suppress the 'eventUrl: ' value in the networkConnection json or not. Since this is in the peer rather than the client, the `"eventing" : false,` flag does nothing other than mean I don't get the messages. Which I don't want anyway.

aatkddny (Tue, 12 Jun 2018 12:37:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JCSEmhXnt9AamgM3i) So here's the rub @rickr. I *am* using peer eventing. I don't actually want the event hub stuff, I just get it as part of the fabric. The `CORE_PEER_EVENTS_ADDRESS=127.0.0.1:7053` hack causes connection reset exceptions in the SDK whether I suppress the 'eventUrl: ' value in the networkConnection json or not. Since this is in the peer rather than the client, the `"eventing" : false,` flag does nothing other than mean I don't get the messages. Which I don't want anyway. There's also the little matter of getting same in BMX for parity. But I'll set that aside from this conversation. The code runs fine sin gee threaded. It runs fine with 10 threads. When I step it up to 200 it blows itself out of the water after a couple of seconds. It's likely some form of buffer/queue overflow and I have a lira in for it so since this is test code I'll restrict the load until there's a better solution

aatkddny (Tue, 12 Jun 2018 12:37:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JCSEmhXnt9AamgM3i) So here's the rub @rickr. I *am* using peer eventing. I don't actually want the event hub stuff, I just get it as part of the fabric. The `CORE_PEER_EVENTS_ADDRESS=127.0.0.1:7053` hack causes connection reset exceptions in the SDK whether I suppress the 'eventUrl: ' value in the networkConnection json or not. Since this is in the peer rather than the client, the `"eventing" : false,` flag does nothing other than mean I don't get the messages. Which I don't want anyway. There's also the little matter of getting same in BMX for parity. But I'll set that aside from this conversation. The code runs fine single threaded. It runs fine with 10 threads. When I step it up to 200 it blows itself out of the water after a couple of seconds. It's likely some form of buffer/queue overflow and I have a lira in for it so since this is test code I'll restrict the load until there's a better solution

aatkddny (Tue, 12 Jun 2018 12:37:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JCSEmhXnt9AamgM3i) So here's the rub @rickr. I *am* using peer eventing. I don't actually want the event hub stuff, I just get it as part of the fabric. The `CORE_PEER_EVENTS_ADDRESS=127.0.0.1:7053` hack causes connection reset exceptions in the SDK whether I suppress the 'eventUrl: ' value in the networkConnection json or not. Since this is in the peer rather than the client, the `"eventing" : false,` flag does nothing other than mean I don't get the messages. Which I don't want anyway. There's also the little matter of getting same in BMX for parity. But I'll set that aside from this conversation. The code runs fine single threaded. It runs fine with 10 threads. When I step it up to 200 it blows itself out of the water after a couple of seconds. It's likely some form of buffer/queue overflow and I have a jira in for it so since this is test code I'll restrict the load until there's a better solution

rickr (Tue, 12 Jun 2018 12:41:21 GMT):
@vijay5378 You need to CA TLS certs setup when you create the HFCAClient you do that with properties `pemBytes` or `pemFile` if you're just testing and your certs dont have the correct CA Name you also need to add a `allowAllHostNames` property

vijay5378 (Tue, 12 Jun 2018 12:46:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xB6broEfKngiCM9jF) @rickr Thanks for the response. I have passed ca-cert.pem through a Properties file to HFCAClient while setting up (I copied it over from the fabric-ca server). CA does have TLS enabled. In the meantime, I have written a java program (without using tomcat) and it seems to work fine. I am encountering this issue only when I call caclient.enroll from within a servlet. Also, where do I need to set allowAllHostNames? In the fabric-ca-server.yaml file?

rickr (Tue, 12 Jun 2018 12:51:13 GMT):
@aatkddny Maybe not following .. but let me ask: In the neworkConnection profile to get JUST the peer eventing service you should have NO `eventUrl` set at all and have `eventSource: true` set on the peers. Does that not work ?

rickr (Tue, 12 Jun 2018 12:53:03 GMT):
@vijay5378 `allowAllHostNames` set to true as a property just like pemBytes and pemFile

rickr (Tue, 12 Jun 2018 12:59:10 GMT):
@rahulhegde Only thing that comes to mind off the bat is you're not using the correct pemFile or pemBytes needed for TLS negotiation. For IBM JDK you also need to define some Java properties. It's documented in the README.md

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It does appear to stop the initial error in the peer docker logs, but then the java client starts erroring out, regardless of the combination of event*** properties I set in the network config that I produce to allow same client application to connect. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours.

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It does appear to stop the initial error in the peer docker logs, but then the java client starts erroring out, regardless of the combination of event*** properties I set in the network config that I produce to allow same client application to connect. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?*

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It does appear to stop the initial error in the peer docker logs, but then the java client starts erroring out, regardless of the combination of event*** properties I set in the network config that I produce to allow same client application to connect. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?* I thought it was to suppress the eventhub, not turn on peer eventing.

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It does appear to stop the initial error in the peer docker logs, but then the java client starts erroring out, regardless of the combination of event*** properties I set in the network config that I produce to allow same client application to connect. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?* I thought it was to suppress the eventhub, not turn on peer eventing. I also thought the flag was "eventing" : false. I need to go back to look at the PeerOptions again.

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It does appear to stop the initial error in the peer docker logs, but then the java client starts erroring out, regardless of the combination of event*** properties I set in the network config that I produce to allow same client application to connect. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?* I thought it was to suppress the eventhub, not turn on peer eventing.

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It does appear to stop the initial error in the peer docker logs, but then the java client starts erroring out, regardless of the combination of event*** properties I set in the network config that I produce to allow same client application to connect. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?* I thought it was to suppress the eventhub, not turn on peer eventing. It doesn't matter for this - it fails both ways, but that's a knowledge gap on my part...

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It doesn't stop the initial error in the peer docker logs, so it isn't much of a hack.. Regardless of whether it is there or not though, the java client starts erroring out, regardless of the combination of event*** properties I set in the network config. Meaning whether eventUrl is there or not and whether eventSource is set true or false. By that time I gthrew my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?* I thought it was to suppress the eventhub, not turn on peer eventing. It doesn't matter for this - it fails both ways, but that's a knowledge gap on my part...

aatkddny (Tue, 12 Jun 2018 12:59:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) That doesn't work because the problem is in the peer, not the client. There's a hack for the peer - as I said before but probably with too much brevity - that points the event address to localhost which is supposed to suppress the peer problem. It doesn't stop the initial error in the peer docker logs, so it isn't much of a hack.. Regardless of whether it is there or not though, the java client starts erroring out, regardless of the combination of event*** properties I set in the network config. Meaning whether eventUrl is there or not and whether eventSource is set true or false. By that time I threw my hands up and set threadCount=10 and let it run for a couple of hours. *edit: wait - eventSource: true ?* I thought it was to suppress the eventhub, not turn on peer eventing. It doesn't matter for this - it fails both ways, but that's a knowledge gap on my part...

rickr (Tue, 12 Jun 2018 13:12:07 GMT):
@kesavants Not sure how you got there but you have eventhubs and/or peereventing services sending for another channel. That message should tell you what the channel name is and the what the block has for it channel

vijay5378 (Tue, 12 Jun 2018 13:57:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Lz76ThyR9nZtPRKwx) @rickr Tried it, doesnt seem to work. Any setting that needs to be done while using tomcat? I have added ca-cert.pem to the default truststore of tomcat. Will fabric-ca use tomcat's truststore?

vijay5378 (Tue, 12 Jun 2018 13:57:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qnwELeZf8WYKBttFe) @rickr Tried it, doesnt seem to work. Any setting that needs to be done while using tomcat? I have added ca-cert.pem to the default truststore of tomcat. Will fabric-ca use tomcat's truststore?

aatkddny (Tue, 12 Jun 2018 17:18:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=72mghcNMpB4Sto7ZG) See above. No it doesn't work.

vini_heitor (Tue, 12 Jun 2018 17:25:59 GMT):
Has joined the channel.

vijay5378 (Tue, 12 Jun 2018 17:38:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZbJv3PFyBGXDmY8Q6) @rickr I have also tried installing the certificate in ubuntu's trust store - doesnt work, maybe i am missing something..?

aatkddny (Tue, 12 Jun 2018 17:53:27 GMT):
this may be obvious - but it screwed me over for a while till I traced the code. You need to set the "true" in `allowAllHostNames` as a String `"true"` rather than a boolean `true` or it doesn't work

yacovm (Tue, 12 Jun 2018 17:53:56 GMT):
@rahulhegde you're using IBM JRE ?

yacovm (Tue, 12 Jun 2018 17:54:26 GMT):
using oracle JRE is much simpler... no special incantations needed

rahulhegde (Tue, 12 Jun 2018 21:14:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=723oBjMAp4tRKAJRC) @yacovm @rickr - Thanks. we found this triggered because of a disk fill-up which failed with multiple error - `Jetty ALPN/NPN has not been properly configured.` This is resolved.

yacovm (Tue, 12 Jun 2018 21:14:55 GMT):
you should really monitor you disk space @rahulhegde

yacovm (Tue, 12 Jun 2018 21:14:55 GMT):
you should really monitor your disk space @rahulhegde

yacovm (Tue, 12 Jun 2018 21:15:02 GMT):
:rolling_eyes:

yacovm (Tue, 12 Jun 2018 21:15:48 GMT):
while i assume this can be hard, with fabric being a hungry disk space consuming monster

yacovm (Tue, 12 Jun 2018 21:16:11 GMT):
have you tried enabling compression on the file system?

rahulhegde (Tue, 12 Jun 2018 21:16:34 GMT):
there were core.PID files created which filled up the space in progression.

rahulhegde (Tue, 12 Jun 2018 21:16:34 GMT):
there were core.PID files created which filled up the space in progression. we have put gut-estimate on the file-space requirement considering the volume. But this was on the client side which triggers this behavior.

vijay5378 (Wed, 13 Jun 2018 06:22:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MxdqdAvwd9EdM9MKW) @aatkddny Yeah I got that. When you pass it as a java.util.properties, cant really set it as boolean.

vijay5378 (Wed, 13 Jun 2018 06:24:03 GMT):
However, any other pointers on resolving the tomcat/fabric-ca issue will be greatly appreciated. Fundamental question - should the ca-cert.pem of the fabric-ca-server be added to tomcat's trust store? Anyone who has experience with the same, please ping me

deep123 (Wed, 13 Jun 2018 09:11:57 GMT):
@rickr Hi I am using fabric-sdk-java and trying to create a channel. I get the below error while creating channel : Bad deliver expected status 200, got 400, Channel foo

deep123 (Wed, 13 Jun 2018 09:12:25 GMT):
Can you please help

deep123 (Wed, 13 Jun 2018 09:20:01 GMT):
I had timeout error and after changing the ORDERER_WAIT_TIME in Config.java, now I get the above error

deep123 (Wed, 13 Jun 2018 09:20:01 GMT):
@rickr I had timeout error and after changing the ORDERER_WAIT_TIME in Config.java, now I get the above error

rickr (Wed, 13 Jun 2018 11:20:44 GMT):
Looks like the server got your request so need to look at the fabric orderer and peer logs for insight. Has the channel been created once already ?

aatkddny (Wed, 13 Jun 2018 12:31:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kJQ4Wqhe6EzrT9tgk) That's not strictly true though is it - pemBytes isn't a string.

aatkddny (Wed, 13 Jun 2018 12:31:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kJQ4Wqhe6EzrT9tgk) That's not strictly true though is it - pemBytes isn't a string. The underlying hash table allows you to put(Object, Object)

aatkddny (Wed, 13 Jun 2018 12:35:43 GMT):
@vijay5378 One other thing that may or may not matter in your case - as well as the `allowAllHostNames` in the properties I found I needed to also set `hostnameOverride` to my domain in there to have it work as I wanted it to.

chriszhenghf (Wed, 13 Jun 2018 15:10:06 GMT):
tps

vijay5378 (Thu, 14 Jun 2018 05:58:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2L4vP7nBxCNCLXtc8) @aatkddny Thanks. You are right. I resolved it by adding the ca certificate chain to tomcat's trust store. Thanks a lot for taking time to help out.

gravity (Thu, 14 Jun 2018 07:39:22 GMT):
Hello is there any way to pass parameters to a chaincode except setArgs method? because passing parameters as an array or list is not a very convenient way

deep123 (Thu, 14 Jun 2018 09:19:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eCjf7FLCKAvm2r2AX) @rickr Hi I deleted the docker images and tried again. I get the same error again

deep123 (Thu, 14 Jun 2018 09:19:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eCjf7FLCKAvm2r2AX) @rickr Hi I deleted the docker images and tried again. I get the same timeout error again

rickr (Thu, 14 Jun 2018 11:44:19 GMT):
@gravity https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L562 ?

rickr (Thu, 14 Jun 2018 11:50:18 GMT):
@deep123 Is this running the SDK's integration tests with the provided docker-compose ? Running on the same system ?

amolpednekar (Fri, 15 Jun 2018 07:02:22 GMT):
Not sure if this is the right channel to ask, but I was trying out IBM Blockchain Platform starter plan, and set up a network with 2 orgs. Was able to register, enroll users with the registrar and invoke, query chaincodes But how to get Peer admin keystore/certs so that I can instantiate/upgrade new chaincodes? Didnt find any such info in the connection profile @aatkddny

akoenig (Fri, 15 Jun 2018 08:51:05 GMT):
@amolpednekar the E2E-Test from the example creates a user, set the usercontext to the channel. then you can instantiate the chaincode

akoenig (Fri, 15 Jun 2018 08:51:18 GMT):
on the channel/peers of the channel

MeghaGupta (Fri, 15 Jun 2018 11:22:00 GMT):
Hi, I have cloned the https://github.com/hyperledger/fabric-sdk-java. now I want to run make configtxgen cryptogen. but I am getting error make: *** No rule to make target 'configtxgen'.

MeghaGupta (Fri, 15 Jun 2018 11:22:09 GMT):
I am new to this .. Please HELP

MeghaGupta (Fri, 15 Jun 2018 11:25:07 GMT):
make is for GO I think then what is there for our java sdk

akoenig (Fri, 15 Jun 2018 11:27:28 GMT):
in which folder do you execute the the make comand?

rickr (Fri, 15 Jun 2018 12:27:05 GMT):
@MeghaGupta Please follow the README.md provided. You don't need to just starting out run `configtxgen` . A function fabric network is already set up for the integration tests which you can follow to see the SDK in action.

rickr (Fri, 15 Jun 2018 12:27:05 GMT):
@MeghaGupta Please follow the README.md provided. You don't need to just starting out run `configtxgen` . A functioning fabric network is already set up for the integration tests which you can follow to see the SDK in action.

rickr (Fri, 15 Jun 2018 12:31:57 GMT):

rickr (Fri, 15 Jun 2018 12:32:21 GMT):
@amolpednekar https://chat.hyperledger.org/channel/fabric-sdk-java?msg=f4Juz8RnZKwd7xoRM

aatkddny (Fri, 15 Jun 2018 13:46:16 GMT):
@rickr Is the GA date for the 1.2 SDK (as opposed to pulling a snapshot) the same as for the base Fabric - the 18th iirc?

kesavants (Fri, 15 Jun 2018 14:12:53 GMT):
It seems you cannot add peer to org.hyperledger.fabric.sdk.Channel once it is initialized. When a new organization is onboarded to existing network do we have to recreate the channel object again ?

gravity (Fri, 15 Jun 2018 14:26:16 GMT):
Hi all trying to send a transaction, but receiving the exception: `Channel testchannel failed to place transaction on Orderer. Cause: UNSUCCESSFUL` any suggestions? thanks in advance

gravity (Fri, 15 Jun 2018 14:26:16 GMT):
Hi all trying to send a transaction, but receiving the exception: `Channel testchannel failed to place transaction` any suggestions? thanks in advance

szytko (Sat, 16 Jun 2018 11:53:41 GMT):
Has joined the channel.

rickr (Mon, 18 Jun 2018 11:41:58 GMT):
The features changes in the SDK are in the works can't answer until approved and testing. When it's cut I'm not sure

rickr (Mon, 18 Jun 2018 11:45:18 GMT):
@kesavants right now yes The changes coming should allow it .

rickr (Mon, 18 Jun 2018 11:46:46 GMT):
@gravity yes: you need to provide more information. Look at the Orderer logs too.

vijay5378 (Mon, 18 Jun 2018 12:42:40 GMT):
Is there any way that the orderer genesis block can be created using the java sdk?

rickr (Mon, 18 Jun 2018 12:43:13 GMT):
no

vijay5378 (Mon, 18 Jun 2018 12:53:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Y4XJnTDvfTTMfx2qj) @rickr Is that reply to my question?

rickr (Mon, 18 Jun 2018 12:56:41 GMT):
yes

vijay5378 (Mon, 18 Jun 2018 12:59:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yD882p4A8aaZXwYoZ) @rickr Thanks @rickr. Is the orderer genesis block mandatory? If yes, would I need to use configtxgen for that alone? Any reason why it is that way? I am trying to build a web app where the channel can be created automatically once the crypto files are being generated. Any workaround/tips would be great

rickr (Mon, 18 Jun 2018 13:04:09 GMT):
The README.md states how it was created. If there was a way to do it I would have provided an example in the integration tests. The means to do that can be have your webapp invoke the fabric commands. Many argued that the SDKs should not do any channel/peer administration at all. In hindsight I'll admit that they were probably right.

vijay5378 (Mon, 18 Jun 2018 13:08:20 GMT):
@rickr thanks for the answer. Though I do not understand the rationale behind why the SDK shouldn't do channel/peer administration, I am sure you guys would have had a very valid reason. I will do as you suggested and invoke the fabric command using the webapp.

tinytiny123 (Mon, 18 Jun 2018 17:16:09 GMT):
Has joined the channel.

tinytiny123 (Mon, 18 Jun 2018 17:16:30 GMT):
Hey I'm having trouble instantiating chaincode via the java sdk. I keep getting the following error: instantiation policy violation: signature set did not satisfy policy The requesting user is the CA-Admin and should most definitely have permissions to do so. We tried it with the default chaincode endorsement policies and changed them to even accept any member. Really tried a lot of different things and none of them seemed to work. Help would be appreciated

IgorSim (Tue, 19 Jun 2018 07:30:12 GMT):
@tinytiny123 i'm not sure but perhaps you need Peer Admin (and not CA-Admin) to execute 'instantiate' command?

kiattchaip (Tue, 19 Jun 2018 07:49:56 GMT):
IgorSim is right. The use who has the right to install and instantiate chaincode is PeerAdmin.

kiattchaip (Tue, 19 Jun 2018 07:49:56 GMT):
IgorSim is right. The user who has the right to install and instantiate chaincode is PeerAdmin.

IgorSim (Tue, 19 Jun 2018 07:57:33 GMT):
I have one question about 'setUserContext()' method defined on HFClient and TransactionProposalRequest. I have network with two orgs, and i used ORG admin from ORG1 during channel initialization. When sending trx. proposal using ORG admin from ORG1 it works fine but when i switch to ORG admin from ORG2 (transactionProposalRequest.setUsercontext(ORG2 Admin user)) i see 'forbidden' error reported by the orderer. It looks like i must use same user that i used during channel init. I don't think its policy issue because i use default policy that grants write permissions to every ORG Admin user. Perhaps something is mixed up on my side..i just wanted to check if switching 'user context' should work fine

sgiessmann (Tue, 19 Jun 2018 13:18:46 GMT):
Has joined the channel.

MeghaGupta (Wed, 20 Jun 2018 06:59:33 GMT):
please help me with the path -> "configtxgenToolPath": "fabric-path/fabric-samples/bin"

MeghaGupta (Wed, 20 Jun 2018 07:00:26 GMT):
what will be configtxgenToolPath in fabric-sdk-java or I need to download any other code repo

MeghaGupta (Wed, 20 Jun 2018 07:00:36 GMT):
I am new to this

amolpednekar (Wed, 20 Jun 2018 09:05:03 GMT):
@rickr In the integration tests, why do we not override hostname for CA cert? Instead they're set to allowAllHostNames? As opposed to orderer, peer where we set hostNameOverride to CN of their respective certs?

mbwhite (Wed, 20 Jun 2018 09:15:18 GMT):
Has joined the channel.

rickr (Wed, 20 Jun 2018 11:54:33 GMT):
@IgorSim It's not realistic to have two admins from different orgs using the same channel object in the same application. See https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Wed, 20 Jun 2018 11:59:41 GMT):
@amolpednekar difference is in how Apache HTTP client and GRPC client expose that feature.

rickr (Wed, 20 Jun 2018 12:01:11 GMT):
@MeghaGupta I'm not familiar with _configtxgenToolPath_

amolpednekar (Wed, 20 Jun 2018 12:06:34 GMT):
@rickr Ah, makes sense. How to set hostnameOverride option for CA then?

rickr (Wed, 20 Jun 2018 12:13:44 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric_ca/sdk/HFCAClientTest.java#L268 ?

diyan.filipov (Wed, 20 Jun 2018 13:21:29 GMT):
Has joined the channel.

diyan.filipov (Wed, 20 Jun 2018 13:21:40 GMT):
Hi guys! I hope I will be able to find some answers here regarding mutual TLS between Fabric CA server and fabric Java SDK client app

diyan.filipov (Wed, 20 Jun 2018 13:21:58 GMT):
More precisely - I have a configured CA server with TLS enabled which I am able to reach via curl (providing the --key & --cert files configured in the ca-server config). But I saw that I am not able to configure and use a CA client from the Java SDK with client key and certificate, because the configuration section in `certificateAuthorities.caName.tlsCACerts.client` keyfile and certfile is not read at all from the NetworkConfig - `org.hyperledger.fabric.sdk.NetworkConfig#getTLSCerts`. So I guess mutual TLS from the SDK is not possible for now or there is some workaround you guys could point me to? Furthermore, if I don't use the `NetworkConfig` class to load my configs and use Properties to init the `HFCAClient`, again, it is not possible to pass the props needed for mutual TLS, because HFCAClient supports only `pemFile` and `allowAllHostNames` properties (check the `HFCAClient` constructor java docs)

Marc.K (Wed, 20 Jun 2018 13:37:26 GMT):
Hey I'm currently setting up our project with the Java SDK and I'm having problems understanding how the Channel object is supposed to be used. Let's assume I set up a channel for two orgs and install & init some chaincode on it. Now how does the second Org connect to the channel? I only found the reconstruct function within the NetworkConfig class. Would I have to provide the channel configuration as JSON to the other org for them to use the channel?

MeghaGupta (Wed, 20 Jun 2018 13:48:17 GMT):
Hi I am getting Exception ClientProtocolException

MeghaGupta (Wed, 20 Jun 2018 13:48:38 GMT):
rg.hyperledger.fabric_ca.sdk.exception.InfoException: Url:http://localhost:7054, Failed to get info

MeghaGupta (Wed, 20 Jun 2018 13:48:45 GMT):
How to resove this one

MeghaGupta (Wed, 20 Jun 2018 13:49:01 GMT):
I am running sdk with TLS

MeghaGupta (Wed, 20 Jun 2018 14:16:05 GMT):
ca_peerOrg1 | 2018/06/20 14:02:32 http: TLS handshake error from 192.168.0.1:53682: tls: oversized record received with length 21536

MeghaGupta (Wed, 20 Jun 2018 14:16:11 GMT):
any idea on this

MeghaGupta (Wed, 20 Jun 2018 14:16:28 GMT):
I have freshly started the container

rickr (Wed, 20 Jun 2018 21:44:53 GMT):
@diyan.filipov support is only for mutual TLS to Fabric .. don't have it for Fabric CA.

rickr (Wed, 20 Jun 2018 21:44:53 GMT):
@diyan.filipov support is only for mutual TLS to Fabric .. don't have it for Fabric CA. All request include credentials of the user to be authenticated using TLS server side only to make sure it's not in clear will make it secure. Mutual TLS won't provide that much of an added benefit.

rickr (Wed, 20 Jun 2018 21:45:33 GMT):
@Marc.K look at this https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Wed, 20 Jun 2018 21:52:11 GMT):
@MeghaGupta Must be giving bad certificate

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get `2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get `2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s)` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get `2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s)` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get `2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s)` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get as expected: ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get proposal response status as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get as expected: ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get all proposal response statuses as successful for this transaction

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get as expected: ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get all proposal response statuses as successful for this transaction When the transaction even comes, I get `Received invalid transaction event. Transaction ID 49595966804fd9570010ae126143434ad7f6362a329385205fd721928d3ee527 status 10` , but this should happen while sending the txn, when checking proposal response, yes? Thoughts?

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am purposely sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get as expected: ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get all proposal response statuses as "successful" for this transaction When the transaction even comes, I get `Received invalid transaction event. Transaction ID 49595966804fd9570010ae126143434ad7f6362a329385205fd721928d3ee527 status 10` , but shouldn't this msg be shown while after receiving proposal responses? Thoughts?

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am intentionally sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get as expected: ` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ` But in the SDK, I get all proposal response statuses as "successful" for this transaction When the transaction even comes, I get `Received invalid transaction event. Transaction ID 49595966804fd9570010ae126143434ad7f6362a329385205fd721928d3ee527 status 10` , but shouldn't this msg be shown while after receiving proposal responses? Thoughts?

amolpednekar (Thu, 21 Jun 2018 09:50:13 GMT):
@rickr I am intentionally sending an invoke transaction to a non-endorsing peer, and on the peer logs, I get as expected: ``` 2018-06-21 09:46:29.581 UTC [vscc] Invoke -> WARN 36c Endorsement policy failure for transaction txid=d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641, err: signature set did not satisfy policy 2018-06-21 09:46:29.581 UTC [committer/txvalidator] validateTx -> ERRO 36d VSCCValidateTx for transaction txId = d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641 returned error: VSCC error: endorsement policy failure, err: signature set did not satisfy policy 2018-06-21 09:46:29.582 UTC [valimpl] preprocessProtoBlock -> WARN 36e Channel [esc-channel]: Block [83] Transaction index [0] TxId [d32b10c1d07ebd24dacf7ae016d7996dcf0fd83e24c856d4490c771ede8e5641] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] 2018-06-21 09:46:29.637 UTC [kvledger] CommitWithPvtData -> INFO 36f Channel [esc-channel]: Committed block [83] with 1 transaction(s) ``` But in the SDK, I get all proposal response statuses as "successful" for this transaction When the transaction even comes, I get `Received invalid transaction event. Transaction ID 49595966804fd9570010ae126143434ad7f6362a329385205fd721928d3ee527 status 10` , but shouldn't this msg be shown while after receiving proposal responses? Thoughts?

dharuq (Thu, 21 Jun 2018 10:29:04 GMT):
Hello! I want to dynamically create a new channel so 2 users that i have created can share info between them, that is possible without generating the .tx when the network is created?

diyan.filipov (Thu, 21 Jun 2018 14:20:08 GMT):
@rickr Thanks for the info. I just got mislead by the docs and configs in the CA server and in the java SDK which got me thinking that mutual TLS is possible. Please make sure to remove `certificateAuthorities.caName.tlsCACerts.client` keyfile and certfile` from the yaml configs as they are not currently supported. At the end, I was able to configure and accomplish a mutual TLS between the CA server and a fabric java client (with my own implementation of the HFCAClient). I would be happy to contribute the implementation :)

diyan.filipov (Thu, 21 Jun 2018 14:20:08 GMT):
@rickr Thanks for the info. I just got mislead by the docs and configs in the CA server and in the fabric java SDK which got me thinking that mutual TLS is possible. Please make sure to remove `certificateAuthorities.caName.tlsCACerts.client` keyfile and certfile` from the yaml configs as they are not currently supported. At the end, I was able to configure and accomplish a mutual TLS between the CA server and a fabric java client (with my own implementation of the HFCAClient). I would be happy to contribute the implementation :)

mmick (Fri, 22 Jun 2018 12:12:30 GMT):
Has left the channel.

Smit95shah (Sat, 23 Jun 2018 03:52:38 GMT):
Has joined the channel.

guangyingyuan (Sun, 24 Jun 2018 03:02:12 GMT):
Has joined the channel.

nikolas (Mon, 25 Jun 2018 00:08:05 GMT):
Hi, how can I get the hash of the block of a TransactionEvent? I just need the hash as a string.

adopicogfi (Mon, 25 Jun 2018 09:47:09 GMT):
Has joined the channel.

rickr (Mon, 25 Jun 2018 13:19:18 GMT):
@amolpednekar The SDK currently does not know the endorsement policy .. All the individual endorsements may be just fine. But when they all go back via the Orderer each commiting peer see that the needed endorsement policy was not meet.

rickr (Mon, 25 Jun 2018 13:25:22 GMT):
@nikolas The hash of block itself is not in the block. The SDK has a way to calculate it as shown here : https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L900

rickr (Mon, 25 Jun 2018 13:33:25 GMT):
@dharuq Not sure I follow your question. The SDK itself does not create the orderer block nor the channel creation transaction. The README.md states how they were created for the SDK. To see how two organization would collaborate together look at https://github.com/cr22rc/BMXHyperledgerFabricJSDKIntegrationSample

dharuq (Mon, 25 Jun 2018 14:21:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MTY6sgN2KqQwdsTL4) @rickr Thanks :) I have two more questions: 1) To define access control policies I have to use Attribute-Based Access Control right? For that when I register a new user I have to do this: `rr.addAttribute(new Attribute("attr1", role, true));` right? 2) When the user is registered and enrolled for the first time and the applications is shut down and reconstrusted I reenroll the user. What is the reenroll method really doing?

akoenig (Mon, 25 Jun 2018 14:33:21 GMT):
Hi, short question: Why is the sendProposalToPeers-Method private? In our usecase we want to have signedProposal from a different application and send them via service to the channel and let them execute

akoenig (Mon, 25 Jun 2018 14:33:36 GMT):
and is there any solution for this?

akoenig (Mon, 25 Jun 2018 14:34:25 GMT):
We don't want to install an extra client for requests :/

tsnyder (Tue, 26 Jun 2018 08:21:30 GMT):
Is there currently a V1.2 release candidate for the Fabric SDK Java? Also by following the JIRA Service Discovery items I can see the code for ServiceDiscoveryIT but it has not been checked in? Any timeline exprectation?

ArvsIndrarys (Tue, 26 Jun 2018 08:35:35 GMT):
Has joined the channel.

akoenig (Tue, 26 Jun 2018 12:37:57 GMT):
In Node.js there is a "Signer"-Interface. Is there something like this in the Java-SDK? https://fabric-sdk-node.github.io/Signer.html

rickr (Tue, 26 Jun 2018 13:14:59 GMT):
@dharuq You shouldn't have to reenroll a user. The user should have their certificate and private key.

rickr (Tue, 26 Jun 2018 13:17:15 GMT):
@akoenig If you want t sign in a different means subclass or remimplment CryptoPrimitives.java

rickr (Tue, 26 Jun 2018 13:20:05 GMT):
@tsnyder There is no `release candidate` as function is merged in there will be snapshots that get published. `1.2.0-SNAPSHOT` Don't give timelines

dharuq (Tue, 26 Jun 2018 13:21:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=D3dR8izK2NgouRMAc) @rickr I am saving the state of the user and the Enrollment (that contains the cert and private key), when I restart the application the object user is reconstructed and the only thing that I need to get that user is the userID right?

dharuq (Tue, 26 Jun 2018 13:21:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=D3dR8izK2NgouRMAc) @rickr I am saving the state of the user and the Enrollment (that contains the cert and private key), when I restart the application the object user is reconstructed and the only thing that I need to get that user is the userID right? Is it supposed that the user save the enrollment safely right?

akoenig (Tue, 26 Jun 2018 13:21:38 GMT):
@rickr yes, i want to move the method "getSignedPropsal" of the channel to some other service/interface like "signPropsal" so an other instance can sigen the propsal with the private key. So the network does not need the private key.

aatkddny (Tue, 26 Jun 2018 15:33:17 GMT):
i may be ahead of the curve here, but does anyone have a worked example of creating a channel in 1.2 something has changed - configtx has breaking changes again - and its driving me nuts trying to figure it out by trial and error. if i can circumvent that it would make me very happy.

aatkddny (Tue, 26 Jun 2018 16:53:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bY7icKMRBxunFMvXj) NM - worked through it.

leusgrif (Wed, 27 Jun 2018 11:21:38 GMT):
Has joined the channel.

MeghaGupta (Wed, 27 Jun 2018 11:37:52 GMT):
Hi, can some help me to find api documentation for services like register user, admin etc .. while debugging code I found few like : url : http://localhost:7054/api/v1/register body : {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]} resister : SampleUser{name='admin', roles=null, account='null', affiliation='null', organization='peerOrg1', enrollmentSecret='null', enrollment=org.hyperledger.fabric_ca.sdk.HFCAEnrollment@2a2c13a8, keyValStore=SampleStore{file='/tmp/HFCSampletest.properties', members={}}, keyValStoreName='user.adminpeerOrg1', mspId='Org1MSP'} I am interested to know all the api. which is getting tough to find with just debugging

MeghaGupta (Wed, 27 Jun 2018 11:38:03 GMT):
thanks in advance ..

ArvsIndrarys (Wed, 27 Jun 2018 15:10:49 GMT):
IBM

dharuq (Wed, 27 Jun 2018 17:31:08 GMT):
Hi! how can I know if the user that proposed the transaction is the same user that is querying that transaction?

kesavants (Wed, 27 Jun 2018 19:25:59 GMT):
Anyone encountered scenario where endorsed transaction is submitted via channel.sendTransaction and the CompleteableFuture times out (or hangs if I do not set the timeout) but when I look in db the transaction is actually committed(using HLF 1.1)

xo-Lai (Thu, 28 Jun 2018 08:45:58 GMT):
Hi guys! How to add new org by fabric-sdk-java

Marc.K (Thu, 28 Jun 2018 08:55:26 GMT):
Hi, I'm trying to capture events. Within the E2EIT I can't see the sysout message from the eventlistener, how can I check whether the event was captured?

MeghaGupta (Thu, 28 Jun 2018 11:20:15 GMT):
Hi any one got error msg : channel: foo] Rejecting broadcast of config message from 192.168.0.1:47772 because of error: error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1

albert.lacambra (Thu, 28 Jun 2018 11:35:54 GMT):
@MeghaGupta Something similar happened** to me when reconstructing a peer but not the orderers and some channel was existing. So if the a channel existed and then just rebuild peers, losing the channel on the peers, but not in the orderers. Not sure if it's also your case.

rickr (Thu, 28 Jun 2018 12:27:53 GMT):
@MeghaGupta There is the integration tests (End2end*IT.java) and HFCAClientIT.java for Fabric CA. There is also javadoc

rickr (Thu, 28 Jun 2018 12:30:09 GMT):
@kesavants To use the Future you need to have a Peer with a role as an Eventing Peer or an EventHub .

rickr (Thu, 28 Jun 2018 12:34:00 GMT):
@Marc.K the method `registerBlockListener` is on channel

rickr (Thu, 28 Jun 2018 12:40:04 GMT):
@dharuq https://github.com/hyperledger/fabric-sdk-java/blob/edd54f832351452ef6aea3d9cb505b2f38b12711/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L920 may help

aatkddny (Thu, 28 Jun 2018 13:36:43 GMT):
Question about the SDK implementation of Peer eventing. I'm looking at improving the robustness of the stuff we have bolted onto peer eventing and need just a little clarification about the implementation in the SDK. Without tracing the code, it looks like one gets an event inside the `ChaincodeEventListener` for each Tx inside a block for each peer that has eventing turned on. If that's true is there a way to see that a block has been fully processed - meaning all the events for all the Tx inside it have been raised - or do I need to save down to the Tx level which ones have been sent? And the second follow on is that apparently it's possible to set a start block for replay in case of failure. Is that implemented? And if so is there an example of use anywhere?

aatkddny (Thu, 28 Jun 2018 13:36:43 GMT):
Question about the SDK implementation of Peer eventing. I'm looking at improving the robustness of the stuff we have bolted onto peer eventing and need just a little clarification about the implementation in the SDK. Without tracing the code, it looks like one gets an event inside the `ChaincodeEventListener` for each Tx inside a block for each peer that has eventing turned on. If that's true is there a way to see that a block has been fully processed - meaning all the events for all the Tx inside it have been raised - or do I need to save down to the Tx level which ones have been sent? And the second follow on is that apparently it's possible to set a start block for replay in case of failure. Is that implemented? And if so is there an example of use anywhere? The final part of the may be more a pure HL question - is the return order guaranteed. Think processing an order and revisions that then need to be applied in the order received.

aatkddny (Thu, 28 Jun 2018 13:36:43 GMT):
Question about the SDK implementation of Peer eventing. I'm looking at improving the robustness of the stuff we have bolted onto peer eventing and need just a little clarification about the implementation in the SDK. Without tracing the code, it looks like one gets an event inside the `ChaincodeEventListener` for each Tx inside a block for each peer that has eventing turned on. If that's true is there a way to see that a block has been fully processed - meaning all the events for all the Tx inside it have been raised - or do I need to save down to the Tx level which ones have been sent? And the second follow on is that apparently it's possible to set a start block for replay in case of failure. Is that implemented? And if so is there an example of use anywhere? The final part of this follow on may be more a pure HL question - is the return order guaranteed. Think processing an order and revisions that then need to be applied in the order received.

kesavants (Thu, 28 Jun 2018 13:45:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wXpceLE8kG7y44zaA) @rickr thx the event hub is setup and it works but sporadically the completeablefuture times out even though transaction is successfully commited

ApurvTandon (Thu, 28 Jun 2018 16:35:57 GMT):
Has joined the channel.

ApurvTandon (Thu, 28 Jun 2018 16:37:21 GMT):
@rickr Hi, i have a question, can we get the asset, participants, transactions from the java sdk?

ApurvTandon (Thu, 28 Jun 2018 16:37:21 GMT):
@rickr Hi, i have a question, can we get the asset, participants, transactions from the java sdk?

kiattchaip (Fri, 29 Jun 2018 03:41:28 GMT):
@kesavants Check that all peers (excepts a peer role is set) you add to a channel are valid and connectable. After calling `channel.sendTransaction().get()`, the SDK will wait until a transaction (in a block) is added to all peers in the channel.

tensingh.anburaj (Fri, 29 Jun 2018 05:51:03 GMT):
Has joined the channel.

oborovyk (Fri, 29 Jun 2018 10:55:43 GMT):
Has joined the channel.

rickr (Fri, 29 Jun 2018 12:54:19 GMT):
@aatkddny For ChancodeEventListener you're getting events as they are found in the block. There's nothing that states this is the last transaction/event in the block.

rickr (Fri, 29 Jun 2018 12:54:19 GMT):
@aatkddny For ChancodeEventListener you're getting events as they are found in the block. There's nothing that states this is the last transaction/event in the block. https://github.com/hyperledger/fabric-sdk-java/blob/8b976c725f719a21a1a45f2c0102fb7d6ca8f16d/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L284

rickr (Fri, 29 Jun 2018 12:54:19 GMT):
@aatkddny For ChancodeEventListener you're getting events as they are found in the block. There's nothing that states this is the last transaction/event in the block. https://github.com/hyperledger/fabric-sdk-java/blob/8b976c725f719a21a1a45f2c0102fb7d6ca8f16d/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L284 Not sure I follow your order question. If you start the Peer eventing services at a particular point it's going to process the blocks on the chain so I hope they'd remain ordered

aatkddny (Fri, 29 Jun 2018 13:01:25 GMT):
Well it's two part. 1. If my event handler pukes and I need to replay transactions how do I specify a start point. 2. While it's replaying I too *hope* it remains ordered, but I have no idea whether the eventing model processes the blocks in parallel for efficiency - and as such may not be order preserving.

rickr (Fri, 29 Jun 2018 13:05:30 GMT):
@kesavants You'd need to enable trace. There are trace statements that say what events are being received. FWIW I just completed an eight hour run of multithread version of end2end scenario .. and seen no indications of events not being received.

rickr (Fri, 29 Jun 2018 13:05:30 GMT):
@kesavants You'd need to enable trace. There are trace statements that say what events are being received. FWIW I just completed an eight hour run of multithread version of end2end scenario .. and seen no indications of events not being received. There is also a _policing_ thread that runs periodically that looking for waiting transactions that are older then about 10 mins and cleans them up. This will print warnings for the peers/eventhubs that didn't report the event.

rickr (Fri, 29 Jun 2018 13:12:47 GMT):
@aatkddny The events should be processed as if you _started back in time_ :) There is one _subtlety_ I'll point out. Each chaincode event as they are encountered will be called back to any listener on it's own thread. So expect that you can be handling more than one thread at a time. :wink:

aatkddny (Fri, 29 Jun 2018 13:14:18 GMT):
we serialize at the tx level for just that problem.

aatkddny (Fri, 29 Jun 2018 13:14:18 GMT):
we serialize at the tx level for just that problem.

aatkddny (Fri, 29 Jun 2018 13:14:59 GMT):
i just want to be sure my order-revision1-revision2 scenario comes back in the same sequence it went in.

aatkddny (Fri, 29 Jun 2018 13:15:08 GMT):
otherwise i have to sort.

aatkddny (Fri, 29 Jun 2018 13:15:08 GMT):
otherwise i have to aggregate and then sort.

kesavants (Fri, 29 Jun 2018 14:46:05 GMT):
After a network is setup is there any command or url exposed by fabric process that can generate json configuration compatible with org.hyperledger.fabric.sdk.NetworkConfig I have posted this in fabric questions as well posting here just in case someone has done this before

rickr (Fri, 29 Jun 2018 16:38:27 GMT):
@kesavants No. I had considered providing the reverse at one point. I think it's less of a priority now given the direction is more towards using service discovery.

kesavants (Fri, 29 Jun 2018 17:29:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KypuYBZkP3Kw6NvT2) @rickr Thanks can you please point me to where I can find more information on service discovery.

yacovm (Fri, 29 Jun 2018 18:08:32 GMT):
@kesavants - https://hyperledger-fabric.readthedocs.io/en/latest/discovery-overview.html and https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html

dharuq (Sun, 01 Jul 2018 20:26:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xEB7PkxWTuAyGWsPZ) @rickr Thanks! u know if there is anyway to verify this in the chaincode?

CsterKuroi (Mon, 02 Jul 2018 01:46:41 GMT):
Has joined the channel.

flyingpsd (Mon, 02 Jul 2018 03:18:05 GMT):
Has joined the channel.

flyingpsd (Mon, 02 Jul 2018 03:18:31 GMT):
:grinning:

altairlee (Mon, 02 Jul 2018 08:07:42 GMT):
Has joined the channel.

vijay5378 (Mon, 02 Jul 2018 12:30:59 GMT):
In fabric-ca java sdk, when a call is made to client.info().getCACertificateChain();, does it return the properly encoded pem file? I double checked and the returned certificate lacks the start "BEGIN CERTIFICATE" and "END CERTIFICATE" portion. Is it left to the user to create a proper pem certificate?

kdnmih (Mon, 02 Jul 2018 13:24:49 GMT):
Has joined the channel.

ApurvTandon (Mon, 02 Jul 2018 18:05:39 GMT):
@rickr i have went through the SDK classes i found there is classes for say User, Transactions, Block, BlockEvent but there is no class to get the Asset, if there is something that i can use as function to get the asset, participants it will be great help, can you help me with this, and can you tell me if there is way to query the couchDb to get the data.

yulong12 (Wed, 04 Jul 2018 01:32:00 GMT):
Has joined the channel.

smita0709 (Wed, 04 Jul 2018 07:40:40 GMT):
Hello What does the below error mean? Cannot retrieve peer identity from ProposalResponse. Error is:Cannot verify signature. Could not parse certificate

kiattchaip (Thu, 05 Jul 2018 04:33:14 GMT):
@rickr The https://github.com/hyperledger/fabric-sdk-java says that HSM is not supported but the status of the FAB-3137 is done. What does it mean? Can we use SDK with HSM at the current version?

donsonZhang (Thu, 05 Jul 2018 09:35:05 GMT):
when i updating a Channel Configuration use java sdk, the BatchTimeout:timeout can be updated success and valid; but when i update BatchSize:max_message_count, also can be updated success,but not go into effect

donsonZhang (Thu, 05 Jul 2018 09:39:00 GMT):
example, begin the BatchSize:max_message_count = 10, and update it to 30, now the channel config is 30, but the block max message count is still 10

donsonZhang (Thu, 05 Jul 2018 09:39:53 GMT):
when i restart the orderer node , the new max_message_count=30 is valid

donsonZhang (Thu, 05 Jul 2018 09:40:27 GMT):
so update channel config for the BatchSize:max_message_count is a bug?

donsonZhang (Thu, 05 Jul 2018 09:41:12 GMT):
version is the fabric release 1.1

aatkddny (Thu, 05 Jul 2018 12:11:24 GMT):
Private data question. More one of style than anything else. Looking at your example in the Go CC you've set the PD from the A and B values in the main parameter array. I'm guessing (hoping) that was for expediency to test functionality rather than a coding example, as I *thought* one was to use the transient map for passing private data back and forth. So my question is - are we supposed to be using the transient map for private data, or should it be extra parameter(s) in the main list?

MahimaManik (Fri, 06 Jul 2018 04:59:15 GMT):
Has joined the channel.

MahimaManik (Fri, 06 Jul 2018 05:00:40 GMT):
Hello, Can anybody please tell the location of key and certificate used by the client when we run End2endIT.java in fabric-sd-go?

IronStrong (Fri, 06 Jul 2018 06:35:25 GMT):
Has joined the channel.

QQ-ing (Fri, 06 Jul 2018 06:36:10 GMT):
Has joined the channel.

praveentalari (Fri, 06 Jul 2018 13:47:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nL5kqWCogXr77QceE) @rickr Even after selecting branch release-1.1 branch, there are compile errors in tests

vijay5378 (Fri, 06 Jul 2018 13:53:30 GMT):
I keep getting this error -> ALPN is not configured properly. This comes when I try Channel newChannel = client.newChannel(channelName, orderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, admin)); I have an orderer running and the orderer url that is being used is: grpcs://orderer:7050 (As orderer uses TLS). Any idea why ?

RockyRacer (Mon, 09 Jul 2018 06:15:31 GMT):
Has joined the channel.

rickr (Mon, 09 Jul 2018 12:46:36 GMT):
@vijay5378 In this case the SDK only returns what CA server is sending and apparently it's not in a PEM format. @smithb

rickr (Mon, 09 Jul 2018 12:46:36 GMT):
@vijay5378 In this case the SDK only returns what CA server is sending and apparently it's not in a PEM format. @smithb https://chat.hyperledger.org/channel/fabric-sdk-java?msg=R6nKTYMuZrB5zBT7C

rickr (Mon, 09 Jul 2018 12:50:24 GMT):
@ApurvTandon Not familiar with "Asset" look at the integration tests End2endIT and End2endAndBackAgainIT test for how to deploy execute chanincode

rickr (Mon, 09 Jul 2018 12:52:29 GMT):
@smita0709 More than likely your proposal had an error see there are not some other errors preceding that.

rickr (Mon, 09 Jul 2018 12:52:29 GMT):
@smita0709 More than likely your proposal had an error. See if there are not some other errors preceding that.

rickr (Mon, 09 Jul 2018 12:54:43 GMT):
@kiattchaip The SDK does not routinely test in an HSM environment.

rickr (Mon, 09 Jul 2018 12:54:43 GMT):
@kiattchaip The SDK does not routinely test in an HSM environment. I don't know of a reason why it shouldn't work but that doesn't me it does :)

rickr (Mon, 09 Jul 2018 12:59:04 GMT):
@donsonZhang I've seen there is sometimes a delay. Can you try putting in a sleep of 10 secs or so and see if it gets updated. I think if it requires a reboot of the Orderer that should be brought to the attention of the people working on it. Try the #fabric-orderer channel.

rickr (Mon, 09 Jul 2018 13:02:11 GMT):
@praveentalari You seem to be the only on reporting that. Did you follow the steps in the README.md ?

rickr (Mon, 09 Jul 2018 13:04:32 GMT):
@vijay5378 The integration tests pass for me with TLS enabled. Can you get those working and see if you can isolate what you're doing differently.

vijay5378 (Mon, 09 Jul 2018 13:29:58 GMT):
@rickr The first issue (where the CA server was returning a different file) was resolved by decoding the returned string into a certificate. CA server was only returning a java encoded string. It might be helpful if a PEM to certificate was added to the sdk.

vijay5378 (Mon, 09 Jul 2018 13:35:06 GMT):
@rickr the second issue was because of tomcat and ALPN. I am having a servlet that tries to create a channel. This causes an issue - there are two ways in which it can be resolved. 1) Adding jetty-alpn-boot to tomcat's JRE bootstrap library (or) 2) setting tomcat's java to 9. I have tried option 1 and it seems to work. I did try to option 2 also, but I have got spotty results. In one test case, works fine, however, there were issues in another container. There also seems to be a problem with the versions - i have tested with grpc-all-1.1 and netty-all-4.1.22 with tcnative-boring-ssl-static 2.0.7 and with Java(TM) SE Runtime Environment (build 1.8.0_161-b12)

vijay5378 (Mon, 09 Jul 2018 13:38:16 GMT):
@rickr one last question - in End2EndIT, there is Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin())); I have got it to work with grpcs, however there seems to be a signing issue - In this case do you expect sampleOrg's peerAdmin to sign the channelConfiguration? Because I have tried it by passing the admin user for the peer node that I created and it keeps throwing up an error - ^[[36m2018-07-09 13:15:16.419 UTC [policies] Evaluate -> DEBU 1a0^[[0m Signature set did not satisfy policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a1^[[0m == Done Evaluating *cauthdsl.policy Policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] func1 -> DEBU 1a2^[[0m Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Batman.Admins Superman.Admins proxypeer.Admins ] ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a3^[[0m Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy

vijay5378 (Mon, 09 Jul 2018 13:38:16 GMT):
@rickr one last question - in End2EndIT, there is Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin())); I have got it to work with grpcs, however there seems to be a signing issue - In this case do you expect sampleOrg's peerAdmin to sign the channelConfiguration? Because I have tried it by passing the admin user for the peer node that I created and it keeps throwing up an error -` ^[[36m2018-07-09 13:15:16.419 UTC [policies] Evaluate -> DEBU 1a0^[[0m Signature set did not satisfy policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a1^[[0m == Done Evaluating *cauthdsl.policy Policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] func1 -> DEBU 1a2^[[0m Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Batman.Admins Superman.Admins proxypeer.Admins ] ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a3^[[0m Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy`

vijay5378 (Mon, 09 Jul 2018 13:38:16 GMT):
@rickr one last question - in End2EndIT, there is Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin())); I have got it to work with grpcs, however there seems to be a signing issue - In this case do you expect sampleOrg's peerAdmin to sign the channelConfiguration? Because I have tried it by passing the admin user for the peer node that I created and it keeps throwing up an error -` ^[[36m2018-07-09 13:15:16.419 UTC [policies] Evaluate -> DEBU 1a0^[[0m Signature set did not satisfy policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a1^[[0m == Done Evaluating *cauthdsl.policy Policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] func1 -> DEBU 1a2^[[0m Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Batman.Admins Superman.Admins proxypeer.Admins ] ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a3^[[0m Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy`

vijay5378 (Mon, 09 Jul 2018 13:38:16 GMT):
@rickr one last question - in End2EndIT, there is Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin())); I have got it to work with grpcs, however there seems to be a signing issue - In this case do you expect sampleOrg's peerAdmin to sign the channelConfiguration? Because I have tried it by passing the admin user for the peer node that I created and it keeps throwing up an error -``` `` ``` ` ^[[36m2018-07-09 13:15:16.419 UTC [policies] Evaluate -> DEBU 1a0^[[0m Signature set did not satisfy policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a1^[[0m == Done Evaluating *cauthdsl.policy Policy /Channel/Application/proxypeer/Admins ^[[36m2018-07-09 13:15:16.421 UTC [policies] func1 -> DEBU 1a2^[[0m Evaluation Failed: Only 0 policies were satisfied, but needed 1 of [ Batman.Admins Superman.Admins proxypeer.Admins ] ^[[36m2018-07-09 13:15:16.421 UTC [policies] Evaluate -> DEBU 1a3^[[0m Signature set did not satisfy policy /Channel/Application/ChannelCreationPolicy`

am (Mon, 09 Jul 2018 20:10:19 GMT):
Has joined the channel.

am (Mon, 09 Jul 2018 20:13:01 GMT):
Hi, Can we use the 1.1 SDK against a fabric 1.2 network? assuming the 1.2 functionalities are not available.

llhl001 (Tue, 10 Jul 2018 01:37:51 GMT):
Has joined the channel.

RockyRacer (Tue, 10 Jul 2018 06:57:10 GMT):
Hi, I get error when initializing channel : `java.lang.NoSuchMethodError: com.google.protobuf.AbstractMessageLite$Builder.addAll(Ljava/lang/Iterable;Ljava/util/List;)V`

RockyRacer (Tue, 10 Jul 2018 06:57:33 GMT):
Can't see any dependency conflict, I'm using SDK 1.1

ibmamnt (Tue, 10 Jul 2018 09:06:46 GMT):
Looks like there is conflict between Spring Boot v2.0.x against this Java SDK due to dependency on snakeyaml v1.21 (which Java SDK uses). https://github.com/spring-projects/spring-boot/issues/13191 Do you think it is safe to down grade to v1.19 which Spring Boot officially supports. Say all the configuration are passed using .json not .yaml file, then the code does not go through snakeyaml process.

RockyRacer (Tue, 10 Jul 2018 11:01:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gLAqQo7gzuLEsWGLk) fixed

RockyRacer (Tue, 10 Jul 2018 11:01:37 GMT):
There are a lot of dependency conflicts with ZK framework

akoenig (Tue, 10 Jul 2018 12:39:36 GMT):
Hi, when I try to execute a chaincode more than once I get an error like this "2018-07-10 12:35:34.650 UTC [chaincode] ExecuteChaincode -> ERRO 1449 txid: 2d9f71d06c9a2da49087f975734c1d23f6707abeda11e172b8209c422d33afeb(foo) exists" but only sometimes. Any idea?

aatkddny (Tue, 10 Jul 2018 12:52:40 GMT):
ugh. this was working. anyone seen this? ``` Caused by: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V at io.grpc.Metadata$Key.validateName(Metadata.java:628) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.(Metadata.java:636) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.(Metadata.java:566) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:740) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:735) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.of(Metadata.java:592) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.of(Metadata.java:588) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.internal.GrpcUtil.(GrpcUtil.java:83) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.internal.AbstractManagedChannelImplBuilder.(AbstractManagedChannelImplBuilder.java:81) ~[grpc-core-1.12.0.jar:1.12.0] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:248) ~[fabric-sdk-java-1.2.0-SNAPSHOT.jar:na] ```

aatkddny (Tue, 10 Jul 2018 12:52:40 GMT):
ugh. this was working. anyone seen this? ``` Caused by: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V at io.grpc.Metadata$Key.validateName(Metadata.java:628) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.(Metadata.java:636) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.(Metadata.java:566) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:740) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:735) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.of(Metadata.java:592) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.of(Metadata.java:588) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.internal.GrpcUtil.(GrpcUtil.java:83) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.internal.AbstractManagedChannelImplBuilder.(AbstractManagedChannelImplBuilder.java:81) ~[grpc-core-1.12.0.jar:1.12.0] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:248) ~[fabric-sdk-java-1.2.0-SNAPSHOT.jar:na] ... ``` It's clearly some dependency mismatch. I was hoping to short circuit a bunch of debug time if anyone had a quick answer.

aatkddny (Tue, 10 Jul 2018 12:52:40 GMT):
ugh. this was working. anyone seen this? 1.2 snapshot trying to connect to a channel using a ChannelFactory.networkConnect ``` Caused by: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V at io.grpc.Metadata$Key.validateName(Metadata.java:628) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.(Metadata.java:636) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.(Metadata.java:566) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:740) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$AsciiKey.(Metadata.java:735) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.of(Metadata.java:592) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.Metadata$Key.of(Metadata.java:588) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.internal.GrpcUtil.(GrpcUtil.java:83) ~[grpc-core-1.12.0.jar:1.12.0] at io.grpc.internal.AbstractManagedChannelImplBuilder.(AbstractManagedChannelImplBuilder.java:81) ~[grpc-core-1.12.0.jar:1.12.0] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:248) ~[fabric-sdk-java-1.2.0-SNAPSHOT.jar:na] ... ``` The n value (in the method) is "grpc-timeout". Which makes sense since it's coming from `public static final Metadata.Key TIMEOUT_KEY` It's clearly some dependency mismatch. I was hoping to short circuit a bunch of debug time if anyone had a quick answer.

RockyRacer (Tue, 10 Jul 2018 14:19:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aQMj6C5EG952fZLhC) @aatkddny had the same error

RockyRacer (Tue, 10 Jul 2018 14:19:43 GMT):
in my case I had to excluse the guava dependency from reflections

RockyRacer (Tue, 10 Jul 2018 14:19:56 GMT):
` org.reflections reflections 0.9.5 guava com.google.guava `

RockyRacer (Tue, 10 Jul 2018 14:19:56 GMT):
``` org.reflections reflections 0.9.5 guava com.google.guava ```

Adam_Hardie (Tue, 10 Jul 2018 14:28:46 GMT):
Has joined the channel.

Adam_Hardie (Tue, 10 Jul 2018 14:28:56 GMT):
hey all, we are writing unit tests - i noticed we cant use the constructor for TransactionEvent or ChaincodeEvent it makes it quite difficult to unit test what happens when a completableFuture comes back from HL as invalid .... does anyone have a suggestion for this ?

Adam_Hardie (Tue, 10 Jul 2018 14:31:38 GMT):
because there are no factory methods either & we cannot subclass (super is defaulting to default viability)

MeghaGupta (Wed, 11 Jul 2018 05:52:52 GMT):
Hi, please help me to find couch db or level DB property

MeghaGupta (Wed, 11 Jul 2018 05:53:17 GMT):
where I can change it to couchDb

vijay5378 (Wed, 11 Jul 2018 06:04:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hDdB43oBm7v9T6boK) @MeghaGupta in core.yaml under ledger: blockchain: state: # stateDatabase - options are "goleveldb", "CouchDB" # goleveldb - default state database stored in goleveldb. # CouchDB - store state database in CouchDB stateDatabase: CouchDB

kolayuk (Wed, 11 Jul 2018 07:47:58 GMT):
Has joined the channel.

kolayuk (Wed, 11 Jul 2018 07:49:28 GMT):
Hello! Fabric v.1.2 is out but java sdk is still WIP (according to note in github readme). Is there any roadmap or ETA when it'll released?

kolayuk (Wed, 11 Jul 2018 07:50:23 GMT):
And are snapshot builds relatively stable to use them in development?

yulong12 (Wed, 11 Jul 2018 08:31:23 GMT):
Hi everyone! I have a question. I want to know how can I connect the fabric using fabric-sdk-java?

MeghaGupta (Wed, 11 Jul 2018 08:45:03 GMT):
@vijay5378 could you please give me more detail path of core.yaml . I am new to fabric-sdk. its inside hyperledger-fabric-sdk right ?

kolayuk (Wed, 11 Jul 2018 09:51:05 GMT):
@MeghaGupta i dont know where is core.yaml, but we're using env variables, it works ok. Refer to docs: ```You can also pass in docker environment variables to override core.yaml values, for example CORE_LEDGER_STATE_STATEDATABASE and CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS.```

rickr (Wed, 11 Jul 2018 12:02:27 GMT):
@vijay5378 peer admins should sign by the policy.

rickr (Wed, 11 Jul 2018 12:03:21 GMT):
@am yes should be able to use it. Probably should use the v1.2-SNAPSHOT only way you'll its working for you or bring up issues.

rickr (Wed, 11 Jul 2018 12:04:06 GMT):
@ibmamnt only test with current versions of dependencies but don't know of any issues.

rickr (Wed, 11 Jul 2018 12:04:59 GMT):
@kolayuk I would recommend using v1.2-SNAPSHOT. If you want v1.2 and see if you find issues.

rickr (Wed, 11 Jul 2018 12:06:10 GMT):
@MeghaGupta please ask on #fabric-questions . It needs to be documented somewhere.

MeghaGupta (Wed, 11 Jul 2018 14:12:54 GMT):
@kolayuk need little more help. I have given CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=127.0.0.1:5984 in docker env but getting error : couchdb request in 16s. Attempt:8 Error:Get http://127.0.0.1:5984/: dial tcp 127.0.0.1:5984: getsockopt

MeghaGupta (Wed, 11 Jul 2018 14:13:35 GMT):
I am able to do curl http://127.0.0.1:5984/

MikeEmery (Wed, 11 Jul 2018 15:48:31 GMT):
Has joined the channel.

MikeEmery (Wed, 11 Jul 2018 15:54:13 GMT):
Hey! Was trying out the v1.2 java sdk yesterday and ran into an issue with X.509 certificates on certain transactions. Top of the stack trace is: `org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found`

MikeEmery (Wed, 11 Jul 2018 15:55:23 GMT):
I'm using bouncycastle elsewhere for 509, is this just a matter of setting something for the jvm so fabric sdk can see it?

MikeEmery (Wed, 11 Jul 2018 15:59:27 GMT):
I see Idemix is slated for 1.3, but I'm not sure what to do about 1.2

kesavants (Wed, 11 Jul 2018 16:30:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wFaQ2yoChYQ2iT6WJ) @kiattchaip thx. Yes the peers are valid and reachable although I see some error in logs like deliverBlocks -> WARN b9b3 [channel: bank3] Error sending to : rpc error: code = Unavailable desc = transport is closing

MeghaGupta (Wed, 11 Jul 2018 16:55:22 GMT):
Hi After setting up couchdb I am getting access denied for my channel

MeghaGupta (Wed, 11 Jul 2018 16:55:31 GMT):
i.e. test channel foo

MeghaGupta (Wed, 11 Jul 2018 16:55:52 GMT):
any help ..

SandySun2000 (Wed, 11 Jul 2018 18:31:39 GMT):
@skarim Do you know JAVA SDK has the API to support adding the new affiliation to caClient?

skarim (Wed, 11 Jul 2018 18:42:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oH29W3erAP3MtEagX) @SandySun2000 Yes, the SDK has support for adding new affiliation

SandySun2000 (Wed, 11 Jul 2018 18:42:47 GMT):
Do you have the sample code?

skarim (Wed, 11 Jul 2018 18:56:42 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L831

skarim (Wed, 11 Jul 2018 18:56:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Mu5njiAJXmGr9Mo48) @SandySun2000 https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L831

SandySun2000 (Wed, 11 Jul 2018 18:57:19 GMT):
@skarim Thanks!

CarlXK (Thu, 12 Jul 2018 02:49:34 GMT):
@rickr JAVA SDK 1.2 still in progress?

huy.tranibm (Thu, 12 Jul 2018 03:43:15 GMT):
Howdy Folks!

MeghaGupta (Thu, 12 Jul 2018 08:35:30 GMT):
Hi we have sample for endorsement policy any sample for pluggable validation

MeghaGupta (Thu, 12 Jul 2018 08:35:35 GMT):
?

aatkddny (Thu, 12 Jul 2018 12:33:20 GMT):
So I'm not sure what went wrong here. I have a scripted java process that stands up a fabric, from crypto through orderers to peers to creating channels to installing chaincode. It was working. Until now. I just ran it and it's throwing this while trying to install chaincode. This isn't something I've seen before and I was wondering if anyone else ran across it.

aatkddny (Thu, 12 Jul 2018 12:33:20 GMT):
So I'm not sure what went wrong here. I have a scripted java process that stands up a fabric, from crypto through orderers to peers to creating channels to installing chaincode. It was working. Until now. I just ran it and it's throwing this while trying to install chaincode. This isn't something I've seen before and I was wondering if anyone else ran across it. I'm using 1.2.SNAPSHOT ```2018-07-12 08:27:39.603 INFO 42511 --- [nio-8096-exec-2] com.mo.fabric.facade.ChannelFactory : Mediaocean is not currently connected to some-channel. Reconstructing channel 2018-07-12 08:27:39.766 INFO 42511 --- [nio-8096-exec-2] o.h.fabric.sdk.ServiceDiscovery : Doing discovery on peer: Peer peer0.xxx.com url: grpcs://localhost:32001 2018-07-12 08:27:39.929 WARN 42511 --- [ault-executor-2] io.grpc.internal.ManagedChannelImpl : [io.grpc.internal.ManagedChannelImpl-129] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.xxx.com, cause=java.net.UnknownHostException: peer0.xxx.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) } 2018-07-12 08:27:39.954 WARN 42511 --- [ault-executor-2] io.grpc.internal.ManagedChannelImpl : [io.grpc.internal.ManagedChannelImpl-131] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.mediaocean.com, cause=java.net.UnknownHostException: peer0.mediaocean.com at java.net.InetAddress.getAllByName0(InetAddress.java:1280) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) }```

aatkddny (Thu, 12 Jul 2018 12:33:20 GMT):
So I'm not sure what went wrong here. I have a scripted java process that stands up a fabric, from crypto through orderers to peers to creating channels to installing chaincode. It was working. Until now. I just ran it and it's throwing this while trying to install chaincode. This isn't something I've seen before and I was wondering if anyone else ran across it. I'm using 1.2.SNAPSHOT ```2018-07-12 08:27:39.603 INFO 42511 --- [nio-8096-exec-2] com.mo.fabric.facade.ChannelFactory : XXX is not currently connected to some-channel. Reconstructing channel 2018-07-12 08:27:39.766 INFO 42511 --- [nio-8096-exec-2] o.h.fabric.sdk.ServiceDiscovery : Doing discovery on peer: Peer peer0.xxx.com url: grpcs://localhost:32001 2018-07-12 08:27:39.929 WARN 42511 --- [ault-executor-2] io.grpc.internal.ManagedChannelImpl : [io.grpc.internal.ManagedChannelImpl-129] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.xxx.com, cause=java.net.UnknownHostException: peer0.xxx.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) } 2018-07-12 08:27:39.954 WARN 42511 --- [ault-executor-2] io.grpc.internal.ManagedChannelImpl : [io.grpc.internal.ManagedChannelImpl-131] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.mediaocean.com, cause=java.net.UnknownHostException: peer0.mediaocean.com at java.net.InetAddress.getAllByName0(InetAddress.java:1280) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) }```

yacovm (Thu, 12 Jul 2018 12:34:59 GMT):
can you resolve the hostname from the same machine the process is running on?

aatkddny (Thu, 12 Jul 2018 12:35:21 GMT):
Everything is local.

aatkddny (Thu, 12 Jul 2018 12:35:38 GMT):
And I didn't turn off IP6 in the machine settings.

MeghaGupta (Thu, 12 Jul 2018 12:36:42 GMT):
Do we have any other way then creating a plugin in go for plugging custom validation ?

yacovm (Thu, 12 Jul 2018 12:39:14 GMT):
but can you resolve or not @aatkddny ?

rickr (Thu, 12 Jul 2018 12:41:16 GMT):
Try putting on trace on the client see what it's trying to do It seems it trying to resolve `peer0.xxx.com` which is I don't is your intent .. or alternative just for a quick hackish add that to your hots file to resolve for localhost to just see that's what really happening

aatkddny (Thu, 12 Jul 2018 12:41:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Wt7ABzQdJkLCXi9rL) @yacovm Sorry - I should have read your question properly. The hostname is internal to the docker cluster. I interact through localhost and an exposed port.

yacovm (Thu, 12 Jul 2018 12:41:43 GMT):
so obviously you can't do that...

yacovm (Thu, 12 Jul 2018 12:41:49 GMT):
you should try doing the following

yacovm (Thu, 12 Jul 2018 12:41:57 GMT):
edit `/etc/hosts` and add that peer

yacovm (Thu, 12 Jul 2018 12:42:03 GMT):
make it localhost

yacovm (Thu, 12 Jul 2018 12:42:06 GMT):
and then try again

yacovm (Thu, 12 Jul 2018 12:42:22 GMT):
oh that's what Rick said :)

aatkddny (Thu, 12 Jul 2018 12:43:23 GMT):
there are about a dozen of them. I interact through localhost and exposed ports. This is something inside the fabric - it's muttering about service discovery.

yacovm (Thu, 12 Jul 2018 12:43:50 GMT):
it's not inside the fabric... you can't resolve the hostname

yacovm (Thu, 12 Jul 2018 12:44:00 GMT):
I guess the previous version had an override

yacovm (Thu, 12 Jul 2018 12:44:02 GMT):
and now there isn't

yacovm (Thu, 12 Jul 2018 12:44:09 GMT):
@rickr ^ can you help? :)

rickr (Thu, 12 Jul 2018 12:45:40 GMT):
I don't assume you're trying to use service discovery .. maybe this is a bug that got injected

rickr (Thu, 12 Jul 2018 12:47:20 GMT):
@MikeEmery the x509 not found is most likely not likely to be the actual issue. There is buglet that when an error occurs the SDK will still try to validate the response even though it was not signed. Look for other errors around that point.

rickr (Thu, 12 Jul 2018 12:47:20 GMT):
@MikeEmery the x509 not found is most likely not to be the actual issue. There is buglet that when an error occurs the SDK will still try to validate the response even though it was not signed. Look for other errors around that point.

rickr (Thu, 12 Jul 2018 12:49:15 GMT):
@MeghaGupta I've not done much with couchdb. The SDK should be independent of any backing store. Best asked on #fabric-questions

aatkddny (Thu, 12 Jul 2018 12:51:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HnAwSnufHe8nwti2o) I'm not trying to... :)

aatkddny (Thu, 12 Jul 2018 12:51:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HnAwSnufHe8nwti2o) I'm not *trying* to... :)

aatkddny (Thu, 12 Jul 2018 12:51:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HnAwSnufHe8nwti2o) I'm not *trying* to... :) This is where I got the "its using service discovery" bit from `2018-07-12 08:27:39.766 INFO 42511 --- [nio-8096-exec-2] o.h.fabric.sdk.ServiceDiscovery : Doing discovery on peer: Peer peer0.xxx.com url: grpcs://localhost:32001` You can see my localhost:port in there.

rickr (Thu, 12 Jul 2018 12:55:45 GMT):
Can you make sure where you're adding/joining your peers to the channel that you explicitly define their roles so they don't have a service discovery role

aatkddny (Thu, 12 Jul 2018 12:57:10 GMT):
Is it a new default? I only have eventing/endorsing set true and filtering false. everything else is whatever the defaults are.

aatkddny (Thu, 12 Jul 2018 12:57:10 GMT):
Is it a new default? I only have eventing/endorsing set true and filtering false. everything else is whatever the defaults are. *edit* I only see the same peer roles as before in the code. ``` public enum PeerRole { /** * Endorsing peer installs and runs chaincode. */ ENDORSING_PEER("endorsingPeer"), /** * Chaincode query peer will be used to invoke chaincode on chaincode query requests. */ CHAINCODE_QUERY("chaincodeQuery"), /** * Ledger Query will be used when query ledger operations are requested. */ LEDGER_QUERY("ledgerQuery"), /** * Peer will monitor block events for the channel it belongs to. */ EVENT_SOURCE("eventSource"); ```

rickr (Thu, 12 Jul 2018 13:04:37 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/c5c31b8100f62a146220cffb6d304921dfce5829/src/main/java/org/hyperledger/fabric/sdk/Peer.java#L554

aatkddny (Thu, 12 Jul 2018 13:06:33 GMT):
That must be newer than my source - which *is* a 1.2-SNAPSHOT. Let me turn it off explicitly where I build the networkconfig and try again.

yacovm (Thu, 12 Jul 2018 13:08:52 GMT):
@rickr has the java SDK released v1.2. officially ?

rickr (Thu, 12 Jul 2018 13:09:02 GMT):
no

yacovm (Thu, 12 Jul 2018 13:09:08 GMT):
ETA? :)

rickr (Thu, 12 Jul 2018 13:09:15 GMT):
don't know yet

yacovm (Thu, 12 Jul 2018 13:09:24 GMT):
k tnx

rickr (Thu, 12 Jul 2018 13:10:48 GMT):
unlike some other SDKs the have dedicated resource to test the JSDK doesn't so like to hear a while from the community what issues they encounter .. like maybe this one.

rickr (Thu, 12 Jul 2018 13:10:48 GMT):
unlike some other SDKs that have dedicated resource to test. The JSDK doesn't so like to hear a while from the community what issues they encounter .. like maybe this one.

yacovm (Thu, 12 Jul 2018 13:11:56 GMT):
I don't really understand what you just said.... :/ you're saying other SDKs are being tested more thoroughly?

aatkddny (Thu, 12 Jul 2018 13:14:28 GMT):
it still happens. this is the pertinent piece of the new network config json ``` "x-chaincode": {}, "eventSource": true, "ledgerQuery": true, "endorsingPeer": true, "serviceDiscovery": false, "chaincodeQuery": true ```

yacovm (Thu, 12 Jul 2018 13:14:46 GMT):
@aatkddny is it possible that you run your app from a container that is in the same network as the peers?

yacovm (Thu, 12 Jul 2018 13:14:52 GMT):
that should solve the problem IMO

aatkddny (Thu, 12 Jul 2018 13:15:04 GMT):
This is old code. It's run like this for months.

aatkddny (Thu, 12 Jul 2018 13:15:04 GMT):
This is old code. It's run like this for months.

yacovm (Thu, 12 Jul 2018 13:15:21 GMT):
Hey I'm trying to help :(

yacovm (Thu, 12 Jul 2018 13:15:30 GMT):
I didn't write the java SDK or anything

rickr (Thu, 12 Jul 2018 13:16:38 GMT):
can you add some code once the channel is created to get all the peers and see what roles they actually have

rickr (Thu, 12 Jul 2018 13:20:32 GMT):
Should not go down the service discovery route if no peers have that role. But there could always be a hole I missed :scream:

aatkddny (Thu, 12 Jul 2018 13:28:53 GMT):
I clearly misunderstood. I thought you wanted the config when it was trying to install the chaincode. The create channel used a lovely piece of code that did this: ``` if (hp.isEventing()) { po.setPeerRoles(allPeerRoles()); ``` I'm sure you can guess what allPeerRoles() was. Forcing it off there so I got `[ENDORSING_PEER, CHAINCODE_QUERY, LEDGER_QUERY, EVENT_SOURCE]` means it now works again. So If I may ask, can this be changed to default off at least until it's fixed?

aatkddny (Thu, 12 Jul 2018 13:28:53 GMT):
I clearly misunderstood. I thought you wanted the config when it was trying to install the chaincode. The create channel used a lovely piece of code that did this: ``` if (hp.isEventing()) { po.setPeerRoles(allPeerRoles()); ``` I'm sure you can guess what allPeerRoles() was. Forcing it off there so I got `[ENDORSING_PEER, CHAINCODE_QUERY, LEDGER_QUERY, EVENT_SOURCE]` means it now works again. So If I may ask, can this be changed to default off, or have a PeerRoles.NoServiceDiscovery or something at least until it's fixed?

rickr (Thu, 12 Jul 2018 13:34:10 GMT):
Let me look at it busy on something else at the moment .. but to make sure I understand .. it's now working again for you ?

rickr (Thu, 12 Jul 2018 13:34:10 GMT):
Let me look at it. Busy on something else at the moment .. but to make sure I understand .. it's now working again for you ?

aatkddny (Thu, 12 Jul 2018 13:37:18 GMT):
Yes. It works as expected if I explicitly exclude PeerRole.SERVICE_DISCOVERY from the peer role enumset.

yacovm (Thu, 12 Jul 2018 13:38:28 GMT):
so i think the hostname override doesn't work for SD queries, Rick

tian (Thu, 12 Jul 2018 14:35:41 GMT):
Has joined the channel.

rickr (Thu, 12 Jul 2018 14:45:32 GMT):
@MeghaGupta https://hyperledger-fabric.readthedocs.io/en/latest/pluggable_endorsement_and_validation.html

rickr (Thu, 12 Jul 2018 14:46:04 GMT):
@yacovm I don't think this has anything to do with service discovery

yacovm (Thu, 12 Jul 2018 14:49:53 GMT):
@rickr you mean the server side or the client side?

yacovm (Thu, 12 Jul 2018 14:50:12 GMT):
It certainly doesn't have anything to do with the server side ;) there can't be bugs in the server side :)

yacovm (Thu, 12 Jul 2018 14:50:52 GMT):
(the go SDK folks extensively tested everything)

gravity (Thu, 12 Jul 2018 15:44:27 GMT):
Hello are there any alternatives to `configtxgen` in java sdk to create channel configuration?

gravity (Thu, 12 Jul 2018 15:44:27 GMT):
Hello are there any alternatices to `configtxgen` in java sdk to create channel configuration?

gravity (Thu, 12 Jul 2018 15:48:57 GMT):
the use case is to create channels dynamically with different names. and for this channel configuration file is needed. but to create it, we have to use `configtxgen`. but it's not a very convenient way as for me. any suggestions? thanks in advance

huy.tranibm (Thu, 12 Jul 2018 15:50:03 GMT):
you can make a channel config template and edit as needed

huy.tranibm (Thu, 12 Jul 2018 15:50:34 GMT):
use configtxlator to get the channel config json

gravity (Thu, 12 Jul 2018 15:56:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=G2QCKLmYGqzzfpMKg) @huy.tranibm i've extracted the json config using this command `./configtxgen -inspectChannelCreateTx testchannel.tx` if I modify this template, how to pack it back into tx file? or am I doing something wrong?

aatkddny (Thu, 12 Jul 2018 16:06:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xE5gT9JekBbMHAata) If - as was suggested - you use a template, you can pass it through configtxgen to get the ccf by using a processbuilder inside the app. ``` StringBuilder sb = new StringBuilder(CONFIGTXGEN); sb.append(" -profile "); sb.append(channelProfile); sb.append(" -channelID "); sb.append(channelName); sb.append(" -outputCreateChannelTx "); sb.append(fileName); log.debug("Calling configtxgen to create channel file for {}", channelName); ProcessBuilder pb = pb(Paths.get(fabric, channel)).command("sh", "-c", sb.toString()); ``` this should get you started

zaishengming (Fri, 13 Jul 2018 01:50:27 GMT):
hi,everybody.Now I test favric-sdk-java,run with "End2endIT.java",it prompt "2018-07-13 01:42:23,466 main ERROR HFCAClient:565 - Connect to 192.168.2.131:7054 [/192.168.2.131] failed: Connection refused: connect org.apache.http.conn.HttpHostConnectException: Connect to 192.168.2.131:7054 [/192.168.2.131] failed: Connection refused: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)". I use "telnet' my vm machine's port ,it can't not work.What caused this situation?

gravity (Fri, 13 Jul 2018 06:46:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KFu5aBCSeE58raR7X) @aatkddny thanks, will try

gravity (Fri, 13 Jul 2018 06:55:52 GMT):
@aatkddny according to the provided code snippet, what is `CONFIGTXGEN` in StringBuilder constructor? and what do you mean by a channel template?

ascatox (Fri, 13 Jul 2018 08:30:22 GMT):
Hi All! Is possible to receive events from the Chaincode use (setEvent function) with the latest version of Java SDK?

ascatox (Fri, 13 Jul 2018 08:30:22 GMT):
Hi All! Is possible to receive events from the Chaincode use (*setEvent function*) with the latest version of Java SDK?

ascatox (Fri, 13 Jul 2018 08:30:22 GMT):
Hi All! Is possible to receive events from the Chaincode use (**setEvent function**) with the latest version of Java SDK?

rickr (Fri, 13 Jul 2018 10:47:05 GMT):
@ascatox https://github.com/hyperledger/fabric-sdk-java/blob/c5c31b8100f62a146220cffb6d304921dfce5829/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L371-L386

ascatox (Fri, 13 Jul 2018 10:47:32 GMT):
thank you very much 👍🏻

rickr (Fri, 13 Jul 2018 10:53:46 GMT):
@zaishengming Not sure are you saying telnet did or did not work ? Can you on your local vm connect with telnet to that port just using localhost 7054 ? firewalls ?

gravity (Fri, 13 Jul 2018 11:15:24 GMT):
Hello Is it possible to change an endorsement policy for a chaincode?

gravity (Fri, 13 Jul 2018 11:15:24 GMT):
Hello Is it possible to change endorsement policy for a chaincode?

gravity (Fri, 13 Jul 2018 11:19:35 GMT):
and one more question: is it ok to access the same data from different chaincodes? (in the same channel)

Ferrymania (Fri, 13 Jul 2018 11:48:39 GMT):
Has joined the channel.

Ferrymania (Fri, 13 Jul 2018 11:56:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qroLgqCQQbT5pz5C4) @sqwerrels Hi ,sqwerrels. I just met the problem like you ,and I didn't know how solve the problem .Did you mean recloning the java-sdk and test again?

rickr (Fri, 13 Jul 2018 12:09:35 GMT):
@Ferrymania 90% sure you exercising tests for a >v1.0.0 sdk against v1.0.0 Fabric

Ferrymania (Fri, 13 Jul 2018 12:13:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=epn5xzZzH8j3cfM5B) @rickr I download the fabric-sdk-java and checkout -b release-1.1. I use the sample in the directory "fabric-sdk-java/src/test/fixture/sdkintegration" and use the "fabric.sh" start the network, and my docker images for faric is 1.1

Ferrymania (Fri, 13 Jul 2018 12:16:56 GMT):
the error is "main ERROR Channel:3554 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason" And what I see in the peer log ,the peer0.org1 is exit "peer0.org1.example.com exited with code 2 " but other peers is fine :joy:

rickr (Fri, 13 Jul 2018 12:20:07 GMT):
@gravity If you closely follow this code (pay attention to comments) it does show setting endorsement and getting failures for incorrect endorsements depending on what is commented out. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample It *may* at this point not work as I think I regenerated channel artifacts in the SDK and did not have time to update it yet. AFAIK you can't directly access/modify chaincode variables from another chaincode. There is a way for one chaincode to execute another chaincode that could roughly accomplish something similar

gravity (Fri, 13 Jul 2018 12:34:08 GMT):
@rickr thanks I have a question regarding the calling a chaincode from another chaincode. Should these contracts have equal endorsement policy? I mean, can we call a chaincode from another chaincode if they both have completely di

gravity (Fri, 13 Jul 2018 12:34:08 GMT):
@rickr thanks I have a question regarding the calling a chaincode from another chaincode. Should these contracts have equal endorsement policy? I mean, can we call a chaincode from another chaincode if they both have completely different policies?

yacovm (Fri, 13 Jul 2018 12:34:46 GMT):
@gravity great question. The validation checks both endorsement policies :)

yacovm (Fri, 13 Jul 2018 12:35:16 GMT):
(even if they are equal :( )

gravity (Fri, 13 Jul 2018 12:36:29 GMT):
@yacovm thanks :slight_smile:

aatkddny (Fri, 13 Jul 2018 13:48:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9apxJT6Jw4aKPM9re) @gravity "configtxgen" and i mean something that templates the channel and org names into a dummy yaml file so you can substitute the correct values in and use that to build the ccf.

aatkddny (Fri, 13 Jul 2018 13:50:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MFaTDCt9CaPKDJ3rp) You can read iirc. We had to throw events to run a second CC on the other channel to modify.

gravity (Fri, 13 Jul 2018 13:51:41 GMT):
@aatkddny now I got it. thanks

aatkddny (Fri, 13 Jul 2018 19:02:32 GMT):
Is there a recommendation as to best practices for using the SDK to pass private data in and out? ISTR seeing something that said to use the transient fields, but the example just has it in the mainline code.

aatkddny (Fri, 13 Jul 2018 19:02:32 GMT):
Is there a recommendation as to best practices for using the SDK to pass private data in and out? ISTR seeing something that said to use the transient fields, but the example just has it in the mainline code. Then there's another one that has separate calls for private data and for regular on chain data. It seems to be a bit ad hoc. We are starting to think about this and were thinking we should separate the calls for PD and regular chain data and pass in the name of the PD collection as a property with the actual data as if it were a regular transaction. Unless there's a standard way to do it.

aatkddny (Fri, 13 Jul 2018 19:02:32 GMT):
Is there a recommendation as to best practices for using the SDK to pass private data in and out? ISTR seeing something that said to use the transient fields, but the example just has it in the mainline code. Then there's another one that has separate calls for private data and for regular on chain data. It seems to be a bit ad hoc. We are starting to think about this and were thinking we should separate the calls for PD and regular chain data and pass in the name of the PD collection as a property with the actual data as if it were a regular transaction. Unless there's a standard way to do it. Especially as I can't see a way to return transient data from the chaincode.

yacovm (Fri, 13 Jul 2018 19:05:23 GMT):
I have a pro tip for you @aatkddny

yacovm (Fri, 13 Jul 2018 19:06:09 GMT):
Generate random salts and use them

aatkddny (Fri, 13 Jul 2018 19:07:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=a9c9913e-3fb8-41b6-9ab4-8a1ac2317259) To encrypt the data? That's not my problem. It's the lack of a formalized API to move it in and out of the calls to the chaincode.

aatkddny (Fri, 13 Jul 2018 19:07:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=a9c9913e-3fb8-41b6-9ab4-8a1ac2317259) To encrypt the data? That's not my problem. It's the lack of a formalized API to move it in and out of the calls to the chaincode and the fact that different dev teams seem to have all chosen different ways to do it.

yacovm (Fri, 13 Jul 2018 19:08:24 GMT):
To hide, not to encrypt

yacovm (Fri, 13 Jul 2018 19:08:43 GMT):
But ok... If you say that's not a problem, its not a problem

yacovm (Fri, 13 Jul 2018 19:09:24 GMT):
You put transiwnt data into the chaincode - not back

aatkddny (Fri, 13 Jul 2018 19:15:25 GMT):
Right. So in order to return private data, I have to return it as part of the return data in the transaction set. Assuming there is any of course. And leaving aside any multiple collection complexity. So to get it in there means I can 1. put it into the transient data - which means the api is asymmetric 2. add it as an extra property (or properties) to the main call 3.or have a separate call (or calls) for each pd collection that self-identifies the name of the collection. My question was is there a recommended method - I don't want to do one flavor and then have to change it all because someone changed everything again in 1.4...

aatkddny (Fri, 13 Jul 2018 19:15:25 GMT):
Right. So in order to return private data, I have to return it as part of the return data in the transaction set. Assuming there is any of course. And leaving aside any multiple collection complexity. So to get it in there means I can 1. put it into the transient data and pull that out and save it - which means the api is asymmetric as I still have to return as part of the main object. 2. add it as an extra property (or properties) to the main call 3.or have a separate call (or calls) for each pd collection that self-identifies the name of the collection. My question was is there a recommended method - I don't want to do one flavor and then have to change it all because someone changed everything again in 1.4...

yacovm (Fri, 13 Jul 2018 19:16:42 GMT):
I think i'm not fully getting you... Lets go slowly

yacovm (Fri, 13 Jul 2018 19:17:00 GMT):
You want to do a query, or an "invoke"?

yacovm (Fri, 13 Jul 2018 19:17:22 GMT):
i.e - do you want to send the result to the ordere

yacovm (Fri, 13 Jul 2018 19:17:26 GMT):
?

aatkddny (Fri, 13 Jul 2018 19:17:33 GMT):
No. Let me try again.

aatkddny (Fri, 13 Jul 2018 19:19:18 GMT):
I am adding data to the BC. I'll call it an asset to save typing and to avoid mixed terms. This asset has some private data associated with it. I need to get asset and private data into and out of my chaincode through the API to properly endorse a transaction.

aatkddny (Fri, 13 Jul 2018 19:19:54 GMT):
So with that as a given, is there a recommended way to use the SDK to pass this data back and forth.

yacovm (Fri, 13 Jul 2018 19:20:27 GMT):
So you put the private data via computing a function in the chaincode that is derived from the transient (for example)

yacovm (Fri, 13 Jul 2018 19:21:16 GMT):
To gettbe data out of the blockchain - you do a query and dont send the result to the orderer and the output is in the payload

aatkddny (Fri, 13 Jul 2018 19:22:00 GMT):
Well actually I was going to pass it in as a serialized map. Privacy here is slightly different from a general case.

yacovm (Fri, 13 Jul 2018 19:22:27 GMT):
Transient is a map 🙄

aatkddny (Fri, 13 Jul 2018 19:22:34 GMT):
I know.

aatkddny (Fri, 13 Jul 2018 19:24:32 GMT):
My private data will be turned into a map. It will be serialized and passed into the chaincode. If I read you correctly you are saying pass it *IN* through the transient map and when time comes to read it get it *OUT* as the return object - just ignore the call to the orderer for the latter.. So I need to make two calls to get asset and private out, but one to get it in.

yacovm (Fri, 13 Jul 2018 19:25:23 GMT):
Why 2 calls?

aatkddny (Fri, 13 Jul 2018 19:27:33 GMT):
My bad - I hadn't looked at the query for a while. I -just- get the proposal response. It doesn't go to the orderer like the invoke does.

aatkddny (Fri, 13 Jul 2018 19:29:14 GMT):
One call, but in through transient and out through the return object then. So my response object needs to account for extra data when compared to the one I put in.

aatkddny (Fri, 13 Jul 2018 19:29:14 GMT):
One call, but in through transient and out through the return object then. So my response object needs to account for extra data when compared to the one I put in. Which is option 1 above I think.

yacovm (Fri, 13 Jul 2018 19:31:09 GMT):
I really dont understand what's the complaint about

yacovm (Fri, 13 Jul 2018 19:31:37 GMT):
So the way is assymetric.... So?

yacovm (Fri, 13 Jul 2018 19:32:21 GMT):
And it wont change in v1.4

aatkddny (Fri, 13 Jul 2018 19:33:43 GMT):
Because it's not intuitive and its inelegant. I need to wrap my responses now to account for the possibility that private data may be part of them, but I'm not to pass it in that way in the requests.

yacovm (Fri, 13 Jul 2018 19:35:58 GMT):
If think about how things work in the system and not how a pretty API would look like- it won't be weird to you 😉

yacovm (Fri, 13 Jul 2018 19:35:58 GMT):
If you think about how things work in the system and not how a pretty API would look like- it won't be weird to you 😉

aatkddny (Fri, 13 Jul 2018 19:39:51 GMT):
Nope. Not getting it. What am I missing? The client (through the channel) calls the peers directly, no? So why can't the chaincode strip the private data out of the main asset before producing the response?

yacovm (Fri, 13 Jul 2018 19:40:33 GMT):
Because the response payload is a function of the chaincode computation

yacovm (Fri, 13 Jul 2018 19:40:50 GMT):
The infrastructure can't introspect it

yacovm (Fri, 13 Jul 2018 19:41:08 GMT):
Since it doesnt know what the computation did

aatkddny (Fri, 13 Jul 2018 19:42:33 GMT):
you lost me. i thought the output of the chaincode was a RW set. I didn't think the input was part of that output.

aatkddny (Fri, 13 Jul 2018 19:43:44 GMT):
So if the input isn't included, ought the chaincode not be free to take part of it and use it as private data while transforming the rest into regular data.

yacovm (Fri, 13 Jul 2018 19:43:47 GMT):
The output of a *query* isn't a RWset, thats just a byproduct

aatkddny (Fri, 13 Jul 2018 19:44:05 GMT):
not a query. i'm talking about sticking it into the thing in the first place.

yacovm (Fri, 13 Jul 2018 19:44:34 GMT):
I'm sorry but i just dont understand... Completely lost you

aatkddny (Fri, 13 Jul 2018 19:45:46 GMT):
i'm missing a key piece of information. i thought on an add of something to the ledger the only connection between input state and output state was contained in the chaincode.

aatkddny (Fri, 13 Jul 2018 19:46:01 GMT):
I didn't think that the input was propagated as part of the output.

aatkddny (Fri, 13 Jul 2018 19:46:01 GMT):
I didn't think that the input was propagated as part of the output.

aatkddny (Fri, 13 Jul 2018 19:47:01 GMT):
i thought the output was the set of data created by the chaincode. it's been a while since i looked at any so let me go find the call i'm talking about.

aatkddny (Fri, 13 Jul 2018 19:48:25 GMT):
shim.setstate

aatkddny (Fri, 13 Jul 2018 19:48:25 GMT):
shim.Petstate

aatkddny (Fri, 13 Jul 2018 19:48:25 GMT):
shim.Putstate

aatkddny (Fri, 13 Jul 2018 19:48:25 GMT):
shim.Putstate `err = api.PutState(fabricAware.ID, jsonBytes)`

aatkddny (Fri, 13 Jul 2018 19:48:25 GMT):
shim.Putstate `err = api.PutState(fabricAware.ID, jsonBytes)` plus - obviously - any of the other xxxState calls.

yacovm (Fri, 13 Jul 2018 19:51:14 GMT):
I didn't say the input was propagated as part of the output

aatkddny (Fri, 13 Jul 2018 19:52:41 GMT):
Right so then why can't the same object come in as go out. Why does the private data need to go in through transient?

aatkddny (Fri, 13 Jul 2018 19:52:41 GMT):
Right so then why can't the same object come in as go out. Why does the private data need to go in through transient? Given that the client calls the peers to endorse.

yacovm (Fri, 13 Jul 2018 19:53:13 GMT):
oh... because it's visible in the proposal

aatkddny (Fri, 13 Jul 2018 19:53:31 GMT):
But doesn't the proposal only go to the peers?

yacovm (Fri, 13 Jul 2018 19:53:46 GMT):
no... it's part of the final transaction

aatkddny (Fri, 13 Jul 2018 19:54:04 GMT):
So the input is *is* propagated.

aatkddny (Fri, 13 Jul 2018 19:54:04 GMT):
So the input *is* propagated.

yacovm (Fri, 13 Jul 2018 19:54:10 GMT):
not from the chaincode

aatkddny (Fri, 13 Jul 2018 19:55:05 GMT):
I'm conflating the whole chaincode:peer mess here. I don't care which bit propagates input to output, it's sufficient that it gets propagated.

aatkddny (Fri, 13 Jul 2018 19:55:22 GMT):
and that was the piece of information i was missing. thanks.

yacovm (Fri, 13 Jul 2018 19:57:26 GMT):
look here https://github.com/hyperledger/fabric/blob/release-1.2/protos/peer/proposal.proto#L201-L212

aatkddny (Fri, 13 Jul 2018 19:58:06 GMT):
got it.

yacovm (Fri, 13 Jul 2018 19:58:16 GMT):
and https://github.com/hyperledger/fabric/blob/release-1.2/protos/peer/proposal.proto#L239-L250

aatkddny (Fri, 13 Jul 2018 20:12:47 GMT):
@yacovm thanks again. i may not be a fan, but at least i know now how to both do it and how to do it properly. :)

yacovm (Fri, 13 Jul 2018 20:13:10 GMT):
do what?

amolpednekar (Mon, 16 Jul 2018 04:15:18 GMT):
@rickr Seeing these error when I deploy my SDK wrapper on Tomcat ``` Exception in thread "grpc-default-executor-1126" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:717) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957) at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1025) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Exception in thread "pool-1062-thread-1" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:717) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957) at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1025) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ``` Are these originating from the SDK? If yes, why are these propping up?

amolpednekar (Mon, 16 Jul 2018 04:15:18 GMT):
@rickr Seeing these errors when I deploy my SDK wrapper on Tomcat, after it runs for a while ``` Exception in thread "grpc-default-executor-1126" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:717) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957) at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1025) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Exception in thread "pool-1062-thread-1" java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:717) at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957) at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1025) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ``` Are these originating from the SDK? If yes, why are these propping up?

kmohanar1 (Mon, 16 Jul 2018 09:18:36 GMT):
Has joined the channel.

kmohanar1 (Mon, 16 Jul 2018 09:30:25 GMT):
Hi All, I have some question related to SDK. i tried to setup node sdk for my blockchain application(single org and has only one peer), it is working. As of now i am trying to setup two node js server's, one is for peer1 of org 1 and another one for peer1 of org 2. i am ending up with the error, error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at new createStatusError (/scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:64:15) at /scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:583:15 i need some clarification and help on the these things, 1) Setting up of node servers for each peer should able to do. - please correct me if i am wrong. 2) If anyone has multi node server setup for blockchain application - can you please share it / guide on this. I havent tried java sdk. But, I am trusting that somebody might tried both approaches Can you people help on this if possible Regards Kumar M

kmohanar1 (Mon, 16 Jul 2018 09:30:25 GMT):
I have some question related to SDK. i tried to setup node sdk for my blockchain application(single org and has only one peer), it is working. As of now i am trying to setup two node js server's, one is for peer1 of org 1 and another one for peer1 of org 2. i am ending up with the error, error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority at new createStatusError (/scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:64:15) at /scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:583:15 i need some clarification and help on the these things, 1) Setting up of node servers for each peer should able to do. - please correct me if i am wrong. 2) Is it possible to run two servers by configuring on different port number in single machine itslef. Please explain if there is any contraint 3) If anyone has multi node server setup for blockchain application - can you please share it / guide on this. I havent tried java sdk. But, I am trusting that somebody might tried both approaches Can you people help on this if possible Regards Kumar M

oborovyk (Mon, 16 Jul 2018 10:59:59 GMT):
Guys is there any specific reason for using checked exceptions for parameter validation?

andrew-coleman (Mon, 16 Jul 2018 12:06:12 GMT):
Has joined the channel.

rickr (Mon, 16 Jul 2018 13:05:57 GMT):
@amolpednekar Most likely you don't have enough memory allocated for your tomcat process.

rickr (Mon, 16 Jul 2018 13:07:45 GMT):
@kmohanar1 ask on #fabric-sdk-node Not sure I follow your questions. There are on the JSDK and I think the NSDK multiple peers running on different ports.

rickr (Mon, 16 Jul 2018 13:08:22 GMT):
@oborovyk it was continued on from the sdk 0.6 It is what it is now.

gravity (Mon, 16 Jul 2018 14:41:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qaw858639M5bDnC3g) Hello I'm trying to generate a channel configuration using a template, but as I can see it needs ca certs and admin cert to generated that config. Did I miss something about templating?

gravity (Mon, 16 Jul 2018 14:42:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KFu5aBCSeE58raR7X) @aatkddny Hello I'm trying to generate a channel configuration using a template, but as I can see it needs ca certs and admin cert to generated that config. Did I miss something about templating?

gravity (Mon, 16 Jul 2018 15:07:23 GMT):
Hi all Why it's impossible to enroll an org admin (who can create channels and install chaincodes) via fabric-ca (using java sdk)? I'm getting the certificates, but when I try to an admin action, I'm getting the errror that `The identity is not an admin`.

aatkddny (Mon, 16 Jul 2018 22:58:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3opBci36PyhuMHdr4) No. But they are (or should be) in a known place.

ddurnev (Tue, 17 Jul 2018 07:10:15 GMT):
Has joined the channel.

donsonZhang (Tue, 17 Jul 2018 09:10:52 GMT):
when the fabric java sdk 1.2 release?

donsonZhang (Tue, 17 Jul 2018 10:23:54 GMT):
the eventHubs and the getEventingPeers all can establish gprc to listen blockevent, so what the difference ?

donsonZhang (Tue, 17 Jul 2018 10:25:20 GMT):
and I found if not event peer,and only the eventhub, the invoke function can not recevice transactionEvent

rickr (Tue, 17 Jul 2018 11:09:41 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fab-6066-jsdk-channel-service-for-events

rickr (Tue, 17 Jul 2018 11:10:29 GMT):
```The Fabric peer now implements eventing services on the same endpoint as proposal endorsements and it is no longer necessary to have an EventHub service. Using peer eventing is the preferred means for receiving events. Future releases of Fabric may not support Eventhubs.```

Adam_Hardie (Wed, 18 Jul 2018 13:07:41 GMT):
ChaincodeEventListener seems to be calling received() twice per transaction (when there is only one event per tx).. can anyone advise why this would be?

rickr (Wed, 18 Jul 2018 13:09:56 GMT):
You'll get an event for each eventhub and peer eventing service you have

Adam_Hardie (Wed, 18 Jul 2018 13:16:52 GMT):
okay thank you!

Adam_Hardie (Wed, 18 Jul 2018 13:39:12 GMT):
so going by the above, i can actually just not use an eventhub in this case, and just register an eventingpeer instead

Adam_Hardie (Wed, 18 Jul 2018 13:40:11 GMT):
im sure I only have a single eventhub, and a normal peer currently. will the 'normal' peer [channel.addPeer(peer);] cause events too?

Adam_Hardie (Wed, 18 Jul 2018 13:40:27 GMT):
when i say cause i mean call received()

Adam_Hardie (Wed, 18 Jul 2018 13:41:59 GMT):
apologies if that is cryptic :)

Adam_Hardie (Wed, 18 Jul 2018 13:42:25 GMT):
i just believe i have the most basic setup channel.addPeer(peer); channel.addEventHub(eventHub); channel.addOrderer(orderer); channel.initialize(); and then channel.registerChaincodeEventListener(

rickr (Wed, 18 Jul 2018 13:46:40 GMT):
Look at the blockEvent you receive there's a method getEventHub and getPeer on should always be null an the other the source of the event

Adam_Hardie (Wed, 18 Jul 2018 13:51:02 GMT):
excellent, thank you very much for your pointer

oborovyk (Wed, 18 Jul 2018 13:58:39 GMT):
What is the correct strategy to use HFClient with multiple users? Cache multiple instances? setUserContext for each call? Make disposable clients?

rickr (Wed, 18 Jul 2018 14:13:08 GMT):
@oborovyk You need to decide on how your application will use it. Let me point out that setting user context is not a thread safe operation. Instead if you plan on using multiple threads look at api that explicitly set thus override the usercontext set on the client.

rickr (Wed, 18 Jul 2018 14:13:08 GMT):
@oborovyk You need to decide on how your application will use it. Let me point out that setting user context on the client is not a thread safe operation. Instead if you plan on using multiple threads look at api that explicitly set thus override the usercontext set on the client.

rickr (Wed, 18 Jul 2018 14:13:08 GMT):
@oborovyk You need to decide on how your application will use it. Let me point out that setting user context on the client is not a thread safe operation. Instead if you plan on using multiple threads look at api that explicitly set it thus override the usercontext set on the client.

oborovyk (Wed, 18 Jul 2018 14:44:14 GMT):
Ok thx. Then User implementation becomes smth like UserProvider if i understand correctly

IgorSim (Wed, 18 Jul 2018 15:11:42 GMT):
hi, one question about channel (re)initialization. Let's say channel object is already initialized and in HLF there is new organization that has joined the network and network has been reconfigured. This means that channel should be reinitialized. Is it possible to modify already initialized channel (for example by adding peer(s) from the new org) or channel should be shutdown and initialized again ?

oborovyk (Wed, 18 Jul 2018 15:30:46 GMT):
+1. Also a problem to split the initialization and defer addition of event listeners. Is channel.initialize() idempotent ?

samir.tata (Thu, 19 Jul 2018 03:58:02 GMT):
Has joined the channel.

yuriiuhlanov (Thu, 19 Jul 2018 10:19:44 GMT):
Has joined the channel.

rickr (Thu, 19 Jul 2018 12:19:57 GMT):
There are some minor bugs/enhancements looking at in that area but in *theory* there should be nothing the app should really need to do as long as the channel has an active eventing source or is using service discovery.

tballast (Thu, 19 Jul 2018 13:37:17 GMT):
Has joined the channel.

amongv587 (Thu, 19 Jul 2018 15:08:33 GMT):
Has joined the channel.

akoenig (Fri, 20 Jul 2018 09:55:00 GMT):
Hi, is there a way to get all functions of a chaincode? There is the class"ChaincodeInfo" but i can't get any methods from this class. E.g. in my ChainCode "foo" is a method "bar" with the inputs "xyz" and "zyx". Is there a way to get those infos?

akoenig (Fri, 20 Jul 2018 09:55:34 GMT):
I need this to give the user some information about the existing methods of the chaincode which he maybe wants to use

rickr (Fri, 20 Jul 2018 12:01:27 GMT):
I'm not the chaincode expert by far :) but I don't think there is a way to query running chaincode for what methods/parameters it supports ( _like Java reflection_ ). Probably better asked on #fabric-chaincode-dev channel.

rickr (Fri, 20 Jul 2018 12:02:49 GMT):
I've seen you've already done --- _please don't cross post same question on several channels!_

oborovyk (Fri, 20 Jul 2018 16:30:57 GMT):
Hi, I can't find the code which stops the event listener thread(s) which are created in startEventQue() after channel.shutdown() or channel.unregisterBlockListener(). Is it a bug or am I missing smth? Also if channel.initialize() is called twice it will lead to duplicated events.

rickr (Fri, 20 Jul 2018 17:03:54 GMT):
Should be no need to call initialize twice

rickr (Fri, 20 Jul 2018 17:06:12 GMT):
I think if you shutdown the channel it should stop all

oborovyk (Fri, 20 Jul 2018 17:19:55 GMT):
it should but it doesn

oborovyk (Fri, 20 Jul 2018 17:19:55 GMT):
it should but it seems it doesn't. There's client.getExecutorService().execute(() -> l.listener.received(blockEvent)); and only eventQueueThread.interrupt();. Would be probably better to have an executor service per channel

rickr (Fri, 20 Jul 2018 17:51:49 GMT):
I'll need to look closer .. but for shutdown all the block listeners are cleared. All eventhubs and peers that would be generating the events are also shutdown. Not sure how the channel would still be generating events

rickr (Fri, 20 Jul 2018 17:58:41 GMT):
Even on the loop that's tasking off events there's a check on the channels shutdown to not processes events.

oborovyk (Fri, 20 Jul 2018 18:43:31 GMT):
Well maybe it wouldn't but the possible thread leak is still a bad smell. And it would be really cool to add or remove listeners after the channel is initialized.

rickr (Fri, 20 Jul 2018 18:56:14 GMT):
There shouldn't be any thread leak either. The thread is interrupted and the the loop that's processing should break out on the shutdown set to true exiting the thread routine. The field that's holding the eventThread is also set to null so nothing should be referencing it either.

oborovyk (Fri, 20 Jul 2018 19:10:53 GMT):
Yes indeed. You're right.

rickr (Fri, 20 Jul 2018 19:11:43 GMT):
I just created class with a finalizer that printed out a message. Created an instance in that loop ... then intialized and shoutdown the channel .. The finalizer for that class printed out so it was GCed

oborovyk (Fri, 20 Jul 2018 19:13:58 GMT):
Thanks for checking

tkg (Sun, 22 Jul 2018 19:06:02 GMT):
Has joined the channel.

GopalPanda (Mon, 23 Jul 2018 13:56:10 GMT):
Has joined the channel.

ksheer (Tue, 24 Jul 2018 06:10:34 GMT):
Has joined the channel.

amolpednekar (Tue, 24 Jul 2018 06:34:17 GMT):
@rickr When registering and enrolling with CA, I have noticed that the attributes only get added if ecert boolean is set to true during registration. If its false, and I specify the attrs during enrollment, they dont get added

amolpednekar (Tue, 24 Jul 2018 06:34:28 GMT):
*im using sdk 1.1

Igor-Ivaniuk (Tue, 24 Jul 2018 08:12:38 GMT):
Has joined the channel.

chill37 (Wed, 25 Jul 2018 00:16:58 GMT):
Has joined the channel.

chill37 (Wed, 25 Jul 2018 00:17:51 GMT):
Hi. is there going to be tcert support apart from idimix? I see lira-todo for java-sdk-idemix but not java-sdk-tcert-support. just wondering what the timeline is

rickr (Wed, 25 Jul 2018 12:13:50 GMT):
Things may change but AFAIK there's no support for tcerts in the near term being planned.

rickr (Wed, 25 Jul 2018 13:32:02 GMT):
@amolpednekar Can you enable the trace on the SDK. You should see then ... ``` 2018-07-25 13:27:06,876 main DEBUG HFCAClient:1194 - httpPost https://localhost:7054/api/v1/register, ``` and... ``` 2018-07-25 13:27:53,322 main DEBUG HFCAClient:1118 - httpPost https://localhost:7054/api/v1/enroll, body: ``` It should see the parameters be sent to the CA If they look ok .. I would bring this up with #fabric-ca channel.

rickr (Wed, 25 Jul 2018 13:32:02 GMT):
@amolpednekar Can you enable the trace on the SDK. You should see then ... ``` 2018-07-25 13:27:06,876 main DEBUG HFCAClient:1194 - httpPost https://localhost:7054/api/v1/register, ``` and... ``` 2018-07-25 13:27:53,322 main DEBUG HFCAClient:1118 - httpPost https://localhost:7054/api/v1/enroll, body: ``` You should see the parameters being sent to the CA If they look ok .. I would bring this up with #fabric-ca channel.

chill37 (Wed, 25 Jul 2018 23:07:03 GMT):
@rickr Thanks for the answer!

chill37 (Wed, 25 Jul 2018 23:09:34 GMT):
one more question, regarding HSM. In FABJ-308, it seems like the HSM for Java SDK has been developed already but in JavaSDK document it is written that current JavaSDK(v1.1 I presume) does not support HSM. which is correct? or is it that HSM has been enabled but it is just not implemented in the current version? thanks!

rickr (Wed, 25 Jul 2018 23:41:07 GMT):
No. For signing and verifying the SDK is using Java JCA/JCE provided APIs ( _unless something has regressed_ ) An application would have to use a HSM Java security provider for HSM. The JSDK is not being regularly tested with any HSM so there are no guarantees it's working.

kesavants (Thu, 26 Jul 2018 13:12:55 GMT):
Any one knows how to decode the ouput generated by system chaincode getdepspec using this using peer chaincode query -C "" -n lscc -c '{"Args":["getdepspec", "",""]}'

kesavants (Thu, 26 Jul 2018 16:25:30 GMT):
Does the node sdk and java SDK have same set of features/simlar set of release schedules. Trying to evaluate which to use for the application service layer. Thanks

chill37 (Fri, 27 Jul 2018 04:00:27 GMT):
@rickr good to know. thanks!

yulong12 (Fri, 27 Jul 2018 07:14:45 GMT):
Hi everyone. I have a problem. I use fabric-sdk-java connect byfn and invoke chaincode. first I query the a,then invoke a,b,10. but when I query a again. the a don't change

yulong12 (Fri, 27 Jul 2018 07:15:06 GMT):
so I wany to ask why? below is my java code

yulong12 (Fri, 27 Jul 2018 07:22:01 GMT):
``` Security.addProvider(new BouncyCastleProvider()); final CryptoSuite crypto = CryptoSuite.Factory.getCryptoSuite(); // Create client and set default crypto suite System.out.println("Creating client"); final HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(crypto); // Loading org1 User1 from disk System.out.println("Loading org1 User1 from disk"); final String privateKeyFileName = "/Users/jiangnan/Documents/GOPATH/src/github.com/hyperledger/jn2/crypto-config/peerOrganizations/org1.1532510690564.svc.cluster.local/users/Admin@org1.1532510690564.svc.cluster.local/msp/keystore/41b72ed63eee9886ac071377cc1a6450990ec4d0288fbd444491514ca5a5b998_sk"; final String certificateFileName = "/Users/jiangnan/Documents/GOPATH/src/github.com/hyperledger/jn2/crypto-config/peerOrganizations/org1.1532510690564.svc.cluster.local/users/Admin@org1.1532510690564.svc.cluster.local/msp/signcerts/Admin@org1.1532510690564.svc.cluster.local-cert.pem"; final File privateKeyFile = new File(privateKeyFileName); final File certificateFile = new File(certificateFileName); final User User1 = Utils.getUser("Admin", "org1MSP", privateKeyFile, certificateFile); client.setUserContext(User1); // Accessing channel, should already exist System.out.println("Accessing channel"); Channel myChannel = client.newChannel("jncha2"); System.out.println("Setting channel configuration"); final List peers = new LinkedList<>(); Properties peerProperties = new Properties(); peerProperties.setProperty("pemFile", "/Users/jiangnan/Documents/GOPATH/src/github.com/hyperledger/jn2/crypto-config/peerOrganizations/org1.1532510690564.svc.cluster.local/peers/peer0-org1.1532510690564.svc.cluster.local/tls/server.crt"); peerProperties.setProperty("hostnameOverride", "peer0-org1.1532510690564.svc.cluster.local"); peerProperties.setProperty("sslProvider", "openSSL"); peerProperties.setProperty("negotiationType", "TLS"); peers.add(client.newPeer("peer0-org1.1532510690564.svc.cluster.local", "grpcs://peer0-org1.1532510690564.svc.cluster.local:32331", peerProperties)); myChannel.addPeer(peers.get(0)); Properties orderProperties = new Properties(); orderProperties.setProperty("pemFile", "/Users/jiangnan/Documents/GOPATH/src/github.com/hyperledger/jn2/crypto-config/ordererOrganizations/1532510690564.svc.cluster.local/orderers/orderer0.1532510690564.svc.cluster.local/tls/server.crt"); orderProperties.setProperty("hostnameOverride", "orderer0.1532510690564.svc.cluster.local"); orderProperties.setProperty("sslProvider", "openSSL"); orderProperties.setProperty("negotiationType", "TLS"); Orderer orderer = client.newOrderer("orderer0.1532510690564.svc.cluster.local", "grpcs://orderer0.1532510690564.svc.cluster.local:30496", orderProperties); myChannel.addOrderer(orderer); myChannel.initialize(); ```

yulong12 (Fri, 27 Jul 2018 07:22:39 GMT):
``` final TransactionProposalRequest invokeProposalRequest = client.newTransactionProposalRequest(); final ChaincodeID chaincodeID = ChaincodeID.newBuilder().setName("jncha2-jnheyu2").setVersion("v1").build(); invokeProposalRequest.setChaincodeID(chaincodeID); invokeProposalRequest.setFcn("invoke"); invokeProposalRequest.setProposalWaitTime(TimeUnit.SECONDS.toMillis(10)); invokeProposalRequest.setArgs(new String[] { "move", "a", "b", "100" }); // Send proposal and wait for responses System.out.println("Sending proposal for invoke(a)"); final Collection queryAResponses = myChannel.sendTransactionProposal(invokeProposalRequest, myChannel.getPeers()); Thread.sleep(10000); for (ProposalResponse resp : queryAResponses) { System.out.println( "Response from peer " + resp.getPeer().getName() + " is " + resp.getProposalResponse().getResponse() + " " + resp.getProposalResponse().getResponse().getPayload().toStringUtf8()); } ```

yulong12 (Fri, 27 Jul 2018 07:22:51 GMT):
so who can help me

vijay5378 (Fri, 27 Jul 2018 09:24:30 GMT):
@rickr Is there anyway to get the genesis block through java sdk? Scenario: I have a channel with peer msp's configured and have started the channel. The peers are on different machines. A peer wants to join the channel(His MSP is already present). Can the peer retrieve the genesis block of the channel through java-sdk to join the channel or should it be done only through CLI?

rickr (Fri, 27 Jul 2018 10:56:51 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/33760188370ed4653cca93e727e509e774c5c8c1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L853 ?

rickr (Fri, 27 Jul 2018 11:00:28 GMT):
@yulong12 Should check if the proposals endorsements are ok. Better than doing a sleep use and event source to know when it's done. Study the End2endIT tests

vijay5378 (Fri, 27 Jul 2018 11:02:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oGL92Yv7o7TYyJzrN) @rickr Thanks. I did go through the code. There is one issue here - Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, sampleOrg.getPeerAdmin())); creates a new channel. However in this case, assume that a channel has been created in one server. A peer on another server needs to join the channel (The new peer's MSP details have been added to the channel configuration). In the new peer, do I create a newChannel again and then join the peer to the new channel? This part is somewhat confusing.

rickr (Fri, 27 Jul 2018 11:05:00 GMT):
Don't create the channel .. and just join the peer. Seen End2endAndBackAgainIT when constructing the channel instead of adding the peer .. join it

vijay5378 (Fri, 27 Jul 2018 11:09:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2hc4eRpJc4n8awYgh) @rickr Thanks. Saw En2endAndBackAgainIT. You have serialized the channel and stored it. This gets deserialized and the channel is obtained. Is this correct? So I would need to find a way to securely send the serialized channel to the new server (where the new peer is joining) - is this correct?

rickr (Fri, 27 Jul 2018 11:13:24 GMT):
no - it also show how to manual recreate the existing channel too

vijay5378 (Fri, 27 Jul 2018 11:46:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jmH4QeT9yJNFK3tCx) @rickr Thanks. Let me try it out

alaric (Sat, 28 Jul 2018 01:46:18 GMT):
Has joined the channel.

clydedacruz (Sat, 28 Jul 2018 18:26:43 GMT):
couch

clydedacruz (Sat, 28 Jul 2018 18:33:07 GMT):
Hi in the node-sdk The couchdb kay value store extends api.KeyValueStore. any such class in in the java sdk ? OR any guide tto having your own implementation of the client credential store ?

rickr (Sun, 29 Jul 2018 14:46:19 GMT):
No persistence in the SDK. The integration test gives a trivial example of how an an application might go about it.

yulong12 (Mon, 30 Jul 2018 07:10:33 GMT):
Hi I have a problem :joy:

yulong12 (Mon, 30 Jul 2018 07:10:40 GMT):
``` Channel mychannel, send transaction failed on orderer OrdererClient-mychannel-orderer.example.com(grpcs://localhost:7050). Reason: Channel mychannel orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during orderer next ```

yulong12 (Mon, 30 Jul 2018 07:11:07 GMT):
what leads this problem?

ascatox (Mon, 30 Jul 2018 10:47:16 GMT):
Hi All! I couldn't understand how authenticate my client application with an user created by the fabric-ca, without using in my application the **admin** certificates

ascatox (Mon, 30 Jul 2018 10:47:16 GMT):
Hi All! I couldn't understand how authenticate my client application with a **simple user** created by the fabric-ca, without using in my application the **admin** certificates

ascatox (Mon, 30 Jul 2018 10:47:16 GMT):
Hi All! I couldn't understand how to authenticate my client application with a **simple user** created by the fabric-ca, without using in my application the **admin** certificates

ascatox (Mon, 30 Jul 2018 10:47:16 GMT):
Hi All! I couldn't understand how to authenticate my java client application with a **simple user** created by the fabric-ca, without using in my application the **admin** certificates

ascatox (Mon, 30 Jul 2018 10:47:16 GMT):
Hi All! I couldn't understand how to authenticate my java client application with a **simple user** created by the fabric-ca, without using in my application the **admin** certificates.

ascatox (Mon, 30 Jul 2018 10:47:16 GMT):
Hi All! I couldn't understand how to authenticate my java client application with a **simple user** created by the fabric-ca, without using in my application the **admin** certificates to enroll the user.

rickr (Mon, 30 Jul 2018 11:59:36 GMT):
@yulong12 The error is generated by the Orderer you'll need to look at it's logs to get more details.

rickr (Mon, 30 Jul 2018 12:05:27 GMT):
@ascatox The admin more appropriately the CA registrar needs to register the user. After that the user should do the enroll. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/cd7a114cebd48ff50b6ec14e47d62cf79bda9d3d/src/main/java/org/cr22rc/MultiDomainSample.java#L231-L239 This demos that ^^ and it' also in the integration tests. Spend the time debugging the intergration test is well worth the effort :wink:

ascatox (Mon, 30 Jul 2018 12:06:28 GMT):
Thank you very much for the advise 👍🏻

yulong12 (Tue, 31 Jul 2018 03:13:36 GMT):
Hi everyone. I have a problem. I use fabric-sdk-java connect byfn and invoke chaincode. first I query the a,then invoke a,b,10. but when I query a again. the a don't change .that is to say: the invoke function doesn't work

yulong12 (Tue, 31 Jul 2018 03:13:51 GMT):
this is my code

yulong12 (Tue, 31 Jul 2018 03:14:43 GMT):
``` public static void main(String[] args) throws IllegalAccessException, InstantiationException, ClassNotFoundException, CryptoException, InvalidArgumentException, NoSuchMethodException, InvocationTargetException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, IOException, TransactionException, ProposalException, InterruptedException { Security.addProvider(new BouncyCastleProvider()); final CryptoSuite crypto = CryptoSuite.Factory.getCryptoSuite(); // Create client and set default crypto suite System.out.println("Creating client"); final HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(crypto); // Loading org1 User1 from disk System.out.println("Loading org1 User1 from disk"); final String privateKeyFileName = "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/abe54948e5b0c95b5b04cb3cdc4566a25d96b19459773695853cd844eeb8b380_sk"; final String certificateFileName = "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"; final File privateKeyFile = new File(privateKeyFileName); final File certificateFile = new File(certificateFileName); final User User1 = Utils.getUser("User1", "Org1MSP", privateKeyFile, certificateFile); client.setUserContext(User1); // Accessing channel, should already exist System.out.println("Accessing channel"); Collection orderers = new LinkedList<>(); Properties orderProperties = new Properties(); orderProperties.setProperty("clientCertFile", "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.crt"); orderProperties.setProperty("clientKeyFile", "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.key"); orderProperties.setProperty("pemFile", "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt"); orderProperties.setProperty("hostnameOverride", "orderer.example.com"); orderProperties.setProperty("sslProvider", "openSSL"); orderProperties.setProperty("negotiationType", "TLS"); Orderer orderer = client.newOrderer("orderer.example.com", "grpcs://localhost:7050", orderProperties); // orderers.remove(anOrderer); // // ChannelConfiguration channelConfiguration = new ChannelConfiguration(new File( // "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/channel-artifacts/channel.tx")); Channel myChannel = client.newChannel("mychannel"); myChannel.addOrderer(orderer); System.out.println("Setting channel configuration"); final List peers = new LinkedList<>(); Properties peerProperties = new Properties(); peerProperties.setProperty("pemFile", "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt"); peerProperties.setProperty("hostnameOverride", "peer0.org1.example.com"); peerProperties.setProperty("sslProvider", "openSSL"); peerProperties.setProperty("negotiationType", "TLS"); peerProperties.setProperty("clientCertFile", "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt"); peerProperties.setProperty("clientKeyFile", "/Users/zhangyulong/Documents/gopath/src/github.com/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key"); peers.add(client.newPeer("peer0.org1.example.com", "grpcs://localhost:7051", peerProperties)); ```

yulong12 (Tue, 31 Jul 2018 03:15:08 GMT):
``` myChannel.addPeer(peers.get(0), createPeerOptions().setPeerRoles((EnumSet.of(PeerRole.ENDORSING_PEER, PeerRole.LEDGER_QUERY, PeerRole.CHAINCODE_QUERY, PeerRole.EVENT_SOURCE)))); // myChannel.addPeer(peers.get(1), createPeerOptions().setPeerRoles((EnumSet.of(PeerRole.ENDORSING_PEER, // PeerRole.LEDGER_QUERY, PeerRole.CHAINCODE_QUERY, PeerRole.EVENT_SOURCE)))); // myChannel.addPeer(peers.get(2), createPeerOptions().setPeerRoles((EnumSet.of(PeerRole.ENDORSING_PEER, // PeerRole.LEDGER_QUERY, PeerRole.CHAINCODE_QUERY, PeerRole.EVENT_SOURCE)))); // myChannel.addPeer(peers.get(3), createPeerOptions().setPeerRoles((EnumSet.of(PeerRole.ENDORSING_PEER, // PeerRole.LEDGER_QUERY, PeerRole.CHAINCODE_QUERY, PeerRole.EVENT_SOURCE)))); EventHub eventHub = client.newEventHub("peer0.org1.example.com", "grpcs://localhost:7053"); // EventHub eventHub1 = client.newEventHub("peer1.org1.example.com", "grpcs://localhost:8053"); // EventHub eventHub2 = client.newEventHub("peer0.org2.example.com", "grpcs://localhost:9053"); // EventHub eventHub3 = client.newEventHub("peer1.org2.example.com", "grpcs://localhost:10053"); myChannel.addEventHub(eventHub); // myChannel.addEventHub(eventHub1); // myChannel.addEventHub(eventHub2); // myChannel.addEventHub(eventHub3); myChannel.initialize(); // Creating proposal for query System.out.println("Creating proposal for query(a)"); final TransactionProposalRequest queryAProposalRequest = client.newTransactionProposalRequest(); final ChaincodeID queryChaincodeID = ChaincodeID.newBuilder().setName("mycc").setVersion("1.0").build(); queryAProposalRequest.setChaincodeID(queryChaincodeID); queryAProposalRequest.setFcn("query"); // queryAProposalRequest.setFcn("queryAllCars"); queryAProposalRequest.setProposalWaitTime(TimeUnit.SECONDS.toMillis(10)); queryAProposalRequest.setArgs(new String[] { "a" }); // queryAProposalRequest.setArgs(new String[] { "" }); // Send proposal and wait for responses System.out.println("Sending proposal for query"); final Collection queryAResponses = myChannel.sendTransactionProposal(queryAProposalRequest, peers); for (ProposalResponse resp : queryAResponses) { System.out.println("Response from peer " + resp.getPeer().getName() + " is ${symbol_escape}n" + resp.getProposalResponse().getResponse() + "${symbol_escape}n" + resp.getProposalResponse().getResponse().getPayload().toStringUtf8()); } // Creating proposal for query System.out.println("Creating proposal for invoke(a,b,10)"); final TransactionProposalRequest invokeProposalRequest = client.newTransactionProposalRequest(); invokeProposalRequest.setChaincodeID(queryChaincodeID); invokeProposalRequest.setFcn("invoke"); invokeProposalRequest.setProposalWaitTime(TimeUnit.SECONDS.toMillis(10)); invokeProposalRequest.setArgs(new String[] { "a", "b", "10" }); final Collection invokeResponses = myChannel.sendTransactionProposal(invokeProposalRequest, peers); for (ProposalResponse resp : invokeResponses) { System.out.println("Response from peer " + resp.getPeer().getName() + " is${symbol_escape}n" + resp.getProposalResponse().getResponse()); } Thread.sleep(3000); // Creating proposal for move System.out.println("Creating proposal for query"); final TransactionProposalRequest moveABProposalRequest = client.newTransactionProposalRequest(); moveABProposalRequest.setChaincodeID(queryChaincodeID); moveABProposalRequest.setFcn("query"); moveABProposalRequest.setProposalWaitTime(TimeUnit.SECONDS.toMillis(10)); moveABProposalRequest.setArgs(new String[] { "a" }); // Send proposal and wait for responses final Collection moveABResponses = myChannel.sendTransactionProposal(moveABProposalRequest, peers); for (ProposalResponse resp : moveABResponses) { System.out.println("Response from peer " + resp.getPeer().getName() + " is${symbol_escape}n" + resp.getProposalResponse().getResponse()); } } } ```

yulong12 (Tue, 31 Jul 2018 03:15:17 GMT):
so who can help me?

kelvinzhong (Tue, 31 Jul 2018 07:13:48 GMT):
@rickr hi rick, i found only the ChaincodeCollectionConfiguration file has been set while chaincode instantiate in PrivateDataIT, should we need to set both the ChaincodeEndorsementPolicy and ChaincodeCollectionConfiguration if the chaincode is using both the private data and the non private date?

KyNguyen (Tue, 31 Jul 2018 07:35:42 GMT):
Has joined the channel.

yulong12 (Tue, 31 Jul 2018 07:44:12 GMT):
who can help me in this problem https://stackoverflow.com/questions/51607992/fabric-sdk-java-invoke-chaincode-doesnt-work

akoenig (Tue, 31 Jul 2018 07:46:28 GMT):
@yulong12 I guess what you want to do is to call the method "move"? Because the invoke function sets inital values to "a" and "b"

akoenig (Tue, 31 Jul 2018 07:47:11 GMT):
the invoke function is just / should be just called once (After the intialiation of the chaincode)

akoenig (Tue, 31 Jul 2018 07:47:50 GMT):
you should take a look at the "E2E"-Test from the sdk

yulong12 (Tue, 31 Jul 2018 07:50:33 GMT):
no I call the method "invoke",the chaincode is in https://github.com/hyperledger/fabric-samples/blob/release-1.2/chaincode/chaincode_example02/go/chaincode_example02.go

yulong12 (Tue, 31 Jul 2018 07:50:36 GMT):
@akoenig

yulong12 (Tue, 31 Jul 2018 07:50:59 GMT):
it is different to Invoke

akoenig (Tue, 31 Jul 2018 08:06:26 GMT):
our problem is, that you just send the proposalrequest but not the proposal it self you have to send it like this: Collection proposalResponses = channel.sendTransactionProposal(transactionProposalRequest); CompletableFuture transactionEventCompletableFuture = channel .sendTransaction(proposalResponses);

KyNguyen (Tue, 31 Jul 2018 08:08:17 GMT):
Hi guys, I'm new in Hyperledger and I want to write a simple chaincode in Java, do you have any instruction to do that?

KyNguyen (Tue, 31 Jul 2018 08:08:51 GMT):
Does Java chaincode available in Hyperledger V 1.0?

kelvinzhong (Tue, 31 Jul 2018 08:34:12 GMT):
java chaincode is not official available yet

kelvinzhong (Tue, 31 Jul 2018 08:34:12 GMT):
java chaincode is not official available yet @KyNguyen

KyNguyen (Tue, 31 Jul 2018 08:38:05 GMT):
yup, thanks @kelvinzhong , So we should write chaincode in GO and user Fabric-skd-java to implement client application access chaincode right?

akoenig (Tue, 31 Jul 2018 08:40:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KYcS5tDMG8ZLEHHDt) @KyNguyen thats the way you go, yes

KyNguyen (Tue, 31 Jul 2018 11:17:08 GMT):
can anybody explain for me what is difference between build application based on Hyperledger-composer and manual coding by Golang + SDK

KyNguyen (Tue, 31 Jul 2018 11:17:08 GMT):
can anybody explain for me what is difference between build application based on Hyperledger-composer and manual coding by Golang + SDK?

dave.enyeart (Tue, 31 Jul 2018 11:35:28 GMT):
@kelvinzhong you always need to set chaincode endorsement policy, whether using public data or private data or both. you only need to set the chaincode's collection configuration with distribution policy if you are using private data.

rickr (Tue, 31 Jul 2018 12:15:15 GMT):
@yulong12 IMO Take the time to walk through the integration tests they do a balance transfer and query results and much more. This should once you get started take half to a day tops I think .

rickr (Tue, 31 Jul 2018 12:15:15 GMT):
@yulong12 IMO Take the time to walk through the integration tests with a debugger they do a balance transfer and query results and much more. This should once you get started a half to a day tops I think .

rickr (Tue, 31 Jul 2018 12:15:15 GMT):
@yulong12 IMO Take the time to walk through the integration tests with a debugger they do a balance transfer and query results and much more. This should once you get started take a half to a day tops I think .

rickr (Tue, 31 Jul 2018 12:22:50 GMT):
@kelvinzhong In general both are optional. You need a chaincode endorsement if you want to change the default. You need ChaincodeCollectionConfiguration if you intend to have private data defined.

mcoblenz (Tue, 31 Jul 2018 16:13:59 GMT):
Has joined the channel.

mcoblenz (Tue, 31 Jul 2018 16:14:18 GMT):
Any suggestions on how to debug this certificate error attempting to use the Java SDK: Error handling message: event message validation failed: [failed deserializing event creator: [the supplied identity is not valid: x509: certificate signed by unknown authority]]? I've already added ca-cert.pem to the list of trusted certificates on my system. I wonder if it's possible that there's a second relevant certificate that I don't know about.

rickr (Tue, 31 Jul 2018 16:21:00 GMT):
Double check that there is not an error prior to that. The logic is checking the response is verified but on some error the peer isn't signing

rickr (Tue, 31 Jul 2018 16:22:11 GMT):
Check the peer logs too

mcoblenz (Tue, 31 Jul 2018 18:56:32 GMT):
I'm thinking I need to revisit my peer setup and work through the example. Doing that now…

mcoblenz (Tue, 31 Jul 2018 18:58:48 GMT):
Aha, the integration tests fail too.

mcoblenz (Tue, 31 Jul 2018 18:58:48 GMT):
Aha, the integration tests fail too.

mcoblenz (Tue, 31 Jul 2018 18:58:54 GMT):
2018-07-31 18:54:30,714 main ERROR CryptoPrimitives:583 - Cannot validate certificate. Error is: Path does not chain with any of the trust anchors…

mcoblenz (Tue, 31 Jul 2018 18:59:23 GMT):
Maybe I need to inform my system that it should trust these particular certs?

kelvinzhong (Wed, 01 Aug 2018 07:26:37 GMT):
@rickr @dave.enyeart thanks for the reply. And is that in V1.2 the transaction would automatically choose the endorsing peer base on the chaincode's collection configuration or endorsement policy?

kelvinzhong (Wed, 01 Aug 2018 07:33:46 GMT):
but it seems that it can't tell which collection would be used and choose the corresponding endorser...

rickr (Wed, 01 Aug 2018 11:46:14 GMT):
You either know _out of band_ what the endorsing policy is and choose peers that meet that or you can try service discovery see the latest 1.2 release notes

rickr (Wed, 01 Aug 2018 11:50:04 GMT):
Not sure I've answered your question: You either know _out of band_ what the endorsing policy is and choose peers that meet that or you can try service discovery see the latest 1.2 release notes. You combine the endorsing responses into a transaction that goes to the Orderer. From there each committing peer inspects that the endorsement policy was meet.

yacovm (Wed, 01 Aug 2018 11:53:11 GMT):
@rickr when are you going to implement collection support? 😉

yacovm (Wed, 01 Aug 2018 11:53:28 GMT):
I opened JIRAs just for you!

rickr (Wed, 01 Aug 2018 11:56:13 GMT):
If you know the collections you can specify it

rickr (Wed, 01 Aug 2018 11:56:13 GMT):
If you know the collections you can specify it. That support was added.

yacovm (Wed, 01 Aug 2018 12:04:16 GMT):
Oh really? Where?

yacovm (Wed, 01 Aug 2018 12:04:23 GMT):
Can you link the change set?

yacovm (Wed, 01 Aug 2018 12:04:35 GMT):
What about cc2cc btw?

rickr (Wed, 01 Aug 2018 12:09:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/1475a3d25b2214095af218992a248242b0508681/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java#L152

Adam_Hardie (Wed, 01 Aug 2018 12:55:03 GMT):
Hello, I have a chaincodeEventListener, which handles chaincodeEvents only when receiving from peer (and not EventHubs) however, we seem to receive the same block twice, and therefore have a duplicate transaction handle. my logging is so: DEBUG | 2018-08-01 13:51:39.908 | 5-thread-1 | gmex.hm.listener.ChaincodeEventListenerImpl | received : Found Event In Block #[137] EventName: message_processed ReceivedFrom: peer0.org1.example.com TxId: 40cd96403a54fd8c1280abb339a778cd46cb92cfbbb5f245bae93200def56ce8 ] DEBUG | 2018-08-01 13:51:39.909 | 7-thread-1 | gmex.hm.listener.ChaincodeEventListenerImpl | received : Found Event In Block #[137] EventName: message_processed ReceivedFrom: peer0.org1.example.com TxId: b31411c8984b41b5f96472c5c934da24f27c95989e36c1e584ecb8183cc1c887 ] the chaincodeEvent.getTxId produces different values, but there is only one chaincode method call (confirmed using the logs) I am wondering how the EventListener has picked up two events in the same block, and if I am missing something obvious

Adam_Hardie (Wed, 01 Aug 2018 12:55:03 GMT):
Hello, I have a chaincodeEventListener, which handles chaincodeEvents only when receiving from peer (and not EventHubs) however, we seem to receive the same block twice, and therefore have a duplicate transaction handle. my logging is so: DEBUG | 2018-08-01 13:51:39.908 | 5-thread-1 | x.hm.listener.ChaincodeEventListenerImpl | received : Found Event In Block #[137] EventName: message_processed ReceivedFrom: peer0.org1.example.com TxId: 40cd96403a54fd8c1280abb339a778cd46cb92cfbbb5f245bae93200def56ce8 ] DEBUG | 2018-08-01 13:51:39.909 | 7-thread-1 | x.hm.listener.ChaincodeEventListenerImpl | received : Found Event In Block #[137] EventName: message_processed ReceivedFrom: peer0.org1.example.com TxId: b31411c8984b41b5f96472c5c934da24f27c95989e36c1e584ecb8183cc1c887 ] the chaincodeEvent.getTxId produces different values, but there is only one chaincode method call (confirmed using the logs) I am wondering how the EventListener has picked up two events in the same block, and if I am missing something obvious

Adam_Hardie (Wed, 01 Aug 2018 13:00:21 GMT):
oops i just found the issue - its a code error

Adam_Hardie (Wed, 01 Aug 2018 13:00:26 GMT):
ignore :)

rickr (Wed, 01 Aug 2018 13:00:54 GMT):
Will do! :smile:

mcoblenz (Wed, 01 Aug 2018 13:15:14 GMT):
Is there a way to disable certificate checking? I'm doing a little demo and for now checking certificates isn't relevant to me.

rickr (Wed, 01 Aug 2018 13:21:03 GMT):
no

Adam_Hardie (Wed, 01 Aug 2018 13:27:40 GMT):
ah, it seemed to be a an issue with my listener but i can now reproduce the problem when running.. unignore ? ...please ? :hushed: i am definitely sending only one message to hyperledger log ->Trying to commit MessageBean: MessageBean [id=12345689431, type=1, timestamp=1] however as per the logging above we get two calls of the chaincode event listener DEBUG | 2018-08-01 14:17:29.390 | 7-thread-1 | x.hm.listener.ChaincodeEventListenerImpl | received : Found Event In Block #[170] EventName: message_processed ReceivedFrom: peer0.org1.example.com TxId: 09a5ff54b5cc92087318597dc47a6a5142594608f1e05c0483755f2797e4cc86 message=[MessageBean [id=12345689431, type=1, timestamp=1]] DEBUG | 2018-08-01 14:17:29.390 | 9-thread-1 | x.hm.listener.ChaincodeEventListenerImpl | received : Found Event In Block #[170] EventName: message_processed ReceivedFrom: peer0.org1.example.com TxId: 8756ec844082884f07d4dd9fa0b9e83d791c6f19b27ede69121d221ddda1a5bd message=[MessageBean [id=12345689431, type=1, timestamp=1]] My chaincode is just setting an event as so stub.SetEvent("message_processed", []byte(json_message_string))

Adam_Hardie (Wed, 01 Aug 2018 13:45:45 GMT):
seemed it was a network issue caused by a server restart. so not relevant to the chat

mcoblenz (Wed, 01 Aug 2018 14:10:45 GMT):
ok, thanks, @rickr

aatkddny (Wed, 01 Aug 2018 22:11:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NRbv5TFm4nwi2YGdk) @rickr So back on July 12 there was a back and forth that was initiated by this error message. A temporary fix was to turn off the `SERVICE_DISCOVERY` peer role. Did this ever get looked into?

aatkddny (Wed, 01 Aug 2018 22:11:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NRbv5TFm4nwi2YGdk) @rickr So back on July 12 there was a back and forth that was initiated by this error message. A temporary fix was to turn off the `SERVICE_DISCOVERY` peer role. I'd like to get back to looking into what service discovery can do for me, but I'm blocked. Did this ever get looked into?

yacovm (Wed, 01 Aug 2018 22:42:22 GMT):
> I'd like to get back to looking into what service discovery can do for me, but I'm blocked. are you asking for the java SDK or architecture-wise ?

kelvinzhong (Thu, 02 Aug 2018 03:19:01 GMT):
okay, I have go through the ServiceDiscoveryIT, but still have some confuses about the design of the collection. for example: if there has a Collection a with authorize(A & B & C) and Collection b with authorize(C & D), theoretically we should not use both collection in one transaction right? otherwise the private data transaction would send to A、B、C and D. and one more confuse, for the discovery service, if the endorsement policy is (A | B | C), and the collection authorize ( A & B), what endoser would the discovery service chose? if it is base on the endorsement policy, then the private data would expose to C

kelvinzhong (Thu, 02 Aug 2018 03:19:01 GMT):
@rickr thanks, I have go through the ServiceDiscoveryIT, but still have some confuses about the design of the collection. for example: if there has a Collection a with authorize(A & B & C) and Collection b with authorize(C & D), theoretically we should not use both collection in one transaction right? otherwise the private data transaction would send to A、B、C and D. and one more confuse, for the discovery service, if the endorsement policy is (A | B | C), and the collection authorize ( A & B ), what endoser would the discovery service chose? if it is base on the endorsement policy, then the private data would expose to C

emiliastk (Thu, 02 Aug 2018 04:47:00 GMT):
Has joined the channel.

yacovm (Thu, 02 Aug 2018 06:07:45 GMT):
@kelvinzhong - the discovery interdects between the EP and the collection policy

yacovm (Thu, 02 Aug 2018 06:07:45 GMT):
@kelvinzhong - the discovery intersects between the EP and the collection policy

kelvinzhong (Thu, 02 Aug 2018 06:28:02 GMT):
@yacovm okay, thanks for the answer

kelvinzhong (Thu, 02 Aug 2018 06:38:12 GMT):
I just found that some note seems easy to be misunderstood in the docs http://hyperledger-fabric.readthedocs.io/en/latest/whatis.html the section of "Pluggable Consensus", my colleague thought the orderer is the consensus node, and solo/kafka is consensus solution. I think it is more like the pluggable ordering service consistency solution. and orderer is just a part of the consensus flow.

kelvinzhong (Thu, 02 Aug 2018 06:38:32 GMT):
@yacovm please correct me if i am wrong:grin:

yacovm (Thu, 02 Aug 2018 07:12:51 GMT):
long term the consensus algorithm should be pluggable too

yacovm (Thu, 02 Aug 2018 07:12:58 GMT):
right now you need to modify the code

kelvinzhong (Thu, 02 Aug 2018 08:31:40 GMT):
but it seems impossible to make the consensus algorithm pluggable unless change the transaction flow... to make the endorsement policy pluggable seems more reasonable for now...

AleksanderSurman (Thu, 02 Aug 2018 11:06:17 GMT):
Has joined the channel.

kmohanar1 (Thu, 02 Aug 2018 11:50:07 GMT):
Hi All,

kmohanar1 (Thu, 02 Aug 2018 11:50:50 GMT):
i am new to JSDK. i am trying to run the sample java sdk https://github.com/hyperledger/fabric-sdk-java

kmohanar1 (Thu, 02 Aug 2018 11:51:27 GMT):
i am setup the environment with JDK, Maven, eclipse

kmohanar1 (Thu, 02 Aug 2018 11:53:10 GMT):
now, i ran the step https://github.com/hyperledger/fabric-sdk-java#latest-builds-of-fabric-and-fabric-ca-v130 , which started the containers. But i can see immediately sdkintegration_ccenv_1 is exiting

kmohanar1 (Thu, 02 Aug 2018 11:53:41 GMT):
i cant see any docker docker logs for that container, its empty

kmohanar1 (Thu, 02 Aug 2018 11:53:51 GMT):
Can anyone please help me

rickr (Thu, 02 Aug 2018 13:51:38 GMT):
https://github.com/hyperledger/fabric-sdk-java#important-version-13-is-work-in-progress

rickr (Thu, 02 Aug 2018 13:51:38 GMT):
https://github.com/hyperledger/fabric-sdk-java#important-version-13-is-work-in-progress try 1.2 if you checked it out via git then all you probably need to do is `git checkout -b release-1.2`

rickr (Thu, 02 Aug 2018 13:56:35 GMT):
@aatkddny If I recall correctly, you had a setup that explicitly defined peers, orderers but they switched to using service discovery with an update. You switched the roles back to just using explicitly defined chain again. Release notes has some info on service discovery.

aatkddny (Thu, 02 Aug 2018 14:08:39 GMT):
You don't recall correctly in this case. It picked up the new service discovery role as a consequence of my not setting roles explicitly on the peer when I added it to the network configuration. It was defaulting to all roles, and failed when I upgraded 1.2 snapshot versions and picked up the new roles in the newer version. It failed when I tried to do a channel loadFromNetworkConfig (or whatever the exact call is) inside the service discovery code. I wasn't trying to use discovery, I *just* wanted to connect to my channel so I could use the application built on top of the fabric. It went back to doing what it always did when I defined an EnumSet of peer roles that explicitly excluded the Service Discovery role and I haven't looked at it since - because it's all still working. At the time I didn't care about service discovery - I just wanted my local fabric to work so I could do the demo I had scheduled. Silly me for upgrading versions... Now I want to look at service discovery to see if it has any value for us. Hence I was wondering if anything had been changed that would fix whatever the original problem was before I go and change my code back to reconstitute a network with the discovery role on.

rickr (Thu, 02 Aug 2018 15:07:19 GMT):
I don't see anything other than you really should explicitly set the roles you want and when you did it worked. If you want to move to doing service discovery as I said look at release notes

kesavants (Thu, 02 Aug 2018 15:26:50 GMT):
Can anyone point me to corresponding documentation for java sdk channel event service the node doc is here https://fabric-sdk-node.github.io/tutorial-channel-events.html

rickr (Thu, 02 Aug 2018 15:46:47 GMT):
No tutorial there is an example of setting up your on event listening service :smile: https://github.com/hyperledger/fabric-sdk-java/blob/1475a3d25b2214095af218992a248242b0508681/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L371

rickr (Thu, 02 Aug 2018 15:46:47 GMT):
No tutorial there is an example of setting up your on event listening service : https://github.com/hyperledger/fabric-sdk-java/blob/1475a3d25b2214095af218992a248242b0508681/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L371

kesavants (Thu, 02 Aug 2018 15:54:18 GMT):
Thanks rick that helps

SandySun2000 (Thu, 02 Aug 2018 17:33:22 GMT):
DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-zbc04a.4.secure.blockchain.ibm.com/169.50.49.250:20283] INBOUND SETTINGS: ack=false settings={} DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-zbc04a.4.secure.blockchain.ibm.com/169.50.49.250:20283] OUTBOUND SETTINGS: ack=true DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-zbc04a.4.secure.blockchain.ibm.com/169.50.49.250:20283] OUTBOUND HEADERS: streamId=3 headers=GrpcHttp2OutboundHeaders[:authority: fft-zbc04a.4.secure.blockchain.ibm.[com:20283,](com:20283,) :path: /protos.Deliver/Deliver, :method: POST, :scheme: https, content-type: application/grpc, te: trailers, user-agent: grpc-java-netty/1.11.0, grpc-accept-encoding: gzip, grpc-trace-bin: AADAyEFlHcwbi0nAlmZVf4QpATb2/jd585iJAgA=] streamDependency=0 weight=16 exclusive=false padding=0 endStream=false DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-zbc04a.4.secure.blockchain.ibm.com/169.50.49.250:20283] OUTBOUND DATA: streamId=3 padding=0 endStream=false length=966 bytes=00000003c10af6060adc060a60080510011a0c08a5c6e9da0510c0afd58c01220a73732d636974692d63732a4063636630656562373733616565353831623935...``` ```

SandySun2000 (Thu, 02 Aug 2018 17:33:22 GMT):
DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-networkdomain.ibm.com/16x.xx.xx.xxx:2xxxx] INBOUND SETTINGS: ack=false settings={} DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-networkdomain.ibm.com/16x.xx.xx.xxx:2xxxx] OUTBOUND SETTINGS: ack=true DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-networkdomain.ibm.com/116x.xx.xx.xxx:2xxxx] OUTBOUND HEADERS: streamId=3 headers=GrpcHttp2OutboundHeaders[:authority: fR:fft-networkdomain.ibm.com.[com:20283,](com:20283,) :path: /protos.Deliver/Deliver, :method: POST, :scheme: https, content-type: application/grpc, te: trailers, user-agent: grpc-java-netty/1.11.0, grpc-accept-encoding: gzip, grpc-trace-bin: AADAyEFlHcwbi0nAlmZVf4QpATb2/jd585iJAgA=] streamDependency=0 weight=16 exclusive=false padding=0 endStream=false DEBUG NettyClientHandler - [id: 0x6e2c2c30, L:/172.18.0.3:33920 - R:fft-networkdomain.ibm.com116x.xx.xx.xxx:2xxxx3] OUTBOUND DATA: streamId=3 padding=0 endStream=false length=966 bytes=00000003c10af6060adc060a60080510xxxxxx63732a4063636630656562373733616565353831623935...``` ```

SandySun2000 (Thu, 02 Aug 2018 17:33:50 GMT):
What type of registration in Java SDK can cause above messages?

SandySun2000 (Thu, 02 Aug 2018 17:39:11 GMT):
@rickr @skarim

rickr (Thu, 02 Aug 2018 20:26:21 GMT):
peer eventing service

SandySun2000 (Thu, 02 Aug 2018 20:53:55 GMT):
@rickr thanks!

rajasushanth (Fri, 03 Aug 2018 09:56:31 GMT):
Has joined the channel.

rajasushanth (Fri, 03 Aug 2018 10:00:38 GMT):
Hi guys, I need to print the "blockchainInfo.getPreviousBlockHash()" (which is byte array) as string using Java-SDK, what wud be right charset format to use. I have tried with UTF-8, UTF-16 but I'm unable to get the proper hash values as string chars

rajasushanth (Fri, 03 Aug 2018 10:00:38 GMT):
Hi guys, I need to print the "blockchainInfo.getPreviousBlockHash()" (which is byte array) as string using Java-SDK, what wud be right charset format to use. I have tried with UTF-8, UTF-16 but I'm unable to get the proper hash values as string

rickr (Fri, 03 Aug 2018 12:10:17 GMT):
Being it was a hash it was never a string that was encoded into bytes. Maybe this can help ? https://github.com/hyperledger/fabric-sdk-java/blob/61b439e2cea1b24a3f8a917fc818f65fc01fbf63/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L722

rickr (Fri, 03 Aug 2018 12:10:17 GMT):
Being it was a hash it was never a string that was encoded into bytes I don't see how encoding comes into play. Maybe this can help ? https://github.com/hyperledger/fabric-sdk-java/blob/61b439e2cea1b24a3f8a917fc818f65fc01fbf63/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L722

LalitRajput (Fri, 03 Aug 2018 14:43:12 GMT):
Has joined the channel.

LalitRajput (Fri, 03 Aug 2018 14:43:15 GMT):
hello

LalitRajput (Fri, 03 Aug 2018 14:43:30 GMT):
can we disable tls in multiorg fabric network

LalitRajput (Fri, 03 Aug 2018 14:43:31 GMT):
??

rickr (Fri, 03 Aug 2018 16:08:02 GMT):
From a functional perspective everything _should_ work without TLS.

rajasushanth (Sat, 04 Aug 2018 16:02:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NWFuM6Q9dQZEkMseL) @rickr Thanks @rickr , I need to represent the hash as a String just to display how the blocks are linked. From the example I'm using Hex.encodeHexString to print it.

rajasushanth (Sat, 04 Aug 2018 16:02:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NWFuM6Q9dQZEkMseL) @rickr Thanks, I need to represent the hash as a String just to display how the blocks are linked. From the example I'm using Hex.encodeHexString to print it.

Ammu (Mon, 06 Aug 2018 04:08:13 GMT):
Has joined the channel.

albert.lacambra (Mon, 06 Aug 2018 16:49:33 GMT):
hi

albert.lacambra (Mon, 06 Aug 2018 16:49:49 GMT):
when closing the channel I am receiving folowwing exception

albert.lacambra (Mon, 06 Aug 2018 16:49:53 GMT):
Exception in thread "pool-8-thread-1" java.lang.NullPointerException at org.hyperledger.fabric.sdk.PeerEventServiceClient.(PeerEventServiceClient.java:84) at org.hyperledger.fabric.sdk.Peer$1.reconnect(Peer.java:334) at org.hyperledger.fabric.sdk.Peer$2.disconnected(Peer.java:430) at org.hyperledger.fabric.sdk.Peer.lambda$reconnectPeerEventServiceClient$0(Peer.java:299) at org.hyperledger.fabric.sdk.Peer$$Lambda$166/409432381.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

albert.lacambra (Mon, 06 Aug 2018 16:50:21 GMT):
it looks that peer is set to null an a later call to it produces an NPE

albert.lacambra (Mon, 06 Aug 2018 16:50:27 GMT):
why is it trying to reconnect?

albert.lacambra (Mon, 06 Aug 2018 16:50:37 GMT):
I am missing something @rickr ?

albert.lacambra (Mon, 06 Aug 2018 16:50:43 GMT):
thanks for your help :)

rickr (Mon, 06 Aug 2018 16:59:21 GMT):
Can you enable logging https://github.com/hyperledger/fabric-sdk-java#reporting-issues Reproduce . Open a JIRA or use https://ctrlv.it/ to paste it there. What version of SDK ? by close ->shutdown ?

rickr (Mon, 06 Aug 2018 16:59:21 GMT):
Can you enable logging https://github.com/hyperledger/fabric-sdk-java#reporting-issues Reproduce . Open a JIRA or use https://ctrlv.it/ to paste it there. What version of SDK ? by close ->shutdown ? Was the fablric Peer up and running at the time ?

rickr (Mon, 06 Aug 2018 17:07:43 GMT):
If the peer (server) is shutdown the peer eventing service will continue to try and reconnect. If you then shutdown the channel there may be a gap in the code were it tries to reconnect but it's shutting down resulting in some things being not set. If this is it it's probably benign.

aguel (Tue, 07 Aug 2018 06:00:45 GMT):
Has joined the channel.

ShobhitSrivastava (Tue, 07 Aug 2018 06:16:16 GMT):
Hi There, has any one implemented Service Discovery in Java Sdk? Is there modification required in fabric network due to it? Because I am getting exception on console: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service discovery.Discovery

ShobhitSrivastava (Tue, 07 Aug 2018 06:16:45 GMT):
Adding @rickr . Can you provide some pointers on it?

amolpednekar (Tue, 07 Aug 2018 10:10:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Jpcb6j3HEaxruisBb) @ShobhitSrivastava Make sure you are pulling SDK v1.2 For code examples - https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java

ShobhitSrivastava (Tue, 07 Aug 2018 11:27:52 GMT):
Yes @amolpednekar . I am using 1.2. WIll there be any change in fabric network files? Like docker-compose or configtx ?

ShobhitSrivastava (Tue, 07 Aug 2018 11:28:00 GMT):
Have you tried it?

rickr (Tue, 07 Aug 2018 12:12:47 GMT):
The ServiceDiscoveryIT is part of the integration tests so if you followed the README.md it should have passed for you.

aatkddny (Tue, 07 Aug 2018 13:02:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4Gg9HRJ5WFGkfoFd2) @rickr There's clearly some miscommunication or misunderstanding here. And since I'm now back to looking at this perhaps you can help me figure out what the issue is. I have a running fabric. It's all fine. Has been for a long old time now. I want to now see if service discovery does anything for me. *Assumption 1* Having RTFM I don't see any changes to my compose files or anything else required to enable it. *Assumption 2* When I create my peers inside the channel reconstruct in the SDK I *think* I need to add the PeerRole.SERVICE_DISCOVERY to the EnumSet of PeerRoles to allow me to then use service discovery. I *think* that's all I need to do differently from how it was (and is) working. When I do this is when things go wrong. I haven't written a line of code to clone your ServiceDiscoveryIT functionality into my app yet. I create my channels as normal. I then try to install chaincode on the first channel I created as normal. That's where things stop working. The first sign things are different is this message `o.h.fabric.sdk.ServiceDiscovery : Channel xx-yy-channel doing discovery with peer: Peer peer0.xx.com url: grpcs://localhost:32001` Followed by this one `o.h.fabric.sdk.ServiceDiscovery : Discover of chaincode names was empty.` And then things go totally pear shaped. It starts throwing these out `io.grpc.internal.ManagedChannelImpl : [io.grpc.internal.ManagedChannelImpl-129] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.xx.com, cause=java.net.UnknownHostException: peer0.xx.com: nodename nor servname provided, or not known` I'm not really sure why setting that role as I have has caused this to go so badly wrong. I thought this was going to be simple.

aatkddny (Tue, 07 Aug 2018 13:02:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4Gg9HRJ5WFGkfoFd2) @rickr There's clearly some miscommunication or misunderstanding here. And since I'm now back to looking at this perhaps you can help me figure out what the issue is. I have a running fabric. It's all fine. Has been for a long old time now. I want to now see if service discovery does anything for me. *Assumption 1* Having RTFM I don't see any changes to my compose files or anything else required to enable it. It being the 1.2 service discovery. I *thought* it was baked in *Assumption 2* When I create my peers inside the channel reconstruct in the SDK I *think* I need to add the PeerRole.SERVICE_DISCOVERY to the EnumSet of PeerRoles to allow me to then use service discovery. I *think* that's all I need to do differently from how it was (and is) working. When I do this is when things go wrong. I haven't written a line of code to clone your ServiceDiscoveryIT functionality into my app yet. I create my channels as normal. I then try to install chaincode on the first channel I created as normal. That's where things stop working. The first sign things are different is this message `o.h.fabric.sdk.ServiceDiscovery : Channel xx-yy-channel doing discovery with peer: Peer peer0.xx.com url: grpcs://localhost:32001` Followed by this one `o.h.fabric.sdk.ServiceDiscovery : Discover of chaincode names was empty.` And then things go totally pear shaped. It starts throwing these out `io.grpc.internal.ManagedChannelImpl : [io.grpc.internal.ManagedChannelImpl-129] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.xx.com, cause=java.net.UnknownHostException: peer0.xx.com: nodename nor servname provided, or not known` I'm not really sure why setting that role as I have has caused this to go so badly wrong. I thought this was going to be simple.

rickr (Tue, 07 Aug 2018 13:33:59 GMT):
For service discovery you should: Only add peers you know .. preferably I would I think the ones in your organization. Add the all roles you want them to have and include SERVICE_DISCOVERY. Do the comparable if you are using a NetworkConfig. For discovered peers/orderers the application can control the properties and roles they have by setting setSDPeerAddition, and setSDOrdererAddition. For getting proposals use sendTransactionProposalToEndorsers In a test environment where Peers and Orderers are just local you can set the system property org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost" This is a test convenience to remap the hosts reported by service discovery to the localhost an not for example the docker internal host. This does mean your ports for fabric service need to be unique.

rickr (Tue, 07 Aug 2018 13:33:59 GMT):
For service discovery you should: Only add peers you know .. preferably I would I think the ones in your organization. Add the all roles you want them to have and include SERVICE_DISCOVERY. Do the comparable if you are using a NetworkConfig. For discovered peers/orderers the application can control the properties and roles they have by setting setSDPeerAddition, and setSDOrdererAddition on the channel. For getting proposals use sendTransactionProposalToEndorsers In a test environment where Peers and Orderers are just local you can set the system property org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost" This is a test convenience to remap the hosts reported by service discovery to the localhost an not for example the docker internal host. This does mean your ports for fabric service need to be unique.

rickr (Tue, 07 Aug 2018 13:33:59 GMT):
For service discovery you should: Only add peers you know .. preferably I would I think the ones in your organization. Add the all roles you want them to have and include SERVICE_DISCOVERY. Do the comparable if you are using a NetworkConfig. For discovered peers/orderers the application can control the properties and roles they have by setting setSDPeerAddition, and setSDOrdererAddition on the channel. For getting proposals use sendTransactionProposalToEndorsers In a test environment where Peers and Orderers are just local you can set the system property org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost" This is a test convenience to remap the hosts reported by service discovery to the localhost an not for example the docker internal host. This does mean your ports for fabric service need to be unique.

rickr (Tue, 07 Aug 2018 13:33:59 GMT):
For service discovery you should: Only add peers you know .. preferably I would I think the ones in your organization. Add the all roles you want them to have and include SERVICE_DISCOVERY. Do the comparable if you are using a NetworkConfig. For discovered peers/orderers the application can control the properties and roles they have by setting setSDPeerAddition, and setSDOrdererAddition on the channel. For getting proposals use sendTransactionProposalToEndorsers In a test environment where Peers and Orderers are just local you can set the system property org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost" This is a test convenience to remap the hosts reported by service discovery to the localhost an not for example the docker internal host. This does mean your ports for fabric service need to be unique.

rickr (Tue, 07 Aug 2018 13:33:59 GMT):
For service discovery you should: Only add peers you know .. preferably I would I think the ones in your organization. Add the all roles you want them to have and include SERVICE_DISCOVERY. Do the comparable if you are using a NetworkConfig. For discovered peers/orderers the application can control the properties and roles they have by setting setSDPeerAddition, and setSDOrdererAddition on the channel. For getting proposals use sendTransactionProposalToEndorsers In a test environment where Peers and Orderers are just local you can set the system property org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost" This is a test convenience to remap the hosts reported by service discovery to the localhost an not for example the docker internal host. This does mean your ports for fabric service need to be unique.

aatkddny (Tue, 07 Aug 2018 13:52:17 GMT):
I have full control over the entire network. I have all the definitions and all the crypto for all the orgs and all their peers. That's fairly straightforward. I'm thinking that the problem is that I'm slavishly adding this role to all the peers when I'm installing chaincode and it's not dealing with that very graciously. I expected the code to ignore that role until it was required and it appears it isn't. So in time-honored fashion I'll just forget about it and move on to the next thing on my list. What I was *hoping* was that I could use SD to map my local network so I could build a NetworkConfig using it rather than the instantiation information I have inside my definition database. This code runs inside my network creation server and is used to feed network config json to the client applications (aping the /connection_profile call inside the BMX api). I need to keep my client application's code interoperable with BMX so I need to use the Channel.loadChannelFromConfig inside my client app. I'll just forget about it for now until 1.2 goes GA there and I see what happens to the APIs. Thanks for the help - and I hope this means someone else with a standalone fabric doesn't go down the same rabbit hole.

rickr (Tue, 07 Aug 2018 14:08:20 GMT):
For me the *major* features service discovery provides is: Dynamic discovery of other Peers and the Orderers in your network. Dynamic discovery of what endorsements are need for proposals.

rickr (Tue, 07 Aug 2018 14:08:20 GMT):
For me the *major* features service discovery provides is: Dynamic discovery of other Peers and the Orderers in your network. Dynamic discovery of what endorsements are needed for proposals.

mcoblenz (Tue, 07 Aug 2018 14:29:57 GMT):
Hi — newbie question. I'm trying to get started with the End2EndIT example, but I can't build it. It seems to depend on some files that aren't there: Error:(35, 42) java: cannot find symbol symbol: class EventsGrpc location: package org.hyperledger.fabric.protos.peer

mcoblenz (Tue, 07 Aug 2018 14:30:06 GMT):
any guesses as to what I'm doing wrong?

mcoblenz (Tue, 07 Aug 2018 14:30:35 GMT):
org.hyperledger.fabric.protos.peer.PeerEvents is present, and should be in the same place as org.hyperledger.fabric.protos.peer.EventsGrpc.

rickr (Tue, 07 Aug 2018 14:33:55 GMT):
followed ? https://github.com/hyperledger/fabric-sdk-java#compiling

mcoblenz (Tue, 07 Aug 2018 14:38:28 GMT):
Well, I got the unit tests working. The integration tests fail for reasons I don't understand.

mcoblenz (Tue, 07 Aug 2018 14:39:29 GMT):
For now I imported the POM into IntelliJ. I'm retrying with Eclipse since that seems to be better supported.

mcoblenz (Tue, 07 Aug 2018 14:41:04 GMT):
The sample network seems to work ("fabric.sh up") although it continuously generates console spew; I'm not sure if that's expected.

mcoblenz (Tue, 07 Aug 2018 15:00:32 GMT):
Lots of errors in Eclipse too, e.g. Description Resource Path Location Type The import org.hyperledger.fabric.protos cannot be resolved BlockDeserializer.java /fabric-sdk-java/src/main/java/org/hyperledger/fabric/sdk line 26 Java Problem

mcoblenz (Tue, 07 Aug 2018 15:00:56 GMT):
(this is trying to build release-1.2)

aatkddny (Tue, 07 Aug 2018 15:11:23 GMT):
try a maven generate sources

mcoblenz (Tue, 07 Aug 2018 15:14:13 GMT):
That doesn't generate a EventsGrpc.java file in fabric-sdk-java/target/generated-sources/protobuf/java/org/hyperledger/fabric/protos/peer/.

mcoblenz (Tue, 07 Aug 2018 15:14:57 GMT):
but it's hard to tell which layer of things is broken. For example, 'mvn install' outputs:

mcoblenz (Tue, 07 Aug 2018 15:14:57 GMT):
[WARNING] Some problems were encountered while building the effective model for org.hyperledger.fabric-sdk-java:fabric-sdk-java:jar:1.3.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 507, column 21

mcoblenz (Tue, 07 Aug 2018 15:15:30 GMT):
and 1.3.0-SNAPSHOT is odd because I'm on the release-1.2 branch. But it appears the version was changed before the tag was made…

mcoblenz (Tue, 07 Aug 2018 15:16:36 GMT):
But the 'maven install" command results in a bunch of warnings, and yet it reports 0 test failures.

mcoblenz (Tue, 07 Aug 2018 15:19:20 GMT):
But per the instructions, I am getting "BUILD SUCCESS", so I imagine I should ignore the console spew.

mcoblenz (Tue, 07 Aug 2018 15:32:20 GMT):
aha, I think a clean build and a generate-sources fixed it. Weird.

mcoblenz (Tue, 07 Aug 2018 16:14:17 GMT):
Unfortunately instantiating the sample chaincode seems to be failing: Sending instantiateProposalRequest to all peers with arguments: a and b set to 100 and 200 respectively 2018-08-07 16:11:36,062 main ERROR Channel:3605 - Sending proposal to peer1.org1.example.com failed because of timeout(120000 milliseconds) expiration

paulm (Wed, 08 Aug 2018 09:06:29 GMT):
Has joined the channel.

ShobhitSrivastava (Wed, 08 Aug 2018 11:16:21 GMT):
Hey @rickr , I did not find any specific things written for Service Discovery in REDAME.MD. I am still getting Caused by: io.grpc.StatusRuntimeException: UNIMPLEMENTED: unknown service discovery.Discovery

ShobhitSrivastava (Wed, 08 Aug 2018 11:54:01 GMT):
Adding one more result after checking code: now getting org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Error failed constructing descriptor for chaincodes:

ShobhitSrivastava (Wed, 08 Aug 2018 11:54:16 GMT):
Any pointer on this @rickr ?

rickr (Wed, 08 Aug 2018 13:11:42 GMT):
Can you look at enabling trace documented in the readme also look at the peer logs. If that was received while getting endorsements most likely tfm05 chaincode isn't there on any peer. Make sure it is both installed AND instantiated on one peer.

rickr (Wed, 08 Aug 2018 13:11:42 GMT):
If that was received while getting endorsements most likely tfm05 chaincode isn't there on any peer. Make sure it is both installed AND instantiated on one peer. If that's not the issue, can you look at enabling trace documented in the readme also look at the peer logs.

rickr (Wed, 08 Aug 2018 13:11:42 GMT):
If that was received while getting endorsements most likely tfm05 chaincode isn't there on any peer. Make sure it is both installed AND instantiated on one peer. If you are instantiating on another peer than the SD peer gossip needs to working between them. If that's not the issue, can you look at enabling trace documented in the readme also look at the peer logs.

ShobhitSrivastava (Thu, 09 Aug 2018 06:20:26 GMT):
Thanks @rickr, sounds good. Will surely look into it

Ashish (Thu, 09 Aug 2018 08:44:09 GMT):
FABJ-308 shows as closed

Ashish (Thu, 09 Aug 2018 08:45:04 GMT):
does this mean that we have an API which can let us keep the signing Private key in HSM and still get the transactions signed from java SDK?

Ashish (Thu, 09 Aug 2018 08:45:17 GMT):
without having to keep them in the java keystore locally ?

rickr (Thu, 09 Aug 2018 11:42:44 GMT):
No not exactly it was closed as a duplicate. There were patches made to make signing and verifying JCA/JCE complaint. But no regular testing so there is no guarantee it''s still working. HSM key management is provided by JCA/JCE via keystore so there's no need for the SDK to provide any API for that.

ShobhitSrivastava (Thu, 09 Aug 2018 13:12:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=B8t2dN8BNHr7zeJoX) @rickr Hey @rickr, after checking logs and other code details. I think it is related to docker compose file configuration in fabric network. Things like chainocde.address or externalendpointaddress may be one of the issue. Because if I remove the service discovery role from peer, then the invoke request is going through. Chaincode is installed on two nodes.

rickr (Thu, 09 Aug 2018 13:27:44 GMT):
If your working locally I think the ports used in the docker file should not be remapped .. look at the sdk it's docker compose for all peers are mapped direct ports: - 8051:8051 - 8053:8053

rickr (Thu, 09 Aug 2018 13:27:44 GMT):
If your working locally I think the ports used in the docker file should not be remapped .. look at the sdk it's docker compose for all peers are mapped direct ports: - 8051:8051 - 8053:8053 This makes sure its reporting the same port used internally and externally. There might be another maybe more elegant way todo that with something like CORE_PEER_GOSSIP_EXTERNALENDPOINT but I didn't have the time to go there :)

kesavants (Thu, 09 Aug 2018 13:57:32 GMT):
Has any one seen high socket connections count to peer is /any scenario when going through load balancer can cause too many socket connections

akoenig (Thu, 09 Aug 2018 14:00:40 GMT):
Hi, is there a good example how i should vendor dependencies in my chaincode? (@rickr don't know if i should ask this in chaincode-dev? :)) I want to install and init a chaincode via the java-sdk. But the chaincode itself has a none system package

rickr (Thu, 09 Aug 2018 14:11:09 GMT):
Deploying is no different sample of the layout https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/fixture/sdkintegration/gocc/sample_11/src/github.com/example_cc

akoenig (Thu, 09 Aug 2018 14:13:38 GMT):
so i have the chaincode.go file

akoenig (Thu, 09 Aug 2018 14:14:09 GMT):
and besides this i have to copy the other file to "vendor" folder?

akoenig (Thu, 09 Aug 2018 14:14:33 GMT):
sorry, to ask this but the information on https://github.com/hyperledger/fabric-sdk-java#go-lang-chaincode seems to be down

Luke_Chen (Thu, 09 Aug 2018 14:15:28 GMT):
Has joined the channel.

Luke_Chen (Thu, 09 Aug 2018 14:15:40 GMT):
Hey guys, If I use SDK to send an invoke transaction to specified peer, the SDK will gather proposal from Endorser and send them to Orderer, and then Orderer will return a ticket immediately, but how could I know whether the invoke transaction is executed correctly? Meanwhile I notice some testcase use `eventhub`, what is this `eventhub` used for? Is this used to listen process happen in peer? please help

rickr (Thu, 09 Aug 2018 14:24:03 GMT):
@kesavants There are some notes with in the README.md with regard to firewalls

akoenig (Thu, 09 Aug 2018 14:27:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WizwDatH4z9netvpS) @rickr got it, thanks

akoenig (Thu, 09 Aug 2018 14:28:15 GMT):
https://github.com/hyperledger/fabric-sdk-java#go-lang-chaincode but the link here is broken: https://blog.gopheracademy.com/advent-2015/vendor-folder/

rickr (Thu, 09 Aug 2018 14:28:41 GMT):
@Luke_Chen Take the time to get the End2endIT testcase in the sdk running in a debugger .. follow that code will show a lot. The eventhubs are now deprecated and you should use peers with eventing role. both monitored what blocks are actually commited and can complete the the future returned by the orderer to indicate the transactions is done on the peers being monitored

kesavants (Thu, 09 Aug 2018 14:32:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Q9adYNJAniwAA55Fk) @rickr Thx yes we have keepAliveWithoutCalls, keepAliveTimeout but it looks like when the peer is restarted while the client is up the client does reconnect but the socket count after reconnect goes very high

rickr (Thu, 09 Aug 2018 14:34:16 GMT):
@akoenig I'm not the GOLANG expert but there must be a lot of source out on the web (google) on it https://groups.google.com/forum/#!msg/golang-dev/nMWoEAG55v8/iJGgur7W_SEJ

Luke_Chen (Thu, 09 Aug 2018 14:36:47 GMT):
@rickr thanks a lot, do you have any docs or link that I can trace this feature?

rickr (Thu, 09 Aug 2018 14:40:44 GMT):
Then integration test and Javadoc are it. The integration tests do 90% what you can reasonably need to do. I'll be the first to admit just following them by reading it is probably a little difficult walking though with a debugger and real help

rickr (Thu, 09 Aug 2018 14:40:44 GMT):
The integration test and Javadoc are it. The integration tests do 90% what you can reasonably need to do. I'll be the first to admit just following them by reading it is probably a little difficult walking though with a debugger and real help

rickr (Thu, 09 Aug 2018 15:36:26 GMT):
@kesavants sock count on server or client ?

rickr (Thu, 09 Aug 2018 15:36:52 GMT):
Are the sockets eventually cleaned up ? Stay high ?

kesavants (Thu, 09 Aug 2018 16:44:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N2Ny3gKbefATqrXa5) @rickr The sdk client has large number of connection to peer sockets and they stay high very strange

rickr (Thu, 09 Aug 2018 16:45:03 GMT):
can you show me a netstat ?

kesavants (Thu, 09 Aug 2018 16:48:31 GMT):
tcp 0 0 localhost:49498 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49614 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49872 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49528 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49766 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49502 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49874 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49954 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49798 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49728 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49524 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49488 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49500 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49650 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49706 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49782 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:50160 fabric-peer1:20282 ESTABLISHED tcp 0 0 localhost:49636 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49670 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49532 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49876 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49910 fabric-peer1:20283 ESTABLISHED tcp 0 0 localhost:49486 fabric-peer1:20283 ESTABLISHED tcp 0 115 localhost:50156 fabric-peer1:20282 FIN_WAIT1

kesavants (Thu, 09 Aug 2018 16:49:45 GMT):
There are 200 more that wont fit 20283 is the peer port and 20282 is event hub port

rickr (Thu, 09 Aug 2018 16:51:33 GMT):
ok eventhubs are going away .. have you tried using the peer eventing service ?

kesavants (Thu, 09 Aug 2018 17:14:42 GMT):
We are looking at it but the most connections are from peer ports

jdfigure (Thu, 09 Aug 2018 17:33:55 GMT):
Has joined the channel.

jdfigure (Thu, 09 Aug 2018 18:25:08 GMT):
Hello! When invoking Node.js chaincode that returns an error, the Java SDK (1.2) throws this exception: ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) at org.hyperledger.fabric.sdk.security.CryptoPrimitives.verify(CryptoPrimitives.java:319) at org.hyperledger.fabric.sdk.ProposalResponse.verify(ProposalResponse.java:133) at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3630) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:3515) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:3398) ``` In the `org.hyperledger.fabric.sdk.ProposalResponse#verify` method, it seems that `proposalResponse.getEndorsement()` returns an empty `endorser` attribute. The empty `endorser` is passed to the `crypto.verify` method: ``` this.isVerified = crypto.verify(endorser.getIdBytes().toByteArray(), config.getSignatureAlgorithm(), sig.toByteArray(), plainText.toByteArray() ); ``` The `crypto.verify` method is throwing a `CryptoException` because it cannot find a SecurityProvider that can parse the empty endorser cert PEM. The chaincode in question simply does this: ``` this.shim.error('Trade Termsheet already created. Use modify instead.'); ``` I'd assume that an invalid chaincode proposal response wouldn't have an endorser so the `ProposalResponse#verify` should just bail at this point (instead of setting the `this.isVerified`): ``` public boolean verify(CryptoSuite crypto) { if (isVerified()) { // check if this proposalResponse was already verified by client code return isVerified(); } if (isInvalid()) { this.isVerified = false; } ```

rickr (Thu, 09 Aug 2018 18:37:06 GMT):
thx will look into it

aambati (Thu, 09 Aug 2018 20:11:37 GMT):
Has joined the channel.

kesavants (Thu, 09 Aug 2018 21:09:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=p8vaiReG9esXtjJPf) Could chaicode event listener registration on channel possibly cause high socket connections under certain conditions?

javaprincess0211 (Fri, 10 Aug 2018 00:53:18 GMT):
Has joined the channel.

ShobhitSrivastava (Fri, 10 Aug 2018 05:05:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4wuYdkghLyDYoYDfo) @rickr Thanks for the update :-)

ShobhitSrivastava (Fri, 10 Aug 2018 05:51:52 GMT):
hey @yacovm. I have one docker compose file. Code is working fine when I am not using Service Discovery option for peer instead using 1.1 fashion. When ever I am using SD option I am getting unknown host exception in Java sdk, looks like peers are not accessible in this fashion. Can you please look in to the file and let me know where I am going wrong. Below is the content of file ===> peer0.exporter.test: container_name: peer0.exporter.test image: hyperledger/fabric-peer environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_PEER_ID=peer0.exporter.test - CORE_LOGGING_PEER=debug - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG - CORE_PEER_LOCALMSPID=exporterMSP - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ - CORE_PEER_ADDRESS=peer0.exporter.test:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.exporter.test:7051 -CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.exporter.test:7051 - CORE_LEDGER_HISTORY_ENABLEHISTORYDATABASE=true - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_default - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbexporter:5984 #- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7033 # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD # provide the credentials for ledger to connect to CouchDB. The username and password must # match the username and password set for the associated CouchDB. - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: peer node start # command: peer node start --peer-chaincodedev=true ports: - 8051:7051 - 8053:7053 - 7033:7033 volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/exporter.test/peers/peer0.exporter.test/msp:/etc/hyperledger/msp/peer - ./crypto-config/peerOrganizations/exporter.test/users:/etc/hyperledger/msp/users - ./commonConfig:/etc/hyperledger/configtx - ./commonConfig:/opt/gopath/src/github.com/hyperledger/fabric - ./chaincode:/opt/gopath/src/github.com/hyperledger/example depends_on: - orderer.tfm.test - couchdbexporter couchdbexporter: container_name: couchdbexporter image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= ports: - 5974:5984

ShobhitSrivastava (Fri, 10 Aug 2018 05:51:52 GMT):
hey @yacovm , I have one docker compose file. Code is working fine when I am not using Service Discovery option for peer instead using 1.1 fashion. When ever I am using SD option I am getting unknown host exception in Java sdk, looks like peers are not accessible in this fashion. Can you please look in to the file and let me know where I am going wrong. Below is the content of file ===> peer0.exporter.test: container_name: peer0.exporter.test image: hyperledger/fabric-peer environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_PEER_ID=peer0.exporter.test - CORE_LOGGING_PEER=debug - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG - CORE_PEER_LOCALMSPID=exporterMSP - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ - CORE_PEER_ADDRESS=peer0.exporter.test:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.exporter.test:7051 -CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.exporter.test:7051 - CORE_LEDGER_HISTORY_ENABLEHISTORYDATABASE=true - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_default - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbexporter:5984 #- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7033 # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD # provide the credentials for ledger to connect to CouchDB. The username and password must # match the username and password set for the associated CouchDB. - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: peer node start # command: peer node start --peer-chaincodedev=true ports: - 8051:7051 - 8053:7053 - 7033:7033 volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/exporter.test/peers/peer0.exporter.test/msp:/etc/hyperledger/msp/peer - ./crypto-config/peerOrganizations/exporter.test/users:/etc/hyperledger/msp/users - ./commonConfig:/etc/hyperledger/configtx - ./commonConfig:/opt/gopath/src/github.com/hyperledger/fabric - ./chaincode:/opt/gopath/src/github.com/hyperledger/example depends_on: - orderer.tfm.test - couchdbexporter couchdbexporter: container_name: couchdbexporter image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= ports: - 5974:5984

ShobhitSrivastava (Fri, 10 Aug 2018 05:55:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ws96keCzZ9amuM8ke) Getting below error==> Aug 10, 2018 11:24:20 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError WARNING: [io.grpc.internal.ManagedChannelImpl-21] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.exporter.test, cause=java.net.UnknownHostException: peer0.exporter.test

asaningmaxchain123 (Fri, 10 Aug 2018 12:09:29 GMT):
@rickr how to set the db index in the java sdk?

rickr (Fri, 10 Aug 2018 13:02:34 GMT):
IMO the easiest solution is to make sure docker file is not doing port remapping See the sdk example all ports external and internal are the same. There are environment settings that tell peer to listen to those ports. The same is done for the orderer

rickr (Fri, 10 Aug 2018 13:03:36 GMT):

aatkddny (Fri, 10 Aug 2018 13:28:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N6u6Wy92u2Gp6kFsy) @ShobhitSrivastava This is exactly the same problem I had. The only workaround is to force off the service discovery role in the peer when you add them to the channel.

aatkddny (Fri, 10 Aug 2018 13:28:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N6u6Wy92u2Gp6kFsy) @ShobhitSrivastava This is exactly the same problem I had. The only workaround is to force off the service discovery role in the peer when you add them to the channel.

aatkddny (Fri, 10 Aug 2018 13:28:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N6u6Wy92u2Gp6kFsy) @ShobhitSrivastava This is exactly the same problem I had. The only workaround is to force off the service discovery role in the peer when you add them to the channel. I still wish it wasn't on as a default, but c'et la vie.

aatkddny (Fri, 10 Aug 2018 13:28:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N6u6Wy92u2Gp6kFsy) @ShobhitSrivastava This is exactly the same problem I had. The only workaround is to force off the service discovery role in the peer when you add them to the channel. I still wish it wasn't on as a default, but c'est la vie.

aatkddny (Fri, 10 Aug 2018 13:28:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=N6u6Wy92u2Gp6kFsy) @ShobhitSrivastava This is exactly the same problem I had. The only workaround I found without a rewrite is to force off the service discovery role in the peer when you add them to the channel. I still wish it wasn't on as a default, but c'est la vie. I still have no idea how to get the SD working with NetworkConfig. Until it's more mature I've moved on.

rickr (Fri, 10 Aug 2018 13:40:36 GMT):
@asaningmaxchain123 https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fab-8392-include-meta-inf-in-chaincode-packaging

rickr (Fri, 10 Aug 2018 15:58:29 GMT):
Adding discover role in a NetworkConfig was missed should be in 1.3

rickr (Fri, 10 Aug 2018 15:58:29 GMT):
Adding discover role in a NetworkConfig was missed. Should be in 1.3

rickr (Fri, 10 Aug 2018 19:10:40 GMT):
@jdfigure FYI FABJ-346

jalmeida (Sat, 11 Aug 2018 14:13:01 GMT):
Has joined the channel.

jalmeida (Sat, 11 Aug 2018 14:22:46 GMT):
Hello, I'm trying to access my network which is running HLF 1.1 on a different machine on the same network. I'm using a Raspberry Pi. I set the IP of the machine. Fabric-ca is able to communicate and authenticate, but when trying to communicate with the Orderer I get: TransactionException: Channel mychannel, send transaction failed on orderer orderer.example.com. Reason: UNKNOWN

jalmeida (Sat, 11 Aug 2018 14:22:46 GMT):
Hello, I'm trying to access my network which is running HLF 1.1 on a different machine on the same network. I'm using a Raspberry Pi. I set the IP of the machine. Fabric-ca is able to communicate and authenticate, but when trying to communicate with the Orderer I get: TransactionException: Channel mychannel, send transaction failed on orderer orderer.example.com. Reason: UNKNOWN Full-stack here: https://pastebin.com/g04avf2N Any clues what is wrong? Thanks!

asaningmaxchain123 (Sun, 12 Aug 2018 13:11:20 GMT):
@rickr how to set the multiple user signature, like `create channel` needs peer admin to sign it, but i modify the default policy use the `all` policy to sign it,so how the sdk to do it?

rickr (Sun, 12 Aug 2018 14:49:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/3e73396aac6fb7f175b07de2405f5a502ed5ff2c/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L190

rickr (Sun, 12 Aug 2018 14:49:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/3e73396aac6fb7f175b07de2405f5a502ed5ff2c/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L190 Allows for multiple signatures

rickr (Sun, 12 Aug 2018 14:49:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/3e73396aac6fb7f175b07de2405f5a502ed5ff2c/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L190 Allows for multiple signatures `byte[]... channelConfigurationSignatures`

rickr (Sun, 12 Aug 2018 14:56:31 GMT):
@jalmeida Too many possibilities even with that stacktrace. I think from that it got to the Orderer so you should probably enable the Orderer for debug output and begin there. Most likely if you can't figure it out the #fabric-orderer channel for asking questions is your best bet.

ShobhitSrivastava (Mon, 13 Aug 2018 06:15:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ghBknxHaLeSPSDWRG) @aatkddny yeah correct @aatkddny . I will also think of moving on until it is matured enough to give it a try.

ShobhitSrivastava (Mon, 13 Aug 2018 06:16:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qbwrABiEq5s6iZZ8k) @rickr hey @rickr , It is for SD which you are saying or for any other thing?

ultimo2020 (Mon, 13 Aug 2018 07:24:03 GMT):
Has joined the channel.

leusgrif (Mon, 13 Aug 2018 07:51:17 GMT):
Hello! I'm trying to create channel using "HFClient.newChannel" and NetworkConfig. The problem is that newChannel required Orderer as parametr, but NetworkConfig keep it in private fields with no access. The same problem with channel.joinPeer, which require peer

leusgrif (Mon, 13 Aug 2018 07:51:17 GMT):
Hello! I'm trying to create channel using "HFClient.newChannel" and NetworkConfig. The problem is that newChannel required Orderer as parametr, but NetworkConfig keep it in private fields with no access. The same problem with channel.joinPeer, which require peer and orderer instance

ShobhitSrivastava (Mon, 13 Aug 2018 09:43:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ws96keCzZ9amuM8ke) @yacovm . Tagging you again. Please have a look.

yacovm (Mon, 13 Aug 2018 09:49:33 GMT):
yes, what is it?

yacovm (Mon, 13 Aug 2018 09:50:07 GMT):
@aatkddny what do you mean "until it's more mature" ?

yacovm (Mon, 13 Aug 2018 09:50:14 GMT):
SD is mature :(

yacovm (Mon, 13 Aug 2018 09:50:24 GMT):
the golang SDK uses it quite well

ShobhitSrivastava (Mon, 13 Aug 2018 09:58:38 GMT):
@yacovm. This is the one I am referring to. I have one docker compose file. Code is working fine when I am not using Service Discovery option for peer instead using 1.1 fashion. When ever I am using SD option I am getting unknown host exception in Java sdk, looks like peers are not accessible in this fashion. Can you please look in to the file and let me know where I am going wrong. Below is the content of file ===> peer0.exporter.test: container_name: peer0.exporter.test image: hyperledger/fabric-peer environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_PEER_ID=peer0.exporter.test - CORE_LOGGING_PEER=debug - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG - CORE_PEER_LOCALMSPID=exporterMSP - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ - CORE_PEER_ADDRESS=peer0.exporter.test:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.exporter.test:7051 -CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.exporter.test:7051 - CORE_LEDGER_HISTORY_ENABLEHISTORYDATABASE=true - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_default - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbexporter:5984 #- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7033 # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD # provide the credentials for ledger to connect to CouchDB. The username and password must # match the username and password set for the associated CouchDB. - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: peer node start # command: peer node start --peer-chaincodedev=true ports: - 8051:7051 - 8053:7053 - 7033:7033 volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/exporter.test/peers/peer0.exporter.test/msp:/etc/hyperledger/msp/peer - ./crypto-config/peerOrganizations/exporter.test/users:/etc/hyperledger/msp/users - ./commonConfig:/etc/hyperledger/configtx - ./commonConfig:/opt/gopath/src/github.com/hyperledger/fabric - ./chaincode:/opt/gopath/src/github.com/hyperledger/example depends_on: - orderer.tfm.test - couchdbexporter couchdbexporter: container_name: couchdbexporter image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= ports: - 5974:5984 Getting below error==> Aug 10, 2018 11:24:20 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError WARNING: [io.grpc.internal.ManagedChannelImpl-21] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.exporter.test, cause=java.net.UnknownHostException: peer0.exporter.test

ShobhitSrivastava (Mon, 13 Aug 2018 09:58:38 GMT):
@yacovm This is the one I am referring to. I have one docker compose file. Code is working fine when I am not using Service Discovery option for peer instead using 1.1 fashion. When ever I am using SD option I am getting unknown host exception in Java sdk, looks like peers are not accessible in this fashion. Can you please look in to the file and let me know where I am going wrong. Below is the content of file ===> peer0.exporter.test: container_name: peer0.exporter.test image: hyperledger/fabric-peer environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_PEER_ID=peer0.exporter.test - CORE_LOGGING_PEER=debug - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG - CORE_PEER_LOCALMSPID=exporterMSP - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ - CORE_PEER_ADDRESS=peer0.exporter.test:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.exporter.test:7051 -CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.exporter.test:7051 - CORE_LEDGER_HISTORY_ENABLEHISTORYDATABASE=true - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_default - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbexporter:5984 #- CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7033 # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD # provide the credentials for ledger to connect to CouchDB. The username and password must # match the username and password set for the associated CouchDB. - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= working_dir: /opt/gopath/src/github.com/hyperledger/fabric command: peer node start # command: peer node start --peer-chaincodedev=true ports: - 8051:7051 - 8053:7053 - 7033:7033 volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/exporter.test/peers/peer0.exporter.test/msp:/etc/hyperledger/msp/peer - ./crypto-config/peerOrganizations/exporter.test/users:/etc/hyperledger/msp/users - ./commonConfig:/etc/hyperledger/configtx - ./commonConfig:/opt/gopath/src/github.com/hyperledger/fabric - ./chaincode:/opt/gopath/src/github.com/hyperledger/example depends_on: - orderer.tfm.test - couchdbexporter couchdbexporter: container_name: couchdbexporter image: hyperledger/fabric-couchdb # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. environment: - COUCHDB_USER= - COUCHDB_PASSWORD= ports: - 5974:5984 Getting below error==> Aug 10, 2018 11:24:20 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError WARNING: [io.grpc.internal.ManagedChannelImpl-21] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.exporter.test, cause=java.net.UnknownHostException: peer0.exporter.test

ShobhitSrivastava (Mon, 13 Aug 2018 10:00:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mvMiQPzAL6dS3fcLv) @yacovm Guess it was for java not for go sdk

rickr (Mon, 13 Aug 2018 10:13:56 GMT):
From where your running the client is your peer at `peer0.exporter.test` ? can you telnet to it ?

rickr (Mon, 13 Aug 2018 10:13:56 GMT):
From where your running the client is there a peer at `peer0.exporter.test` ? can you telnet to it ?

rickr (Mon, 13 Aug 2018 10:13:56 GMT):
From where your running the client is there a peer at `peer0.exporter.test` ? can you telnet to it ? does it ping ?

ShobhitSrivastava (Mon, 13 Aug 2018 10:38:38 GMT):
yes peer0.exporter.test is a peer. And it is reachable if I remove SD from java sdk

ShobhitSrivastava (Mon, 13 Aug 2018 10:39:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hgjGFymc2k8eEBYaE) Once I add SD. It gives this error

rickr (Mon, 13 Aug 2018 10:40:51 GMT):
removing SD from java sdk has now affect on whether from your client using tcpip it rsolves the hostname peer0.exporter.test

rickr (Mon, 13 Aug 2018 10:40:51 GMT):
removing SD from java sdk has no affect on whether from your client using tcpip it rsolves the hostname peer0.exporter.test

ShobhitSrivastava (Mon, 13 Aug 2018 10:43:54 GMT):
Correct, but thing are working absolutely fine if i remove SD from peerOption.

rickr (Mon, 13 Aug 2018 10:48:48 GMT):
Did you follow what I posted here to do while testing ? https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4CSkfQswKHFzA6xaY

rickr (Mon, 13 Aug 2018 10:55:40 GMT):
to use test remapping that your ports in the dockercompose will need to be the same for both inside and outside of docker I.e the number on both sides of the colon need to be the same

ShobhitSrivastava (Mon, 13 Aug 2018 10:56:00 GMT):
Yes I followed it: This is the main function for I have written to connect fabric Network

ShobhitSrivastava (Mon, 13 Aug 2018 10:56:14 GMT):
public static void main(String[] args) throws Exception { try { Logger logger = Logger.getLogger(SDKClient3.class); logger.setLevel(Level.DEBUG); System.out.println("creating hf client"); hfclient = HFClient.createNewInstance(); File tempFile = File.createTempFile("teststore", "properties"); tempFile.deleteOnExit(); File sampleStoreFile = new File(System.getProperty("user.home") + "/test.properties"); if (sampleStoreFile.exists()) { // For testing start fresh sampleStoreFile.delete(); } logger.info("creating store object"); final SDKStore sdkStore = new SDKStore(sampleStoreFile); logger.info("creating sdk user object"); SDKUser someTestUSER = sdkStore.getMember(USER_NAME, orgName, USER_MSP_ID, findFileSk(keystoreLocation), new File(usercertfile)); someTestUSER.setMspId(USER_MSP_ID); hfclient.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); hfclient.setUserContext(someTestUSER); logger.info("creating sdk user object"); Channel testChannel = hfclient.newChannel(CHANNEL_NAME); //testChannel.addPeer(peer2); without SD option PeerOptions pos = createPeerOptions().setPeerRoles(EnumSet.of(PeerRole.SERVICE_DISCOVERY, PeerRole.LEDGER_QUERY, PeerRole.EVENT_SOURCE, PeerRole.CHAINCODE_QUERY)); //with SD option testChannel.addPeer(peer2, pos); Properties sdprops = new Properties(); sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:"); //System.out.println("adding orderer "+ORDERER1_NAME); testChannel.addOrderer(orderer); logger.info("Channel intialized successfully"); testChannel.setServiceDiscoveryProperties(sdprops); testChannel.initialize(); //List installedChaincodeInfos = hfclient.queryInstalledChaincodes( testChannel.getPeers().iterator().next()); createChainCodeGo(testChannel); instantiateChaincode(testChannel); String po = "{\"SHIPPER_NAME_ADDRESS\":\"Avon cargo, Chicago\",\"PORT_OF_LOADING\":\"Port Of Houstan\",\"PORT_OF_DISCHARGE\":\"Port Of Houstan\",\"PLACE_OF_RECEIPT\":\"Houstan\",\"PLACE_OF_DELIVERY\":\"Mumbai\",\"FREIGHT_AND_CHARGES\":\"1000\",\"CURRENCY\":\"Dollar\",\"PREPAID\":\"True\",\"DATE_OF_ISSUE_OF_BL\":\"Thursday, 14 June 2018\",\"LC_NUMBER\":\"LC3\"}"; invokeCode(testChannel,new String[]{po}); }catch (Exception e) { System.out.println(e); throw e; } }

rickr (Mon, 13 Aug 2018 10:56:55 GMT):
did you set that system property ?

ShobhitSrivastava (Mon, 13 Aug 2018 10:57:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ePQMBuBRaFakPDLCi) Now in this if I remove SD option this code is working and If i add it. Itis giving me error

ShobhitSrivastava (Mon, 13 Aug 2018 10:58:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=iWxN8kvaa6kzSEwa6) @rickr System property? Is it for fabric peer endpoints or what?

rickr (Mon, 13 Aug 2018 10:59:50 GMT):
So you didn't follow it for testing to docker set the java system property org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost"

rickr (Mon, 13 Aug 2018 11:00:31 GMT):
AND as stated in docker compose you'll need to make sure your ports are NOT being remapped

ShobhitSrivastava (Mon, 13 Aug 2018 11:03:03 GMT):
hey @rickr . The only issue in that is my fabric network is on a standalone linux server. Putting local host wont solve it

rickr (Mon, 13 Aug 2018 11:04:01 GMT):
its on another machine ?

ShobhitSrivastava (Mon, 13 Aug 2018 11:04:06 GMT):
yes

rickr (Mon, 13 Aug 2018 11:04:17 GMT):
so what's thats machines hostname ?

ShobhitSrivastava (Mon, 13 Aug 2018 11:05:11 GMT):
its inside closed network. So hostname is not there instead reachable by IP

rickr (Mon, 13 Aug 2018 11:05:59 GMT):
when you create the peer manually what url do you give ?

ShobhitSrivastava (Mon, 13 Aug 2018 11:08:33 GMT):
From SDK======> private static final String PEER1_NAME = "peer0.exporter.test"; private static final String PEER2_ADDRESS = "grpc://10.64.217.120:7051"; Peer peer2 = hfclient.newPeer(PEER2_NAME, PEER2_ADDRESS); testChannel.addPeer(peer2);

rickr (Mon, 13 Aug 2018 11:08:54 GMT):
are ALL your peers and orderers on that system ?

ShobhitSrivastava (Mon, 13 Aug 2018 11:09:00 GMT):
yes

rickr (Mon, 13 Aug 2018 11:09:45 GMT):
on then set that system property to 10.64.217.120

ShobhitSrivastava (Mon, 13 Aug 2018 11:10:17 GMT):
is it any java variable?

rickr (Mon, 13 Aug 2018 11:10:53 GMT):
google java system propertis

ShobhitSrivastava (Mon, 13 Aug 2018 11:11:28 GMT):
okay..thanks for this. I will make the changes and get back to you

rickr (Mon, 13 Aug 2018 11:11:39 GMT):
AND it won't work if in your dockercompose your remapping ports

rickr (Mon, 13 Aug 2018 11:13:05 GMT):
@yacovm is there another way for SD to report the external host clients should connect to for service discovery ? ^^^

yacovm (Mon, 13 Aug 2018 11:13:41 GMT):
what do you mean exactly?

yacovm (Mon, 13 Aug 2018 11:13:52 GMT):
we only report the external endpoints

yacovm (Mon, 13 Aug 2018 11:14:00 GMT):
what is the use case?

rickr (Mon, 13 Aug 2018 11:15:01 GMT):
read the above

yacovm (Mon, 13 Aug 2018 11:15:14 GMT):
no TLDR? :(

rickr (Mon, 13 Aug 2018 11:16:14 GMT):
@ShobhitSrivastava explain your network layout and use case

ShobhitSrivastava (Mon, 13 Aug 2018 11:18:44 GMT):
Okay. I have a running fabric network which is working if I remove SD option from adding to peer. When I add peerOPtion as ServiceDiscovery, it does not work. All the peers and orderer are on one machine

yacovm (Mon, 13 Aug 2018 11:18:57 GMT):
do you have anchor peers?

yacovm (Mon, 13 Aug 2018 11:19:01 GMT):
do the peers see each other?

yacovm (Mon, 13 Aug 2018 11:19:10 GMT):
did you try to use https://hyperledger-fabric.readthedocs.io/en/latest/discovery-cli.html to see if the peers know each other?

ShobhitSrivastava (Mon, 13 Aug 2018 11:20:18 GMT):
yes, the peers in their Org are anchor one. No I have not used Discover command

rickr (Mon, 13 Aug 2018 11:21:24 GMT):
Is the sdk client on the at same system ?

ShobhitSrivastava (Mon, 13 Aug 2018 11:22:07 GMT):
no, it is outside the system. But it is reachable.

rickr (Mon, 13 Aug 2018 11:22:37 GMT):
but not what SD is reporting is reachable

ShobhitSrivastava (Mon, 13 Aug 2018 11:23:14 GMT):
yes. SD is not

yacovm (Mon, 13 Aug 2018 11:23:25 GMT):
please use the `discover peers` command from the manual I linked

yacovm (Mon, 13 Aug 2018 11:23:30 GMT):
and report your findings here

yacovm (Mon, 13 Aug 2018 11:23:48 GMT):
if the peers don't see each other, the discovery won't work for policies with an AND

ShobhitSrivastava (Mon, 13 Aug 2018 11:24:24 GMT):
Yeah I am doing that. But where will I have to run it. Mean in whose bash?

rickr (Mon, 13 Aug 2018 11:25:04 GMT):
it won't matter it's going to report addresses that are not reachable

rickr (Mon, 13 Aug 2018 11:26:44 GMT):
It will report hosts with peer0.exporter.test` just like the Java SDK gets but that's not reachable from your client as you stated

ShobhitSrivastava (Mon, 13 Aug 2018 11:27:44 GMT):
@rickr . Look if i fire it in like outside any bash. I am getting no command found

ShobhitSrivastava (Mon, 13 Aug 2018 11:28:21 GMT):
So it needs to be run somewhere inside any bash or is there any specific tool is required?

rickr (Mon, 13 Aug 2018 11:29:11 GMT):
@yacovm ^^

yacovm (Mon, 13 Aug 2018 11:29:47 GMT):
oh

yacovm (Mon, 13 Aug 2018 11:29:50 GMT):
you need to download it

yacovm (Mon, 13 Aug 2018 11:29:53 GMT):
https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/

yacovm (Mon, 13 Aug 2018 11:30:02 GMT):
we didn't put it as part of the CLI container in v1.2 :(

ShobhitSrivastava (Mon, 13 Aug 2018 11:30:10 GMT):
yeah okay

rickr (Mon, 13 Aug 2018 11:30:55 GMT):
run it from where you run the JSDK

rickr (Mon, 13 Aug 2018 11:31:16 GMT):
As stated I don't think this exercise is going to show anything new

ShobhitSrivastava (Mon, 13 Aug 2018 11:32:00 GMT):
@yacovm which link is needed to open on this repo? There are many link

ShobhitSrivastava (Mon, 13 Aug 2018 11:32:42 GMT):
@rick. I need to know how I can run dicover peer command on JSDK

ShobhitSrivastava (Mon, 13 Aug 2018 11:33:29 GMT):
sdk is on my local windows machine, dont think it has discover command

rickr (Mon, 13 Aug 2018 11:37:55 GMT):
that discover command has nothing to do with the JSDK

rickr (Mon, 13 Aug 2018 11:38:54 GMT):
It's going to report the same peer endpoint names as the JSDK but as you have seen already those are NOT reachable from your windows machine

ShobhitSrivastava (Mon, 13 Aug 2018 11:40:13 GMT):
Yes

ShobhitSrivastava (Mon, 13 Aug 2018 11:40:45 GMT):
I will set the java system property. And see after wards

yacovm (Mon, 13 Aug 2018 11:58:44 GMT):
@ShobhitSrivastava pick your architecture and pick v1.2

yacovm (Mon, 13 Aug 2018 11:59:03 GMT):
for example https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/linux-amd64-1.2.0/

ShobhitSrivastava (Mon, 13 Aug 2018 12:09:16 GMT):
okay

leusgrif (Mon, 13 Aug 2018 12:18:22 GMT):
@rickr Hi! Could tou help me with my issue? I'm trying to create channel using "HFClient.newChannel" and NetworkConfig. The problem is that newChannel required Orderer as parametr, but NetworkConfig keep it in private fields with no access. The same problem with channel.joinPeer, which require instance of peer and orderer

leusgrif (Mon, 13 Aug 2018 12:18:22 GMT):
@rickr Hi! Could you help me with my issue? I'm trying to create channel using "HFClient.newChannel" and NetworkConfig. The problem is that newChannel required Orderer as parametr, but NetworkConfig keep it in private fields with no access. The same problem with channel.joinPeer, which require instance of peer and orderer

ShobhitSrivastava (Mon, 13 Aug 2018 12:22:56 GMT):
hey @rickr . I am debugging the code, even after explicitly specifying protocol as grpc it is still taking grpcs(in url in Peer.java) which is causing this unavailable hostname issue

ShobhitSrivastava (Mon, 13 Aug 2018 12:23:35 GMT):

url.jpg

ShobhitSrivastava (Mon, 13 Aug 2018 12:24:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ccikCXitYuc9WeQZJ) @leusgrif hey try making that public for testing. It will work

rickr (Mon, 13 Aug 2018 12:46:06 GMT):
@leusgrif --> https://github.com/hyperledger/fabric-sdk-java/blob/ff953b0505fced6ba52aed1643ebaf348feb0162/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L115-L155

rickr (Mon, 13 Aug 2018 12:48:28 GMT):
@ShobhitSrivastava no that will not cause a unavailable hostname

ShobhitSrivastava (Mon, 13 Aug 2018 12:50:41 GMT):
I am still not sure where is this "grpc" is getting changed to "grpcs"

rickr (Mon, 13 Aug 2018 12:57:58 GMT):
Study ServiceDiscoveryIT.java

ShobhitSrivastava (Mon, 13 Aug 2018 13:02:19 GMT):
yup

leusgrif (Mon, 13 Aug 2018 13:28:40 GMT):
@rickr thx for your answer! The source you pointed to shows how to get Properties of orderer or peer. But "HFClient.newChannel" require instance of Orderer. I can't get one from NetworkConfig cause it's private. And i cant construct one using "HFClient.newOrderer(name, grpscURL, properties)" cause i can't get URL from NetworkConfig.

rickr (Mon, 13 Aug 2018 13:44:51 GMT):
And this won't work for you ? https://github.com/hyperledger/fabric-sdk-java/blob/ff953b0505fced6ba52aed1643ebaf348feb0162/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L528

leusgrif (Mon, 13 Aug 2018 14:02:38 GMT):
@rickr Unfortunately, no it doesn't. If i understand sdk correctly "loadChannel" supposed that the channel is already created.

leusgrif (Mon, 13 Aug 2018 14:03:30 GMT):
i want to have endpoint which allow me to create channel providing path to channel.tx in existing fabric network

rickr (Mon, 13 Aug 2018 14:03:37 GMT):
Network config does not support creating channels

leusgrif (Mon, 13 Aug 2018 14:04:20 GMT):
It's really sad. Why is it so?

leusgrif (Mon, 13 Aug 2018 14:04:50 GMT):
I suppose it doesn't support joining peers as well?

rickr (Mon, 13 Aug 2018 14:11:50 GMT):
exactly Those really are rare done by an Admin. Networkconfig purpose was to make the channel on the sdk quick to `reconstruct` an existing channel. More than like and Admin or some back end code would be created for doing Channel creation and peer joining And the networkconfig created and distributed to end user for deploying, invoking querying chaincode. That said there is a _possible_ HACK not tried but would do what you want I think. Load the channel as I showed. You don't have to initialize it. From there you can get the peers/orderers and urls. Then shut it down.

leusgrif (Mon, 13 Aug 2018 14:29:22 GMT):
@rickr This hack was my backup plan). I will try it but i still don't understand why nodes url is private in networkConfig. Thanks for your answers!

kelvinzhong (Tue, 14 Aug 2018 07:47:35 GMT):
@rickr hi rick, I try to reproduce the service discovery IT, but i got the error as below Unable to resolve host peer0.platform.com, cause=java.net.UnknownHostException: peer0.platform.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) } what might cost this?

kelvinzhong (Tue, 14 Aug 2018 08:11:56 GMT):
while using the discovery service, if the peer did not set the properties, it would cause the null-pointer exception in if ((properties == null) || (isNullOrEmpty(properties.getProperty("clientCertFile")) && isNullOrEmpty(properties.getProperty("clientCertBytes")))) { TLSCertificateBuilder tlsCertificateBuilder = new TLSCertificateBuilder(); TLSCertificateKeyPair tlsCertificateKeyPair = tlsCertificateBuilder.clientCert(); peer.setTLSCertificateKeyPair(tlsCertificateKeyPair); } if the properties is null, then peer would call the setTLSCertificateKeyPair, and here would cause the null-pointer exception as it set the properties to the peer properties which is null

kelvinzhong (Tue, 14 Aug 2018 08:12:32 GMT):
which is a bug here

rickr (Tue, 14 Aug 2018 10:57:31 GMT):
can you give NPE stack trace

rickr (Tue, 14 Aug 2018 10:57:31 GMT):
can you give NPE stack trace and try using :

rickr (Tue, 14 Aug 2018 10:57:31 GMT):
can you give NPE stack trace and try using : https://ctrlv.it/

rickr (Tue, 14 Aug 2018 10:58:32 GMT):
`Unable to resolve host peer0.platform.com,` can you resolve that from your client ?

kelvinzhong (Tue, 14 Aug 2018 11:15:16 GMT):
ok I can try to reproduce the NPE now

kelvinzhong (Tue, 14 Aug 2018 11:15:40 GMT):
but i have no idea what might cause the "Unable to resolve host peer0.platform.com"

kelvinzhong (Tue, 14 Aug 2018 11:18:54 GMT):
@rickr https://ctrlv.it/id/142863/3521491506

kelvinzhong (Tue, 14 Aug 2018 11:21:27 GMT):
i have install the chaincode to each ogrs, and instantiate in one org, but only this org have create the chaincode container, and the discovery service could not find the others, then throw a warning "Unable to resolve host peer0.platform.com"

rickr (Tue, 14 Aug 2018 12:22:44 GMT):
@kelvinzhong Can you open a JIRA bug put that stack trace in there. It trying to automaically generate a certificate not sure why its null.

rickr (Tue, 14 Aug 2018 12:24:48 GMT):
include the output of `java -XshowSettings:properties -version`

rickr (Tue, 14 Aug 2018 12:31:35 GMT):
The work around to avoid that is to set properties for the peer to create tls certs add `clientKeyBytes` and `clientCertBytes`

kelvinzhong (Tue, 14 Aug 2018 12:38:40 GMT):
I think the bug is obviously....

kelvinzhong (Tue, 14 Aug 2018 12:40:35 GMT):

image.png

kelvinzhong (Tue, 14 Aug 2018 12:41:13 GMT):
you try to set a null properties....so there is a NPE...

kelvinzhong (Tue, 14 Aug 2018 12:45:46 GMT):
and would you please tell me what's the usage of "CORE_PEER_GOSSIP_BOOTSTRAP" and "CORE_PEER_LISTENADDRESS" in the docker file...

rickr (Tue, 14 Aug 2018 13:10:35 GMT):
got it

rickr (Tue, 14 Aug 2018 13:12:38 GMT):
mind opening a jira

aatkddny (Wed, 15 Aug 2018 00:32:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qNpXwEiw7wRz2Pcu5) @yacovm then how about "until it doesn't break my working network with some ugly grpc error that i have neither the time nor the inclination to debug when i turn it on in the peer". my channels are coming from a network config file so i know what my peers are. until i have a use case for endorsement that i don't know which peers are required - and i write the policies, so that's not happening - i'm leaving it well alone. i have enough other stuff to keep me busy.

kelvinzhong (Wed, 15 Aug 2018 01:54:34 GMT):
@rickr sure https://jira.hyperledger.org/browse/FABJ-348

kelvinzhong (Wed, 15 Aug 2018 04:36:16 GMT):
i'm stuck at the discovery service, can anyone help me out... I have join all peer into the channel and install chaincode also instantiated, but still cannot discovery others by one peer

kelvinzhong (Wed, 15 Aug 2018 04:36:16 GMT):
i'm stuck at the discovery service, can anyone help me out... I have join all peer into the channel and install chaincode also instantiated, but can only discovery the peers in the same MSP

kelvinzhong (Wed, 15 Aug 2018 04:36:49 GMT):
but got a warning as below 2018-08-15 12:32:39.636 WARN [grpc-default-executor-3]: ManagedChannelImpl$NameResolverListenerImpl.onError:1258 [io.grpc.internal.ManagedChannelImpl-217] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer1.platform.com, cause=java.net.UnknownHostException: peer1.platform.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) }

kelvinzhong (Wed, 15 Aug 2018 06:08:42 GMT):
I open the trace log, and I found that mine is using the domain to creating endpoint: TRACE [main]: Endpoint.:81 Creating endpoint for url grpc://peer1.platform.com:6056 but in the ServiceDiscoveryIT is using "localhost" : main TRACE Endpoint:81 - Creating endpoint for url grpc://localhost:7051

kelvinzhong (Wed, 15 Aug 2018 06:09:30 GMT):
@rickr what could cause this... I can't find any config is different from the ServiceDiscoveryIT...

kelvinzhong (Wed, 15 Aug 2018 06:44:57 GMT):
i create the peer with NAME peer1.platform.com and URL grpc://localhost:6056, how come the discovery service found the URL as grpc://peer1.platform.com.....

kelvinzhong (Wed, 15 Aug 2018 06:44:57 GMT):
i create the peer with NAME peer1.platform.com and URL grpc://localhost:6056, how come the discovery service found the URL as grpc://peer1.platform.com:6056.....

rickr (Wed, 15 Aug 2018 10:47:23 GMT):

rickr (Wed, 15 Aug 2018 10:48:11 GMT):
org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name to 'localhost"

rickr (Wed, 15 Aug 2018 10:49:24 GMT):
Only will work if your docker compose doesn't remap ports

rickr (Wed, 15 Aug 2018 10:54:27 GMT):
@yacovm Is there anyway this can be done without doing this ? What happens when service discovery is behind a proxy ? Something needs to be able report the external endpoints and not the internal ones I think there is an you provide some details

rickr (Wed, 15 Aug 2018 10:54:27 GMT):
@yacovm Is there anyway this can be done without doing this ? What happens when service discovery is behind a proxy ? Something needs to be able to be configured to report the external endpoints and not the internal ones I think there is an you provide some details

rickr (Wed, 15 Aug 2018 10:54:27 GMT):
@yacovm Is there anyway this can be done without doing this ? What happens when service discovery is behind a proxy ? Something needs to be able to be configured to report the external endpoints and not the internal ones I think there is can you provide some details

yacovm (Wed, 15 Aug 2018 11:03:47 GMT):
Not sure what is the problem?

yacovm (Wed, 15 Aug 2018 11:04:04 GMT):
Can you clearly state the issue? I'm on mobile

yacovm (Wed, 15 Aug 2018 11:04:50 GMT):
Why are you not just generating localhost certificates?

rickr (Wed, 15 Aug 2018 11:09:59 GMT):
I don't know how to make it more simple. Your hyperledger systems peers orders is behind a proxy their internal addresses are not accessible from the clients but only through the external proxy through external endpoints . How would you get serviced discovery to report those external endpoints and not the internal ones

rickr (Wed, 15 Aug 2018 11:09:59 GMT):
I don't know how to make it more simple. Your hyperledger systems peers orders are behind a proxy Their internal addresses are not accessible from the clients but only through the external proxy through external endpoints . How would you get serviced discovery to report those external endpoints and not the internal ones

yacovm (Wed, 15 Aug 2018 11:14:30 GMT):
Just use the external_endpoint cobfiguration parameter

yacovm (Wed, 15 Aug 2018 11:14:49 GMT):
And assign it to be the proxy endpoont

rickr (Wed, 15 Aug 2018 11:16:11 GMT):
Not urgent .. so when you get off your cellphone :) can you provide the exact ones ? Also does that work for the Orderer too ?

yacovm (Wed, 15 Aug 2018 11:17:03 GMT):
CORE_PEER_GOSSIP_EXTERNAL_ENDPOINT

yacovm (Wed, 15 Aug 2018 11:17:18 GMT):
In the docker composr file

kelvinzhong (Wed, 15 Aug 2018 11:22:06 GMT):
so i just need to config the CORE_PEER_GOSSIP_EXTERNAL_ENDPOINT to the actual peer url or set the org.hyperledger.fabric.sdk.test.endpoint_remap_discovery_host_name for test, right?

kelvinzhong (Wed, 15 Aug 2018 11:23:48 GMT):
and one more question... why discovery service can only find the peers in the same MSP? what about the peer from other MSP which also join in the same channel?

rickr (Wed, 15 Aug 2018 11:24:07 GMT):
don't do both

rickr (Wed, 15 Aug 2018 11:25:25 GMT):
the second issue I think _maybe_ due to gossip not set up right

kelvinzhong (Wed, 15 Aug 2018 11:26:40 GMT):
got it

kelvinzhong (Wed, 15 Aug 2018 11:27:28 GMT):
what is this config CORE_PEER_GOSSIP_BOOTSTRAP using for?

kelvinzhong (Wed, 15 Aug 2018 11:28:02 GMT):
i set this CORE_PEER_GOSSIP_BOOTSTRAP as the anchor peer in each MSP

kelvinzhong (Wed, 15 Aug 2018 11:28:20 GMT):
should I set it to the same peer?

yacovm (Wed, 15 Aug 2018 11:28:35 GMT):
The discovery returns all the peers the peer you ask, know about

yacovm (Wed, 15 Aug 2018 11:28:48 GMT):
To know other msps you need anchor peers

kelvinzhong (Wed, 15 Aug 2018 11:29:57 GMT):
indeed I use the anchor peer to do the discovery, but still only find the peer in the same org

kelvinzhong (Wed, 15 Aug 2018 11:30:24 GMT):
also i have successfully install and instantiate chaincode in all peers

kelvinzhong (Wed, 15 Aug 2018 11:48:02 GMT):
@rickr is there any chance to add a test for multiple MSP discovery....

kelvinzhong (Wed, 15 Aug 2018 11:49:05 GMT):
I have check all the config and can't find why the discovery can only find the orderer and the peer in the same MSP

yacovm (Wed, 15 Aug 2018 11:50:57 GMT):
Seems like the anchor peers are not properly used

kelvinzhong (Wed, 15 Aug 2018 11:53:46 GMT):
I have set the configtx.yaml AnchorPeers HOST and PORT same as the CORE_PEER_GOSSIP_EXTERNALENDPOINT,what else need to be config to make the anchor peer work?

kelvinzhong (Wed, 15 Aug 2018 11:53:46 GMT):
I have set the configtx.yaml AnchorPeers HOST and PORT same as the CORE_PEER_GOSSIP_EXTERNALENDPOINT,what else needed to be config to make the anchor peer work?

yacovm (Wed, 15 Aug 2018 11:55:38 GMT):
Nooo

yacovm (Wed, 15 Aug 2018 11:55:53 GMT):
You need to update them after the genesis block

yacovm (Wed, 15 Aug 2018 11:55:58 GMT):
As a confog update

kelvinzhong (Wed, 15 Aug 2018 11:57:22 GMT):
really?!

kelvinzhong (Wed, 15 Aug 2018 12:00:48 GMT):
the config of the anchor peer wasn't already initialize while creating a channel?

yacovm (Wed, 15 Aug 2018 12:02:20 GMT):
Nooo

yacovm (Wed, 15 Aug 2018 12:02:29 GMT):
You need to do it after

yacovm (Wed, 15 Aug 2018 12:02:34 GMT):
For each org

yacovm (Wed, 15 Aug 2018 12:02:46 GMT):
@jyellick is that correct?

kelvinzhong (Wed, 15 Aug 2018 12:30:02 GMT):
sounds not true...if in that case what is the point to set the anchor peer in the config.yaml....

albert.lacambra (Wed, 15 Aug 2018 12:58:03 GMT):
hi some idea what this message exactly means? ejecting broadcast of config message from 172.18.90.174:49173 because of error: error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1

jyellick (Wed, 15 Aug 2018 17:43:15 GMT):
@yacovm Correct, anchor peers are not set during channel creation time (even if they are present in `configtx.yaml`, they must be updated after.

jyellick (Wed, 15 Aug 2018 17:43:35 GMT):
(Usually, this is done per org, submitted by the respective admins)

yacovm (Wed, 15 Aug 2018 17:46:34 GMT):
@kelvinzhong see? ^ I am correct!

yacovm (Wed, 15 Aug 2018 17:46:44 GMT):
thanks @jyellick

jyellick (Wed, 15 Aug 2018 17:55:22 GMT):
There are two reasons why anchor peers are not set during channel creation time: 1. A peer cannot join a channel until after the channel is created, therefore, specifying a peer as an anchor peer during channel creation would imply a period of misconfiguration, while the network believes a peer is an anchor peer for a channel, but it is not yet joined. 2. Channel creation is usually done only by a single org admin. That admin does not have authority to set the anchor peer for the other organizations, only for his own. Therefore, without collecting signatures from the other admins, the creation request would fail.

kelvinzhong (Thu, 16 Aug 2018 01:50:44 GMT):
@yacovm okay, thanks anyway :smile:

kelvinzhong (Thu, 16 Aug 2018 01:52:53 GMT):
so that is the case, do we have any tutorial relate to config the anchor peer? and what does the anchor peer used for in the config.yaml?

kelvinzhong (Thu, 16 Aug 2018 01:52:53 GMT):
i found the configtxgen has a command for anchor peer update, my mistake:grin:

Kwaks (Thu, 16 Aug 2018 08:03:12 GMT):
Has joined the channel.

kelvinzhong (Thu, 16 Aug 2018 08:31:31 GMT):
@rickr @jyellick @yacovm hi, do you know what is the proto type that generate by "./configtxgen -outputAnchorPeersUpdate anchor_peer_tx.pb -profile TwoOrgsChannel_v12 -asOrg org"

kelvinzhong (Thu, 16 Aug 2018 08:31:31 GMT):
@rickr @jyellick @yacovm hi, do you know what is the proto type that generated by "./configtxgen -outputAnchorPeersUpdate anchor_peer_tx.pb -profile TwoOrgsChannel_v12 -asOrg org"

kelvinzhong (Thu, 16 Aug 2018 08:32:01 GMT):
i can't find a way to update the anchor peer config through java sdk

kelvinzhong (Thu, 16 Aug 2018 08:33:58 GMT):
i try to inspect this ancher peer update config by "./configtxlator proto_decode --input anchor_peer_tx.pb --type common.ConfigUpdate" but could not find a suitable type

khushboo_goel (Thu, 16 Aug 2018 09:06:46 GMT):
Has joined the channel.

khushboo_goel (Thu, 16 Aug 2018 09:09:45 GMT):
I am getting the following error while executing the make command inside fabric folder..

khushboo_goel (Thu, 16 Aug 2018 09:10:42 GMT):
I am getting the following error while executing make command... root@dell:~/gopath/src/github.com/hyperledger/fabric# make mkdir -p .build/image/ccenv/payload cp .build/docker/gotools/bin/protoc-gen-go .build/bin/chaintool .build/goshim.tar.bz2 .build/image/ccenv/payload cp: cannot stat '.build/docker/gotools/bin/protoc-gen-go': No such file or directory Makefile:278: recipe for target '.build/image/ccenv/payload' failed make: *** [.build/image/ccenv/payload] Error 1

khushboo_goel (Thu, 16 Aug 2018 09:11:15 GMT):
Have tried the following commands but they didnt work .. root@dell:~/gopath/src/github.com/hyperledger/fabric# go get -u github.com/golang/protobuf/protoc-gen-go root@dell:~/gopath/src/github.com/hyperledger/fabric# cp $GOPATH/bin/protoc-gen-go build/docker/gotools/bin/

rickr (Thu, 16 Aug 2018 11:50:10 GMT):
@khushboo_goel I think you should ask on #fabric-dev-env

rickr (Thu, 16 Aug 2018 11:54:57 GMT):
@kelvinzhong There is no means at this time to make a Peer an Anchor peer. I'll be forthright, and say that I thought having it defined in the configtx.yaml would be sufficient. IMO it still should :) I'll look at doing this sometime in the future.

rickr (Thu, 16 Aug 2018 11:54:57 GMT):
@kelvinzhong There is no means at this time to make a Peer an Anchor peer. I'll be forthright, and say that I thought having it defined in the configtx.yaml would be sufficient. IMO it still should :) I'll look at doing this in the sdk sometime in the future.

rickr (Thu, 16 Aug 2018 11:54:57 GMT):
@kelvinzhong There is no means at this time to make a Peer an Anchor peer via the sdk. I'll be forthright, and say that I thought having it defined in the configtx.yaml would be sufficient. IMO it still should :) I'll look at doing this in the sdk sometime in the future.

rickr (Thu, 16 Aug 2018 11:54:57 GMT):
@kelvinzhong There is no means at this time to make a Peer an Anchor peer via the sdk. I'll be forthright, and say that I thought having it defined in the configtx.yaml would be sufficient. IMO it still should :) I'll investigate at doing this in the sdk sometime in the future.

rickr (Thu, 16 Aug 2018 11:54:57 GMT):
@kelvinzhong There is no means at this time to make a Peer an Anchor peer via the sdk. I'll be forthright, and say that I thought having it defined in the configtx.yaml would be sufficient. IMO it still should :) I'll investigate doing this in the sdk sometime in the future.

kelvinzhong (Thu, 16 Aug 2018 12:12:17 GMT):
@rickr I have just figure it out....to make the discovery service full functional around multiple MSP takes me for two whole days long...

kelvinzhong (Thu, 16 Aug 2018 12:13:58 GMT):
https://ctrlv.it/id/143282/10467051

rickr (Thu, 16 Aug 2018 12:14:01 GMT):
Well FYI I'm working on a fix for endorsements across orgs

kelvinzhong (Thu, 16 Aug 2018 12:14:52 GMT):
i just share it here...too much work to commit it to Gerrit

rickr (Thu, 16 Aug 2018 12:15:50 GMT):
The solution I have in mind would not need the update protobuf

kelvinzhong (Thu, 16 Aug 2018 12:16:28 GMT):
okay...that will be cool. but i need it to be functional now...

rickr (Thu, 16 Aug 2018 12:17:35 GMT):
right understood just saying why I don't intend to put in the mainstream code.

kelvinzhong (Thu, 16 Aug 2018 12:31:17 GMT):
okay, thanks for the tips:) BTW, what is the problem with the endorsements across orgs? would it effect the normal transaction process?

rickr (Thu, 16 Aug 2018 12:32:05 GMT):
Calculates wrong endorsement needed

jyellick (Thu, 16 Aug 2018 13:08:17 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GqqguP3zhJt5jAgHh

jyellick (Thu, 16 Aug 2018 13:08:25 GMT):
@kelvinzhong It is of type `common.Envelope`

nikolas (Thu, 16 Aug 2018 13:12:11 GMT):
Hi, how can I read the JSON payload of transactions of a given block?

khushboo_goel (Thu, 16 Aug 2018 14:00:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7azbMMFXHr4FZc5W5) @rickr Thanks..:slight_smile:

albert.lacambra (Fri, 17 Aug 2018 06:57:06 GMT):
hi @rickr

albert.lacambra (Fri, 17 Aug 2018 06:57:15 GMT):
there is some method in the sdk to call GetChainInfo

albert.lacambra (Fri, 17 Aug 2018 06:57:33 GMT):
I need to know if a channel already exist

albert.lacambra (Fri, 17 Aug 2018 07:00:41 GMT):
is this one? Channel.queryBlockchainInfo()

rickr (Fri, 17 Aug 2018 13:05:08 GMT):
GetChainInfo which is from the go client which I'm not as familar with but I think that's equivalent to queryBlockchainInfo

aatkddny (Fri, 17 Aug 2018 15:25:58 GMT):
Well this is a new one... Anyone ever have this? `2018-08-17 11:23:53.547 ERROR 28297 --- [nio-8096-exec-1] i.g.i.ManagedChannelOrphanWrapper : *~*~*~ Channel ManagedChannelImpl{logId=45, target=localhost:32011} was not shutdown properly!!! ~*~*~* Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.` Comes from ``` java.lang.RuntimeException: ManagedChannel allocation site at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.(ManagedChannelOrphanWrapper.java:103) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:53) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:44) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410) ~[grpc-core-1.13.2.jar:1.13.2] at org.hyperledger.fabric.sdk.EndorserClient.(EndorserClient.java:49) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Peer.setTLSCertificateKeyPair(Peer.java:415) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Channel.addPeer(Channel.java:639) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Channel.joinPeer(Channel.java:772) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Channel.joinPeer(Channel.java:716) ~[fabric-sdk-java-1.2.0.jar:na] ```

aatkddny (Fri, 17 Aug 2018 15:25:58 GMT):
Well this is a new one... Anyone ever have this? ```2018-08-17 11:23:53.547 ERROR 28297 --- [nio-8096-exec-1] i.g.i.ManagedChannelOrphanWrapper : *~*~*~ Channel ManagedChannelImpl{logId=45, target=localhost:32011} was not shutdown properly!!! ~*~*~* Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.``` Comes from ``` java.lang.RuntimeException: ManagedChannel allocation site at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.(ManagedChannelOrphanWrapper.java:103) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:53) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:44) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410) ~[grpc-core-1.13.2.jar:1.13.2] at org.hyperledger.fabric.sdk.EndorserClient.(EndorserClient.java:49) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Peer.setTLSCertificateKeyPair(Peer.java:415) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Channel.addPeer(Channel.java:639) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Channel.joinPeer(Channel.java:772) ~[fabric-sdk-java-1.2.0.jar:na] at org.hyperledger.fabric.sdk.Channel.joinPeer(Channel.java:716) ~[fabric-sdk-java-1.2.0.jar:na] ```

rickr (Fri, 17 Aug 2018 15:57:55 GMT):
Not seen that before. Is that reoccurring ?

aatkddny (Fri, 17 Aug 2018 16:02:36 GMT):
One time and didn't affect operation. A few seconds of google make it appear as if it was a channel that was discarded without being shut down and subsequently GC'd. That makes sense given my program flow - I'd just never seen it before.

rickr (Fri, 17 Aug 2018 16:04:46 GMT):
So other than the ugly stack trace you suffered no ill harm :)

asaningmaxchain123 (Fri, 17 Aug 2018 16:06:30 GMT):
@rickr the java sdk can parse the chaincode endorsement policy ,and than send the tx to `possible peer` not the `all peer`?

aatkddny (Fri, 17 Aug 2018 16:10:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5gCcA28bLjWqh2fJt) @rickr Well I did spend a few minutes wondering what I'd just broken. I'd been editing my peer create method when it popped up. But no, no ill effects other than a polluted log.

rickr (Fri, 17 Aug 2018 16:13:58 GMT):
@asaningmaxchain123 No the SDK may not know the endorsement policy without service discovery. Could be some other organization (another client) that installed and instantiated the CC with endorsement policy. Your client sdk wouldn't know it unless communicated out of band or using service discovery

asaningmaxchain123 (Fri, 17 Aug 2018 16:16:00 GMT):
so, i should start the service discovery in my app?

asaningmaxchain123 (Fri, 17 Aug 2018 16:18:31 GMT):
if i set the `service discovery`. that means the app would keep heart beat with the peer to test it's alive?

rickr (Fri, 17 Aug 2018 16:18:42 GMT):
Ideally but I need to get something fixed first :blush:

rickr (Fri, 17 Aug 2018 16:20:40 GMT):
ah has nothing do with heartbeat.

rickr (Fri, 17 Aug 2018 16:21:55 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-1.2/discovery-overview.html

asaningmaxchain123 (Fri, 17 Aug 2018 16:22:12 GMT):
i have seen it

kelvinzhong (Fri, 17 Aug 2018 17:04:44 GMT):
@albert.lacambra client.queryChannels(peer);

kelvinzhong (Fri, 17 Aug 2018 17:05:47 GMT):
@albert.lacambra client.queryChannels(peer); this should help

rickr (Fri, 17 Aug 2018 18:13:08 GMT):
There is no api for finding if a channel *exists*. `client.queryChannels(peer);` Will give you what channels the peer has joined.

rickr (Fri, 17 Aug 2018 18:13:08 GMT):
There is no api for finding if a channel *exists*. `client.queryChannels(peer);` will give you what channels the peer has joined.

rickr (Fri, 17 Aug 2018 18:13:08 GMT):
There is no api for finding if a channel *exists*. `client.queryChannels(peer);` will give you what channels the peer has joined. .. should add no api to list all channels either.

rickr (Fri, 17 Aug 2018 18:13:08 GMT):
There is no api for finding if a channel just *exists*. `client.queryChannels(peer);` will give you what channels the peer has joined. .. should add no api to list all channels either.

kelvinzhong (Sat, 18 Aug 2018 07:32:08 GMT):
yes, I think one more api is needed as client.queryChannels(*orderer*); but this might just *ordererAdmin* can access only

kelvinzhong (Sat, 18 Aug 2018 07:32:08 GMT):
yes, I think one more api is needed as client.queryChannels(*orderer*); but this might just *ordererAdmin* can access only

kelvinzhong (Sat, 18 Aug 2018 07:32:08 GMT):
yes, I think one more api is needed as client.queryChannels(*orderer*); but this might just ordererAdmin can access only

kelvinzhong (Sat, 18 Aug 2018 07:32:08 GMT):
yes, I think one more api is needed as client.queryChannels( *orderer* ); but this might just *ordererAdmin* can access only

albert.lacambra (Sat, 18 Aug 2018 21:01:04 GMT):
not possible to read from the configuration block?

larry618 (Sun, 19 Aug 2018 07:45:04 GMT):
Has joined the channel.

Othman.Darwish (Sun, 19 Aug 2018 11:07:26 GMT):
mobile

puilp0502 (Sun, 19 Aug 2018 13:38:23 GMT):
Has joined the channel.

rickr (Sun, 19 Aug 2018 17:25:21 GMT):
Read any block you want : https://github.com/hyperledger/fabric-sdk-java/blob/4e20ae308a23026652ea4aef407502734e9ee898/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L908

rajanashutosh (Mon, 20 Aug 2018 05:12:40 GMT):
Has joined the channel.

rajanashutosh (Mon, 20 Aug 2018 05:14:22 GMT):
Hi All.. I wanted to understand is there a way to get users information who have initiated a transaction once i have retrieved historical orders ?

akoenig (Mon, 20 Aug 2018 07:48:53 GMT):
Hi, has someone an idea why the most of the classes in the sdk are package private? Is this on purpose?

kelvinzhong (Mon, 20 Aug 2018 11:05:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NvEA76KTyP7d4iWMZ) @rajanashutosh this should help

rickr (Mon, 20 Aug 2018 11:17:32 GMT):
@rajanashutosh You can only get the MSPID and certificate of the originator of the proposals

JaishankarGothandaraman (Mon, 20 Aug 2018 16:52:41 GMT):
Has joined the channel.

daijianw (Tue, 21 Aug 2018 05:44:29 GMT):
Has joined the channel.

akoenig (Tue, 21 Aug 2018 06:44:49 GMT):
@rickr sorry, but do you know why most of the classes in the sdk are package private?

rickr (Tue, 21 Aug 2018 09:43:15 GMT):
What's your specific use case that you can't do with publicly available classes and methods ?

akoenig (Tue, 21 Aug 2018 10:03:35 GMT):
for example the EndorserClient, or the OrdererClient are package private. They say "example code", but to use the same methods like those clients i need to be in same package again

rickr (Tue, 21 Aug 2018 10:05:23 GMT):
As an application using the sdk I don't see any need to access those.

akoenig (Tue, 21 Aug 2018 10:06:54 GMT):
or the TransactionOptions -> public class but all properties are private. I just wanted to know if this is written so on prupose or not?

akoenig (Tue, 21 Aug 2018 10:10:55 GMT):
wrote you why we need this in sperate chat ;)

rickr (Tue, 21 Aug 2018 10:11:17 GMT):
The classes and methods that are public _should_ be adequate to address the use cases we see SDK should address. If you have a uses cases as an application using the SDK that's not meet open a JIRA

akoenig (Tue, 21 Aug 2018 10:13:34 GMT):
mhm, okay I see. I will discuss our usecase and will create a JIRA ticket. Maybe we can contribute to this or something

gravity (Tue, 21 Aug 2018 12:23:41 GMT):
Hello Is it possible to get a list of channels that were created in the network, but haven't joined these channel yet?

rickr (Tue, 21 Aug 2018 12:28:10 GMT):
no

Lakshmipadmaja (Tue, 21 Aug 2018 12:29:17 GMT):
Has joined the channel.

JaishankarGothandaraman (Tue, 21 Aug 2018 13:06:18 GMT):
All, I'm running into an issue in eclipse after importing maven project from the git repository. https://github.com/hyperledger/fabric-sdk-java here is one of the error message, I get in the POM.xml .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml (pl.project13.maven:git-commit-id-plugin:2.2.2:revision:get-the-git-infos:validate) org.apache.maven.plugin.MojoExecutionException: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml at pl.project13.maven.git.GitCommitIdMojo.execute(GitCommitIdMojo.java:402) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:795) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:216) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:259) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:312) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:315) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:367) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:388) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) Caused by: pl.project13.maven.git.GitCommitIdExecutionException: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml at pl.project13.maven.git.GitCommitIdMojo.execute(GitCommitIdMojo.java:356) ... 32 more

rickr (Tue, 21 Aug 2018 13:19:41 GMT):
the build expects the directory to be git directory

JaishankarGothandaraman (Tue, 21 Aug 2018 13:42:09 GMT):
i did specify a valid folder location. let me double check

asaningmaxchain123 (Tue, 21 Aug 2018 16:31:41 GMT):
@rickr i think the service discovery information should be provide use the sdk

asaningmaxchain123 (Tue, 21 Aug 2018 16:31:52 GMT):
not just use in the sdk

rickr (Tue, 21 Aug 2018 16:43:46 GMT):
The SDK should purpose is mostly to deploying and executing chiancode and doing some queries. The parts of service discovery that helped facilitate that are used.

rickr (Tue, 21 Aug 2018 16:43:46 GMT):
The SDK purpose is mostly deploying and executing chiancode and doing some queries. The parts of service discovery that helped facilitate that are used.

rickr (Tue, 21 Aug 2018 19:40:16 GMT):
anchor

bdjidi (Tue, 21 Aug 2018 22:49:10 GMT):
Has joined the channel.

Ryan2 (Wed, 22 Aug 2018 05:32:35 GMT):
Has joined the channel.

Smit95shah (Wed, 22 Aug 2018 05:59:18 GMT):
Guyz, any one found this error before, and manage to find solution to it?

Smit95shah (Wed, 22 Aug 2018 06:00:13 GMT):
``` 2018-08-22 13:57:43.068 WARN 27453 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel channelone failed with peer peer. Status FAILURE, details: Sending proposal to peer failed because of timeout(20000 milliseconds) expiration 2018-08-22 13:57:43.069 ERROR 27453 --- [nio-8080-exec-2] org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel channelone failed with peer peer. Status FAILURE, details: Sending proposal to peer failed because of timeout(20000 milliseconds) expiration 2018-08-22 13:58:08.117 ERROR 27453 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.hyperledger.fabric.sdk.exception.ProposalException: org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel channelone failed with peer peer. Status FAILURE, details: Sending proposal to peer failed because of timeout(20000 milliseconds) expiration] with root cause ```

kelvinzhong (Wed, 22 Aug 2018 06:07:43 GMT):
@Smit95shah you might better look into the peer's log trace

Smit95shah (Wed, 22 Aug 2018 06:21:48 GMT):
Hi @kelvinzhong Thanks for replying. May I know how can check the trace.

akoenig (Wed, 22 Aug 2018 06:45:52 GMT):
@Smit95shah you can look inside the docker-image of the peer and look at the console. Or if you have kitmatic for docker you can have a look their. Our exception is maybe a hint to wrong configuration of the peer? Name/Port or something else...

kelvinzhong (Wed, 22 Aug 2018 07:02:20 GMT):
@Smit95shah look into the peer's docker logs

kelvinzhong (Wed, 22 Aug 2018 07:02:43 GMT):
@rickr @yacovm I got a complex scenario, please help me to understand 1. can a chaincode call the function from the other chaincode which in the same channel? 2. assume 1 is yes, the discovery service could choose the peer base on endorsement policy or Collection for private data, what if a chaincode required for peerMSP A and B, and call the other chaincode which required for peerMSP A and C, then what would happened? would it send the proposal only to A and B at first then redirect to the second chaincode only for A and C?

yacovm (Wed, 22 Aug 2018 07:19:03 GMT):
1. Yes

yacovm (Wed, 22 Aug 2018 07:19:36 GMT):
2. I have support for cc2cc queries

yacovm (Wed, 22 Aug 2018 07:21:27 GMT):
I = the peer

yacovm (Wed, 22 Aug 2018 07:21:45 GMT):
You give the peer both chaincodes and it computes it based on the combined policies

yacovm (Wed, 22 Aug 2018 07:22:05 GMT):
Not sure if Rick implemented the client side support yet though

Smit95shah (Wed, 22 Aug 2018 07:22:42 GMT):
Hi @kelvinzhong @akoenig I dont see any movements in the Kitmatic logs for that peer0. I believe, that I am unable to connect correctly?

akoenig (Wed, 22 Aug 2018 07:28:48 GMT):
Mhm, thats why I was saying the second part: "your exception is maybe a hint to wrong configuration of the peer? Name/Port or something else..."

akoenig (Wed, 22 Aug 2018 07:29:28 GMT):
would recomend to check again, which peer you are speeking, too and if your mapping between the jdk and docker-image is right (port, host name etc.)

Smit95shah (Wed, 22 Aug 2018 07:57:06 GMT):
Thanks.

Smit95shah (Wed, 22 Aug 2018 07:57:18 GMT):
I manage to fix that problem and bumbed into new problem

Smit95shah (Wed, 22 Aug 2018 07:57:22 GMT):
```http2 exception, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. ```

Smit95shah (Wed, 22 Aug 2018 07:57:27 GMT):
thats the new error.

Smit95shah (Wed, 22 Aug 2018 07:57:36 GMT):
is there a place where i can change http2 to http1?

kelvinzhong (Wed, 22 Aug 2018 08:07:26 GMT):
@yacovm thanks for the answer, but what if the private data required A and B can access only and the other chaincode required A and C only? for what I understand is that the proposal will send to the A、B、C at the same time or just send to A?

kelvinzhong (Wed, 22 Aug 2018 08:23:38 GMT):
one more thing...is cc2cc support query only?

yacovm (Wed, 22 Aug 2018 08:23:39 GMT):
you can also add a collection in the discovery request

yacovm (Wed, 22 Aug 2018 08:23:47 GMT):
and the discovery service would take that into account

yacovm (Wed, 22 Aug 2018 08:23:53 GMT):
and filter out peers not in the collection

kelvinzhong (Wed, 22 Aug 2018 08:24:29 GMT):
got it, thanks

Smit95shah (Wed, 22 Aug 2018 08:42:58 GMT):
How can I enable TLS in java?

Smit95shah (Wed, 22 Aug 2018 08:43:05 GMT):
when creating and joining peer?

rajasushanth (Wed, 22 Aug 2018 10:09:00 GMT):
@rickr How to find the total number transactions happened in a channel? Do I need to iterate over each block by its block-number and do 'blockInfo.getTransactionCount()' and sum it to get the required. Currently Hyperledger Explorer dashboard gives this information.

rajasushanth (Wed, 22 Aug 2018 10:09:00 GMT):
@rickr How to find the total number of transactions happened in a channel? Do I need to iterate over each block by its block-number and do 'blockInfo.getTransactionCount()' and sum it to get the required. Currently Hyperledger Explorer dashboard gives this information.

rickr (Wed, 22 Aug 2018 10:14:03 GMT):
@Smit95shah grpcs protocol instead of grpc ? provide properties with Certs

rickr (Wed, 22 Aug 2018 10:15:03 GMT):
@rajasushanth I don't know of any other means

rajasushanth (Wed, 22 Aug 2018 10:21:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=A3zrGq3qKTD7g7MTA) @rickr Okay thanks, also would it be possible to get organization count as well from java SDK? If so, how should I get the required?

rickr (Wed, 22 Aug 2018 10:40:08 GMT):
You can get from the config block. But the SDK for that doesn't _interpret_ it for you. You'll need to parse it on your own.

rickr (Wed, 22 Aug 2018 10:40:08 GMT):
You can get it from the config block. But the SDK for that doesn't _interpret_ it for you. You'll need to parse it on your own.

Smit95shah (Wed, 22 Aug 2018 11:34:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xRa9dwPeHer5nHRK4) @rickr Thanks. How can I add certs to properties?

Smit95shah (Wed, 22 Aug 2018 11:35:11 GMT):
``` testprops.setProperty("trustServerCertificate", "true"); testprops.setProperty("pemFile", removedInitial+"/multichain_network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"); testprops.setProperty("sslProvider", "openSSL"); testprops.setProperty("hostnameOverride", "override"); testprops.setProperty("negotiationType", "TLS"); ```

Smit95shah (Wed, 22 Aug 2018 11:35:16 GMT):
Is this correct way?

larry618 (Wed, 22 Aug 2018 12:25:36 GMT):
Hi there, Does anyone knows how to use fabric idemix in Java SDK

rickr (Wed, 22 Aug 2018 12:28:36 GMT):
Should be integration code showing idemix being used *when it's released*. Almost no difference at all between x509 cert and id

rickr (Wed, 22 Aug 2018 12:28:36 GMT):
Should be integration code showing idemix being used *when it's released*. The short of it is: almost no difference at all between x509 cert and idemix except that you'll need to have a separate idemix user context that has an enrollment gotten with the CA that is an idemix enrollment instead of x509. The idemix user context is limited to just invoking chaincode.

larry618 (Wed, 22 Aug 2018 12:34:57 GMT):
or in go SDK

rickr (Wed, 22 Aug 2018 12:35:38 GMT):
Ask on the go SDK channel

rickr (Wed, 22 Aug 2018 12:37:40 GMT):
@Smit95shah https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario

larry618 (Wed, 22 Aug 2018 12:47:03 GMT):
Thanks

Smit95shah (Wed, 22 Aug 2018 13:16:20 GMT):

Screen Shot 50.png

Smit95shah (Wed, 22 Aug 2018 13:16:57 GMT):
`import org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset;`

rickr (Wed, 22 Aug 2018 13:17:37 GMT):
https://github.com/hyperledger/fabric-sdk-java#compiling

sstone1 (Wed, 22 Aug 2018 13:39:12 GMT):
Has joined the channel.

sstone1 (Wed, 22 Aug 2018 13:39:32 GMT):
is the javadoc for the java SDK published anywhere?

rickr (Wed, 22 Aug 2018 13:51:39 GMT):
Its available: http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.2.0/ javadoc.jar

rickr (Wed, 22 Aug 2018 13:51:39 GMT):
Its available: http://central.maven.org/maven2/org/hyperledger/fabric-sdk-java/fabric-sdk-java/1.2.0/ the javadoc.jar

sstone1 (Wed, 22 Aug 2018 13:52:46 GMT):
cool, thanks

JaishankarGothandaraman (Wed, 22 Aug 2018 17:19:28 GMT):
i'm getting an error when you join a peer Channel %!s(*policies.ManagerImpl=&{Channel map[Application/Org2MSP/Writers:0xc421f50480 Writers:0xc421ea1200 Application/Org1MSP/Readers:0xc421f50260 Application/Org2MSP/Readers:0xc421f50400 Orderer/BlockValidation:0xc421ea1040 Admins:0xc421ea1240 Orderer/Writers:0xc421ea1100 Orderer/OrdererOrg/Admins:0xc421f45f20 Application/Writers:0xc421ea1180 Application/Org1MSP/Writers:0xc421f502e0 Application/Readers:0xc421ea1140 Application/Org2MSP/Admins:0xc421f50500 Orderer/OrdererOrg/Readers:0xc421f45fa0 Orderer/OrdererOrg/Writers:0xc421f50020 Orderer/Admins:0xc421ea1080 Application/Admins:0xc421ea11c0 Readers:0xc421ea1280 Orderer/Readers:0xc421ea10c0 Application/Org1MSP/Admins:0xc421f50360] map[Orderer:0xc421f50200 Application:0xc421f50740]})}] incompatible Application capability V1_2 is required but not supported

JaishankarGothandaraman (Wed, 22 Aug 2018 17:19:35 GMT):
any idea

rickr (Wed, 22 Aug 2018 17:21:08 GMT):
The block you for the channel to create it has V12 but the fabric you're running is <1.2 is my guess

rickr (Wed, 22 Aug 2018 17:21:08 GMT):
The block you have for the channel to create is V12 but the fabric you're running is <1.2 is my guess

gravity (Thu, 23 Aug 2018 11:32:20 GMT):
Hello is it possible to share data between channels?

markthedark (Thu, 23 Aug 2018 12:48:10 GMT):
Hello, is there a limit as to how big the outgoing transaction can be? I'm trying to modify my chaincode to accept an array of JSON objects, instead of just one, but the transaction proposal fails with the following error on the peer: `2018-08-23 12:43:12.992 UTC [chaincode] processStream -> ERRO 0b6 Error handling chaincode support stream: rpc error: code = Canceled desc = context canceled`

rickr (Thu, 23 Aug 2018 12:54:03 GMT):
@gravity Don't think so, but better asked on #fabric-questions

rickr (Thu, 23 Aug 2018 12:58:42 GMT):
@markthedark I think that's happening on the server side. I have not been testing the system on it's limits I'd ask on #fabric-peer-endorser-committer channel.

markthedark (Thu, 23 Aug 2018 12:59:14 GMT):
thanx, i'll try there..

aatkddny (Thu, 23 Aug 2018 13:11:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CCfopfrxBZ7Fv3zTS) If you are using kafka, I understood it to be the maximum size of the message allowable to kafka minus some overhead. There's a formula for it, but I forgot it because my messages weren't that large. The property (again iirc) is KAFKA_MESSAGE_MAX_BYTES=103809024 in the kafka config yaml. If you are using a local orderer it's set in a config file somewhere that requires a recompile, and it isn't very big. Ask me how I know... There's also a further limit in config.tx `AbsoluteMaxBytes`

aatkddny (Thu, 23 Aug 2018 13:11:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CCfopfrxBZ7Fv3zTS) If you are using kafka, I understood it to be the maximum size of the message allowable to kafka minus some overhead. There's a formula for it, but I forgot it because my messages weren't that large. The property (again iirc) is KAFKA_MESSAGE_MAX_BYTES= in the kafka config yaml. If you are using a local orderer it's set in a config file somewhere that requires a recompile, and it isn't very big. Ask me how I know... There's also a further limit in config.tx `AbsoluteMaxBytes`

aatkddny (Thu, 23 Aug 2018 13:11:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CCfopfrxBZ7Fv3zTS) If you are using kafka, I understood it to be the maximum size of the message allowable to kafka minus some overhead. There's a formula for it, but I forgot it because my messages weren't that large. The property (again iirc) is KAFKA_MESSAGE_MAX_BYTES= in the kafka config yaml. If you are using a local orderer it's set in a config file somewhere inside fabric that requires a recompile, and it isn't very big. Ask me how I know... (I'll give you a clue - I had to refactor my messages to make them smaller for the test I was running using composer)... There's also a further limit in config.tx `AbsoluteMaxBytes` but that defaults to 99Mb iirc.

aatkddny (Thu, 23 Aug 2018 13:11:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CCfopfrxBZ7Fv3zTS) If you are using kafka, I understood it to be the maximum size of the message allowable to kafka minus some overhead. There's a formula for it, but I forgot it because my messages weren't that large. The property (again iirc) is KAFKA_MESSAGE_MAX_BYTES= in the kafka config yaml. If you are using a local orderer it's set in a config file somewhere inside fabric that requires a recompile, and it isn't very big - like a M or so. Ask me how I know... (I'll give you a clue - I had to refactor my messages to make them smaller for the test I was running using composer)... There's also a further limit in config.tx `AbsoluteMaxBytes` but that defaults to 99Mb iirc.

rickr (Thu, 23 Aug 2018 13:16:00 GMT):
Really should be able to point where it's documented :)

aatkddny (Thu, 23 Aug 2018 13:33:03 GMT):
Documentation? It's probably in the code :) Plus I'm a user - I don't actually get paid to write any of this stuff, merely to make use of it.

aatkddny (Thu, 23 Aug 2018 20:38:30 GMT):
Anyone ever connect an HFCA client to a running CA inside kubernetes? The only way I know to do it is with a proxy and the HFCA client doesn't support a path in the url.

aatkddny (Thu, 23 Aug 2018 20:38:30 GMT):
Anyone ever connect an HFCA client to a running CA inside kubernetes? The only way I know to do it is with a proxy and the HFCA client doesn't support a path in the url. There's clearly another way to do it - and this may not strictly be a java-sdk question - but I'm hoping someone can steer me in the right direction...

aatkddny (Thu, 23 Aug 2018 20:38:30 GMT):
Anyone ever connect an HFCA client to a running CA inside kubernetes? The only way I know to do it is with a proxy and the HFCA client doesn't support a path in the url. There's clearly another way to do it - and this may not strictly be a java-sdk question - but I'm hoping someone can steer me in the right direction... Exception (for completeness) is `HFCAClient url does not support path portion in url remove path: '/api/v1/namespaces/default/services/https:some-ca:some-ca/proxy'.:java.lang.IllegalArgumentException: HFCAClient url does not support path portion in url remove path: '/api/v1/namespaces/default/services/https:some-ca:some-ca/proxy'.`

akoenig (Fri, 24 Aug 2018 11:13:28 GMT):
Hi, i get a error while i sending a signed proposal to the channel "channel [foo]: creator's signature over the proposal is not valid: The signature is invalid"

akoenig (Fri, 24 Aug 2018 11:13:53 GMT):
https://jira.hyperledger.org/browse/FAB-2514 <- same issue? But I don't know the reason/solution for this

rickr (Fri, 24 Aug 2018 11:32:11 GMT):
look at the peer logs for clues. Most cases is using a wrong mspid or the wrong certificate.

DavorKljajic (Fri, 24 Aug 2018 11:34:34 GMT):
Has joined the channel.

DavorKljajic (Fri, 24 Aug 2018 11:34:38 GMT):
hello, I'm wondering if someone has worked custom implementation mps with idemix, and where i can find the setup, on official site is not clear to much.

rickr (Fri, 24 Aug 2018 11:38:02 GMT):
Java SDK does not currently support idemix credentials. Better asked on #fabric-questions

DavorKljajic (Fri, 24 Aug 2018 11:38:38 GMT):
thx

rickr (Fri, 24 Aug 2018 14:16:05 GMT):
configtx

albert.lacambra (Sat, 25 Aug 2018 09:39:55 GMT):
hi @rickr

albert.lacambra (Sat, 25 Aug 2018 09:40:53 GMT):
I have seen that when a peer is not available and a client senda query to it, it keeps retrying reconnection without end. is That correct?

albert.lacambra (Sat, 25 Aug 2018 09:40:53 GMT):
I have seen that when a peer chaincode is not instantiated and a client request a simulation to it, it keeps retrying reconnection without end. is That correct?

albert.lacambra (Sat, 25 Aug 2018 09:41:43 GMT):

Clipboard - August 25, 2018 11:41 AM

albert.lacambra (Sat, 25 Aug 2018 09:41:56 GMT):
on PeerEventSericeClient.java

albert.lacambra (Sat, 25 Aug 2018 09:42:56 GMT):
since It retry is a new thread, it will eventually kill the machine on which is running on.

albert.lacambra (Sat, 25 Aug 2018 09:44:17 GMT):

Clipboard - August 25, 2018 11:44 AM

albert.lacambra (Sat, 25 Aug 2018 09:44:43 GMT):

Clipboard - August 25, 2018 11:44 AM

albert.lacambra (Sat, 25 Aug 2018 09:44:56 GMT):
or I am doing something wrong?

albert.lacambra (Sat, 25 Aug 2018 09:46:09 GMT):

Clipboard - August 25, 2018 11:46 AM

albert.lacambra (Sat, 25 Aug 2018 09:46:32 GMT):
the point wehre threads creation stops is when I have instantiated the cc on the missing peer

albert.lacambra (Sat, 25 Aug 2018 09:47:57 GMT):
and finally it cleans up

albert.lacambra (Sat, 25 Aug 2018 09:48:01 GMT):

Clipboard - August 25, 2018 11:47 AM

albert.lacambra (Sat, 25 Aug 2018 09:48:03 GMT):

Clipboard - August 25, 2018 11:48 AM

albert.lacambra (Sat, 25 Aug 2018 09:54:42 GMT):

Clipboard - August 25, 2018 11:54 AM

albert.lacambra (Sat, 25 Aug 2018 09:55:35 GMT):
in the last image I have send a tx to none available peers. In this case it looks like that per each non available peer creates about 200Threads and then keeps steel

albert.lacambra (Sat, 25 Aug 2018 09:55:35 GMT):
in the last image I have send a tx to none available peers. In this case it looks like that per each non available peer creates about 200Threads and then keeps still

albert.lacambra (Sat, 25 Aug 2018 09:56:50 GMT):
for the experiment I have stoped and started 3 peers. On the last part you see what happens when peers starts again. It can be seen how threads are removed once a peer is available again

albert.lacambra (Sat, 25 Aug 2018 10:16:09 GMT):

Clipboard - August 25, 2018 12:15 PM

albert.lacambra (Sat, 25 Aug 2018 10:17:13 GMT):
I have been using sdk 1.1.0 with 9 peers (3 orgs). I have disable one of the orgs (3 peers) completely

rickr (Sat, 25 Aug 2018 11:49:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ib3P8vKxDXLtAbPgo) @albert.lacambra No. Not having chaincode instantiated on the peer _should_ return an error by the peer when doing an endorsement and be no retry on the sdk. The SDK itself only spins off threads for events, some clean up threads, end for eventhubs and peer eventing services. The only time peer eventing creates a new thread is to reconnect . The reconnecting thread should try and only on failure try to reschedule a new thread to connect and _should_ end. Open a JIRA with all the information and exactly the steps done

rickr (Sat, 25 Aug 2018 11:49:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ib3P8vKxDXLtAbPgo) @albert.lacambra No. Not having chaincode instantiated on the peer _should_ return an error by the peer when doing an endorsement and no retry on the sdk. The SDK itself only spins off threads for events, some clean up threads, end for eventhubs and peer eventing services. The only time peer eventing creates a new thread is to reconnect . The reconnecting thread should try and only on failure try to reschedule a new thread to connect and _should_ end. Maybe the thread is not ending. Open a JIRA with all the information and exactly the steps done

rickr (Sat, 25 Aug 2018 11:49:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ib3P8vKxDXLtAbPgo) @albert.lacambra No. Not having chaincode instantiated on the peer _should_ return an error by the peer when doing an endorsement and no retry on the sdk. The SDK itself only spins off threads for events, some clean up threads, and for eventhubs and peer eventing services. The only time peer eventing creates a new thread is to reconnect . The reconnecting thread should try and only on failure try to reschedule a new thread to connect and _should_ end. Maybe the thread is not ending. Open a JIRA with all the information and exactly the steps done

rickr (Sat, 25 Aug 2018 14:38:44 GMT):
Ok I not sure I'm capturing your first issue but I modified the End2endIT to give a different name that was installed for instantiate and got back : ``` Not enough endorsers for instantiate :0endorser failed with cannot get package for chaincode (foome_rick:1), on peerPeer peer0.org1.example.com url: grpcs://localhost:7051 Not enough endorsers for instantiate :0endorser failed with cannot get package for chaincode (foome_rick:1), on peerPeer peer1.org1.example.com url: grpcs://localhost:7056 ``` It even gave back a reasonable message that the wrong chaincode name I tried to invoke. I also then changed the regular invoke (move) after the instantiate with a bad name and it too came back with a reasonable error ``` 018-08-25 14:36:02,604 pool-7-thread-1 TRACE ProposalResponse:103 - Peer peer0.org1.example.com url: grpcs://localhost:7051 verifying transaction: 0cb3dae3ecf9904eafee348bbfcd8c7a84b6aeabefa529bc93f5b7ad318136a4 endorsement. 2018-08-25 14:36:02,604 pool-7-thread-1 DEBUG ProposalResponse:113 - Peer peer0.org1.example.com url: grpcs://localhost:7051 for transaction 0cb3dae3ecf9904eafee348bbfcd8c7a84b6aeabefa529bc93f5b7ad318136a4 returned invalid. Setting verify to false 2018-08-25 14:36:02,606 pool-7-thread-1 DEBUG Channel:3592 - Channel foo got back from peer peer1.org1.example.com status: 500, message: make sure the chaincode foome_rick has been successfully instantiated and try again: chaincode foome_rick not found 2018-08-25 14:36:02,606 pool-7-thread-1 TRACE Channel:3595 - Got back from channel foo, peer: peer1.org1.example.com, proposal response: protobuf_2018-08-25T14-36-02_606P16954_37_31.proto 2018-08-25 14:36:02,607 pool-7-thread-1 TRACE ProposalResponse:103 - Peer peer1.org1.example.com url: grpcs://localhost:7056 verifying transaction: 0cb3dae3ecf9904eafee348bbfcd8c7a84b6aeabefa529bc93f5b7ad318136a4 endorsement. 2018-08-25 14:36:02,607 pool-7-thread-1 DEBUG ProposalResponse:113 - Peer peer1.org1.example.com url: grpcs://localhost:7056 for transaction 0cb3dae3ecf9904eafee348bbfcd8c7a84b6aeabefa529bc93f5b7ad318136a4 returned invalid. Setting verify to false Received 2 transaction proposal responses. Successful+verified: 0 . Failed: 2 ```

rickr (Sat, 25 Aug 2018 16:58:12 GMT):
I also changed End2endIT to add 10 bad peers and 10 bad orderers . Test need minor modification to accept some will be bad. patch: https://ctrlv.it/id/144697/2925264042 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. https://ctrlv.it/id/144698/3526196165

rickr (Sat, 25 Aug 2018 16:58:12 GMT):
I also changed End2endIT to add 10 bad peers and 10 bad orderers . Test need minor modification to accept some will be bad. patch: https://ctrlv.it/id/144697/2925264042 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. https://ctrlv.it/id/144698/3526196165 Something the application didn't need to worry about.

rickr (Sat, 25 Aug 2018 16:58:12 GMT):
I also changed End2endIT to add 10 bad peers and 10 bad orderers . Test needed minor modification to accept some will be bad. patch: https://ctrlv.it/id/144697/2925264042 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. https://ctrlv.it/id/144698/3526196165 Something the application didn't need to worry about.

rickr (Sat, 25 Aug 2018 17:01:37 GMT):
You may have found a valid bug where we not releasing the thread for event reconnects .. I'll be looking into that. Thanks

rickr (Sat, 25 Aug 2018 17:15:58 GMT):
I also changed End2endIT to add 10 bad peers and 10 bad orderers . Test needed minor modification to accept some will be bad. patch: https://ctrlv.it/id/144702/3510157026 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. hhttps://ctrlv.it/id/144701/3439087723 Something the application didn't need to worry about. You may have found a valid bug where we not releasing the thread for event reconnects .. I'll be looking into that. Thanks

rickr (Sat, 25 Aug 2018 17:15:58 GMT):
I also changed End2endIT to add 10 bad peers and 10 bad orderers . Test needed minor modification to accept some will be bad. patch: https://ctrlv.it/id/144702/3510157026 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. https://ctrlv.it/id/144701/3439087723 Something the application didn't need to worry about. You may have found a valid bug where we not releasing the thread for event reconnects .. I'll be looking into that. Thanks

rickr (Sat, 25 Aug 2018 17:15:58 GMT):
I also changed End2endIT to add 10 bad peers and 10 bad orderers . Test needed minor modification to accept some will be bad. patch: https://ctrlv.it/id/144702/3510157026 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. https://ctrlv.it/id/144701/3439087723 Something the application didn't need to worry about. You may have found a valid bug where the sdk is not releasing the thread for event reconnects .. I'll be looking into that. Thanks

rickr (Sat, 25 Aug 2018 19:09:39 GMT):
Well I constructed a channel initialized it and then went into this simple loop: ``` newChannel.initialize(); for (int i = 10 * 120; i > -1; --i) { int activeCount = Thread.activeCount(); out("Thread count is %d", activeCount); Thread.sleep(1000L * 10L); } newChannel.shutdown(true); ``` I stopped and started the peers for a while. There will always be grpc threads pooled to create the requests. I saw nothing excessive Results : https://ctrlv.it/id/144714/1405262485 So not sure how or why your getting those results

rickr (Sat, 25 Aug 2018 19:26:23 GMT):
Well I constructed a channel initialized it and then went into this simple loop: ``` newChannel.initialize(); for (int i = 10 * 120; i > -1; --i) { int activeCount = Thread.activeCount(); int threadCount = ManagementFactory.getThreadMXBean().getThreadCount(); out("Thread active count is %d, totalThreads %d", activeCount, threadCount); Thread.sleep(1000L * 10L); } newChannel.shutdown(true); ``` I stopped and started the peers for a while. There will always be grpc threads pooled to create the requests. I saw nothing excessive Results : https://ctrlv.it/id/144719/1661346673 Nothing like what you seen.

rickr (Sat, 25 Aug 2018 19:33:05 GMT):
Changed End2endIT to add 10 bad peers and 10 bad orderers . Test needed minor modification to accept some will be bad. patch: https://ctrlv.it/id/144702/3510157026 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. hhttps://ctrlv.it/id/144701/3439087723 Something the application didn't need to worry about.

rickr (Sat, 25 Aug 2018 19:33:05 GMT):
Changed End2endIT to add 10 bad peers and 10 bad orderers . Test needed minor modification to accept some will be bad. patch: https://ctrlv.it/id/144702/3510157026 Here's the results lot and lots of errors but in the end the SDK got to the two good peers and the one orderer that was connected. https://ctrlv.it/id/144701/3439087723 Something the application didn't need to worry about.

rickr (Sat, 25 Aug 2018 19:52:30 GMT):
Here is same starting stop peers .. I could tone down the rate of retries. But there is a way for applications to do that too. @albert.lacambra I don't see anything like you. I do have only 2 peers I don't think adding more would make much difference.

rickr (Sat, 25 Aug 2018 19:52:39 GMT):

Clipboard - August 25, 2018 3:52 PM

rickr (Sat, 25 Aug 2018 21:34:05 GMT):
@albert.lacambra I think I may have reproduced it. If I just do a docker stop/start on the peer I see the results I showed. The connect/reconnect takes some time so the attempts are reasonable. When it reconnects it ask for the block it last seen on the channel On a docker stop/start the ledger channel is still there and it gets the block and all is _happy path from there_. Now if I actually bring it all down destroy the containers and bring it back up the peereventing services ask for the block it last seen on the channel but the channel is no longer there . So you have `2018-08-25 21:24:27,610 grpc-default-executor-14 TRACE PeerEventServiceClient:196 - DeliverResponse channel foo peer peer1.org1.example.com resp status value:404 status NOT_FOUND, typecase STATUS` This causes a lot of failures fast. This I think is not as typical as just not being able to connect. I have to figure out to best handle. Any chance this seems what you're doing @albert.lacambra ?

kelvinzhong (Mon, 27 Aug 2018 09:15:20 GMT):
Caused by: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Could not meet endorsement policy @rickr hi rick, is this the bug you mentioned last time? endorsement required miscalculate in service discovery

kelvinzhong (Mon, 27 Aug 2018 09:17:23 GMT):
is there a functional version for java sdk now? like v1.2.1...

albert.lacambra (Mon, 27 Aug 2018 12:20:29 GMT):
That was not my case @rickr I will recheck it today

rickr (Mon, 27 Aug 2018 12:21:48 GMT):
Ok - open a JIRA with details .. including client trace. The above is the only way I saw what you described.

Krono (Mon, 27 Aug 2018 17:04:01 GMT):
Has joined the channel.

kelvinzhong (Tue, 28 Aug 2018 10:01:09 GMT):
@rickr hi rick, i found that if the application up for a while, although the discovery service would rescan at a regular time, but still there is a chance can't receive the peer event of the transaction, and I don't know why...

kelvinzhong (Tue, 28 Aug 2018 10:04:10 GMT):
like after one hour, i start a new transaction then could not receive the peer event...so there would be a timeout exception...

rickr (Tue, 28 Aug 2018 10:08:15 GMT):
Events from peers have nothing directly to do with service discovery .

rickr (Tue, 28 Aug 2018 10:12:00 GMT):
If you wait for about 10 minuntes there is a clean up process that should also report with warnings on any peer that did not report an event.

gravity (Tue, 28 Aug 2018 10:31:45 GMT):
Hello After the network upgrade to a v1.2.0, docker-compose is spamming logs with gossip messages like this: ``` peer1-test-org | 2018-08-28 10:27:54.057 UTC [gossip/discovery] sendMemResponse -> DEBU 63d3 Entering endpoint:"peer8-test-org:7051" pki_id:",\251\247\265Qo\303\256\365\004\241(U0\253\230:\244\377\347M\224mi\372>q\356\276\222\371\366" peer1-test-org | 2018-08-28 10:27:54.058 UTC [gossip/comm] Send -> DEBU 63d4 Entering, sending GossipMessage: Channel: , nonce: 0, tag: EMPTY MembershipResponse with Alive: 12, Dead: 0, Envelope: 3041 bytes, Signature: 0 bytes to 1 peers peer5-test-org | 2018-08-28 10:27:54.000 UTC [gossip/comm] Send -> DEBU 589e Entering, sending GossipMessage: tag:EMPTY alive_msg: timestamp: > , Envelope: 77 bytes, Signature: 70 bytes Secret payload: 22 bytes, Secret Signature: 70 bytes to 1 peers peer5-test-org | 2018-08-28 10:27:54.001 UTC [gossip/comm] Send -> DEBU 58a0 Entering, sending GossipMessage: tag:EMPTY alive_msg: timestamp: > , Envelope: 77 bytes, Signature: 70 bytes Secret payload: 22 bytes, Secret Signature: 70 bytes to 1 peers peer5-test-org | 2018-08-28 10:27:54.001 UTC [gossip/comm] sendToEndpoint -> DEBU 58a1 Entering, Sending to peer6-test-org:7051 , msg: GossipMessage: tag:EMPTY alive_msg: timestamp: > , Envelope: 77 bytes, Signature: 70 bytes Secret payload: 22 bytes, Secret Signature: 70 bytes peer5-test-org | 2018-08-28 10:27:54.003 UTC [gossip/comm] sendToEndpoint -> DEBU 58a2 Exiting peer5-test-org | 2018-08-28 10:27:54.000 UTC [gossip/comm] sendToEndpoint -> DEBU 589f Entering, Sending to peer9-test-org:7051 , msg: GossipMessage: tag:EMPTY alive_msg: timestamp: > , Envelope: 77 bytes, Signature: 70 bytes Secret payload: 22 bytes, Secret Signature: 70 bytes peer5-test-org | 2018-08-28 10:27:54.003 UTC [gossip/comm] sendToEndpoint -> DEBU 58a3 Exiting ``` is it possible to turn off these logs without decreasing overall debug level from debug to info?

rickr (Tue, 28 Aug 2018 10:33:24 GMT):
The default is INFO

rickr (Tue, 28 Aug 2018 10:33:50 GMT):
sorry that's the peer logs

rickr (Tue, 28 Aug 2018 10:35:25 GMT):
There are some levels in comments in the docker-compose file

rickr (Tue, 28 Aug 2018 10:36:29 GMT):
and ... please use https://ctrlv.it/ stead of posting here

rickr (Tue, 28 Aug 2018 10:36:29 GMT):
and ... please use https://ctrlv.it/ stead of posting long logs here

rickr (Tue, 28 Aug 2018 10:41:32 GMT):
Ask on #fabric-peer-endorser-committer channel .. if there is a reasonable solution please share .. really annoying

gravity (Tue, 28 Aug 2018 10:41:43 GMT):
thanks, will do

kelvinzhong (Tue, 28 Aug 2018 10:45:41 GMT):
@rickr i do found some warning in peers [gossip/discovery] expireDeadMembers -> WARN 03f Closing connection to Endpoint: 47.106.130.151:6051, InternalEndpoint: , PKI-ID: [47 78 46 242 137 89 9 177 237 79 193 194 75 64 197 3 255 115 77 16 124 221 123 254 19 182 137 186 77 159 176 39], Metadata: []

kelvinzhong (Tue, 28 Aug 2018 10:46:32 GMT):
but what should i do? or what can sdk improve?

Krono (Tue, 28 Aug 2018 10:46:33 GMT):
Hi. I'm a pretty new to this, so I hope I'm bringing this to the right place.. We tried to reference the Java SDK as dependency in an android studio project. However the compiler complains about the javax.json dependency of the sdk containing an illegal class file. And now I wonder if android support is actually in the scope of this sdk?

kelvinzhong (Tue, 28 Aug 2018 10:47:23 GMT):
set keep alive to peers?

rickr (Tue, 28 Aug 2018 10:47:24 GMT):
Don't test or try on android

rickr (Tue, 28 Aug 2018 10:48:11 GMT):
@kelvinzhong if you're running through a proxy that might help

Krono (Tue, 28 Aug 2018 10:48:30 GMT):
Well, thats unambiguous. Thanks ^^

kelvinzhong (Tue, 28 Aug 2018 10:49:26 GMT):
so this would happen because i was connected by ip directly?

kelvinzhong (Tue, 28 Aug 2018 10:51:04 GMT):
would it help if i set the keep alive properties to the peers?

kelvinzhong (Tue, 28 Aug 2018 10:55:40 GMT):
but the peer is discovered by discovery service...i could not set the keep alive properties to peers...

rickr (Tue, 28 Aug 2018 11:07:16 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.2.0_notes.md#fab-8805-jsdk-service-discovery

kelvinzhong (Tue, 28 Aug 2018 11:17:28 GMT):
the discovery service is fine, what i try to say is peer has disconnect the client, but sdk didn't try to reconnect, therefor client could not receive the peer event of the transaction

kelvinzhong (Tue, 28 Aug 2018 11:17:28 GMT):
the discovery service is fine, what i'm trying to say is the peer has disconnect the client, but sdk didn't try to reconnect, therefor client could not receive the peer event of the transaction

rickr (Tue, 28 Aug 2018 11:20:47 GMT):
Where do you know the sdk didn't try to connect ? And you asked about setting properties on the peers discovered by service discovery

kelvinzhong (Tue, 28 Aug 2018 11:59:44 GMT):
i have open the trace log in sdk, i haven't seen the reconnect log in sdk, but i found the disconnect log in peer, so i assume the sdk didn't trigger the reconnect

kelvinzhong (Tue, 28 Aug 2018 12:00:27 GMT):
i would try to reproduce this tomorrow, and look into more detail

rickr (Tue, 28 Aug 2018 14:10:47 GMT):
If you really are connecting through a proxy I would first try and get the keep alive on the connections done.

yacovm (Tue, 28 Aug 2018 23:09:47 GMT):
@kelvinzhong if you have peer communication issues you should ask in #fabric-gossip , just saying :)

rickr (Wed, 29 Aug 2018 01:26:46 GMT):
If I think it has anything to do with gossip have no worries I'll send him there, _just saying_ :)

AbhinayB (Wed, 29 Aug 2018 05:09:40 GMT):
Has joined the channel.

lucky114407 (Wed, 29 Aug 2018 10:49:55 GMT):
Has joined the channel.

rickr (Wed, 29 Aug 2018 10:56:54 GMT):
@albert.lacambra there is a 1.2.1-SNAPSHOT image / git release-1.2.1 branch can you try that

rickr (Wed, 29 Aug 2018 10:56:54 GMT):
@albert.lacambra there is a 1.2.1-SNAPSHOT image / git release-1.2.1 branch can you try that. I haven't seen you JIRA

rickr (Wed, 29 Aug 2018 10:56:54 GMT):
@albert.lacambra there is a 1.2.1-SNAPSHOT image / git release-1.2 branch can you try that. I haven't seen you JIRA

gravity (Wed, 29 Aug 2018 13:05:28 GMT):
Hi all Who knows, what this command `fabric-ca-client getcacert` actually do? Not really clear from the documentation

rickr (Wed, 29 Aug 2018 14:31:26 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java

rickr (Wed, 29 Aug 2018 14:31:36 GMT):
getcacert ?

gravity (Wed, 29 Aug 2018 14:53:22 GMT):
so this method returns certificates for identities that are registered on ca how these certificates differ from certificates in Enrollment object?

rickr (Wed, 29 Aug 2018 15:44:42 GMT):
Which class is that on

gravity (Wed, 29 Aug 2018 15:48:03 GMT):
HFCAClient#getHFCACertificates()

rickr (Wed, 29 Aug 2018 15:51:41 GMT):
I think those are the same certificates .. but that API allows you manage them. @skarim

gravity (Wed, 29 Aug 2018 15:55:54 GMT):
because I'm trying to figure out how to get the admin certificates from CA (special admin who can create the channels and install chaincode). because for now I see the only way is to load them from disk/db (like it done in End2EndIT.java) and just want to know is there any way to retrieve them from a CA?

rickr (Wed, 29 Aug 2018 16:02:53 GMT):
I don't think so. I think you should ask on #fabric-ca channel

gravity (Wed, 29 Aug 2018 16:05:02 GMT):
thanks, will ask btw, do you know any insights why it was done in this way? that we can get (enroll) any user on a CA except that special admin?

rickr (Wed, 29 Aug 2018 16:14:07 GMT):
Well for quick development environment we use cryptogen to quickly create all the cryptography artifacts. You probably wouldn't use this for a real deployment. Maybe if you had your CA running and then generated all those from it there could be a way to do what is you're wanting but I'm betting it would quite involved if it's possible.

rickr (Wed, 29 Aug 2018 16:14:07 GMT):
Well for quick development environment we use cryptogen to quickly create all the cryptographic artifacts. You probably wouldn't use this for a real deployment. Maybe if you had your CA running and then generated all those from it there could be a way to do what is you're wanting but I'm betting it would be quite involved if it's possible.

comtutor (Thu, 30 Aug 2018 00:31:33 GMT):
Has joined the channel.

comtutor (Thu, 30 Aug 2018 00:32:24 GMT):
java.lang.OutOfMemoryError

AbhinayB (Thu, 30 Aug 2018 04:21:40 GMT):
I have seen that fabric-sdk-node provides a key value store for preserving sensitive information like a user's credentials into the file system. Does fabric-sdk-java provide any such function?

albert.lacambra (Thu, 30 Aug 2018 06:19:51 GMT):
Hi @rickr

albert.lacambra (Thu, 30 Aug 2018 06:20:00 GMT):
Not have time yet to recheck it.

albert.lacambra (Thu, 30 Aug 2018 06:20:18 GMT):
Works SDK 1.2.1 with fabric 1.1?

albert.lacambra (Thu, 30 Aug 2018 08:14:55 GMT):
So @rickr

albert.lacambra (Thu, 30 Aug 2018 08:15:21 GMT):
tested with version 1.2.1-SNAPSHOT and issue is gone.

albert.lacambra (Thu, 30 Aug 2018 08:15:32 GMT):
Can you give me a hint what was the issue?

mharris (Thu, 30 Aug 2018 09:46:14 GMT):
Has joined the channel.

rickr (Thu, 30 Aug 2018 10:04:03 GMT):
no the sdk is to make requests to Fabric. Just like an HTTP client to a web server. I don't see why the SDK needs to persist anything to do that.

rickr (Thu, 30 Aug 2018 10:04:03 GMT):
@AbhinayB no the sdk is to make requests to Fabric. Just like an HTTP client to a web server. I don't see why the SDK needs to persist anything to do that.

rickr (Thu, 30 Aug 2018 10:07:29 GMT):
@albert.lacambra I fixed the issue I described to you.

donsonZhang (Thu, 30 Aug 2018 11:30:11 GMT):
the trustAnchors parameter must be non-empty

aatkddny (Fri, 31 Aug 2018 01:41:41 GMT):
This might be out of scope. or really simple. but I've been trying various combinations of values with no success so I'm stumped. I'm trying to add create a channel on a fabric network I (think) I deployed into kubernetes. The first thing of note it does is `Channel channel = client.newChannel(cd.getId(), anOrderer, channelConfiguration, signatures);` and it fails here. I'm failing ultimately on this - `Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target` I usually get round it by having a hostname override in the properties, but in this case it is not working. Security isn't my thing -

aatkddny (Fri, 31 Aug 2018 01:41:41 GMT):
This might be out of scope. or really simple. but I've been trying various combinations of values with no success so I'm stumped. I'm trying to create a channel on a fabric network I (think) I deployed into kubernetes. Standard cryptogen self generated certificate fare. The same stuff works fine in docker. The first thing of note it does is `Channel channel = client.newChannel(cd.getId(), anOrderer, channelConfiguration, signatures);` and it fails here. I'm failing ultimately on this - `Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target` I usually get round it by having a hostname override in the properties, but in this case it is not working. I know I'm hitting my orderer - I get this in the logs: `2018-08-31 01:34:52.673 UTC [grpc] Printf -> DEBU 1ae grpc: Server.Serve failed to complete security handshake from "127.0.0.1:36320": remote error: tls: internal erro`. The logs seem to indicate that when this orderer comes up it is finding all the files correctly so I'm a bit out of my depth here.

Chaos-WX (Fri, 31 Aug 2018 09:19:19 GMT):
Has joined the channel.

Chaos-WX (Fri, 31 Aug 2018 09:21:02 GMT):

mmexport1535704666542.jpg

Chaos-WX (Fri, 31 Aug 2018 09:21:32 GMT):
Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching org1.example.com found.

Chaos-WX (Fri, 31 Aug 2018 09:22:15 GMT):
What is the reason? Please help

rickr (Fri, 31 Aug 2018 11:10:08 GMT):
@aatkddny got openssl ? try openssl s_client -connect can give more verbose info on what's happening https://www.openssl.org/docs/manmaster/man1/s_client.html

rickr (Fri, 31 Aug 2018 11:16:33 GMT):
@Chaos-WX Most likely your tls server cert you're connecting does not match. If this is a development env you can use hostname override.

gravity (Fri, 31 Aug 2018 12:24:40 GMT):
Hi all If I use orderer1 to create channel1, can I add orderer2 to channel1 during channel initialization?

gravity (Fri, 31 Aug 2018 12:52:21 GMT):
btw, I'm using solo mode for orderer. or am I doing something wrong? I mean, if orderer is in solo mode, so there must be at most 1 orderer instatance, isn't it?

rickr (Fri, 31 Aug 2018 12:54:07 GMT):
There should be no reason for more than one Orderer other than for redundancy sake

gravity (Fri, 31 Aug 2018 12:58:32 GMT):
you mean for solo mode? or should it be only one orderer in kafka mode?

aatkddny (Fri, 31 Aug 2018 13:52:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sjgRcfJyXWS6C4BNF) @rickr I do - if only I understood what the errors actually meant I'd be in great shape now. :D

aatkddny (Fri, 31 Aug 2018 13:52:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sjgRcfJyXWS6C4BNF) @rickr I do - if only I actually understood what the errors actually meant and why the hostname override didn't work I'd be in great shape now. :D ```CONNECTED(00000003) depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=27:certificate not trusted verify return:1 depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=San Francisco/CN=orderer0.orderer i:/C=US/ST=California/L=San Francisco/O=orderer/CN=tlsca.orderer```

rickr (Fri, 31 Aug 2018 14:26:59 GMT):
what hostname override have you tried ?

ashutosh_kumar (Fri, 31 Aug 2018 14:33:19 GMT):
Has joined the channel.

rickr (Fri, 31 Aug 2018 14:34:53 GMT):
did you try and give openssl client the ca certificate ? I'll be honest not sure which option `-CAfile file` ?

ashutosh_kumar (Fri, 31 Aug 2018 14:37:46 GMT):
@aatkddny can you tell me which openssl command you used ?

aatkddny (Fri, 31 Aug 2018 14:38:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kt6LhBNPdRR2m5c5Z) @rickr I tried the usual - which would have been "orderer0". I also tried a bunch of other stuff, including "orderer0.orderer" and a plethora of other things that probably made no sense. It was late and I wasn't thinking straight.

rickr (Fri, 31 Aug 2018 14:39:10 GMT):
been too long ago

aatkddny (Fri, 31 Aug 2018 14:39:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JRWMF9iRDrGQEZthM) @ashutosh_kumar Direct cut and paste from Ricks post above with localhost and my NodePort opened port

ashutosh_kumar (Fri, 31 Aug 2018 14:41:48 GMT):
what error you are getting ?

ashutosh_kumar (Fri, 31 Aug 2018 14:42:20 GMT):
your screen shot above showed that you are actually connected.

rickr (Fri, 31 Aug 2018 14:45:49 GMT):
Here's what I'd do : Go back to docker where it's working and use openssl there to connect I think you'd need the CAFile

rickr (Fri, 31 Aug 2018 14:46:30 GMT):
once it's ok .. try on the other connection

aatkddny (Fri, 31 Aug 2018 14:46:30 GMT):
It shows the errors. Here's the entire output with a call with the CAFile set to server.crt ``` CONNECTED(00000003) depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=27:certificate not trusted verify return:1 depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=San Francisco/CN=orderer0.orderer i:/C=US/ST=California/L=San Francisco/O=orderer/CN=tlsca.orderer --- Server certificate -----BEGIN CERTIFICATE----- MIICTDCCAfKgAwIBAgIQRfdkj8607pFq6KvhfRrRhTAKBggqhkjOPQQDAjBkMQsw CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy YW5jaXNjbzEQMA4GA1UEChMHb3JkZXJlcjEWMBQGA1UEAxMNdGxzY2Eub3JkZXJl cjAeFw0xODA4MzAyMzM0NDBaFw0yODA4MjcyMzM0NDBaMFUxCzAJBgNVBAYTAlVT MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRkw FwYDVQQDExBvcmRlcmVyMC5vcmRlcmVyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD QgAEsppvQEHbV6ISJdJI8JatPN1A6W9qmzdRCOaMFzC/77pJTSF+TSaPeu/mPy9D b3875iQMwA5NmTNpkDjAU5KGwqOBlDCBkTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0l BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQw IoAgRKXmuWbBUQRn6iaX3UQ0LkVWqIvw9pt1r1ySCEuShe0wJQYDVR0RBB4wHIIQ b3JkZXJlcjAub3JkZXJlcoIIb3JkZXJlcjAwCgYIKoZIzj0EAwIDSAAwRQIhAL3n 4/HJldOoSXF+qiNbcoo2q8x5e39t4ZNI/qRIMBJSAiBLeB6iJUrmPhX2U1BtjOFs zUaGufKSZKywFadQAbjTDA== -----END CERTIFICATE----- subject=/C=US/ST=California/L=San Francisco/CN=orderer0.orderer issuer=/C=US/ST=California/L=San Francisco/O=orderer/CN=tlsca.orderer --- No client certificate CA names sent --- SSL handshake has read 906 bytes and written 456 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES256-GCM-SHA384 Server public key is 256 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-ECDSA-AES256-GCM-SHA384 Session-ID: Session-ID-ctx: Master-Key: A42D7AB420FEF528AA46B0B37CB50871FE95993C7EA6AADCF5BE8AADE36428004145996B8FF55A58E91AD999336FD4CD Start Time: 1535726666 Timeout : 300 (sec) Verify return code: 21 (unable to verify the first certificate) --- ```

aatkddny (Fri, 31 Aug 2018 14:46:30 GMT):
It shows the errors. Here's the entire output with a call with the CAFile set to server.crt thus: `openssl s_client -connect localhost:30001 -CAfile /opt/blockchain/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer0.orderer/tls/server.crt` ``` CONNECTED(00000003) depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=27:certificate not trusted verify return:1 depth=0 C = US, ST = California, L = San Francisco, CN = orderer0.orderer verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=San Francisco/CN=orderer0.orderer i:/C=US/ST=California/L=San Francisco/O=orderer/CN=tlsca.orderer --- Server certificate -----BEGIN CERTIFICATE----- MIICTDCCAfKgAwIBAgIQRfdkj8607pFq6KvhfRrRhTAKBggqhkjOPQQDAjBkMQsw CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy YW5jaXNjbzEQMA4GA1UEChMHb3JkZXJlcjEWMBQGA1UEAxMNdGxzY2Eub3JkZXJl cjAeFw0xODA4MzAyMzM0NDBaFw0yODA4MjcyMzM0NDBaMFUxCzAJBgNVBAYTAlVT MRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRkw FwYDVQQDExBvcmRlcmVyMC5vcmRlcmVyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD QgAEsppvQEHbV6ISJdJI8JatPN1A6W9qmzdRCOaMFzC/77pJTSF+TSaPeu/mPy9D b3875iQMwA5NmTNpkDjAU5KGwqOBlDCBkTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0l BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQw IoAgRKXmuWbBUQRn6iaX3UQ0LkVWqIvw9pt1r1ySCEuShe0wJQYDVR0RBB4wHIIQ b3JkZXJlcjAub3JkZXJlcoIIb3JkZXJlcjAwCgYIKoZIzj0EAwIDSAAwRQIhAL3n 4/HJldOoSXF+qiNbcoo2q8x5e39t4ZNI/qRIMBJSAiBLeB6iJUrmPhX2U1BtjOFs zUaGufKSZKywFadQAbjTDA== -----END CERTIFICATE----- subject=/C=US/ST=California/L=San Francisco/CN=orderer0.orderer issuer=/C=US/ST=California/L=San Francisco/O=orderer/CN=tlsca.orderer --- No client certificate CA names sent --- SSL handshake has read 906 bytes and written 456 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES256-GCM-SHA384 Server public key is 256 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-ECDSA-AES256-GCM-SHA384 Session-ID: Session-ID-ctx: Master-Key: A42D7AB420FEF528AA46B0B37CB50871FE95993C7EA6AADCF5BE8AADE36428004145996B8FF55A58E91AD999336FD4CD Start Time: 1535726666 Timeout : 300 (sec) Verify return code: 21 (unable to verify the first certificate) --- ```

rickr (Fri, 31 Aug 2018 14:52:53 GMT):
can you run that with docker and see what it returns .. for me the CN as orderer0.orderer _looks odd_

rickr (Fri, 31 Aug 2018 14:54:18 GMT):
never mind that

rickr (Fri, 31 Aug 2018 14:58:35 GMT):
You may need for the s_client -servername name for the hostname override. @ashutosh_kumar ?

aatkddny (Fri, 31 Aug 2018 14:59:28 GMT):
It's set that way due to the kubernetes not allowing `.` in something or other. The config file for the orderer is amended in the same manner. ``` OrdererOrgs: - Name: Orderer Domain: orderer Specs: - Hostname: orderer0 - Hostname: orderer1 - Hostname: orderer2 ```

ashutosh_kumar (Fri, 31 Aug 2018 15:00:13 GMT):
first , it looks like mutual TLS is on on Server and somehow client is not sending cert.

rickr (Fri, 31 Aug 2018 15:00:37 GMT):
need to step away

ashutosh_kumar (Fri, 31 Aug 2018 15:08:47 GMT):
so you have to use -cert <> to pass your client cert.

ashutosh_kumar (Fri, 31 Aug 2018 15:15:42 GMT):
and -CAfile <>

ashutosh_kumar (Fri, 31 Aug 2018 15:16:47 GMT):
you need to fabricate a pem file where you cut and paste from pem files related to CAs that you are using.

ashutosh_kumar (Fri, 31 Aug 2018 15:17:08 GMT):
hopefully this should work.

ashutosh_kumar (Fri, 31 Aug 2018 15:19:27 GMT):
your error is related to cert chain validation , not hostname.

ashutosh_kumar (Fri, 31 Aug 2018 15:19:43 GMT):
validation.

ashutosh_kumar (Fri, 31 Aug 2018 15:20:41 GMT):
this error : No client certificate CA names sent : Suggest that you need to send client cert to server.

aatkddny (Fri, 31 Aug 2018 15:22:09 GMT):
You've lost me with the client cert. I'm approaching this from what I do with regular fabric and without specialized ssl knowledge. We VPN everything we can... Cryptogen creates self signed certs. I bring up the orderer with what's in the generated .../{name}.{domain}/tls directory. To call this from the SDK requires me to set a couple of properties I use /server.crt from the same /tls directory for the PEM. I also pass a hostname override of {name}.

aatkddny (Fri, 31 Aug 2018 15:22:09 GMT):
You've lost me with the client cert. I'm approaching this from what I do with regular fabric and without specialized ssl knowledge. We VPN everything we can... Cryptogen creates self signed certs. I bring up the orderer with what's in the generated .../{name}.{domain}/tls directory. To call this from the SDK requires me to set a couple of properties I use /server.crt from the same /tls directory for the PEM. I also pass a hostname override of {name}. After that it just works. If I omit the hostname override it doesn't.

aatkddny (Fri, 31 Aug 2018 15:22:09 GMT):
You've lost me with the client cert. I'm approaching this from what I do with regular fabric and without specialized ssl knowledge. We VPN everything we can... Cryptogen creates self signed certs. I bring up the orderer with what's in the generated .../{name}.{domain}/tls directory. To call this from the SDK requires me to set a couple of properties I use /server.crt from the same /tls directory for the PEM. I also pass a hostname override of {name}. After that it just works. If I omit the hostname override it doesn't. Ok that's docker. For k8s I had to change orderer.com to orderer and anything in a name with a . to a - The thing comes up but I can't talk to it in the same way

ashutosh_kumar (Fri, 31 Aug 2018 15:23:05 GMT):
hmm.

ashutosh_kumar (Fri, 31 Aug 2018 15:24:42 GMT):
I am not familiar with java sdk code. I have to take a look to understand what you are doing from config perspective.

ashutosh_kumar (Fri, 31 Aug 2018 15:25:28 GMT):
so , when you do test from Java SDK , what error you get ?

aatkddny (Fri, 31 Aug 2018 15:27:18 GMT):
the original one i posted - Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

ashutosh_kumar (Fri, 31 Aug 2018 15:28:20 GMT):
so , openssl and java errors are almost same.

ashutosh_kumar (Fri, 31 Aug 2018 15:28:34 GMT):
your issue is related to cert config

aatkddny (Fri, 31 Aug 2018 15:28:43 GMT):
Right. So here's what I pass to the env in k8s

aatkddny (Fri, 31 Aug 2018 15:28:43 GMT):
Right. So here's what I pass to the env in k8s ``` - name: ORDERER_GENERAL_TLS_ENABLED value: "true" - name: ORDERER_GENERAL_TLS_PRIVATEKEY value: /share/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer0.orderer/tls/server.key - name: ORDERER_GENERAL_TLS_CERTIFICATE value: /share/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer0.orderer/tls/server.crt - name: ORDERER_GENERAL_TLS_ROOTCAS value: /share/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer0.orderer/tls/ca.crt ```

ashutosh_kumar (Fri, 31 Aug 2018 15:31:16 GMT):
what you have on java sdk ?

aatkddny (Fri, 31 Aug 2018 15:31:23 GMT):
It won't accept an array for `ORDERER_GENERAL_TLS_ROOTCAS` but I can't see how that affects things. The client uses `/share/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer0.orderer/tls/server.crt` as the PEM as described above. That's the same file I was using in -CAfile in the openssl calls.

aatkddny (Fri, 31 Aug 2018 15:31:23 GMT):
It won't accept an array for `ORDERER_GENERAL_TLS_ROOTCAS` but I can't see how that affects things. The java client uses `/share/generated/crypto-config/ordererOrganizations/orderer/orderers/orderer0.orderer/tls/server.crt` as the PEM as described above. That's the same file I was using in -CAfile in the openssl calls. It's passed in as a byte array in a property called "PEMBYTES"

ashutosh_kumar (Fri, 31 Aug 2018 15:33:30 GMT):
i'll be back in an hour or so.

ashutosh_kumar (Fri, 31 Aug 2018 15:33:38 GMT):
going for lunch.

aatkddny (Fri, 31 Aug 2018 15:34:07 GMT):
I'm wondering if there's a hardcoded expectation somewhere down the line in security that domain requires a `.` since that's the only real change between this and the docker version. That uses orderer.com instead of orderer and works.

ashutosh_kumar (Fri, 31 Aug 2018 15:34:10 GMT):
I'll look at Java SDK code

ashutosh_kumar (Fri, 31 Aug 2018 15:34:50 GMT):
hmm. Not sure.

ashutosh_kumar (Fri, 31 Aug 2018 15:34:59 GMT):
need to look at SDK code.

aatkddny (Fri, 31 Aug 2018 15:35:14 GMT):
This is the call - `Channel channel = client.newChannel(cd.getId(), anOrderer, channelConfiguration, signatures);`

aatkddny (Fri, 31 Aug 2018 15:35:23 GMT):
client is HFClient.

ashutosh_kumar (Fri, 31 Aug 2018 15:35:28 GMT):
ok.

ashutosh_kumar (Fri, 31 Aug 2018 15:35:34 GMT):
thanks.

rickr (Fri, 31 Aug 2018 16:30:17 GMT):
There's nothing in the SDK code that checks or does anything with a `dot`

rickr (Fri, 31 Aug 2018 19:08:24 GMT):
@aatkddny I just found this looking at another issue ... maybe see if it's helps you ... when start the java vm add this property : ` -Djavax.net.debug=all` .. but please don't hold me to know what it puts out .. your on your own :)

aatkddny (Fri, 31 Aug 2018 19:51:40 GMT):
debug=ssl does just the ssl stuff - but it's not actually printing anything extra at this point for some reason. I tried it last night. But I do appreciate the thought though.

aatkddny (Fri, 31 Aug 2018 19:51:40 GMT):
`-Djavax.net.debug=debug=ssl` does just the ssl stuff. I tried it last night. The problem is that it doesn't actually put out anything more than the regular version does in this case - it never gets far enough into it for all the additional logging to trigger. But I do appreciate the thought though. A little more googling this afternoon and it looks like there's a CA with a set of certificates inside the k8s cluster somewhere that needs to be appeased (or integrated). Personally I prefer appeased. Since it's part of the security voodoo that means I'll probably have to sacrifice a goat or a chicken at a crossroads at the next full moon to get it all squared away. On a happier note if I turn off TLS I *can* hit the orderer and it does what it's supposed to, so for purposes of what I'm actually trying to do - which is duplicate my docker network inside kubernetes so I can extend it to multiple servers - I think I'll run the whole thing without TLS until such time as it all is running happily in there and revisit it then. @rickr @ashutosh_kumar - thanks for the assist.

aatkddny (Fri, 31 Aug 2018 19:51:40 GMT):
`-Djavax.net.debug=debug=ssl` does just the ssl stuff. I tried it last night. The problem is that it doesn't actually put out anything more than the regular version does in this case - it never gets far enough into it for all the additional logging to trigger. But I do appreciate the thought though. A little more googling this afternoon and it looks like there's a CA with a set of certificates inside the k8s cluster somewhere that needs to be appeased (or integrated). Personally I prefer appeased. Since it's part of the security voodoo that means I'll probably have to sacrifice a goat or a chicken at a crossroads at the next full moon to get it all squared away. On a happier note if I turn off TLS I *can* hit the orderer and it does what it's supposed to, so for purposes of what I'm actually trying to do - which is duplicate my docker network inside kubernetes so I can extend it to multiple servers - I think I'll run the whole thing without TLS until such time as it all is running happily in there and revisit it then. @rickr @ashutosh_kumar - thanks for the assist.

aatkddny (Fri, 31 Aug 2018 19:51:40 GMT):
`-Djavax.net.debug=ssl` does just the ssl stuff. I tried it last night. The problem is that it doesn't actually put out anything more than the regular version does in this case - it never gets far enough into it for all the additional logging to trigger. But I do appreciate the thought though. A little more googling this afternoon and it looks like there's a CA with a set of certificates inside the k8s cluster somewhere that needs to be appeased (or integrated). Personally I prefer appeased. Since it's part of the security voodoo that means I'll probably have to sacrifice a goat or a chicken at a crossroads at the next full moon to get it all squared away. On a happier note if I turn off TLS I *can* hit the orderer and it does what it's supposed to, so for purposes of what I'm actually trying to do - which is duplicate my docker network inside kubernetes so I can extend it to multiple servers - I think I'll run the whole thing without TLS until such time as it all is running happily in there and revisit it then. @rickr @ashutosh_kumar - thanks for the assist.

aatkddny (Fri, 31 Aug 2018 20:52:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qw9Cu2rFphBtZMWHi) I know. I meant in the SSL code itself. Straw clutching. See my post above for what I think is really happening.

jpgalmeida (Sat, 01 Sep 2018 09:14:10 GMT):
Hello, is there any way I can set the amount of transactions per block when proposing a transaction? Thanks

rickr (Sat, 01 Sep 2018 12:48:28 GMT):
No. There are settings on the channel config block that can alter the `batch` size.

albert.lacambra (Sat, 01 Sep 2018 16:12:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fygtaTN5LEJXQ2Aag) @rickr Ok, I suppose no need for jira ticket then

albert.lacambra (Sat, 01 Sep 2018 16:19:45 GMT):
@rickr I am making some polcies test with the sdk and I do not get valid endorsments when the identity on the policy is not send to member

albert.lacambra (Sat, 01 Sep 2018 16:19:51 GMT):
so admin and peer does not work

albert.lacambra (Sat, 01 Sep 2018 16:20:07 GMT):
there is some limitation in the sdk policies?

dharuq (Sat, 01 Sep 2018 16:35:27 GMT):
Hi! in the sdk is anyway to know how many transactions are done per second?

rickr (Sat, 01 Sep 2018 18:11:13 GMT):
The SDK does not track any performance measurements.

rickr (Sat, 01 Sep 2018 18:14:26 GMT):
@albert.lacambra I'm not sure I follow. I have an example of endorsement testing as an application. It _may_ need updating for the latest crypto artifacts but by commenting out sections of the code it shows endorsements being enforced https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Sat, 01 Sep 2018 18:14:26 GMT):
@albert.lacambra I'm not sure I follow. I have an example of endorsement testing as an application. It _may_ need updating for the latest crypto artifacts but by commenting out sections of the code it shows endorsements being enforced https://github.com/cr22rc/fabricSDKJavaMultiDomainSample ... https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/cd7a114cebd48ff50b6ec14e47d62cf79bda9d3d/src/main/java/org/cr22rc/MultiDomainSample.java#L541 Follow that code thoroughly :)

rickr (Sat, 01 Sep 2018 18:14:26 GMT):
@albert.lacambra I'm not sure I follow. I have an example of endorsement testing as an application. It _may_ need updating for the latest crypto artifacts but by commenting out sections of the code it shows endorsements being enforced https://github.com/cr22rc/fabricSDKJavaMultiDomainSample ... https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/cd7a114cebd48ff50b6ec14e47d62cf79bda9d3d/src/main/java/org/cr22rc/MultiDomainSample.java#L541-L548 Follow that code thoroughly :)

rickr (Sat, 01 Sep 2018 18:26:53 GMT):
Also a common misconception is that endorsements rules are *NOT* who is creating and signing the proposal (user in user context) but who is endorsing that proposal ( the Peer)

rickr (Sat, 01 Sep 2018 18:26:53 GMT):
Also a common misconception is that endorsements rules are *NOT* who is creating and signing the proposal (user in user context) but who is endorsing that proposal ( the Peers)

albert.lacambra (Sat, 01 Sep 2018 19:17:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zrAFQzwbF57XoLJhY) @rickr that means that role.admin and role.member is not about the user context but the peer? How do I indicate that a peer is a member or an admin? what does it menas then role.peer and role.client? I am quaite lost now :S

donsonZhang (Mon, 03 Sep 2018 04:32:33 GMT):
fabric sdk java release-1.2:

donsonZhang (Mon, 03 Sep 2018 04:32:36 GMT):
12:30:45,008 WARN PeerEventServiceClient:280 - Received error on peer eventing service on channel mychannel, peer peer1.org1.example.com:7051, url grpcs://peer1.org1.example.com:7051, attempts 1. UNAVAILABLE: Unable to resolve host peer1.org1.example.com 12:30:45,229 WARN PeerEventServiceClient:280 - Received error on peer eventing service on channel mychannel, peer peer0.org1.example.com:7051, url grpcs://peer0.org1.example.com:7051, attempts 1. UNAVAILABLE: Unable to resolve host peer0.org1.example.com 12:31:11,065 WARN PeerEventServiceClient:280 - Received error on peer eventing service on channel mychannel, peer peer1.org1.example.com:7051, url grpcs://peer1.org1.example.com:7051, attempts 51. UNAVAILABLE: Unable to resolve host peer1.org1.example.com 12:31:11,503 WARN PeerEventServiceClient:280 - Received error on peer eventing service on channel mychannel, peer peer0.org1.example.com:7051, url grpcs://peer0.org1.example.com:7051, attempts 51. UNAVAILABLE: Unable to resolve host peer0.org1.example.com 12:31:37,147 WARN PeerEventServiceClient:280 - Received error on peer eventing service on channel mychannel, peer peer1.org1.example.com:7051, url grpcs://peer1.org1.example.com:7051, attempts 101. UNAVAILABLE: Unable to resolve host peer1.org1.example.com 12:31:37,919 WARN PeerEventServiceClient:280 - Received error on peer eventing service on channel mychannel, peer peer0.org1.example.com:7051, url grpcs://peer0.org1.example.com:7051, attempts 101. UNAVAILABLE: Unable to resolve host peer0.org1.example.com

donsonZhang (Mon, 03 Sep 2018 04:33:18 GMT):
what's the reason?

donsonZhang (Mon, 03 Sep 2018 04:35:43 GMT):
and then occurs the err:

donsonZhang (Mon, 03 Sep 2018 04:35:46 GMT):
Exception in thread "pool-5-thread-1" java.lang.NullPointerException at org.hyperledger.fabric.sdk.PeerEventServiceClient.(PeerEventServiceClient.java:85) at org.hyperledger.fabric.sdk.Peer$1.reconnect(Peer.java:386) at org.hyperledger.fabric.sdk.Peer$2.disconnected(Peer.java:509) at org.hyperledger.fabric.sdk.Peer.lambda$reconnectPeerEventServiceClient$2(Peer.java:353) at org.hyperledger.fabric.sdk.Peer$$Lambda$18/1730515120.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

donsonZhang (Mon, 03 Sep 2018 04:37:23 GMT):
for test the ServiceDiscoveryIT

demonkm (Mon, 03 Sep 2018 09:27:33 GMT):
Has joined the channel.

vijay5378 (Mon, 03 Sep 2018 11:33:49 GMT):
Hi...IS there a difference between `peer channel fetch config config_block.pb -o orderer.example.com:7050 -c $CHANNEL_NAME --tls --cafile $ORDERER_CA` and using `channel.getChannelConfigurationBytes();```` When the CLI is used, a config_block.pb is generated and is easily decoded by configtxlator. However, when the java code is used and sent to configtxlator's rest api, I get an error: *proto: bad wiretype for field common.Block.Header: got wiretype 0, want 2* ```

vijay5378 (Mon, 03 Sep 2018 11:33:49 GMT):
Hi...IS there a difference between `peer channel fetch config config_block.pb -o orderer.example.com:7050 -c $CHANNEL_NAME --tls --cafile $ORDERER_CA` and using `channel.getChannelConfigurationBytes();` When the CLI is used, a config_block.pb is generated and is easily decoded by configtxlator. However, when the java code is used and sent to configtxlator's rest api, I get an error: *proto: bad wiretype for field common.Block.Header: got wiretype 0, want 2*

aatkddny (Tue, 04 Sep 2018 00:16:09 GMT):
Strange message response - or it seems strange to me at least. This `failed to invoke chaincode name:"lscc" , error: API error (404): network dcn not found` in here ``` failed to execute transaction 713becce7a62a192b2d12ce2989370df00b5871cd10bd42db381fe9422f7b156 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:173 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:287 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:501 github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:923 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1148 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 ``` turns into this ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) ~[fabric-sdk-java-1.2.0.jar:na] ``` Ok so I have some issue with my docker-in-docker setup - like

aatkddny (Tue, 04 Sep 2018 00:16:09 GMT):
Strange message response - or it seems strange to me at least. This `failed to invoke chaincode name:"lscc" , error: API error (404): network dcn not found` in here ``` failed to execute transaction 713becce7a62a192b2d12ce2989370df00b5871cd10bd42db381fe9422f7b156 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute ... blah blah bla tl;dr /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 ``` turns into this ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) ~[fabric-sdk-java-1.2.0.jar:na] ``` Ok so I have some issue with this setup. Which doesn't surprise me because this whole go and shove fabric into kubernetes deal is a giant rabbit hole, but I don't see anything saying there's an issue with security per se.

aatkddny (Tue, 04 Sep 2018 00:16:09 GMT):
Strange message response - or it seems strange to me at least. This `failed to invoke chaincode name:"lscc" , error: API error (404): network dcn not found` in here ``` failed to execute transaction 713becce7a62a192b2d12ce2989370df00b5871cd10bd42db381fe9422f7b156 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute ... blah blah bla tl;dr /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 ``` turns into this ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) ~[fabric-sdk-java-1.2.0.jar:na] ``` Ok so I have some issue with this setup. Getting this ```DEBU 41b start container: aacc:1.0 2018-09-04 00:07:55.150 UTC [chaincode] Start -> DEBU 41c start container with args: chaincode -peer.address=10.1.1.16:7052``` to appear was a major step forward. Which doesn't surprise me because this whole go and shove fabric into kubernetes deal is a giant rabbit hole, but I don't see anything saying there's an issue with security per se.

aatkddny (Tue, 04 Sep 2018 00:16:09 GMT):
Strange message response - or it seems strange to me at least. This `failed to invoke chaincode name:"lscc" , error: API error (404): network dcn not found` in here ``` failed to execute transaction 713becce7a62a192b2d12ce2989370df00b5871cd10bd42db381fe9422f7b156 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute ... blah blah bla tl;dr /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 ``` turns into this ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) ~[fabric-sdk-java-1.2.0.jar:na] ``` Ok so I have some issue with this setup. Getting this ```DEBU 41b start container: aacc:1.0 2018-09-04 00:07:55.150 UTC [chaincode] Start -> DEBU 41c start container with args: chaincode -peer.address=10.1.1.16:7052``` to appear was a major step forward. Which doesn't surprise me because this whole go and shove fabric into kubernetes deal is a giant rabbit hole, but I don't see anything saying there's an issue with security per se.

aatkddny (Tue, 04 Sep 2018 00:16:09 GMT):
Strange message response - or it seems strange to me at least. Trying to install some CC. The error in the peer comes out as `failed to invoke chaincode name:"lscc" , error: API error (404): network dcn not found` in here ``` failed to execute transaction 713becce7a62a192b2d12ce2989370df00b5871cd10bd42db381fe9422f7b156 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:181 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute ... blah blah bla tl;dr /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 ``` but by the time it has percolated back to my java code, it turns into this ``` verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) ~[fabric-sdk-java-1.2.0.jar:na] ``` Leaving aside my travails, is this an expected response? I'd have thought to see something that more closely mirrors the errors from the peer.

mrudav.shukla (Tue, 04 Sep 2018 09:29:59 GMT):
Has joined the channel.

indira.kalagara (Tue, 04 Sep 2018 10:29:02 GMT):
Has joined the channel.

mrudav.shukla (Tue, 04 Sep 2018 11:11:22 GMT):
Hi, I have a functional application that uses Hyperledger Composer to interact with MultiOrg Fabric network. However, I want to start using java sdk for this application. I've tried searching references that could help me getting started. I found few of them that helped me understand the functions that SDK offers but not more than that. Is there any reference available that can help me understand this in a better way?

rickr (Tue, 04 Sep 2018 11:43:06 GMT):
@donsonZhang your getting back connettions to peer1.org1.example.com do you have a peer like that ?

rickr (Tue, 04 Sep 2018 11:45:13 GMT):
@vijay5378 I'm not sure what it is that returns. There is an example of updating the config block with https://github.com/hyperledger/fabric-sdk-java/blob/b649868113e969d851720c972f660114b64247bc/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java

rickr (Tue, 04 Sep 2018 11:48:06 GMT):
@mrudav.shukla https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario

vijay5378 (Tue, 04 Sep 2018 11:55:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JTZguisMmc4x8YuoA) @rickr Thanks @rickr. There seems to be a slight confusion here. Data obtained from channel.getChannelConfigurationBytes(); needs to be submitted to /protolator/decode/common.Config and not to /protolator/decode/common.Block (This is what the doc mentions). CHanged it to common.Config and runs well :-)

donsonZhang (Wed, 05 Sep 2018 02:54:39 GMT):
@rickr I have the following peers :peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com

mrudav.shukla (Wed, 05 Sep 2018 07:38:54 GMT):
Thanks @rickr , I'll try and let you know how it goes.

ZaheerUdDeen (Wed, 05 Sep 2018 09:19:01 GMT):
Has joined the channel.

ZaheerUdDeen (Wed, 05 Sep 2018 09:19:08 GMT):
https://github.com/hyperledger/fabric-sdk-java where I can find the documentaton for this java skd ?

zshwei (Wed, 05 Sep 2018 09:40:13 GMT):
Has joined the channel.

ZaheerUdDeen (Wed, 05 Sep 2018 10:11:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Z2n75dvycwxxJmATE) @rickr https://github.com/hyperledger/fabric-sdk-java where I can find the documentaton for this java skd ?

rickr (Wed, 05 Sep 2018 11:26:02 GMT):
You have Javadoc and the integration examples.

rickr (Wed, 05 Sep 2018 11:26:42 GMT):
@donsonZhang from your client can you telnet to them ?

donsonZhang (Wed, 05 Sep 2018 11:45:13 GMT):
@rickr cann't telnet peer0.org1.example.com:7051 ,but can telnet the peer0's ip:port

donsonZhang (Wed, 05 Sep 2018 11:46:26 GMT):
and i think the peer0.org1.example.com just the peer name, the client should communicate with blockchain use the peer ip

donsonZhang (Wed, 05 Sep 2018 11:47:31 GMT):
because the client cann't resovle the peer name: peer0.org1.example.com:7051

donsonZhang (Wed, 05 Sep 2018 11:51:31 GMT):
2018-09-05 19:49:16 [ main:8046 ] - [ INFO ] org.hyperledger.fabric.sdk.ServiceDiscovery.networkDiscovery(ServiceDiscovery.java:222) Channel mychannel doing discovery with peer: Peer peer1.org1.example.com url: grpcs://10.9.130.56:8051 九月 05, 2018 7:49:18 下午 io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError 警告: [io.grpc.internal.ManagedChannelImpl-13] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer1.org1.example.com, cause=java.net.UnknownHostException: peer1.org1.example.com at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302) at java.net.InetAddress.getAllByName0(InetAddress.java:1255) at java.net.InetAddress.getAllByName(InetAddress.java:1171) at java.net.InetAddress.getAllByName(InetAddress.java:1105) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) } 2018-09-05 19:49:19 [ grpc-default-executor-1:10702 ] - [ WARN ] org.hyperledger.fabric.sdk.PeerEventServiceClient$1.onError(PeerEventServiceClient.java:280) Received error on peer eventing service on channel mychannel, peer peer1.org1.example.com:7051, url grpcs://peer1.org1.example.com:7051, attempts 1. UNAVAILABLE: Unable to resolve host peer1.org1.example.com 九月 05, 2018 7:49:19 下午 io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError 警告: [io.grpc.internal.ManagedChannelImpl-29] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer1.org1.example.com, cause=java.net.UnknownHostException: peer1.org1.example.com at java.net.InetAddress.getAllByName0(InetAddress.java:1259) at java.net.InetAddress.getAllByName(InetAddress.java:1171) at java.net.InetAddress.getAllByName(InetAddress.java:1105) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) }

rickr (Wed, 05 Sep 2018 12:03:41 GMT):
right there there is now peer that resoloves at peer1.org1.example.com

rickr (Wed, 05 Sep 2018 12:03:41 GMT):
right there there is no peer that resoloves at peer1.org1.example.com

rickr (Wed, 05 Sep 2018 12:05:03 GMT):
@yacovm Can you give instructions on how we can see what service discovery is returning with the peer client ?

yacovm (Wed, 05 Sep 2018 12:06:16 GMT):
it's in the logs....

yacovm (Wed, 05 Sep 2018 12:06:24 GMT):
it logs them in INFO

aatkddny (Wed, 05 Sep 2018 15:42:02 GMT):
Yuck. I'm not sure if this is the SDK or the Peer or me. Stand up a fabric network. Create a channel. Life is good. Stop and restart the peers. They come up. So far so good. Try to rejoin the previously created channel. Not so good. Channel rejoin code is the same as the reconstruct logic - join peers to channel object and do an initialize. SDK throws an access denied exception - `Sending proposal to peer1-org failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [channel] creator org [msp], cause=null}` - msp and channel here are redacted but correct. Peer throws this `2018-09-05 15:04:30.479 UTC [protoutils] ValidateProposalMessage -> WARN 15d7 channel [channel]: MSP error: channel doesn't exist` before all hell breaks loose (it starts throwing hundreds of peer event errors). Channel was created just fine. I can see it in my orderer logs - here's two that seem pertinent - start and (as far as I can tell) end of the create `2018-09-05 13:48:46.112 UTC [orderer/common/msgprocessor] ProcessConfigUpdateMsg -> DEBU 13f Processing channel create tx for channel channel on system channel genesischannel` `2018-09-05 13:48:47.012 UTC [orderer/consensus/kafka] processConnect -> DEBU 47e [channel: ibm-block-channel] It's a connect message - ignoring` TLS is off. Crypto is unchanged between restarts. Peer storage persists and was untouched. Do I need to join the channel differently in the case of a peer restart like this or is there some issue?

aatkddny (Wed, 05 Sep 2018 15:42:02 GMT):
Yuck. I'm not sure if this is the SDK or the Peer or me. Stand up a fabric network. Create a channel. Life is good. Stop and restart the peers. They come up. So far so good. Try to rejoin the previously created channel. Not so good. Channel rejoin code is the same as the reconstruct logic - join peers to channel object and do an initialize. SDK throws an access denied exception - `Sending proposal to peer1-org failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [channel] creator org [msp], cause=null}` - msp and channel here are redacted but correct. Peer throws this `2018-09-05 15:04:30.479 UTC [protoutils] ValidateProposalMessage -> WARN 15d7 channel [channel]: MSP error: channel doesn't exist` before all hell breaks loose (it starts throwing hundreds of peer event errors). Channel was created just fine. I can see it in my orderer logs - here's two that seem pertinent - start and (as far as I can tell) end of the create `2018-09-05 13:48:46.112 UTC [orderer/common/msgprocessor] ProcessConfigUpdateMsg -> DEBU 13f Processing channel create tx for channel channel on system channel genesischannel` `2018-09-05 13:48:47.012 UTC [orderer/consensus/kafka] processConnect -> DEBU 47e [channel: ibm-block-channel] It's a connect message - ignoring` TLS is off. Crypto is unchanged between restarts. Peer storage persists and was untouched. Couchdb (which also restarted) storage persists and was untouched. Do I need to join the channel differently in the case of a peer restart like this or is there some issue?

aatkddny (Wed, 05 Sep 2018 15:42:02 GMT):
Yuck. I'm not sure if this is the SDK or the Peer or me. Stand up a fabric network. Create a channel. Life is good. Stop and restart the peers. They come up. So far so good. Try to rejoin the previously created channel. Not so good. Channel rejoin code is the same as the reconstruct logic - join peers to channel object and do an initialize. SDK throws an access denied exception - `Sending proposal to peer1-org failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [channel] creator org [msp], cause=null}` - msp and channel here are redacted but correct. Peer throws this `2018-09-05 15:04:30.479 UTC [protoutils] ValidateProposalMessage -> WARN 15d7 channel [channel]: MSP error: channel doesn't exist` before all hell breaks loose (it starts throwing hundreds of peer event errors). Channel was created just fine. I can see it in my orderer logs - here's two that seem pertinent - start and (as far as I can tell) end of the create `2018-09-05 13:48:46.112 UTC [orderer/common/msgprocessor] ProcessConfigUpdateMsg -> DEBU 13f Processing channel create tx for channel channel on system channel genesischannel` `2018-09-05 13:48:47.012 UTC [orderer/consensus/kafka] processConnect -> DEBU 47e [channel: channel] It's a connect message - ignoring` TLS is off. Crypto is unchanged between restarts. Peer storage persists and was untouched. Couchdb (which also restarted) storage persists and was untouched. Do I need to join the channel differently in the case of a peer restart like this or is there some issue?

aatkddny (Wed, 05 Sep 2018 15:42:02 GMT):
Yuck. I'm not sure if this is the SDK or the Peer or me. Stand up a fabric network. Create a channel. Life is good. Stop and restart the peers. They come up. So far so good. Try to rejoin the previously created channel. Not so good. Channel rejoin code is the same as the reconstruct logic - join peers to channel object and do an initialize. SDK throws an access denied exception - `Sending proposal to peer1-org failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [channel] creator org [msp], cause=null}` - msp and channel here are redacted but correct. Peer throws this `2018-09-05 15:04:30.479 UTC [protoutils] ValidateProposalMessage -> WARN 15d7 channel [channel]: MSP error: channel doesn't exist` before all hell breaks loose (it starts throwing hundreds of peer event errors). Channel was created just fine. I can see it in my orderer logs - here's two that seem pertinent - start and (as far as I can tell) end of the create `2018-09-05 13:48:46.112 UTC [orderer/common/msgprocessor] ProcessConfigUpdateMsg -> DEBU 13f Processing channel create tx for channel channel on system channel genesischannel` `2018-09-05 13:48:47.012 UTC [orderer/consensus/kafka] processConnect -> DEBU 47e [channel: channel] It's a connect message - ignoring` TLS is off. Crypto is unchanged between restarts. Peer storage is container local in this case. Couchdb (which also restarted) storage persists and was untouched. Do I need to join the channel differently in the case of a peer restart like this or is there some issue because the ledger was recreated? I *thought* it would just pull the info from another peer.

kisna (Wed, 05 Sep 2018 16:31:39 GMT):
Has joined the channel.

kisna (Wed, 05 Sep 2018 16:33:36 GMT):
how come, I don't see a Java SDK using Java chaincode examples within fabric-sdk-java/src/test/fixture/sdkintegration? A google search also returns no Java chaincode deployment examples using installProposalRequest.setChaincodeInputStream(Util.generateTarGzInputStream( (Paths.get(TEST_FIXTURES_PATH, CHAIN_CODE_FILEPATH).toFile()), "src"))

kisna (Wed, 05 Sep 2018 16:42:07 GMT):
@rickr

rickr (Wed, 05 Sep 2018 16:59:03 GMT):
All the End2end*IT use chaincode both Go and Node

rickr (Wed, 05 Sep 2018 16:59:03 GMT):
All the End2end*IT use chaincode both Go and Node Maybe better than using Google try and actually get the code working and follow in a debugger.

rickr (Wed, 05 Sep 2018 17:04:13 GMT):
@aatkddny if the actual fabric channel hasn't been destroyed .. you wouldn't join the peer to it again .. or am I misunderstanding your scenario ? In the SDK just add the peer to the channel.. not join it.

kisna (Wed, 05 Sep 2018 17:14:26 GMT):
@rickr don't see a Java SDK using *Java chaincode* examples

kisna (Wed, 05 Sep 2018 17:14:43 GMT):
:)

kisna (Wed, 05 Sep 2018 17:14:53 GMT):
not Go, not Node chaincodes

kisna (Wed, 05 Sep 2018 17:15:31 GMT):
and why wouldn't Google also return zero results using *Java SDK* using *Java Chaincode*?

kisna (Wed, 05 Sep 2018 17:15:49 GMT):
sorry, why Would*

aatkddny (Wed, 05 Sep 2018 17:34:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZQtYLTYe9e48CgXHE) @rickr I'm not too bright. I'm testing using a different containerization setup and all my peers were misconfigured with transient ledgers. They were all pulled out at the same time so there's no way I can see to reconstitute world state. I was trying to

aatkddny (Wed, 05 Sep 2018 17:34:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZQtYLTYe9e48CgXHE) @rickr I'm not too bright. I'm testing using a different containerization setup and all my peers were misconfigured to have transient ledgers. Forgot a mount. The peers were all pulled out at the same time to try a slightly different configuration. Transient ledgers in all mean there's no way I can see to reconstitute world state, so that was likely the cause. And I was adding the peers - I wasn't precise enough in my language. The code is a direct port of the reconstruct in whichever End2End test I found it. I deleted the original post before seeing this response. I'll retry with persistent ledger storage and hopefully that'll fix the problem.

kisna (Wed, 05 Sep 2018 17:59:49 GMT):
Hmm, I updated the End2endIT to use Java chain code and get *"Java chaincode is work-in-progress and disabled"* Am I missing something @merrickread

merrickread (Wed, 05 Sep 2018 17:59:50 GMT):
Has joined the channel.

kisna (Wed, 05 Sep 2018 18:00:03 GMT):
@rickr

aatkddny (Wed, 05 Sep 2018 18:02:13 GMT):
Chaincode in java is slated for 1.3

aatkddny (Wed, 05 Sep 2018 18:02:13 GMT):
Chaincode in java is slated for 1.3 per this: https://jira.hyperledger.org/browse/FAB-8063

kisna (Wed, 05 Sep 2018 18:03:50 GMT):
yikes, got it, looks like I was using 1.2.1-SNAPSHOT

kisna (Wed, 05 Sep 2018 18:03:58 GMT):
fabric-sdk-java

yacovm (Wed, 05 Sep 2018 18:04:13 GMT):
@kisna stay tuned for v1.3

yacovm (Wed, 05 Sep 2018 18:04:19 GMT):
it'll be activated

kisna (Wed, 05 Sep 2018 18:04:20 GMT):
thanks so much @aatkddny it is much clear now, wish it was added to the github pages :)

yacovm (Wed, 05 Sep 2018 18:04:36 GMT):
and you could write chaincode in java

kisna (Wed, 05 Sep 2018 18:04:44 GMT):
can I use a 1.3 snapshot?

yacovm (Wed, 05 Sep 2018 18:04:45 GMT):
:nauseated_face:

yacovm (Wed, 05 Sep 2018 18:04:59 GMT):
you can try to clone latest master

yacovm (Wed, 05 Sep 2018 18:05:02 GMT):
https://github.com/hyperledger/fabric

yacovm (Wed, 05 Sep 2018 18:05:14 GMT):
ask @gennadyl

gennadyl (Wed, 05 Sep 2018 18:05:15 GMT):
Has joined the channel.

yacovm (Wed, 05 Sep 2018 18:05:17 GMT):
he should know

yacovm (Wed, 05 Sep 2018 18:05:37 GMT):
@gennadyl - how can @kisna play with java chaincode?

kisna (Wed, 05 Sep 2018 18:05:57 GMT):
using SDK, programatically :)

kisna (Wed, 05 Sep 2018 18:06:23 GMT):
not using peer install or APIs or cloud infra

kisna (Wed, 05 Sep 2018 18:40:59 GMT):
Hmm, why do I see some snippets in 0.6 ` DeployRequest request = new DeployRequest(); // Setting path to the chaincode: request.setChaincodePath(System.getenv("GOPATH")+"/src/github.com/hyperledger/fabric/examples/chaincode/java/Example"); // Setting chaincde arguments request.setArgs(new ArrayList<>(Arrays.asList("init", "a", "700", "b", "20000"))); // Using a particular member (User1) of an organization (bank_a) to deploy the chaincode Member member = getMember("User1", "bank_a"); request.setChaincodeName("myccj"); request.setChaincodeLanguage(ChaincodeLanguage.JAVA); return member.deploy(request); `

kisna (Wed, 05 Sep 2018 18:41:19 GMT):
to deploy Java chaincode

kisna (Wed, 05 Sep 2018 18:42:29 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdk/PeerClientTest.java what about this, ok, I am confused now @gennadyl @yacovm

silliman (Wed, 05 Sep 2018 19:09:41 GMT):
@kisna java chaincode was available in Fabric v0.6 but Fabric v1.x was a major rewrite with significant architectural differences from v0.6. As a result, java chaincode was removed from v1.x because it was not deemed production-ready by the release managers. It looks as if now it will return for Fabric v1.3.

mrkiouak (Wed, 05 Sep 2018 20:59:47 GMT):
Has joined the channel.

mrkiouak (Wed, 05 Sep 2018 21:04:57 GMT):
I'm looking for someone who can hep identify why I am seeing: ``` qtp206142037-18] ERROR org.hyperledger.fabric.sdk.ProposalResponse - verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found ... Caused by: java.security.NoSuchAlgorithmException: no such algorithm: X.509 for provider SunPCSC ``` when I have added BouncyCastle as a provider via java.security.Security.addProvider. AFAICT its related to the loop mechanism here: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L225 and the fact that an exhaustive search is done with providers, and if any throw an exception, the exception is rethrown, rather than an exception being rethrown IFF no providers are able to verify the X.509

mrkiouak (Wed, 05 Sep 2018 21:09:03 GMT):
alternatively, i'd be happy to extend TransactionRequest and provide a doVerify() {return false;}, but https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3410 only accepts QueryByChaincodeRequest, which extends TransactionRequest, doesn't allow doVerify config, and has a private constructor, preventing further extension.

MikeEmery (Wed, 05 Sep 2018 21:16:38 GMT):
@mrkiouak I've run into that as well, the cause appears to be a chaincode exception resulting in an empty endorser certificate PEM (since the request wasn't endorsed). Seems like the SDK should be checking before attempting to read the certificate

MikeEmery (Wed, 05 Sep 2018 21:17:09 GMT):
I was only getting those on CC calls that failed with an error of some kind

rickr (Wed, 05 Sep 2018 21:18:16 GMT):
I think that _should_ be fixed with 1.2.1-SNAPSHOT.

mrkiouak (Wed, 05 Sep 2018 21:18:54 GMT):
i see, thanks both, let me give snapshot a go

mrkiouak (Wed, 05 Sep 2018 21:24:46 GMT):
OOC, does 1.3.0-SNAPSHOT also have this improved error logging?

rickr (Wed, 05 Sep 2018 21:25:54 GMT):
Don't have access at the moment if it got merged there. ...

mrkiouak (Wed, 05 Sep 2018 21:36:27 GMT):
how do i check out 1.2.1-SNAPSHOT (it doesn't appear to be in public repos). a `mvn install` from master gives 1.3.0-SNAPSHOT, but I don't see any tags or branches that jump out to me as the 1.2.1-SNAP

mrkiouak (Wed, 05 Sep 2018 21:38:57 GMT):
ah, apologies, checking out and installing the release-1.2 branch did it

mrkiouak (Wed, 05 Sep 2018 21:39:28 GMT):
(the error does not appear with 1.3.0-SNAPSHOT, but neither does any other loggign with my current settings and its an apparent call failed)

mrkiouak (Wed, 05 Sep 2018 21:44:16 GMT):
same new behavior with 1.2.1. If you happen to be able to point me at the gerrit CR, this would help me figure out ways to work the issue i'm facing

mrkiouak (Wed, 05 Sep 2018 21:51:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7kwrFQftqapJRfY7r) @MikeEmery thanks, I was able to find some more info in peer logs as well....

mrkiouak (Wed, 05 Sep 2018 21:51:21 GMT):
@MikeEmery thanks, I was able to find some more info in peer logs as well....

mrkiouak (Wed, 05 Sep 2018 21:51:21 GMT):
@MikeEmery thanks, I was able to find some more info in peer logs as well....

puilp0502 (Thu, 06 Sep 2018 05:56:24 GMT):
hello, is there any way to retrieve CA server's root certificate from fabric-ca SDK?

Subhankar 3 (Thu, 06 Sep 2018 05:58:39 GMT):
Has joined the channel.

ZaheerUdDeen (Thu, 06 Sep 2018 08:05:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=E5Himtxr7C6BWvyke) @rickr Like Node.js sdk has alot of good example and guidance materials, does java sdk has the same ? secondly can we work with javasdk along with chaincode generated using hyperledger composer provided by IBM ?

rickr (Thu, 06 Sep 2018 10:43:36 GMT):
No one has volunteered to do any guidance materials for the java sdk. You should be able to invoke any chaincode.

rickr (Thu, 06 Sep 2018 10:47:00 GMT):
@puilp0502 not sure. There is https://github.com/hyperledger/fabric-sdk-java/blob/b649868113e969d851720c972f660114b64247bc/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAInfo.java#L46-L54 to get it's certificate chain.

rickr (Thu, 06 Sep 2018 10:49:21 GMT):
@mrkiouak did you still get the missing certificate or that it there was just an error ?

rickr (Thu, 06 Sep 2018 10:49:21 GMT):
@mrkiouak did you still get the missing certificate or that there was just an error ?

mrkiouak (Thu, 06 Sep 2018 10:53:30 GMT):
There was an error on the peer side, I dont get any client exception logged currently, but need to pass an appropriate bytestrea and am in process of pulling that request in.

ZaheerUdDeen (Thu, 06 Sep 2018 11:23:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QYkJBgh2oQvftWNgD) @rickr

laurensdegilde (Thu, 06 Sep 2018 12:41:29 GMT):
Has joined the channel.

laurensdegilde (Thu, 06 Sep 2018 12:44:54 GMT):
Hi All, I have a question regarding setting up a multi org endorsement client application. I want to send a transaction proposal request to 2 different organisations(since the endorsement policy is AND(Órg1MSP.member', 'ORG2MSP.member'). How is this possible when the hfclient, from which you build a channel with .newChannel(), sets the usercontext to an User which is bound to a enrollment which in turn is bound to an CA via HFCAClient?

laurensdegilde (Thu, 06 Sep 2018 12:59:06 GMT):
Do you just build multiple channels for each organisation and than collect the ProposalResponses as 1 collection after which you send that collection to the orderer?

laurensdegilde (Thu, 06 Sep 2018 12:59:15 GMT):
Seems kind of inconvenient to me....

laurensdegilde (Thu, 06 Sep 2018 13:15:16 GMT):
Sorry that is not possible either since you send the responses via a channel object to the orderer. Probably the responses than dont have the correct signature

tkg (Thu, 06 Sep 2018 13:47:46 GMT):
@laurensdegilde you send the transaction proposal request to the endorsing peers (many orgs), then the responses to the orderer

rajasushanth (Thu, 06 Sep 2018 14:04:13 GMT):
@rickr Is there a way to increase the size of grpc message size in SDK, I'm getting "Caused by: io.grpc.StatusRuntimeException: INTERNAL: Frame size 4555602 exceeds maximum: 4194304"

laurensdegilde (Thu, 06 Sep 2018 14:15:49 GMT):
After sending transactions to 2 peers from differnt orgs i get the following error: The proposal responses have 2 inconsistent groups with 0 that are invalid. Expected all to be consistent and none to be invalid. Any ideas?

laurensdegilde (Thu, 06 Sep 2018 14:16:14 GMT):
I get a succesfull check from the responses. Got the check from this test: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/master/src/main/java/org/cr22rc/MultiDomainSample.java

laurensdegilde (Thu, 06 Sep 2018 14:17:06 GMT):
Have to mention that my chaincode returns a JSON object which embeds time stamps. Dont know if this may cause this problem since those time stamps are not the same for both peers

laurensdegilde (Thu, 06 Sep 2018 14:17:13 GMT):
Doing a measurement on chaincode speed

IgorSim (Thu, 06 Sep 2018 14:40:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Cd6A8X4rLCjmcjYfL) @laurensdegilde this error: proposal responses have 2 inconsistent groups.....i also encounter, in my case problem was that in chaincode implementation i used current time and that's not good, because current time when chaincode is executed on first vs second peer may be different resulting in not consistent results

asaningmaxchain123 (Thu, 06 Sep 2018 15:39:08 GMT):
@rickr can you give a comment about the class `NOfEvents`

kisna (Thu, 06 Sep 2018 19:43:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=X7Kzmnb54vawTsyB7) @silliman OMG, now I get it

kisna (Thu, 06 Sep 2018 19:43:53 GMT):
lol

kisna (Thu, 06 Sep 2018 19:44:41 GMT):
can we please add this information on java sdk, chaincode github pages please, saves time for other folks :)

kisna (Thu, 06 Sep 2018 19:46:32 GMT):
is there a stable 1.3 rev/branch I can use for testing java chaincodes?

kisna (Thu, 06 Sep 2018 19:46:43 GMT):
@silliman @rickr

kisna (Thu, 06 Sep 2018 19:46:48 GMT):
?

kisna (Thu, 06 Sep 2018 20:09:21 GMT):
ok, I checked out the head 1.3 SNAPSHOT responses = client.sendInstallProposal(installProposalRequest, peers); Java chaincode is work-in-progress and disabled

kisna (Thu, 06 Sep 2018 20:09:21 GMT):
ok, I checked out the head 1.3 SNAPSHOT responses = client.sendInstallProposal(installProposalRequest, peers); *Java chaincode is work-in-progress and disabled*

kisna (Thu, 06 Sep 2018 20:09:21 GMT):
ok, I checked out the head master 1.3 SNAPSHOT responses = client.sendInstallProposal(installProposalRequest, peers); *Java chaincode is work-in-progress and disabled*

kisna (Thu, 06 Sep 2018 20:10:20 GMT):
am I missing something in 1.3.0-SNAPSHOT - fabric-java-sdk?

silliman (Thu, 06 Sep 2018 20:58:30 GMT):
@kisna the language supported by the SDK is independent of the language that chaincode is written in. You should probably address your concerns about java chaincode in the #fabric-java-chaincode channel.

kisna (Thu, 06 Sep 2018 21:07:17 GMT):
got it

kisna (Thu, 06 Sep 2018 21:07:28 GMT):
Where do we see chaincode logs? docker logs -f ca_peerOrg1 & docker logs -f ca_peerOrg2 & docker logs -f orderer.example.com & docker logs -f configtxlator & does not show them anywhere One of my tests failed and there seems to be a difference in the value between peers How do peers reconcile the data between them? Running testUpdate1 - Channel foo Now query chaincode on channel foo for the current value of b Query payload of b from peer peer1.org1.example.com returned 1004 Query payload of b from peer peer0.org1.example.com returned 999 org.junit.ComparisonFailure: Expected :1004 Actual :999

kisna (Thu, 06 Sep 2018 21:07:43 GMT):
two questions while playing around with the SDK

kisna (Thu, 06 Sep 2018 21:09:05 GMT):
@silliman

silliman (Thu, 06 Sep 2018 21:15:40 GMT):
@kisna unless your are in "chaincode dev" mode, there will be a separate Docker container for each chaincode instantiated on a peer and invoked or queried against a peer. You can check the logs of those containers with the same `docker logs -f` syntax. The ledgers on each peer are updated at the end (step 6) of the process described here: https://hyperledger-fabric.readthedocs.io/en/release-1.2/txflow.html

silliman (Thu, 06 Sep 2018 21:15:40 GMT):
@kisna unless you are in "chaincode dev" mode, there will be a separate Docker container for each chaincode instantiated on a peer and invoked or queried against a peer. You can check the logs of those containers with the same `docker logs -f` syntax. The ledgers on each peer are updated at the end (step 6) of the process described here: https://hyperledger-fabric.readthedocs.io/en/release-1.2/txflow.html

kisna (Fri, 07 Sep 2018 02:10:34 GMT):
aah got it, let me see

kisna (Fri, 07 Sep 2018 02:11:13 GMT):
isn't chaincode installed on peers and instantiated in channel and executed by client connected to a peer

kisna (Fri, 07 Sep 2018 02:11:13 GMT):
isn't chaincode installed on peers and instantiated in channel and executed by client connected to a peer. 3Q) what if a peer is out of sync or its ledger is not the same state as another peer?

kisna (Fri, 07 Sep 2018 02:11:31 GMT):
why does chaincode need one more docker container?

kisna (Fri, 07 Sep 2018 02:11:31 GMT):
2Q) why does chaincode need one more docker container?

kisna (Fri, 07 Sep 2018 02:11:31 GMT):
4Q) In the End2End*Tests, how can I store user identity in an integration test to avoid registration again in another integration test? org.hyperledger.fabric_ca.sdk.exception.RegistrationException: Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@7a8c8dcf url: http://localhost:7054 POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} at org.hyperledger.fabric_ca.sdk.HFCAClient.register(HFCAClient.java:386) at org.hyperledger.fabric.sdkintegration.End2endIT.enrollUsersSetup(End2endIT.java:300) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:189) ... Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} at org.hyperledger.fabric_ca.sdk.HFCAClient.getResult(HFCAClient.java:1288) at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:1208) at org.hyperledger.fabric_ca.sdk.HFCAClient.register(HFCAClient.java:377) ... 25 more

kisna (Fri, 07 Sep 2018 02:13:01 GMT):
agreed, peers pull data from Kafka instead of ordered pushing data to peers, but shouldn't peers talk to each other before updating the "validated ledger" just like they do it during proposal phase when they push to orderer?

kisna (Fri, 07 Sep 2018 02:13:22 GMT):
what if a peer is out of sync or its ledger is not the same state as another peer?

kisna (Fri, 07 Sep 2018 02:13:22 GMT):
3Q) what if a peer is out of sync or its ledger is not the same state as another peer?

kisna (Fri, 07 Sep 2018 02:38:11 GMT):
in the first few phases, peers agree the read/write sets along with expected state before sending it to orderer

kisna (Fri, 07 Sep 2018 02:38:42 GMT):
which is basically the final executed world state and transaction log

kisna (Fri, 07 Sep 2018 02:38:57 GMT):
for the variables being touched in chain

kisna (Fri, 07 Sep 2018 02:39:20 GMT):
but these are not added to blockchain in the initial phase

kisna (Fri, 07 Sep 2018 02:39:32 GMT):
orderer seems to group these transactions and send it to a leader to validate

kisna (Fri, 07 Sep 2018 02:39:32 GMT):
orderer seems to group these transactions and send it to a leader to validate in a block

silliman (Fri, 07 Sep 2018 02:40:29 GMT):
@kisna 4Q) I don't know 3Q) in a properly functioning system your peers shouldn't be out of sync much more than what would be expected to be caused by network latency inherent in any distributed system- that is, it is impossible to guarantee that every peer is in the same state at the exact same point in time. Best practice in an app would be to retry a few times if you are receiving different results due to network latency. If your peers are grossly out of sync that could be indicative of larger problems. Peers do not talk to each other during the endorsing phase- each peer that your client app targets simulates its results independently. Your client app or the SDK will be the one to determine that the results match in accordance with your endorsement policy. Peers do not talk to each other during the validation phase when validating public data however with the introduction of private data peers may use gossip to get private data from other peers as appropriate and needed

kisna (Fri, 07 Sep 2018 02:41:40 GMT):
I am asking this because, isn't the fundamental premise of blockchains to keep all peers with same data after consensus?

kisna (Fri, 07 Sep 2018 02:41:40 GMT):
I am asking this because, isn't the fundamental premise of blockchains to keep all peers with same block chain / data after consensus or before processing getting next block?

kisna (Fri, 07 Sep 2018 02:41:55 GMT):
if Kafka provides the consensus and peers are slow or have network issue

kisna (Fri, 07 Sep 2018 02:42:08 GMT):
or a dropped Kafka consumer issue for whatever reason

kisna (Fri, 07 Sep 2018 02:42:08 GMT):
or a dropped Kafka consumer issue for a specific peer only for whatever reason

kisna (Fri, 07 Sep 2018 02:42:31 GMT):
that peer will have a different ledger state than the rest, so I am curious how all peers will guarantee having same validated ledger state?

kisna (Fri, 07 Sep 2018 02:42:45 GMT):
@silliman

silliman (Fri, 07 Sep 2018 02:47:09 GMT):
in a correctly operating Fabric, each peer participating in the channel will have the same contents at a given block height, but each peer may have a different block height at any given point in time

kelvinzhong (Fri, 07 Sep 2018 02:57:04 GMT):
@rickr hi rick, i wonder what's "Filtered block" retrieve from the blockEvent? i can't tell the differences

kisna (Fri, 07 Sep 2018 03:13:48 GMT):
agreed, data being consistent at the same height as that is what they agreed upon, question is, how do peers make sure others are not out of sync or have different heights? Like this example here:

kisna (Fri, 07 Sep 2018 03:13:49 GMT):
One of my tests failed and there seems to be a difference in the value between peers How do peers reconcile the data between them? Running testUpdate1 - Channel foo Now query chaincode on channel foo for the current value of b Query payload of b from peer peer1.org1.example.com returned 1004 Query payload of b from peer peer0.org1.example.com returned 999 org.junit.ComparisonFailure: Expected :1004 Actual :999

silliman (Fri, 07 Sep 2018 03:30:25 GMT):
Peers use the gossip protocol to keep track of their block height e.g. they will at times randomly send their block height to other peers they know about, and if the receiving peer has a lower block height it may ask for the blocks it deduces it is missing. But they do not compare contents with each other within the blocks and try to reconcile any differences. I do not know the nature of your test but if you are saying that the value of key 'b' is 1004 in peer1 and is 999 in peer0 then I am saying that either your two peers were at different block heights at the point in time when these queries were made, or there is something else fundamentally wrong with either your network, or your test.

kisna (Fri, 07 Sep 2018 03:43:27 GMT):
got it, so peers do exchange missing data before "Step 6" or writing new blocks?

kisna (Fri, 07 Sep 2018 03:43:36 GMT):
to make sure they are at same height?

silliman (Fri, 07 Sep 2018 03:46:05 GMT):
peers can receive missing blocks from other peers via the gossip protocol but that process is independent of the transaction flow

tahaf10 (Fri, 07 Sep 2018 11:48:56 GMT):
Has joined the channel.

aatkddny (Fri, 07 Sep 2018 14:30:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NERdu8bg9pYw6axZz) then the transaction fails...

aatkddny (Fri, 07 Sep 2018 14:30:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NERdu8bg9pYw6axZz) then the transaction fails...

aatkddny (Fri, 07 Sep 2018 14:33:25 GMT):
@kisna - 4Q - You have to save the enrollment yourself. The sample iirc serializes it to a file. We base64 encode it and stick it into a nosql database along with a few other pieces we need to know about the user.

kisna (Fri, 07 Sep 2018 15:53:04 GMT):
thanks @aatkddny , I saw a comment in a test to save it somewhere, got it, thanks

larsf (Sun, 09 Sep 2018 19:51:47 GMT):
BlockEvent

rickr (Mon, 10 Sep 2018 12:09:58 GMT):
@laurensdegilde https://github.com/cr22rc/fabricSDKJavaMultiDomainSample This _ may_ need crypto artifacts updated to actually work but should give you an idea.

rickr (Mon, 10 Sep 2018 12:10:26 GMT):
@rajasushanth https://github.com/hyperledger/fabric-sdk-java/blob/b649868113e969d851720c972f660114b64247bc/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L846

rickr (Mon, 10 Sep 2018 12:10:53 GMT):
@kisna I don't plan on listing chaincode languages we don't support. If you look a the integration test there's GO and Node.

rickr (Mon, 10 Sep 2018 12:12:22 GMT):
@kelvinzhong There is a way to restrict when you get peerEvents what data there is. You can have your peer only send a filtered block. I'm not sure on the details on how that's configured best asked on #fabric-peer-endorser-committer

rickr (Mon, 10 Sep 2018 12:15:07 GMT):
@asaningmaxchain123 https://github.com/hyperledger/fabric-sdk-java/blob/b649868113e969d851720c972f660114b64247bc/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L525-L541

rickr (Mon, 10 Sep 2018 12:23:55 GMT):
@kisna If you need consistent results between specific peers and a specific transaction you should use peer eventing services. The sendTransaction returns a future which when completed successfully indicates that the peers selected have commited the transaction.

gravity (Mon, 10 Sep 2018 13:51:40 GMT):
hello after an upgrade to the v.1.2.0, I'm getting this exception pretty often when trying to call a chaincode: ``` Caused by: java.security.NoSuchAlgorithmException: no such algorithm: X.509 for provider SunPCSC at sun.security.jca.GetInstance.getService(GetInstance.java:101) ~[na:1.8.0_181] at sun.security.jca.GetInstance.getInstance(GetInstance.java:218) ~[na:1.8.0_181] at java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:271) ~[na:1.8.0_181] ... 60 common frames omitted ```

gravity (Mon, 10 Sep 2018 13:54:43 GMT):
I'm wondering can it be related to java ca-certificates or is it connected to fabric setup?

rickr (Mon, 10 Sep 2018 13:57:37 GMT):
something wrong with chaincode probably

rickr (Mon, 10 Sep 2018 13:58:11 GMT):
look further up the stack for errors from the chaincode or look at the logs in docker

gravity (Mon, 10 Sep 2018 14:01:14 GMT):
thanks, will check

nrohith (Mon, 10 Sep 2018 14:26:32 GMT):
Has joined the channel.

jdfigure (Mon, 10 Sep 2018 22:32:37 GMT):
@gravity - I ran into that too - @rickr is correct, it's the result of chaincode error. The error your seeing is follow on processing not performing correctly after the chaincode exception is encountered. See https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ACSct6NtcNxeNvR3r and https://jira.hyperledger.org/browse/FABJ-346

aatkddny (Tue, 11 Sep 2018 00:13:32 GMT):
I've seen the same error. The message has changed from earlier versions.

kisna (Tue, 11 Sep 2018 02:18:19 GMT):
+1, get the same error in tests as well

kisna (Tue, 11 Sep 2018 02:18:19 GMT):
+1, get the same error in tests as well, and the actual error is somewhere hidden in the stacktrace

RockyRacer (Tue, 11 Sep 2018 12:27:02 GMT):
Hi, I'm just trying the java SDK, I have a running 1.2 Fabric network with one channel (all peers joined), then I do: ``` HFClient client = getHfClient(); User user = new AppUser("Admin", PEER_ADMIN_PK_FOLDER, PEER_ADMIN_PEM, "Org1MSP"); client = loginClient(client, user); System.out.println("Logged in with user Admin@Org1.ch"); Channel channel = client.getChannel(CHANNEL_NAME); System.out.println("Got channel " + channel.getName()); ``` But `channel` is null (get a nullPointerException on `channel.getName()`)

RockyRacer (Tue, 11 Sep 2018 12:27:09 GMT):
Do I missed something ?

vikas.kundz (Tue, 11 Sep 2018 12:58:28 GMT):
Has joined the channel.

rickr (Tue, 11 Sep 2018 14:04:30 GMT):
@RockyRacer You need to construct the channel. IMO the best way to start out is get the integration test working. See the readme.md Read the README.md at least once, maybe twice :) Then spend a half a day with a debugger and follow the integration tests. Debugging is best as I'll be the first to admit the code is little difficult to just follow, but seeing the variables and stepping through goes a long way in helping. You can then easily copy from this code parts that can get what you need done.

RockyRacer (Tue, 11 Sep 2018 14:33:41 GMT):
OK thanks I'm currently exploring End2endIT. I though there were simpler ways than the provided tests :/ I mean I can not just read the existing blockchain but need to construct all again

RockyRacer (Tue, 11 Sep 2018 14:33:41 GMT):
@rickr OK thanks I'm currently exploring End2endIT :) I though there were simpler ways than the provided tests :/ I mean I can not just read the existing blockchain but need to construct all again

rtorres (Tue, 11 Sep 2018 15:34:18 GMT):
Has joined the channel.

kid101 (Tue, 11 Sep 2018 19:04:52 GMT):
Has joined the channel.

kid101 (Tue, 11 Sep 2018 19:09:15 GMT):
Hey Folks. I'm new in here and having trouble picking up JAVA vs Node SDK. can you guys help me make a choice? Considering Fabric is written in GO? my predilection is towards java btw

kid101 (Tue, 11 Sep 2018 19:10:27 GMT):
anyone who has used both the SDK's your thoughts will be insightful.

kid101 (Tue, 11 Sep 2018 19:10:27 GMT):
anyone who has used both the SDK's or even GO your thoughts will be insightful.

kid101 (Tue, 11 Sep 2018 20:01:35 GMT):
where can I find fabric java samples? I looked at this it's all JS https://github.com/hyperledger/fabric-samples

kid101 (Tue, 11 Sep 2018 20:14:37 GMT):
also are there any plans to incorporate java samples in the docs as well.. It would certainly be helpful :angel_tone1:

rickr (Tue, 11 Sep 2018 21:02:40 GMT):
@kid101 Read the Readme.md .. maybe read it again would be a good start.

mublan (Tue, 11 Sep 2018 21:17:09 GMT):
Has joined the channel.

mublan (Tue, 11 Sep 2018 21:26:51 GMT):
where can i find tutoriales about building an hyperledger fabric app with java?

RockyRacer (Wed, 12 Sep 2018 06:36:54 GMT):
Seem that there is no documentation, no function reference, no tutorials, etc.... You just need to go through provided examples (https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/) and spend hours to try to extract what you need !

RockyRacer (Wed, 12 Sep 2018 07:23:12 GMT):
well, still not able to create channel, `client.getChannelConfigurationSignature(channelConfiguration, user)` returns the following: ``` org.hyperledger.fabric.sdk.exception.InvalidArgumentException: com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length. ```

fanjianhang (Wed, 12 Sep 2018 08:33:58 GMT):
@rickr Hi, rickr, as we know, sdk takes the user’s cryptographic credentials to produce a unique signature for transaction proposal, but sometimes we want to do this out of the sdk, it means the business app has produced a sdk external signatrue. I find there is not api to achieve my demand. Could you help me. Thanks.

rickr (Wed, 12 Sep 2018 10:46:26 GMT):
@fanjianhang The SDK purpose is *mostly* installing, invoking chaincode and then sending them to the Orderer. In the process it does sign and verify proposals and transactions. There's no API to send some _raw_ data. if that's what your suggesting.

rickr (Wed, 12 Sep 2018 10:46:26 GMT):
@fanjianhang The SDK's purpose is *mostly* installing, invoking chaincode and then sending them to the Orderer. In the process it does sign and verify proposals and transactions. There's no API to send some _raw_ data. if that's what your suggesting.

rickr (Wed, 12 Sep 2018 10:50:04 GMT):
@RockyRacer There's javadoc and the integration tests which are really examples if you will that do almost everything the SDK is designed to do. How did you get your channel configuration ?

RockyRacer (Wed, 12 Sep 2018 11:31:38 GMT):
@rickr I generated channel configuration transaction using configtxgen, then I do the following as in the end2EndIT integration test example: ``` String fileName = "channel.tx"; ClassLoader classLoader = this.getClass().getClassLoader(); File channelTx = new File(classLoader.getResource(fileName).getFile()); ChannelConfiguration channelConfiguration = new ChannelConfiguration(channelTx); newChannel = client.newChannel(CHANNEL_NAME, client.newOrderer(ORDERER_NAME, ORDERER_ADDRESS, properties), channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, user)); logger.info("Created channel " + newChannel.getName()); ```

RockyRacer (Wed, 12 Sep 2018 11:32:49 GMT):
error is raised by `getChannelConfigurationSignature`

rickr (Wed, 12 Sep 2018 11:42:03 GMT):
Can `simplify` the code so that right now you're using the fullpath to channel.tx to make sure your referencing the right file .. just to test -- not likely but should be simple try.. Or print it out ? There is also sdk logging from the README.md ``` Logging for the SDK can be enabled with setting environment variables: ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=TRACE ``` Not sure how good we did there in logging but maybe that can help ?

rickr (Wed, 12 Sep 2018 11:42:03 GMT):
Can you `simplify` the code so that right now you're using the fullpath to channel.tx to make sure your referencing the right file .. just to test -- not likely but should be simple try.. Or print it out ? There is also sdk logging from the README.md ``` Logging for the SDK can be enabled with setting environment variables: ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=TRACE ``` Not sure how good we did there in logging but maybe that can help ?

rickr (Wed, 12 Sep 2018 11:42:03 GMT):
Can you `simplify` the code so that right now you're using the fullpath to channel.tx to make sure your referencing the right file .. just to test -- not likely but should be simple try.. Or print it out ? There is also sdk logging from the README.md ``` Logging for the SDK can be enabled with setting environment variables: ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=TRACE ``` Not sure how good we did there in logging but maybe that can help ? Also look at the orderer side see if there maybe something more of interest being reported there.

RockyRacer (Wed, 12 Sep 2018 12:01:01 GMT):
Yes the file is loaded correctly, I already tried to print the file content, i get something like: ``` ? ???" my-channel? ? my-channel;) Application Org1MSP Org2MSP Consortium? ? Application? Org1MSP Org2MSP ACLs?? 4 cscc/GetConfigTree /Channel/Application/Readers @ lscc/GetInstantiatedChaincodes /Channel/Application/Readers ? cscc/SimulateConfigTreeUpdate /Channel/Application/Readers 6 lscc/ChaincodeExists /Channel/Application/Readers [...] ```

RockyRacer (Wed, 12 Sep 2018 12:01:54 GMT):
no logs from orderer, I will try LOGLEVEL=TRACE

rickr (Wed, 12 Sep 2018 12:07:35 GMT):
Did you generate it using the same configtxgen version as the fabric your running against ?

RockyRacer (Wed, 12 Sep 2018 12:12:04 GMT):
Yes

RockyRacer (Wed, 12 Sep 2018 12:13:12 GMT):
but don't worry should be an error on my side. I try to load the file from the app resources (copy/pasted) but I will try binding it to my container using volume

RockyRacer (Wed, 12 Sep 2018 12:13:12 GMT):
but don't worry should be an error on my side. I try to load the file from the app resources (copy/pasted), I will try to redeploy all, and maybe binding it to my container using volume

RockyRacer (Wed, 12 Sep 2018 12:26:06 GMT):
OK got it, sorry was related to JRebel not reloading one of my classes... Thank you for your help @rickr :)

vijay5378 (Wed, 12 Sep 2018 20:30:55 GMT):
While trying to instantiate a chaincode with java, I keep getting the following error: ``` `Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincodes: no Go files in /chaincode/input/src/chaincodes` Anyone else facing similar issue? Strangely, I am able to instantiate using CLI. The path: /chaincode/input/src/chaincodes seems to be hardcoded somewhere ```

vijay5378 (Wed, 12 Sep 2018 20:30:55 GMT):
While trying to instantiate a chaincode with java, I keep getting the following error: ``` `Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincodes: no Go files in /chaincode/input/src/chaincodes` ``` ``` Anyone else facing similar issue? Strangely, I am able to instantiate using CLI. The path: /chaincode/input/src/chaincodes seems to be hardcoded somewhere ```

vijay5378 (Wed, 12 Sep 2018 20:30:55 GMT):
While trying to instantiate a chaincode with java, I keep getting the following error: `Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincodes: no Go files in /chaincode/input/src/chaincodes` Anyone else facing similar issue? Strangely, I am able to instantiate using CLI. The path: /chaincode/input/src/chaincodes seems to be hardcoded somewhere

rickr (Wed, 12 Sep 2018 20:59:38 GMT):
Java chaincode ?

rickr (Wed, 12 Sep 2018 21:00:48 GMT):
`chaincode with java` -> GO CC with the JSDK ?

vijay5378 (Wed, 12 Sep 2018 21:01:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qMMSZBErGzBNrSrwP) @rickr GO CC with java SDK

vijay5378 (Wed, 12 Sep 2018 21:02:05 GMT):
@rickr this is the message on the peer side with debug enabled: ``` `2018-09-12 20:53:03.306 UTC [chaincode-platform] func1 -> ERRO 9744 Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package chaincodes: no Go files in /chaincode/input/src/chaincodes` ```

rickr (Wed, 12 Sep 2018 21:04:35 GMT):
That's where I think it gets unpacked

vijay5378 (Wed, 12 Sep 2018 21:07:33 GMT):
@rickr i have followed your End2EndMTIT

vijay5378 (Wed, 12 Sep 2018 21:08:09 GMT):
install works fine, problem only while instantiation of chaincode

rickr (Wed, 12 Sep 2018 21:09:52 GMT):
why that ? not the End2end ?

vijay5378 (Wed, 12 Sep 2018 21:11:25 GMT):
Didnt see any difference for installing and instantiating chaincodes

rickr (Wed, 12 Sep 2018 21:12:29 GMT):
Not sure what the state is of that. I doesn't run regularly ...

rickr (Wed, 12 Sep 2018 21:14:53 GMT):
export ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR=/tmp/diagDump where /tmp/diagDump exists and is writeable with SDK trace on will have a TON of files among them are *.tgz that have what was packaged up and sent to the Fabric

rickr (Wed, 12 Sep 2018 21:15:51 GMT):
and .. I stick with what the README.md suggests as a guide :wink:

vijay5378 (Wed, 12 Sep 2018 21:17:50 GMT):
Thanks...how do i turn SDK trace on?

rickr (Wed, 12 Sep 2018 21:18:06 GMT):
read the README.md :)

rickr (Wed, 12 Sep 2018 21:21:31 GMT):
Also there is a lot of TRACE that should tell you other informaton like where the sdk is packaging from

vijay5378 (Wed, 12 Sep 2018 21:21:35 GMT):
@rickr :-) sure thing. Will do. Let me try debugging it

vijay5378 (Wed, 12 Sep 2018 21:25:32 GMT):
@rickr - Just went through the readme again. I am building the environment without docker. I have set it up on my own. I think your suggestion will work only for the fabric-dev right?

rickr (Wed, 12 Sep 2018 21:27:46 GMT):
The trace ?

vijay5378 (Wed, 12 Sep 2018 21:28:34 GMT):
yes

rickr (Wed, 12 Sep 2018 21:28:51 GMT):
The trace is on the client side .. should have nothing to do with Fabric server

vijay5378 (Wed, 12 Sep 2018 21:34:14 GMT):
ok thanks

fanjianhang (Thu, 13 Sep 2018 03:39:26 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xiYtdcrpeqYwtWquZ) @rickr Thanks for your reply. Maybe sdk could consider this suggestion in the future. Thanks again.

aatkddny (Thu, 13 Sep 2018 12:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=T5na6xQoAgYAZNTq7) doesn't this mean your paths inside the container are wrong? iirc - and it's been a while you can either map a directory and load the CC from that or zip and ship it. The allows like you are mapping a folder with a bad path. I can't help - we zip in our maintenance client. If you want to try that way something like this should get you started ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.debug("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` I'm sure you already know what the additional `src` in the target is for.

aatkddny (Thu, 13 Sep 2018 12:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=T5na6xQoAgYAZNTq7) doesn't this mean your paths inside the container are wrong? iirc - and it's been a while you can either map a directory and load the CC from that or zip and ship it. The error looks like you are mapping a folder with a bad path. I can't help - we zip in our maintenance client. If you want to try that way something like this should get you started ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.debug("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` I'm sure you already know what the additional `src` in the target is for.

aatkddny (Thu, 13 Sep 2018 12:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=T5na6xQoAgYAZNTq7) doesn't this mean your paths inside the container are wrong? iirc - and it's been a while you can either map a directory and load the CC from that or zip and ship it. The error looks like you are mapping a folder with a bad path. I can't help with that - we zip in our maintenance client, but if yo want t try to zip it instead something like this should get you started. ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.debug("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` I'm sure you already know what the additional `src` in the target is for.

aatkddny (Thu, 13 Sep 2018 12:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=T5na6xQoAgYAZNTq7) doesn't this mean your paths inside the container are wrong? iirc - and it's been a while you can either map a directory and load the CC from that or zip and ship it. The error looks like you are mapping a folder with a bad path - check your docker configuration and make sure whatever you are mapping to `:/opt/gopath/src/chaincode/` looks correct. I can't help much more with that - we zip in our maintenance client, but if you want to try to zip it instead something like this should get you started. ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.debug("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` I'm sure you already know what the additional `src` in the target is for.

aatkddny (Thu, 13 Sep 2018 12:52:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=T5na6xQoAgYAZNTq7) doesn't this mean your paths inside the container are wrong? iirc - and it's been a while you can either map a directory and load the CC from that or zip and ship it. The error looks like you are mapping a folder with a bad path - check your docker configuration and make sure whatever you are mapping to `:/opt/gopath/src/chaincode/` looks correct. I can't help much more with that - we zip and ship the CC in our maintenance client, but if you want to try to zip it instead something like this should get you started. ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.debug("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` I'm sure you already know what the additional `src` in the target is for.

JaydipMakadia (Thu, 13 Sep 2018 13:18:28 GMT):
Has joined the channel.

gravity (Thu, 13 Sep 2018 20:15:46 GMT):
hi all is there any way to create new peer admin if I lost certificate and _sk file for the previous one?

rickr (Thu, 13 Sep 2018 20:22:04 GMT):
@gravity Beyond me. I think you may have better luck with #fabric-crypto channel

gravity (Thu, 13 Sep 2018 20:26:11 GMT):
@rickr thanks, will ask

fanjianhang (Fri, 14 Sep 2018 01:39:47 GMT):
@rickr Hi, rickr, i try to modify the url config like `grpcs://*peer10*.org1.example.com:7051`, at the same time , i add this `192.168.197.133 peer10.org1.example.com` to my host file, but i got errors: `Channel:2764 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem` . Could you help me. Thanks.

rickr (Fri, 14 Sep 2018 11:07:48 GMT):
Hard to diagnosis from just that info. Often openssl client connection will give you more details then what the grpc connection provides. openssl s_client -connect peer10.org1.example.com:7050

rickr (Fri, 14 Sep 2018 11:07:48 GMT):
Hard to diagnose from just that info. Often openssl client connection will give you more details then what the grpc connection provides. openssl s_client -connect peer10.org1.example.com:7050

aatkddny (Fri, 14 Sep 2018 14:40:22 GMT):
@rickr Do you support adding a private data definition after channel creation or is that something that I'd need to code for (like adding an org to the channel).

rickr (Fri, 14 Sep 2018 14:48:39 GMT):
I'm not sure what you mean by `private data definition` There is private data collections on chaincode. There is an example of that with -> https://github.com/hyperledger/fabric-sdk-java/blob/ef604d1fd3bc12eeed9910036f24e4a4953156c4/src/test/java/org/hyperledger/fabric/sdkintegration/PrivateDataIT.java

aatkddny (Fri, 14 Sep 2018 15:50:14 GMT):
I meant defining a private data collection and adding it to the channel AFTER the channel has already been created. I saw the one at channel create time, but you don't always know up front who needs what.

aatkddny (Fri, 14 Sep 2018 15:50:14 GMT):
I meant defining a private data collection and adding it to the channel AFTER the channel has already been created. I saw the one at channel create time, but you don't always know up front who needs what. I'm in the told it can be done - and I'm trying to find out what's involved - but I wondered if there was support for it natively in the SDK.

rickr (Fri, 14 Sep 2018 16:13:41 GMT):
I'm not aware of private data collection on a Channel. So if something like that exists .. no the SDK does not have it. -- I'll ask around. The SDK has as I pointed out an api for private data collections on chaincode.

rickr (Fri, 14 Sep 2018 16:21:32 GMT):
I think we or maybe I am getting confused on terminology :) The private data is just a hash on the ledger ( aka channel) but the way that's created and defined is when you Instantiate chaincode or upgrade. Then your chaincode uses special api to access that .. that is in the sample link above

rickr (Fri, 14 Sep 2018 16:23:52 GMT):
to be honest right now I see the JSDK we did test that on instantiate chaincode .. but probable didn't explicitly on chaincocode upgrade .. please feel free to be our gunea pig :)

vijay5378 (Fri, 14 Sep 2018 18:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5rpH4yg8y36HnZefa) @rickr @rickr Thanks for this!!. In case you want to know the reason, the chaincode directory name and the chaincode name were different and hence was not getting instantiated.Was able to debug it with the trace!!

vijay5378 (Fri, 14 Sep 2018 18:20:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=to73A9jbLYBfEjzdc) @aatkddny Thanks. The issue was very similar. The compiled cc was having a different name than the source directory. Works when both have the same name. The weird part was that the install was working fine and then instantiate was giving an error. The src was the one causing trouble.

vijay5378 (Fri, 14 Sep 2018 18:26:50 GMT):
@rickr Was just wondering about an architectural question. I have multiple peers running on different machines - all connecting to the same channel. After each peer joins the channel, I save the state . When I recreate the channel (say in Machine A having Peer A), is there any way that I can know about the peers in Machine B and C (Assuming that they have already joined the channel) - This is important because when we invoke ``` `Collection responses=channel.sendInstantiationProposal(instantiateProposalRequest,channel.getPeers());` ```

vijay5378 (Fri, 14 Sep 2018 18:26:50 GMT):
@rickr Was just wondering about an architectural question. I have multiple peers running on different machines - all connecting to the same channel. After each peer joins the channel, I save the state . When I recreate the channel (say in Machine A having Peer A), is there any way that I can know about the peers in Machine B and C (Assuming that they have already joined the channel) - This is important because when we invoke ``` `Collection responses=channel.sendInstantiationProposal(instantiateProposalRequest,channel.getPeers());` it returns only those peers in Machine A. I guess this is as per design. But if I want to send the proposal to other peers in Machines B and C - is there a way to do it?

vijay5378 (Fri, 14 Sep 2018 18:26:50 GMT):
@rickr Was just wondering about an architectural question. I have multiple peers running on different machines - all connecting to the same channel. After each peer joins the channel, I save the state . When I recreate the channel (say in Machine A having Peer A), is there any way that I can know about the peers in Machine B and C (Assuming that they have already joined the channel) - This is important because when we invoke ``` `Collection responses=channel.sendInstantiationProposal(instantiateProposalRequest,channel.getPeers());` it returns only those peers in Machine A. I guess this is as per design. But if I want to send the proposal to other peers in Machines B and C - is there a way to do it?

vijay5378 (Fri, 14 Sep 2018 18:26:50 GMT):
@rickr Was just wondering about an architectural question. I have multiple peers running on different machines - all connecting to the same channel. After each peer joins the channel, I save the state . When I recreate the channel (say in Machine A having Peer A), is there any way that I can know about the peers in Machine B and C (Assuming that they have already joined the channel) - This is important because when we invoke ``` `Collection responses=channel.sendInstantiationProposal(instantiateProposalRequest,channel.getPeers());```` ``` it returns only those peers in Machine A. I guess this is as per design. But if I want to send the proposal to other peers in Machines B and C - is there a way to do it?

rickr (Fri, 14 Sep 2018 18:52:30 GMT):
The other peers in the different orgs or even the same would just `add` not join to the channel

rickr (Fri, 14 Sep 2018 18:55:32 GMT):
You only ever once `join` a peer to the channel irregardless of any system you're on. After that on another system or if you reconnstructing the channel you would just ever `add` it.

vijay5378 (Fri, 14 Sep 2018 19:02:27 GMT):
Thanks @rickr

aatkddny (Fri, 14 Sep 2018 21:27:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jMQ2g9uoAZKQHRqhn) I'll give it a whirl next week. Now I'm wondering what that means for collections across CC versions. Guess I'll find that out too.

yacovm (Fri, 14 Sep 2018 23:22:48 GMT):
@aatkddny - collections across chaincode versions don't mean anything special. a chaincode "version" with respect to the channel data, is simply a means to bind the chaincode code hash to the channel. so, when you change the chaincode version - you don't change the data, therefore the collection stays the same.

mattremy (Sat, 15 Sep 2018 09:58:44 GMT):
Has joined the channel.

mattremy (Sat, 15 Sep 2018 10:01:21 GMT):
Hi folks. I am new here. I sent a mail to the mailing list and the suggestion was to ask here... I have multiple orgs setup on different servers. (Say ORG-a and ORG-B). Using the java-sdk, I create a channel (HFClient.newchannel) on ORG-A. Now in ORG-B do I need to create the channel again? Seems to defeat the purpose. HFClient.getChannel() returns null. Is there a way that I can retrieve the channel already created? Of course while creating the channel in ORGA, I have added the config for ORGB also. In the CLI this seems to be quite straightforward. I am not able to understand the same feature in java-sdk

rickr (Sat, 15 Sep 2018 12:16:14 GMT):
Take a look at this first https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Sat, 15 Sep 2018 12:19:15 GMT):
You can't `query` if there is a channel. You create it once, you join the peers once. As READM.md suggest take the time to follow the End2endIT and then End2endAndBackAgainIT will help

rickr (Sat, 15 Sep 2018 12:19:15 GMT):
You can't `query` if there is a channel. You create it once, you join the peers once. As READM.md suggest take the time to follow the End2endIT and then End2endAndBackAgainIT will help Read through the README.md once maybe even twice will also beneficial

rickr (Sat, 15 Sep 2018 12:19:15 GMT):
You can't `query` if there is a channel. You create it once, you join the peers once. As the READM.md suggest take the time to follow the End2endIT and then End2endAndBackAgainIT will help Read through the README.md once maybe even twice will also be beneficial

mattremy (Sat, 15 Sep 2018 17:50:49 GMT):
@rickr thanks for the input. I have gone through the examples that you have provided. My apologies for being pedantic in advance - I have created a channel in OrgA and then recreated the channel in orgB. However, if I query the channel in ORGB(With channel.getPeers()), it doesn't return the peers already joined from ORGA. Is that the intended way?

rickr (Sat, 15 Sep 2018 18:48:16 GMT):
That method _only_ returns the peers you've joined or added to the channel object.

mattremy (Sat, 15 Sep 2018 19:18:07 GMT):
@rickr Thanks once again. Is there any way to retrieve peers of ORGA that have joined the channel from ORGB? I have gone through both End2EndIT and Backagain. Unable to find. Would be grateful if you could even point me to any other location that might help me with the answer

rickr (Sat, 15 Sep 2018 19:28:23 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.2.0_notes.md#fab-8805-jsdk-service-discovery

githubcpc (Mon, 17 Sep 2018 02:26:58 GMT):
Has joined the channel.

githubcpc (Mon, 17 Sep 2018 02:27:03 GMT):
Hi, I had build fabric 1.1 environment and I used fabric-java-sdk to connect.Now I plan to monitor my peer states,but I hava no idea to do.Thanks for any advice.

aatkddny (Mon, 17 Sep 2018 14:39:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=L3W9EXWdhSqH4pxFQ) @yacovm So there's no equivalent to "upgrade" if you put in a new version of the collection with a breaking schema change?

aatkddny (Mon, 17 Sep 2018 14:39:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=L3W9EXWdhSqH4pxFQ) @yacovm So there's no equivalent to "upgrade" if you put in a new version of the collection with a breaking schema change?

yacovm (Mon, 17 Sep 2018 14:41:32 GMT):
@aatkddny what do you mean a new version of the collection?

aatkddny (Mon, 17 Sep 2018 14:48:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sj7Z4qy6JS2GhtXo8) @yacovm Let's say we were to close-couple the data with the representation inside the persisted object in the PD collection. Serialized object rather than a map for instance. Then the project is updated for some reason and the developer decides to add or delete new properties to the object in a PD collection and update the chaincode so the old schema is invalid. This would require that we change the data that's already there so this new version of the chaincode works. Setting aside what an awful design pattern that is, that's what I mean by a new version of the collection here.

aatkddny (Mon, 17 Sep 2018 14:48:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sj7Z4qy6JS2GhtXo8) @yacovm Let's say we were to close-couple the data with the representation inside the persisted object in the PD collection. Serialized object rather than a map for instance. Then the project is updated for some reason and the developer decides to add or delete new properties to the object in a PD collection and update the chaincode so the old schema is invalid. This would require that we change the data that's already there so this new version of the chaincode works. Setting aside what an awful design pattern that is, that's what I mean by a new version of the collection here. A new version of the CC that requires an update to the collection.

yacovm (Mon, 17 Sep 2018 14:49:53 GMT):
can't you just do a function in the chaincode that.... upgrades it?

yacovm (Mon, 17 Sep 2018 14:50:18 GMT):
you can always just do a new chaincode that exists only for that, and do a chaincode-to-chaincode write

yacovm (Mon, 17 Sep 2018 14:50:46 GMT):
btw @aatkddny - you need to realize asking about private data in java SDK is not going to give you max attention from private data developers

aatkddny (Mon, 17 Sep 2018 14:51:15 GMT):
Of course you can. But there's an explicit upgrade call in the CC when it is instantiated. My question was whether this was mirrored in the PD.

aatkddny (Mon, 17 Sep 2018 14:51:15 GMT):
Of course you can. But there's an explicit upgrade call in the CC for the regular data when it is instantiated. My question was whether this was mirrored in the PD.

yacovm (Mon, 17 Sep 2018 14:51:24 GMT):
I sometimes wander far into hostile channels such as this one, but not everyone does

yacovm (Mon, 17 Sep 2018 14:52:07 GMT):
> Of course you can. But there's an explicit upgrade call in the CC when it is instantiated. My question was whether this was mirrored in the PD. I hate the upgrade/instantiate calls. And I'm not 100% sure that private data works in upgrade. I know it *does not* work in instantiate for sure

yacovm (Mon, 17 Sep 2018 14:52:13 GMT):
I can check for upgrade though

yacovm (Mon, 17 Sep 2018 14:52:35 GMT):
@dave.enyeart does private data works in upgrade simulations?

yacovm (Mon, 17 Sep 2018 14:52:45 GMT):
I recall we restricted it in instantiate

aatkddny (Mon, 17 Sep 2018 14:54:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DWLif8uLojcFXsxdy) I'm not a fan myself. We usually just return.

aatkddny (Mon, 17 Sep 2018 15:03:17 GMT):
@rickr Is there an sdk sample for creating db indices for cc with couchdb? This: ``` For example, for go chaincode (fabric-client/lib/packager/Golang.js) the packaged tar would include: src/github.com/hyperledger/fabric/examples/chaincode/go/marbles02/marbles_chaincode.go META-INF/statedb/couchdb/indexes/indexOwner.json ``` from here: `https://jira.hyperledger.org/browse/FABN-33` implies (assuming my adult literacy classes worked) that all I need to do is to shove the definitions in the same directory as the go code and the magic box handles it all. We zip the directory and pass in as an input stream though so I just wondered if it had been tested or if I'm going to be QA. I'm going to have to try it regardless, but knowing it works will help me to debug if I mess something up.

rickr (Mon, 17 Sep 2018 15:48:51 GMT):
There's no example of creating the indicies. I did a manual test at one time. I don't think there's any way to verify from the API that an index was placed on an entry.

HitheshKamath (Tue, 18 Sep 2018 06:11:38 GMT):
Has joined the channel.

githubcpc (Tue, 18 Sep 2018 07:03:59 GMT):
@yacovm Could I use fabric-sdk-java to check the peer is running or down?

yacovm (Tue, 18 Sep 2018 07:04:49 GMT):
you can just check if the port is open

githubcpc (Tue, 18 Sep 2018 07:09:15 GMT):
okay.Thanks.

laurensdegilde (Tue, 18 Sep 2018 07:11:19 GMT):
Hi guys I am getting the following error sending a proposal request: Sending proposal to peer0.org1.example.com failed because of timeout(20000 milliseconds) expiration. The weird thing is I messesured the time the transaction is taking and it is definitly lower than 20000 milliseconds.

laurensdegilde (Tue, 18 Sep 2018 07:11:25 GMT):
Any Idea on why fabric throws this error

laurensdegilde (Tue, 18 Sep 2018 07:11:36 GMT):
And sends a failed proposal response?

githubcpc (Tue, 18 Sep 2018 07:46:07 GMT):
I download fabric-sdk-java-release 1.1 and compile the protobuf. I try to run End2endIT.java , but get error like this "can not find EventsGrpc,EndorserGrpc,DeliverGrpc".

rickr (Tue, 18 Sep 2018 10:01:14 GMT):
@laurensdegilde Enable trace for the SDK may help

rickr (Tue, 18 Sep 2018 10:01:14 GMT):
@laurensdegilde Enable trace for the SDK may help to see what's happening.

rickr (Tue, 18 Sep 2018 10:02:06 GMT):
@githubcpc Follow'ed the README.md ?

githubcpc (Tue, 18 Sep 2018 10:07:03 GMT):
@rickr Of course.I find these classes in fabric-sdk-java 1.0.1 .However,they are not in branch code now.

githubcpc (Tue, 18 Sep 2018 10:24:14 GMT):
EventsGrpc EndorserGrpc DeliverGrpc AtomicBroadcastGrpc

rrishmawi (Tue, 18 Sep 2018 13:10:03 GMT):
Has joined the channel.

rrishmawi (Tue, 18 Sep 2018 13:11:44 GMT):
Hi all, i have few very basic questions but you have to excuse my ignorance as i am new to development with hyperledger fabric. is there an sdk for android app development?

rickr (Tue, 18 Sep 2018 13:12:47 GMT):
@rrishmawi I don't know of any.

rrishmawi (Tue, 18 Sep 2018 13:13:20 GMT):
Thanks @rickr

aatkddny (Tue, 18 Sep 2018 13:13:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d6ZNCpPDLfYKQyYsC) You can see it in the couchDB DB - which I can get to easily. My problem is that I'm not sure what way I need to invoke it from the SDK. I think there might be an oversight here. I tried the path version of bundling it as described in the manual - put the definition in a file in `/META-INF/statedb/couchdb/indices` under the root go directory. That didn't work. It also talks about passing a `metadataPath` if you are using Node. And I do see - `setChaincodeMetaInfLocation`. The problem is I'm passing the go code in with `setChaincodeInputStream`. The two seem incompatible based on the note for the former. Did I misunderstand something here? I'm using this as the manual `https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#upgrading-a-collection-definition` here

aatkddny (Tue, 18 Sep 2018 13:13:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d6ZNCpPDLfYKQyYsC) You can see it in the couchDB DB - which I can get to easily. My problem is that I'm not sure what way I need to invoke it from the SDK. I think there might be an oversight here or I have misunderstood the intent from the comments. I tried the path version of bundling it as described in the manual - put the definition in a file in `/META-INF/statedb/couchdb/indices` under the root go directory. That didn't work. It also talks about passing a `metadataPath` if you are using Node. And I do see - `setChaincodeMetaInfLocation`. The problem is I'm passing the go code in with `setChaincodeInputStream`. The two seem incompatible based on the note for the former. Did I misunderstand something here? I'm using this as the manual `https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#upgrading-a-collection-definition` here

aatkddny (Tue, 18 Sep 2018 13:13:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d6ZNCpPDLfYKQyYsC) You can see it in the couchDB DB - which I can get to easily. My problem is that I'm not sure what way I need to invoke it from the SDK. I think there might be an oversight here or I have misunderstood the intent from the comments. I tried the path version of bundling it as described in the manual - put the definition in a file in `/META-INF/statedb/couchdb/indices` under the root directory for my go chaincode. That didn't work. It also talks about passing a `metadataPath` if you are using Node. And I do see - `setChaincodeMetaInfLocation`. The problem is I'm passing the go code in with `setChaincodeInputStream`. The two seem incompatible based on the note for the former. Did I misunderstand something here? I'm using this as the manual `https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#upgrading-a-collection-definition` here

aatkddny (Tue, 18 Sep 2018 13:13:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d6ZNCpPDLfYKQyYsC) You can see it in the couchDB DB - which I can get to easily. My problem is that I'm not sure what way I need to invoke it from the SDK. I think there might be an oversight here or I have misunderstood the intent from the comments. I tried the path version of bundling it as described in the manual - put the definition in a file in `/META-INF/statedb/couchdb/indexes` under the root directory for my go chaincode. That didn't work. It also talks about passing a `metadataPath` if you are using Node. And I do see - `setChaincodeMetaInfLocation`. The problem is I'm passing the go code in with `setChaincodeInputStream`. The two seem incompatible based on the note for the former. Did I misunderstand something here? I'm using this as the manual `https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html#upgrading-a-collection-definition` here

rrishmawi (Tue, 18 Sep 2018 13:16:06 GMT):
does the java sdk support newer versions of hyperledger fabric, specifically 1.9?

rickr (Tue, 18 Sep 2018 13:19:27 GMT):
@aatkddny https://github.com/hyperledger/fabric-sdk-java/blob/6c6666b207b4c2d78febc05a77beb1c3d5d6be46/src/main/java/org/hyperledger/fabric/sdk/InstallProposalRequest.java#L37

rickr (Tue, 18 Sep 2018 13:22:14 GMT):
@githubcpc There not in any branch checked in - they are generated code. .. Why I said follow the READM.md ... it should generate them.

rickr (Tue, 18 Sep 2018 13:22:52 GMT):
@rrishmawi fabric 1.9 ... where ?

rrishmawi (Tue, 18 Sep 2018 13:23:30 GMT):
i am asking?

aatkddny (Tue, 18 Sep 2018 13:23:30 GMT):
@rickr - so I didn't misunderstand and they are incompatible. That throws a giant wrench in the works for me - out whole chaincode install pattern is based on being able to pass the go code as a stream rather than having to mount the CC in the containers. Do you have any plans to support indices in the other instantiate method?

aatkddny (Tue, 18 Sep 2018 13:23:30 GMT):
@rickr - so I didn't misunderstand and they are incompatible. That throws a giant wrench in the works for me - our whole chaincode install pattern is based on being able to pass the go code as a stream rather than having to mount the CC in the containers. Do you have any plans to support indices in the other instantiate method?

aatkddny (Tue, 18 Sep 2018 13:24:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=BqTdqYDKyr5sm7abw) I think he means does the SDK support java 1.9

rrishmawi (Tue, 18 Sep 2018 13:25:06 GMT):
@rickr i dont follow you, what is the latest hyperledger fabric version that the java sdk supports?

rickr (Tue, 18 Sep 2018 13:25:24 GMT):
@aatkddny I don't think it should hold you back .. Just put the META-INF in your stream. That's all the SDK is doing

aatkddny (Tue, 18 Sep 2018 13:25:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GhsRAucdK7ymDdRhF) @rickr I did. It didn't work. That's what started this...

rrishmawi (Tue, 18 Sep 2018 13:26:25 GMT):
i mean by the "java sdk" --> the fabric-sdk-java

rickr (Tue, 18 Sep 2018 13:28:49 GMT):
@rrishmawi if you enat java 1.9 I've not tested but it should run 1.8 code .. right ? We don't plan to do a 1.9 build of the SDK.

rickr (Tue, 18 Sep 2018 13:28:49 GMT):
@rrishmawi if you meant java 1.9 I've not tested but it should run 1.8 code .. right ? We don't plan to do a 1.9 build of the SDK.

rickr (Tue, 18 Sep 2018 13:32:59 GMT):
@aatkddny where did you put the META-INF in same directory as `src` ? or in that directory ?

rrishmawi (Tue, 18 Sep 2018 13:33:07 GMT):
@rickr ok, thanks.

rrishmawi (Tue, 18 Sep 2018 13:36:50 GMT):
is there a .net equivalent to this sdk

aatkddny (Tue, 18 Sep 2018 13:37:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yW6Tj4tctTEqbrqfc) A code sample may help. This may look somewhat familiar... ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.info("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ```

aatkddny (Tue, 18 Sep 2018 13:37:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yW6Tj4tctTEqbrqfc) A code sample may help. This may look somewhat familiar... ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.info("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` My go source is in a folder /cc and called cc.go. under /cc is /META-INF... as described above

aatkddny (Tue, 18 Sep 2018 13:37:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yW6Tj4tctTEqbrqfc) A code sample may help. This may look somewhat familiar... ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src", ccid.getPath()); log.info("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(Util.generateTarGzInputStream(base.toFile(), src.toString())); ``` My go source is in a folder /aacc and called aacc.go. under /aacc is /META-INF... as described above

aatkddny (Tue, 18 Sep 2018 13:40:07 GMT):

cut.png

rickr (Tue, 18 Sep 2018 13:41:38 GMT):
@aatkddny that Util is just a test utility and was never updated for meta-file

aatkddny (Tue, 18 Sep 2018 13:42:29 GMT):
The fileUtils is set recursive though. Shouldn't that do it?

aatkddny (Tue, 18 Sep 2018 13:42:29 GMT):
The fileUtils is set recursive though. Shouldn't that do it? `Collection childrenFiles = org.apache.commons.io.FileUtils.listFiles(sourceDirectory, null, true);`

aatkddny (Tue, 18 Sep 2018 13:42:29 GMT):
The fileUtils is set recursive though. Shouldn't that do it? `Collection childrenFiles = org.apache.commons.io.FileUtils.listFiles(sourceDirectory, null, true);` And fixing the depreciated stuff in there has been on my TODO list for ever - I just never got round to it.

rrishmawi (Tue, 18 Sep 2018 13:43:27 GMT):
i am confused about newChannel method. does it createa new channel or does it create an new instance (for an existing channel) to interact with?

rickr (Tue, 18 Sep 2018 13:52:11 GMT):
@aatkddny I don't think they support a yaml file I would stick to json

rickr (Tue, 18 Sep 2018 13:55:36 GMT):
@rrishmawi Read the README.md once maybe twice .. It mentions integration test. Follow those preferably in a debugger. It should help alot

aatkddny (Tue, 18 Sep 2018 13:56:24 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7wrPJGmgmotg7zvNW) The sad thing is it was json. I was careless in my naming. But it still doesn't work even with a .json suffix

rickr (Tue, 18 Sep 2018 14:02:12 GMT):
I would take that ByteArrayInputStream in the utility write it a file (binay dump) then tar extract it to see what your really getting. If that looks good then work with the developers on #fabric-peer-endorser-committer showing them the content of your indices file and see what they have to say

tballast (Tue, 18 Sep 2018 14:17:04 GMT):
Looking to see if someone can point me to some documentation or clarify something when it comes to clients: What exactly is the role of a _user_ ? I know this probably seems like a stupid question - sorry about that - but I'm wondering because when read through the End2EndIT example it iterates through all organizations and enrolls an admin user as well as a regular user, but I'm not sure why this needs to be done for every single organization, or why you must have an admin and a regular user.

aatkddny (Tue, 18 Sep 2018 14:18:15 GMT):

cut2.png

gravity (Tue, 18 Sep 2018 14:53:12 GMT):
Hello after upgrade to fabric v1.2.0, some of peers getting stuck during transaction commit. for example, if a channel has 3 peers, one out of three is stuckduring transaction. no errors in logs on peer or orderer. if I restart a container for this peer, a transaction that stuck previously will proceed, but other peers tell this message in logs: ``` peer1-default-org | Failed obtaining connection for peer8-default-org:7051, PKIid:[13 148 83 230 154 35 173 0 16 141 110 78 210 23 72 254 254 177 143 36 136 23 72 84 31 6 16 18 221 34 107 223] reason: Authentication failure peer1-default-org | 2018-09-18 14:48:02.284 UTC [gossip/comm] createConnection -> WARN 0b0 Remote endpoint claims to be a different peer, expected [13 148 83 230 154 35 173 0 16 141 110 78 210 23 72 254 254 177 143 36 136 23 72 84 31 6 16 18 221 34 107 223] but got [150 240 229 156 3 99 225 102 191 218 203 23 157 199 128 193 234 5 145 223 71 70 226 49 39 199 119 61 33 207 214 55] ``` and logs on peer that was restarted: ``` peer8-default-org | 2018-09-18 14:48:02.480 UTC [gossip/comm] authenticateRemotePeer -> WARN 081 Failed reading messge from 172.21.0.14:36126, reason: Timed out waiting for connection message from 172.21.0.14:36126 peer8-default-org | 2018-09-18 14:48:02.480 UTC [gossip/comm] GossipStream -> ERRO 082 Authentication failed: Timed out waiting for connection message from 172.21.0.14:36126 ```

rickr (Tue, 18 Sep 2018 15:00:00 GMT):
If it's during commit on the peers you really need to work with the fabric developers on the #fabric-peer-endorser-committer channel

aatkddny (Tue, 18 Sep 2018 15:00:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DamFA3cjxCyeHYzAP) The sent me to #fabric-ledger who in turn have sent me back here.

dave.enyeart (Tue, 18 Sep 2018 15:01:59 GMT):
I did confirm that the package is not detected, so that confirms a packaging issue rather than an index issue.

dave.enyeart (Tue, 18 Sep 2018 15:01:59 GMT):
I did confirm that the package is not detected, so that confirms a packaging issue that needs to be worked on SDK side rather than an index issue.

dave.enyeart (Tue, 18 Sep 2018 15:11:22 GMT):
In the tar that SDK provides, META-INF must be the top level directory.

githubcpc (Tue, 18 Sep 2018 15:20:28 GMT):
@rickr I know these classes are generated code.But I don‘t find any .proto to generate them.Other generated code were running correctly.

githubcpc (Tue, 18 Sep 2018 15:24:05 GMT):
After I compiled protobuf files,these java files did not generated successfully.EventsGrpc,EndorserGrpc,DeliverGrpc,AtomicBroadcastGrpc.

rickr (Tue, 18 Sep 2018 15:25:41 GMT):
Don't know you're at this point the only one stating that

rickr (Tue, 18 Sep 2018 15:26:14 GMT):
can you get the end2endit tests to run ? following the README.md

githubcpc (Tue, 18 Sep 2018 15:26:46 GMT):
I am sure I hava followed the README.md . But I try to run the end2endit tests failed

rickr (Tue, 18 Sep 2018 15:30:40 GMT):
how did it fail ?

githubcpc (Tue, 18 Sep 2018 15:32:36 GMT):
the error is can not find these java

githubcpc (Tue, 18 Sep 2018 15:40:28 GMT):
Thanks anyway .I will try it again.

aatkddny (Wed, 19 Sep 2018 00:46:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bsRSBKCeYpYbcGwGQ) Thanks for the pointer - it works when META-INF is pulled out of the source directory. @rickr - if you want a code sample without the aggravation of writing something, the one below works. I wouldn't hold it up as an example of my best work, but it does what it is supposed to do. You need to call it with ``` Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src"); ipr.setChaincodeInputStream(Util.packageCCTarGzInputStream(base, src)); ``` ``` public static InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } private static void copyFile(File file, String fileName, TarArchiveOutputStream tos) throws IOException { if (file.isFile() && !file.isHidden()) { ArchiveEntry archiveEntry = new TarArchiveEntry(file, fileName); tos.putArchiveEntry(archiveEntry); try { if (file.isFile() && !file.isHidden()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); log.info("{} bytes copied", IOUtils.copy(bis, tos)); bis.close(); } } finally { tos.closeArchiveEntry(); } } } ```

aatkddny (Wed, 19 Sep 2018 00:46:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bsRSBKCeYpYbcGwGQ) Thanks for the pointer - it works when META-INF is pulled out of the source directory. @rickr If you want a code sample without the aggravation of writing something, the one below works. I wouldn't hold it up as an example of my best work, but it does what it is supposed to do. You need to call it with ``` Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src"); ipr.setChaincodeInputStream(Util.packageCCTarGzInputStream(base, src)); ``` ``` public static InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } private static void copyFile(File file, String fileName, TarArchiveOutputStream tos) throws IOException { if (file.isFile() && !file.isHidden()) { ArchiveEntry archiveEntry = new TarArchiveEntry(file, fileName); tos.putArchiveEntry(archiveEntry); try { if (file.isFile() && !file.isHidden()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); log.info("{} bytes copied", IOUtils.copy(bis, tos)); bis.close(); } } finally { tos.closeArchiveEntry(); } } } ```

aatkddny (Wed, 19 Sep 2018 00:46:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bsRSBKCeYpYbcGwGQ) Thanks for the pointer - it works when META-INF is pulled out of the source directory. @rickr If you want a code sample without the aggravation of writing something, the one below works. I wouldn't hold it up as an example of my best work, but it does what it is supposed to do. You can dump `bos` to a file after `aos.close()` to see structure. You need to call it with ``` Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src"); ipr.setChaincodeInputStream(Util.packageCCTarGzInputStream(base, src)); ``` ``` public static InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } private static void copyFile(File file, String fileName, TarArchiveOutputStream tos) throws IOException { if (file.isFile() && !file.isHidden()) { ArchiveEntry archiveEntry = new TarArchiveEntry(file, fileName); tos.putArchiveEntry(archiveEntry); try { if (file.isFile() && !file.isHidden()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); log.info("{} bytes copied", IOUtils.copy(bis, tos)); bis.close(); } } finally { tos.closeArchiveEntry(); } } } ```

aatkddny (Wed, 19 Sep 2018 00:46:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bsRSBKCeYpYbcGwGQ) Thanks for the pointer - it works when META-INF is pulled out of the source directory. @rickr If you want a code sample without the aggravation of writing something, the one below works. I wouldn't hold it up as an example of my best work, but it does what it is supposed to do. You can dump `bos` to a file after `aos.close()` to see structure. Code assumes structure /CC_Directory with both the /META-INF directory and the .go files inside. It tacks "src" on the front of anything that's not in META-INF. You need to call it with ``` Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src"); ipr.setChaincodeInputStream(Util.packageCCTarGzInputStream(base, src)); ``` ``` public static InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } private static void copyFile(File file, String fileName, TarArchiveOutputStream tos) throws IOException { if (file.isFile() && !file.isHidden()) { ArchiveEntry archiveEntry = new TarArchiveEntry(file, fileName); tos.putArchiveEntry(archiveEntry); try { if (file.isFile() && !file.isHidden()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); log.info("{} bytes copied", IOUtils.copy(bis, tos)); bis.close(); } } finally { tos.closeArchiveEntry(); } } } ```

aatkddny (Wed, 19 Sep 2018 00:46:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bsRSBKCeYpYbcGwGQ) Thanks for the pointer - it works when META-INF is pulled out of the source directory. @rickr If you want a code sample without the aggravation of writing something, the one below works. I wouldn't hold it up as an example of my best work, but it does what it is supposed to do. You can dump `bos` to a file after `aos.close()` to see structure. Code assumes structure /CC_Directory with both the /META-INF directory and the .go files inside. It tacks "src" on the front of anything that's not in META-INF. You need to call it with ``` Path base = Paths.get(basePath, chaincodePath, ccid.getPath()); Path src = Paths.get("src"); ipr.setChaincodeInputStream(Util.packageCCTarGzInputStream(base, src)); ``` ``` public static InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } private static void copyFile(File file, String fileName, TarArchiveOutputStream tos) throws IOException { if (!file.isHidden()) { ArchiveEntry archiveEntry = new TarArchiveEntry(file, fileName); tos.putArchiveEntry(archiveEntry); try { if (file.isFile()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file)); log.info("{} bytes copied", IOUtils.copy(bis, tos)); bis.close(); } } finally { tos.closeArchiveEntry(); } } } ```

rickr (Wed, 19 Sep 2018 13:36:51 GMT):
The SDK will handle the correct structuring of the META-INF if the application uses it's APIs to create it from the a source on disk. If the application's choice is to provide chaincode from a stream it's assumes the burden that the stream has it correctly structured. Every SDK should not need to document that structure @dave.enyeart that should be adequately documneted in the Fabric.

rickr (Wed, 19 Sep 2018 13:36:51 GMT):
The SDK will handle the correct structuring of the META-INF if the application uses it's APIs to create it from the a source on disk. If the application's choice is to provide chaincode from a stream it's assumes the burden that the stream has it correctly structured. Every SDK should not need to document that structure @dave.enyeart that should be adequately documented in the Fabric.

rickr (Wed, 19 Sep 2018 13:36:51 GMT):
The SDK will handle the correct structuring of the META-INF if the application uses it's APIs to create it from source on disk. If the application's choice is to provide chaincode from a stream it's assumes the burden that the stream has it correctly structured. Every SDK should not need to document that structure @dave.enyeart that should be adequately documented in the Fabric.

rickr (Wed, 19 Sep 2018 13:36:51 GMT):
The SDK will handle the correct structuring of the META-INF if the application uses it's APIs to create it from source on disk. If the application's choice is to provide chaincode from a stream it assumes the burden that the stream has it correctly structured. Every SDK should not need to document that structure @dave.enyeart that should be adequately documented in the Fabric.

rickr (Wed, 19 Sep 2018 13:36:51 GMT):
The SDK will handle the correct structuring of the META-INF if the application uses it's APIs to create it from source on disk. If the application's choice is to provide chaincode from a stream it assumes the burden that the stream has it correctly structured. Every SDK should not need to document that structure @dave.enyeart that should be adequately documented in the Fabric. @aatkddny It appears given the confusion that's not the case.

gravity (Thu, 20 Sep 2018 14:38:49 GMT):
Hi all is there something similar in Java SDK to CLI `fabric-ca-client identity modify`? for example, if I want to update attributes for a user, can I do this via Java SDK?

gravity (Thu, 20 Sep 2018 14:38:49 GMT):
Hi all is there something similar in Java SDK to CLI `fabric-ca-client identity modify`? for example, if I want to update attributes for a user, can I do this via Java SDK? UPD: found it it could be done using `update` method from the `HFCAIdentity` class

sjeetSingh (Thu, 20 Sep 2018 18:15:14 GMT):
Has joined the channel.

ibmamnt (Tue, 25 Sep 2018 02:59:34 GMT):
Hi, suppose we have 3 eventhub registered. It looks like Java SDK wait for all events from eventhub for a single transaction complete. Is there anyway to specify any of eventhub ? I see setN() method in Channel.java code.

ibmamnt (Tue, 25 Sep 2018 03:08:09 GMT):
end2endMTIT.java tells us it might be possible by reading the comment below. ``` //Specify what events should complete the interest in this transaction. This is the default // for all to complete. It's possible to specify many different combinations like //any from a group, all from one group and just one from another or even None(NOfEvents.createNoEvents). // See. Channel.NOfEvents ```

coolsvap (Tue, 25 Sep 2018 07:51:25 GMT):
Has left the channel.

rickr (Tue, 25 Sep 2018 13:32:39 GMT):
@ibmamnt https://github.com/hyperledger/fabric-sdk-java/blob/f64bf5af0dd3f9d99c2dcc1e372a03f65bed0983/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L528-L530

rickr (Tue, 25 Sep 2018 13:32:39 GMT):
@ibmamnt https://github.com/hyperledger/fabric-sdk-java/blob/f64bf5af0dd3f9d99c2dcc1e372a03f65bed0983/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L528-L530 More examples of it's usage https://github.com/hyperledger/fabric-sdk-java/blob/f64bf5af0dd3f9d99c2dcc1e372a03f65bed0983/src/test/java/org/hyperledger/fabric/sdk/ChannelTest.java#L869-L926

rickr (Tue, 25 Sep 2018 13:37:20 GMT):
You can create NOfEvents groupings. Be default all need to be completed; however, you an set `N` `setN` which is how many in that group need to show completion. So by default all, setN(1) = any

rickr (Tue, 25 Sep 2018 13:41:17 GMT):
@ibmamnt Also Eventhubs are going away, you should be using Peer eventing services. I don't know why people tend to look at the End2endMTIT as the README.md point to other examples. En2endMTIT is not necessarily kept up to date.

tballast (Tue, 25 Sep 2018 14:02:26 GMT):
@rickr Are EventHubs going away in 1.3? Or are they just being deprecated right now?

rickr (Tue, 25 Sep 2018 14:04:05 GMT):
The JSDK still has code to manage them for Fabric <1.3. But Fabric 1.3 no longer has Eventhub support.

tballast (Tue, 25 Sep 2018 14:04:26 GMT):
Good to know, thanks.

ibmamnt (Wed, 26 Sep 2018 00:40:07 GMT):
@rickr Thanks !

BhavathiReddy1 (Wed, 26 Sep 2018 05:36:27 GMT):
Has joined the channel.

BhavathiReddy1 (Wed, 26 Sep 2018 05:39:28 GMT):
I am running peers from two different organisations on different nodes. Once I start a channel on one peer (say the first peer), how to I join to that channel from a different peer (second peer)? "mychannel = fabClient.getInstance().getChannel(Config.CHANNEL_NAME)" returns null to mychannel when running on the second peer.

BhavathiReddy1 (Wed, 26 Sep 2018 05:39:28 GMT):
I am running peers from two different organisations on different nodes. Once I initialize a channel on one peer (say the first peer), how to I join to that channel from a different peer (second peer)? "mychannel = fabClient.getInstance().getChannel(Config.CHANNEL_NAME)" returns null to mychannel when running on the second peer.

BhavathiReddy1 (Wed, 26 Sep 2018 05:40:07 GMT):
Thanks in advance!!!

RichieLiu (Wed, 26 Sep 2018 07:19:20 GMT):
Has joined the channel.

leusgrif (Wed, 26 Sep 2018 07:55:24 GMT):
@BhavathiReddy1 ``` Channel channel = client.getChannel(channelName); if (channel == null) { channel = client.newChannel(channelName); channel.addOrderer(client.newOrderer(ordererName, config.getOrdererUrl(ordererName), config.getOrdererProperties(ordererName))); } Peer peer = client.newPeer(peerName, peerLocation, peerProperties); channel.joinPeer(peer, peerOptionsMap.get(peerName)); } ```

leusgrif (Wed, 26 Sep 2018 07:55:24 GMT):
@BhavathiReddy1 ``` Channel channel = client.getChannel(channelName); if (channel == null) { channel = client.newChannel(channelName); channel.addOrderer(client.newOrderer(ordererName, OrdererUrl, OrdererProperties)); } Peer peer = client.newPeer(peerName, peerLocation, peerProperties); channel.joinPeer(peer, peerOptions); ```

leusgrif (Wed, 26 Sep 2018 07:55:24 GMT):
@BhavathiReddy1 ``` Channel channel = client.getChannel(channelName); if (channel == null) { channel = client.newChannel(channelName); channel.addOrderer(client.newOrderer(ordererName, OrdererUrl, OrdererProperties)); } Peer peer = client.newPeer(peerName, peerLocation, peerProperties); channel.joinPeer(peer, peerOptions); channel.initialize(); ```

tballast (Wed, 26 Sep 2018 08:57:09 GMT):
While trying to run the End2EndIT test on the v1.3-SNAPSHOT I am running into the following error when trying to sun from IntelliJ: ``` Error:(52, 171) java: cannot find symbol symbol: method getRole() location: variable signerConfig of type org.hyperledger.fabric.protos.msp.MspConfig.IdemixMSPSignerConfig ``` where the offending function looks like the following: ``` public User getUser(String id) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException { MspConfig.IdemixMSPSignerConfig signerConfig = readIdemixMSPConfig(Paths.get(this.mspId, USER_PATH + id).toString()); PublicKey revocationPk = readIdemixRevocationPublicKey(this.mspId); BIG sk = BIG.fromBytes(signerConfig.getSk().toByteArray()); IdemixCredential cred = new IdemixCredential(Idemix.Credential.parseFrom(signerConfig.getCred())); Idemix.CredentialRevocationInformation cri = Idemix.CredentialRevocationInformation.parseFrom(signerConfig.getCredentialRevocationInformation()); /****PROBLEM LINE BELOW****/ IdemixEnrollment enrollment = new IdemixEnrollment(this.ipk, revocationPk, this.mspId, sk, cred, cri, signerConfig.getOrganizationalUnitIdentifier(), signerConfig.getRole()); return new IdemixUser(id, this.mspId, enrollment); } ```

tballast (Wed, 26 Sep 2018 08:57:09 GMT):
While trying to run the End2EndIT test on the v1.3-SNAPSHOT I am running into the following error when trying to run from IntelliJ using jre v10: ``` Error:(52, 171) java: cannot find symbol symbol: method getRole() location: variable signerConfig of type org.hyperledger.fabric.protos.msp.MspConfig.IdemixMSPSignerConfig ``` where the offending function looks like the following: ``` public User getUser(String id) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException { MspConfig.IdemixMSPSignerConfig signerConfig = readIdemixMSPConfig(Paths.get(this.mspId, USER_PATH + id).toString()); PublicKey revocationPk = readIdemixRevocationPublicKey(this.mspId); BIG sk = BIG.fromBytes(signerConfig.getSk().toByteArray()); IdemixCredential cred = new IdemixCredential(Idemix.Credential.parseFrom(signerConfig.getCred())); Idemix.CredentialRevocationInformation cri = Idemix.CredentialRevocationInformation.parseFrom(signerConfig.getCredentialRevocationInformation()); /****PROBLEM LINE BELOW****/ IdemixEnrollment enrollment = new IdemixEnrollment(this.ipk, revocationPk, this.mspId, sk, cred, cri, signerConfig.getOrganizationalUnitIdentifier(), signerConfig.getRole()); return new IdemixUser(id, this.mspId, enrollment); } ```

tballast (Wed, 26 Sep 2018 08:57:09 GMT):
While trying to run the End2EndIT test on the v1.3-SNAPSHOT I am running into the following error when trying to run from IntelliJ using jre v10: ``` Error:(52, 171) java: cannot find symbol symbol: method getRole() location: variable signerConfig of type org.hyperledger.fabric.protos.msp.MspConfig.IdemixMSPSignerConfig ``` where the offending function looks like the following (in file `src/main/java/org/hyperledger/fabric/sdk/user/IdemixUserStore.java`) : ``` public User getUser(String id) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException { MspConfig.IdemixMSPSignerConfig signerConfig = readIdemixMSPConfig(Paths.get(this.mspId, USER_PATH + id).toString()); PublicKey revocationPk = readIdemixRevocationPublicKey(this.mspId); BIG sk = BIG.fromBytes(signerConfig.getSk().toByteArray()); IdemixCredential cred = new IdemixCredential(Idemix.Credential.parseFrom(signerConfig.getCred())); Idemix.CredentialRevocationInformation cri = Idemix.CredentialRevocationInformation.parseFrom(signerConfig.getCredentialRevocationInformation()); /****PROBLEM LINE BELOW****/ IdemixEnrollment enrollment = new IdemixEnrollment(this.ipk, revocationPk, this.mspId, sk, cred, cri, signerConfig.getOrganizationalUnitIdentifier(), signerConfig.getRole()); return new IdemixUser(id, this.mspId, enrollment); } ```

tballast (Wed, 26 Sep 2018 08:57:23 GMT):
Anyone else run into this?

rickr (Wed, 26 Sep 2018 11:44:16 GMT):
@BhavathiReddy1 this may be a better example to look at .. take some time and follow : https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

rickr (Wed, 26 Sep 2018 11:45:48 GMT):
@tballast that was a recent update. Code is probably out of sync.

JaishankarGothandaraman (Wed, 26 Sep 2018 20:41:25 GMT):
Hi, I’m running into below error when my client running on Mac connects to the ‘First network’ network on ubuntu. Note, it works fine if I run the docker in my Mac but throws error if the network run on ubuntu. Here is the code snippet // initialize channel // peer name and endpoint in fabcar network Peer peer = client.newPeer("peer0.org1.example.com", "grpc://192.168.56.101:7051"); // eventhub name and endpoint in fabcar network EventHub eventHub = client.newEventHub("eventhub01", "grpc://192.168.56.101:7053"); // orderer name and endpoint in fabcar network Orderer orderer = client.newOrderer("orderer.example.com", "grpc://192.168.56.101:7050"); // channel name in fabcar network Channel channel = client.newChannel("mychannel"); channel.addPeer(peer); channel.addEventHub(eventHub); channel.addOrderer(orderer); channel.initialize(); return channel; Docker container $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 97c5bf824c93 dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab "chaincode -peer.add…" 7 seconds ago Up 6 seconds dev-peer1.org2.example.com-mycc-1.0 a5b007342c5e dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 "chaincode -peer.add…" 28 seconds ago Up 27 seconds dev-peer0.org1.example.com-mycc-1.0 28c63e997edc dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b "chaincode -peer.add…" 48 seconds ago Up 47 seconds dev-peer0.org2.example.com-mycc-1.0 d854228e53ae hyperledger/fabric-tools:latest "/bin/bash" About a minute ago Up About a minute cli f37f026639e3 hyperledger/fabric-peer:latest "peer node start" About a minute ago Up About a minute 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com 1e41bfc1d04f hyperledger/fabric-peer:latest "peer node start" About a minute ago Up About a minute 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com 32edbf44b45b hyperledger/fabric-orderer:latest "orderer" About a minute ago Up About a minute 0.0.0.0:7050->7050/tcp orderer.example.com 15a1b37f63c3 hyperledger/fabric-peer:latest "peer node start" About a minute ago Up About a minute 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com e7203fcd8858 hyperledger/fabric-peer:latest "peer node start" About a minute ago Up About a minute 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com

JaishankarGothandaraman (Wed, 26 Sep 2018 20:41:52 GMT):
2018-09-26 20:19:44,382 main ERROR Channel:3619 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=INTERNAL, description=http2 exception, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:350) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:251) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:450) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) } java.lang.Exception: io.grpc.StatusRuntimeException: INTERNAL: http2 exception at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3619) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:834) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1759) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1596) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1083) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExampleUbuntu.getChannel(HFJavaSDKBasicExampleUbuntu.java:171)

rickr (Wed, 26 Sep 2018 22:27:13 GMT):
firewalls on Ubuntu ?

rickr (Wed, 26 Sep 2018 22:30:51 GMT):
try telnet to it ?

JaishankarGothandaraman (Thu, 27 Sep 2018 02:07:28 GMT):
i did ssh to the machine from my mac

JaishankarGothandaraman (Thu, 27 Sep 2018 02:09:45 GMT):
firewall is disabled'

rickr (Thu, 27 Sep 2018 12:24:59 GMT):
Have not seen that error nor recall anyone else reporting. The only things come to mind is something interfering like firewall or not connecting to what you think are. You could look at that specific peer's log and see if it shows anything interesting.

gravity (Thu, 27 Sep 2018 14:36:06 GMT):
hello is there any way to mock attributes that are required for ABAC in tests?

JaishankarGothandaraman (Thu, 27 Sep 2018 16:55:48 GMT):
i have disabled TLS in the 'first network' and now i'm getting this error

JaishankarGothandaraman (Thu, 27 Sep 2018 16:56:03 GMT):
2018-09-27 16:52:22,815 main ERROR Channel:3619 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3619) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:834) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1759) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1596) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1083) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExampleUbuntu.getChannel(HFJavaSDKBasicExampleUbuntu.java:164) at org.hyperledger.fabric.sdkintegration.HFJavaSDKBasicExampleUbuntu.main(HFJavaSDKBasicExampleUbuntu.java:65) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:468) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)

rickr (Thu, 27 Sep 2018 17:01:40 GMT):
Most likely your user context credentials are wrong. look at both mspid or enrollment/certificate . should see something on the Peer side too.

gravity (Fri, 28 Sep 2018 11:10:57 GMT):
Hello Is it actually a good practice to write your own `MockStub` for chaincode tests?

rickr (Fri, 28 Sep 2018 12:18:19 GMT):
If your looking for techniques/practices to mock/test chaincode there's probably a wider audience for that on #fabric-chaincode-dev channel.

sivak2018 (Sat, 29 Sep 2018 04:24:42 GMT):
Has joined the channel.

fanliyan (Sun, 30 Sep 2018 07:49:12 GMT):
Has joined the channel.

kisna (Mon, 01 Oct 2018 03:54:51 GMT):
How can we generate the channel.tx file programatically? I only see an option to load the tx file to update the same channel but not to create a completely new channel?

kisna (Mon, 01 Oct 2018 04:49:46 GMT):
after removing all images and switching back to 1.2 and running mvn integration tests, they start to fail? `Failed tests: End2endAndBackAgainIT.setup:215->runFabricTest:260->reconstructChannel:699 Peer peer1.org1.example.com does not appear to belong to channel foo End2endAndBackAgainNodeIT.setup:35->End2endAndBackAgainIT.runFabricTest:260->End2endAndBackAgainIT.reconstructChannel:699 Peer peer1.org1.example.com does not appear to belong to channel foo PrivateDataIT.setup:135 ServiceDiscoveryIT.setup:112 UpdateChannelIT.setup:125->reconstructChannel:259 Peer peer0.org1.example.com does not appear to belong to channel foo Tests in error: End2endIT.setup:194->runFabricTest:211->constructChannel:836 » Transaction Bad... End2endNodeIT.setup:49->End2endIT.runFabricTest:211->constructChannel:59 NullPointer NetworkConfigIT.doMainSetup:193->deployChaincodeIfRequired:207->checkInstantiatedChaincode:538 » Proposal Tests run: 47, Failures: 5, Errors: 3, Skipped: 2, Time elapsed: 27.29 sec <<< FAILURE! - in org.hyperledger.fabric.sdkintegration.IntegrationSuite setup(org.hyperledger.fabric.sdkintegration.End2endIT) Time elapsed: 3.493 sec <<< ERROR! org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 400, Channel foo at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:836) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:211) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:194) RUNNING: NetworkConfigIT. 2018-10-01 04:40:30,624 main ERROR Channel:3619 - Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [foo] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3619) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:834) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1759) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1596) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1083) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.constructChannel(NetworkConfigIT.java:532) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.deployChaincodeIfRequired(NetworkConfigIT.java:203) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.doMainSetup(NetworkConfigIT.java:193) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP] `

kisna (Mon, 01 Oct 2018 04:49:46 GMT):
after removing all images and switching back to 1.2 and running mvn integration tests, they start to fail? `Failed tests: End2endAndBackAgainIT.setup:215->runFabricTest:260->reconstructChannel:699 Peer peer1.org1.example.com does not appear to belong to channel foo End2endAndBackAgainNodeIT.setup:35->End2endAndBackAgainIT.runFabricTest:260->End2endAndBackAgainIT.reconstructChannel:699 Peer peer1.org1.example.com does not appear to belong to channel foo PrivateDataIT.setup:135 ServiceDiscoveryIT.setup:112 UpdateChannelIT.setup:125->reconstructChannel:259 Peer peer0.org1.example.com does not appear to belong to channel foo Tests in error: End2endIT.setup:194->runFabricTest:211->constructChannel:836 » Transaction Bad... End2endNodeIT.setup:49->End2endIT.runFabricTest:211->constructChannel:59 NullPointer NetworkConfigIT.doMainSetup:193->deployChaincodeIfRequired:207->checkInstantiatedChaincode:538 » Proposal RUNNING: End2endIT. Tests run: 47, Failures: 5, Errors: 3, Skipped: 2, Time elapsed: 27.29 sec <<< FAILURE! - in org.hyperledger.fabric.sdkintegration.IntegrationSuite setup(org.hyperledger.fabric.sdkintegration.End2endIT) Time elapsed: 3.493 sec <<< ERROR! org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 400, Channel foo at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:836) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:211) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:194) RUNNING: NetworkConfigIT. 2018-10-01 04:40:30,624 main ERROR Channel:3619 - Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [foo] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3619) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:834) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1759) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1596) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1083) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.constructChannel(NetworkConfigIT.java:532) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.deployChaincodeIfRequired(NetworkConfigIT.java:203) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.doMainSetup(NetworkConfigIT.java:193) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP] `

kisna (Mon, 01 Oct 2018 04:49:46 GMT):
after removing all images and switching back to 1.2 and running mvn integration tests, they start to fail? sdkintegration$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/fabric-ca 1.2.0 66cc132bd09c 2 months ago 252 MB hyperledger/fabric-tools 1.2.0 379602873003 2 months ago 1.51 GB hyperledger/fabric-ccenv 1.2.0 6acf31e2d9a4 2 months ago 1.43 GB hyperledger/fabric-orderer 1.2.0 4baf7789a8ec 2 months ago 152 MB hyperledger/fabric-peer 1.2.0 82c262e65984 2 months ago 159 MB `Failed tests: End2endAndBackAgainIT.setup:215->runFabricTest:260->reconstructChannel:699 Peer peer1.org1.example.com does not appear to belong to channel foo End2endAndBackAgainNodeIT.setup:35->End2endAndBackAgainIT.runFabricTest:260->End2endAndBackAgainIT.reconstructChannel:699 Peer peer1.org1.example.com does not appear to belong to channel foo PrivateDataIT.setup:135 ServiceDiscoveryIT.setup:112 UpdateChannelIT.setup:125->reconstructChannel:259 Peer peer0.org1.example.com does not appear to belong to channel foo Tests in error: End2endIT.setup:194->runFabricTest:211->constructChannel:836 » Transaction Bad... End2endNodeIT.setup:49->End2endIT.runFabricTest:211->constructChannel:59 NullPointer NetworkConfigIT.doMainSetup:193->deployChaincodeIfRequired:207->checkInstantiatedChaincode:538 » Proposal RUNNING: End2endIT. Tests run: 47, Failures: 5, Errors: 3, Skipped: 2, Time elapsed: 27.29 sec <<< FAILURE! - in org.hyperledger.fabric.sdkintegration.IntegrationSuite setup(org.hyperledger.fabric.sdkintegration.End2endIT) Time elapsed: 3.493 sec <<< ERROR! org.hyperledger.fabric.sdk.exception.TransactionException: Bad newest block expected status 200 got 400, Channel foo at org.hyperledger.fabric.sdkintegration.End2endIT.constructChannel(End2endIT.java:836) at org.hyperledger.fabric.sdkintegration.End2endIT.runFabricTest(End2endIT.java:211) at org.hyperledger.fabric.sdkintegration.End2endIT.setup(End2endIT.java:194) RUNNING: NetworkConfigIT. 2018-10-01 04:40:30,624 main ERROR Channel:3619 - Sending proposal to peer1.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [foo] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3619) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:834) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1759) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1596) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1083) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.constructChannel(NetworkConfigIT.java:532) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.deployChaincodeIfRequired(NetworkConfigIT.java:203) at org.hyperledger.fabric.sdkintegration.NetworkConfigIT.doMainSetup(NetworkConfigIT.java:193) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP] `

kisna (Mon, 01 Oct 2018 04:51:21 GMT):
am I missing something? or do I have to clean up something else?

kisna (Mon, 01 Oct 2018 05:00:28 GMT):
@rickr ?

kisna (Mon, 01 Oct 2018 05:00:28 GMT):
yuck, that was docker on mac os, needed a restart :(?

kisna (Mon, 01 Oct 2018 05:39:54 GMT):
but anyone knows what was happening here?

halilkalkan (Mon, 01 Oct 2018 10:56:58 GMT):
Has joined the channel.

rickr (Mon, 01 Oct 2018 11:40:13 GMT):
@kisna There is no way to create a channel.tx from _scratch_.

rickr (Mon, 01 Oct 2018 11:44:39 GMT):
@kisna You need to restart the fabric each time you run the test and the test require to be run in the order as they are run in the integration tests.

kisna (Mon, 01 Oct 2018 16:36:58 GMT):
thanks

tsnyder (Tue, 02 Oct 2018 06:17:22 GMT):
I have been working through the End2EndIT.java example (v1.2) and am having trouble understanding how to set up Peer Event Services for a particular Peer. The former way of setting up event hubs and registering a BlockEventListener now seems to generate responses from all the Peers. Questons - 1) I am presuming that for PeerEventServices I should no longer instantiate an EventHub. I see where PeerOptions has an EventSource but this seems to still be within the constraints of a Channel/Peer.

tsnyder (Tue, 02 Oct 2018 06:18:56 GMT):
2) Is there an example somewhere where we are setting a BlockEVentListener specific to a single Peer on all channels authorized on the Peer?

rickr (Tue, 02 Oct 2018 12:46:49 GMT):
@tsnyder Eventhub have been deprecated. They will no longer work with Fabric 1.3 peers. The blocklistners will get events from every peer. The events identify which peer so the application can filter.

tballast (Tue, 02 Oct 2018 14:54:11 GMT):
Has anyone successfully ran the 1.3 End2End example, withour receiving the following error: ``` Error:(52, 171) java: cannot find symbol symbol: method getRole() location: variable signerConfig of type org.hyperledger.fabric.protos.msp.MspConfig.IdemixMSPSignerConfig ```

rickr (Tue, 02 Oct 2018 16:43:26 GMT):
Somehow your project is out of date. Get the latest code, delete your *.m2* directory to have maven download all fresh packages

karthick15v (Wed, 03 Oct 2018 07:00:52 GMT):
Has joined the channel.

RockyRacer (Wed, 03 Oct 2018 07:34:58 GMT):
Still no way to create new channel from SDK ? I successfully read existing channels but cannot create one

cinnnn (Wed, 03 Oct 2018 07:56:06 GMT):
Has joined the channel.

rickr (Wed, 03 Oct 2018 12:17:44 GMT):
If your asking can you create the needed channel.tx from scratch . no.

rickr (Wed, 03 Oct 2018 12:21:01 GMT):
There have been others that have created a template one then used https://github.com/hyperledger/fabric-sdk-java/blob/8e631c1a70bd2e336aa76dfaf33fff7a29c08918/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java to update that to create a new one.

aatkddny (Wed, 03 Oct 2018 22:25:57 GMT):
It is possible create it from scratch if you are willing to think outside the box a little and you can get the signatures of the orgs required to create the channel. You can use some kind of templating setup to dynamically create your config file and then something like a process builder to run a configtxgen to create the channel.tx. You can use that to create the ChannelConfiguration, after which you need to grab the signatures and create the channel. I'm pretty sure I remember cribbing from an example that was provided for that piece.

mrudav.shukla (Thu, 04 Oct 2018 04:34:02 GMT):
Few queries regarding Java SDK: 1. Does the Java SDK v1.2 support the multi-org and multi-channel fabric v1.2 network? 2. Is there support for the private ledger data feature of Fabric in java sdk? 3. Is the Java SDK 1.2 in GA?

darapich92 (Thu, 04 Oct 2018 04:36:46 GMT):
Hello everybody, i am new in developing hyperledger fabric java sdk. the problem i meet is i cannot run junit test of End2endIT.java. anybody please give me some advice. thank you

darapich92 (Thu, 04 Oct 2018 05:03:33 GMT):
and also when i import fabric java sdk there has some problems related to import org.hyperledger.fabric.protos cannot be found? so you know how to solve it? thank you very much.

rickr (Thu, 04 Oct 2018 11:27:43 GMT):
@darapich92 follow the README.md ?

rickr (Thu, 04 Oct 2018 11:27:43 GMT):
@darapich92 follow the README.md ? https://github.com/hyperledger/fabric-sdk-java#running-the-integration-tests

rickr (Thu, 04 Oct 2018 11:29:49 GMT):
@mrudav.shukla AFAIK the SDK supports all features of Fabric. Yes 1.2 has been released.

mrudav.shukla (Thu, 04 Oct 2018 11:31:07 GMT):
@rickr Ok. Great!

aatkddny (Thu, 04 Oct 2018 12:13:46 GMT):
I'm getting a timeout trying to create a channel since I moved my network (and it grew).

aatkddny (Thu, 04 Oct 2018 12:13:46 GMT):
I'm getting a timeout trying to create a channel since I moved my network. One of these - `org.hyperledger.fabric.sdk.exception.TransactionException: Getting block time exceeded 5 seconds for channel xxx` I'm guessing I need to edit `org.hyperledger.fabric.sdk.channel.genesisblock_wait_time`. Has anyone else hit this problem when they have a bigger network or is it a result of switching to a multi-server network and the additional delay involved there? I saw the comment in Channel about kafka not being ready and wondered if there was a way to make sure it's tee'd up with a heartbeat or similar.

aatkddny (Thu, 04 Oct 2018 12:13:46 GMT):
I'm getting a timeout trying to create a channel since I moved my network. One of these - `org.hyperledger.fabric.sdk.exception.TransactionException: Getting block time exceeded 5 seconds for channel xxx` I'm guessing I need to edit `org.hyperledger.fabric.sdk.channel.genesisblock_wait_time`, but I'm running in a spring boot environment and I'm finding it awkward to figure out how to insert it without making it a vm property. Has anyone else hit this problem when they have a bigger network or is it a result of switching to a multi-server network and the additional delay involved there? I saw the comment in Channel about kafka not being ready and wondered if there was a way to make sure it's tee'd up with a heartbeat or similar.

aatkddny (Thu, 04 Oct 2018 12:13:46 GMT):
I'm getting a timeout trying to create a channel since I moved my network. One of these - `org.hyperledger.fabric.sdk.exception.TransactionException: Getting block time exceeded 5 seconds for channel xxx` I'm guessing I need to edit `org.hyperledger.fabric.sdk.channel.genesisblock_wait_time` and I'll try injecting it in using the switch to uppercase and replace . with _ trick. Has anyone else hit this problem when they have a bigger network or is it a result of switching to a multi-server network and the additional delay involved there? I saw the comment in Channel about kafka not being ready and wondered if there was a way to make sure it's tee'd up with a heartbeat or similar. Also as a followup has anyone else seen these? ```2018-10-04 08:31:35.332 ERROR 50154 --- [nio-8095-exec-1] i.g.i.ManagedChannelOrphanWrapper : *~*~*~ Channel ManagedChannelImpl{logId=21, target=:30001} was not shutdown properly!!! ~*~*~* Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.``` It seems to be coming from here - ``` java.lang.RuntimeException: ManagedChannel allocation site at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.(ManagedChannelOrphanWrapper.java:103) ~[grpc-core-1.13.2.jar:1.13.2] ``` and it looks like it can be ignored, but I'd like to be sure...

aatkddny (Thu, 04 Oct 2018 12:13:46 GMT):
I'm getting a timeout trying to create a channel since I moved my network. One of these - `org.hyperledger.fabric.sdk.exception.TransactionException: Getting block time exceeded 5 seconds for channel xxx` I'm guessing I need to edit `org.hyperledger.fabric.sdk.channel.genesisblock_wait_time` and I'll try injecting it in using the switch to uppercase and replace . with _ trick. Has anyone else hit this problem when they have a bigger network or is it a result of switching to a multi-server network and the additional delay involved there? I saw the comment in Channel about kafka not being ready and wondered if there was a way to make sure it's tee'd up with a heartbeat or similar.

rickr (Thu, 04 Oct 2018 13:02:30 GMT):
No. But I only work with _toy_ networks! Given this is probably due to Fabric scaling you'd probably get better answers on one of their channels. #fabric-peer-endorser-committer #fabric-orderer

aatkddny (Thu, 04 Oct 2018 13:12:56 GMT):
This isn't that big - it's for the pilot. It's 18 orgs with 2 peers each. It didn't fit well inside a single docker image so I had to move it to kubernetes. The problem is most likely the hypervisor for VMs that the cluster is running on seeing no activity and swapping everything out, but that's out of my control. I'm halfway through reconstituting it and I'll see if upping the wait property makes it go away.

aatkddny (Thu, 04 Oct 2018 13:12:56 GMT):
This isn't that big - it's for the pilot. It's 18 orgs with 2 peers each. It didn't fit well inside a single docker image so I had to move it to kubernetes. The problem is most likely the hypervisor for VMs that the cluster is running on seeing no activity and swapping everything out, but that's out of my control. I'm halfway through reconstituting it and I'll see if upping the wait property makes it go away. If it doesn't then I'll try getting them to move it to bare metal.

aatkddny (Thu, 04 Oct 2018 13:12:56 GMT):
This isn't that big - it's for the pilot. It's 18 orgs with 2 peers each. Turns into a couple of hundred containers or so before you start installing and instantiating chaincode. It didn't fit well inside a single docker image so I had to move it to kubernetes. The problem is most likely the hypervisor for VMs that the cluster is running on seeing no activity and swapping everything out, but that's out of my control. I'm halfway through reconstituting it and I'll see if upping the wait property makes it go away. If it doesn't then I'll try getting them to move it to bare metal.

ffiore81 (Thu, 04 Oct 2018 15:09:32 GMT):
Has joined the channel.

qiangqinqq (Sat, 06 Oct 2018 07:37:37 GMT):
Has joined the channel.

gravity (Sun, 07 Oct 2018 09:19:46 GMT):
Hello is there any way to read attributes from a certificate? for example, if I registered an identity with the attribute `admin=true:ecert`, can I check this attribute from SDK?

gravity (Sun, 07 Oct 2018 09:19:46 GMT):
Hello is there any way to read attributes from a certificate? for example, if I registered an identity with the attribute `admin=true:ecert`, can I check this attribute from SDK? UPD: it can be found in `HFCAIdentity`

fanliyan (Mon, 08 Oct 2018 07:54:18 GMT):
what's wrong when I start End2endIT of fabric-sdk-java? error info:"errors":[{"code":0,"message":"CA 'ca0' does not exist"}],"messages":[]}

fanliyan (Mon, 08 Oct 2018 07:56:15 GMT):

云之家图片20181008155515.png

rickr (Mon, 08 Oct 2018 10:56:14 GMT):
Did you start up fabric as described in the readme.md ? https://github.com/hyperledger/fabric-sdk-java#latest-builds-of-fabric-and-fabric-ca-v130

fanliyan (Mon, 08 Oct 2018 11:13:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eX2azEEQrRoQdmSiq) @rickr Yes,I ran "./fabric.sh restart" each time the Integration tests are run.

rickr (Mon, 08 Oct 2018 11:24:55 GMT):
I think you changed something in the tests incorrectly. The ports are not the same as should be 7054 and 8054. The two Fabric CAs have a slightly different set up as can be seen by the docker-compose.yaml. For testing purposes ca0 is using a named instance `- FABRIC_CA_SERVER_CA_NAME=ca0` while ca1 is not. I think somehow in what changes you did you got them possibly crossed and the test would fail as shown above.

nikolas (Mon, 08 Oct 2018 16:18:55 GMT):
Hi, how can I get the certificate of the client that made a transaction from the transaction event? I am using sdk 1.2.1

rickr (Mon, 08 Oct 2018 16:36:04 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/b69a3e3cde489d0519e9e9b953c685b4c6fd05b1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L938

emiliastk (Mon, 08 Oct 2018 23:26:01 GMT):
Hi! At what point can I be 100% sure that my transaction has been added to the ledger? Is it when I get a Future back and that Future report OK? Or do I need to do further checks? What is a fast way to fetch the history of a key? Would I have to go through the whole ledger if I want if for a few keys?

fanliyan (Tue, 09 Oct 2018 02:37:15 GMT):
In End2endIT in fabric-sdk-java, some containers failed to start after./fabirc up so that SDK ran out of operation.

RockyRacer (Tue, 09 Oct 2018 06:59:13 GMT):
Why does `blockInfo.transactionCount()` returns 0, while `blockInfo.getEnvelopeCount()` returns 1 and envelopeInfos contains transaction info ?

rickr (Tue, 09 Oct 2018 11:10:27 GMT):
Most likely an update/config block

rickr (Tue, 09 Oct 2018 11:19:48 GMT):
@emiliastk The transaction is on the ledger of the peers you're listening to with peer eventing services or eventhubs when the future is cleared. There's some chance it's not cleared yet on any other peers. You shouldn't need to do any other checks -- but wouldn't hurt :) From the SDK I think only going through the blocks and transaction would get you the history of the keys. There may be a better way to do that in chaincode ( ask on: #fabric-java-chaincode )

RockyRacer (Tue, 09 Oct 2018 11:27:56 GMT):
Ah ok it make sense, thx

rickr (Tue, 09 Oct 2018 12:13:46 GMT):
@emiliastk Was just told of `GetHistoryForKey()` chaincode api I've not done much with it so not sure if it fits your needs. You could write chaincode that calls that and returns that information.

emiliastk (Tue, 09 Oct 2018 20:48:59 GMT):
@rickr thank you! I'll try that. :)

aatkddny (Wed, 10 Oct 2018 11:59:08 GMT):
@emiliastk I didn't write this so I'm not saying it's the best Go code ever written (but it does work). You can crib from this as a start if it helps. ``` var jsonBytes []byte var historyIterator shim.HistoryQueryIteratorInterface var err error historyIterator, err = api.GetHistoryForKey(id) defer historyIterator.Close() // ensure to close after this function is done if err == nil { var v interface{} result := make([]interface{}, 0) for historyIterator.HasNext() { keyModifiction, err := historyIterator.Next() if err == nil { assetHistory := AssetHistory{} assetHistory.TxID = keyModifiction.GetTxId() assetHistory.Timestamp = time.Unix(keyModifiction.GetTimestamp().Seconds, int64(keyModifiction.GetTimestamp().Nanos)).String() assetHistory.IsDelete = keyModifiction.GetIsDelete() json.Unmarshal(keyModifiction.Value, &v) assetHistory.Value = v result = append(result, assetHistory) } else { return jsonBytes, err } } jsonBytes, err = json.Marshal(&result) } return jsonBytes, err } ```

aatkddny (Wed, 10 Oct 2018 12:00:14 GMT):
assetHistory is our wrapper around the object here. this was to show you the call in situ

kesavants (Wed, 10 Oct 2018 19:24:47 GMT):
Given a block binary data does fabric java sdk provide API to introspect the read write set

rickr (Wed, 10 Oct 2018 19:29:51 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/b69a3e3cde489d0519e9e9b953c685b4c6fd05b1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L908-L1071 ?

kesavants (Wed, 10 Oct 2018 19:44:49 GMT):
Wow thanks should have read this code before

skykira (Thu, 11 Oct 2018 06:54:42 GMT):
Has joined the channel.

skykira (Thu, 11 Oct 2018 07:03:10 GMT):

jietu.png

skykira (Thu, 11 Oct 2018 07:03:44 GMT):
Hello~When I ran this program for the second time, it showed a bug like the one. I can successfully connect to the port, and there is no problem with the fabric network, so how can find the reason

skykira (Thu, 11 Oct 2018 07:03:44 GMT):
Thank u! let me try it

tkg (Thu, 11 Oct 2018 09:32:38 GMT):
Is it possible to submit a signed transaction via the SDK?

rickr (Thu, 11 Oct 2018 09:51:43 GMT):
@skykira it's a timing issue but it's taken care of cause it's retried.

rickr (Thu, 11 Oct 2018 09:53:21 GMT):
@tkg The SDK does all the signing needed for endorsing proposals and transactions.

ShobhitSrivastava (Thu, 11 Oct 2018 11:03:03 GMT):
Hey @rickr ..I am stuck in one of the issue. It is I have to get endorsement from two peers. These 2 peers are in different org. In java sdk i add two peer in one channel and invoke a code. But in "consistencyGroups" it is more then 1 and hence I am getting exception. How should i get endorsement form two peers.

rickr (Thu, 11 Oct 2018 11:28:31 GMT):
@ShobhitSrivastava I'm not sure what your exact issue is given the description. I have created an application that illustrates getting endorsements from two orgs https://github.com/cr22rc/fabricSDKJavaMultiDomainSample _Usually_ the inconsistency like that is not because of multiple orgs but because the chaincode on each peer is writing something different to the ledger.

ShobhitSrivastava (Thu, 11 Oct 2018 11:33:25 GMT):
thanks @rickr for the reply. I will check that, In chaincode I am actually creating time in UTC in each peer which could be giving different output as chaincodes would be getting invoked in delay of few seconds? Can this be the problem for this?

rickr (Thu, 11 Oct 2018 11:33:57 GMT):
Sounds very likely

ShobhitSrivastava (Thu, 11 Oct 2018 11:36:23 GMT):
okay. Thanks man

kesavants (Fri, 12 Oct 2018 18:29:09 GMT):
does java sdk support peer connection/orderer connection grpcs over proxy with basic/ntlm authentication

yacovm (Fri, 12 Oct 2018 18:33:16 GMT):
are you asking if the java SDK supports connecting to peers over basic auth or with NTLM???

kesavants (Fri, 12 Oct 2018 19:59:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZB9xxfuxHPf85bZ4J) @yacovm yes if java SDK supports connecting to peers and orderers through proxy with basic and NTLM authentication

yacovm (Fri, 12 Oct 2018 19:59:55 GMT):
peers have fabric authentication

yacovm (Fri, 12 Oct 2018 20:00:14 GMT):
no basic auth / NTLM/ kerberos, LDAP, etc.

kesavants (Fri, 12 Oct 2018 20:01:07 GMT):
Ok thx so there is no ability to connect to peers&orderers via a proxy then

yacovm (Fri, 12 Oct 2018 20:25:23 GMT):
you can connect via a proxy

yacovm (Fri, 12 Oct 2018 20:25:37 GMT):
i don't understand your use case

yacovm (Fri, 12 Oct 2018 20:25:44 GMT):
but this channel isn't the right one to discuss it

rickr (Fri, 12 Oct 2018 20:53:27 GMT):
I know of cases people are using JSDK through proxy/loadbalancer there is no other authentication other than x509 and now idemix in 1.3.0. But I too are not sure what it is your asking

mattremy (Sat, 13 Oct 2018 09:58:28 GMT):
Hi, Does the java sdk support installing chaincodes generated using peer chaincode package command? The example programs creates a tar ball and uses it.

davidkel (Sat, 13 Oct 2018 13:28:30 GMT):
Has joined the channel.

leusgrif (Mon, 15 Oct 2018 09:21:11 GMT):
@rickr Hello! I notice that you asked about configure grpc maxMessageSize on "fabric-peer" channel. Did you found an answer for this question?

leusgrif (Mon, 15 Oct 2018 09:21:11 GMT):
@rickr Hello! I notice that you asked about configure grpc maxMessageSize on peer side on "fabric-peer" channel. Did you found an answer for this question?

leusgrif (Mon, 15 Oct 2018 09:23:37 GMT):
On our server we recieving

leusgrif (Mon, 15 Oct 2018 09:23:37 GMT):
On our server(based on java sdk) we recieving

leusgrif (Mon, 15 Oct 2018 09:23:39 GMT):
``` gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=grpc: trying to send message larger than max (135630307 vs. 104857600), cause=null} ```

leusgrif (Mon, 15 Oct 2018 09:24:25 GMT):
and it looks like this limit set on peer size

leusgrif (Mon, 15 Oct 2018 09:24:25 GMT):
and it looks like this limit set on peer size. On out peer we use "grpc.NettyChannelBuilderOption.maxInboundMessageSize": 204857600

leusgrif (Mon, 15 Oct 2018 09:24:25 GMT):
and it looks like this limit set on peer size. In server peer config we use "grpc.NettyChannelBuilderOption.maxInboundMessageSize": 204857600

leusgrif (Mon, 15 Oct 2018 09:24:25 GMT):
and it looks like this limit set on peer side. In server peer config we use "grpc.NettyChannelBuilderOption.maxInboundMessageSize": 204857600

leusgrif (Mon, 15 Oct 2018 09:24:25 GMT):
and it looks like this limit set on peer side. on our server we use peer config with "grpc.NettyChannelBuilderOption.maxInboundMessageSize": 204857600

mastersingh24 (Mon, 15 Oct 2018 10:49:11 GMT):
@leusgrif - the max message size for the peer and orderer is currently 100MB

leusgrif (Mon, 15 Oct 2018 11:03:25 GMT):
@mastersingh24 Thx for the answer. Do you know is there any possibility to change it without peer recompiling?

rickr (Mon, 15 Oct 2018 12:13:46 GMT):
@mattremy No.

tballast (Mon, 15 Oct 2018 12:52:00 GMT):
In the java sdk there are two different classes, `QueryByChaincodeRequest` and `TransactionProposalRequest`, which are, as far as I can tell, the exact same. Any idea why they both exist? (links to each class: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/QueryByChaincodeRequest.java and https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/TransactionProposalRequest.java)

mattremy (Mon, 15 Oct 2018 15:00:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HY76MFcX5j5qe5i7E) @rickr thanks for the info. Is there any plans to include it in a future release (This would help resolve a lot of headaches while managing ChaincodeStubInterface across a highly disparate environment)

rickr (Mon, 15 Oct 2018 15:02:25 GMT):
@mattremy not sure _I'm_ going to invest time in it as it will soon be changing entirely

PaulaBanks (Tue, 16 Oct 2018 05:28:14 GMT):
Has joined the channel.

PaulaBanks (Tue, 16 Oct 2018 05:31:08 GMT):
@tuand Hi. I have a question about your end to end scenario tutorial. I see as if you are running the two peers on the same machine. Is that the case? What if I want to set up a network with the peers running on different nodes? I am a beginner trying to understand how the network is set up with different participants.

gravity (Tue, 16 Oct 2018 11:01:24 GMT):
hi @rickr I'm trying to enroll a user using the SDK then TLS is enabled but getting the next exception: ``` javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty ``` enrollment request looks like this: ``` final EnrollmentRequest enrollmentRequest = new EnrollmentRequest(); enrollmentRequest.setProfile("tls"); enrollmentRequest.addHost("localhost"); final Enrollment enrollment = hfcaClient.enroll(enrollmentId, enrollmentSecret, enrollmentRequest); ``` Have I missed something? thanks in advance

rickr (Tue, 16 Oct 2018 11:32:49 GMT):
The enrollment shouldn't have anything to do with it. The issues you have is with SSL. Bet I can tell you don't have valid certificate it like.

rickr (Tue, 16 Oct 2018 11:32:49 GMT):
The enrollment shouldn't have anything to do with it. The issues you have is with SSL. Seems it doesn't like your certificate is my initial take.

gravity (Tue, 16 Oct 2018 12:23:32 GMT):
how to check if I have valid certificate or not? and how to provide it?

gravity (Tue, 16 Oct 2018 12:59:57 GMT):
@rickr which one should I use to initialize HFCAClient to enroll users?

kesavants (Tue, 16 Oct 2018 13:19:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fzNeyLB8FbAKyJpST) @rickr The use case is block chain platform is hosted on cloud the java service layer has to connect to this but the it has to go through corporate http proxy like squid. This http proxy server is configured to use NTLM authentication

rickr (Tue, 16 Oct 2018 13:50:36 GMT):
@kesavants I'm not sure sure how the the grpc protocol would deal with that. Since you know best your requirements I'd start with on asking https://groups.google.com/forum/#!forum/grpc-io

halilkalkan (Tue, 16 Oct 2018 13:53:25 GMT):
Hi I have another question, when I run the End2EndIt.java second time, it will stuck at "Constructing channel foo" even if I run ./fabric.sh restart command. For the first time it was worked perfectly and I want to run it again but it doesn't work. Any suggestions? :)

rickr (Tue, 16 Oct 2018 15:09:04 GMT):
Not seen that behavior .. is it really consistent ? Try turning trace on see exactly where it's _struck_

gravity (Wed, 17 Oct 2018 06:03:26 GMT):
Actually I've set a correct certificate, but getting an exception when trying to initialize a channel. `Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching localhost found.` I've added peers to channel using peer `crt` and `key` certificates and as long as I run an application on my local machine, peer location looks like this: `hfClient.newPeer("peer1-default-org", "grpcs://localhost:6004", properties);` 6004 is mapped to 7051 port on peer's container. am I doing something wrong?

gravity (Wed, 17 Oct 2018 06:05:32 GMT):
and HFCAClient is configured with the next properties: ``` properties.put("allowAllHostNames", "true"); properties.put("pemBytes", bytes); ```

rickr (Wed, 17 Oct 2018 12:03:12 GMT):
@gravity The properties for Peers/Orderers/Eventhubs are different than CA. They're a little hidden look at https://github.com/hyperledger/fabric-sdk-java/blob/0c6ff37b5de29501f885f7b7fe22c3e491fbe323/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L397

gravity (Wed, 17 Oct 2018 12:58:02 GMT):
@rickr thanks, will take a look

gravity (Wed, 17 Oct 2018 20:01:15 GMT):
Does anyone succeed with configuration update when add new org to a channel using SDK? actually, update transaction was successful, but when I'm trying to add a peer from new org to channel, it simply doesn't know about this channel when I attempt to fetch config block for the channel I'm getting this error: ``` 2018-10-17 19:51:14.854 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized 2018-10-17 19:51:14.855 UTC [cli/common] readBlock -> INFO 002 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} ``` how to make new org know about joining to a new channel in another org?

gravity (Wed, 17 Oct 2018 20:01:15 GMT):
Does anyone succeed with configuration update when add new org to a channel using SDK? actually, update transaction was successful, but when I'm trying to add a peer from new org to channel, it simply doesn't know about this channel when I attempt to fetch config block for the channel I'm getting this error: ``` 2018-10-17 19:51:14.854 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized 2018-10-17 19:51:14.855 UTC [cli/common] readBlock -> INFO 002 Got status: &{NOT_FOUND} Error: can't read the block: &{NOT_FOUND} ``` how to let new org know about joining to a new channel in another org?

aatkddny (Wed, 17 Oct 2018 23:15:06 GMT):
there's an sdk call to do this now?

aatkddny (Wed, 17 Oct 2018 23:15:06 GMT):
there's an sdk call to do this now?

halilkalkan (Thu, 18 Oct 2018 06:11:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jDf3wXL3ojybHaghQ) @rickr I have tried to add attribute to client and after editing End2EndIT.java file it doesnt work after.. I cannot understand, if you have time I can share you where I stuck at explicitly.

halilkalkan (Thu, 18 Oct 2018 06:11:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jDf3wXL3ojybHaghQ) @rickr I have tried to add attribute to client and after editing End2EndIT.java file it doesnt work after.. I cannot understand, if you have time I can share you where I stuck at explicitly.

halilkalkan (Thu, 18 Oct 2018 06:11:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jDf3wXL3ojybHaghQ) @rickr I have tried to add attribute to client and after editing End2EndIT.java file it doesnt work after.. I cannot understand, if you have time I can share you where I stuck at explicitly. Update: I have tried to add for instance "email" attribute with following command but I think it causes a problem, SampleUser user = sampleStore.getMember(testUser1, sampleOrg.getName()); if (!user.isRegistered()) { // users need to be registered AND enrolled RegistrationRequest rr = new RegistrationRequest(user.getName(), "org1.department1"); user.setEnrollmentSecret(ca.register(rr, admin)); }

halilkalkan (Thu, 18 Oct 2018 06:11:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jDf3wXL3ojybHaghQ) @rickr I have tried to add attribute to client and after editing End2EndIT.java file it doesnt work after.. I cannot understand, if you have time I can share you where I stuck at explicitly. Update: I have tried to add for instance "email" attribute with following command but I think it causes a problem, I have added into End2EndIT.java SampleUser user = sampleStore.getMember(testUser1, sampleOrg.getName()); if (!user.isRegistered()) { // users need to be registered AND enrolled RegistrationRequest rr = new RegistrationRequest(user.getName(), "org1.department1"); rr.addAttribute(new Attribute("email", "abc123@gmail.com",true)); <---- I have inserted a line here user.setEnrollmentSecret(ca.register(rr, admin)); }

gravity (Thu, 18 Oct 2018 09:05:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dAsXpGLHmQMptZWzp) @aatkddny I've done it similar to this test: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java but in my case, I've updated the `Application.groups` block by adding an information about a new organization

RockyRacer (Thu, 18 Oct 2018 09:42:41 GMT):
Hi, is Java SDK 1.2 Java 11 compatible (openjdk) ?

aatkddny (Thu, 18 Oct 2018 11:27:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=df3aM8mQkLiCxQ3hh) Thats how I did it. It's just when you said SDK call I thought you meant it was encapsulated.

rickr (Thu, 18 Oct 2018 11:38:01 GMT):
@RockyRacer We only test java 8.0

rickr (Thu, 18 Oct 2018 11:38:01 GMT):
@RockyRacer We only test java 8.

RockyRacer (Thu, 18 Oct 2018 11:42:20 GMT):
OK thanks, I'm giving it a try :)

aatkddny (Thu, 18 Oct 2018 12:23:55 GMT):
With Oracle moving to a paid licensing model, what are the plans for java versioning going forward? OpenJDK?

rickr (Thu, 18 Oct 2018 12:39:57 GMT):
We test with OpenJDK. The JSDK doesn't ship with any JRE . Off the bat not connecting how any Oracle licensing would impact it.

aatkddny (Thu, 18 Oct 2018 13:02:13 GMT):
because we currently use oracle's java 8 rather than openjdk. But since Larry needs a new island starting with the next major release we will be switching to an open version. I wanted to be sure we weren't going to be the guinea pigs for testing jvm compatibilities.

gravity (Thu, 18 Oct 2018 13:07:12 GMT):
currently we are running the application on OpenJDK and everything is fine, have not noticed anything wrong with it

akoenig (Thu, 18 Oct 2018 13:08:11 GMT):
Hi, didn't find a comment in the code. But why has the peer object in the java-sdk only one channel? When we want to join the peer to another channel it will throw an exception, because it's already in one? Because HFL without the sdk allows one peer in more channels

rickr (Thu, 18 Oct 2018 13:10:49 GMT):
yes you need a new instance of a peer object for each channel

rickr (Thu, 18 Oct 2018 13:10:49 GMT):
yes you need a new instance of a peer object for each channel .. Think of it as just the connection .. it really the same peer. :wink:

akoenig (Thu, 18 Oct 2018 13:29:06 GMT):
ah okay, thanks for the info. Was a bit confused by the naming so :)

akoenig (Thu, 18 Oct 2018 13:35:17 GMT):
but why not just a map of channels? Just curious about the implementation :) the other informations are all the same?

aatkddny (Thu, 18 Oct 2018 13:40:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yPFSmPTzJvubkJPQN) I'm talking about when we need to switch to the next LTS version. 11 or whatever it is. We aren't leaving 8 until we have to.

skarim (Thu, 18 Oct 2018 13:40:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RLQPM2eyfc3j8j5at) @halilkalkan when you say it doesn't work you mean that the attribute is not registered for that identity or that when you enroll it does not show in the enrollment certificate?

RockyRacer (Thu, 18 Oct 2018 15:31:03 GMT):
Simply have to exclude guava dependency from the hyperledger dependency, then upgrade jaxb and javassist versions for java 11, and it seems hyperledger works great with OpenJDK 11 :)

kesavants (Thu, 18 Oct 2018 18:28:28 GMT):
In scenario where service layer using java sdk registers block listener and chaincode listener and start receiving events. But when the application shutsdown and restarts it start receiving the blocks which was already received and processed. Is this as per design if so is there a way to specify start block to listener?

rickr (Thu, 18 Oct 2018 20:10:40 GMT):
chaincode events ?

kesavants (Thu, 18 Oct 2018 20:12:55 GMT):
sorry block events

rickr (Thu, 18 Oct 2018 20:14:08 GMT):
eventing peer or eventhubs ?

rickr (Thu, 18 Oct 2018 20:14:42 GMT):
You should always just get the last block each time you connect

rickr (Thu, 18 Oct 2018 20:14:59 GMT):
for eventing peers

kesavants (Thu, 18 Oct 2018 20:18:16 GMT):
Ok thx was looking at PeerEventServiceClient given Ab.SeekPosition.Builder start = Ab.SeekPosition.newBuilder(); if (null != peerOptions.getNewest()) {

rickr (Thu, 18 Oct 2018 20:20:49 GMT):
IMO the best strategy would record the block # and only act on newer blocks

rickr (Thu, 18 Oct 2018 20:28:52 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/0c6ff37b5de29501f885f7b7fe22c3e491fbe323/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L763

kesavants (Thu, 18 Oct 2018 20:29:52 GMT):
Is this controlled via PeerOptions I see newest set to true without any setter for this. Also there is a problem if al blocks are delievered for example if I have 100k blocks and I start my service layer it will be load on the peer to deliver all these events

kesavants (Thu, 18 Oct 2018 20:31:56 GMT):
peerOptions.getNewest() will always be Boolean.TRUE as there is no setter no? if (null != peerOptions.getNewest()) { start.setNewest(Ab.SeekNewest.getDefaultInstance()); } else if (peerOptions.getStartEvents() != null) { start.setSpecified(Ab.SeekSpecified.newBuilder().setNumber(peerOptions.getStartEvents())); } else { start.setNewest(Ab.SeekNewest.getDefaultInstance()); }

kesavants (Thu, 18 Oct 2018 20:32:18 GMT):
Above code in PeerEventServiceClient

rickr (Thu, 18 Oct 2018 20:33:04 GMT):
look at the example https://github.com/hyperledger/fabric-sdk-java/blob/0c6ff37b5de29501f885f7b7fe22c3e491fbe323/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L282

halilkalkan (Fri, 19 Oct 2018 07:08:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xQm2ukJ7KEAtawAKK) @skarim actually I couldnt figure out the difference between idemix enrollment and regular x509 enrollment. I'm trying to get attributes from chaincode and see differences but I couldnt find any difference between idemix user and x509 user..

halilkalkan (Fri, 19 Oct 2018 07:08:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xQm2ukJ7KEAtawAKK) @skarim actually I couldnt figure out the difference between idemix enrollment and regular x509 enrollment. I'm trying to get attributes from chaincode and see differences but I couldnt find any difference between idemix user and x509 user.. I mean, which attributes are not revelead when we use idemix credential?

skarim (Fri, 19 Oct 2018 13:35:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ueNYsTuwwt6zdgpDT) @halilkalkan from the chaincode perspective, idemix is limited in what attributes you can get in chaincode. Right now the only attributes for idemix you can get in chaincode is 'role' and 'ou'. X509 allows for custom attributes and then you can access those in chaincode.

halilkalkan (Fri, 19 Oct 2018 13:47:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2h3RMQtG8Q4bqPYsD) @skarim Hi Skarim, I am able to idemix certification now but from chaincode perspective I cannot retrieve OU or Role attributes. How should I define or get those attributes in chaincode? When I use x509 I can see those data.

RockyRacer (Fri, 19 Oct 2018 13:49:43 GMT):
Off chance, anyone used the Java SDK in a Spring Boot application with TLS enabled ? I get SSL exceptions I don't have with standard Java/Tomcat app

skarim (Fri, 19 Oct 2018 14:34:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KwoTXq8kQ4tsAX272) @halilkalkan Please take a look at this sample: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/sdkintegration/gocc/sampleIdemix/src/github.com/example_cc/example_cc.go#L87-L107

aatkddny (Fri, 19 Oct 2018 14:48:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3xWqqjwzuphEQrChr) Yes, but I don't remember what we did. You are past the "you have to include net-tcnative" step I assume.

RockyRacer (Fri, 19 Oct 2018 15:01:48 GMT):
When moving to spring boot I just changed the way I read certificate files (was reading them from user.dir webapps folder, now I use ClassPathResource)

RockyRacer (Fri, 19 Oct 2018 15:02:08 GMT):
I tried adding last netty-tcnative dependency, but still no luck

RockyRacer (Fri, 19 Oct 2018 15:02:38 GMT):
``` cause=java.lang.AbstractMethodError at io.netty.internal.tcnative.SSL.readFromSSL(Native Method) at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.readPlaintextData(ReferenceCountedOpenSslEngine.java:488) [...] ```

RockyRacer (Fri, 19 Oct 2018 15:02:38 GMT):
``` Sending proposal to peer1.myorg.ch failed because of: gRPC failure=Status{code=UNKNOWN, description=null, cause=java.lang.AbstractMethodError at io.netty.internal.tcnative.SSL.readFromSSL(Native Method) [...] java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN [...] Caused by: io.grpc.StatusRuntimeException: UNKNOWN [...] Caused by: java.lang.AbstractMethodError: null [...] at io.netty.internal.tcnative.SSL.readFromSSL(Native Method) ~[netty-tcnative-boringssl-static-2.0.10.Final.jar:2.0.10.Final] ```

RockyRacer (Fri, 19 Oct 2018 15:05:14 GMT):
sdk already include netty-tcnative-boringssl so it should not be required

angelsuarez (Fri, 19 Oct 2018 15:19:50 GMT):
Has joined the channel.

rickr (Fri, 19 Oct 2018 15:32:32 GMT):
I don't have experience with using spring boot -- However I would like if there's some _special magic_ that makes it work add that to the SDKs documentation.

rickr (Fri, 19 Oct 2018 15:32:32 GMT):
I don't have experience with using the sdk with spring boot -- However I would like if there's some _special magic_ that makes it work add that to the SDKs documentation.

aatkddny (Fri, 19 Oct 2018 15:46:59 GMT):
Ok I went back to look. I'm not sure which of these does it because it was a long time ago this was all coded. In the project there is a bootstrap directory with ``` alpn-boot-8.1.11.v20170118.jar netty-tcnative-2.0.6.Final.jar netty-tcnative-boringssl-static-2.0.6.Final.jar ``` pom has ``` io.netty netty-tcnative 2.0.6.Final provided ``` We are using 2.0.3 and Finchley for spring-cloud See also this: https://github.com/googleapis/google-cloud-java/issues/2528 I *think* it's the pom provided that does it from what I remember - we had the bootstrap dir in the class path at one point but then istr that went away with a later version of spring boot Hope that helps.

aatkddny (Fri, 19 Oct 2018 15:46:59 GMT):
Ok I went back to look. I'm not sure which of these does it because it was a long time ago this was all coded. In the project there is a bootstrap directory with ``` alpn-boot-8.1.11.v20170118.jar netty-tcnative-2.0.6.Final.jar netty-tcnative-boringssl-static-2.0.6.Final.jar ``` pom has ``` io.netty netty-tcnative 2.0.6.Final provided ``` We are using 2.0.3 and Finchley for spring-cloud See also this: https://github.com/googleapis/google-cloud-java/issues/2528 I *think* it's the pom `provided that does it from what I remember - we had the bootstrap dir in the class path at one point but then istr that went away with a later version of spring boot Hope that helps.

aatkddny (Fri, 19 Oct 2018 15:46:59 GMT):
Ok I went back to look. I'm not sure which of these does it because it was a long time ago this was all coded. In the project there is a bootstrap directory with ``` alpn-boot-8.1.11.v20170118.jar netty-tcnative-2.0.6.Final.jar netty-tcnative-boringssl-static-2.0.6.Final.jar ``` pom has ``` io.netty netty-tcnative 2.0.6.Final provided ``` We are using 2.0.3 and Finchley for spring-cloud See also this: https://github.com/googleapis/google-cloud-java/issues/2528 I *think* it's the pom `provided` that does it from what I remember - we had the bootstrap dir in the class path at one point but then istr that went away with a later version of spring boot Hope that helps.

aatkddny (Fri, 19 Oct 2018 15:52:23 GMT):
One other thing which is stating the obvious - are you sure the `ClassPathResource` is returning the correct Resource? I had a couple of instances where I wasn't picking up JSON configuration from my static directory because I had a typo in the resource search string.

aatkddny (Fri, 19 Oct 2018 15:52:23 GMT):
One other thing which is stating the obvious - are you sure the `ClassPathResource` is returning the correct Resource? I had a couple of instances where I wasn't picking up JSON configuration from my static directory because I had a typo in the resource search string.

RockyRacer (Fri, 19 Oct 2018 18:24:49 GMT):
Thanks, I try to get back on this as soon as possible and let you know

jdfigure (Fri, 19 Oct 2018 20:20:29 GMT):
Hi All - is there a way to increase the gRPC DEFAULT_MAX_MESSAGE_SIZE at runtime? When querying transaction blocks we're getting `java.lang.Exception: io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: gRPC message exceeds maximum size 4194304: 4211429`.

rickr (Fri, 19 Oct 2018 20:30:26 GMT):
@jdfigure Did follow the examples in the integration tests on setting the properties on the Peer objects ?

jdfigure (Fri, 19 Oct 2018 20:31:33 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CiJhK7etRuZEcsijf) @rickr I didn't but will take a look now - thanks!

gravity (Sat, 20 Oct 2018 12:00:18 GMT):
Hi @rickr I'm running a network v1.2.1 with the SDK v1.2.1 and trying to update a channel config (implementation based on UpdateChannelIT.java) Actually, update proceeds successfully, but I'm getting this exception when call `channel.updateChannelConfiguration(updateChannelConfiguration, hfClient.getUpdateChannelConfigurationSignature(updateChannelConfiguration, ordererAdmin));` Exception message: https://pastebin.com/W1dQPtT7 Channel configuration: https://pastebin.com/PCmSpWHr Looks like update transaction is not interrupted be exception, but it looks odd.

AsifJaved (Sat, 20 Oct 2018 14:52:09 GMT):
Has joined the channel.

AsifJaved (Sat, 20 Oct 2018 14:56:09 GMT):
hi, how can i deploy our transactions on web interface using java-sdk?

emiliastk (Mon, 22 Oct 2018 06:08:50 GMT):
threads

aarshleadiq (Mon, 22 Oct 2018 06:59:51 GMT):
Has joined the channel.

aarshleadiq (Mon, 22 Oct 2018 07:01:02 GMT):
Hi guys, my name is Aarsh. We use Hyperledger fabric backed by CouchDB to store records with a lot of text. We want to build a solution that allows free text search on these records using Elastic Search. The problem then is getting the fabric/CouchDB data & updates into elastic search in real time. What's the best way to do it ? I believe hyperlerdger fabric peers provide something called 'event services' which publish events every time it writes to the ledger.

aarshleadiq (Mon, 22 Oct 2018 07:01:02 GMT):
Hi guys, my name is Aarsh. We use Hyperledger fabric backed by CouchDB to store records with a lot of text. We want to build a solution that allows free text search on these records using Elastic Search. The problem then is getting the fabric/CouchDB data & updates into elastic search in real time. What's the best way to do it ? I believe hyperlerdger fabric peers provide something called 'event services' which publish events every time it writes to the ledger.

aarshleadiq (Mon, 22 Oct 2018 07:01:02 GMT):
Hi guys, my name is Aarsh. We use Hyperledger fabric backed by CouchDB to store records with a lot of text. We want to build a solution that allows free text search on these records using Elastic Search. The problem then is getting the fabric/CouchDB data & updates into elastic search in real time. For this, we want to consume events/writes/updates from Hyperledger as they happen and write them to Elastic Search. I believe hyperlerdger fabric peers provide something called 'event services' which publish events every time it writes to the ledger.

aarshleadiq (Mon, 22 Oct 2018 07:01:42 GMT):
Here's a documentation on how to do it using the Node SDK : https://fabric-sdk-node.github.io/tutorial-channel-events.html

aarshleadiq (Mon, 22 Oct 2018 07:02:41 GMT):
However, on playing around with the Java SDK, I see that it still uses the old concept of event hubs instead of the new channel based events API that the node sdk supports.

aarshleadiq (Mon, 22 Oct 2018 07:03:15 GMT):
Is there any recommended way/examples on how to achieve something like this with the Java SDK ?

fanliyan (Mon, 22 Oct 2018 09:17:19 GMT):
I queryed transcation by txID when I invoke chaincode to save transcation, and then make a mistake: UNKNOWN: chaincode error (status: 500, message: Failed to get block for txID 99c00c1049312f84c38ce13ce0a921b1e1ca87fac6c0806e8c8fe3d01712072f, error Entry not found in index)。I guess that caused by delaying.Is there any way to solve this problem?

halilkalkan (Mon, 22 Oct 2018 12:01:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=p2SrtstGHdiAAe6Hc) @skarim Thank you Skarim, with my custom method it wasnt working properly but I have followed identiymixer integration test now it can return "ou" and "role" attribute and the other attributes are not shown as mentioned in document. Thank you for your support.

rickr (Mon, 22 Oct 2018 13:50:30 GMT):
@gravity My guess is the operation you're doing is with credentials that don't have reader/writer permission on that channel.

rickr (Mon, 22 Oct 2018 13:51:48 GMT):
@AsifJaved You would have to use the JSDK in a webapp that handled the HTTP requests you wanted.

rickr (Mon, 22 Oct 2018 13:59:09 GMT):
@aarshleadiq The JSDK handles both. You register a block listener which has what the source of the event was either a peer event service or an eventhub which is no longer supported in Fabric 1.3. Most everything the JSDK is done in the integration tests. https://github.com/hyperledger/fabric-sdk-java/blob/0c6ff37b5de29501f885f7b7fe22c3e491fbe323/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L813-L847

gravity (Mon, 22 Oct 2018 14:12:11 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6CeJoLfYuwtdiMqjw) @rickr but the transaction is completed successfully, channel config is updated

gravity (Mon, 22 Oct 2018 14:14:20 GMT):
is there any information when the SDK 1.3.0 is going to be released?

rickr (Mon, 22 Oct 2018 14:56:10 GMT):
@gravity None of this is really specific to any SDK. Each SDK provides the means to execute the APIs The channel configuration needs to be documented in Fabric.

gravity (Mon, 22 Oct 2018 15:05:59 GMT):
thanks and one more question. is SDK v.1.2.2 fully compatible with fabric v 1.3.0? and is there any information when SDK 1.3.0 is going to be released?

gravity (Mon, 22 Oct 2018 15:05:59 GMT):
@rickr thanks and one more question. is SDK v.1.2.2 fully compatible with fabric v 1.3.0? and is there any information when SDK 1.3.0 is going to be released?

rickr (Mon, 22 Oct 2018 15:11:50 GMT):
There's no guarantee of upward compatibility. If you want to use Fabric 1.3 follow the README.md in master for 1.3 snapshot .

gravity (Mon, 22 Oct 2018 15:36:56 GMT):
thanks

kesavants (Mon, 22 Oct 2018 16:26:58 GMT):
Looking at java code comment for "ChaincodeEventListener should not be long lived as they can take up thread resources". Looking at source looks like the listener is called in a separate thread client.getExecutorService().execute(() -> chaincodeEventListener.received(handle, blockEvent, ce)); and the HFClient executor service is a unbounded threadpool (Integer.MAX). Does it make sense to size the threadpool via config settings so that service layer can make use of this useful feature for long lived applications

BilginIbryam (Mon, 22 Oct 2018 16:44:30 GMT):
Has joined the channel.

BilginIbryam (Mon, 22 Oct 2018 16:48:30 GMT):
newbie here. I've followed fabric getting started guide and executed a few queries with nodejs. What is the best way to do the same in java? basically looking forward for a hello world with the java sdk now

rickr (Mon, 22 Oct 2018 16:51:15 GMT):
@BilginIbryam How reading the README.md ?

BilginIbryam (Mon, 22 Oct 2018 16:51:44 GMT):
I'm looking for a step by step tutorial that will give a working example

BilginIbryam (Mon, 22 Oct 2018 16:52:21 GMT):
basically how to configure fabric, and then run something from the sdk to match that

BilginIbryam (Mon, 22 Oct 2018 16:52:52 GMT):
anything you can point? or do I sstart with readme, and build fabric, build clients,... check integration tests?

BilginIbryam (Mon, 22 Oct 2018 16:53:10 GMT):
seems too much for as an entry

BilginIbryam (Mon, 22 Oct 2018 16:53:49 GMT):
this was quite good and works from scratch in nodejs https://hyperledger-fabric.readthedocs.io/en/release-1.3/write_first_app.html#install-the-clients-launch-the-network

rickr (Mon, 22 Oct 2018 16:58:00 GMT):
@kesavants There is FAB-12263 but I'm thinking you only want something that's a little in between that and what's there now. Just control the poolsize, keep alive

kesavants (Mon, 22 Oct 2018 17:19:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tLfBNAQG8dftFwCEY) @rickr Yes with current configuration could eventually lead to outofmemory because of number of threads

rickr (Mon, 22 Oct 2018 17:26:10 GMT):
@kesavants Just curious - have you actually experienced that ? I have stress tested with about 400 threads making requests and never hit any issue .

kesavants (Mon, 22 Oct 2018 17:32:17 GMT):
Yes in this application the chaincode call setEvents and the java service layer has a chaincode listener Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-9029-thread-1". Although the load of the chaincode invocation was not that high for some reason peer kept redelivering the chaincode events. I do not understand why peer redelivers the chaincode events several times sometime the same block every 100 miliiseconds which a diffirenet issue

rickr (Mon, 22 Oct 2018 17:36:01 GMT):
Was it the same peer ? same events ?

kesavants (Mon, 22 Oct 2018 17:46:13 GMT):
Yes same peer and same events redelivered continously

rickr (Mon, 22 Oct 2018 19:58:24 GMT):
@kesavants https://gerrit.hyperledger.org/r/#/c/27148/1/config.properties ?

kesavants (Mon, 22 Oct 2018 20:20:05 GMT):
Thank you yes this will be very useful when there is high transaction volume

wangdong (Tue, 23 Oct 2018 03:11:18 GMT):
Just ask if java sdk got a chain code listener?

wangdong (Tue, 23 Oct 2018 03:12:56 GMT):
As there is an issue that the eventhub is disabled in the client side, but client got blocks from other orgs, produced days ago.

aarshleadiq (Tue, 23 Oct 2018 06:46:38 GMT):
@rickr Thanks for your suggestion. I do get the block events feed now. However, I am interested in the 'asset definition' or the 'data' that was committed to the ledger so I can index it in elastic search. However, the block data is just a list of bytes. Even a conversion to string using UT8 returns sketchy results : ``` -----END CERTIFICATE----- kC��I`����DD(_5��9��SBI� ``` ......

aarshleadiq (Tue, 23 Oct 2018 06:46:38 GMT):
@rickr Thanks for your suggestion. I do get the block events feed now. However, I am interested in the 'asset definition' or the 'data' that was committed to the ledger so I can index it in elastic search. However, the block data in the event is just a list of bytes. Even a conversion of the entire block data to string using UTF8 returns a result with some weird symbols: ``` -----END CERTIFICATE----- kC��I`����DD(_5��9��SBI� ``` ......

aarshleadiq (Tue, 23 Oct 2018 06:46:38 GMT):
@rickr Thanks for your suggestion. I do get the block events feed now. However, I am interested in the 'asset definition' or the 'data' that was committed to the ledger so I can index it in elastic search. However, the block data in the event is just a list of bytes. Here's the proto definition in the sdk: ``` message Block { BlockHeader header = 1; BlockData data = 2; BlockMetadata metadata = 3; } message BlockData { repeated bytes data = 1; } ``` Even a conversion of the entire block data to string using UTF8 returns a result with some weird symbols: ``` -----END CERTIFICATE----- kC��I`����DD(_5��9��SBI� ``` ......

aarshleadiq (Tue, 23 Oct 2018 06:50:37 GMT):
I can see that the 'asset definition' json I am interested in is part of the block data somewhere : ``` � n� ��Jy��� ��m�Q�:ZwS����p6��� �� dataiqcc�� $265af2b1-078b-49d3-b592-a0c3130794f4�{"id":"265af2b1-078b-49d3-b592-a0c3130794f4","version":4,"name":{"first":"Aarsh","middle":"Manohar","last":"Shah","fullName":"Aarsh Manohar Shah"}... ```

aarshleadiq (Tue, 23 Oct 2018 06:51:11 GMT):
But I can't figure out how to extract that particular json from the block data and parse it. Any suggestions ? :(

aarshleadiq (Tue, 23 Oct 2018 06:51:59 GMT):
I think the block events feature is designed more around metadata consumption and use (Is transaction valid, has it been committed ?) rather than consuming the actual asset that's written to the ledger.

rickr (Tue, 23 Oct 2018 14:50:56 GMT):
@aarshleadiq Example of handling Blockevents is in the integration tests

RockyRacer (Tue, 23 Oct 2018 15:35:34 GMT):
Is there any way to specify _pemFile_ other than with the file path (from the integration tests : `testprops.setProperty("pemFile", System.getProperty("user.dir") + "/src/test/resources/keypair-signed.crt");`) ? I mean using InputStream, byte[], String, ...

RockyRacer (Tue, 23 Oct 2018 15:36:23 GMT):
From inside a Spring Boot jar it forces creating temporary file just to get a path

RockyRacer (Tue, 23 Oct 2018 15:37:30 GMT):
Also where can I find all the available properties (pemFile, hostnameOverride, sslProvider, etc.) ?

rickr (Tue, 23 Oct 2018 16:19:27 GMT):
@RockyRacer yes

RockyRacer (Tue, 23 Oct 2018 19:11:20 GMT):
Ok I found out that I could use _pemBytes_

tencniveltekliko (Wed, 24 Oct 2018 06:55:45 GMT):
Running 'mvn clean -Dtest=End2endIT test' succeeds with fabric-sdk-java v1.2.0 but fails with v1.2.2 with error: Caught an exception running channel foo java.util.concurrent.ExecutionException: java.lang.AssertionError: Test failed with java.util.concurrent.CompletionException exception java.lang.AssertionError: expected:<226> but was:<200>

tencniveltekliko (Wed, 24 Oct 2018 06:57:02 GMT):
Has left the channel.

tencniveltekliko (Wed, 24 Oct 2018 06:59:07 GMT):
Has joined the channel.

tencnivel 1 (Wed, 24 Oct 2018 07:11:15 GMT):
Has joined the channel.

tencnivel 1 (Wed, 24 Oct 2018 07:11:39 GMT):
Running 'mvn clean -Dtest=End2endIT test' succeeds with fabric-sdk-java v1.2.0 but fails with v1.2.2 with error: Caught an exception running channel foo java.util.concurrent.ExecutionException: java.lang.AssertionError: Test failed with java.util.concurrent.CompletionException exception java.lang.AssertionError: expected:<226> but was:<200>

RockyRacer (Wed, 24 Oct 2018 12:37:56 GMT):
`pemBytes` does not solve the problem, I have created a SO question : https://stackoverflow.com/questions/52968760/hyperledger-with-spring-boot-readfromssl-error-on-channel-initialization

rickr (Wed, 24 Oct 2018 13:48:32 GMT):
@RockyRacer seems to me it's the environment spring boot interactiion between grpc, boringssl and spring boot.

rickr (Wed, 24 Oct 2018 13:53:16 GMT):
@tencnivel 1 Tests are passing locally and when merged into the delivery stream.

Chandoo (Wed, 24 Oct 2018 14:35:18 GMT):
Has joined the channel.

gravity (Wed, 24 Oct 2018 15:22:34 GMT):
hi all. does anyone use enterprise plan for fabric on ibm bluemix? is it good enough? because I can see that they allow to create 6 peers at max for an organization. any comments would be really helpful. thanks

rickr (Wed, 24 Oct 2018 15:29:38 GMT):
This isn't the channel to discuss IBM blockchain -- please keep it on topic of the JSDK

rickr (Wed, 24 Oct 2018 15:29:38 GMT):
This isn't the place to discuss IBM blockchain -- please keep it on topic of the JSDK

angelsuarez (Wed, 24 Oct 2018 15:36:45 GMT):
hello, I am going through the readme.md trying to run the intergration tests and I came across an issue with the maven-surefire-plugin:2.19.1:test that makes the tests fail. The error looks like this:

gravity (Wed, 24 Oct 2018 15:52:14 GMT):
got it

fhmarino (Wed, 24 Oct 2018 17:03:29 GMT):
Has joined the channel.

fhmarino (Wed, 24 Oct 2018 17:27:00 GMT):
Hi guys! We're developing a solutions (using JSDK) thats allows organizations trade tokens between them. To achieve this we need check whether the organization that will receive the token is registered and is a valid member of network. There is an API or method to check the members of network? Like the "getOrganizations" method of Node SDK?

rickr (Thu, 25 Oct 2018 00:00:00 GMT):
@fhmarino There's no conveniet api for that right now. You could get the config block and parse it or use the configtxlator api to convert it to jason and then parse that. You can open a JIRA requirement for it.

rickr (Thu, 25 Oct 2018 00:00:00 GMT):
@fhmarino There's no conveniet api for that right now. You could get the config block and parse it or use the configtxlator api to convert it to JSON and then parse that. You can open a JIRA requirement for it.

aarshleadiq (Thu, 25 Oct 2018 02:23:07 GMT):
@rickr Thank you for the response. I went through the tests. They explain how to subscribe to and recieve the events really well. However, the event protobuf I recieve models the data as 'repeated bytes'. One of those repeated bytes contains the 'asset' or

aarshleadiq (Thu, 25 Oct 2018 02:23:07 GMT):
@rickr Thank you for the response. I went through the tests. They explain how to subscribe to and receive the events really well. However, the event protobuf I receive models the data as 'repeated bytes'. One of those repeated bytes contains the 'asset' or 'data' that I want to index in Elastic Search. The rest is transaction/certificate information that I don't care about. How do I parse the block data and extract the particular information I am interested in ?

aarshleadiq (Thu, 25 Oct 2018 02:23:07 GMT):
@rickr Thank you for the response. I went through the tests. They explain how to subscribe to and receive the events really well. However, the event protobuf I receive models the data as 'repeated bytes'. One of those repeated bytes contains the 'asset' or 'data' that I want to index in Elastic Search. The rest is transaction/certificate information that I don't care about. How do I parse the block data and extract the particular information I am interested in ?

aarshleadiq (Thu, 25 Oct 2018 02:27:14 GMT):
Here is the Block Data protobuf I am talking about : message BlockData { repeated bytes data = 1; }

aarshleadiq (Thu, 25 Oct 2018 02:27:47 GMT):
One of those 'repeated bytes' is the asset definition I am interested in.

aarshleadiq (Thu, 25 Oct 2018 02:28:08 GMT):
Thank you so much for your time. I really appreciate your help.

rickr (Thu, 25 Oct 2018 02:30:03 GMT):
The data is in the read write set. The example show getting to the read/write set anything is what was read or written to the ledger

rickr (Thu, 25 Oct 2018 02:30:03 GMT):
The data is in the read write set. The example show getting to the read/write set anything is what was read or written to the ledger is there.

rickr (Thu, 25 Oct 2018 02:31:38 GMT):
You should not have to deal with the protobuf

aarshleadiq (Thu, 25 Oct 2018 02:32:58 GMT):
Ahh.. I see. So if I am only interested in write events, 1) is there a way to only subscribe to the write events ? 2) I currently get two events for every write. I suspect one is chaincode event, other is the channel/ledger event. Can I filter out the chaincode event ?

rickr (Thu, 25 Oct 2018 02:34:04 GMT):
No no filter means

rickr (Thu, 25 Oct 2018 02:34:48 GMT):
you can register separately for blockevents and chaincodevents

aarshleadiq (Thu, 25 Oct 2018 02:36:59 GMT):
I see. So, registerBlockListener is for block events, right ? I wonder why I get two events on every write

aarshleadiq (Thu, 25 Oct 2018 02:37:10 GMT):
One event contains the data I sent to chaincode in proposal

aarshleadiq (Thu, 25 Oct 2018 02:37:37 GMT):
The other event contains data that the chaincode persists to the ledger

kesavants (Thu, 25 Oct 2018 04:04:19 GMT):
It looks like fabric sdk grpc connection does a ping every 5 minutes logs below. Is there any setting to decrease the ping to less than 5 minutes. I think in node sdk min_time_between_pings_ms parameter accomplishes that is there any thing in java that can do this 2018-10-25 03:46:58 DEBUG NettyClientHandler:216 - [id: 0x147cd487, L:/: - R:/:] OUTBOUND PING: ack=false bytes=1111 2018-10-25 03:46:58 DEBUG NettyClientHandler:216 - [id: 0x147cd487, L:/: - R:/:] INBOUND PING: ack=true bytes=1111 2018-10-25 03:51:58 DEBUG NettyClientHandler:216 - [id: 0x147cd487, L:/: - R:/:] OUTBOUND PING: ack=false bytes=1111 2018-10-25 03:51:58 DEBUG NettyClientHandler:216 - [id: 0x147cd487, L:/: - R:/:] INBOUND PING: ack=true bytes=1111

cagdast (Thu, 25 Oct 2018 08:08:11 GMT):
Has joined the channel.

rickr (Thu, 25 Oct 2018 11:17:12 GMT):
Should be able to set most setting on https://grpc.io/grpc-java/javadoc/io/grpc/ManagedChannelBuilder.html

rickr (Thu, 25 Oct 2018 11:17:12 GMT):
@kesavants Should be able to set most setting on https://grpc.io/grpc-java/javadoc/io/grpc/ManagedChannelBuilder.html

fhmarino (Thu, 25 Oct 2018 11:59:45 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=KD2rrPdwn7w5s6LSF) @rickr @rickr Thanks for the answer, we'll deserialise the config block in java and open a Jira for that. If this turns out as good solution it could be interesting to make a pull request to improve fabric-java-sdk. Kind regards.

RockyRacer (Thu, 25 Oct 2018 15:13:25 GMT):
Hmm when I try to query chaincode like in the intergration tests: ``` queryByChaincodeRequest.setArgs(new String[] {"status"}); queryByChaincodeRequest.setFcn("query"); ``` I get `status: FAILURE. Messages: Expected 'get' or 'set'%!(EXTRA string=status). Was verified : false` :thinking:

rickr (Thu, 25 Oct 2018 15:24:09 GMT):
bad chancode

RockyRacer (Thu, 25 Oct 2018 15:27:00 GMT):
ok will check thanks

technomad21c (Thu, 25 Oct 2018 19:04:31 GMT):
Has joined the channel.

RockyRacer (Fri, 26 Oct 2018 07:32:38 GMT):
How can I read transaction data from a TransactionInfo, the new sent asset value for example ? Can't find it in the available functions

RockyRacer (Fri, 26 Oct 2018 07:34:26 GMT):
I see it in `transactionInfo.getEnvelope().getPayload()` but cannot extract it easily

kesavants (Fri, 26 Oct 2018 14:10:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hS52TZ7ivW63JReaq) @rickr Looks like there is no setting to reduce the time between grpc pings. The problem is by default lot of hosts have net.ipv4.tcp_keepalive_time set for 2 hours and the firewall/gateways in between just drop the socket. This is causing redelivery of blockevents

kesavants (Fri, 26 Oct 2018 14:10:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hS52TZ7ivW63JReaq) @rickr Looks like there is no setting to reduce the time between grpc pings. The problem is by default lot of hosts have net.ipv4.tcp_keepalive_time set for 2 hours and the firewall/gateways in between just drop the socket. This is causing redelivery of blockevents 2018-10-25 00:11:40 TRACE PeerEventServiceClient:266 - Received error on peer eventing service on channel bank1, peer peer1, url grpcs://:, attempts 0. UNAVAILABLE: Keepalive failed. The connection is likely gone 2018-10-25 00:11:40 DEBUG NettyClientHandler:216 - [id: 0x268901b9, L:/: - R:/:] OUTBOUND GO_AWAY: lastStreamId=0 errorCode=0 length=0 bytes= 2018-10-25 00:11:40 DEBUG NettyClientHandler:216 - [id: 0x268901b9, L:/: - R:/:] OUTBOUND RST_STREAM: streamId=3 errorCode=8 2018-10-25 00:11:40 TRACE PeerEventServiceClient:266 - Received error on peer eventing service on channel csd, peer fabric-peer-org4-20105c, url grpcs://:, attempts 0. UNAVAILABLE: Keepalive failed. The connection is likely gone 2018-10-25 00:11:40 TRACE Peer:322 - reconnecting startBLockNumber31331

kesavants (Fri, 26 Oct 2018 14:10:35 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hS52TZ7ivW63JReaq) @rickr Looks like there is no setting to reduce the time between grpc pings. The problem is by default lot of hosts have net.ipv4.tcp_keepalive_time set for 2 hours and the firewall/gateways in between just drop the socket. This is causing redelivery of blockevents 2018-10-25 00:11:40 TRACE PeerEventServiceClient:266 - Received error on peer eventing service on channel bank1, peer peer1, url grpcs://:, attempts 0. UNAVAILABLE: Keepalive failed. The connection is likely gone 2018-10-25 00:11:40 DEBUG NettyClientHandler:216 - [id: 0x268901b9, L:/: - R:/:] OUTBOUND GO_AWAY: lastStreamId=0 errorCode=0 length=0 bytes= 2018-10-25 00:11:40 DEBUG NettyClientHandler:216 - [id: 0x268901b9, L:/: - R:/:] OUTBOUND RST_STREAM: streamId=3 errorCode=8 2018-10-25 00:11:40 TRACE PeerEventServiceClient:266 - Received error on peer eventing service on channel csd, peer peer1, url grpcs://:, attempts 0. UNAVAILABLE: Keepalive failed. The connection is likely gone 2018-10-25 00:11:40 TRACE Peer:322 - reconnecting startBLockNumber31331

rickr (Fri, 26 Oct 2018 20:23:16 GMT):
Is that different that this ? https://github.com/hyperledger/fabric-sdk-java/blob/57870235171105e5367fd619e1aa3c7fa7a1f7e6/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L837

rickr (Fri, 26 Oct 2018 20:23:16 GMT):
Is that different than this ? https://github.com/hyperledger/fabric-sdk-java/blob/57870235171105e5367fd619e1aa3c7fa7a1f7e6/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L837

kesavants (Fri, 26 Oct 2018 20:53:54 GMT):
Ah my bad grpc.NettyChannelBuilderOption.keepAliveTime this is the setting

albert.lacambra (Sat, 27 Oct 2018 08:34:13 GMT):
Hi @rickr

albert.lacambra (Sat, 27 Oct 2018 08:36:04 GMT):
when sending responses of CC instantiation to orderer using channel.sendTransaction(responses, orderers); the CF is never completed and always get a time-out (not receiving the tx event). Do you have an idea what could be the issue? How is the CF completed? is in someway the eventHubs involved?

albert.lacambra (Sat, 27 Oct 2018 08:36:44 GMT):
I am using sdk vesrion 1.2.2 with fabric 1.3.0

albert.lacambra (Sat, 27 Oct 2018 09:53:02 GMT):
looks to be related to 2018-10-27 09:52:29,987 grpc-default-executor-1 WARN EventHub:252 - EventHub:peer1.lacambra.tech terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception.

albert.lacambra (Sat, 27 Oct 2018 10:23:28 GMT):
2018-10-27 10:05:45,497 grpc-default-worker-ELG-1-4 DEBUG Http2ConnectionHandler:896 - [id: 0x5b47ec03, L:/127.0.0.1:56017 ! R:localhost/127.0.0.1:27053] Sending GOAWAY failed: lastStreamId '0', errorCode '2', debugData 'Connection reset by peer'. Forcing shutdown of the connection.

albert.lacambra (Sat, 27 Oct 2018 10:23:54 GMT):
looks an error to http2 handshake

aatkddny (Sat, 27 Oct 2018 14:52:45 GMT):
So this just started happening on chaincode instantiation:

aatkddny (Sat, 27 Oct 2018 14:52:45 GMT):
So this just started happening on chaincode instantiation: ``` 2018-10-27 10:50:33.159 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Sending instantiateProposalRequest to the peers 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Succesful instantiate proposal response Txid: b66ac7c4e0071a4f5d4328633d4b8e5723b02184db5d46cf97ca0e8851eb31fa from peer peer1-mediaocean 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Succesful instantiate proposal response Txid: b66ac7c4e0071a4f5d4328633d4b8e5723b02184db5d46cf97ca0e8851eb31fa from peer peer0-mediaocean 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Received 2 instantiate proposal responses. Successful+verified: 2 . Failed: 0 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Sending instantiateTransaction to orderers ``` I've never seen it before. It's coming from here in channel.class in `public CompletableFuture sendTransaction(Collection proposalResponses, TransactionOptions transactionOptions) {` : ``` if (consistencyGroups != 1 || !invalid.isEmpty()) { throw new IllegalArgumentException(format( "The proposal responses have %d inconsistent groups with %d that are invalid." + " Expected all to be consistent and none to be invalid.", consistencyGroups, invalid.size())); } ``` and consistency groups == 2. My logs are saying the same as they always said ``` 2018-10-27 10:50:33.159 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Sending instantiateProposalRequest to the peers 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Succesful instantiate proposal response Txid: b66ac7c4e0071a4f5d4328633d4b8e5723b02184db5d46cf97ca0e8851eb31fa from peer peer1-mediaocean 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Succesful instantiate proposal response Txid: b66ac7c4e0071a4f5d4328633d4b8e5723b02184db5d46cf97ca0e8851eb31fa from peer peer0-mediaocean 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Received 2 instantiate proposal responses. Successful+verified: 2 . Failed: 0 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Sending instantiateTransaction to orderers ``` Anyone see this before?

aatkddny (Sat, 27 Oct 2018 14:52:45 GMT):
So this just started happening on chaincode instantiation: ``` { "status": "ERROR", "message": "java.lang.IllegalArgumentException: The proposal responses have 2 inconsistent groups with 0 that are invalid. Expected all to be consistent and none to be invalid.:java.lang.IllegalArgumentException: The proposal responses have 2 inconsistent groups with 0 that are invalid. Expected all to be consistent and none to be invalid.", "response": null } ``` I've never seen it before. It's coming from here in channel.class in `public CompletableFuture sendTransaction(Collection proposalResponses, TransactionOptions transactionOptions) {` : ``` if (consistencyGroups != 1 || !invalid.isEmpty()) { throw new IllegalArgumentException(format( "The proposal responses have %d inconsistent groups with %d that are invalid." + " Expected all to be consistent and none to be invalid.", consistencyGroups, invalid.size())); } ``` and consistency groups == 2. My logs are saying the same as they always said ``` 2018-10-27 10:50:33.159 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Sending instantiateProposalRequest to the peers 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Succesful instantiate proposal response Txid: b66ac7c4e0071a4f5d4328633d4b8e5723b02184db5d46cf97ca0e8851eb31fa from peer peer1-xxx 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Succesful instantiate proposal response Txid: b66ac7c4e0071a4f5d4328633d4b8e5723b02184db5d46cf97ca0e8851eb31fa from peer peer0-xxx 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Received 2 instantiate proposal responses. Successful+verified: 2 . Failed: 0 2018-10-27 10:50:33.187 INFO 79188 --- [nio-8095-exec-2] c.m.f.e.p.chaincode.ChaincodeProcessor : Sending instantiateTransaction to orderers ``` Anyone see this before?

aatkddny (Sat, 27 Oct 2018 14:52:48 GMT):
if (consistencyGroups != 1 || !invalid.isEmpty()) { throw new IllegalArgumentException(format( "The proposal responses have %d inconsistent groups with %d that are invalid." + " Expected all to be consistent and none to be invalid.", consistencyGroups, invalid.size())); }

aatkddny (Sat, 27 Oct 2018 15:03:15 GMT):
Not that they are much help, but it looks like one byte string is longer ``` ```

aatkddny (Sat, 27 Oct 2018 15:03:15 GMT):
Not that they are much help, but it looks like one byte string is longer - it appears to be the same apart from an extra 4 bytes at the end.

rickr (Sat, 27 Oct 2018 16:32:24 GMT):
@aatkddny Not really working today -- but quick thing to try: You can turn off the consistency check on the SDK side dig through config.java for how to do that. ... Let it go through see what happens.

rickr (Sat, 27 Oct 2018 16:32:24 GMT):
@aatkddny Not really working today -- but quick thing to try: You can turn off the consistency check on the SDK side dig through config.java for how to do that. ... Let it go through see what happens. Did you upgrade anything ? SDK level ? Fabric ?

rickr (Sat, 27 Oct 2018 16:34:11 GMT):
@albert.lacambra looks to be connection problems

aatkddny (Sat, 27 Oct 2018 18:09:37 GMT):
I've changed nothing. That's what's so baffling here.

aatkddny (Sat, 27 Oct 2018 18:09:37 GMT):
I *thought* I'd changed nothing, but that's not the case. This has config and crypto generated by the configxtgen and cryptogen at level 1.3 but it's running in a 1.2 network environment. I'll revert to 1.2 for the binaries and see if that's the issue.

aatkddny (Sat, 27 Oct 2018 18:09:37 GMT):
I *thought* I'd changed nothing, but that's not the case. This has config and crypto generated by the configxtgen and cryptogen at level 1.3 but it's running in a 1.2 network environment. I'll revert to 1.2 for the binaries and see if that's the issue. EDIT: It isn't. A network with 1.2 binaries is having the same issue.

aatkddny (Sat, 27 Oct 2018 18:51:38 GMT):
And to close this that's of course exactly what it was. The configuration binaries aren't backwards compatible. Have a good weekend.

albert.lacambra (Sun, 28 Oct 2018 15:36:48 GMT):
Yes @rickr . That is what it looks like. I am copying all docker parameters from your examples, however still closing the connection. I am using directly hfClient.loadChannelFromConfig(). There is some issue there that is not easy to see? Should we mount the EH instances manually like in e2e IT?

albert.lacambra (Sun, 28 Oct 2018 15:48:35 GMT):
there is some channel configuration that could produce this connection killing without to show an error/warning to the peer itself?

aatkddny (Sun, 28 Oct 2018 21:01:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pZ4623kdEwqaRNYyo) Stymied - see `org.hyperledger.fabric.sdk.proposal.consistency_validation` - note the `_`. When I capitalize it and try to stick it through as a system property it gets turned back to a . and doesn't match.

aatkddny (Sun, 28 Oct 2018 21:01:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pZ4623kdEwqaRNYyo) So they seem to go through ok if I set this to false. So do you have any idea what's causing it?

aatkddny (Sun, 28 Oct 2018 21:01:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pZ4623kdEwqaRNYyo) So they *seem* to go through ok if I set this to false. So do you have any idea what's causing it?

aatkddny (Sun, 28 Oct 2018 21:01:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pZ4623kdEwqaRNYyo) So they *seem* to go through ok if I set this to false - although I'm waiting on a response to see if we can actually put a transaction through. So do you have any idea what's causing it - is this something that ever happened before? I can provide the two byte array responses if that would help, and can recreate on demand if necessary.

aatkddny (Sun, 28 Oct 2018 21:01:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pZ4623kdEwqaRNYyo) So they *seem* to go through ok if I set this to false - although I'm waiting on a response to see if we can actually put a transaction through. For clarity I'm running 1.2 binaries against a 1.2 network now so that should not be part of the problem. Do you have any idea what's causing it - is this something that ever happened before? I can provide the two byte array responses if that would help, and can recreate on demand if necessary.

aatkddny (Sun, 28 Oct 2018 21:26:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bdGHwtnTTnyXdkHaF) @albert.lacambra Have you tried upping the create timeout value? I needed to do that both when I moved to a larger network and again when it came off my local (fast) machine. This one IIRC - ORG_HYPERLEDGER_FABRIC_SDK_CHANNEL_GENESISBLOCK_WAIT_TIME=50000 - you can see I made it 10x the default.

aatkddny (Sun, 28 Oct 2018 21:26:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bdGHwtnTTnyXdkHaF) @albert.lacambra Have you tried upping the create timeout value? I needed to do that both when I moved to a larger network and again when it came off my local (fast) machine. This one IIRC - ORG_HYPERLEDGER_FABRIC_SDK_CHANNEL_GENESISBLOCK_WAIT_TIME=50000 - you can see I made it 10x the default. If it's not that it'll be one of these. Forgive me for not being clearer - I'm heading out the door in 2 minutes ``` org.hyperledger.fabric.sdktest.GossipWaitTime = 50000 org.hyperledger.fabric.sdktest.ProposalWaitTime = 580000 org.hyperledger.fabric.sdktest.InvokeWaitTime = 580000 org.hyperledger.fabric.sdktest.DeployWaitTime = 700000 ```

aatkddny (Sun, 28 Oct 2018 21:26:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bdGHwtnTTnyXdkHaF) @albert.lacambra Have you tried upping the create timeout value? I needed to do that both when I moved to a larger network and again when it came off my local (fast) machine. This one IIRC - ORG_HYPERLEDGER_FABRIC_SDK_CHANNEL_GENESISBLOCK_WAIT_TIME=50000 - you can see I made it 10x the default. If it's not that it'll be one of these. Forgive me for not being clearer - I'm heading out the door in 2 minutes but I've had the same problem on slower machines ``` org.hyperledger.fabric.sdktest.GossipWaitTime = 50000 org.hyperledger.fabric.sdktest.ProposalWaitTime = 580000 org.hyperledger.fabric.sdktest.InvokeWaitTime = 580000 org.hyperledger.fabric.sdktest.DeployWaitTime = 700000 grpc.NettyChannelBuilderOption.keepAliveTime=120 grpc.NettyChannelBuilderOption.keepAliveTimeout=60 ```

rickr (Sun, 28 Oct 2018 21:54:07 GMT):
@aatkddny There have been previous reports but in the end when let through the transaction was marked invalid. If you could first do this. Look at SDKUtils.getProposalConsistencySets It's whats used under the covers. The application can call it too. So try that and verify that it reports more than one consistency set. The send to the orderer turning off the consistency check and see that the transaction is really marked valid

alek (Mon, 29 Oct 2018 11:26:45 GMT):
Has joined the channel.

aatkddny (Mon, 29 Oct 2018 12:18:21 GMT):
As I tried to say, the response from peer one is 4 bytes longer than the response from peer0. I traced the code over the weekend and since the two payload bytes are different the map in SDKUtils perforce has two values. The orderer OTOH seems to accept them without issue - or it appears to based on this output. ``` 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 2024 Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 2025 Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 2026 Sign: plaintext: 0A80060A0A4F7264657265724D535012...7185020686E9C4BD2A20EF69C94E829F 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 2027 Sign: digest: 01508CA5D15DEB0C8333A2D632C7E22E8D31DE887D69300ED50108AE54CAC8C4 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 2028 Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [orderer/commmon/multichannel] addLastConfigSignature -> DEBU 2029 [channel: xxx-yyy-channel] About to write block, setting its LAST_CONFIG to 0 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 202a Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 202b Sign: plaintext: 0A80060A0A4F7264657265724D535012...7185020686E9C4BD2A20EF69C94E829F 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 202c Sign: digest: 8868CFA7353580D76505FF7502D43A9FBB4215C056D167A77F080CEDAE82C165 2018-10-29 11:55:40.230 UTC [fsblkstorage] indexBlock -> DEBU 202d Indexing block [blockNum=2, blockHash=[]byte{0xdf, 0xfc, 0x95, 0xe3, 0x42, 0x3d, 0x3, 0x46, 0x61, 0x55, 0x1a, 0xb8, 0x6, 0xc6, 0xaa, 0x7a, 0xdc, 0x2c, 0x14, 0x2a, 0x29,0x11, 0xb9, 0xf1, 0x6d, 0xcd, 0xc0, 0x86, 0x3f, 0xcd, 0x76, 0xcf} txOffsets= txId=14b27dcebde4b34b8c8ea5899baf71e2e8cc62a3964ec1c22b32324116acf44f locPointer=offset=70, bytesLength=4746 ] 2018-10-29 11:55:40.231 UTC [fsblkstorage] updateCheckpoint -> DEBU 202e Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[31388], isChainEmpty=[false], lastBlockNumber=[2] 2018-10-29 11:55:40.231 UTC [orderer/commmon/multichannel] commitBlock -> DEBU 202f [channel: xxx-yyy-channel] Wrote block 2 2 ``` The one thing I got wrong was versioning. It was all running on 1.3 rather than the 1.2 I stated. In my defense I didn't expect someone to install the latest version (1.3) into over a perfectly good 1.2 k8s cluster and finding that fact is a pita when you don't have direct access to the images on the server. That notwithstanding it appears that either when instantiating chaincode it is possible to get different responses from peers and have them accepted by the orderer -or- I mucked something up. But if it's the latter I can't see exactly what - my code is unchanged and has worked for a long time.

aatkddny (Mon, 29 Oct 2018 12:18:21 GMT):
@rickr As I tried to say, the response from peer one is 4 bytes longer than the response from peer0. I traced the code over the weekend and since the two payload bytes are different the map in SDKUtils perforce has two values. The orderer OTOH seems to accept them without issue - or it appears to based on this output. ``` 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 2024 Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 2025 Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 2026 Sign: plaintext: 0A80060A0A4F7264657265724D535012...7185020686E9C4BD2A20EF69C94E829F 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 2027 Sign: digest: 01508CA5D15DEB0C8333A2D632C7E22E8D31DE887D69300ED50108AE54CAC8C4 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 2028 Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [orderer/commmon/multichannel] addLastConfigSignature -> DEBU 2029 [channel: xxx-yyy-channel] About to write block, setting its LAST_CONFIG to 0 2018-10-29 11:55:40.219 UTC [msp] GetDefaultSigningIdentity -> DEBU 202a Obtaining default signing identity 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 202b Sign: plaintext: 0A80060A0A4F7264657265724D535012...7185020686E9C4BD2A20EF69C94E829F 2018-10-29 11:55:40.219 UTC [msp/identity] Sign -> DEBU 202c Sign: digest: 8868CFA7353580D76505FF7502D43A9FBB4215C056D167A77F080CEDAE82C165 2018-10-29 11:55:40.230 UTC [fsblkstorage] indexBlock -> DEBU 202d Indexing block [blockNum=2, blockHash=[]byte{0xdf, 0xfc, 0x95, 0xe3, 0x42, 0x3d, 0x3, 0x46, 0x61, 0x55, 0x1a, 0xb8, 0x6, 0xc6, 0xaa, 0x7a, 0xdc, 0x2c, 0x14, 0x2a, 0x29,0x11, 0xb9, 0xf1, 0x6d, 0xcd, 0xc0, 0x86, 0x3f, 0xcd, 0x76, 0xcf} txOffsets= txId=14b27dcebde4b34b8c8ea5899baf71e2e8cc62a3964ec1c22b32324116acf44f locPointer=offset=70, bytesLength=4746 ] 2018-10-29 11:55:40.231 UTC [fsblkstorage] updateCheckpoint -> DEBU 202e Broadcasting about update checkpointInfo: latestFileChunkSuffixNum=[0], latestFileChunksize=[31388], isChainEmpty=[false], lastBlockNumber=[2] 2018-10-29 11:55:40.231 UTC [orderer/commmon/multichannel] commitBlock -> DEBU 202f [channel: xxx-yyy-channel] Wrote block 2 2 ``` The one thing I got wrong was versioning. It was all running on 1.3 rather than the 1.2 I stated. In my defense I didn't expect someone to install the latest version (1.3) into over a perfectly good 1.2 k8s cluster and finding that fact is a pita when you don't have direct access to the images on the server. That notwithstanding it appears that either when instantiating chaincode it is possible to get different responses from peers and have them accepted by the orderer -or- I mucked something up. But if it's the latter I can't see exactly what - my code is unchanged and has worked for a long time.

albert.lacambra (Mon, 29 Oct 2018 21:22:45 GMT):
issue found

albert.lacambra (Mon, 29 Oct 2018 21:23:05 GMT):
in network.yaml I had eventUrl: grpc://localhost:29053

albert.lacambra (Mon, 29 Oct 2018 21:23:20 GMT):
should be without #

albert.lacambra (Mon, 29 Oct 2018 21:23:20 GMT):
should be with "# ", so no port for eventhub

albert.lacambra (Mon, 29 Oct 2018 21:23:38 GMT):
I have seen that for version 1.3 was dynamically removed from the yaml file

aarshleadiq (Tue, 30 Oct 2018 05:58:09 GMT):
@rickr I see that the peer event services client uses the Grpc 'Stream Observer' class. Say I have a million blocks on my ledger and I send a deliver message to fetch me all of them. Can I rest assured that the Grpc layer will handle backpressue for me ? Or will my application crash and run out of memory ?

halilkalkan (Tue, 30 Oct 2018 06:40:31 GMT):
Hi guys, to create a web application based on Java SDK, we need to use frameworks like Spring, Spring Boot, etc., am I right?

albert.lacambra (Tue, 30 Oct 2018 08:26:20 GMT):
IMHO you can use what you want. Also spring.

albert.lacambra (Tue, 30 Oct 2018 08:26:27 GMT):
is just a java jar

halilkalkan (Tue, 30 Oct 2018 08:36:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7xttdPPYgdvfnd3Yh) Do you know what is the preferred framework for exposing API?

amolpednekar (Tue, 30 Oct 2018 11:32:37 GMT):
@rickr Why isnt invoke functions that call private data send the private data arguments as part of the transient map? because if sent as normal args, wouldnt they be part of the transaction thats send to orderer and the rest of the network

amolpednekar (Tue, 30 Oct 2018 11:32:37 GMT):
@rickr Why isnt invoke function for private data, that send the private data arguments as part of the transient map? because if sent as normal args, wouldnt they be part of the transaction thats send to orderer and the rest of the network

amolpednekar (Tue, 30 Oct 2018 11:32:37 GMT):
@rickr Why isnt invoke function for private data, that send the private data arguments as part of the transient map? (from https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdkintegration/PrivateDataIT.java ) because if sent as normal args, wouldnt they be part of the transaction thats send to orderer and the rest of the network

akoenig (Tue, 30 Oct 2018 12:48:23 GMT):
Hi, I want to read the payload from the chaincode event: ``` final Common.Payload payload; try { payload = Common.Payload.parseFrom(chaincodeEvent.getPayload()); } catch (final InvalidProtocolBufferException e) { LOGGER.error("Error while parsing the payload. Message:", e); return; } ```

akoenig (Tue, 30 Oct 2018 12:49:49 GMT):
but every time I read the payload I get: `com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type.` Anyone got an Idea of this problem?

akoenig (Tue, 30 Oct 2018 12:58:34 GMT):
and when i just call chaincodeEvent.getPayload() i get ` Error while parsing the payload. Message: com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type.`, too

akoenig (Tue, 30 Oct 2018 13:03:12 GMT):
Hm okay.. chaincodeEvent.getChaincodeEvent().getPayload() works. Can someone help me with this construct, please? :)

akoenig (Tue, 30 Oct 2018 13:09:45 GMT):
and getChaincodeEvent is package private :thinking:

dave.enyeart (Tue, 30 Oct 2018 13:20:14 GMT):
@amolpednekar @rickr Yes, private data should always be passed to chaincode using transient field. The Fabric sample is being updated to make this very clear, see https://gerrit.hyperledger.org/r/#/c/27248/

rickr (Tue, 30 Oct 2018 13:43:01 GMT):
@aarshleadiq If your application requires that I would test if if it works -- if it does you can rest assured

rickr (Tue, 30 Oct 2018 13:43:01 GMT):
@aarshleadiq If your application requires that I would test if it works -- if it does you can rest assured

rickr (Tue, 30 Oct 2018 14:24:52 GMT):
@akoenig why not use the simple methods provided ? They've already parsed it for you.

rickr (Tue, 30 Oct 2018 14:24:52 GMT):
@akoenig why not use the simple methods provided on ChaincodeEvent ? They've already parsed it for you.

akoenig (Tue, 30 Oct 2018 14:35:43 GMT):
@rickr you mean like that? ``` final ByteString bytes = ByteString.copyFrom(transactionActionInfo.getProposalResponsePayload()); final String payload = bytes.toStringUtf8(); ```

akoenig (Tue, 30 Oct 2018 14:35:51 GMT):
or is there a better way?

rickr (Tue, 30 Oct 2018 14:39:45 GMT):
What is the class of `chaincodeEvent` ?

akoenig (Tue, 30 Oct 2018 14:40:37 GMT):
ChaincodeEvent

akoenig (Tue, 30 Oct 2018 14:40:49 GMT):
org.hyperledger.fabric.sdk.ChaincodeEvent

rickr (Tue, 30 Oct 2018 14:41:05 GMT):
What methods are there on that class ?

akoenig (Tue, 30 Oct 2018 14:42:19 GMT):
getPayload, getTxId, getEventName, getChainCodeId

akoenig (Tue, 30 Oct 2018 14:42:27 GMT):
getPayload is a byte[]

akoenig (Tue, 30 Oct 2018 14:43:17 GMT):
and my chaincode listner is doing this: ``` final ByteString bytes = ByteString.copyFrom(chaincodeEvent.getPayload()); final String payload = bytes.toStringUtf8(); ```

akoenig (Tue, 30 Oct 2018 14:43:35 GMT):
my blocklistner this: ``` final ByteString bytes = ByteString.copyFrom(transactionActionInfo.getProposalResponsePayload()); final String payload = bytes.toStringUtf8(); ```

rickr (Tue, 30 Oct 2018 14:52:14 GMT):
what does javadoc say about `getPayload` ?

akoenig (Tue, 30 Oct 2018 14:53:20 GMT):
@return binary data set by the chaincode for this event. This may return null.

rickr (Tue, 30 Oct 2018 14:55:53 GMT):
Right -- the SDK has no idea what the data is that the chaincode is setting for the event. Follow the example in End2endIT `EXPECTED_EVENT_DATA` see how the chaincode is sending it.

akoenig (Tue, 30 Oct 2018 14:57:24 GMT):
Hm okay, will have a look. I get the right result, but I don't know if I'm doing this right here.. but okay, will have a look. Thanks

amolpednekar (Tue, 30 Oct 2018 15:53:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uvyhy7QxycoZQvh4i) @dave.enyeart Right, makes sense now. @rickr I can create JIRA tickets to get this updated in PrivateDataIT.java as well as in private_data_cc.go on the 1.2 branch, so that the data is send and processed via the transientMap field

amolpednekar (Tue, 30 Oct 2018 15:53:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uvyhy7QxycoZQvh4i) @dave.enyeart Right, makes sense now. @rickr I can create JIRA tickets to get this updated in PrivateDataIT.java as well as in private_data_cc.go on the 1.2 branch, so that the data is send and processed via the transientMap field

amolpednekar (Tue, 30 Oct 2018 15:53:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uvyhy7QxycoZQvh4i) @dave.enyeart Right, makes sense now. @rickr I can create JIRA tickets to get this updated in PrivateDataIT.java as well as in private_data_cc.go on the 1.2 branch, so that the data is sent and processed via the transientMap field

amolpednekar (Tue, 30 Oct 2018 16:03:31 GMT):
Created FABJ-379, FABJ-380 for the same.

adamhardie (Tue, 30 Oct 2018 16:50:50 GMT):
Has joined the channel.

amolpednekar (Tue, 30 Oct 2018 17:30:07 GMT):
@rickr To which branch should I be submit the change request in the SDK? I've seen the issue on release-1.2.0 branch, but should any change request be submitted against master?

rickr (Tue, 30 Oct 2018 19:04:02 GMT):
master -- and you need to get it from gerrit and submit your patch to gerrit -- You can't use github

rickr (Tue, 30 Oct 2018 19:13:18 GMT):
@amolpednekar maybe this will help: https://hyperledger-fabric.readthedocs.io/en/release-1.2/Gerrit/gerrit.html

fhmarino (Tue, 30 Oct 2018 19:39:40 GMT):
Hello there! I did create a network manually (with channel, peers and etc), I did install and instantiate Chaincodes with success (all manually by my own scripts). What function in JSDK should I use to get this channel and invoke my chaincode for it?

rickr (Tue, 30 Oct 2018 19:43:43 GMT):
Read the README.md maybe twice. Look at the examples it suggest to follow especially in debugger. Should take no more than a day IMO. will save you a lot of time on the long run -- and asking question here.

rickr (Tue, 30 Oct 2018 19:43:43 GMT):
Read the README.md maybe twice. Look at the examples it suggest to follow especially in debugger. Should take no more than a day IMO. will save you a lot of time in the long run -- and asking question here.

coolsvap (Wed, 31 Oct 2018 05:10:19 GMT):
Has joined the channel.

fhmarino (Wed, 31 Oct 2018 19:50:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NszQrY8PhfpfF8chh) @rickr Thanks, I've read and then I read once... I did try change my code but the follow error persists: 19:46:05,664 ERROR [org.hyperledger.fabric.sdk.Channel] (default task-1) Sending proposal to peer1-ind1 failed because of: gRPC failure=Status{code=INTERNAL, description=http2 exception, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 And I don't know why yet...

fhmarino (Wed, 31 Oct 2018 19:50:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NszQrY8PhfpfF8chh) @rickr Thanks, I've read and then I read again... I did try change my code but the following error persists: 19:46:05,664 ERROR [org.hyperledger.fabric.sdk.Channel] (default task-1) Sending proposal to peer1-ind1 failed because of: gRPC failure=Status{code=INTERNAL, description=http2 exception, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 And I don't know why yet...

rickr (Wed, 31 Oct 2018 21:08:09 GMT):
TLS on fabric vs not on sdk or visa - versa .. just guessing

fanjianhang (Thu, 01 Nov 2018 01:42:45 GMT):
@rickr Hi, rick, you mentioned that persistence is not part of SDK, here are my two ways to use sdk, one is i save every member user's enrollment cert to my database, the premise is i need to generate keypair in my applications, the other way is i save every member user's userid and password, in this way i need to enroll this user every time when i invoke sdk. Which way is correct. Looking forward to your reply.

fanjianhang (Thu, 01 Nov 2018 01:44:47 GMT):
@rickr Hi, rick, you mentioned that persistence is not part of SDK, here are my two ways to use sdk, one is i save every member user's enrollment cert to my database, in this way i need to generate keypair in my applications, the other way is i save every member user's userid and password, in this way i need to enroll this user every time when i invoke sdk. Which way is correct. Looking forward to your reply.

rickr (Thu, 01 Nov 2018 14:10:05 GMT):
@fanjianhang I can't say for certain any specific approach is better not knowing an applications requirements or use cases. That disclaimer said; I don't image I would prefer an approach of continuously enrolling any single user.

rickr (Thu, 01 Nov 2018 14:10:05 GMT):
@fanjianhang I can't say for certain any specific approach is better not knowing an applications requirements or use cases. That disclaimer said; I don't imagine I would prefer an approach of continuously enrolling any single user.

adamhardie (Thu, 01 Nov 2018 14:59:45 GMT):
hello, I asked this in a different chat, but wondering if there is a way to solve this using java SDK. I have a component that connects to HL and subscribes to chaincode events (using a CCEListener implementation). When i start the appilication I receive a block. This is processed by the application and it updates its state. When I close the app, and start it again, the same block is received. The app has already processed this so actually it overwrites its old saved state. Not a huge issue, but I am wondering if the orderer or SDK is able to know which blocks have already been received by this user and therefore ignore them, without having to save the lastBlockProcessed into a DB or file.

adamhardie (Thu, 01 Nov 2018 15:14:52 GMT):
sorry if it is an obvious answer.. but i cant seem to find details on whether to expect this every time i connect my event listener; is it just by design that the listener receives the most recent block ?

adamhardie (Thu, 01 Nov 2018 15:24:46 GMT):
maybe I can use a custom peer to do this somehow, using PeerOptions? but is it possible without saving the last block processed number

mne (Thu, 01 Nov 2018 15:41:10 GMT):
Has left the channel.

amolpednekar (Thu, 01 Nov 2018 16:56:23 GMT):
@rickr I ran End2EndIT.java (when ended with a nice "That's All folks!" Then ran PrivateDataIT.java without making any changes and got the following result. Is it supposed to fail at the end? ``` RUNNING: PrivateDataIT. Running Channel bar with a delta 10 ChaincodeID: Sending install proposal for channel: bar 2018-11-01 16:41:27,897 main INFO InstallProposalBuilder:244 - Installing 'private_data_cc1_go::github.com/private_data_cc::1' language Go chaincode from directory: 'D:\Workspace\fabric-sdk-java\src\test\fixture\sdkintegration\gocc\samplePrivateData\src\github.com\private_data_cc' with source location: 'src\github.com\private_data_cc'. chaincodePath:'github.com/private_data_cc' Successful install proposal response Txid: 6e52751cff8966b1831266067309d608bba59779b1fa03beb2494331e21bd875 from peer peer0.org2.example.com Successful install proposal response Txid: 6e52751cff8966b1831266067309d608bba59779b1fa03beb2494331e21bd875 from peer peer1.org2.example.com Received 2 install proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiate proposal Successful upgrade proposal response Txid: fa014548072fc530674b3a536c5979414416714c390c602aea5b91088145409c from peer peer0.org2.example.com Successful upgrade proposal response Txid: fa014548072fc530674b3a536c5979414416714c390c602aea5b91088145409c from peer peer1.org2.example.com Received 2 upgrade proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiate proposal to orderer. instantiate proposal completed. Successful transaction proposal response Txid: 7fe97188297a81e6c6b3012853673e16437fcdd1cd5a9c81febfc4cc92cccd3a from peer peer0.org2.example.com Successful transaction proposal response Txid: 7fe97188297a81e6c6b3012853673e16437fcdd1cd5a9c81febfc4cc92cccd3a from peer peer1.org2.example.com Received 2 transaction proposal responses for setAmount. Successful+verified: 2 . Failed: 0 Successfully received transaction proposal responses for setAmount. Now sending to orderer. Got back acknowledgement from setAmount from all peers. delta is 10 Now query chaincode ChaincodeID(private_data_cc1_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 Query payload of b from peer peer0.org2.example.com returned 250 Query payload of b from peer peer1.org2.example.com returned 250 sending transaction proposal to all peers with arguments: move(a,b,50) Successful transaction proposal response Txid: 471d150837479bfa924e65c612f8c60ca4ea3b31d9b86f8dd322e29acc03941e from peer peer0.org2.example.com Successful transaction proposal response Txid: 471d150837479bfa924e65c612f8c60ca4ea3b31d9b86f8dd322e29acc03941e from peer peer1.org2.example.com Received 2 transaction proposal responses for moveAmount. Successful+verified: 2 . Failed: 0 Successfully received transaction proposal responses. Sending chaincode transaction(move a,b,50) to orderer. Now query chaincode ChaincodeID(private_data_cc1_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 300 Query payload of b from peer peer0.org2.example.com returned 300 Query payload of b from peer peer1.org2.example.com returned 300 Running for Channel bar done org.hyperledger.fabric.sdk.exception.ProposalException: Peer peer0.org2.example.com channel query expected 200, actual returned was: 500. invalid function to lscc: GetCollectionsConfig at org.hyperledger.fabric.sdk.Channel.queryCollectionsConfig(Channel.java:3536) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.runFabricTest(PrivateDataIT.java:190) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.setup(PrivateDataIT.java:135) .... Disconnected from the target VM, address: '127.0.0.1:57170', transport: 'socket' java.lang.AssertionError: Peer peer0.org2.example.com channel query expected 200, actual returned was: 500. invalid function to lscc: GetCollectionsConfig at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.setup(PrivateDataIT.java:139) .... ```

amolpednekar (Thu, 01 Nov 2018 16:56:23 GMT):
@rickr I ran End2EndIT.java (which ended with a nice "That's All folks!") Then ran PrivateDataIT.java without making any changes and got the following result. Is it supposed to fail at the end? ``` RUNNING: PrivateDataIT. Running Channel bar with a delta 10 ChaincodeID: Sending install proposal for channel: bar 2018-11-01 16:41:27,897 main INFO InstallProposalBuilder:244 - Installing 'private_data_cc1_go::github.com/private_data_cc::1' language Go chaincode from directory: 'D:\Workspace\fabric-sdk-java\src\test\fixture\sdkintegration\gocc\samplePrivateData\src\github.com\private_data_cc' with source location: 'src\github.com\private_data_cc'. chaincodePath:'github.com/private_data_cc' Successful install proposal response Txid: 6e52751cff8966b1831266067309d608bba59779b1fa03beb2494331e21bd875 from peer peer0.org2.example.com Successful install proposal response Txid: 6e52751cff8966b1831266067309d608bba59779b1fa03beb2494331e21bd875 from peer peer1.org2.example.com Received 2 install proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiate proposal Successful upgrade proposal response Txid: fa014548072fc530674b3a536c5979414416714c390c602aea5b91088145409c from peer peer0.org2.example.com Successful upgrade proposal response Txid: fa014548072fc530674b3a536c5979414416714c390c602aea5b91088145409c from peer peer1.org2.example.com Received 2 upgrade proposal responses. Successful+verified: 2 . Failed: 0 Sending instantiate proposal to orderer. instantiate proposal completed. Successful transaction proposal response Txid: 7fe97188297a81e6c6b3012853673e16437fcdd1cd5a9c81febfc4cc92cccd3a from peer peer0.org2.example.com Successful transaction proposal response Txid: 7fe97188297a81e6c6b3012853673e16437fcdd1cd5a9c81febfc4cc92cccd3a from peer peer1.org2.example.com Received 2 transaction proposal responses for setAmount. Successful+verified: 2 . Failed: 0 Successfully received transaction proposal responses for setAmount. Now sending to orderer. Got back acknowledgement from setAmount from all peers. delta is 10 Now query chaincode ChaincodeID(private_data_cc1_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 Query payload of b from peer peer0.org2.example.com returned 250 Query payload of b from peer peer1.org2.example.com returned 250 sending transaction proposal to all peers with arguments: move(a,b,50) Successful transaction proposal response Txid: 471d150837479bfa924e65c612f8c60ca4ea3b31d9b86f8dd322e29acc03941e from peer peer0.org2.example.com Successful transaction proposal response Txid: 471d150837479bfa924e65c612f8c60ca4ea3b31d9b86f8dd322e29acc03941e from peer peer1.org2.example.com Received 2 transaction proposal responses for moveAmount. Successful+verified: 2 . Failed: 0 Successfully received transaction proposal responses. Sending chaincode transaction(move a,b,50) to orderer. Now query chaincode ChaincodeID(private_data_cc1_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 300 Query payload of b from peer peer0.org2.example.com returned 300 Query payload of b from peer peer1.org2.example.com returned 300 Running for Channel bar done org.hyperledger.fabric.sdk.exception.ProposalException: Peer peer0.org2.example.com channel query expected 200, actual returned was: 500. invalid function to lscc: GetCollectionsConfig at org.hyperledger.fabric.sdk.Channel.queryCollectionsConfig(Channel.java:3536) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.runFabricTest(PrivateDataIT.java:190) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.setup(PrivateDataIT.java:135) .... Disconnected from the target VM, address: '127.0.0.1:57170', transport: 'socket' java.lang.AssertionError: Peer peer0.org2.example.com channel query expected 200, actual returned was: 500. invalid function to lscc: GetCollectionsConfig at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.setup(PrivateDataIT.java:139) .... ```

rickr (Thu, 01 Nov 2018 17:11:14 GMT):
@amolpednekar your running against 1.2 fabric .. I have a fix pending for that environment. But you should be running against 1.3 fabric

rickr (Thu, 01 Nov 2018 17:11:14 GMT):
@amolpednekar your running against 1.2 fabric .. I have a fix pending for that *test environment*. But you should be running against 1.3 fabric

amolpednekar (Thu, 01 Nov 2018 17:15:01 GMT):
Yes, was running again v1.2

amolpednekar (Thu, 01 Nov 2018 17:15:01 GMT):
Yes, was running against v1.2

amolpednekar (Thu, 01 Nov 2018 17:16:46 GMT):
Does simply running against a v1.3 network pass the tests? Keeping the rest of the SDK configs/tests as-is?

amolpednekar (Thu, 01 Nov 2018 17:16:46 GMT):
Does simply running against a v1.3 network pass the tests? Keeping the rest of the SDK configs/tests as-is? Edit: Yes works perfectly after upgrading network to v1.3.

rickr (Thu, 01 Nov 2018 17:17:33 GMT):
Well if you're running to contribute you should be using the latest :wink:

amolpednekar (Thu, 01 Nov 2018 17:20:54 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vBgmCEPpqY4YedhvR) @rickr Haha, fair enough :P

rickr (Thu, 01 Nov 2018 17:24:57 GMT):
@adamhardie That's just default behavior the peer eventing service works ( get newest) . You can specify which block number you want next .. right now it will however block if that block is not there. IMO I would persist which block number that has been successfully processed. As part of defensive programming throw away any block number equal or less than what's been already processed. I would start up asking for that that block to not block(as in wait). Look at getting that block as acknowledgment you're receiving events.

kesavants (Thu, 01 Nov 2018 21:07:27 GMT):
@rickr IMHO I think the eventing service should deliver new blocks created after the service layer has connected. There is also a problem when the grpc connection gets dropped by the the Peer event service redelivers the last block even it was delivered before

fanjianhang (Fri, 02 Nov 2018 01:16:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ALmPXJTJpzx2Xk9vt) @rickr Thanks a lot. I agree with you because it will make ca

fanjianhang (Fri, 02 Nov 2018 01:21:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ALmPXJTJpzx2Xk9vt) @rickr Thanks a lot. I agree with you beacause it will bring more pressure to ca server if enroll a user every time.

Sasadara (Fri, 02 Nov 2018 06:20:49 GMT):
Has joined the channel.

akoenig (Fri, 02 Nov 2018 09:19:07 GMT):
Hi, we have a network running with the java-sdk. Now we want to restart the client again, but not the whole network. Anyone got an idea how to solve this? For example we don't want to reacate the channel. We just want that the client finds the channel by himself. But client.getChannel(name) is null because we create a new instance of the client...

akoenig (Fri, 02 Nov 2018 09:22:29 GMT):
or is the only solution to store the channel in the samplestore?

gravity (Fri, 02 Nov 2018 11:24:19 GMT):
hello is there any way to call system chaincode? for example, If I want to get a list of channels available for client, can I somehow call `GetChannels` function from `cscc`? I stuck here, because a channel must be specified when invoke/call chaincode. but which one should I use in this case?

rickr (Fri, 02 Nov 2018 12:44:18 GMT):
https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario

jtrayfield (Fri, 02 Nov 2018 14:18:04 GMT):
Hi, what's the latest version of the hyperledger java client that will function correctly with fabric 1.1 (server)?

amolpednekar (Fri, 02 Nov 2018 14:48:47 GMT):
Hey @rickr , I submitted https://gerrit.hyperledger.org/r/#/c/27328/ with only two files changed, PrivateDataIT.java, and the corresponding chaincode used in it: private_data_cc.go I ran PrivateDataIT integration test, which completely passed. The hyperledger job builder seems to fail with what looks like an unrelated error saying "Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter"; I file that I didnt even touch. Any pointers? (logs https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-sdk-java-verify-x86_64/2508/console-timestamp.log.gz) ``` 14:41:59 [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ fabric-sdk-java --- 14:41:59 14:41:59 ------------------------------------------------------- 14:41:59 T E S T S 14:41:59 ------------------------------------------------------- 14:42:00 Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter 14:42:00 14:42:00 Results : 14:42:00 14:42:00 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 14:42:00 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] BUILD FAILURE 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] Total time: 26.249 s 14:42:00 [INFO] Finished at: 2018-11-02T14:42:00+00:00 14:42:00 [INFO] Final Memory: 49M/961M 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project fabric-sdk-java: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? 14:42:00 [ERROR] Command was /bin/sh -c cd /w/workspace/fabric-sdk-java-verify-x86_64 && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java '-javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/w/workspace/fabric-sdk-java-verify-x86_64/target/coverage-reports/jacoco-ut.exec,excludes=**/org/hyperledger/fabric/protos/**' -jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefirebooter9131766845124994864.jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire328915991984483655tmp /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire_02510624583070697467tmp ```

amolpednekar (Fri, 02 Nov 2018 14:48:47 GMT):
Hey @rickr , I submitted https://gerrit.hyperledger.org/r/#/c/27328/ with only two files changed, PrivateDataIT.java, and the corresponding chaincode used in it: private_data_cc.go I ran PrivateDataIT integration test, which completely passed. The hyperledger job builder seems to fail with what looks like an unrelated error saying "Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter"; A file that I didnt even touch. Any pointers? (logs https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-sdk-java-verify-x86_64/2508/console-timestamp.log.gz) ``` 14:41:59 [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ fabric-sdk-java --- 14:41:59 14:41:59 ------------------------------------------------------- 14:41:59 T E S T S 14:41:59 ------------------------------------------------------- 14:42:00 Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter 14:42:00 14:42:00 Results : 14:42:00 14:42:00 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 14:42:00 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] BUILD FAILURE 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] Total time: 26.249 s 14:42:00 [INFO] Finished at: 2018-11-02T14:42:00+00:00 14:42:00 [INFO] Final Memory: 49M/961M 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project fabric-sdk-java: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? 14:42:00 [ERROR] Command was /bin/sh -c cd /w/workspace/fabric-sdk-java-verify-x86_64 && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java '-javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/w/workspace/fabric-sdk-java-verify-x86_64/target/coverage-reports/jacoco-ut.exec,excludes=**/org/hyperledger/fabric/protos/**' -jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefirebooter9131766845124994864.jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire328915991984483655tmp /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire_02510624583070697467tmp ```

amolpednekar (Fri, 02 Nov 2018 14:48:47 GMT):
Hey @rickr , I submitted https://gerrit.hyperledger.org/r/#/c/27328/ with only two files changed, PrivateDataIT.java, and the corresponding chaincode used in it: private_data_cc.go I ran PrivateDataIT integration test, which completely passed on my system with the lovely "Thats all folks" message The hyperledger job builder seems to fail with what looks like an unrelated error saying "Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter"; A file that I didnt even touch. Any pointers? (logs https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-sdk-java-verify-x86_64/2508/console-timestamp.log.gz) ``` 14:41:59 [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ fabric-sdk-java --- 14:41:59 14:41:59 ------------------------------------------------------- 14:41:59 T E S T S 14:41:59 ------------------------------------------------------- 14:42:00 Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter 14:42:00 14:42:00 Results : 14:42:00 14:42:00 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 14:42:00 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] BUILD FAILURE 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] Total time: 26.249 s 14:42:00 [INFO] Finished at: 2018-11-02T14:42:00+00:00 14:42:00 [INFO] Final Memory: 49M/961M 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project fabric-sdk-java: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? 14:42:00 [ERROR] Command was /bin/sh -c cd /w/workspace/fabric-sdk-java-verify-x86_64 && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java '-javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/w/workspace/fabric-sdk-java-verify-x86_64/target/coverage-reports/jacoco-ut.exec,excludes=**/org/hyperledger/fabric/protos/**' -jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefirebooter9131766845124994864.jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire328915991984483655tmp /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire_02510624583070697467tmp ```

amolpednekar (Fri, 02 Nov 2018 14:48:47 GMT):
Hey @rickr , I submitted https://gerrit.hyperledger.org/r/#/c/27328/ with only two files changed, PrivateDataIT.java, and the corresponding chaincode used in it: private_data_cc.go After implementing these changes, I ran PrivateDataIT integration test, which completely passed on my system with the lovely "Thats all folks" message The hyperledger job builder seems to fail with what looks like an unrelated error saying "Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter"; A file that I didnt even touch. Any pointers? (logs https://logs.hyperledger.org/production/vex-yul-hyp-jenkins-3/fabric-sdk-java-verify-x86_64/2508/console-timestamp.log.gz) ``` 14:41:59 [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ fabric-sdk-java --- 14:41:59 14:41:59 ------------------------------------------------------- 14:41:59 T E S T S 14:41:59 ------------------------------------------------------- 14:42:00 Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter 14:42:00 14:42:00 Results : 14:42:00 14:42:00 Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 14:42:00 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] BUILD FAILURE 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [INFO] Total time: 26.249 s 14:42:00 [INFO] Finished at: 2018-11-02T14:42:00+00:00 14:42:00 [INFO] Final Memory: 49M/961M 14:42:00 [INFO] ------------------------------------------------------------------------ 14:42:00 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project fabric-sdk-java: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called? 14:42:00 [ERROR] Command was /bin/sh -c cd /w/workspace/fabric-sdk-java-verify-x86_64 && /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java '-javaagent:/home/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/w/workspace/fabric-sdk-java-verify-x86_64/target/coverage-reports/jacoco-ut.exec,excludes=**/org/hyperledger/fabric/protos/**' -jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefirebooter9131766845124994864.jar /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire328915991984483655tmp /w/workspace/fabric-sdk-java-verify-x86_64/target/surefire/surefire_02510624583070697467tmp ```

rickr (Fri, 02 Nov 2018 15:56:50 GMT):
know issue don't worry about if for now

rickr (Fri, 02 Nov 2018 15:56:50 GMT):
known issue don't worry about if for now

gravity (Fri, 02 Nov 2018 16:17:27 GMT):
Hi @rickr is it a correct behavior when a chaincode is being instantiated, the instatiate proposal is sent to three peers (where the chaincode is already installed), but 1 out of 3 peers responds with `SUCCESS`, but 2 out of 3 respond `FAILURE` because they cannot find `lib/cid` ? it look weird, because peer succeeds with instantiation, but rest of them failed

jtrayfield (Fri, 02 Nov 2018 16:47:30 GMT):
@rickr is sdk 1.2.2 compatible with fabric server 1.1?

amolpednekar (Fri, 02 Nov 2018 17:32:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LKyvgTX2KD67nhckY) @rickr Oh, okay. Do I need to do anything more from my end, reg FABJ-380?

anilbs (Mon, 05 Nov 2018 05:45:32 GMT):
Has joined the channel.

anilbs (Mon, 05 Nov 2018 05:53:44 GMT):
HI My name is Anil and my company Intain, a member of Hyperledger had issues in using SDK client while trying to interact with chaincode . Our topography uses Google VPC with seperate VM for orderer and peers . We do not get any error but the orderer handshake fails . I have used CLI and it works like a charm but want to use sdk since i have to use process executions and shell scripts , json with cli ...Anybody using the sdk with a enterprise topology , i have used orderer properties, peer properties , channel initialises to true , private key and public key path set , event hub also set for properties just like in the integration test example ..... But orderer handshake fails .... Like i said we are forced to use CLI ....

anilbs (Mon, 05 Nov 2018 05:54:36 GMT):
have anybody used sdk with tls on a enterprise topology ...

rickr (Mon, 05 Nov 2018 14:02:30 GMT):
@anilbs I can't recall for certain anyone has reported success or failure with Google VPC specifically. I do know the sdk is being used with IBM blockchain. What version of the sdk? What jdk ? What version of fabric ? Unrelated but have to ask, why are you still using eventhubs ? Have you tried setting the sdk's log level to trace and looked though it a little .. maybe something you can spot? What actual error are you seeing. Have you set the fabric orderer to debug mode and seen if there was anything at all in it's logs ?

koneal2013 (Mon, 05 Nov 2018 20:19:58 GMT):
Has joined the channel.

gravity (Mon, 05 Nov 2018 21:43:14 GMT):
hi all. how do you store enrollment credentials (enrollmentId, enrollmentSecret) for network identities (users) in a safe way? I mean, a scret must be stored safely, because we need it as a plain text to enroll a user on a CA server. the case is, we cannot take a password from the web application and use it for the identity on CA, can we? thanks in advance

Sreesha (Tue, 06 Nov 2018 08:43:55 GMT):
Has joined the channel.

Sreesha (Tue, 06 Nov 2018 08:44:42 GMT):
Hi all

Sreesha (Tue, 06 Nov 2018 08:47:08 GMT):
Iam new to fabric-sdk-java.Can anyone help me to know the limitations of java sdk compared to node sdk.because in https://github.com/hyperledger/fabric-sdk-java its written that " the SDK does not provide a means of persistence for the application defined channels and user artifacts on the client. '

Sreesha (Tue, 06 Nov 2018 08:47:39 GMT):
So does it mean channel data cannot be persisted?

rickr (Tue, 06 Nov 2018 11:47:57 GMT):
No - just that the SDK doesn't do it. Applications certainly can.

aatkddny (Tue, 06 Nov 2018 13:25:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5wtSp7jndcahoqKBW) @gravity Encrypt them before you persist them. In our case - which suffices because we have a private cloud - passwords go straight into our encrypt routine, enrollments are turned into a hex string using the bouncy castle hex encoder and then encrypted.

gravity (Tue, 06 Nov 2018 13:43:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HyHeFWvwN2pM5snLm) @aatkddny thanks, will try

aatkddny (Tue, 06 Nov 2018 13:49:53 GMT):
This'll speed things up. There's a pretty good chance I ripped it off from something Rick wrote and it's in the examples anyway, but this will turn an Enrollment into a string and back again. `enrollmentDetails` is obviously the attribute to be encrypted and is a string. ``` private void saveEnrollmentDetails() throws IOException { enrollmentDetails = null; if (enrollment != null) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(enrollment); oos.flush(); enrollmentDetails = Hex.toHexString(bos.toByteArray()); bos.close(); } } private void readEnrollmentDetails() throws IOException, ClassNotFoundException { if (StringUtils.hasText(enrollmentDetails)) { byte[] serialized = Hex.decode(enrollmentDetails); ByteArrayInputStream bis = new ByteArrayInputStream(serialized); ObjectInputStream ois; ois = new ObjectInputStream(bis); enrollment = (Enrollment) ois.readObject(); } } ```

hype2345 (Tue, 06 Nov 2018 22:13:56 GMT):
Has joined the channel.

hype2345 (Tue, 06 Nov 2018 22:33:24 GMT):
Hi guys!, I've been exploring the JSDK for fabric for a while and there are few things that still puzzle me. I've gone through most of the tutorials successfully, but exploring a bit further I came across the concept of connections profiles (There are also some issues closed in lira and Gerrit). Initially I thought this would be the way to go in order to provide your application information about the topology of the network that it connects to. However, I have not found any explanation or example on how to use… Additionally, I thought these connection profiles could be also the way to move away from the hardcoded urls that are used in the examples to connect to a CA or a peer… but I might be wrong here. Any idea where can I find more information about it? Many thanks in advanced.

hype2345 (Tue, 06 Nov 2018 22:33:24 GMT):
Hi guys!, I've been exploring the JSDK for fabric for a while and there are few things that still puzzle me. I've gone through most of the tutorials successfully, but exploring a bit further I came across the concept of connections profiles (There are also some issues closed in Jira and Gerrit). Initially I thought this would be the way to go in order to provide your application information about the topology of the network that it connects to. However, I have not found any explanation or example on how to use… Additionally, I thought these connection profiles could be also the way to move away from the hardcoded urls that are used in the examples to connect to a CA or a peer… but I might be wrong here. Any idea where can I find more information about it? Many thanks in advanced.

rickr (Tue, 06 Nov 2018 23:17:58 GMT):
@hype2345 https://github.com/hyperledger/fabric-sdk-java/blob/57870235171105e5367fd619e1aa3c7fa7a1f7e6/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java

hype2345 (Tue, 06 Nov 2018 23:26:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=R6aXh6vkpt5RcMdP9) @rickr oh many thanks! I think I missed that one... :cold_sweat:

midhun14 (Wed, 07 Nov 2018 06:30:58 GMT):
Has joined the channel.

tballast (Wed, 07 Nov 2018 09:33:45 GMT):
A question about clients, and if this is the wrong channel then please let me know.

tballast (Wed, 07 Nov 2018 09:42:37 GMT):
A question about clients, and if this is the wrong channel, please let me know. I am trying to write a client for a network that contains two organizations, each with two peers. Each network has it's own CA, and there is one orderer. I want to use the client to install chaincode on these peers, however, does each organization have to have its own client? Or is it possible to use a single client to interact with all peers?If each needs it's own, can I install the chaincode on Org1's peers using the CLI and then on Org2's with the client?

enriquebusti (Wed, 07 Nov 2018 12:02:11 GMT):
Has joined the channel.

rickr (Wed, 07 Nov 2018 12:04:17 GMT):
@tballast Haven't updated this in a while but should give you an idea https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

gravity (Wed, 07 Nov 2018 14:45:36 GMT):
Hi all Is it really necessary to setup mutual TLS? Is it acceptable to go into production with TLS disabled for fabric?

amolpednekar (Wed, 07 Nov 2018 15:36:32 GMT):
You should definitely enable TLS on Fabric network, else this is a major security flaw where all your data being sent will be unencrypted and be susecptible to MITM attacks. Now mutual TLS is even more secure, since your fabric peers can now verify that the requests are coming from a client that he knows and trusts; requests sent from non-identified client will be immediately rejected. This is a feasible model when you know that there's going to be a controlled number of clients connecting to your peers (B2B apps). If you are distribting your client as mobile apps for say; a consumer application, mutual TLS may not be possible since you need to add each client's certificate to your peer(s)

gravity (Wed, 07 Nov 2018 15:45:57 GMT):
@amolpednekar are there any examples of how to setup client app (fabric java sdk) to use TLS to connect to peers and orderers?

amolpednekar (Wed, 07 Nov 2018 15:54:30 GMT):
This has folder everything you need to get up and running with most SDK basics - https://github.com/hyperledger/fabric-sdk-java/tree/release-1.2/src/test But just to nudge you in the right direction - How tls certs are specified in a network config file https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/sdkintegration/network_configs/network-config.json#L77-L99 Then use the inbuilt NetworkConfig class to load this file like so: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java

gravity (Wed, 07 Nov 2018 16:47:01 GMT):
@amolpednekar oh, thanks I've missed this part with the network config

boydjohnson (Wed, 07 Nov 2018 22:41:19 GMT):
Has joined the channel.

boydjohnson (Wed, 07 Nov 2018 22:43:29 GMT):
https://issues.sonatype.org/projects/OSSRH/issues/OSSRH-43935 Hi All, I am looking for who deploys the fabric sdk to the Central Repository, because I am trying to publish Sawtooth artifacts and the sonatype folks say that the deployers of `org.hyperledger` need to give approval.

Mozer18 (Wed, 07 Nov 2018 23:10:01 GMT):
Has joined the channel.

rameshthoomu (Thu, 08 Nov 2018 00:11:00 GMT):
@boydjohnson Please look at this https://issues.sonatype.org/browse/OSSRH-30331?focusedCommentId=403069&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-403069

boydjohnson (Thu, 08 Nov 2018 02:15:04 GMT):
Thanks.

PadmavathyMohan (Thu, 08 Nov 2018 07:02:26 GMT):
Has joined the channel.

Swarnalatha (Thu, 08 Nov 2018 07:03:41 GMT):
Has joined the channel.

AkilaVasanthakumar (Thu, 08 Nov 2018 07:03:47 GMT):
Has joined the channel.

MuthuT (Thu, 08 Nov 2018 07:06:59 GMT):
Has joined the channel.

Jelle.Diet (Thu, 08 Nov 2018 12:15:12 GMT):
Has joined the channel.

gravity (Fri, 09 Nov 2018 13:26:50 GMT):
Hello what are the use cases for even hubs on peers?

halilkalkan (Fri, 09 Nov 2018 17:44:30 GMT):
Hello guys, I have a basic question, I want to join two different organizations into the same channel then try private data collections. But I couldn't figure out how it should be implemented because when I create channel instance for the second organization it gives me error. Is there any easy way to solve this issue? Thank you,

rickr (Fri, 09 Nov 2018 18:06:04 GMT):
@halilkalkan sample of mulit orgs https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

halilkalkan (Fri, 09 Nov 2018 18:32:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mjHDtuYEcL46WiwqZ) Thank you Rickr, I will try these code.

halilkalkan (Fri, 09 Nov 2018 18:32:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mjHDtuYEcL46WiwqZ) Thank you Rickr, I will try this code.

dave.enyeart (Fri, 09 Nov 2018 18:33:50 GMT):
note - make sure you don't 'create' a channel for the 2nd org, rather 'join' the channel.

halilkalkan (Fri, 09 Nov 2018 18:50:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mjHDtuYEcL46WiwqZ) Thank you Rickr, I will try this code.

kisna (Fri, 09 Nov 2018 19:10:49 GMT):
cross posting again here, as Java SDK is the right group: Java SDK + Java Chaincode instantiation keeps throwing a time out on instantiation, whereas GO chaincode works fine `2018-11-08 18:48:25,798 main ERROR Channel:4103 - Sending proposal to peer1.domain.com failed because of timeout(120000 milliseconds) expiration java.util.concurrent.TimeoutException at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4086) at org.hyperledger.fabric.sdk.Channel.sendInstantiationProposal(Channel.java:2501) at org.hyperledger.fabric.sdkintegration.End2endIT_custom_java_quotient.runChannel(End2endIT_custom_java.java:473) ` 2018-11-08 21:24:19.083 UTC [core/comm] ServerHandshake -> ERRO 0a5 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33486"} 2018-11-08 21:24:19.099 UTC [core/comm] ServerHandshake -> ERRO 0a6 TLS handshake failed with error EOF {"server": "PeerServer", "remote address": "172.20.0.9:33462"} 2018-11-08 21:24:19.804 UTC [endorser] SimulateProposal -> ERRO 0a7 [channel][7c4fa0e2] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode SimpleChaincode:1 for transaction Whereas go chain code works perfectly fine, no other difference in code Install works fine, instantiate Java chaincode always times out 2018-11-08 20:48:27.686 UTC [lscc] executeInstall -> INFO 031 Installed Chaincode [SimpleChaincode] Version [1] to peer Reproducible again and again only with java chaincode instantiation with same logs, go chaincode instantiate works fine: https://hastebin.com/osafazisaj.rb

kisna (Fri, 09 Nov 2018 19:46:09 GMT):
Existing E2E Java IT also fails in Java SDK using Java chain code, in the same step: responses = channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers()); 2018-11-09 19:04:22,357 main ERROR Channel:4117 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [foo] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP]

kisna (Fri, 09 Nov 2018 19:46:09 GMT):
Existing E2E Java IT also fails in Java SDK using Java chain code, in the same step, but for a different reason: responses = channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers()); 2018-11-09 19:04:22,357 main ERROR Channel:4117 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [foo] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP]

kisna (Fri, 09 Nov 2018 19:46:09 GMT):
@rickr Existing E2E Java IT also fails in Java SDK using Java chain code, in the same step, but for a different reason: responses = channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers()); 2018-11-09 19:04:22,357 main ERROR Channel:4117 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [foo] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [foo] creator org [Org1MSP]

rickr (Fri, 09 Nov 2018 19:47:04 GMT):
Have you looked at the server side ? each chaincode will produce it's own docker instance. Anything there ? Do docker logs on that to see if there's anyt

kisna (Fri, 09 Nov 2018 19:47:14 GMT):
install is fine

kisna (Fri, 09 Nov 2018 19:47:14 GMT):
strange, the Java SDK + Java chaincode integration test is failing on my local

kisna (Fri, 09 Nov 2018 19:47:14 GMT):
strange, the Java SDK v1.3 (latest snapshot) + Java chaincode integration test is failing on my local

rickr (Fri, 09 Nov 2018 19:48:46 GMT):
Are you running v1.3 ? Wasn't supported before that

rickr (Fri, 09 Nov 2018 19:53:09 GMT):
FWIW JSDK does have a Java chaincode integration test and haven't seen it failing.

rickr (Fri, 09 Nov 2018 19:54:00 GMT):
Maybe look at that

rickr (Fri, 09 Nov 2018 22:53:15 GMT):
Are you running 1.3 fabric pulled down from dockerhub ?

kisna (Fri, 09 Nov 2018 23:24:03 GMT):
yikes, may be I did not build again after pulling latest 1.3 SDK changes, assumed Intellij did not for me Did a full restart, confirmed 1.3 images, and ran again and can reproduce the error locally End2endJavaIT.setup:60->End2endIT.runFabricTest:211->End2endIT.runChannel:472 Not enough endorsers for install :0. error installing chaincode code example_cc_java:1(chaincode /var/hyperledger/production/chaincodes/example_cc_java.1 exists) ` 2018-11-09 23:16:43.617 UTC [dockercontroller] Start -> DEBU 2db9 Start container dev-peer0.org1.example.com-example_cc_java-1 2018-11-09 23:16:43.617 UTC [dockercontroller] createContainer -> DEBU 2dba Create container: dev-peer0.org1.example.com-example_cc_java-1 2018-11-09 23:16:43.626 UTC [dockercontroller] Start -> DEBU 2dbb start-could not find image (container id ), because of ...attempt to recreate image 2018-11-09 23:16:43.627 UTC [chaincode-platform] GenerateDockerfile -> DEBU 2dbc FROM hyperledger/fabric-javaenv:amd64-1.3.0-rc1 ADD binpackage.tar /root/chaincode-java/chaincode LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_java" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="JAVA" \ org.hyperledger.fabric.version="1.3.0-rc1" \ org.hyperledger.fabric.base.version="0.4.12" ENV CORE_CHAINCODE_BUILDLEVEL=1.3.0-rc1 2018-11-09 23:16:43.688 UTC [java-platform] GenerateDockerBuild -> DEBU 2dbd Executing docker build hyperledger/fabric-javaenv:amd64-1.3.0-rc1, ./build.sh 2018-11-09 23:16:43.688 UTC [util] DockerBuild -> DEBU 2dbe Attempting build with image hyperledger/fabric-javaenv:amd64-1.3.0-rc1 2018-11-09 23:18:36.523 UTC [deliveryClient] StartDeliverForChannel -> DEBU 34a0 This peer will pass blocks from orderer service to other peers for channel foo 2018-11-09 23:19:01.473 UTC [ConnProducer] NewConnection -> ERRO 34f0 Failed connecting to orderer.example.com:7050 , error: context deadline exceeded 2018-11-09 23:19:02.916 UTC [deliveryClient] connect -> DEBU 34f1 Connected to 2018-11-09 23:19:03.041 UTC [deliveryClient] connect -> ERRO 34f3 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2018-11-09 23:19:07.902 UTC [deliveryClient] try -> WARN 34f6 Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] , at 1 attempt. Retrying in 1s `

kisna (Fri, 09 Nov 2018 23:24:03 GMT):
@rickr, did a clean build again after pulling latest 1.3 SDK changes, assumed Intellij did not for me Did a full restart, confirmed 1.3 images, and ran again and can reproduce the error locally End2endJavaIT.setup:60->End2endIT.runFabricTest:211->End2endIT.runChannel:472 Not enough endorsers for install :0. error installing chaincode code example_cc_java:1(chaincode /var/hyperledger/production/chaincodes/example_cc_java.1 exists) ` 2018-11-09 23:16:43.617 UTC [dockercontroller] Start -> DEBU 2db9 Start container dev-peer0.org1.example.com-example_cc_java-1 2018-11-09 23:16:43.617 UTC [dockercontroller] createContainer -> DEBU 2dba Create container: dev-peer0.org1.example.com-example_cc_java-1 2018-11-09 23:16:43.626 UTC [dockercontroller] Start -> DEBU 2dbb start-could not find image (container id ), because of ...attempt to recreate image 2018-11-09 23:16:43.627 UTC [chaincode-platform] GenerateDockerfile -> DEBU 2dbc FROM hyperledger/fabric-javaenv:amd64-1.3.0-rc1 ADD binpackage.tar /root/chaincode-java/chaincode LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_java" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="JAVA" \ org.hyperledger.fabric.version="1.3.0-rc1" \ org.hyperledger.fabric.base.version="0.4.12" ENV CORE_CHAINCODE_BUILDLEVEL=1.3.0-rc1 2018-11-09 23:16:43.688 UTC [java-platform] GenerateDockerBuild -> DEBU 2dbd Executing docker build hyperledger/fabric-javaenv:amd64-1.3.0-rc1, ./build.sh 2018-11-09 23:16:43.688 UTC [util] DockerBuild -> DEBU 2dbe Attempting build with image hyperledger/fabric-javaenv:amd64-1.3.0-rc1 2018-11-09 23:18:36.523 UTC [deliveryClient] StartDeliverForChannel -> DEBU 34a0 This peer will pass blocks from orderer service to other peers for channel foo 2018-11-09 23:19:01.473 UTC [ConnProducer] NewConnection -> ERRO 34f0 Failed connecting to orderer.example.com:7050 , error: context deadline exceeded 2018-11-09 23:19:02.916 UTC [deliveryClient] connect -> DEBU 34f1 Connected to 2018-11-09 23:19:03.041 UTC [deliveryClient] connect -> ERRO 34f3 Failed obtaining connection: Could not connect to any of the endpoints: [orderer.example.com:7050] 2018-11-09 23:19:07.902 UTC [deliveryClient] try -> WARN 34f6 Got error: Could not connect to any of the endpoints: [orderer.example.com:7050] , at 1 attempt. Retrying in 1s `

kisna (Fri, 09 Nov 2018 23:38:06 GMT):
Not sure how it is working for you guys ;) Failed tests: End2endJavaIT.setup:60->End2endIT.runFabricTest:211->End2endIT.runChannel:527 Not enough endorsers for instantiate :0endorser failed with Sending proposal to peer1.org1.example.com failed because of timeout(120000 milliseconds) expiration. Was verified:false

kisna (Fri, 09 Nov 2018 23:38:06 GMT):
Not sure how it is working for you guys ;) Failed tests: End2endJavaIT.setup:60->End2endIT.runFabricTest:211->End2endIT.runChannel:527 Not enough endorsers for instantiate :0endorser failed with Sending proposal to peer1.org1.example.com failed because of timeout(120000 milliseconds) expiration. Was verified:false https://paste.ee/p/PrAMZ

kisna (Fri, 09 Nov 2018 23:38:06 GMT):
Not sure how it is working for you guys ;) Failed tests: End2endJavaIT.setup:60->End2endIT.runFabricTest:211->End2endIT.runChannel:527 Not enough endorsers for instantiate :0endorser failed with Sending proposal to peer1.org1.example.com failed because of timeout(120000 milliseconds) expiration. Was verified:false https://paste.ee/p/PrAMZ https://paste.ee/p/nDVt5 Get same time outs on Java-SDK Java chaincode instantiation as well :(

rickr (Sat, 10 Nov 2018 00:24:23 GMT):
Just finished a build https://jenkins.hyperledger.org/job/fabric-sdk-java-merge-x86_64/332/consoleFull 19:04:42 RUNNING: End2endJavaIT. ran through just fine

rickr (Sat, 10 Nov 2018 00:26:33 GMT):
what are in the docker logs of the java chaaincode ?

rickr (Sat, 10 Nov 2018 00:31:09 GMT):
try setting export ORG_HYPERLEDGER_FABRIC_SDK_PROPOSAL_WAIT_TIME=360000

rickr (Sat, 10 Nov 2018 00:31:19 GMT):
on the client side

kisna (Sat, 10 Nov 2018 06:26:09 GMT):
added two extra zeros, still get the same error on my mac: attached peer logs with same lscc timeout after some time: https://paste.ee/p/gewFg

kisna (Sat, 10 Nov 2018 06:26:09 GMT):
@rickr added two extra zeros, still get the same error on my mac: attached peer logs with same lscc timeout after some time: https://paste.ee/p/gewFg

kisna (Sat, 10 Nov 2018 06:31:18 GMT):
Set them in the chaincode test like this: private static final String INVOKEWAITTIME = PROPBASE + "InvokeWaitTime"; private static final String DEPLOYWAITTIME = PROPBASE + "DeployWaitTime"; private static final String PROPOSALWAITTIME = PROPBASE + "ProposalWaitTime"; defaultProperty(INVOKEWAITTIME, "3200000"); defaultProperty(DEPLOYWAITTIME, "12000000"); defaultProperty(PROPOSALWAITTIME, "12000000");

kisna (Sat, 10 Nov 2018 06:31:18 GMT):
Set them in the chaincode test like this on my mac: private static final String INVOKEWAITTIME = PROPBASE + "InvokeWaitTime"; private static final String DEPLOYWAITTIME = PROPBASE + "DeployWaitTime"; private static final String PROPOSALWAITTIME = PROPBASE + "ProposalWaitTime"; defaultProperty(INVOKEWAITTIME, "3200000"); defaultProperty(DEPLOYWAITTIME, "12000000"); defaultProperty(PROPOSALWAITTIME, "12000000");

kisna (Sat, 10 Nov 2018 06:41:14 GMT):
See these in the chaincode container logs: Nov 10, 2018 6:38:52 AM org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder INFO: Configuring channel connection to peer. Exception in thread "Thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.computeBinding(ChaincodeStubImpl.java:97) at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.(ChaincodeStubImpl.java:83) at org.hyperledger.fabric.shim.impl.Handler.lambda$handleInit$0(Handler.java:248) at java.lang.Thread.run(Thread.java:748)

kisna (Sat, 10 Nov 2018 06:41:14 GMT):
See these in the chaincode container logs: Nov 10, 2018 6:38:52 AM org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder INFO: Configuring channel connection to peer. Exception in thread "Thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.computeBinding(ChaincodeStubImpl.java:97) at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.(ChaincodeStubImpl.java:83) at org.hyperledger.fabric.shim.impl.Handler.lambda$handleInit$0(Handler.java:248) at java.lang.Thread.run(Thread.java:748) before I see 2018-11-10 06:39:23.153 UTC [chaincode] Execute -> DEBU 1433 Exit 2018-11-10 06:39:23.154 UTC [endorser] callChaincode -> DEBU 1434 [foo][47ee0f9e46b1c7fd2ed79064d42038d671138819ba336a37502f1732dfcb4369] Exit 2018-11-10 06:39:23.156 UTC [endorser] SimulateProposal -> ERRO 1435 [foo][47ee0f9e] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1129

kisna (Sat, 10 Nov 2018 06:41:14 GMT):
See these in the chaincode container logs: Nov 10, 2018 6:38:52 AM org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder INFO: Configuring channel connection to peer. Exception in thread "Thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.computeBinding(ChaincodeStubImpl.java:97) at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.(ChaincodeStubImpl.java:83) at org.hyperledger.fabric.shim.impl.Handler.lambda$handleInit$0(Handler.java:248) at java.lang.Thread.run(Thread.java:748) before I see 2018-11-10 06:38:53.173 UTC [chaincode] sendReady -> DEBU 11cc Changed to state ready for chaincode name:"example_cc_java:1" 2018-11-10 06:38:53.174 UTC [chaincode] Launch -> DEBU 11cd launch complete 2018-11-10 06:38:53.175 UTC [chaincode] Execute -> DEBU 11ce Entry <<< 2018-11-10 06:39:23.153 UTC [chaincode] Execute -> DEBU 1433 Exit >>> 2018-11-10 06:39:23.154 UTC [endorser] callChaincode -> DEBU 1434 [foo][47ee0f9e46b1c7fd2ed79064d42038d671138819ba336a37502f1732dfcb4369] Exit 2018-11-10 06:39:23.156 UTC [endorser] SimulateProposal -> ERRO 1435 [foo][47ee0f9e] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1129 Is the LSCC timeout different from proposal wait time, because I gave large values hardcoded in TestConfig InvokeWaitTime and they are not honored?

kisna (Sat, 10 Nov 2018 06:41:14 GMT):
@rickr See these in the chaincode container logs: Nov 10, 2018 6:38:52 AM org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder INFO: Configuring channel connection to peer. Exception in thread "Thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.computeBinding(ChaincodeStubImpl.java:97) at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.(ChaincodeStubImpl.java:83) at org.hyperledger.fabric.shim.impl.Handler.lambda$handleInit$0(Handler.java:248) at java.lang.Thread.run(Thread.java:748) before I see 2018-11-10 06:38:53.173 UTC [chaincode] sendReady -> DEBU 11cc Changed to state ready for chaincode name:"example_cc_java:1" 2018-11-10 06:38:53.174 UTC [chaincode] Launch -> DEBU 11cd launch complete 2018-11-10 06:38:53.175 UTC [chaincode] Execute -> DEBU 11ce Entry <<< 2018-11-10 06:39:23.153 UTC [chaincode] Execute -> DEBU 1433 Exit >>> 2018-11-10 06:39:23.154 UTC [endorser] callChaincode -> DEBU 1434 [foo][47ee0f9e46b1c7fd2ed79064d42038d671138819ba336a37502f1732dfcb4369] Exit 2018-11-10 06:39:23.156 UTC [endorser] SimulateProposal -> ERRO 1435 [foo][47ee0f9e] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1129 Is the LSCC timeout different from proposal wait time, because I gave large values hardcoded in TestConfig InvokeWaitTime and they are not honored?

kisna (Sat, 10 Nov 2018 06:41:14 GMT):
@rickr See these in the chaincode container logs: Nov 10, 2018 6:38:52 AM org.hyperledger.fabric.shim.ChaincodeBase newChannelBuilder INFO: Configuring channel connection to peer. Exception in thread "Thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer; at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.computeBinding(ChaincodeStubImpl.java:97) at org.hyperledger.fabric.shim.impl.ChaincodeStubImpl.(ChaincodeStubImpl.java:83) at org.hyperledger.fabric.shim.impl.Handler.lambda$handleInit$0(Handler.java:248) at java.lang.Thread.run(Thread.java:748) which JDK version major.minor do you guys use in the tests, can you guys also run on the latest docker instance in mac OS as well ? before I see 2018-11-10 06:38:53.173 UTC [chaincode] sendReady -> DEBU 11cc Changed to state ready for chaincode name:"example_cc_java:1" 2018-11-10 06:38:53.174 UTC [chaincode] Launch -> DEBU 11cd launch complete 2018-11-10 06:38:53.175 UTC [chaincode] Execute -> DEBU 11ce Entry <<< 2018-11-10 06:39:23.153 UTC [chaincode] Execute -> DEBU 1433 Exit >>> 2018-11-10 06:39:23.154 UTC [endorser] callChaincode -> DEBU 1434 [foo][47ee0f9e46b1c7fd2ed79064d42038d671138819ba336a37502f1732dfcb4369] Exit 2018-11-10 06:39:23.156 UTC [endorser] SimulateProposal -> ERRO 1435 [foo][47ee0f9e] failed to invoke chaincode name:"lscc" , error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1129 Is the LSCC timeout different from proposal wait time, because I gave large values hardcoded in TestConfig InvokeWaitTime and they are not honored?

kisna (Sat, 10 Nov 2018 06:55:00 GMT):
this is fine, I will continue with GO chaincode since last few months :)

archit90 (Sat, 10 Nov 2018 10:55:37 GMT):
Has joined the channel.

archit90 (Sat, 10 Nov 2018 10:59:19 GMT):
Hi, requesting help. I am trying to build, install chaincode in dev mode (HLF1.3) for java (by following HFL 1.3 documetation for node and trying to translate same things for java). As far as i have understood, we build chaincode in instance of `hyperledger/fabric-ccenv` image and install and instantiate it on channel using `hyperledger/fabric-tools` image named cli. But ccenv image does not have gradle. Am i missing something?

rickr (Sat, 10 Nov 2018 13:47:37 GMT):
@archit90 Would ask #fabric-questions as it's not really specific to JSDK and probably get better luck with larger audience.

rickr (Sat, 10 Nov 2018 13:47:37 GMT):
@archit90 Would ask #fabric-chaincode-dev as it's not really specific to JSDK and probably get better luck with larger audience.

rickr (Sat, 10 Nov 2018 13:47:37 GMT):
@archit90 Would ask #fabric-chaincode-dev as it's not really specific to JSDK and probably get better luck with larger audience doing chaincode development.

rickr (Sat, 10 Nov 2018 13:51:38 GMT):
@gennadyl I think this really something happening in the Java chaincode execution environment ` java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer` https://chat.hyperledger.org/channel/fabric-sdk-java?msg=XNQ7qjYqqhmQrMp3q

rickr (Sat, 10 Nov 2018 14:03:01 GMT):
@gennadyl Besides finding out why it's happening probably should look into why the SDK only gets a timeout instead of something that reflects this error.

archit90 (Sat, 10 Nov 2018 15:18:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6APWymhsfxtvzTXJA) @rickr This issue is documented here https://jira.hyperledger.org/browse/FAB-12674?workflowName=FAB%3A+Story+Workflow&stepId=2 which is in progress. I managed to solve it by checking out tag `v1.3.0` of https://github.com/hyperledger/fabric-chaincode-java and doing `./gradlew install`

archit90 (Sat, 10 Nov 2018 15:19:09 GMT):
So you will be using `fabric-chaincode-shim:1.3.0` from local maven repo. Hope it helps

archit90 (Sat, 10 Nov 2018 15:19:09 GMT):
Rebuild the chaincode and now you will be using `fabric-chaincode-shim:1.3.0` from local maven repo which is complied using java 8. Hope it helps

archit90 (Sat, 10 Nov 2018 15:20:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EJQRciTabCqQsnX3u) Mostly FYI to those who has the question.. This was not really needed in chaincode dev mode.. just build the fat jar and run `java -jar ` in `fabric-ccenv` image

gennadyl (Sat, 10 Nov 2018 16:16:41 GMT):
@rickr will look into it tomorrow

archit90 (Sat, 10 Nov 2018 16:24:48 GMT):
@gennadyl do check this https://jira.hyperledger.org/browse/FAB-12674?workflowName=FAB:+Story+Workflow&stepId=2 and my comment above.

rickr (Sat, 10 Nov 2018 16:29:51 GMT):
@archit90 odd I've not had to do that and the sdk verification builds are running fine.

archit90 (Sat, 10 Nov 2018 16:45:34 GMT):
@rickr I was facing this while building chaincode. The chaincode builds fine but fails when instantiate is called via cli. Its not for SDK, so agreed this is not correct channel for this.

archit90 (Sat, 10 Nov 2018 16:45:34 GMT):
@rickr I was facing this while building chaincode. The chaincode builds fine but fails when instantiate is called via cli. Its not issue of SDK, so agreed this is not correct channel for this.

gennadyl (Sat, 10 Nov 2018 17:05:59 GMT):
@rickr I suuspected this is the problem, based on I had chance to see in 2 minutes. I am working on fix.

gennadyl (Sat, 10 Nov 2018 17:10:26 GMT):
@archit90 welcome to java chaincode channel

gennadyl (Sat, 10 Nov 2018 17:12:34 GMT):
@archit90 btw, you right, rebuilding java shim with java 8 and installing it to local repo fix the problem

archit90 (Sat, 10 Nov 2018 17:20:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ab53863c-f7db-4262-8330-1c235788e2c3) @gennadyl Thanks!

archit90 (Sat, 10 Nov 2018 17:21:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6780e70e-dac9-4e2f-b5f1-9aa3c0a75f2d) @gennadyl Yup, the JIRA suggested this

gravity (Sun, 11 Nov 2018 08:53:12 GMT):
hi all I'm trying to connect to fabric network v.1.3.0 from spring boot application (hyperledger java sdk 1.3.0-SNAPSHOT) using TLS, but getting this exception: ``` Caused by: java.lang.NoSuchFieldError: SSL_MAX_RECORD_LENGTH at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.(ReferenceCountedOpenSslEngine.java:129) ~[netty-handler-4.1.24.Final.jar:4.1.24.Final] at io.netty.handler.ssl.OpenSslContext.newEngine0(OpenSslContext.java:49) ~[netty-handler-4.1.24.Final.jar:4.1.24.Final] at io.netty.handler.ssl.ReferenceCountedOpenSslContext.newEngine(ReferenceCountedOpenSslContext.java:352) ~[netty-handler-4.1.24.Final.jar:4.1.24.Final] at io.grpc.netty.ProtocolNegotiators$TlsNegotiator$1.handlerAdded(ProtocolNegotiators.java:312) ~[grpc-netty-1.15.0.jar:1.15.0] at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:637) ~[netty-transport-4.1.24.Final.jar:4.1.24.Final] ... 20 common frames omitted ``` Previously I read here similar messages and pointers was to add an additional dependencies `netty-tcnative-boringssl-static:2.0.6.final` and `netty-tcnative:2.0.6.final`, but it does not help. Any advice? thanks in advance

rickr (Sun, 11 Nov 2018 18:57:13 GMT):
Well 1.3.0-SNAPSHOT pom.xml is referencing 4.1.29.Final . IMO would look what's there and what's seems to be _playing nice together_ and stick to that.

kisna (Sun, 11 Nov 2018 20:11:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RqzoFRbhkNk3yoAtr) @archit90 @gennadyl @archit90 so this is also related to the lscc timeouts? All I have to do is rebuild java-shim with java 8 into my maven local repo?

gennadyl (Mon, 12 Nov 2018 08:02:56 GMT):
@kisna I think so. Worth a try

AlexanderZhovnuvaty (Mon, 12 Nov 2018 11:06:31 GMT):
Has left the channel.

gravity (Mon, 12 Nov 2018 11:34:40 GMT):
@rickr I've made it running for sdk v1.3.0-SNAPSHOT using `netty-tcnative-boringssl-static:2.0.10.Final` and `netty-tcnative:2.0.10.Final` and scope `provided` for both

gravity (Mon, 12 Nov 2018 11:35:45 GMT):
but now I'm getting `Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching localhost found.` even when I set `peerProperties.setProperty("hostnameOverride", peerName);` for peers and for orderers

boydjohnson (Mon, 12 Nov 2018 15:08:09 GMT):
Has left the channel.

gravity (Mon, 12 Nov 2018 15:39:04 GMT):
weird things happen with the TLS integration on the SDK side I've provided certificates for orderers and peers, was able to create a channel via TLS. later, when I recreated a network (new client certificates were created), everything became broken. I'm getting this exception now: ``` Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ~[na:1.8.0_191] at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) ~[na:1.8.0_191] at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) ~[na:1.8.0_191] at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392) ~[na:1.8.0_191] ... 34 common frames omitted ``` does anybody get this previously? because it's really weird

gravity (Mon, 12 Nov 2018 15:51:45 GMT):
I'm definitely missing something could someone give me a clue?

aatkddny (Mon, 12 Nov 2018 15:54:59 GMT):
you have a hostname override in the properties?

gravity (Mon, 12 Nov 2018 15:56:44 GMT):
yep

gravity (Mon, 12 Nov 2018 15:56:44 GMT):
@aatkddny yep. if I remove this, I will the error `No subject alternative DNS name matching localhost found`

gravity (Mon, 12 Nov 2018 15:56:44 GMT):
@aatkddny yep. if I remove this, I will get the error `No subject alternative DNS name matching localhost found`

gravity (Mon, 12 Nov 2018 15:56:44 GMT):
@aatkddny yep. if I remove this, I will get the error `No subject alternative DNS name matching localhost found` UPDATED: I've solved it and get rid of `Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target`

gravity (Mon, 12 Nov 2018 16:58:42 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YPBADN85Wt9ufSdEj) but this one still appears.

gravity (Mon, 12 Nov 2018 16:59:23 GMT):
I assumed that if I set property `hostnameOverride`, it should work on dev environment

kisna (Mon, 12 Nov 2018 19:48:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xfvF6Mp8qK8DQMkQe) Yes, I see the SDK chaincode gradle build depend on 1.3.0 version, let me build my own chaincode snapshot and update SDK example to point to it /chaincode/input/src/src/main/java/org/hyperledger/fabric/example/SimpleChaincode.java + '[' -d /chaincode/output ']' + rm -rf '/chaincode/output/*' + '[' -d /root/chaincode-java/chaincode/build/out ']' + rm -rf '/root/chaincode-java/chaincode/build/out/*' + '[' -f /chaincode/input/src/build.gradle ']' + buildGradle /chaincode/input/src/ /chaincode/output/ + cd /chaincode/input/src/ + echo 'Gradle build' + ls -l Gradle build total 20 -rw-r--r-- 1 root root 4281 Sep 5 05:56 SimpleChaincode.java -rw-r--r-- 1 root root 547 Nov 12 19:31 build.gradle -rw-r--r-- 1 root root 54 Oct 1 05:01 settings.gradle drwxr-xr-x 3 root root 4096 Nov 12 19:38 src + gradle build shadowJar Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details :compileJava Download https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml Download https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.0/fabric-chaincode-shim-1.3.0.pom Download https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-protos/1.3.0/fabric-chaincode-protos-1.3.0.pom Download https://repo.maven.apache.org/maven2/io/grpc/grpc-core/maven-metadata.xml Download https://repo.maven.apache.org/maven2/io/netty/netty-codec-http2/maven-metadata.xml Download https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-protos/1.3.0/fabric-chaincode-protos-1.3.0.jar Download https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.0/fabric-chaincode-shim-1.3.0.jar

kisna (Mon, 12 Nov 2018 19:49:56 GMT):
so build the chaincode project: ` find . -name "*.jar" ./fabric-chaincode-java/fabric-chaincode-protos/1.3.1-SNAPSHOT/fabric-chaincode-protos-1.3.1-SNAPSHOT.jar ./fabric-chaincode-java/fabric-chaincode-protos/1.3.1-SNAPSHOT/fabric-chaincode-protos-1.3.1-SNAPSHOT-javadoc.jar ./fabric-chaincode-java/fabric-chaincode-protos/1.3.1-SNAPSHOT/fabric-chaincode-protos-1.3.1-SNAPSHOT-sources.jar ./fabric-chaincode-java/fabric-chaincode-docker/1.3.1-SNAPSHOT/fabric-chaincode-docker-1.3.1-SNAPSHOT.jar ./fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT-sources.jar ./fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT-javadoc.jar ./fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar `

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
update SDK chaincode example dependencies to ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` `

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
update SDK chaincode example dependencies to ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
updated SDK chaincode example dependencies and it still won't work because the SDK is probably running the chaincode installation inside the container, so there is local access to my maven repository there ;( ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
updated SDK chaincode example dependencies and it still won't work because the SDK is probably running the chaincode installation inside the container, so there is local access to my maven repository there :(, other than a hack ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
updated SDK chaincode example dependencies and it still won't work because the SDK is probably running the chaincode installation inside the container, so there is local access to my maven repository there :(, other than a hack by mounting peers with my local maven repo - ~/.m2:/root/.m2 ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
updated SDK chaincode example dependencies and it still won't work because the SDK is probably running the chaincode installation inside the container, so there is local access to my maven repository there :(, other than a hack by mounting peers with my local maven repo - ~/.m2:/root/.m2 ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
updated SDK chaincode example dependencies and it still won't work because the SDK is probably running the chaincode installation inside the container, so there is NO local access to my maven repository there :(, even with a hack by mounting peers with my local maven repo - ~/.m2:/root/.m2, there is no control on variables passed to chaincode container initialization ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 19:50:51 GMT):
@rickr updated SDK chaincode example dependencies and it still won't work because the SDK is probably running the chaincode installation inside the container, so there is NO local access to my maven repository there :(, even with a hack by mounting peers with my local maven repo - ~/.m2:/root/.m2, there is no control on variables passed to chaincode container initialization ` group 'org.hyperledger.fabric-chaincode-java' version '1.3.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenLocal() <<< mavenCentral() } dependencies { compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.3.1-SNAPSHOT' } ` Then it was trying to find /root/.m2 ls -ltrh /root/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar No such file or directory Whereas my jars were in ls -ltrh ~/.m2/repository/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/1.3.1-SNAPSHOT/fabric-chaincode-shim-1.3.1-SNAPSHOT.jar

kisna (Mon, 12 Nov 2018 20:58:42 GMT):
@rickr @archit90 as discussed above, it won't work either because the java chaincode container is expecting the volume mounted, lot of time wasted on this!! 2018-11-12 20:49:12.796 UTC [dockercontroller] Start -> DEBU 1257 start-could not find image (container id ), because of ...attempt to recreate image 2018-11-12 20:49:12.797 UTC [chaincode-platform] GenerateDockerfile -> DEBU 1258 FROM hyperledger/fabric-javaenv:amd64-1.3.0-rc1 ADD binpackage.tar /root/chaincode-java/chaincode LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_java" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="JAVA" \ org.hyperledger.fabric.version="1.3.0-rc1" \ org.hyperledger.fabric.base.version="0.4.12" ENV CORE_CHAINCODE_BUILDLEVEL=1.3.0-rc1

kisna (Mon, 12 Nov 2018 20:58:42 GMT):
@rickr @archit90 as discussed above, it won't work either because the java chaincode container is expecting the volume mounted, lot of time wasted on this!! 2018-11-12 20:49:12.796 UTC [dockercontroller] Start -> DEBU 1257 start-could not find image (container id ), because of ...attempt to recreate image 2018-11-12 20:49:12.797 UTC [chaincode-platform] GenerateDockerfile -> DEBU 1258 FROM hyperledger/fabric-javaenv:amd64-1.3.0-rc1 ADD binpackage.tar /root/chaincode-java/chaincode LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_java" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="JAVA" \ org.hyperledger.fabric.version="1.3.0-rc1" \ org.hyperledger.fabric.base.version="0.4.12" ENV CORE_CHAINCODE_BUILDLEVEL=1.3.0-rc1

kisna (Mon, 12 Nov 2018 20:58:42 GMT):
@rickr @archit90 as discussed above, it won't work either because the java chaincode container is expecting the volume mounted, lot of time wasted on this!! 2018-11-12 20:49:12.796 UTC [dockercontroller] Start -> DEBU 1257 start-could not find image (container id ), because of ...attempt to recreate image 2018-11-12 20:49:12.797 UTC [chaincode-platform] GenerateDockerfile -> DEBU 1258 FROM hyperledger/fabric-javaenv:amd64-1.3.0-rc1 ADD binpackage.tar /root/chaincode-java/chaincode LABEL org.hyperledger.fabric.chaincode.id.name="example_cc_java" \ org.hyperledger.fabric.chaincode.id.version="1" \ org.hyperledger.fabric.chaincode.type="JAVA" \ org.hyperledger.fabric.version="1.3.0-rc1" \ org.hyperledger.fabric.base.version="0.4.12" ENV CORE_CHAINCODE_BUILDLEVEL=1.3.0-rc1 I give up!!!

zhongxuyang (Tue, 13 Nov 2018 02:31:16 GMT):
Has joined the channel.

AishwaryaKudalkar (Tue, 13 Nov 2018 03:57:27 GMT):
@rickr I was trying to replicate NetworkConfigIT.java. when I try to send the installProposal request I get the following errors in peer logs. `2018-11-12 06:43:46.952 UTC [eventhub_producer] Chat -> ERRO 039 Error handling message: event message validation failed for 10.244.48.53:53176: failed deserializing event creator: expected MSP ID Org2MSP, received Org1MSP 2018-11-12 06:43:47.378 UTC [protoutils] ValidateProposalMessage -> WARN 03a channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP ` When sending the installProposal request we pass the peers using channel.getPeers().(https://github.com/hyperledger/fabric-sdk-java/blob/v1.2.0/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L439) But channel.getPeers() gives ALL the peers defined in channel object of the network-config.json file (2 orgs; in this case) and not just peers belonging to the current UserContext set. (say, org1)

AishwaryaKudalkar (Tue, 13 Nov 2018 03:57:27 GMT):
@rickr I was trying to replicate NetworkConfigIT.java. when I try to send the installProposal request I get the following errors in peer logs. `2018-11-12 06:43:46.952 UTC [eventhub_producer] Chat -> ERRO 039 Error handling message: event message validation failed for 10.244.48.53:53176: failed deserializing event creator: expected MSP ID Org2MSP, received Org1MSP 2018-11-12 06:43:47.378 UTC [protoutils] ValidateProposalMessage -> WARN 03a channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP` When sending the installProposal request we pass the peers using channel.getPeers().(https://github.com/hyperledger/fabric-sdk-java/blob/v1.2.0/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L439) But channel.getPeers() gives ALL the peers defined in channel object of the network-config.json file (2 orgs; in this case) and not just peers belonging to the current UserContext set. (say, org1)

AishwaryaKudalkar (Tue, 13 Nov 2018 03:57:27 GMT):
@rickr I was trying to replicate NetworkConfigIT.java. when I try to send the installProposal request I get the following errors in peer logs. ` 2018-11-12 06:43:46.952 UTC [eventhub_producer] Chat -> ERRO 039 Error handling message: event message validation failed for 10.244.48.53:53176: failed deserializing event creator: expected MSP ID Org2MSP, received Org1MSP 2018-11-12 06:43:47.378 UTC [protoutils] ValidateProposalMessage -> WARN 03a channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP ` When sending the installProposal request we pass the peers using channel.getPeers().(https://github.com/hyperledger/fabric-sdk-java/blob/v1.2.0/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L439) But channel.getPeers() gives ALL the peers defined in channel object of the network-config.json file (2 orgs; in this case) and not just peers belonging to the current UserContext set. (say, org1)

AishwaryaKudalkar (Tue, 13 Nov 2018 03:57:27 GMT):
@rickr I was trying to replicate NetworkConfigIT.java. when I try to send the installProposal request I get the following errors in peer logs. ``` 2018-11-12 06:43:46.952 UTC [eventhub_producer] Chat -> ERRO 039 Error handling message: event message validation failed for 10.244.48.53:53176: failed deserializing event creator: expected MSP ID Org2MSP, received Org1MSP 2018-11-12 06:43:47.378 UTC [protoutils] ValidateProposalMessage -> WARN 03a channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP ``` When sending the installProposal request we pass the peers using channel.getPeers().(https://github.com/hyperledger/fabric-sdk-java/blob/v1.2.0/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L439) But channel.getPeers() gives ALL the peers defined in channel object of the network-config.json file (2 orgs; in this case) and not just peers belonging to the current UserContext set. (say, org1)

AishwaryaKudalkar (Tue, 13 Nov 2018 03:57:27 GMT):
@rickr I was trying to replicate NetworkConfigIT.java. when I try to send the installProposal request I get the following errors in peer logs. ``` 2018-11-12 06:43:46.952 UTC [eventhub_producer] Chat -> ERRO 039 Error handling message: event message validation failed for 10.244.48.53:53176: failed deserializing event creator: expected MSP ID Org2MSP, received Org1MSP 2018-11-12 06:43:47.378 UTC [protoutils] ValidateProposalMessage -> WARN 03a channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP ``` When sending the installProposal request we pass the peers using channel.getPeers().(https://github.com/hyperledger/fabric-sdk-java/blob/v1.2.0/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L439) But channel.getPeers() gives ALL the peers defined in channel object of the network-config.json file (2 orgs; in this case) and not just peers belonging to the current UserContext set. (say, org1)

AndresMartinezMelgar.itcl (Tue, 13 Nov 2018 07:26:26 GMT):
Has joined the channel.

tballast (Tue, 13 Nov 2018 11:01:38 GMT):
For the past few days I have been trying to get a network running with several peers (ie. more than one) and I am struggling like crazy to overcome this error: ``` $ docker logs dev-peer0.org1.example.com-example_cc_go-1 [0s038] 2018-11-13 10:51:07.714 UTC [example_cc0] Info -> INFO 001 Calling into main of chaincode. 2018-11-13 10:51:10.715 UTC [shim] userChaincodeStreamGetter -> ERRO 002 context deadline exceeded error trying to connect to local peer github.com/hyperledger/fabric/core/chaincode/shim.userChaincodeStreamGetter /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:112 github.com/hyperledger/fabric/core/chaincode/shim.Start /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go:151 main.main /chaincode/input/src/github.com/example_cc/example_cc.go:220 runtime.main /opt/go/src/runtime/proc.go:198 runtime.goexit /opt/go/src/runtime/asm_amd64.s:2361 2018-11-13 10:51:10.715 UTC [example_cc0] Errorf -> ERRO 003 Error starting Simple chaincode: error trying to connect to local peer: context deadline exceeded ``` I cannot seem to find the root of this. I will upload whatever logs or documents are necessary.

tballast (Tue, 13 Nov 2018 11:02:35 GMT):
I experience the same issue if I start a cli container and attempt to create/join the channel and install/instantiate the chaincode manually, without any java client.

gravity (Tue, 13 Nov 2018 11:20:17 GMT):
hi all are there any use cases for generating CRL? As I can see from the SDK, it is possible to revoke a certificate without generating a CRL, but the documentations says next: ``` After a certificate is revoked in the Fabric CA server, the appropriate MSPs in Hyperledger Fabric must also be updated. This includes both local MSPs of the peers as well as MSPs in the appropriate channel configuration blocks. ```

SudeepS 2 (Tue, 13 Nov 2018 11:23:44 GMT):
Has joined the channel.

SudeepS 2 (Tue, 13 Nov 2018 11:25:08 GMT):
Hi All,

SudeepS 2 (Tue, 13 Nov 2018 11:25:08 GMT):
Hi All, I am trying to setup JAVA SDK on my vagrant.. Is there any link to help in setting up the network and invoking chain code ?

SudeepS 2 (Tue, 13 Nov 2018 12:20:15 GMT):
Hi.. Can anyone provide me help on how to setup fabric-java-sdk ?

gravity (Tue, 13 Nov 2018 12:53:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TsDh6xckQ59o53EHa) @SudeepS 2 take a look at integration tests this one contains all the steps required to create channels, install, instantiate and query/invoke chaincodes https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java

SudeepS 2 (Tue, 13 Nov 2018 12:59:25 GMT):
Thanks @gravity I am confused what are the steps to setup and run.. I have done the following steps.. 1. ./fabric.sh start to run containers. 2. mvn test to test ..

SudeepS 2 (Tue, 13 Nov 2018 12:59:25 GMT):
Thanks @gravity I am confused what are the steps to setup and run.. I have done the following steps.. 1. ./fabric.sh start to run containers. 2. mvn test to test .. There is no need to generate certificates and add before starting network ?

SudeepS 2 (Tue, 13 Nov 2018 12:59:25 GMT):
Thanks @gravity I am confused what are the steps to setup and run.. I have done the following steps.. 1. ./fabric.sh start to run containers. 2. mvn test to test .. There is no need to generate certificates and add before starting network ?

SudeepS 2 (Tue, 13 Nov 2018 12:59:25 GMT):
Thanks @gravity I am confused what are the steps to setup and run.. I have done the following steps.. 1. ./fabric.sh start to run containers. 2. mvn test to test .. There is no need to generate certificates and add before starting network ? End2End test will do all the tests from enrolling users, creating channel to invoke chaincode ?

tballast (Tue, 13 Nov 2018 13:08:43 GMT):
@SudeepS 2 Yea, the End2End test will do all of that for you. The certificates and stuff have already been generated and are in the `fixture` folder.

chill37 (Tue, 13 Nov 2018 13:41:38 GMT):
Hi. Question about Service Discovery. I'm currently using First Network as my network settings.

chill37 (Tue, 13 Nov 2018 13:50:06 GMT):
Hi. Question about Service Discovery. I'm currently using 1) First Network as my network settings(but I kill org2 peers) 2) putting only one peer on network-config.yaml (peer1.org1.example.com) 3) try to mimic example (ServiceDiscoveryIT) For initial discovery Peer: Properties property =new Properties(); property.put("pemFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"); property.put("ssl-target-name-override", "peer0.org1.example.com"); property.put("hostnameOverride", "peer0.org1.example.com:7051"); Peer dP = client.newPeer("peer0.org1.example.com", "grpcs://localhost:7051", property); For rest of discovery: sdProp.put("clientCertFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt"); sdProp.put("clientKeyFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key"); sdProp.put("pemFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"); channel.addPeer(dP, createPeerOptions().setPeerRoles(EnumSet.of(PeerRole.SERVICE_DISCOVERY, PeerRole.CHAINCODE_QUERY, PeerRole.LEDGER_QUERY, PeerRole.ENDORSING_PEER))); channel.setServiceDiscoveryProperties(sdProp); When I do QUERY(sendTransactionToEndorser), I fail with this msg: Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org1.example.com, cause=java.net.UnknownHostException: peer0.org1.example.com AND this Exception: [org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Could not meet endorsement policy for chaincode mycc] Also, when I try to get names of peer, I get NAME: peer1.org1.example.com:7051, URL: grpcs://peer1.org1.example.com:7051 NAME: peer0.org1.example.com:7051, URL: grpcs://peer1.org1.example.com:7051 NAME: peer0.org1.example.com, URL: grpcs://localhost:7051 I'm not sure what I'm doing wrong. could anyone help out?

chill37 (Tue, 13 Nov 2018 13:50:06 GMT):
Hi. Question about Service Discovery. I'm currently using 1) First Network as my network settings(but I kill org2 peers, so left with two org1 peers) 2) putting only one peer on network-config.yaml (peer1.org1.example.com) 3) try to mimic example (ServiceDiscoveryIT) For initial discovery Peer: Properties property =new Properties(); property.put("pemFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"); property.put("ssl-target-name-override", "peer0.org1.example.com"); property.put("hostnameOverride", "peer0.org1.example.com:7051"); Peer dP = client.newPeer("peer0.org1.example.com", "grpcs://localhost:7051", property); For rest of discovery: sdProp.put("clientCertFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt"); sdProp.put("clientKeyFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key"); sdProp.put("pemFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem"); channel.addPeer(dP, createPeerOptions().setPeerRoles(EnumSet.of(PeerRole.SERVICE_DISCOVERY, PeerRole.CHAINCODE_QUERY, PeerRole.LEDGER_QUERY, PeerRole.ENDORSING_PEER))); channel.setServiceDiscoveryProperties(sdProp); When I do QUERY(sendTransactionToEndorser), I fail with this msg: Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org1.example.com, cause=java.net.UnknownHostException: peer0.org1.example.com AND this Exception: [org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Could not meet endorsement policy for chaincode mycc] Also, when I try to get names of peer, I get NAME: peer1.org1.example.com:7051, URL: grpcs://peer1.org1.example.com:7051 NAME: peer0.org1.example.com:7051, URL: grpcs://peer1.org1.example.com:7051 NAME: peer0.org1.example.com, URL: grpcs://localhost:7051 I'm not sure what I'm doing wrong. could anyone help out?

SudeepS 2 (Tue, 13 Nov 2018 13:50:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=YyR3eyHPxTEf5rFN9) @tballast Thanks @tballast

SudeepS 2 (Tue, 13 Nov 2018 13:59:39 GMT):
Failed endpoint grpcs://localhost:594 to parse certificate TLS client

rickr (Tue, 13 Nov 2018 14:30:39 GMT):
@gravity Most likely your TLS certificates were signed by the wrong CA.

rickr (Tue, 13 Nov 2018 14:33:21 GMT):
@kisna I think the SDK is deploying Java chaincode just fine. The integration test which are passing are working just fine and they install and invoke chaincode. I think you'd get better audience with #fabric-chaincode-dev or #fabric-java-chaincode channel.

rickr (Tue, 13 Nov 2018 14:33:44 GMT):
@AishwaryaKudalkar channel.getPeers does give ALL channels.

rickr (Tue, 13 Nov 2018 14:33:44 GMT):
@AishwaryaKudalkar channel.getPeers does give ALL peers

gravity (Tue, 13 Nov 2018 14:34:20 GMT):
@rickr and there is one more question about `revoke` method one of the overrided methods has boolean `genCrl` parameter. if a method is called with `genCRL=true`, will the update channel config transaction be generated and sent to an orderer under the hood?

rickr (Tue, 13 Nov 2018 14:38:02 GMT):
@gravity did you not cross post that on the #fabric-ca channel? ... if yes, please don't do that

gravity (Tue, 13 Nov 2018 14:39:15 GMT):
yes, I did excuse me if went wrong

rickr (Tue, 13 Nov 2018 14:41:59 GMT):
@tballast `ERRO 002 context deadline exceeded` maybe better of #fabric-peer-endorser-committer channel.

gravity (Tue, 13 Nov 2018 14:47:30 GMT):
@rickr could you give me a clue about the `genCRL` parameter?

adamhardie (Tue, 13 Nov 2018 15:22:21 GMT):
when a chaincode call fails, my code prints the following SEVERE: verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found

adamhardie (Tue, 13 Nov 2018 15:23:21 GMT):
is there a way to handle this more gracefully? Eg i have a query function that looks up a key based on getCreator. If they have no value saved, i am receiving this errored proposal

adamhardie (Tue, 13 Nov 2018 15:24:05 GMT):
(NB if the user key exists the chaincode returns the expected value associated with the key so it is working otherwise)

adamhardie (Tue, 13 Nov 2018 15:45:15 GMT):
Part2 : some questions about PeerOptions it seems quite random on whether the peer receives the latest block or not when subscribing to chaincode events I have set options.StartEvent(0L) in peer options when adding to channel. however i am not receiving any blocks

adamhardie (Tue, 13 Nov 2018 15:45:28 GMT):
is 0L the genesis block? what should i do if i want to load the full chain from start

adamhardie (Tue, 13 Nov 2018 15:45:31 GMT):
thanks

aatkddny (Tue, 13 Nov 2018 18:59:29 GMT):
so i'll admit i haven't spent very long looking at it, but I'm struggling to figure out what's supposed to be in the zip if you want to run java chaincode. I expected you'd stream in a built jar, but it doesn't look like that's the case.

rickr (Tue, 13 Nov 2018 19:31:57 GMT):
@adamhardie What version of the SDK are you running? This sounds like something that was addressed.

rickr (Tue, 13 Nov 2018 19:59:54 GMT):
@chill37 I'm thinking your fabric is running in docker where does addressees resolve, but on the native vm they don't

rickr (Tue, 13 Nov 2018 19:59:54 GMT):
@chill37 I'm thinking your fabric is running in docker where those addressees resolve, but on the native vm they don't

chill37 (Wed, 14 Nov 2018 00:35:46 GMT):
@rickr yes. fabric is running in docker. is there a way to resolve this? I'm not sure how to change the 'Discovered Nodes' to have the same address type(grpc:localhost) . thanks!

AishwaryaKudalkar (Wed, 14 Nov 2018 04:17:05 GMT):
@rickr I was running the integration test for Network Config(NetworkConfigIT.java) in debug mode and channel.getPeers() was returning peers belonging to the usercontext set (say, Org1). And that should be the case otherwise you get the following error. ``` 2018-11-12 06:43:46.952 UTC [eventhub_producer] Chat -> ERRO 039 Error handling message: event message validation failed for 10.244.48.53:53176: failed deserializing event creator: expected MSP ID Org2MSP, received Org1MSP 2018-11-12 06:43:47.378 UTC [protoutils] ValidateProposalMessage -> WARN 03a channel []: MSP error: expected MSP ID Org2MSP, received Org1MSP ```

SudeepS 2 (Wed, 14 Nov 2018 06:34:39 GMT):
I am getting the following errors while trying to run E2E intergrations tests. Endpoint grpcs://localhost:594 is grpcs with no CA certificates

SudeepS 2 (Wed, 14 Nov 2018 06:34:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6ikPj8KBZ2Mise5QH) I am getting the following errors while trying to run E2E intergrations tests. main WARN Endpoint:144 - Endpoint grpcs://localhost:594 is grpcs with no CA certificates main ERROR Endpoint:466 - Failed endpoint grpcs://localhost:594 to parse private key TLS client Someone, please help me how to fix this..

SudeepS 2 (Wed, 14 Nov 2018 06:36:18 GMT):
I am getting the following errors while trying to run E2E intergrations tests. main WARN Endpoint:144 - Endpoint grpcs://localhost:594 is grpcs with no CA certificates main ERROR Endpoint:466 - Failed endpoint grpcs://localhost:594 to parse private key TLS client Someone, please help me how to fix this..

SudeepS 2 (Wed, 14 Nov 2018 07:58:59 GMT):
I am getting the following error while running E2E tests 'org.hyperledger.fabric.sdk.identity.IdemixIdentitiesTest' ERROR IdemixSigningIdentity:250 - Idemix Nym Signature verification error

SudeepS 2 (Wed, 14 Nov 2018 07:58:59 GMT):
Please help me over this issue.. I am getting the following error while running E2E tests 'org.hyperledger.fabric.sdk.identity.IdemixIdentitiesTest' ERROR IdemixSigningIdentity:250 - Idemix Nym Signature verification error

adamhardie (Wed, 14 Nov 2018 10:41:10 GMT):
ah - 1.1.0. i will upgrade. thansk

adamhardie (Wed, 14 Nov 2018 10:46:47 GMT):
looks better - thanks @rickr I am now storing last block processed on the ledger per user, and loading that at startup, then the peer listens from that block. Thank you for your guidance so far one question - When i connect my Chaincode event listener, with PeerOptions.startEvents(100) eg, and there are 10 blocks. It seems the listener reads from 100, but in a random order. Eg 105, 104, 109. Should the orderer not guarantee the order of receipt here

chill37 (Wed, 14 Nov 2018 11:36:13 GMT):
For Service Discovery Network Setup (First Network as Example) when I set docker-compose-base.yaml port differently (as stated in node sdk doc) ... peer0.org1.example.com: container_name: peer0.org1.example.com extends: file: peer-base.yaml service: peer-base environment: - CORE_PEER_ID=peer0.org1.example.com - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:8051 - CORE_PEER_LOCALMSPID=Org1MSP volumes: - /var/run/:/host/var/run/ - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls - peer0.org1.example.com:/var/hyperledger/production ports: - 7051:7051 # - 7053:7053 peer1.org1.example.com: container_name: peer1.org1.example.com extends: file: peer-base.yaml service: peer-base environment: - CORE_PEER_ID=peer1.org1.example.com - CORE_PEER_ADDRESS=peer1.org1.example.com:8051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 - CORE_PEER_LOCALMSPID=Org1MSP volumes: - /var/run/:/host/var/run/ - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls - peer1.org1.example.com:/var/hyperledger/production ports: - 8051:8051 # - 8051:7051 # - 8053:7053 ... I can't seem to connect to peer1 from peer0

chill37 (Wed, 14 Nov 2018 11:36:13 GMT):
For Service Discovery Network Setup (First Network as Example) when I set docker-compose-base.yaml port differently (as stated in node sdk doc) ... peer0.org1.example.com: container_name: peer0.org1.example.com extends: file: peer-base.yaml service: peer-base environment: - CORE_PEER_ID=peer0.org1.example.com - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:8051 - CORE_PEER_LOCALMSPID=Org1MSP volumes: - /var/run/:/host/var/run/ - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp - ../crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls - peer0.org1.example.com:/var/hyperledger/production ports: - 7051:7051 # - 7053:7053 peer1.org1.example.com: container_name: peer1.org1.example.com extends: file: peer-base.yaml service: peer-base environment: - CORE_PEER_ID=peer1.org1.example.com - CORE_PEER_ADDRESS=peer1.org1.example.com:8051 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051 - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 - CORE_PEER_LOCALMSPID=Org1MSP volumes: - /var/run/:/host/var/run/ - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp - ../crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls - peer1.org1.example.com:/var/hyperledger/production ports: - 8051:8051 # - 8051:7051 # - 8053:7053 ... I can't seem to connect to peer1 from peer0 my docker log of peer0.org.example gets this error: 2018-11-14 11:36:37.069 UTC [gossip/discovery] func1 -> WARN 086 Could not connect to {peer1.org1.example.com:8051 [] [] peer1.org1.example.com:8051 } : context deadline exceeded would anyone know why?

chill37 (Wed, 14 Nov 2018 11:36:31 GMT):
my docker log of peer0.org.example gets this error:

chill37 (Wed, 14 Nov 2018 11:36:31 GMT):
my docker log of peer0.org.example gets this error: 2018-11-14 11:36:37.069 UTC [gossip/discovery] func1 -> WARN 086 Could not connect to {peer1.org1.example.com:8051 [] [] peer1.org1.example.com:8051 } : context deadline exceeded would anyone know why?

yanning (Wed, 14 Nov 2018 12:47:27 GMT):
Has joined the channel.

rickr (Wed, 14 Nov 2018 13:08:34 GMT):
@SudeepS 2 The SDK's integration test don't ever reference port 594

rickr (Wed, 14 Nov 2018 13:12:06 GMT):
@adamhardie I think they are but each are sent on a separate thread and the thread scheduling can make it appear out of order.

SudeepS 2 (Wed, 14 Nov 2018 13:16:29 GMT):
Hi @rickr , In network-config.yaml, certificates refer to V1.1 folder although when I try to run V1.3.. Is that an issue ?

rickr (Wed, 14 Nov 2018 13:19:51 GMT):
@adamhardie here is a snippet of code I created for blocklistenrs to get them in order. I think something similar will work for chaincode listeners https://ctrlv.it/id/155612/2696686186

adamhardie (Wed, 14 Nov 2018 13:21:51 GMT):
awesome, thanks a lot!

SudeepS 2 (Wed, 14 Nov 2018 13:22:01 GMT):
@rickr Hi Rick.. I did checkout release 1.2, trying to run E2E integration tests by given command in documentation by building 1.3 snapshot.. but I am facing issues.. Do I need to update any code before running that..

SudeepS 2 (Wed, 14 Nov 2018 13:23:20 GMT):
@rickr Basically, I am trying to explore the feature of Idemix with zkp of Fabric v1.3

rickr (Wed, 14 Nov 2018 13:29:44 GMT):
You can't run a downlevel client with a later server

rickr (Wed, 14 Nov 2018 13:30:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=S9RSbSb5FYTczeGkW) @SudeepS 2 https://github.com/hyperledger/fabric-sdk-java/blob/1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L448-L496 :wink:

SudeepS 2 (Wed, 14 Nov 2018 13:35:00 GMT):
@rickr Thank you.. So, you mean, sdk will use corresponding network files according to version ?

rickr (Wed, 14 Nov 2018 13:35:44 GMT):
Maybe that doesn't fix it up .. have relook later .. it's either that or Networkconfig is not using v1.1 paths .. I think it only uses one channel

SudeepS 2 (Wed, 14 Nov 2018 13:36:41 GMT):
@rickr So, to try Idemix in V1.3, As mentioned in fabric-sdk-java, I did checkout the code of release1.2 branch.. did a fabric.sh start, run Idemix test cases.. Did I miss anything or is that the procedure ?

SudeepS 2 (Wed, 14 Nov 2018 13:43:17 GMT):
@rickr Thanks for your help.. I am confused with java-sdk.. I am getting the following error main ERROR Endpoint:466 - Failed endpoint grpcs://localhost:594 to parse private key TLS client Do you have any idea on this error ?

rickr (Wed, 14 Nov 2018 15:03:39 GMT):
no. If you are running the provided integration tests they don't reference port 594.

rickr (Wed, 14 Nov 2018 15:03:39 GMT):
no. If you are running the provided integration tests they don't reference port 594. Probably, just what the error is stating the private TLS key being provided does not parse.

rickr (Wed, 14 Nov 2018 15:33:30 GMT):
@SudeepS 2 You are right that the network-config-tls.yaml references for peer1.org1 a tlsCACerts path to v1.1 However, if you compare v1.1 with v1.3 they're the same. I don't think we reran cryptogen again for 1.3. So something that should be addressed and the network-configs should be updated when going to a new release - in the short term there's now harm being done.

rickr (Wed, 14 Nov 2018 15:33:30 GMT):
@SudeepS 2 You are right that the network-config-tls.yaml references for peer1.org1 a tlsCACerts path to v1.1 However, if you compare v1.1 with v1.3 they're the same. I don't think we reran cryptogen again for 1.3. So something that should be addressed and the network-configs should be updated when going to a new release - in the short term there's no harm being done.

gravity (Wed, 14 Nov 2018 15:58:00 GMT):
According to the example provided here https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L299 we need user certificates to use them as `clientCert` and `clientKey` to connect to an orderer and peers at this example, an orderer is configured using Admin certificate and peers are configured using a common user's certificates. is it done in that way in sake of simplicity of the example? or we actually should use the same certificates (an admin for orderer and a user for peers) in a production environment?

chill37 (Wed, 14 Nov 2018 16:12:32 GMT):
@rickr So I'm still experiencing this error. seems similar to @kelvinzhong 's questions. Nov 15, 2018 12:51:01 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError Warning: [io.grpc.internal.ManagedChannelImpl-5] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org1.example.com, cause=java.net.UnknownHostException: peer0.org1.example.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) } even though service discovery found my peers (peer0, peer1), it seems not working. is there something more I need to put in DiscoveryProperties()? sdProp.put("org.hyperledger.fabric.sdk.discovery.default.clientCertFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt"); sdProp.put("org.hyperledger.fabric.sdk.discovery.default.clientKeyFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7050", "orderer.example.com"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7051", "peer0.org1.example.com"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:8051", "peer1.org1.example.com"); channel.setServiceDiscoveryProperties(sdProp); Thanks!

chill37 (Wed, 14 Nov 2018 16:12:32 GMT):
@rickr So I'm still experiencing this error. seems similar to @kelvinzhong 's questions. Nov 15, 2018 12:51:01 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError Warning: [io.grpc.internal.ManagedChannelImpl-5] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org1.example.com, cause=java.net.UnknownHostException: peer0.org1.example.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) } =>. even though service discovery found my peers (peer0, peer1), it seems not working. is there something more I need to put in DiscoveryProperties()? sdProp.put("org.hyperledger.fabric.sdk.discovery.default.clientCertFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt"); sdProp.put("org.hyperledger.fabric.sdk.discovery.default.clientKeyFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7050", "orderer.example.com"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7051", "peer0.org1.example.com"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:8051", "peer1.org1.example.com"); channel.setServiceDiscoveryProperties(sdProp); Thanks!

chill37 (Wed, 14 Nov 2018 16:12:32 GMT):
@rickr So I'm still experiencing this error. seems similar to @kelvinzhong 's questions. Nov 15, 2018 12:51:01 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError Warning: [io.grpc.internal.ManagedChannelImpl-5] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org1.example.com, cause=java.net.UnknownHostException: peer0.org1.example.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) =>. even though service discovery found my peers (peer0, peer1), it seems not working. is there something more I need to put in DiscoveryProperties()? sdProp.put("org.hyperledger.fabric.sdk.discovery.default.clientCertFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt"); sdProp.put("org.hyperledger.fabric.sdk.discovery.default.clientKeyFile", "./network/fabric-samples-1.2/first-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7050", "orderer.example.com"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7051", "peer0.org1.example.com"); sdProp.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:8051", "peer1.org1.example.com"); channel.setServiceDiscoveryProperties(sdProp); Thanks!

rickr (Wed, 14 Nov 2018 16:44:56 GMT):
@gravity As long as your tls client key is signed by a tls ca cert in the certificate chain I don't see why it wouldn't work. Don't confuse TLS certs with proposal and transaction signing and verification certs.

gravity (Wed, 14 Nov 2018 16:46:08 GMT):
@rickr Actually it works as expected I was wondering if it's a right way to do that thanks

rickr (Wed, 14 Nov 2018 16:48:41 GMT):
@chill37 You need that to get to resolve to localhost if that's where your peers are actually located.

Legiit (Thu, 15 Nov 2018 07:49:24 GMT):
Has joined the channel.

Legiit (Thu, 15 Nov 2018 07:49:53 GMT):
The java sdk is not yet compatible with 1.3, right? Im getting errors with the channel event hub

adamhardie (Thu, 15 Nov 2018 10:01:07 GMT):
is there a nice way to find out the newest (/current) block on a channel ?

adamhardie (Thu, 15 Nov 2018 10:12:12 GMT):
channel.queryBlockchainInfo().getHeight(); ^

halilkalkan (Thu, 15 Nov 2018 11:48:04 GMT):
Hello, I've an interesting question. I'm trying private data collection and I have created a collection1 for Org1MSP. Then I've created a user for Org2MSP and send a query operation to peer0.org1 to read collection1 asset. I was expecting that the user shouldnt be able to read collection1 asset because only Org1MSP should reach this data. However it could return the data. I have debugged and cid.getmspid also returns Org2MSP. Private data collections only look for peer msp or am I missing some point the way it works?

halilkalkan (Thu, 15 Nov 2018 11:48:04 GMT):
Hello, I've an interesting question. I'm trying private data collection and I have created a collection1 for Org1MSP. Then I've created a user for Org2MSP and send a query operation to peer0.org1 to read collection1 asset. I was expecting that the user shouldnt be able to read collection1 asset because only Org1MSP users should read this data. However it could return the data. I have debugged and tried running cid.getmspid also it returns Org2MSP. Do private data collections only look for peer msp or am I missing some point the way it works?

halilkalkan (Thu, 15 Nov 2018 11:48:04 GMT):
Hello, I've an interesting question. I'm trying private data collection and I have created a collection1 for Org1MSP. Then I've created a user for Org2MSP and send a query operation to peer0.org1 to read collection1 asset. I was expecting that the user shouldnt be able to read collection1 asset because only Org1MSP users should read this data. However it could return the data. I have debugged and tried running cid.getmspid also it returns Org2MSP. Do private data collections only look for peer msp or am I missing some point the way it works? To sum up, is private data works only peer level?

adamhardie (Thu, 15 Nov 2018 13:25:25 GMT):
How to register for events Registration for events from either service is done by sending an envelope containing a deliver seek info message to the peer that contains the desired start and stop positions, the seek behavior (block until ready or fail if not ready). There are helper variables SeekOldest and SeekNewest is this available from the SDK? in registerChaincodeEventListener i cannot see any options for this (from https://hyperledger-fabric.readthedocs.io/en/release-1.3/peer_event_services.html )

adamhardie (Thu, 15 Nov 2018 13:30:16 GMT):
seems that this would be great for me as not all blocks have the events i am listening for; therefore i am currently replaying up to blockchain height. but if the latest block has no event it is hanging.

adamhardie (Thu, 15 Nov 2018 13:30:41 GMT):
if i could use seekNewest to find the newest block, I will know when the replay queue is complete and can start reading in order

rrishmawi (Thu, 15 Nov 2018 14:14:43 GMT):
Hi experts, i have deployed a business model using hyperledger composer. is it possible to use the java sdk to invoke the chaincode deployed by composer? how to get its name and properties? in other words what is the relationship between composer and the actual chaincode? thanks

rickr (Thu, 15 Nov 2018 14:17:19 GMT):
@Legiit https://github.com/hyperledger/fabric-sdk-java#important-version-13-is-work-in-progress

rickr (Thu, 15 Nov 2018 14:22:35 GMT):
@adamhardie https://github.com/hyperledger/fabric-sdk-java/blob/1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L281

rickr (Thu, 15 Nov 2018 14:27:43 GMT):
@rrishmawi My understanding: composer for Node sits on top of the core Node SDK. There is no equivalent for it in Java. The JSDK should be able you invoke any chaincode it can and visa versa. However you're asking how to map composer created artifacts to core Fabric you need ask them on #composer o

rickr (Thu, 15 Nov 2018 14:27:43 GMT):
@rrishmawi My understanding: composer for Node sits on top of the core Node SDK. There is no equivalent for it in Java. The JSDK should be able to invoke any chaincode it can and visa versa. However you're asking how to map composer created artifacts to core Fabric you need ask them on #composer

rrishmawi (Thu, 15 Nov 2018 14:29:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jBtiGRw2gq3F8ovt8) @rickr Thanks @rickr, i will.

adamhardie (Thu, 15 Nov 2018 14:33:03 GMT):
thanks

rickr (Thu, 15 Nov 2018 14:35:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yGbrWnibDKpMhiqdo) @manish-sethi Hello, I've an interesting question. I'm trying private data collection and I have created a collection1 for Org1MSP. Then I've created a user for Org2MSP and send a query operation to peer0.org1 to read collection1 asset. I was expecting that the user shouldnt be able to read collection1 asset because only Org1MSP users should read this data. However it could return the data. I have debugged and tried running cid.getmspid also it returns Org2MSP. Do private data collections only look for peer msp or am I missing some point the way it works? To sum up, is private data works only peer level?

manish-sethi (Thu, 15 Nov 2018 14:35:10 GMT):
Has joined the channel.

rickr (Thu, 15 Nov 2018 14:41:27 GMT):
@halilkalkan in the future if something is really SDK specific a better to put on #fabric-questions - like to keep thing on topic :wink:

dave.enyeart (Thu, 15 Nov 2018 14:43:57 GMT):
@halilkalkan For an explanation see the doc at: https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html

dave.enyeart (Thu, 15 Nov 2018 14:44:04 GMT):
this bullet:

dave.enyeart (Thu, 15 Nov 2018 14:44:07 GMT):
```Note that private data collections only define which organization’s peers are authorized to receive and store private data, and consequently implies which peers can be used to query private data. Private data collections do not by themselves limit access control within chaincode. For example if non-authorized clients are able to invoke chaincode on peers that have access to the private data, the chaincode logic still needs a means to enforce access control as usual, for example by calling the GetCreator() chaincode API or using the client identity chaincode library .```

dave.enyeart (Thu, 15 Nov 2018 14:45:00 GMT):
In an upcoming release an option will be added to have the chaincode automatically enforce the access control, see: https://jira.hyperledger.org/browse/FAB-11409

dave.enyeart (Thu, 15 Nov 2018 14:45:00 GMT):
In an upcoming release an option will be added to have the chaincode automatically enforce the access control based on collection configuration, see: https://jira.hyperledger.org/browse/FAB-11409

adamhardie (Thu, 15 Nov 2018 14:49:44 GMT):
a thought on Channel.serializeChannel() / deserialize

adamhardie (Thu, 15 Nov 2018 14:50:32 GMT):
if the chain has a large amount of blocks will we need a huge amount of memory to read?

dave.enyeart (Thu, 15 Nov 2018 15:06:34 GMT):
@knagware9 You can't run a peer on android, but perhaps a client app based on java sdk. Any thoughts @rickr

knagware9 (Thu, 15 Nov 2018 15:06:34 GMT):
Has joined the channel.

rickr (Thu, 15 Nov 2018 15:44:18 GMT):
No that doesn't get serialized

rickr (Thu, 15 Nov 2018 15:50:50 GMT):
@knagware9 In my personal opinion I don't see value running sdk on mobil (android). I think it's to heavy for that. Design your mobile app (Android and iphone) for what it does best, the user experience. Have it's own API to a server that runs a hyperledger SDK.

halilkalkan (Thu, 15 Nov 2018 15:52:59 GMT):
@rickr @dave.enyeart Thank you for your explanations. Actually, I asked the question on SDK side because I'm invoking the chaincode with Java SDK. So as far as I understand, private data collection only looks for which peer the chaincode invoked rather than client user context. In my case, I was setting client user context as a user from Org2MSP but because I'm sending only Org1MSP's peer the private data could be visible.

dave.enyeart (Thu, 15 Nov 2018 15:55:30 GMT):
@halilkalkan The option to check client access control based on collection config should be coming shortly, hang in there!

dave.enyeart (Thu, 15 Nov 2018 15:55:30 GMT):
@halilkalkan The option to check client access control in chaincode based on collection config should be coming shortly, hang in there!

halilkalkan (Thu, 15 Nov 2018 18:45:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zgCEFds5XvNQKfrGB) @dave.enyeart Great, thank you for your support :smiley:

Alfiezy (Fri, 16 Nov 2018 02:13:51 GMT):
Has joined the channel.

GingerMoon (Fri, 16 Nov 2018 02:29:18 GMT):
Has joined the channel.

GingerMoon (Fri, 16 Nov 2018 02:29:59 GMT):
Hi guys, can anyone tell me if there is an java sdk sample using the yaml configuration?

knagware9 (Fri, 16 Nov 2018 05:13:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pJkxptw4GrhRstHxJ) @rickr Thank you @dave.enyeart @rickr ..Same I suggested to my mobile but they intrested to know about

knagware9 (Fri, 16 Nov 2018 05:13:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pJkxptw4GrhRstHxJ) @rickr Thank you @dave.enyeart @rickr ..Same I suggested to my mobile app Development teambut they intrested to know about

chill37 (Fri, 16 Nov 2018 08:37:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LTdiDWxHLBWHA4EKt) @rickr with your advice, I tried the following: 127.0.0.1 peer0.org1.example.com 127.0.0.1 peer1.org1.example.com 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost => THEN it works (UnknownHostException NOT occurred) Now, it seems that 'hostnameOverride' property should be doing this exact thing (From EXAMPLE) sdprops.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:7056", "peer1.org1.example.com"); but, when I try this method, (and without changing /etc/hosts) I still get UnknownHostException. is that property setting grammar correct? Thanks

giacomo.minighin (Fri, 16 Nov 2018 16:50:37 GMT):
Has joined the channel.

cccc (Sat, 17 Nov 2018 16:09:28 GMT):
Has joined the channel.

Sreesha (Mon, 19 Nov 2018 05:32:26 GMT):
Hello All.Iam trying to open java-sdk project in eclipse.But its showingthe following error:

Sreesha (Mon, 19 Nov 2018 05:33:03 GMT):

Clipboard - November 19, 2018 11:02 AM

Sreesha (Mon, 19 Nov 2018 05:36:07 GMT):
Also on mvn install -DskipTests the following error is encountered:

Sreesha (Mon, 19 Nov 2018 05:36:14 GMT):

Clipboard - November 19, 2018 11:06 AM

halilkalkan (Mon, 19 Nov 2018 07:42:31 GMT):
Hello guys, I want to add another organization to Java SDK sample but I don't know how I should generate idemix crypto materials as provided? Currently only Java supports this feature so I wanted to ask here, if it's wrong place please correct me :smiley:

halilkalkan (Mon, 19 Nov 2018 07:42:31 GMT):
Hello guys, I want to add another organization to Java SDK sample but I don't know how should I generate idemix crypto materials as provided? Currently only Java supports this feature so I wanted to ask here, if it's wrong place please correct me :smiley:

halilkalkan (Mon, 19 Nov 2018 07:42:31 GMT):
Hello guys, I want to add another organization to Java SDK sample but I don't know how should I generate idemix crypto materials as provided? Currently only Java supports this feature so I wanted to ask here, if it's wrong place please correct me :smiley: Update: Do I need to get those idemix files from ca?

giacomo.minighin (Mon, 19 Nov 2018 11:57:32 GMT):
when I load config from network_config.yaml and then I initialize the channel I have this error: ``` Sending proposal to peer0.org2.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem ``` on peers: ``` TLS handshake failed with error remote error: tls: internal error hyperledger fabric ```

giacomo.minighin (Mon, 19 Nov 2018 11:57:32 GMT):
when I load config from network_config.yaml and then I initialize the channel I have this error: ``` Sending proposal to peer0.org2.example.com failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem ... ``` on peers: ``` TLS handshake failed with error remote error: tls: internal error hyperledger fabric ... ```

michawensveen (Mon, 19 Nov 2018 15:05:19 GMT):
Has joined the channel.

AishwaryaKudalkar (Mon, 19 Nov 2018 16:14:03 GMT):
Hi @rickr, I'm using fabric v1.2.1 and trying to replicate constructChannel()(https://github.com/hyperledger/fabric-sdk-java/blob/v1.2.1/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L795) When I call *newChannel.initialize()*(#L881) I get the following errors ``` 2018-11-19 16:05:08,891 main INFO Channel:780 - Peer peer0.org1.example.com joined into channel mychannel 2018-11-19 16:05:09,508 main INFO Channel:780 - Peer peer1.org1.example.com joined into channel mychannel 2018-11-19 16:05:09,652 main INFO ServiceDiscovery:222 - Channel mychannel doing discovery with peer: Peer peer1.org1.example.com url: grpcs://10.80.66.3:7057 2018-11-19 16:05:09,806 main WARN ServiceDiscovery:390 - Discover of chaincode names was empty. Nov 19, 2018 9:35:10 PM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError WARNING: [io.grpc.internal.ManagedChannelImpl-29] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer1.org1.example.com, cause=java.net.UnknownHostException: peer1.org1.example.com at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at io.grpc.internal.DnsNameResolver$JdkResolver.resolve(DnsNameResolver.java:497) at io.grpc.internal.DnsNameResolver$1.run(DnsNameResolver.java:200) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) } ``` Am I missing on something?

huxiangdong (Tue, 20 Nov 2018 00:35:55 GMT):
Has joined the channel.

amolpednekar (Tue, 20 Nov 2018 07:04:24 GMT):
@rickr What is the difference between `addPeer `and `joinPeer`? Does `addPeer `simply add `Peer `objects to the channel instance?

gennadyl (Tue, 20 Nov 2018 07:42:47 GMT):
@rickr Short question - what should I put as dependency, to use java sdk 1.3? I usually use local copy, but I want to use some version I will be able to download

sekiguchi.toru (Tue, 20 Nov 2018 07:54:19 GMT):
Has joined the channel.

sanav (Tue, 20 Nov 2018 08:05:25 GMT):
Has joined the channel.

adamhardie (Tue, 20 Nov 2018 16:31:03 GMT):
@rickr lastBlockProcessed work all done - thanks a lot for your help and samples

giacomo.minighin (Tue, 20 Nov 2018 17:15:37 GMT):
I have this error when I do channel.initialize(): ``` Sending proposal to peer1.org2.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null} ... getConfigBlock for channel mychannel failed with peer peer1.org2.example.com. Status FAILURE, details: Sending proposal to peer1.org2.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null} ... Channel mychannel could not load peer CA certificates from any peers. Channel mychannel detected disconnect on event hub EventHub:peer1.org2.example.com (grpcs://localhost:8058) ... ``` I really can't understand how channel creation and peer event registration works, could you please send me some articles about? this is my code: ``` NetworkConfig network = NetworkConfig.fromYamlFile(new File(configPath)); CAInfo caInfo = network.getClientOrganization().getCertificateAuthorities().get(0); CAClient caClient = new CAClient(caInfo.getUrl(), caInfo.getProperties()); UserContext adminUserContext = new UserContext(); adminUserContext.setName(adminEnrollmentName); adminUserContext.setAffiliation(affiliation); adminUserContext.setMspId(MspID); caClient.setAdminContext(adminUserContext); adminUserContext = caClient.enrollAdminUser(adminEnrollmentName, adminEnrollmentSecret); FabricClient client = new FabricClient(adminUserContext); for (String chname : network.getChannelNames()) { Channel channel = client.getInstance().loadChannelFromConfig(chname, network); if (!channel.isInitialized()) channel.initialize(); } ```

giacomo.minighin (Tue, 20 Nov 2018 17:15:37 GMT):
I have this error when I do channel.initialize(): ``` Sending proposal to peer1.org2.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null} ... getConfigBlock for channel mychannel failed with peer peer1.org2.example.com. Status FAILURE, details: Sending proposal to peer1.org2.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null} ... Channel mychannel could not load peer CA certificates from any peers. Channel mychannel detected disconnect on event hub EventHub:peer1.org2.example.com (grpcs://localhost:8058) ... ``` I really can't understand how channel creation and peer event registration works, could you please send me some articles about? this is my code: ``` NetworkConfig network = NetworkConfig.fromYamlFile(new File(configPath)); CAInfo caInfo = network.getClientOrganization().getCertificateAuthorities().get(0); CAClient caClient = new CAClient(caInfo.getUrl(), caInfo.getProperties()); UserContext adminUserContext = new UserContext(); adminUserContext.setName(adminEnrollmentName); adminUserContext.setAffiliation(affiliation); adminUserContext.setMspId(MspID); caClient.setAdminContext(adminUserContext); adminUserContext = caClient.enrollAdminUser(adminEnrollmentName, adminEnrollmentSecret); FabricClient client = new FabricClient(adminUserContext); for (String chname : network.getChannelNames()) { Channel channel = client.getInstance().loadChannelFromConfig(chname, network); if (!channel.isInitialized()) channel.initialize(); } ```

kevinkbc (Tue, 20 Nov 2018 19:28:06 GMT):
Has joined the channel.

kevinkbc (Tue, 20 Nov 2018 19:29:24 GMT):
Does the sdk java have the same things as the go sdk?

fanliyan (Fri, 23 Nov 2018 08:58:36 GMT):
How to judge whether peer nodes are connected?

gravity (Mon, 26 Nov 2018 09:27:06 GMT):
Hello Is it possible to have a different name for keystore files (that end with `_sk`)? I'm looking at `findFileSk` in the `Util` class and wondering if it's possible to avoid this method and get this file by another name, like, `privatekey.key`? thanks in advance

giacomo.minighin (Mon, 26 Nov 2018 09:54:08 GMT):
How can I properly decode protobuf objects in readeable jsons?

gravity (Mon, 26 Nov 2018 10:09:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9cLpzhx4P86KPZ7Sa) @giacomo.minighin check this example https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java

giacomo.minighin (Mon, 26 Nov 2018 10:22:14 GMT):
@gravity I'm not trying to update the channel, I need to iterate the blocks of a channel and display the results in a web page. in the example is used a HttpPost: ``` //Now decode the new channel config bytes to json... httppost = new HttpPost(CONFIGTXLATOR_LOCATION + "/protolator/decode/common.Config"); httppost.setEntity(new ByteArrayEntity(modChannelBytes)); response = httpclient.execute(httppost); statuscode = response.getStatusLine().getStatusCode(); assertEquals(200, statuscode); responseAsString = EntityUtils.toString(response.getEntity()); ```

giacomo.minighin (Mon, 26 Nov 2018 10:24:37 GMT):
@gravity I'm not trying to update the channel, I need to iterate the blocks of a channel and display the results in a web page. in the example is used a HttpPost: ``` //Now decode the new channel config bytes to json... httppost = new HttpPost(CONFIGTXLATOR_LOCATION + "/protolator/decode/common.Config"); httppost.setEntity(new ByteArrayEntity(modChannelBytes)); response = httpclient.execute(httppost); statuscode = response.getStatusLine().getStatusCode(); assertEquals(200, statuscode); responseAsString = EntityUtils.toString(response.getEntity()); ``` Is it possible to decode it without http calls?

gravity (Mon, 26 Nov 2018 10:30:07 GMT):
@giacomo.minighin if you simpy want to iterate blocks, you should look at this: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.2/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L915

giacomo.minighin (Mon, 26 Nov 2018 11:26:58 GMT):
@gravity trank u

AndresMartinezMelgar.itcl (Mon, 26 Nov 2018 11:47:52 GMT):
how do i make that a peer leaves a channel?

giacomo.minighin (Mon, 26 Nov 2018 13:55:58 GMT):
is there any channel creation envelope class or channel update envelope class?

jucah (Mon, 26 Nov 2018 18:36:25 GMT):
Has joined the channel.

BhavathiReddy1 (Tue, 27 Nov 2018 10:59:41 GMT):
Is there a channel for queries on blockchain explorer?

BhavathiReddy1 (Tue, 27 Nov 2018 11:07:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GDjpPm2yHtAJft6qg) @giacomo.minighin Yes. There is an UpdateChannelConfiguration class which along with getUpdateChannelConfiguration can be used to update the channel configuration. But you need to calculate the delta of the old and new configs first as mentioned in the docs. I have a sample code for the same (adding an org called acropolis). Hope it helps:

BhavathiReddy1 (Tue, 27 Nov 2018 11:07:29 GMT):
ChannelUpdateScript Generate crypto keys and configuration for new org: ~/fabric-samples/bin/cryptogen generate --config=./crypto-acropolis.yaml ~/fabric-samples/bin/configtxgen -printOrg AcropolisMSP > ./acropolis.json Log into existing peer: docker exec -it peer0.idp.nutanix.com bash peer channel fetch config config_block.pb -o 10.142.0.12:7050 -c mychannel exit Copy channel config and calculate difference: docker cp peer0.idp.nutanix.com:/opt/gopath/src/github.com/hyperledger/fabric/config_block.pb ./ ~/fabric-samples/configtxlator proto_decode --input config_block.pb --type common.Block | jq .data.data[0].payload.data.config > config.json jq -s '.[0] * {"channel_group":{"groups":{"Application":{"groups": {“AcropolisMSP":.[1]}}}}}' config.json acropolis.json > modified_config.json ~/fabric-samples/configtxlator proto_encode --input config.json --type common.Config --output config.pb ~/fabric-samples/configtxlator proto_encode --input modified_config.json --type common.Config --output modified_config.pb ~/fabric-samples/configtxlator compute_update --channel_id mychannel --original config.pb --updated modified_config.pb --output acropolis_update.pb

BhavathiReddy1 (Tue, 27 Nov 2018 11:09:37 GMT):

UpdateChannel.java

BhavathiReddy1 (Tue, 27 Nov 2018 11:11:08 GMT):
The code is appended to this example application: https://github.com/IBM/blockchain-application-using-fabric-java-sdk

Randyshu2018 (Tue, 27 Nov 2018 11:20:48 GMT):
Has joined the channel.

Randyshu2018 (Tue, 27 Nov 2018 11:22:33 GMT):
hi,all ,does fabric-sdk-java now support customer event ?

rickr (Tue, 27 Nov 2018 14:43:16 GMT):
@Sreesha Not sure follow the README.md for prereqs?

rickr (Tue, 27 Nov 2018 14:43:38 GMT):
@halilkalkan 1.3 Integration suite has an idemix org

rickr (Tue, 27 Nov 2018 14:44:25 GMT):
@giacomo.minighin tls error on peer side maybe ask on #fabric-peer-endorser-committer

rickr (Tue, 27 Nov 2018 14:44:56 GMT):
@AishwaryaKudalkar Well your using service discover peer and it says peer1.org1.example.com but guessing that does not resolve for you.

rickr (Tue, 27 Nov 2018 14:45:42 GMT):
@amolpednekar you would only ever join _your own_ peer once to the channel then after if you reconstruct just add it.

rickr (Tue, 27 Nov 2018 14:46:03 GMT):
@gennadyl all direct dependencies are in the pom.xml

rickr (Tue, 27 Nov 2018 14:47:04 GMT):
@gravity The sdk does not care about any particular file name. The name is generated by crypotgen.

rickr (Tue, 27 Nov 2018 14:50:20 GMT):
@Randyshu2018 Not sure what you mean by _customer event_. The SDK has a means to register for all block events and specific chaincode events.

latitiah (Tue, 27 Nov 2018 15:32:25 GMT):
Has joined the channel.

giacomo.minighin (Tue, 27 Nov 2018 15:55:48 GMT):
I have this error while trying to connect to an event hub: ``` Channel mychannel detected disconnect on event hub EventHub:peer0.org1.example.com (grpc://localhost:7053) EventHub:peer0.org1.example.com terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception. EventHub:peer0.org1.example.com :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/0:0:0:0:0:0:0:1:7053 ``` probably I didn't configured well Application ACL policies, could be?

giacomo.minighin (Tue, 27 Nov 2018 15:55:48 GMT):
I have this error while trying to connect to an event hub: ``` Channel mychannel detected disconnect on event hub EventHub:peer0.org1.example.com (grpc://localhost:7053) EventHub:peer0.org1.example.com terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception. EventHub:peer0.org1.example.com :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/0:0:0:0:0:0:0:1:7053 ``` probably I didn't configured well Application ACL policies, could be? I'm using vagrant

rickr (Tue, 27 Nov 2018 16:51:43 GMT):
Make sure your vagrant is passing through the ports ``` index 1d94a4efe..e10cd577d 100644 --- i/devenv/Vagrantfile +++ w/devenv/Vagrantfile @@ -39,11 +39,22 @@ Vagrant.configure('2') do |config| config.vm.network :forwarded_port, guest: 7053, host: 7053, id: "peer_event", host_ip: "localhost", auto_correct: true # fabric peer event service config.vm.network :forwarded_port, guest: 7054, host: 7054, id: "ca", host_ip: "localhost", auto_correct: true # fabric-ca service config.vm.network :forwarded_port, guest: 5984, host: 15984, id: "couchdb", host_ip: "localhost", auto_correct: true # CouchDB service + config.vm.network :forwarded_port, guest: 7056, host: 7056 + config.vm.network :forwarded_port, guest: 7058, host: 7058 + config.vm.network :forwarded_port, guest: 8051, host: 8051 + config.vm.network :forwarded_port, guest: 8053, host: 8053 + config.vm.network :forwarded_port, guest: 8054, host: 8054 + config.vm.network :forwarded_port, guest: 8056, host: 8056 + config.vm.network :forwarded_port, guest: 8058, host: 8058 + config.vm.network :forwarded_port, guest: 7059, host: 7059 + config.vm.network :forwarded_port, guest: 9051, host: 9051 + config.vm.network :forwarded_port, guest: 9053, host: 9053 config.vm.synced_folder "../..", "#{SRCMOUNT}" config.vm.synced_folder "../..", "/opt/gopath/src/github.com/hyperledger" config.vm.synced_folder ENV.fetch('LOCALDEVDIR', "../.."), "#{LOCALDEV}" + config.vm.synced_folder "/home/rineholt/gitws/bc/fsj-1392/fabric-sdk-java/src/test/fixture/sdkintegration", "/opt/gopath/src/github.com/hyperledger/fabric/sdkintegration" config.vm.provider :virtualbox do |vb| ```

giacomo.minighin (Tue, 27 Nov 2018 17:15:57 GMT):
@rickr maybe I'm missing something: i'm loading the network configuration from NetworkConfig like this: ``` NetworkConfig network = NetworkConfig.fromYamlFile(new File(configPath)); for (String chName : network.getChannelNames()) { Channel channel = client.loadChannelFromConfig(chName, network); channel.initialize(); } ``` the error happens when I initialize the channel. My network configuration has 2 peers, one for organization that are also anchors peers: ``` peer0.org1.example.com: url: grpc://localhost:7051 eventUrl: grpc://localhost:7053 grpcOptions: ssl-target-name-override: peer0.org1.example.com tlsCACerts: path: ../devenv/network/network/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt ``` my vagrantfile is ok

rickr (Tue, 27 Nov 2018 19:16:06 GMT):
if you're using tls wouldn't the url protocol be grpcs ?

HubertYoung (Wed, 28 Nov 2018 01:49:55 GMT):
I get errors when initializing chaincode using java sdk.Any thoughts?

HubertYoung (Wed, 28 Nov 2018 01:50:51 GMT):
2018-11-28 09:49:21,776{GMT} grpc-default-worker-ELG-1-3 DEBUG NettyClientHandler:216 - [id: 0x3cdc61a5, L:/0:0:0:0:0:0:0:1:44320 - R:localhost/0:0:0:0:0:0:0:1:7051] OUTBOUND GO_AWAY: lastStreamId=0 errorCode=1 length=77 bytes=4669727374207265636569766564206672616d6520776173206e6f742053455454494e47532e204865782064756d7020666f7220666972737420352062797465... 2018-11-28 09:49:21,777{GMT} grpc-default-worker-ELG-1-3 DEBUG Http2ConnectionHandler:888 - [id: 0x3cdc61a5, L:/0:0:0:0:0:0:0:1:44320 - R:localhost/0:0:0:0:0:0:0:1:7051] Sent GOAWAY: lastStreamId '0', errorCode '1', debugData 'First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002'. Forcing shutdown of the connection. 2018-11-28 09:49:21,785{GMT} main ERROR Channel:4138 - Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: 6a7865ca8f4b8437f031fdafd21eb7a2c966b01eb7936ece03d937e1fca3033d to Peer{ id: 2, name: peer0.org1.example.com, channelName: mychannel, url: grpc://localhost:7051} failed because of: gRPC failure=Status{code=INTERNAL, description=http2 exception, cause=io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:350) at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:251) at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:450) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) } java.lang.Exception: io.grpc.StatusRuntimeException: INTERNAL: http2 exception at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4138) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:856) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1779) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1616) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1105) at com.zx.myfabricsdk.App.main(App.java:67)

HubertYoung (Wed, 28 Nov 2018 05:57:31 GMT):
2018-11-28 13:54:57,744{GMT} main ERROR Channel:4937 - Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1MSP], cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4937) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:963) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:2040) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1860) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1255) at com.zx.myfabricsdk.App.main(App.java:67) Caused by: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] at io.grpc.Status.asRuntimeException(Status.java:526) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:482) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:678) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:403) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748

yoonyoul (Wed, 28 Nov 2018 06:51:44 GMT):
Has joined the channel.

yoonyoul (Wed, 28 Nov 2018 07:25:31 GMT):
@HubertYoung I guess u need to checkout the user context of the HFClient.

yoonyoul (Wed, 28 Nov 2018 07:26:34 GMT):
Using HFClientFactory to create HFClient instance, then HFClientFactory sets admin peer of the network config.

yoonyoul (Wed, 28 Nov 2018 07:27:51 GMT):
@rickr Hi, Is there any sample codes to get all peers using serviceDiscovery?

HubertYoung (Wed, 28 Nov 2018 08:36:20 GMT):
@yoonyoul Thanks.I figured out.The certificate of the user is not signed by ca.

giacomo.minighin (Wed, 28 Nov 2018 08:39:54 GMT):
@rickr thanks mate, that was the error

HubertYoung (Wed, 28 Nov 2018 08:58:11 GMT):
I have errors when invoking the chaincode.

HubertYoung (Wed, 28 Nov 2018 08:58:14 GMT):
2018-11-28 16:52:48,718{GMT} pool-1-thread-3 DEBUG Channel:6240 - Channel mychannel got event for transaction 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08 2018-11-28 16:52:48,719{GMT} pool-1-thread-3 DEBUG Channel:7243 - Channel mychannel seen transaction event 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08 for peer peer0.org2.example.com 2018-11-28 16:52:48,719{GMT} pool-1-thread-3 DEBUG Channel:7243 - Channel mychannel seen transaction event 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08 for peer peer0.org2.example.com 2018-11-28 16:52:48,719{GMT} pool-1-thread-3 DEBUG Channel:6240 - Channel mychannel got event for transaction 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08 2018-11-28 16:52:48,720{GMT} pool-1-thread-3 DEBUG Channel:7347 - Completing future as exception for channel mychannel and transaction id: 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08, validation code: 09 2018-11-28 16:52:48,721{GMT} pool-1-thread-3 DEBUG Channel:7347 - Completing future as exception for channel mychannel and transaction id: 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08, validation code: 09 Exception in thread "main" java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08 status 9 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) at com.zx.myfabricsdk.App.invoke(App.java:140) at com.zx.myfabricsdk.App.main(App.java:88) Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 7d707241cd04b6fd48e99140b4b0852817ce8432e9d7b4710a2659a7e6918b08 status 9 at org.hyperledger.fabric.sdk.Channel$TL.lambda$2(Channel.java:7354) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

HubertYoung (Wed, 28 Nov 2018 08:58:14 GMT):
2018-11-28 17:16:04,332{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] INBOUND DATA: streamId=5 padding=0 endStream=false length=8 bytes=000000000308c801 2018-11-28 17:16:04,332{GMT} grpc-default-executor-0 DEBUG OrdererClient:165 - org.hyperledger.fabric.sdk.OrdererClient$1@4633a2a9 resp status value: 200, resp: SUCCESS 2018-11-28 17:16:04,334{GMT} main DEBUG OrdererClient:228 - OrdererClient-mychannel-orderer.example.com(grpc://localhost:7050)Done waiting for reply! Got:status: SUCCESS 2018-11-28 17:16:04,336{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] OUTBOUND DATA: streamId=5 padding=0 endStream=true length=0 bytes= 2018-11-28 17:16:04,337{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] INBOUND PING: ack=false bytes=145258749040133895 2018-11-28 17:16:04,337{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] OUTBOUND PING: ack=true bytes=145258749040133895 2018-11-28 17:16:04,337{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] INBOUND HEADERS: streamId=5 headers=GrpcHttp2ResponseHeaders[grpc-status: 0, grpc-message: ] padding=0 endStream=true 2018-11-28 17:16:04,338{GMT} main DEBUG Channel:5915 - Channel mychannel successful sent to Orderer transaction id: 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 2018-11-28 17:16:06,979{GMT} grpc-default-worker-ELG-1-6 DEBUG NettyClientHandler:216 - [id: 0x9eb0b7e3, L:/127.0.0.1:43060 - R:localhost/127.0.0.1:7051] INBOUND DATA: streamId=3 padding=0 endStream=false length=6154 bytes=00000018051282300a46081312200865f323c970e1f89e50c340b262a78462cec93120ac59a9403230dc24a889561a20e6a07236990609ca9c796fd3591f6ff6... 2018-11-28 17:16:06,979{GMT} grpc-default-worker-ELG-1-4 DEBUG NettyClientHandler:216 - [id: 0xd81ae0f1, L:/127.0.0.1:57748 - R:localhost/127.0.0.1:9051] INBOUND DATA: streamId=3 padding=0 endStream=false length=6154 bytes=00000018051282300a46081312200865f323c970e1f89e50c340b262a78462cec93120ac59a9403230dc24a889561a20e6a07236990609ca9c796fd3591f6ff6... 2018-11-28 17:16:06,980{GMT} pool-1-thread-3 DEBUG Channel:6194 - is peer true, is filtered: false 2018-11-28 17:16:06,981{GMT} pool-1-thread-3 DEBUG Channel:6240 - Channel mychannel got event for transaction 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 2018-11-28 17:16:06,981{GMT} pool-1-thread-3 DEBUG Channel:7347 - Completing future as exception for channel mychannel and transaction id: 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19, validation code: 09 2018-11-28 17:16:06,985{GMT} pool-1-thread-2 DEBUG Channel:6194 - is peer true, is filtered: false Exception in thread "main" java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 status 9 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at com.zx.myfabricsdk.App.invoke(App.java:142) at com.zx.myfabricsdk.App.main(App.java:90) Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 status 9 at org.hyperledger.fabric.sdk.Channel$TL.lambda$2(Channel.java:7354) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

HubertYoung (Wed, 28 Nov 2018 08:59:12 GMT):
But the data has been added to couch db.

HubertYoung (Wed, 28 Nov 2018 09:29:26 GMT):
Here is the log from peer.

HubertYoung (Wed, 28 Nov 2018 09:29:28 GMT):
2018-11-28 17:16:04,332{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] INBOUND DATA: streamId=5 padding=0 endStream=false length=8 bytes=000000000308c801 2018-11-28 17:16:04,332{GMT} grpc-default-executor-0 DEBUG OrdererClient:165 - org.hyperledger.fabric.sdk.OrdererClient$1@4633a2a9 resp status value: 200, resp: SUCCESS 2018-11-28 17:16:04,334{GMT} main DEBUG OrdererClient:228 - OrdererClient-mychannel-orderer.example.com(grpc://localhost:7050)Done waiting for reply! Got:status: SUCCESS 2018-11-28 17:16:04,336{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] OUTBOUND DATA: streamId=5 padding=0 endStream=true length=0 bytes= 2018-11-28 17:16:04,337{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] INBOUND PING: ack=false bytes=145258749040133895 2018-11-28 17:16:04,337{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] OUTBOUND PING: ack=true bytes=145258749040133895 2018-11-28 17:16:04,337{GMT} grpc-default-worker-ELG-1-2 DEBUG NettyClientHandler:216 - [id: 0x4f9e255d, L:/127.0.0.1:36564 - R:localhost/127.0.0.1:7050] INBOUND HEADERS: streamId=5 headers=GrpcHttp2ResponseHeaders[grpc-status: 0, grpc-message: ] padding=0 endStream=true 2018-11-28 17:16:04,338{GMT} main DEBUG Channel:5915 - Channel mychannel successful sent to Orderer transaction id: 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 2018-11-28 17:16:06,979{GMT} grpc-default-worker-ELG-1-6 DEBUG NettyClientHandler:216 - [id: 0x9eb0b7e3, L:/127.0.0.1:43060 - R:localhost/127.0.0.1:7051] INBOUND DATA: streamId=3 padding=0 endStream=false length=6154 bytes=00000018051282300a46081312200865f323c970e1f89e50c340b262a78462cec93120ac59a9403230dc24a889561a20e6a07236990609ca9c796fd3591f6ff6... 2018-11-28 17:16:06,979{GMT} grpc-default-worker-ELG-1-4 DEBUG NettyClientHandler:216 - [id: 0xd81ae0f1, L:/127.0.0.1:57748 - R:localhost/127.0.0.1:9051] INBOUND DATA: streamId=3 padding=0 endStream=false length=6154 bytes=00000018051282300a46081312200865f323c970e1f89e50c340b262a78462cec93120ac59a9403230dc24a889561a20e6a07236990609ca9c796fd3591f6ff6... 2018-11-28 17:16:06,980{GMT} pool-1-thread-3 DEBUG Channel:6194 - is peer true, is filtered: false 2018-11-28 17:16:06,981{GMT} pool-1-thread-3 DEBUG Channel:6240 - Channel mychannel got event for transaction 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 2018-11-28 17:16:06,981{GMT} pool-1-thread-3 DEBUG Channel:7347 - Completing future as exception for channel mychannel and transaction id: 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19, validation code: 09 2018-11-28 17:16:06,985{GMT} pool-1-thread-2 DEBUG Channel:6194 - is peer true, is filtered: false Exception in thread "main" java.util.concurrent.ExecutionException: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 status 9 at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) at com.zx.myfabricsdk.App.invoke(App.java:142) at com.zx.myfabricsdk.App.main(App.java:90) Caused by: org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 status 9 at org.hyperledger.fabric.sdk.Channel$TL.lambda$2(Channel.java:7354) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

ivanovv (Wed, 28 Nov 2018 13:48:14 GMT):
Has joined the channel.

rickr (Wed, 28 Nov 2018 14:27:54 GMT):
@HubertYoung https://github.com/hyperledger/fabric-sdk-java/blob/1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919/src/main/proto/peer/transaction.proto#L125 `Transaction ID 82028e9959ba8d49b451e690577ecec837451796e880195fcd43a3d3850c8e19 status 9` `DUPLICATE_TXID`

rickr (Wed, 28 Nov 2018 14:31:22 GMT):
@yoonyoul Peers are discovered automatically example of Service Discover is https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java

giacomo.minighin (Wed, 28 Nov 2018 15:56:22 GMT):
@rickr I'm not using tls for semplicity. could it be a timeout error?

rickr (Wed, 28 Nov 2018 16:05:18 GMT):
Are you using Fabric 1.3 ? There's no event hubs there anymore .

giacomo.minighin (Wed, 28 Nov 2018 16:21:19 GMT):
yes, I'm using 1.3

umershabbir (Wed, 28 Nov 2018 21:25:22 GMT):
Has joined the channel.

umershabbir (Wed, 28 Nov 2018 21:29:44 GMT):
hello.. I am new to hyperledger and domain.. I already setup the environment and able to code a java program (Using Fabric java api) which creates creates a channel, register two orgs (org1 and org2) with that channel, then deploy the chaincode

umershabbir (Wed, 28 Nov 2018 21:30:04 GMT):
I am able to add and update the chaincode

umershabbir (Wed, 28 Nov 2018 21:30:11 GMT):
but I am having 2 issues

umershabbir (Wed, 28 Nov 2018 21:31:18 GMT):
1. when I switch the user from org1 to org2 to query the chaincode it require multiple retries the switch the user from org1 user1 to org2 user2 but eventually after few retries it successfully switches the user

umershabbir (Wed, 28 Nov 2018 21:32:13 GMT):
2. I want to include a private dataset in the chaincode in such a way that only org1 users should be able to query/update that private data but not org2 users.

umershabbir (Wed, 28 Nov 2018 21:32:47 GMT):
could you please help me or send me very basic code samples so that I could easily understand

dave.enyeart (Wed, 28 Nov 2018 21:34:45 GMT):
@umershabbir Please read these private data docs (note that this is not specific to java sdk):

dave.enyeart (Wed, 28 Nov 2018 21:34:47 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/private-data/private-data.html https://hyperledger-fabric.readthedocs.io/en/latest/private-data-arch.html https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html

dave.enyeart (Wed, 28 Nov 2018 21:35:06 GMT):
for any followup questions please post in fabric-questions

umershabbir (Wed, 28 Nov 2018 21:36:33 GMT):
thanks Dave. I already gone through different articles but I need something specific to java-sdk where I could get end to end sample how to access/create private data using java api

dave.enyeart (Wed, 28 Nov 2018 21:53:00 GMT):
I believe @rickr prefers to point to java sdk integration tests rather than samples, but let's see what he says...

umershabbir (Wed, 28 Nov 2018 21:53:29 GMT):
ok

umershabbir (Wed, 28 Nov 2018 21:57:02 GMT):
@rickr ?

rickr (Thu, 29 Nov 2018 00:14:19 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919/src/test/java/org/hyperledger/fabric/sdkintegration/PrivateDataIT.java No help ?

rickr (Thu, 29 Nov 2018 00:16:04 GMT):
That will show you how to use the APIs I assume you've done the _homework_ to understand the concepts from the Fabric documentation.

HubertYoung (Thu, 29 Nov 2018 01:21:06 GMT):
@rickr But i don't know why the txid is duplicate.It's right when invoking channel.sendTransactionProposal().But it got errors when invoking channel.sendTransaction(successful).I didn't send duplicate transaction.

HubertYoung (Thu, 29 Nov 2018 01:21:06 GMT):
@rickr thanks,rickr.i invoked channel.sendTransaction(response) twice.

HubertYoung (Thu, 29 Nov 2018 01:29:26 GMT):
Here is my code.

HubertYoung (Thu, 29 Nov 2018 01:29:30 GMT):
Collection invokePropResp = channelClient.sendTransactionProposal(transactionProposalRequest); for (ProposalResponse response : invokePropResp) { if (response.getStatus() == Status.SUCCESS) { System.out.println("Successful transaction proposal response Txid: %s from peer %s" + response.getTransactionID() + response.getPeer().getName()); successful.add(response); } else { failed.add(response); } } // CompletableFuture future = channel.sendTransaction(successful); TransactionEvent transactionEvent = future.get(32000, TimeUnit.SECONDS);

yoonyoul (Thu, 29 Nov 2018 04:54:14 GMT):
@rickr Thanks I will check the code.

giacomo.minighin (Thu, 29 Nov 2018 10:06:34 GMT):
Hi, today I'm trying to convert Block object in json format to use it in a web client, this is my code: ``` String blockJson = JsonFormat.printer().print(blockInfo.getBlock()); ``` but the result is not the one expected: ``` { "header": { "dataHash": "/FdlYSbsoiDnIOF3aDxK0vffuKPiFXNIedR6fontR2A=" }, "data": { "data": ["CrxdCscGChUIARoGCO7o/t8FIglteWNoYW5uZWwSrQYKkAYKCk9yZGVyZXJNU1...zvn85LUXNoomevLqY52jgAHqH2uSD1/F95H2kVg0ECIFEjgAsk3OUx3E11akIjEI8aLpln7nssWpl+K0mJ2twO"] }, "metadata": { "metadata": ["", "", "AA==", ""] } } ```

giacomo.minighin (Thu, 29 Nov 2018 10:06:34 GMT):
Hi, today I'm trying to convert Block object in json format to use it in a web client, this is my code: ``` String blockJson = JsonFormat.printer().print(blockInfo.getBlock()); ``` but the result is not the one expected: ``` { "header": { "dataHash": "/FdlYSbsoiDnIOF3aDxK0vffuKPiFXNIedR6fontR2A=" }, "data": { "data": ["CrxdCscGChUIARoGCO7o/t8FIglteWNoYW5uZWwSrQYKkAYKCk9yZGVyZXJNU1...zvn85LUXNoomevLqY52jgAHqH2uSD1/F95H2kVg0ECIFEjgAsk3OUx3E11akIjEI8aLpln7nssWpl+K0mJ2twO"] }, "metadata": { "metadata": ["", "", "AA==", ""] } } ``` If I decode data like this: ``` String decodedData = new String(Base64.decode(new JSONObject(blockJson).getJSONObject("data").getJSONArray("data").get(0).toString())); ``` I'm getting strange characters like this: ``` �] � ����" mychannel� � OrdererMSP�-----BEGIN CERTIFICATE----- MIICDDCCAbKgA...wKWNVPdbabJ0z6um -----END CERTIFICATE----- �'��|�>�{ny��vnu�|��V �E�E� Orderer�� OrdererMSP�� MSP��� OrdererMSP� ... ```

gravity (Thu, 29 Nov 2018 13:52:17 GMT):
Hi @rickr As long as I can see, JSDK does not support the structure of a collection config that is documented here: https://hyperledger-fabric.readthedocs.io/en/release-1.3/private_data_tutorial.html#build-a-collection-definition-json-file hence the structure of the config should be like this yaml even if it passed as a JsonArray? https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/collectionProperties/PrivateDataIT.yaml

rickr (Thu, 29 Nov 2018 14:01:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L87-L95 ?

rickr (Thu, 29 Nov 2018 14:01:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L87-L95 ? The sample used yaml as I tried to put some simple comments in it which Json does not allow.

rickr (Thu, 29 Nov 2018 14:06:48 GMT):
@giacomo.minighin That's right as the javadoc states it's the *raw* block . That's protobuf nothing to do with Json.

rickr (Thu, 29 Nov 2018 14:15:09 GMT):
@gravity The format is a little different but you should be able to easily map it.

umershabbir (Thu, 29 Nov 2018 16:04:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6GhtYfrcaJ27jtmNL) @rickr Thanks @rickr let me take a look.

umershabbir (Thu, 29 Nov 2018 21:31:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JTtuP66wTbmBR9C3J) @rickr, I just gone through the code example you sent but seems like its not exactly what I want. do you have any other code sample?

rickr (Thu, 29 Nov 2018 22:46:47 GMT):
no -- it shows defining and using private data.

rickr (Thu, 29 Nov 2018 23:03:15 GMT):
@umershabbir if you're looking to setup up a channel used by two orgs this would help. But its a bit _fake_ having two orgs in the same application -- it's just for demonstration purposes. I think it would be a combination of the PrivateDataIT I refereed to and this. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

Marveliu (Fri, 30 Nov 2018 05:32:01 GMT):
Has joined the channel.

umershabbir (Fri, 30 Nov 2018 16:07:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=tedyfeWRcFqisxgyz) @rick Thanks! could you please send me the sample code using the following java api methods putPrivateData(), getPrivateDate(). and also the config file specifying the policy for the user who can access the private data using these java methods.

rickr (Fri, 30 Nov 2018 16:53:41 GMT):
The PrivateDataIT has a sample yaml file. It also invokes a GO chaincode that uses private data APIs. You need to ask on #fabric-java-chaincode for where they've documented their Java CC APIs I'm _guessing_ it has at least Javadoc.

AndresMartinezMelgar.itcl (Mon, 03 Dec 2018 09:46:16 GMT):
is there any documented example of java chaincode? i just find marbles and basic example. I need something more difficult. thanks!

halilkalkan (Mon, 03 Dec 2018 10:13:59 GMT):
Hi everyone, I couldn't figure out how should I handle multiple user requests with Java SDK. For instance, if I set usercontext for a user, how can I make another transactions with other users? Does it support multi user?

halilkalkan (Mon, 03 Dec 2018 10:13:59 GMT):
Hi everyone, I couldn't figure out how should I handle multiple user requests with Java SDK. For instance, if I set usercontext for a user, how can I make another transactions with other users? Does it support multi user? ps: I'm using spring boot for rest api.

halilkalkan (Mon, 03 Dec 2018 10:28:37 GMT):
Hi everyone, I couldn't figure out how should we handle multi user requests with Fabric Java SDK, do sdk have sessions for this kind of case? . I'm using spring boot for rest api service.

halilkalkan (Mon, 03 Dec 2018 10:28:37 GMT):
Hi everyone, I couldn't figure out how should we handle multi user requests with Fabric Java SDK, do sdk have sessions for this kind of case? I'm using spring boot for rest api service.

rickr (Mon, 03 Dec 2018 13:05:14 GMT):
@AndresMartinezMelgar.itcl The JSDK has the simple balance transfer. No specific SDK should really care about the chaincode it deploys and executes. A better place for chaincode questions would be #fabric-chaincode-dev or #fabric-java-chaincode .

rickr (Mon, 03 Dec 2018 13:12:09 GMT):
@halilkalkan The SDK has `user contexts` This is a combination of MSP ID, usually some sort of certificate, and private/public key pair. If you were embed the SDK in some other technology like Spring or HTTP/Web _session_ that corresponded with a user, your application would most likely I think need to map that _session_ with a specific user context.

rickr (Mon, 03 Dec 2018 13:12:09 GMT):
@halilkalkan The SDK has `user contexts` This is a combination of MSP ID, usually some sort of certificate, and private/public key pair. If you were to embed the SDK in some other technology like Spring or HTTP/Web _session_ that corresponded with a user, your application would most likely I think need to map that _session_ with a specific user context.

halilkalkan (Mon, 03 Dec 2018 13:31:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=S8T9spe3Su5WiaAzb) @rickr Thank you for your response Rickr. Do you have any documentation or samples regarding this issue? Because it was really hard to expose an api from stratch for java sdk and it would be great to investigate working examples.

rickr (Mon, 03 Dec 2018 13:37:59 GMT):
As the README.md states all the integration test really are full examples showing deploying and executing code.

gordon1987 (Tue, 04 Dec 2018 07:35:41 GMT):
Has joined the channel.

SandySun2000 (Tue, 04 Dec 2018 22:06:40 GMT):
The next step was to use our java client to connect to org1 and enrol some users (admin, newco-admin, test) which worked after some updates on our code to use Java SDK for Hyperledger version 1.2.1 instead of 1.1.0-alpha. However, when trying to submit transactions to the "platform" channel that had the profile chaincode installed and running, we encountered errors such as: "19:44:37.858 [ERROR] o.h.f.s.Channel:1772 - getConfigBlock for channel platform failed with peer org1-peer1. Status FAILURE, details: Sending proposal to org1-peer1 failed because of: gRPC failure=Status{code=UNIMPLEMENTED, description=HTTP status code 404 invalid content-type: null trailers: Metadata(:status=404,date=Tue, 04 Dec 2018 08:44:37 GMT,server=ibmblockchain), cause=null} org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel platform failed with peer org1-peer1. Status FAILURE, details: Sending proposal to org1-peer1 failed because of: gRPC failure=Status{code=UNIMPLEMENTED, description=HTTP status code 404"

SandySun2000 (Tue, 04 Dec 2018 22:07:28 GMT):
@rickr Does Java SDK support V1.2.1? where should I start with the error like above?

ryokawajp (Wed, 05 Dec 2018 01:53:13 GMT):
Hi everyone. I want to use Idemix so I am trying to run the integration test of fabric-sdk-java/master branch. However, I received the following errors during the run of the IT and failed at last: - "org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential", and - "Invalid nonce: Nonce is either unknown or has expired". Does anyone know how to fix these errors or what the root cause of these errors is? I use the following tools: openjdk version "1.8.0_181" mvn 3.5.0 ubuntu 16.04.3 LTS (Xenial Xerus) on Windows 7 64bit (virtual box) Hyperledger Fabric v1.3.0 fabric-sdk-java/master branch (commit 1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919) cloned on Nov 26 What I did: I followed the instruction in https://github.com/hyperledger/fabric-sdk-java#using-the-sdk . I executed $ mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc and after a run of 1-2 hours, I received the errors above and the test failed. mvn install and mvn install -DskipTests are completed successfully.

ryokawajp (Wed, 05 Dec 2018 01:53:13 GMT):
Hi everyone. I want to use Idemix so I am trying to run the integration test of fabric-sdk-java/master branch. However, I received the following errors during the run of the IT and failed at last: - "org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential", and - "Invalid nonce: Nonce is either unknown or has expired". Does anyone know how to fix these errors or what the root cause of these errors is? I use the following tools: openjdk version "1.8.0_181" mvn 3.5.0 ubuntu 16.04.3 LTS (Xenial Xerus) on Windows 7 64bit (virtual box) Hyperledger Fabric v1.3.0 fabric-sdk-java/master branch (commit 1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919) cloned on Nov 26 What I did: I followed the instruction in https://github.com/hyperledger/fabric-sdk-java#using-the-sdk . I executed $ mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc and after a run of 1-2 hours, I received the errors above and the test failed. mvn install and mvn install -DskipTests are completed successfully.

ryokawajp (Wed, 05 Dec 2018 01:53:13 GMT):
Hi everyone. I want to use Idemix so I am trying to run the integration test of fabric-sdk-java/master branch. However, I received the following errors during the run of the IT and failed at last: - "org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential", and - "Invalid nonce: Nonce is either unknown or has expired". Does anyone know how to fix these errors or what the root cause of these errors is? I use the following tools: openjdk version "1.8.0_181" mvn 3.5.0 ubuntu 16.04.3 LTS (Xenial Xerus) on Virtual Box on Windows 7 64bit 4GB memory and 2 cores assigned to vbox (24GB, Intel Xeon CPU E5-2670 0 @ 2.60GHz x 6 cores in total) Hyperledger Fabric v1.3.0 fabric-sdk-java/master branch (commit 1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919) cloned on Nov 26 What I did: I followed the instruction in https://github.com/hyperledger/fabric-sdk-java#using-the-sdk . I executed $ mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc and after a run of 1-2 hours, I received the errors above and the test failed. mvn install and mvn install -DskipTests are completed successfully.

ryokawajp (Wed, 05 Dec 2018 01:53:13 GMT):
Hi everyone. I want to use Idemix so I am trying to run the integration test of fabric-sdk-java/master branch. However, I received the following errors during the run of the IT and failed at last: - "org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential", and - "Invalid nonce: Nonce is either unknown or has expired". Does anyone know how to fix these errors or what the root cause of these errors is? I use the following tools: openjdk version "1.8.0_181" mvn 3.5.0 ubuntu 16.04.3 LTS (Xenial Xerus) on Virtual Box on Windows 7 64bit 4GB memory and 2 cores assigned to vbox (24GB in total, Intel Xeon CPU E5-2670 0 @ 2.60GHz) Hyperledger Fabric v1.3.0 fabric-sdk-java/master branch (commit 1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919) cloned on Nov 26 What I did: I followed the instruction in https://github.com/hyperledger/fabric-sdk-java#using-the-sdk . I executed $ mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc and after a run of 1-2 hours, I received the errors above and the test failed. mvn install and mvn install -DskipTests are completed successfully.

ryokawajp (Wed, 05 Dec 2018 01:53:13 GMT):
Hi everyone. I want to use Idemix so I am trying to run the integration test of fabric-sdk-java/master branch. However, I received the following errors during the run of the IT and failed at last: - "org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential", and - "Invalid nonce: Nonce is either unknown or has expired". Does anyone know how to fix these errors or what the root cause of these errors is? I use the following tools: openjdk version "1.8.0_181" mvn 3.5.0 ubuntu 16.04.3 LTS (Xenial Xerus) on Virtual Box on Windows 7 64bit 4GB memory and 2 cores assigned to vbox (24GB in total, Intel Xeon CPU E5-2670 0 @ 2.60GHz) Hyperledger Fabric v1.3.0 fabric-sdk-java/master branch (commit 1eb8e0a3166d0061b4e44adb2ed7b8f5cc46f919) cloned on Nov 26 What I did: - I modified pom.xml to avoid "Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter" error; I added false to maven-surefire-plugin and maven-failsafe-plugin. - I followed the instruction in https://github.com/hyperledger/fabric-sdk-java#using-the-sdk . - I executed $ mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc and after a run of 1-2 hours, I received the errors above and the test failed. - mvn install and mvn install -DskipTests are completed successfully.

ryokawajp (Wed, 05 Dec 2018 01:54:34 GMT):
org.hyperledger.fabric.sdkintegration.IntegrationSuite------------------------------------------------------------------------------- Test set: org.hyperledger.fabric.sdkintegration.IntegrationSuite ------------------------------------------------------------------------------- Tests run: 47, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5,769.234 sec <<< FAILURE! - in org.hyperledger.fabric.sdkintegration.IntegrationSuite testGetIdemixCred(org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT) Time elapsed: 85.941 sec <<< ERROR! org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential at org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT.testGetIdemixCred(HFCAClientIT.java:1334) Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://localhost:7054 failed request body {"request":{"nym":{"x":"IoHMOaW6NsKjwfc8XILjcbGVbaITMOTOKqMRt+eU6U0=","y":"Q0iGllgnthJvLZkHUqNaYXYsP9NUi+QhIH11wz/KwwQ="},"issuer_nonce":"9BpTZswd2m8QDIafh8K4frN2ttWwamoMHuT/ufY++lA=","proof_c":"iSbNotMcgCBmETecaWq/Kl7UYglVHW6d+wm7iv5pUF0=","proof_s":"cS1Q98JsdVYna0ezQ6fa3H8Fl1fUMh0Mw4iADk9vEUc="}}. Response: {"result":"","errors":[{"code":0,"message":"Invalid nonce: Nonce is either unknown or has expired"} ],"messages":[],"success":false} at org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT.testGetIdemixCred(HFCAClientIT.java:1334)

ryokawajp (Wed, 05 Dec 2018 01:54:34 GMT):
A log from target/failsafe-reports/org.hyperledger.fabric.sdkintegration.IntegrationSuite.txt: ------------------------------------------------------------------------------- Test set: org.hyperledger.fabric.sdkintegration.IntegrationSuite ------------------------------------------------------------------------------- Tests run: 47, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5,769.234 sec <<< FAILURE! - in org.hyperledger.fabric.sdkintegration.IntegrationSuite testGetIdemixCred(org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT) Time elapsed: 85.941 sec <<< ERROR! org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential at org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT.testGetIdemixCred(HFCAClientIT.java:1334) Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://localhost:7054 failed request body {"request":{"nym":{"x":"IoHMOaW6NsKjwfc8XILjcbGVbaITMOTOKqMRt+eU6U0=","y":"Q0iGllgnthJvLZkHUqNaYXYsP9NUi+QhIH11wz/KwwQ="},"issuer_nonce":"9BpTZswd2m8QDIafh8K4frN2ttWwamoMHuT/ufY++lA=","proof_c":"iSbNotMcgCBmETecaWq/Kl7UYglVHW6d+wm7iv5pUF0=","proof_s":"cS1Q98JsdVYna0ezQ6fa3H8Fl1fUMh0Mw4iADk9vEUc="}}. Response: {"result":"","errors":[{"code":0,"message":"Invalid nonce: Nonce is either unknown or has expired"} ],"messages":[],"success":false} at org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT.testGetIdemixCred(HFCAClientIT.java:1334)

ryokawajp (Wed, 05 Dec 2018 06:29:41 GMT):
oh sorry. I found v1.3.0 tag in the repository. I will try the integration test of that version.

ApurvTandon (Wed, 05 Dec 2018 13:56:30 GMT):
@rickr Where exactly can i find the file on the peer that contains the transaction information. How is the SDK able to find the file given the transaction id. Could you point me to the class where the SDK searches for the transaction file and reads it .

rickr (Wed, 05 Dec 2018 14:25:35 GMT):
@ApurvTandon I'm not aware of any _file_ for a transaction.

rickr (Wed, 05 Dec 2018 14:30:05 GMT):
@SandySun2000 Any SDK greater than 1.2 version should. You need to look at the peer logs. Some things to check: Are you using the correct channel name? Was that peer joined to the channel ?

ApurvTandon (Wed, 05 Dec 2018 15:07:28 GMT):
@rickr where on the system are the transaction and all information of the transactions stored

rickr (Wed, 05 Dec 2018 15:18:17 GMT):
On the ledger

rickr (Wed, 05 Dec 2018 15:18:26 GMT):
and blockchain

giacomo.minighin (Wed, 05 Dec 2018 15:27:42 GMT):
How can I make unit testing with the sdk?

giacomo.minighin (Wed, 05 Dec 2018 15:27:42 GMT):
How can I write unit testing using the sdk?

ApurvTandon (Wed, 05 Dec 2018 15:31:40 GMT):
@rickr ok can we see the transaction data on the ledger like under some location on the system ?

ryokawajp (Wed, 05 Dec 2018 16:23:19 GMT):
I retried the integration test with the source code which has v1.3.0 tag and I got the same error. This time I did not need to modify pom.xml. I just executed "mvn clean install -DskipITs=false -Dmaven.test.failure.ignore=false javadoc:javadoc" and the error was displayed about two hours later. Any suggestions? https://chat.hyperledger.org/channel/fabric-sdk-java?msg=GtQBkjxKgRFsD2Fds Here is a report from target/failsafe-reports/org.hyperledger.fabric.sdkintegration.IntegrationSuite.txt ------------------------------------------------------------------------------- Test set: org.hyperledger.fabric.sdkintegration.IntegrationSuite ------------------------------------------------------------------------------- Tests run: 47, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5,824.411 sec <<< FAILURE! - in org.hyperledger.fabric.sdkintegration.IntegrationSuite testGetIdemixCred(org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT) Time elapsed: 145.114 sec <<< ERROR! org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential at org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT.testGetIdemixCred(HFCAClientIT.java:1334) Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://localhost:7054 failed request body {"request":{"nym":{"x":"pX6iFQiucyX3ATqoLC6kQw/KC5wVI2dy6/82qEuS2lM=","y":"xkDIvcg+CyUbNsXwuxlsUHFbpIlv6fGDf0+3p1vBEqE="},"issuer_nonce":"K+SjvAivTrBn0lmAA3vcGrLPsJrn4AZFgld4HaWmyY8=","proof_c":"MFI6Ji+E85t7sDugZxENyFihFHc7AcU7kr8iUkN8TxA=","proof_s":"e3U0FyXkVZiOYosEjw3Hz/ENZG+/C4XZhdBTBnlYdcU="}}. Response: {"result":"","errors":[{"code":0,"message":"Invalid nonce: Nonce is either unknown or has expired"} ],"messages":[],"success":false} at org.hyperledger.fabric_ca.sdkintegration.HFCAClientIT.testGetIdemixCred(HFCAClientIT.java:1334)

rickr (Wed, 05 Dec 2018 16:53:56 GMT):
You're getting a time out. However you're running this your systems seem to be real slow. I see full successful build/test complete under 8 min. It looks like yours are going on an hour and half

calvin.heo (Wed, 05 Dec 2018 17:00:04 GMT):
Has joined the channel.

gravity (Wed, 05 Dec 2018 17:22:13 GMT):
hi @rickr I'm running a network v1.3.0 and java sdk v1.2.2 When I query peer's channels, I'm getting this exception: ``` Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true. java.lang.RuntimeException: ManagedChannel allocation site at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.(ManagedChannelOrphanWrapper.java:103) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:53) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.ManagedChannelOrphanWrapper.(ManagedChannelOrphanWrapper.java:44) ~[grpc-core-1.13.2.jar:1.13.2] at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:410) ~[grpc-core-1.13.2.jar:1.13.2] at org.hyperledger.fabric.sdk.EndorserClient.(EndorserClient.java:49) ~[fabric-sdk-java-1.2.2.jar:na] at org.hyperledger.fabric.sdk.Peer.getEndorserClient(Peer.java:238) ~[fabric-sdk-java-1.2.2.jar:na] at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:221) ~[fabric-sdk-java-1.2.2.jar:na] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:3604) ~[fabric-sdk-java-1.2.2.jar:na] at org.hyperledger.fabric.sdk.Channel.queryChannels(Channel.java:2892) ~[fabric-sdk-java-1.2.2.jar:na] at org.hyperledger.fabric.sdk.HFClient.queryChannels(HFClient.java:552) ~[fabric-sdk-java-1.2.2.jar:na] ``` I does not interrupt the flow, but it makes me think that I'm doing something wrong

SandySun2000 (Wed, 05 Dec 2018 17:29:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3CmLW8bXF6gx3pm8J) @rickr Thanks Rick, I will look for more detail information for this issue.

rickr (Wed, 05 Dec 2018 17:36:47 GMT):
@gravity I'm running a network v1.3.0 and java sdk v1.2.2 why?

gravity (Wed, 05 Dec 2018 17:37:56 GMT):
@rickr Because I have not upgraded yet jsdk to 1.3.0. just today noticed that it was released

rickr (Wed, 05 Dec 2018 17:38:42 GMT):
you should have been running with 1.3-SNAPSHOT if you were using 1.3 fabric ..

gravity (Wed, 05 Dec 2018 17:39:51 GMT):
so that issue might be connected to the sdk version mismatch with the network version?

rickr (Wed, 05 Dec 2018 17:40:21 GMT):
I don't know -- but it's something we don't test ever

gravity (Wed, 05 Dec 2018 17:41:12 GMT):
ok, I will run the same flow with the jsdk v1.3.0 and check if the exception is thrown

ryokawajp (Thu, 06 Dec 2018 01:52:12 GMT):
Thank you, @rickr . I will retry the test with more CPUs or with a different JVM (Oracle or IBM).

ApurvTandon (Thu, 06 Dec 2018 03:39:51 GMT):
@rickr actually i was looking for the transaction and where on the system they are stored, like a location on the ubuntu machine, i wanted to see what kind of information is stored in the file or however they are stored

ryokawajp (Thu, 06 Dec 2018 03:41:14 GMT):
@rickr Thank you for the information. I retried the integration test with IBM JDK and it successfully finished in 14 mins. (After that, I got errors when generating javadocs, though.) Therefore, you are right; the error was caused by a timeout. The following list shows times required to execute the IT with various JDKs. - Open JDK 8: 2 hours (failed due to the nonce error during testGetIdemixCred ). - Oracle JDK 8: 2 hours (failed due to the nonce error during testGetIdemixCred ). - IBM JDK 8: 14 minutes (success). I also observed that during the unit tests, it takes a considerable time (10-20 mins) to complete org.hyperledger.fabric.sdk.identity.IdemixIdentitiesTest if I use OpenJDK or Oracle JDK, while it takes a few seconds to complete it if I use IBM JDK. I used Ubuntu 16.04 VM (on Virtual Box on Windows 7) with 2 cores and 8GB memory assigned for all the three cases. https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ssjCwEob9657Ywt8G

ryokawajp (Thu, 06 Dec 2018 03:41:14 GMT):
@rickr Thank you for the information. I retried the integration test with IBM JDK and it successfully finished in 14 mins. (After that, I got errors when generating javadocs, though.) Therefore, you are right; the error was caused by a timeout. The following list shows times spent to execute the IT with various JDKs. - Open JDK 8: 2 hours (failed due to the nonce error during testGetIdemixCred ). - Oracle JDK 8: 2 hours (failed due to the nonce error during testGetIdemixCred ). - IBM JDK 8: 14 minutes (success). I also observed that during the unit tests, it takes a considerable time (10-20 mins) to complete org.hyperledger.fabric.sdk.identity.IdemixIdentitiesTest if I use OpenJDK or Oracle JDK, while it takes a few seconds to complete it if I use IBM JDK. I used Ubuntu 16.04 VM (on Virtual Box on Windows 7) with 2 cores and 8GB memory assigned for all the three cases. https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ssjCwEob9657Ywt8G

adamhardie (Thu, 06 Dec 2018 12:40:02 GMT):
could someone please help me mitigate this risk from a production system : ""ChaincodeEventListener should not be long lived as they can take up thread resources""

adamhardie (Thu, 06 Dec 2018 12:41:09 GMT):
should we shutdown the listener impl periodically? or just monitor resources. we just hit a OutOfMemory exception in our test server SEVERE: Error calling block listener BLOCK_LISTENER_HANDLE {logging stuff} java.lang.OutOfMemoryError: unable to create new native thread

rickr (Thu, 06 Dec 2018 13:03:04 GMT):
@adamhardie I've had over 400 threads running for 8 hours creating proposals, sending transactions doing queries etc. All threads working independently against the same chaincode . I also monitored with independent jvmconsole that threads and memory leveled off as all the resources needed for them were meet. Generally, I don't see the SDK itself leaking any memory/threads. There's one scenario just brought to my attention where if the application constantly create channels/ shutsdown it leaks one thread - but I don't think applications would see that as a typical use case. The fix for that will be in the next release.

rickr (Thu, 06 Dec 2018 13:04:56 GMT):
@ApurvTandon if your trying to understand the internal workings of the Peer, I'd suggest the #fabric-peer-endorser-committer channel.

adamhardie (Thu, 06 Dec 2018 13:05:11 GMT):
thanks for clarifying - will continue my investigation

rickr (Thu, 06 Dec 2018 13:13:19 GMT):
@adamhardie You should be careful what you do in your handlers too. They should be _short lived_. Process the block information needed .. store somewhere and then return back.

adamhardie (Thu, 06 Dec 2018 13:15:36 GMT):
agreed- we merely deserialize the json, with some of the block report info; then add to a queue to be picked up by another thread

adamhardie (Thu, 06 Dec 2018 13:15:48 GMT):
report ^ event *#

gravity (Thu, 06 Dec 2018 14:46:04 GMT):
hi all I'm running a network v1.3.0, jsdk v1.3.0 trying to set up service discovery, but stuck with the tls handshake error: `peer0 | 2018-12-06 14:37:48.123 UTC [core/comm] ServerHandshake -> ERRO 10b TLS handshake failed with error tls: client didn't provide a certificate {"server": "PeerServer", "remote address": "172.18.0.1:40528"}` this error occurs when `channel.initialize` is called sdk exception: ``` Caused by: javax.net.ssl.SSLHandshakeException: error:10000412:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.shutdownWithError(ReferenceCountedOpenSslEngine.java:862) ~[netty-handler-4.1.24.Final.jar:4.1.24.Final] at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.sslReadErrorResult(ReferenceCountedOpenSslEngine.java:1110) ~[netty-handler-4.1.24.Final.jar:4.1.24.Final] ``` Discovery properties: ``` discoveryProeprties.put("org.hyperledger.fabric.sdk.discovery.default.clientCertBytes", peer0CrtBytes); discoveryProeprties.put("org.hyperledger.fabric.sdk.discovery.default.clientKeyBytes", peer0KeyBytes); discoveryProeprties.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:6004", "peer0"); discoveryProeprties.put("org.hyperledger.fabric.sdk.discovery.endpoint.hostnameOverride.localhost:5000", "orderer0"); ``` TLS connection for peer is workable, I've run tons of tests previously. but getting errors when trying to set up discovery. `peer0CrtBytes` and `peer0KeyBytes` are the same certificate that are used in peer's properties.

aatkddny (Thu, 06 Dec 2018 15:02:46 GMT):
so we had a failure yesterday where a peer was evicted. when we bring it back up it won't process updates, despite them being physically on the disk for that ledger and visible in the couch db disk. Any connection to the peer starts throwing these errors: ```Received error on peer eventing service on channel xx-xx-channel, peer xx-peer1-yy, url grpc://st-mofabric-demo02.na.rtdom.net:30031, attempts 1. UNAVAILABLE: Channel shutdownNow invoked``` I just reinstantiated this connection. The ones in the cluster are in the 10s of thousand. Is there a way to fix this without restarting everything?

aatkddny (Thu, 06 Dec 2018 15:02:46 GMT):
so we had a failure on our cluster yesterday where a kafka and a peer were evicted. when we bring them back up it now won't process updates on one of the channels. For clarity, the update adds - and I can see it physically on the disk for that ledger and visible in the couch db disk, but I can't read it. Any connection to the peer starts throwing these errors: ```Received error on peer eventing service on channel xx-xx-channel, peer xx-peer1-yy, url grpc://st-mofabric-demo02.na.rtdom.net:30031, attempts 1. UNAVAILABLE: Channel shutdownNow invoked``` I just reinstantiated this connection. The ones in the cluster are in the 10s of thousand. Is there a way to fix this without restarting everything?

aatkddny (Thu, 06 Dec 2018 15:02:46 GMT):
so we had a failure on our cluster yesterday where a kafka and a peer were evicted. when we bring them back up it now won't process updates on one of the channels. For clarity, the update adds - and I can see it physically on the disk for that ledger and visible in the couch db disk, but I can't read it. Any connection to the peer starts throwing these errors: ```Received error on peer eventing service on channel xx-xx-channel, peer xx-peer1-yy, url grpc://st-mofabric-demo02.na.rtdom.net:30031, attempts 1. UNAVAILABLE: Channel shutdownNow invoked``` I just reinstantiated this connection. The error counts in the service that contacts the peers in the cluster are in the 10s of thousand - it's been running since it too was restarted yesterday. Is there a way to fix this without restarting everything?

aatkddny (Thu, 06 Dec 2018 15:02:46 GMT):
so we had a failure on our cluster yesterday where a kafka and a peer were evicted. when we bring them back up it now won't process updates on one of the channels. For clarity, the update adds - and I can see it physically on the disk for that ledger and visible in the couch db disk, but I can't read it. Any connection to the peer starts throwing these errors: ```Received error on peer eventing service on channel xx-xx-channel, peer xx-peer1-yy, url grpc://st-mofabric-demo02.na.rtdom.net:30031, attempts 1. UNAVAILABLE: Channel shutdownNow invoked``` I just reinstantiated this connection. The error counts in the service that contacts the peers in the cluster are in the 10s of thousand - it's been running since it too was restarted yesterday and it appears to throw 50 every 5 minutes. Is there a way to fix this without restarting everything?

aatkddny (Thu, 06 Dec 2018 15:05:14 GMT):
If I let a channel block walk run it's taking a while and then throwing this ```2018-12-06 09:58:33.346 ERROR 87386 --- [nio-8095-exec-1] o.h.fabric.sdk.ProposalResponse : verify: Cannot retrieve peer identity from ProposalResponse. Error is: X.509 not found org.hyperledger.fabric.sdk.exception.CryptoException: X.509 not found at org.hyperledger.fabric.sdk.security.CryptoPrimitives.getX509Certificate(CryptoPrimitives.java:245) ~[fabric-sdk-java-1.2.0.jar:na] ``` No crypto has been regenerated so I'm a bit confused.

rickr (Thu, 06 Dec 2018 15:45:43 GMT):
@aatkddny you can adjust the error warning rate by upping PEER_EVENT_RECONNECTION_WARNING_RATE see Config.java .. but not without restarting. Not sure I follow _won't process updates_ do you mean your not getting and events ? Is the peer eventing service never connecting ? The other error x.509 not found .. what's happening here ? Is that getting an endorsement ? The peer is no longer processing endorsements ?

aatkddny (Thu, 06 Dec 2018 15:53:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aSMed39qkzQd3Z4qo) @rickr It's a bit abstruse. I add an asset. It says it's fine. I can see it physically on the disk - i look at a hex dump of the ledger and the couch and can see my asset in the rest of it on the peers that are misbehaving. BUT when I go to read it nothing comes back. The only errors I can see are those eventing ones. I'm clutching at straws - is there something in the eventing (and this is a holdover from 1.1) that the eventhub needs to serve before a transaction commits? And if so how would I "fix" it here.

aatkddny (Thu, 06 Dec 2018 15:53:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aSMed39qkzQd3Z4qo) @rickr It's a bit abstruse. I add an asset. It says it's fine. I can see it physically on the disk - I look at a hex dump of the ledger and the couch and can see my asset in the rest of it on the peers that are misbehaving. BUT when I go to read it nothing comes back. The only errors I can see in the log are those eventing ones. I'm clutching at straws - is there something in the eventing (and this is a holdover from 1.1) that the eventhub needs to serve before a transaction commits? And if so how would I "fix" it here. When I go to try to read all the blocks in the channel the asset was added on - using a copy of the block-walker from the examples - it gives me that x509 error, but there's no new crypto generated for this thing.

rickr (Thu, 06 Dec 2018 15:59:39 GMT):
Nothing with peer eventing service or old eventhubs have anything to do with blocks actually committing. They tell the client when they're committed.

rickr (Thu, 06 Dec 2018 16:02:06 GMT):
When you `read it` is that using queryBlockByNumber ?

ryokawajp (Thu, 06 Dec 2018 16:11:10 GMT):
I measured the time for the unit test by running "mvn install" with the three JDKs. Again, Oracle JDK and Open JDK took a considerable time. So it seems that it is not a matter of peer or CA. I will use IBM JDK as a workaround for a while. Is there anyone who can successfully execute UT or IT of fabric-sdk-java v1.3.0 including Idemix using Oracle JDK or Open JDK? IBM JDK8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 59.926 s [INFO] Finished at: 2018-12-06T04:50:31Z [INFO] Final Memory: 42M/173M [INFO] ------------------------------------------------------------------------ Oracle JDK8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 48:04 min [INFO] Finished at: 2018-12-06T05:39:49Z [INFO] Final Memory: 41M/769M [INFO] ------------------------------------------------------------------------ Open JDK8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 41:35 min [INFO] Finished at: 2018-12-06T06:22:29Z [INFO] Final Memory: 39M/732M [INFO] ------------------------------------------------------------------------

ryokawajp (Thu, 06 Dec 2018 16:11:10 GMT):
I measured the time for the unit test by running "mvn install" with the three JDKs. Again, Oracle JDK and Open JDK took a considerable time. So it seems that it is not a matter of peer or CA. I will use IBM JDK as a workaround for a while. Is there anyone who can successfully execute UT or IT of fabric-sdk-java v1.3.0 including Idemix using Oracle JDK or Open JDK? IBM JDK8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 59.926 s [INFO] Finished at: 2018-12-06T04:50:31Z [INFO] Final Memory: 42M/173M [INFO] ------------------------------------------------------------------------ Oracle JDK8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 48:04 min [INFO] Finished at: 2018-12-06T05:39:49Z [INFO] Final Memory: 41M/769M [INFO] ------------------------------------------------------------------------ Open JDK8 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 41:35 min [INFO] Finished at: 2018-12-06T06:22:29Z [INFO] Final Memory: 39M/732M [INFO] ------------------------------------------------------------------------

rickr (Thu, 06 Dec 2018 16:23:02 GMT):
@ryokawajp it's run continuously in our build environment. I run it all the time running under 8 mins. Try on non Xeon processor. I have personally seen where they run Java slow ..

ryokawajp (Thu, 06 Dec 2018 16:29:39 GMT):
@rickr Thank you. I will try the test with my Core i5 later. Which Java is used in your build environment?

rickr (Thu, 06 Dec 2018 16:29:59 GMT):
open

ryokawajp (Thu, 06 Dec 2018 16:30:18 GMT):
I see. Thanks!

adamhardie (Thu, 06 Dec 2018 16:51:52 GMT):
on the earlier issue - hardware problem - unrelated to HL!

rickr (Thu, 06 Dec 2018 17:04:38 GMT):
darn hardware -- ofcourse it's never the software :)

gravity (Thu, 06 Dec 2018 17:08:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mrSu4Cir3qCsixEcY) hi @rick could you take a look at this? maybe you will have some suggestions on what is wrong

gravity (Thu, 06 Dec 2018 17:08:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mrSu4Cir3qCsixEcY) hi @rickr could you take a look at this? maybe you will have some suggestions on what is wrong

gravity (Thu, 06 Dec 2018 18:09:02 GMT):
If I have a channel setup with out event hubs and peers without `EVENT_SOURCE` role, how transactions will complete when I call `HFClient.sendTransaction(proposals)`? Does the future that is returned from the `sendTransaction` indicate (when complented) that the transaction was not only queued on the orderer, but it was actually committed to the blockchain?

rickr (Thu, 06 Dec 2018 18:11:39 GMT):
As the end2end test shows when the future is complected the queried results are written to the block

gravity (Thu, 06 Dec 2018 18:13:42 GMT):
but if event hubs are configured and peers were joined/added to a channel with the role `EVENT_SOURCE`, then the future doesn't indicate that that the transaction was commited, right?

aatkddny (Thu, 06 Dec 2018 18:42:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sot2BGJoeNxg2Yt6y) @rickr No it's invoking the chaincode to perform a get by id. Returns nothing on these peers, despite the asset being in the storage for the ledger and the couch instance.

aatkddny (Fri, 07 Dec 2018 02:14:03 GMT):
Any plans to validate builds using Corretto? Yeah yeah openJDK - of course there will be no incompatibilities so openJDK will suffice (garbage collection cough cough). The pricing and their commitment to LTS means we are looking long and hard at it is why I'm asking.

rickr (Fri, 07 Dec 2018 14:13:53 GMT):
We don't have any plans for testing our builds with Corretto at the moment.

rickr (Fri, 07 Dec 2018 14:26:30 GMT):
@gravity You could try putting logging level to trace in both cases and see what differences there are .. may shed some light

gravity (Fri, 07 Dec 2018 14:30:42 GMT):
ok, will try btw, is there any way to check that channel already exists? for example, I created a channel, but didn't join peers into it. just an empty channel. in this case, I want to check if channel exists and if not - create it, if it does exists - join peers into that channel. this can be helpful in case of setup failure. for example, I created a channel, but the application went down and join request failed. and on the next start up, I want to join peers to the channel that was created before failure

rickr (Fri, 07 Dec 2018 14:31:19 GMT):
no

ryokawajp (Fri, 07 Dec 2018 14:38:26 GMT):

Clipboard - December 7, 2018 11:38 PM

ryokawajp (Fri, 07 Dec 2018 14:40:25 GMT):
I measured the time of the unit test of v1.3.0 by running "mvn install" command on a various environments. Fast?=TRUE means that the UT is completed within 2 minutes and Fast?=FALSE means that it takes more than 10 minutes. In the latter case, most of the time is consumed in IdemixIdentitiesTest and the CPU utilization is almost zero at that time. I think I can say that: - CPU (Xeon or Core i5) does not matter. - IBM JDK is always OK in any environment. - Assuming that Oracle JDK and Open JDK are compatible, those JDKs work fine on Windows (native) but not on Linux VMs. - I could not identify whether a use of VM has something to do or not because I do not have a Linux native machine. The result could be inconsistent with the situation on @rickr 's build environment. The result is very complicated ...:expressionless: Unfortunately, I do not have a means to further investigate this issue, so I would like to use IBM Java as a workaround. If someone else also experiences this phenomenon, then I am happy to create a JIRA issue and share this result.

rickr (Fri, 07 Dec 2018 15:04:56 GMT):
I don't think this is a run time issue at all. It's an issue with JaCoCo coverage

rickr (Fri, 07 Dec 2018 15:04:56 GMT):
I don't think this is a run time issue at all. It's an issue with JaCoCo coverage with idemix test that uses multiple threads.

rickr (Fri, 07 Dec 2018 15:04:56 GMT):
I don't think this is a run time issue at all. It's an issue with JaCoCo coverage with idemix test that uses multiple threads. Also your vm may not have enough entropy. http://giovannitorres.me/increasing-entropy-on-virtual-machines.html

ryokawajp (Fri, 07 Dec 2018 15:50:45 GMT):
Thank you @rickr . I was not aware of what JaCoCo is ... I will read through the page and try to understand.

doyajii1 (Mon, 10 Dec 2018 01:12:34 GMT):
Has joined the channel.

doyajii1 (Mon, 10 Dec 2018 02:20:46 GMT):
Hello, if following questions should have been asked in fabric-questions please forgive me. 1. for mutual tls can i use the keys generated by fabric CA? 2. just to verify, mutual tls is used between fabric client(ex. application with fabric-java-sdk) to peer or orderer right?

ryokawajp (Mon, 10 Dec 2018 06:36:50 GMT):
Thank you, @rickr . I think I understood what happened to my systems. In a Linux system, there two random number generators: - /dev/urandom: non-blocking but less secure. - /dev/random: blocking but secure. In the latter case, the initialization of the random number generator used in SecureRandom in Java "consumes" the system's entropy and might be blocked if the entropy is exhausted. Then SecureRandom waits for a system to recover the entropy by influences from external I/O devices. As you suggested, VMs have less entropy and that is why the UTs took a long time except for the first time. If the hardware supports RNG, then one can install rng-tools and run rngd to increase the system's entropy. Recent CPUs after ivy Bridge have CPU-level RNG supports but my old Xeon machine doesn't have. The reason why IBM Java works faster than Open JDK is that the default RNG is set to /dev/urandom, which is less secure. This can be configured in securerandom.source parameter in $JAVA_HOME/jre/lib/security/java.security https://blogs.oracle.com/java-platform-group/thats-so-securerandom http://giovannitorres.me/increasing-entropy-on-virtual-machines.html

ryokawajp (Mon, 10 Dec 2018 06:38:58 GMT):
Now, I installed rng-tools and executed rngd on a Linux VM on a Core i5 machine and everything is fine including IdemixIdentityTest in the unit test even in the case of Oracle JDK 8 and Open JDK 8.

qubing (Mon, 10 Dec 2018 08:19:13 GMT):
Has joined the channel.

tballast (Mon, 10 Dec 2018 08:46:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=XK9jYDNZb5BXFhZsZ) @gravity did you find a way to make this work?

gravity (Mon, 10 Dec 2018 09:17:40 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7gKDKPZ2fFb5RMWvC) @tballast no, I did not

anjalinaik (Mon, 10 Dec 2018 09:49:59 GMT):
Has joined the channel.

anjalinaik (Mon, 10 Dec 2018 09:50:46 GMT):
Hi Experts,can anyone please guide me on, how do I need to modify the transaction proposal request in fabric-java-SDK so that it gets signed by both Org1 and Org2.[AND Endorsment policy]

giacomo.minighin (Mon, 10 Dec 2018 10:22:10 GMT):
Hi everyone, I'm trying to decode the KVWrite of a chaincode instantiation in a human readable format, this is what I'm getting from fabric: ``` "mycc":"\n\u0004mycc\u0012\u00031.0\u001A\u0004escc\"\u0004vscc*(\u0012\f\u0012\n\b\u0002\u0012\u0002\b\u0000\u0012\u0002\b\u0001\u001A\u000B\u0012\t\n\u0007Org1MSP\u001A\u000B\u0012\t\n\u0007Org2MSP2D\n ��c)q�\u001F�I6hoF��g5ͼ��'`z�\u0019b��1�\u0012 \u0007\u001F\u0014)\u001E\u0015+�������t�\u0013ak�\u0015J����Z\u0017_c&: �����☋���b{�\u0017��%B$(��\"

giacomo.minighin (Mon, 10 Dec 2018 11:37:29 GMT):
another question, how can I get information about peer joining a channel from a BlockInfo object?

AndresMartinezMelgar.itcl (Mon, 10 Dec 2018 12:55:18 GMT):
anyone knows any web where they explain how can i start a hyperledger proyect with eclipse? step by step.... imports... Thx!

rickr (Mon, 10 Dec 2018 13:05:05 GMT):
@AndresMartinezMelgar.itcl https://github.com/hyperledger/fabric-sdk-java#setting-up-eclipse best to at least read through the readme.md once

rickr (Mon, 10 Dec 2018 13:09:00 GMT):
@anjalinaik getting it signed by two orgs is simply send it to the two organizations orgs peers then send the signed endorsements to the orderer. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample That shows if you follow the comments closely forcing the signing to two orgs.

rickr (Mon, 10 Dec 2018 13:11:22 GMT):
@doyajii1 You should be able to use the tls certs for the client generated by the CA; however it can be a bit involved.

rickr (Mon, 10 Dec 2018 13:15:04 GMT):
@giacomo.minighin https://github.com/hyperledger/fabric-sdk-java/blob/b9f61bd903f1a67c3608da7da515e2a09f3ae499/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L1016=L1076

giacomo.minighin (Mon, 10 Dec 2018 13:47:37 GMT):
@rickr sorry I've missed the point, I need transform that into an object, something like: ``` chaincodeName: "mycc", chaincodeVersion: 1.0, etc.. ```

gravity (Mon, 10 Dec 2018 14:02:43 GMT):
hi all are there any drawbacks in serializing channels, storing in db and deserializing them later for use?

rickr (Mon, 10 Dec 2018 16:03:22 GMT):
@giacomo.minighin I think that code walks through getting information from BlockInfo. Not helpful ?

rickr (Mon, 10 Dec 2018 16:08:56 GMT):
@gravity I would at what information you need to restore a channel in the End2endAndBackAgainIT Decided how you want the schema for your database to look like to store those artifacts. Table of Peers, Orderers with name, url, a key channel etc, Table channels, name etc.

gravity (Mon, 10 Dec 2018 16:24:51 GMT):
@rickr for example, if I have a table Channels and I want to store there channel's representation in byte + some meta info, so then I will be able to grab channel bytes from a database, deserialize, initialize and use it. but there is one question: if I shutdown an application so the HFClient instance, that previously held the information about a channel, is destroyed and on the next startup I will deserialize a channel from bytes, will this channel object have the information about peers and orderers that were added to this channel? or should I call `addPeer` and `addOrderer` methods to add the necessary information to a channel?

rickr (Mon, 10 Dec 2018 16:29:26 GMT):
@gravity Look at the End2endxxxxIT test they do this. Be advised that when the SDK goes to different versions there's no upgrade provided for any java serialization. I you do use that, it's something you'll have to take on. IMO I would not use that. Store what you need in your own application format.

giacomo.minighin (Mon, 10 Dec 2018 16:30:36 GMT):
@rickr Yes but not enough, I need more detailed infos on KVWrite object, but probably are not already implemented

doyajii1 (Tue, 11 Dec 2018 02:25:51 GMT):
@rickr thank you :)

louisliu2048 (Tue, 11 Dec 2018 03:29:53 GMT):
Has joined the channel.

KenvinNguyen (Tue, 11 Dec 2018 06:11:25 GMT):
Has joined the channel.

gravity (Tue, 11 Dec 2018 13:59:25 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mTG53KfsBohwXLXsG) @rickr tried the same action for the service discovery with tls with the `TRACE` logging level, there is no additional output that might be helpful service discovery still not working with TLS

rickr (Tue, 11 Dec 2018 14:24:40 GMT):
@gravity Just ran ServiceDiscoveryIT locally against Fabric1.3 with TLS enabled .. Discovered other peer and the orderer and what endorsers were needed. https://ctrlv.it/id/158037/1142610691

gravity (Tue, 11 Dec 2018 14:31:26 GMT):
@rickr that's weird I've provided all the TLS certificates that are required for the discovery peer, but it's still arguing that ``` TLS handshake failed with error tls: client didn't provide a certificate {"server": "PeerServer", "remote address": "172.18.0.1:36570"} ```

gravity (Tue, 11 Dec 2018 14:33:31 GMT):
and there is one more message: ``` peer0 | 2018-12-11 14:25:13.227 UTC [core/comm] ServerHandshake -> ERRO 18a TLS handshake failed with error read tcp 172.18.0.32:7051->172.18.0.1:36566: i/o timeout {"server": "PeerServer", "remote address": "172.18.0.1:36566"} ``` where `172.18.0.32` is the address of the `peer0` but this peer is running and available

gravity (Tue, 11 Dec 2018 14:42:51 GMT):
but there is no container with the IP `172.18.0.1`

doyajii1 (Wed, 12 Dec 2018 01:00:46 GMT):
i can see that we can unregister a blocklistener by providing blocklistener handler id, but is there way to unregister all the blocklistner at once?

doyajii1 (Wed, 12 Dec 2018 01:11:06 GMT):
and does blockevent received() happens only when the channel has an blockevent? if that is true, is there way to listen entire channel where peer have joined?

KenvinNguyen (Wed, 12 Dec 2018 03:55:52 GMT):
hi guys

KenvinNguyen (Wed, 12 Dec 2018 03:56:18 GMT):
how do I get the current block hash with java sdk based on transaction id

KenvinNguyen (Wed, 12 Dec 2018 03:57:37 GMT):
after I use queryByChainCode(..) then I got a collection of ProposalResponse, then I get the transaction from ProposalResponse. after that I use channelClient.queryByTransactionId(transactionId) but I got error not entry found in my channel

KenvinNguyen (Wed, 12 Dec 2018 03:58:43 GMT):
I also use channel.queryBlockByTransactionID(transactionId) to get blockinfo, but I got the same error

doyajii1 (Wed, 12 Dec 2018 04:26:19 GMT):
@KenvinNguyen i might be wrong but maybe you are querying block info to different channel? I had similar issue, where blocklistener was listening different channel while chaincode produced block on the other channel i initialized with.

KenvinNguyen (Wed, 12 Dec 2018 04:28:56 GMT):
thanks for your answer @doyajii1 , but I just have only 1 channel on my network, I also check the channel that I had query too

AndresMartinezMelgar.itcl (Wed, 12 Dec 2018 07:22:45 GMT):
How can I navigate the ledger? It is mainly to see how it is. I know how to look at the current block, see its previous hash and its own, but do not go backwards

ShobhitSrivastava (Wed, 12 Dec 2018 07:38:06 GMT):
Hey @rickr ..Once I migrate from sdk1.2 to 1.3 . There is one added check for Enrollment which happen in IdentityFactory.java class. I am not changing my way of creating SDKUser and creating the way it was in 1.2. But now in 1.3 I get "Invalid enrollment. Expected either X509Enrollment or IdemixEnrollment." exception. How should I create SDKuser to have either X509Enrollment or IdemixEnrollment enrollment?

anjalinaik (Wed, 12 Dec 2018 08:39:55 GMT):
If there is an AND endorsment policy for a 2 org[2 peer/org] , and if one of the peer couchdb is compromised, will the blockchain allow any further transactions?

ShobhitSrivastava (Wed, 12 Dec 2018 08:46:01 GMT):
@anjalinaik If any one couch db is not up you will not be able get endorsement and transaction wont be committed. You will see the logs in peer of endorsement failure

anjalinaik (Wed, 12 Dec 2018 08:50:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MKmENB3YiDCp5dPuL) @ShobhitSrivastava suppose the couch db has been tampered from UI, then?

ShobhitSrivastava (Wed, 12 Dec 2018 10:12:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rYKpJj4SYnDymGWxX) @anjalinaik yeah I tried that also. In that case newer trnxs are getting committed. Ideally in production These UI of couch should not be accessible and if it is, this should have restricted usage. However if you will search for some txns which are deleted from UI and need some modification, in that case endorsement won't be met

anjalinaik (Wed, 12 Dec 2018 10:29:04 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Xvz57RMMNXg2qFJZo) @ShobhitSrivastava exactly my point..in my understanding if one of the couchdb is tampered, then none of the transactions should occur. But its the other way around

ShobhitSrivastava (Wed, 12 Dec 2018 11:09:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9iqPSe2QGDTRGRp4Y) @anjalinaik yes, you are right. Ideally what everyone thinks that if you delete one entry in a block all there will not be any new transaction as previous block has got corrupted

ShobhitSrivastava (Wed, 12 Dec 2018 11:11:27 GMT):
but deleting txns from UI does not delete the txns from block. If you clear the data directory of couch of a peer. And restart the peer and couch. Those entries will again come.

anjalinaik (Wed, 12 Dec 2018 11:14:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CzQ9zftksa37poWqQ) @ShobhitSrivastava the last point which you made is putting the peer down and then bringing it back again and joining the channel, therefore it retireves blocks from other peers, correct?

anjalinaik (Wed, 12 Dec 2018 11:18:02 GMT):
so , if we have to prove tamper proof ability of fabric , how do we do it?

ShobhitSrivastava (Wed, 12 Dec 2018 11:29:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Xxne4byEjkZzjiLaF) @anjalinaik I think it fetches from all the peers joined on a channel(from knowledge of gossip protocol). Measures to run ledger in restricted environment and at no cost reaveal this UI of couch. Then without endorsement deleting a data or modifying is not possible. For more details may be @rick or @dave.enyeart can provide more update.Thanks

ShobhitSrivastava (Wed, 12 Dec 2018 11:40:14 GMT):
Hey @anjalinaik . I found the same ques I asked 2 months back. Please find the @dave.enyeart answer as below " dave.enyeart October 24, 2018 3:38 PM Clients send proposals to multiple peers and check consistency of results. If one peer doesn't match, clients won't trust that peer anymore and will not go to it anymore. Doing a verification of entire chain for each transaction is prohibitively expensive. You can do a verification of peer's blockchain using external tools instead. Think of statedb as a cache. If it's data is in doubt you can drop statedb and it will be rebuilt from the blockchain automatically upon peer restart. But I'd recommend lock down couchdb by not exposing couchdb port beyond the peer's docker network and have peer use username/password to ensure it cannot be tampered by external users in the first place."

anjalinaik (Wed, 12 Dec 2018 11:41:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DXm7FueN9D9RAnW6B) @ShobhitSrivastava appreciate your help..thankyou.

Aschi (Wed, 12 Dec 2018 12:59:52 GMT):
Has joined the channel.

Aschi (Wed, 12 Dec 2018 13:30:14 GMT):
Hello, I'm trying to connect to java sdk to a 1.3 fabric network but im stuck on the eventhub and keep getting the following error: `2018-12-12 13:37:17.920 WARN 26841 --- [ault-executor-0] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub01, channelName: mychannel, url: grpc://localhost:7053} terminated is false shutdown is false, retry count 351 has error UNAVAILABLE: Network closed for unknown reason.` If I check how I did it in NodeJS I notice that you need to add the eventhub to the peer ( eventhub = channel.newChannelEventHub(peer) ), how can I do this in Java?

aatkddny (Wed, 12 Dec 2018 13:44:46 GMT):
isn't the eventhub deprecated in 1.3?

Aschi (Wed, 12 Dec 2018 13:49:47 GMT):
How do I create my channel then?

Aschi (Wed, 12 Dec 2018 13:49:47 GMT):
How do I get my channel then?

aatkddny (Wed, 12 Dec 2018 13:56:12 GMT):
Well my code's not as new as it could be, but I do this: `channel = client.loadChannelFromConfig(name, org.getNetworkConfig());` where `org.getNetworkConfig()` returns a cached `org.hyperledger.fabric.sdk.NetworkConfig`

aatkddny (Wed, 12 Dec 2018 13:56:12 GMT):
Well my code's not as new as it could be, but I do this: `channel = client.loadChannelFromConfig(name, org.getNetworkConfig());` where `org.getNetworkConfig()` returns a cached `org.hyperledger.fabric.sdk.NetworkConfig` that in one case I build myself from saved channel definition information and in the other I pull from the cloud provider that's hosting the network. Saved duplication and simplified vs manually joining all the peers and all that good stuff.

Aschi (Wed, 12 Dec 2018 14:15:40 GMT):
Thanks!

rickr (Wed, 12 Dec 2018 14:35:15 GMT):
@doyajii1 no way to unregistered multiple blockhandlers .. I wonder why you need to have more than one. I don't understand your second question. You get a blockevent from the Peer for each block that is committed to the channel.

rickr (Wed, 12 Dec 2018 14:38:18 GMT):
@AndresMartinezMelgar.itcl look for blockWalker in End2endIT.java for traversing the blocks in the ledger

rickr (Wed, 12 Dec 2018 14:42:18 GMT):
@Aschi EventHubs are gone in Fabric1.3 They're replaced by PeerEventingSevice see PeerRole .EVENT_SOURCE role when add a peer to a channel to get events in almost the very same way as with eventhubs.

Aschi (Wed, 12 Dec 2018 14:54:51 GMT):
@rickr Thank you so much!

alek (Wed, 12 Dec 2018 15:16:28 GMT):
Guys, i am trying to install and instantiate chaincode via java sdk and i am getting `java.lang.IllegalArgumentException: The proposal responses have 0 inconsistent groups with 2 that are invalid. Expected all to be consistent and none to be invalid.` I have one organization with `admin1` set us admin. chaincodeendorsementpolicy.yaml looks like this: ``` identities: # list roles to be used in the policy admin1: {"role": {"name": "admin", "mspId": "Org1MSP"}} # admin role. policy: # the policy .. could have been flat but show grouping. 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - 1-of: - signed-by: "admin1" ```

alek (Wed, 12 Dec 2018 15:16:28 GMT):
Guys, i am trying to install and instantiate chaincode via java sdk and i am getting `java.lang.IllegalArgumentException: The proposal responses have 0 inconsistent groups with 2 that are invalid. Expected all to be consistent and none to be invalid.` I have one organization with `admin1` set us admin. chaincodeendorsementpolicy.yaml looks like this: ``` identities: # list roles to be used in the policy admin1: {"role": {"name": "admin", "mspId": "Org1MSP"}} # admin role. policy: # the policy .. could have been flat but show grouping. 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - 1-of: - signed-by: "admin1" ```

alek (Wed, 12 Dec 2018 15:16:28 GMT):
Guys, i am trying to install and instantiate chaincode via java sdk and i am getting `java.lang.IllegalArgumentException: The proposal responses have 0 inconsistent groups with 2 that are invalid. Expected all to be consistent and none to be invalid.` I have one organization with `admin1` set us admin. chaincodeendorsementpolicy.yaml looks like this: ``` identities: # list roles to be used in the policy admin1: {"role": {"name": "admin", "mspId": "Org1MSP"}} # admin role. policy: # the policy .. could have been flat but show grouping. 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - 1-of: - signed-by: "admin1" ``` Do you have an idea what cause groups to be invalid ?

alek (Wed, 12 Dec 2018 16:01:00 GMT):
Just for these who will encounter such exception, it can probably be caused by multiple issues but in my case some of external go package were missing

SandySun2000 (Thu, 13 Dec 2018 01:17:00 GMT):
Failed query proposal from peer (name: fabric-peer-org1-31923a, status: FAILURE, message: Sending proposal to fabric-peer-org1-31923a failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=io.grpc.netty.NettyClientTransport$3: Frame size 5095397 exceeds maximum: 4194304. , cause=null}

SandySun2000 (Thu, 13 Dec 2018 01:17:09 GMT):
Have you seen the above error before?

doyajii1 (Thu, 13 Dec 2018 02:10:17 GMT):
@rickr Thank you for your reply, and sorry with confusing question. I was trying to see all the block events happening at peer A, while peer A is joined to five different channels. In this case, don't I need to initialize/register block listener(5 block listener) for each channel?

KenvinNguyen (Thu, 13 Dec 2018 06:59:51 GMT):
how can I calculate current hash based on number block, previoushash, datahash in Java pls?

Aschi (Thu, 13 Dec 2018 07:40:08 GMT):
@rickr I still keep getting the error with adding a role ` 2018-12-13 08:35:48.742 WARN 30156 --- [ault-executor-2] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub, channelName: mychannel, url: grpc://localhost:7053} terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception. 2018-12-13 08:35:48.742 WARN 30156 --- [ault-executor-2] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub, channelName: mychannel, url: grpc://localhost:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233) at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:834) }. Description io exception `

Aschi (Thu, 13 Dec 2018 07:40:08 GMT):
@rickr I still keep getting the error with adding a role ` 2018-12-13 08:35:48.742 WARN 30156 --- [ault-executor-2] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub, channelName: mychannel, url: grpc://localhost:7053} terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception. 2018-12-13 08:35:48.742 WARN 30156 --- [ault-executor-2] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub, channelName: mychannel, url: grpc://localhost:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233) at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:834) }. Description io exception `

Aschi (Thu, 13 Dec 2018 07:40:08 GMT):
@rickr I still keep getting the error with adding a role ` 2018-12-13 08:35:48.742 WARN 30156 --- [ault-executor-2] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub, channelName: mychannel, url: grpc://localhost:7053} terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception. 2018-12-13 08:35:48.742 WARN 30156 --- [ault-executor-2] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 2, name: eventhub, channelName: mychannel, url: grpc://localhost:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method) at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233) at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223) at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:583) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:834) }. Description io exception `

AndresMartinezMelgar.itcl (Thu, 13 Dec 2018 09:27:12 GMT):
Hello, is there a base project on which to work? I have only found 1 "blockchain-application-using-fabric-java-sdk-master" and I would like to have others to be able to contrast

rickr (Thu, 13 Dec 2018 15:03:13 GMT):
@SandySun2000 you need to up the server grpc frame or the SDKs Look at the README.md issues

rickr (Thu, 13 Dec 2018 15:04:30 GMT):
@doyajii1 yes -- but you could use the same blocklistener handler routine.

rickr (Thu, 13 Dec 2018 15:07:02 GMT):
@KenvinNguyen https://github.com/hyperledger/fabric-sdk-java/blob/b9f61bd903f1a67c3608da7da515e2a09f3ae499/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L934 ?

rickr (Thu, 13 Dec 2018 15:08:14 GMT):
@Aschi and no surprise .. why are you still adding and EventHub ? Their gone :)

rickr (Thu, 13 Dec 2018 15:08:14 GMT):
@Aschi and no surprise .. why are you still adding and EventHub ? Theyre gone :)

rickr (Thu, 13 Dec 2018 15:08:14 GMT):
@Aschi and no surprise .. why are you still adding and EventHub ? They're gone :)

SandySun2000 (Thu, 13 Dec 2018 16:33:30 GMT):
@rickr Thanks!

SandySun2000 (Thu, 13 Dec 2018 19:24:46 GMT):
@rickr Could you please provide me the full link for the README.md file?

rickr (Thu, 13 Dec 2018 19:44:18 GMT):
https://github.com/hyperledger/fabric-sdk-java#grpc-message-frame-size-exceeds-maximum

SandySun2000 (Thu, 13 Dec 2018 19:48:49 GMT):
@rickr Thanks again

doyajii1 (Thu, 13 Dec 2018 22:57:42 GMT):
@rickr thank you! :)

anjalinaik (Fri, 14 Dec 2018 06:04:19 GMT):
Hi everyone.. i want to reset my network, so i deleted all the volumes,images created by chaincode container, crypto-config files ,pruned the network. Still my new network throws MSP not found error for the previous configuration. May i please know what am i missing here?

anjalinaik (Fri, 14 Dec 2018 06:04:19 GMT):
Hi everyone.. i want to reset my network, so i deleted all the volumes,images created by chaincode container, crypto-config files ,pruned the network. Still my new network throws MSP not found error for the previous configuration. May i please know what am i missing here?``` 2018-12-14 06:17:53.722 UTC [cauthdsl] deduplicate -> ERRO 54a Principal deserialization failure (the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.org1.com")) ``` my new network doesn't even define org1

GuillaumeTong (Mon, 17 Dec 2018 06:33:52 GMT):
Has joined the channel.

Thomas-tuo (Mon, 17 Dec 2018 06:51:17 GMT):
Has joined the channel.

GuillaumeTong (Mon, 17 Dec 2018 10:29:23 GMT):
Hello, I am trying to figure out how to use the Idemix features, and as far as I understand, the java SDK is the only place where the minimal product was implemented. Currently, I am trying to do something like this: ``` HFCAClient hfcaClient; Enrollment normalEnrollReturn = null; Enrollment idemixEnrollReturn = null; ```

GuillaumeTong (Mon, 17 Dec 2018 10:29:23 GMT):
Hello, I am trying to figure out how to use the Idemix features, and as far as I understand, the java SDK is the only place where the minimal product was implemented. Currently, I am trying to do something like this: ``` HFCAClient hfcaClient; Enrollment normalEnrollReturn = null; Enrollment idemixEnrollReturn = null; hfcaClient = HFCAClient.createNewInstance("http://192.168.***.***:7054",null); CryptoPrimitives crypto = new CryptoPrimitives(); crypto.init(); hfcaClient.setCryptoSuite(crypto); normalEnrollReturn = hfcaClient.enroll("admin","pass"); idemixEnrollReturn = hfcaClient.idemixEnroll(normalEnrollReturn,"org1MSP");```

GuillaumeTong (Mon, 17 Dec 2018 10:34:11 GMT):
But I get some errors even when I stop at the x509 enrollment, here is a fragment of the error message: ```ERROR 240 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.http.converter.HttpMessageConversionException: Type definition error: [simple type, class org.bouncycastle.math.ec.WNafL2RMultiplier]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.bouncycastle.math.ec.WNafL2RMultiplier and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.hyperledger.fabric.sdk.identity.X509Enrollment[0]->org.hyperledger.fabric.sdk.identity.X509Enrollment["key"]->org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey["parameters"]->org.bouncycastle.jce.spec.ECParameterSpec["curve"]->org.bouncycastle.math.ec.custom.sec.SecP256R1Curve["multiplier"])] with root cause com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.bouncycastle.math.ec.WNafL2RMultiplier and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.hyperledger.fabric.sdk.identity.X509Enrollment[0]->org.hyperledger.fabric.sdk.identity.X509Enrollment["key"]->org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey["parameters"]->org.bouncycastle.jce.spec.ECParameterSpec["curve"]->org.bouncycastle.math.ec.custom.sec.SecP256R1Curve["multiplier"]) at [........]```

GuillaumeTong (Mon, 17 Dec 2018 10:37:56 GMT):
What is the simplest way to make and idemix enrollment using the ca url, username and password?

GuillaumeTong (Mon, 17 Dec 2018 10:37:56 GMT):
What is the simplest way to make an idemix enrollment using the ca url, username and password?

rebuild (Mon, 17 Dec 2018 12:46:32 GMT):
Has joined the channel.

rickr (Mon, 17 Dec 2018 14:01:30 GMT):
@GuillaumeTong https://github.com/hyperledger/fabric-sdk-java/blob/5b0239c1690d3dc97f7a3664f7788018607a84e4/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIdemixIT.java :wink:

IgorSim (Mon, 17 Dec 2018 15:07:47 GMT):
hi, any plans to support improved 'programming model' in java SDK? As we can see this will be supported only in NodeJs starting from 1.4 @rickr ?

versus (Mon, 17 Dec 2018 15:11:25 GMT):
Has joined the channel.

rickr (Mon, 17 Dec 2018 15:27:15 GMT):
Right now, I have no plans to go there myself.

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli enrollment is a one-line command involving just the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when parsing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration?

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli, enrollment is a one-line command involving just the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when parsing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration?

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli, enrollment is a one-line command involving just the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when serializing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration?

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli, enrollment can be as simple as a one-line command involving the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when serializing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration?

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli, enrollment can be as simple as a one-line command involving the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when serializing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration?

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli, enrollment can be as simple as a one-line command involving the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when serializing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration? ------------- Edit: Never mind, my previous error seems to have been caused by me trying to fit the enrollment into an array, then print it. However, I am still facing this error: ```org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential [...] Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://192.168.18.57:7054 failed request body {"request":null}. Response: 404 page not found [...]``` The X509 enrollment succeeds, so I'm sure the CA URL and connection is correct. I can see the x509 enrollment showing up in my CA's log but nothing shows up about the idemix enrollment.

GuillaumeTong (Tue, 18 Dec 2018 03:12:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PavzBMciYHzfCdbTP) @rickr Thanks for the tip, but this test involves a very large number of different classes and files, and (from my current understanding) requires setting up config files as well as actual nodes on the network. Before moving on to that I would like to test smaller pieces of code with just the CA running. In the cli, enrollment can be as simple as a one-line command involving the ca's url, a username and a password. I am also quite concerned by the error I am getting, which seems to indicate an error when serializing the response from the CA (feel free to correct me if I am wrong). Should i specify a specific crypto configuration? ------------- Edit: Never mind, my previous error seems to have been caused by me trying to fit the enrollment into an array, then print it. However, I am still facing this error: ```org.hyperledger.fabric_ca.sdk.exception.EnrollmentException: Failed to get Idemix credential [...] Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://192.168.18.57:7054 failed request body {"request":null}. Response: 404 page not found [...]``` The X509 enrollment succeeds, so I'm sure the CA URL and connection is correct. I can see the x509 enrollment showing up in my CA's log but nothing shows up about the idemix enrollment. My current CA version is 1.4.0-snapshot-236dec5.

giacomo.minighin (Tue, 18 Dec 2018 09:35:58 GMT):
why `org.hyperledger.fabric.protos.ledger.rwset.kvrwset.KvRwset.KVWrite` is a key value object and not a list?

ShobhitSrivastava (Tue, 18 Dec 2018 12:30:04 GMT):
Hi @rick. I was using the multi org endorsement code from your github link. But one issue in that is it only works if the creator of channel suppose Org1Msp is the request client and needs endorsement for peers from its own and peers from other organisation However if I do it otherwise like send a request from Org2Msp for endorsement to Org1 peer, it gives access denied issue. How will this thing work in production, as there would be possibility of twp Orgs requires endorsement , if they are in same channel

ShobhitSrivastava (Tue, 18 Dec 2018 12:30:04 GMT):
Hi @rick. I was using the multi org endorsement code from your github link. But one issue in that is it only works if the creator of channel suppose Org1Msp is the request client and needs endorsement for peers from its own and peers from other organisation However if I do it otherwise like send a request from Org2Msp for endorsement to Org1 peer, it gives access denied issue. How will this thing work in production, as there would be possibility of twp Orgs requires endorsement , if they are in same channel...adding @rickr @dave.enyeart

iramiller (Tue, 18 Dec 2018 15:44:34 GMT):
Has joined the channel.

gravity (Tue, 18 Dec 2018 15:48:01 GMT):
HI all I'm trying to instantiate a chaincode with the endorsement policy taken from there: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.3/src/test/fixture/sdkintegration/chaincodeendorsementpolicy.yaml

gravity (Tue, 18 Dec 2018 15:48:01 GMT):
HI all I'm trying to instantiate a chaincode with the endorsement policy taken from there: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.3/src/test/fixture/sdkintegration/chaincodeendorsementpolicy.yaml but getting the next error: ``` peer0 | 2018-12-18 15:41:19.458 UTC [gossip/privdata] StoreBlock -> INFO 108 [channel15451475883920] Received block [2] from buffer peer0 | 2018-12-18 15:41:19.460 UTC [vscc] Validate -> ERRO 109 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer0 | 2018-12-18 15:41:19.460 UTC [committer/txvalidator] validateTx -> ERRO 10a VSCCValidateTx for transaction txId = 6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f returned error: validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer0 | 2018-12-18 15:41:19.460 UTC [committer/txvalidator] Validate -> INFO 10b [channel15451475883920] Validated block [2] in 1ms peer0 | 2018-12-18 15:41:19.461 UTC [valimpl] preprocessProtoBlock -> WARN 10c Channel [channel15451475883920]: Block [2] Transaction index [0] TxId [6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] peer1 | 2018-12-18 15:41:19.470 UTC [gossip/privdata] StoreBlock -> INFO 111 [channel15451475883920] Received block [2] from buffer peer2 | 2018-12-18 15:41:19.470 UTC [gossip/privdata] StoreBlock -> INFO 100 [channel15451475883920] Received block [2] from buffer peer2 | 2018-12-18 15:41:19.471 UTC [vscc] Validate -> ERRO 101 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer1 | 2018-12-18 15:41:19.471 UTC [vscc] Validate -> ERRO 112 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer1 | 2018-12-18 15:41:19.471 UTC [committer/txvalidator] validateTx -> ERRO 113 VSCCValidateTx for transaction txId = 6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f returned error: validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer1 | 2018-12-18 15:41:19.472 UTC [committer/txvalidator] Validate -> INFO 114 [channel15451475883920] Validated block [2] in 1ms peer2 | 2018-12-18 15:41:19.471 UTC [committer/txvalidator] validateTx -> ERRO 102 VSCCValidateTx for transaction txId = 6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f returned error: validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer2 | 2018-12-18 15:41:19.471 UTC [committer/txvalidator] Validate -> INFO 103 [channel15451475883920] Validated block [2] in 1ms peer2 | 2018-12-18 15:41:19.472 UTC [valimpl] preprocessProtoBlock -> WARN 104 Channel [channel15451475883920]: Block [2] Transaction index [0] TxId [6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] peer1 | 2018-12-18 15:41:19.472 UTC [valimpl] preprocessProtoBlock -> WARN 115 Channel [channel15451475883920]: Block [2] Transaction index [0] TxId [6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] ``` fabric 1.3.0, java sdk 1.3.0

gravity (Tue, 18 Dec 2018 15:48:01 GMT):
HI all I'm trying to instantiate a chaincode with the endorsement policy taken from there: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.3/src/test/fixture/sdkintegration/chaincodeendorsementpolicy.yaml but getting the next error: ``` peer0 | 2018-12-18 15:41:19.458 UTC [gossip/privdata] StoreBlock -> INFO 108 [channel15451475883920] Received block [2] from buffer peer0 | 2018-12-18 15:41:19.460 UTC [vscc] Validate -> ERRO 109 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer0 | 2018-12-18 15:41:19.460 UTC [committer/txvalidator] validateTx -> ERRO 10a VSCCValidateTx for transaction txId = 6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f returned error: validation of endorsement policy for chaincode common1545147592248 in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 4 peer0 | 2018-12-18 15:41:19.460 UTC [committer/txvalidator] Validate -> INFO 10b [channel15451475883920] Validated block [2] in 1ms peer0 | 2018-12-18 15:41:19.461 UTC [valimpl] preprocessProtoBlock -> WARN 10c Channel [channel15451475883920]: Block [2] Transaction index [0] TxId [6b9de82e8ddeb1017e16d243d990e9e819879c64438167f6498020da8f33ba9f] marked as invalid by committer. Reason code [ENDORSEMENT_POLICY_FAILURE] ``` fabric 1.3.0, java sdk 1.3.0

gravity (Tue, 18 Dec 2018 15:50:09 GMT):
what does it mean `unknown wire type 4`?

rickr (Tue, 18 Dec 2018 16:07:16 GMT):
@GuillaumeTong I would relook at the sample just to see if you're following the same pattern. If you still don't see the issue probably put both JSDK and Fabric CA logging on trace level and use https://ctrlv.it/ to paste them both and report it on the #fabric-ca channel so they look at why it's getting that return.

rickr (Tue, 18 Dec 2018 16:08:28 GMT):
@ShobhitSrivastava I thought it the sample went both ways.

rickr (Tue, 18 Dec 2018 16:16:00 GMT):
@gravity seems to be used in https://github.com/hyperledger/fabric-sdk-java/blob/5b0239c1690d3dc97f7a3664f7788018607a84e4/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L407

IgorSim (Wed, 19 Dec 2018 07:08:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5BZo5M2LdoZKEsB8f) @rickr tnx for answer, we're planning new project and some of programming model constructs sounds interesting and fit nice with new requirements, therefore we wanted to give them a try. But, our main knowledge is in Java SDK which we already(successfully) used for one project, deployed in production. Is there any document regarding requirements for programming model, what does it mean from SDK point of view to support this model?

NickXie (Wed, 19 Dec 2018 07:13:03 GMT):
Has joined the channel.

giacomo.minighin (Wed, 19 Dec 2018 08:49:15 GMT):
do you know why I receive 2 events from `org.hyperledger.fabric.sdk.Channel.registerBlockListener(BlockListener listener)`? could be because I have 2 peers on my network?

giacomo.minighin (Wed, 19 Dec 2018 08:49:15 GMT):
do you know why I receive 2 events from `org.hyperledger.fabric.sdk.Channel.registerBlockListener(BlockListener listener)`? could it be because I have 2 peers on my network?

ShobhitSrivastava (Wed, 19 Dec 2018 09:50:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rxCEWBpp8bEgAjnYk) @rickr @rickr . It worked for one way only for me. If you say it should work both ways. May be something wrong in code itself. I got the access denied when Org2 tried to get endorsement from Org1(provided Org1 created the channel).

GuillaumeTong (Wed, 19 Dec 2018 10:09:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cdeKxiTZYBxJBN3z7) @rickr Thanks for the reply, It turns out my problem was coming from my fabric-ca-server binary, which would diplay v1.4.0-rc1 as its version but actually behaved as an older version where the idemix routes were disabled.

rickr (Wed, 19 Dec 2018 15:07:30 GMT):
@IgorSim Programming model questions would best be answered on #fabric-sdk-node or #composer channels.

rickr (Wed, 19 Dec 2018 15:07:30 GMT):
@IgorSim Programming model questions would best be asked on #fabric-sdk-node or #composer channels.

rickr (Wed, 19 Dec 2018 15:08:14 GMT):
@giacomo.minighin yes you get a notification for each

rickr (Wed, 19 Dec 2018 15:09:12 GMT):
@ShobhitSrivastava I have a hard time imagining it's the SDK the client doesn't do the enforcing

rickr (Wed, 19 Dec 2018 15:09:12 GMT):
@ShobhitSrivastava I have a hard time imagining it's the SDK the client doesn't do the enforcing of policies

tballast (Wed, 19 Dec 2018 15:47:25 GMT):
Does the comcept of having a single client performing actions for multiple organizations make sense, or should each organization have it's own client? For example, in the End2EndIT.java there is only one HFClient object but it works on behalf of both organizations, though each org has a separate channel and separate peers and they are not mixed. Is this just for illustration purposes?

tballast (Wed, 19 Dec 2018 15:50:45 GMT):
I suppose that if two organizations are communicating on the same channel, each one should be running it's own client, or at very minumum a client object per org?

rickr (Wed, 19 Dec 2018 15:53:24 GMT):
@tballast Well in reality, I would find it highly unlikely that even in a single application instance running on behave of an organization would be using more than one client or organization. I would think the biggest use case is each application instance is just using one organization .

darapich92 (Thu, 20 Dec 2018 08:29:14 GMT):
Hello everybody, I have one question relates to the propose message that is sent by client to endorsers. The propose message include and tx=. at this point, can anyone can answer me what is "txpayload"? even i read the fabric doc, i still don't understand. I appreciate for your answers. thank you.

schinivision (Thu, 20 Dec 2018 09:25:53 GMT):
Has joined the channel.

schinivision (Thu, 20 Dec 2018 09:59:13 GMT):
Hello there... I hope someone can help me out... I am a little bit stuck with the java sdk... I am trying to connect to a local running Hyperledger Fabric using this code. val hyperledgerClient = HFClient.createNewInstance val cryptoSuite = CryptoSuite.Factory.getCryptoSuite hyperledgerClient.setCryptoSuite(cryptoSuite) hyperledgerClient.setUserContext(user1) // admin loading certs created by configtxgen val channel = hyperledgerClient.newChannel("channelname") // TODO check if channel is null channel.addPeer(hyperledgerClient.newPeer("peer0", "grpc://172.16.1.123:7051")) channel.addOrderer(hyperledgerClient.newOrderer("orderer", "grpc://172.16.1.123:7050")) channel.initialize I fail to initialize with an error on the client -> java.io.IOException: An established connection was aborted by the software in your host machine The connection it self reaches the peer server but the peer server logs this error TLS handshake failed with error tls: first record does not look like a TLS handshake {"server": "PeerServer", "remote address": "SomeIp:49308"} The user loads the admin certi

schinivision (Thu, 20 Dec 2018 09:59:13 GMT):
Hello there... I hope someone can help me out... I am a little bit stuck with the java sdk... I am trying to connect to a local running Hyperledger Fabric using this code. val hyperledgerClient = HFClient.createNewInstance val cryptoSuite = CryptoSuite.Factory.getCryptoSuite hyperledgerClient.setCryptoSuite(cryptoSuite) hyperledgerClient.setUserContext(user1) // admin loading certs created by configtxgen val channel = hyperledgerClient.newChannel("channelname") // TODO check if channel is null channel.addPeer(hyperledgerClient.newPeer("peer0", "grpc://172.16.1.123:7051")) channel.addOrderer(hyperledgerClient.newOrderer("orderer", "grpc://172.16.1.123:7050")) channel.initialize I fail to initialize with an error on the client -> java.io.IOException: An established connection was aborted by the software in your host machine The connection it self reaches the peer server but the peer server logs this error TLS handshake failed with error tls: first record does not look like a TLS handshake {"server": "PeerServer", "remote address": "SomeIp:49308"} The user loads the admin certificate and the key from the keystore generated by the configtxgen... do I also have to add the TLS certs. and if so how and where?

ShobhitSrivastava (Thu, 20 Dec 2018 10:19:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7cfE2HdkuWSqRwEtW) @rickr Rick. I may be not clear with my question? Stating again . I have one channel created by Org1 having mspId as Org1MSP. Second Org which is Org2 have mspId as Org2Msp. If peer of org1 as PeerOrg1 and peer of org2 as PeerOrg2 joins the channel. Now when if we make client using Org1 crypto material and needs endorsement from peer1 and peer2. It works. However If I create client using Org2 crypto materials need endorsement from Peer1 and peer2. I get error from peer1 as “Sending proposal to peer0.org1.example.com failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org2MSP], cause=null}” Is this correct behavior. Will I not get endorsement from peer1 if peer2 from org2 needs endorsement from peer1 of Org1(The creator of channel).

ShobhitSrivastava (Thu, 20 Dec 2018 12:42:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RRus77vwuxwhTcFsF) Hey @rickr . It is working. Sorry for asking. It is working both ways

rickr (Thu, 20 Dec 2018 16:10:51 GMT):
@schinivision IMO take the to get the End2endIT test running with TLS and see what is they do. Best follow in a debugger - take the time a day or so and will probably go a long way to making things easier. Your url isn't even grpcs and your server seems to want TLS .

mrudav.shukla (Thu, 20 Dec 2018 20:08:03 GMT):
How are identities managed while using Java sdk? For example, when we use composer, it gives back a card that is stored into user

mrudav.shukla (Thu, 20 Dec 2018 20:08:03 GMT):
How are identities managed while using Java sdk? For example, when we use composer, it gives back a card that is stored into user's wallet in the composer server and accessed via jwt auth. How are identities obtained using Java sdk and how are they managed for further transactions?

rickr (Thu, 20 Dec 2018 21:16:37 GMT):
The JSDK uses what Fabric uses. As a user you set at user context the key attributes of that which identifies an identity is the MSP ID and x509 Certificate or your derived idemix credentials.

httran88 (Fri, 21 Dec 2018 00:57:23 GMT):
please no composer references in java

httran88 (Fri, 21 Dec 2018 00:57:39 GMT):
play by composer, die by composer

mrudav.shukla (Fri, 21 Dec 2018 05:11:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=aQRXL47ccCzS7JJtQ) @httran88 :smiley:

mrudav.shukla (Sat, 22 Dec 2018 16:41:20 GMT):
Hi, I've cloned Java SDK repository and I'm trying to go through the code. However, the jar for "org.hyperledger.fabric.protos" seems to be missing. Am I doing it wrong or is there any issue?

ApurvTandon (Sun, 23 Dec 2018 20:11:51 GMT):
Hii can anyone tell me what is the sample result we get from getTransaction(txId) data returned from this function

IgorSim (Mon, 24 Dec 2018 06:58:37 GMT):
Hi, default CA has empty string for its name. But, in SDK, HFCAClient.createNewInstance(name, url, properties) throws an exception if name is empty. Is there any special reason why implementation doesn't allow to pass empty string when CA name is indeed empty string?

mrudav.shukla (Mon, 24 Dec 2018 08:45:22 GMT):
Are there any other tutorials/guides except for End2EndIT.java to learn and implement on java-sdk?

amolpednekar (Mon, 24 Dec 2018 10:06:27 GMT):
@mrudav.shukla I'd highly recommend referring to the IntegrationTests and they are written by the SDK developler himself, but if you want a guide on how to create a proper wrapper, you could take a look at this: https://github.com/IBM/blockchain-application-using-fabric-java-sdk

amolpednekar (Mon, 24 Dec 2018 10:06:27 GMT):
@mrudav.shukla I'd highly recommend referring to the IntegrationTests as they are written by the SDK developler himself (and they cover almost every feature of the SDK, but if you want a guide on how to create a proper wrapper, you could take a look at this: https://github.com/IBM/blockchain-application-using-fabric-java-sdk

amolpednekar (Mon, 24 Dec 2018 10:06:27 GMT):
@mrudav.shukla I'd highly recommend referring to the IntegrationTests as they are written by the SDK developler himself (and they cover almost every feature of the SDK), but if you want a guide on how to create a proper wrapper, you could take a look at this: https://github.com/IBM/blockchain-application-using-fabric-java-sdk

amolpednekar (Mon, 24 Dec 2018 10:06:27 GMT):
@mrudav.shukla I'd highly recommend referring to the IntegrationTests as they are written by the SDK developler himself (and they cover almost every feature of the SDK), but if you want a guide on how to create a wrapper, you could take a look at this: https://github.com/IBM/blockchain-application-using-fabric-java-sdk

amolpednekar (Mon, 24 Dec 2018 10:07:28 GMT):

amolpednekar (Mon, 24 Dec 2018 10:07:28 GMT):

anjalinaik (Mon, 24 Dec 2018 11:28:46 GMT):
Hi experts.. if we need to create a invoke request, do we need to redirect the request to only endorsing peers?

httran88 (Mon, 24 Dec 2018 20:43:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=7NQGZTkWHzBizpuLE) @mrudav.shukla there's no other better guide then reading the code itself and using copy and paste

halilkalkan (Tue, 25 Dec 2018 12:00:18 GMT):
Hi guys, have you ever tried a queue implementation for sdk, I have some issues with concurrent transactions so that I'm looking for solutions with queue so that each transaction should wait another to avoid conflictions.

halilkalkan (Tue, 25 Dec 2018 12:00:18 GMT):
Hi guys, have you ever tried a queue implementation for sdk, I have some issues with concurrent transactions so that I'm looking for solutions with queue so each transaction should wait another to avoid conflictions.

ShobhitSrivastava (Wed, 26 Dec 2018 09:44:43 GMT):

Audio record.mp3

IgorSim (Wed, 26 Dec 2018 21:13:32 GMT):
Guys, in HFCAClient.register() i don't see that caName is being used(for example like it is used in enroll method). How can i register user on CA that have multiple servers which means caName must be specified? Is this a bug?

yljgo (Thu, 27 Dec 2018 03:14:50 GMT):
Has joined the channel.

yljgo (Thu, 27 Dec 2018 03:16:00 GMT):
guys, how can I config channelclient connection pools using java sdk

anjalinaik (Thu, 27 Dec 2018 06:44:50 GMT):
Hi experts..if the endorsment policy is not satisfied then the block shouldnt be added to the chain, correct?However from below peer logs i see that the blocks are being added inspite of endorsement policy failure.Any explanation would be helpful. ``` org1peer2.1.t5ttto5ct9bp@CPU92 | 2018-12-27 06:13:57.935 UTC [committer/txvalidator] validateTx -> ERRO 019 VSCCValidateTx for transaction txId = 52e73a5c8f2d75062b6fe06e877559138a285aba5204466ca2dd40489c0088cb returned error: validation of endorsement policy for chaincode fabcarand in tx 48:0 failed: signature set did not satisfy policy org1peer2.1.t5ttto5ct9bp@CPU92 | 2018-12-27 06:14:05.253 UTC [gossip/privdata] StoreBlock -> INFO 01a [mychannel] Received block [49] from buffer ```

knagware9 (Thu, 27 Dec 2018 07:22:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x5TGrdNezh3g5gfZp) @anjalinaik you should ask question to only specific channel..please take care

anjalinaik (Thu, 27 Dec 2018 07:24:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9uYYT3H5HdGXBeY7N) @knagware9 sure will do. apologies

anjalinaik (Thu, 27 Dec 2018 12:01:56 GMT):
How to know if CompletableFuture channel.sendTransaction returns a valid block?

liaoruohuai (Tue, 01 Jan 2019 12:19:46 GMT):
Has joined the channel.

liaoruohuai (Tue, 01 Jan 2019 19:25:00 GMT):
Hello, seriously, When can we use fabric-java-sdk to interact with fabric 1.4.0 ? @rickr

romanyuen1001 (Wed, 02 Jan 2019 02:37:05 GMT):
Has joined the channel.

mbanerjee (Wed, 02 Jan 2019 19:33:36 GMT):
Has joined the channel.

nileshyjadhav (Wed, 02 Jan 2019 20:56:10 GMT):
Has joined the channel.

BingoYan (Thu, 03 Jan 2019 03:35:23 GMT):
Has joined the channel.

BingoYan (Thu, 03 Jan 2019 03:35:34 GMT):
hey my fab-friends , im just create a network that contain three Orgs which have three orderers and three peers , and I have complete my chaincode with Golang. But now, I want to create a Java project to deploy , query and invoke my chaincode, and I just visit the associate fabric-java-sdk on github, but that project is a little difficult . so I want a help about how to user fabric-java-sdk to config , deloy , query, invoke my network. Thanks!

BingoYan (Thu, 03 Jan 2019 03:50:49 GMT):
e\

xaviarias (Thu, 03 Jan 2019 11:03:25 GMT):
Has joined the channel.

xaviarias (Thu, 03 Jan 2019 11:12:51 GMT):
Hi, I also tried to deploy the Java chaincode example in fabric-samples but cannot find ant docs on how to deploy a JAR or class file

xaviarias (Thu, 03 Jan 2019 11:12:51 GMT):
Hi, I also tried to deploy the Java chaincode example in fabric-samples but cannot find ant docs on how to deploy a JAR or class file. Maybe I should post on #fabric-samples ?

aatkddny (Thu, 03 Jan 2019 12:23:51 GMT):
try #fabric-java-chaincode

nileshyjadhav (Fri, 04 Jan 2019 04:56:09 GMT):
Is there a priority in terms of feature implementation between Node SDK and Java SDK? Some of the new features are available only in Java SDK? Should we choose Java SDK or Node SDK?

StefanKosc (Fri, 04 Jan 2019 08:55:02 GMT):
Has joined the channel.

StefanKosc (Fri, 04 Jan 2019 08:55:21 GMT):
Hello, I tried to install and instantiate two chaincodes concurrently using locust, peer endorses install and instantiation proposals and then it fails on sending instantiate proposal to orderer, does anyone has an idea what might be happening?

StefanKosc (Fri, 04 Jan 2019 08:55:21 GMT):
Hello, I tried to install and instantiate two chaincodes concurrently using locust, peer endorses install and instantiation proposals and then it freezes and then timeouts on sending instantiate proposal to orderer, does anyone has an idea what might be happening?

StefanKosc (Fri, 04 Jan 2019 08:55:21 GMT):
Hello, I tried to install and instantiate two chaincodes concurrently using locust, peer endorses install and instantiation proposals and then it freezes and then timeouts on sending instantiate proposal to orderer, does anyone has an idea what might be happening? the result is that the system breaks and chaincodes cannot be installed and instantiated anymore

StefanKosc (Fri, 04 Jan 2019 08:55:21 GMT):
Hello, I tried to install and instantiate two chaincodes concurrently using locust, sdk freezes after sending instantiate proposals to orderer. In orderer logs it looks that it is ok and proposals have been endorsed but nothing happens in sdk and it freezes, any ideas what might be happening?

StefanKosc (Fri, 04 Jan 2019 08:55:21 GMT):
Hello, I tried to install and instantiate two chaincodes concurrently using locust, sdk freezes after sending instantiate proposals to orderer. In orderer logs it looks that everything is ok and proposals have been endorsed but nothing else happens in sdk, any ideas what might be happening?

adamhardie (Fri, 04 Jan 2019 15:00:28 GMT):
hey all, I have a running hyperledger with TLS enabled, everything is running fine on server (2x peer, 2x orderer) however when i try to connect a java sdk client, i am hitting the same errors as seen here https://stackoverflow.com/questions/53625506/hyperledger-fabric-java-sdk-use-grpcs-for-peer-and-orderer-connections

adamhardie (Fri, 04 Jan 2019 15:06:15 GMT):
hey all, I have a running hyperledger with TLS enabled. I have two peers running perfectly on server in docker containers, but I have problems connecting a Java client. However, when trying to get HfClient, I hit the same error found here: https://stackoverflow.com/questions/53625506/hyperledger-fabric-java-sdk-use-grpcs-for-peer-and-orderer-connections I have attempted to copy the sample found on the E2eIT : https://github.com/hyperledger/fabric-sdk-java/blob/6cdf8df902c47f8bcf47815206a5e61853f3a990/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L269 but still no luck

adamhardie (Fri, 04 Jan 2019 15:07:16 GMT):
The answer on the stackoverflow page says I should copy the pem certs from the server, but shouldnt the client be able to request their own?

adamhardie (Fri, 04 Jan 2019 15:27:02 GMT):
got it - String cert = "src/test/fixture/sdkintegration/e2e-2Orgs/FAB_CONFIG_GEN_VERS/crypto-config/peerOrganizations/DNAME/ca/ca.DNAME-cert.pem" .replaceAll("DNAME", domainName).replaceAll("FAB_CONFIG_GEN_VERS", FAB_CONFIG_GEN_VERS);

adamhardie (Fri, 04 Jan 2019 15:27:15 GMT):
so i need to give these to all clients who want to connect to the Org?

adamhardie (Fri, 04 Jan 2019 15:28:50 GMT):
from here : https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L

adamhardie (Fri, 04 Jan 2019 15:28:50 GMT):
from here : https://github.com/hyperledger/fabric-sdk-java/blob/6cdf8df902c47f8bcf47815206a5e61853f3a990/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L201

adamhardie (Fri, 04 Jan 2019 15:42:38 GMT):
for now ill strip out TLS as it doesnt seem very nice to use for client connections ..

ShajiThiyarathodi (Fri, 04 Jan 2019 20:20:37 GMT):
Has joined the channel.

viprat (Sun, 06 Jan 2019 18:21:27 GMT):
Has joined the channel.

NavjotSingh1 (Mon, 07 Jan 2019 05:38:40 GMT):
Has joined the channel.

HarshiChandraSekar (Mon, 07 Jan 2019 06:43:08 GMT):
Has joined the channel.

rangeshsripathi (Mon, 07 Jan 2019 10:11:18 GMT):
Has joined the channel.

rickr (Mon, 07 Jan 2019 14:57:02 GMT):
@IgorSim The end2endIT scenario has configured a default and specific CA name. https://github.com/hyperledger/fabric-sdk-java/blob/6cdf8df902c47f8bcf47815206a5e61853f3a990/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L170

rickr (Mon, 07 Jan 2019 14:59:00 GMT):
@anjalinaik You need to get endorsements from all organization's peers to satisfy the invocation endorsement policy.

rickr (Mon, 07 Jan 2019 15:02:50 GMT):
@halilkalkan The End2endIT shows waiting for transactions to complete on the peers before going on the next transactions by wait for the future to complete.

rickr (Mon, 07 Jan 2019 15:02:50 GMT):
@halilkalkan The End2endIT shows waiting for transactions to complete on the peers before going on the next transactions by wait for the future to complete. https://github.com/hyperledger/fabric-sdk-java/blob/6cdf8df902c47f8bcf47815206a5e61853f3a990/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L673

rickr (Mon, 07 Jan 2019 15:02:50 GMT):
@halilkalkan The End2endIT shows waiting for transactions to complete on the peers before going on the next transactions by waiting for the future to complete. https://github.com/hyperledger/fabric-sdk-java/blob/6cdf8df902c47f8bcf47815206a5e61853f3a990/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L673

rickr (Mon, 07 Jan 2019 15:06:34 GMT):
@liaoruohuai Yes, there were no features or api changes which relate to the client in Fabric 1.4 release. Should not be any problems using the SDK for 1.3 right now to connect to 1.4 Fabric Seriously :)

rickr (Mon, 07 Jan 2019 15:06:34 GMT):
@liaoruohuai Yes, there were no features or api changes which relate to the client in Fabric 1.4 release. Should not be any problems using the SDK for 1.3 right now to connect to 1.4 Fabric. Seriously :)

rickr (Mon, 07 Jan 2019 15:08:50 GMT):
@BingoYan Follow the integration tests. Start with End2endIT.java does all that you asked for.

liaoruohuai (Mon, 07 Jan 2019 15:12:01 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mk6hBmwSC5A7NFkSQ) @rickr Nice to hear that , tks!!

rickr (Mon, 07 Jan 2019 15:15:53 GMT):
@StefanKosc There's way to little information known, or even _exactly_ what you mean by _freezes_ . Is your code trying to wait on the future returned by the sendTransaction ? If yes, are all the peers with eventingservice enabled reporting?. The SDK trace should show that if enabled on trace level.

versus (Mon, 07 Jan 2019 17:52:31 GMT):
@rickr first, thx for leading the jsdk development. we're using it for almost a year, appreciate your work. we were looking at things in hlf roadmap (namely: token management and finalization of private data collections in 2.x) and wondering whether these functionalities would require adjustments on sdk level. if so, are these already planned to be tackled in the near future?

rickr (Mon, 07 Jan 2019 18:07:43 GMT):
@versus I don't manage the features or roadmap of the Fabric. We try to keep the SDK on par with it's functionality (best we can :) ). If you really want to know that status of those or other features you'd need to ask on the #fabric-questions channel. Right now the way I read the tea leafs is 2.0 is coming next and AFAIK the only thing there for sure now is the new chaincode lifecycle . That will be a future impact as it changes how chaincode will be installed and instantiated ( _defined_ ).

versus (Mon, 07 Jan 2019 18:12:17 GMT):
@rickr thx a lot, I will check out the mentioned channel :-)

kevinkbc (Mon, 07 Jan 2019 19:58:06 GMT):
@rickr (or anyone who can answer this) I saw this tutorial here https://medium.com/@lkolisko/hyperledger-fabric-sdk-java-basics-tutorial-a67b2b898410 based on sdk 1.0. Can it run with the newest sdk (1.3)?

kevinkbc (Mon, 07 Jan 2019 19:58:06 GMT):
@rickr (or anyone who can answer this) I saw this tutorial here https://medium.com/@lkolisko/hyperledger-fabric-sdk-java-basics-tutorial-a67b2b898410 based on sdk 1.0. Can it run with the newest sdk (1.3)? Are there any major changes to code using the sdk 1.3 artifact?

rickr (Mon, 07 Jan 2019 20:21:55 GMT):
@kevinkbc don't know wasn't involved with it. At first glance I don't think it does any more than the End2end test

raviranjan14 (Tue, 08 Jan 2019 07:21:57 GMT):
Has joined the channel.

giacomo.minighin (Tue, 08 Jan 2019 16:02:01 GMT):
I have this error trying to configure service discovery connection: ``` Received error on PeerEventServiceClient{id: 10, channel: mychannel, peerName: peer0.org1.example.com:7051, url: grpc://peer0.org1.example.com:7051}, attempts 1. UNAVAILABLE: NameResolver returned an empty list ```

giacomo.minighin (Tue, 08 Jan 2019 16:16:59 GMT):
I think is something related with the address grpc://peer0.org1.example.com:7051 because I'm working with in localhost

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using a external library for chaincode written in GO lang. I have downloaded the dependecy to $GOPATH.However i am receiving below error.```` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ``` `

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using a external library for chaincode written in GO lang. I have downloaded the dependecy to $GOPATH.However i am receiving below error.``` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ```

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using an external library for chaincode written in GO lang. I have downloaded the dependecy to $GOPATH.However i am receiving below error.``` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ```

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using an external library for chaincode written in GO lang. I have downloaded the dependency to $GOPATH.However i am receiving below error.``` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ```

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using an external library for chaincode written in GO lang. I have downloaded the dependency to $GOPATH.However i am receiving below error.``` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ``` I even mounted my GOPATH with the external dependency within it to peer container. I am still receiving the same error.

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using an external library for chaincode written in GO lang. I have downloaded the dependency to $GOPATH.However i am receiving below error.``` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ``` I even mounted my GOPATH with the external dependency within it to peer container. I am still receiving the same error.

anjalinaik (Wed, 09 Jan 2019 10:02:30 GMT):
Hi..Can anybody help me resolve below error? I am using an external library for chaincode written in GO lang. I have downloaded the dependency to $GOPATH.However i am receiving below error.``` test_pr1.1.lxebgzlyz8sz@CPU92 | 2019-01-09 09:56:56.223 UTC [endorser] SimulateProposal -> ERRO 065 [mychan][8c52895e] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/ehr3/ehr3.go:10:2: cannot find package "github.com/rs/xid" in any of: test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/go/src/github.com/rs/xid (from $GOROOT) test_pr1.1.lxebgzlyz8sz@CPU92 | /chaincode/input/src/github.com/rs/xid (from $GOPATH) test_pr1.1.lxebgzlyz8sz@CPU92 | /opt/gopath/src/github.com/rs/xid test_pr1.1.lxebgzlyz8sz@CPU92 | " test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container test_pr1.1.lxebgzlyz8sz@CPU92 | error starting container ``` I even mounted my GOPATH with the external dependency within it to peer container. I am still receiving the same error. How to import external dependencies into the Chaincode file and make it available to the fabric-client to execute it?

rickr (Wed, 09 Jan 2019 14:16:15 GMT):
@anjalinaik Maybe it needs to be vendored ? https://github.com/hyperledger/fabric-sdk-java#go-lang-chaincode

anjalinaik (Thu, 10 Jan 2019 06:53:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RD5Sb4yhvw7m67ZHc) @rickr Hi..thankyou for your answer. i have useed go vendor to download the dependencies into the vendor folder of $GOPATH. However the java-sdk is not referring to the same. Any suggestions?

anjalinaik (Thu, 10 Jan 2019 06:53:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RD5Sb4yhvw7m67ZHc) @rickr Hi..thankyou for your answer. i have used go vendor to download the dependencies into the vendor folder of $GOPATH. However the java-sdk is not referring to the same. Any suggestions?

anjalinaik (Thu, 10 Jan 2019 06:53:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RD5Sb4yhvw7m67ZHc) @rickr Hi..thankyou for your answer. i have used go vendor to download the dependencies into the vendor folder of $GOPATH. However the java-sdk is not referring to the same. Any suggestions?``` ```

anjalinaik (Thu, 10 Jan 2019 06:53:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RD5Sb4yhvw7m67ZHc) @rickr Hi..thankyou for your answer. i have used go vendor to download the dependencies into the vendor folder of $GOPATH. However the java-sdk is not referring to the same. Any suggestions? Also the gopath [/opt/go/src/github.com/rs/xid ]contains the dependency files. Why is fabric-java-sdk not referring to it? Please correct me if my understanding is wrong.

akoenig (Thu, 10 Jan 2019 15:27:49 GMT):
Hi, what is the best way to check if the peer from the channel-object is available? e.g. I send my propsal to all peers. If one of the peers now will get an disconnect I will get an exception, that the peer is unavaible

akoenig (Thu, 10 Jan 2019 15:28:40 GMT):
is there a good way (e.g. the channel) check if all peers are availble? If not I can react? I saw something like the ServiceDiscoveryIT?

akoenig (Thu, 10 Jan 2019 15:28:40 GMT):
is there a good way to check if a peer is available?

IgorSim (Thu, 10 Jan 2019 16:24:03 GMT):
hi, i'm trying to execute 'getHFCAIdentities' from SDK, version 1.3. For some reason it doesn't work, i see in rca-server logs the following message: Invalid token in authorization header: Token signature validation failed This snippet is also used in another project where 1.2 SDK version is used and it works fine. I noticed that 'getHTTPAuthCertificate' method in HFCAClient is changed a bit in 1.3 and wondering if i need to make some changes on SDK side for 1.3. Btw, fabric version is 1.4-rc2

giacomo.minighin (Thu, 10 Jan 2019 16:29:14 GMT):
@akoenig I suggest you to check ServiceDiscoveryIT https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java you check from your peer the status of the network

giacomo.minighin (Thu, 10 Jan 2019 16:29:14 GMT):
@akoenig I suggest you to check ServiceDiscoveryIT https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java you check from your peer the status of the network

giacomo.minighin (Thu, 10 Jan 2019 16:29:14 GMT):
@akoenig I suggest you to check ServiceDiscoveryIT https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java you can check from your peer the status of the network

rickr (Thu, 10 Jan 2019 18:12:47 GMT):
@akoenig you could use one of the apis that should always succeed like on channel BlockInfo queryBlockByNumber(Peer peer, long blockNumber) throws InvalidArgumentException, ProposalException for like block 0

venu.vemula (Thu, 10 Jan 2019 18:49:54 GMT):
Has joined the channel.

nickgaski (Thu, 10 Jan 2019 20:46:47 GMT):
Has left the channel.

vijay.bP (Thu, 10 Jan 2019 21:48:05 GMT):
Has joined the channel.

akoita (Fri, 11 Jan 2019 03:33:44 GMT):
Has joined the channel.

anjalinaik (Fri, 11 Jan 2019 06:30:26 GMT):
where do we add external go dependenices so that while deploying the chaincode using fabric-java-sdk , the chaincode builder picks it up accordingly?

akoenig (Fri, 11 Jan 2019 07:19:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2fcdT9HF9WsDvGENu) @giacomo.minighin okay, thanks. But I don't see any example where the test checks the status of the peer? It checks if the the transaction was successfull or not (or am I wrong?) Because if this is the common method I can call a method first (like @rickr mention it) and check if the peer is available before I call it.

akoenig (Fri, 11 Jan 2019 07:21:34 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ByLe6HEwKxsLPFHMf) @anjalinaik you have to create a "vendor"-folder in the same path your chaincode is stored. see https://hyperledger-fabric.readthedocs.io/en/v1.1.0-alpha/chaincode4ade.html#managing-external-dependencies-for-chaincode-written-in-go

anjalinaik (Fri, 11 Jan 2019 08:38:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Dk8Y6P5Zbc2EyKey8) @akoenig so suppose my chaincode is stored in ../src/chaincode/chaincode.go then the vendor folder should be in ../src/vendor ,correct?

anjalinaik (Fri, 11 Jan 2019 08:38:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Dk8Y6P5Zbc2EyKey8) @akoenig so suppose my chaincode is stored in ../src/chaincode/chaincode.go then the external dependency should be in ../src/vendor ,correct?

anjalinaik (Fri, 11 Jan 2019 08:38:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Dk8Y6P5Zbc2EyKey8) @akoenig so suppose my chaincode is stored in ../src/chaincode/chaincode.go then the external dependency should be in ../src/vendor ,correct?

anjalinaik (Fri, 11 Jan 2019 08:38:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Dk8Y6P5Zbc2EyKey8) @akoenig so suppose my chaincode is stored in ../src/chaincode/chaincode.go then the external dependency should be in ../src/vendor ,correct? [But this gives me the same error back again]

akoenig (Fri, 11 Jan 2019 08:46:39 GMT):
../src/chaincode/vendor

akoenig (Fri, 11 Jan 2019 08:47:14 GMT):
and ../src/chaincode/chaincode.go with dependency to the files in the vendor folder

anjalinaik (Fri, 11 Jan 2019 09:12:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NJi5eZD9HezNGAK6o) @akoenig Thankyou very much for clearing that for me. it works fine :)

IgorSim (Fri, 11 Jan 2019 12:06:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=kJPiz7wm33K3Wg3p9) I debug this issue and this looks like bug in case when HFCaClient have 'caName' set. Method 'addCAToURL' is invoked twice (once from 'getURL' , second time from 'getHTTPAuthCertificate') which will result appending caName twice thus creating incorrect signString

rickr (Fri, 11 Jan 2019 13:30:54 GMT):
@IgorSim Can you produce a simple example code that produces and open a JIRA with it ? @skarim ^^^

PradeepJaligama (Fri, 11 Jan 2019 18:36:58 GMT):
Has joined the channel.

mausomsaikia (Sat, 12 Jan 2019 08:52:12 GMT):
Has joined the channel.

AndresMartinezMelgar.itcl (Mon, 14 Jan 2019 08:06:15 GMT):
there is any example that implements sdk java ? i found https://github.com/hyperledger/fabric-sdk-java but i want other example to can compare. Thx

BingoYan (Mon, 14 Jan 2019 08:14:39 GMT):
Hello everyone . I got a warn : Failed to load any configuration from: config.properties. Using toolkit defaults

giacomo.minighin (Mon, 14 Jan 2019 08:54:54 GMT):
@AndresMartinezMelgar.itcl this one https://github.com/IBM/blockchain-application-using-fabric-java-sdk

giacomo.minighin (Mon, 14 Jan 2019 09:04:53 GMT):
@akoenig have a look at this: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/Peer.java it has a hasConnected method and a DisconnectHandler

AndresMartinezMelgar.itcl (Mon, 14 Jan 2019 09:06:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5atMiwd3bzjMS2DZq) @giacomo.minighin yeah! i am working with this example, i want other. I was wrong, i put link to sdk, not link to proyect

david-lsq (Mon, 14 Jan 2019 14:38:02 GMT):
Has joined the channel.

david-lsq (Mon, 14 Jan 2019 14:41:28 GMT):
hi guys, I'm trying out the private data feature and i' having some issues. I'm getting this on the peer side `2019-01-14 14:22:09.228 UTC [gossip.privdata] func1 -> ERRO 04a Failed disseminating private RWSet for TxID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d , namespace covenants collection COLLECTION_1_2_3 : Requested to send to at least 1 peers, but know only of 0 suitable peers 2019-01-14 14:22:09.228 UTC [gossip.service] DistributePrivateData -> ERRO 04b Failed to distributed private collection, txID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d channel covenants due to Failed disseminating 1 out of 1 private RWSets` From what i've found, it is caused by the fact that my anchor peers were not added to the channel. I'm now having issues finding out how to add the anchor peers to the channel. If you know what function to use to do so, i'd be happy if you could share that .

david-lsq (Mon, 14 Jan 2019 14:41:28 GMT):
hi guys, I'm trying out the private data feature and i' having some issues. I'm getting this on the peer side`2019-01-14 14:22:09.228 UTC [gossip.privdata] func1 -> ERRO 04a Failed disseminating private RWSet for TxID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d , namespace covenants collection COLLECTION_1_2_3 : Requested to send to at least 1 peers, but know only of 0 suitable peers 2019-01-14 14:22:09.228 UTC [gossip.service] DistributePrivateData -> ERRO 04b Failed to distributed private collection, txID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d channel covenants due to Failed disseminating 1 out of 1 private RWSets` From what i've found, it is caused by the fact that my anchor peers were not added to the channel. I'm now having issues finding out how to add the anchor peers to the channel. If you know what function to use to do so, i'd be happy if you could share that .

david-lsq (Mon, 14 Jan 2019 14:41:28 GMT):
hi guys, I'm trying out the private data feature and i' having some issues. I'm getting this on the peer side From what i've found, it is caused by the fact that my anchor peers were not added to the channel. I'm now having issues finding out how to add the anchor peers to the channel. If you know what function to use to do so, i'd be happy if you could share that .

david-lsq (Mon, 14 Jan 2019 14:41:28 GMT):
hi guys, I'm trying out the private data feature and i' having some issues. I'm getting this on the peer side `2019-01-14 14:22:09.228 UTC [gossip.privdata] func1 -> ERRO 04a Failed disseminating private RWSet for TxID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d , namespace covenants collection COL$ 2019-01-14 14:22:09.228 UTC [gossip.service] DistributePrivateData -> ERRO 04b Failed to distributed private collection, txID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d channel covenants d$ From what i've found, it is caused by the fact that my anchor peers were not added to the channel. I'm now having issues finding out how to add the anchor peers to the channel. If you know what function to use to do so, i'd be happy if you could share that .

david-lsq (Mon, 14 Jan 2019 14:41:28 GMT):
hi guys, I'm trying out the private data feature and i' having some issues. I'm getting this on the peer side `2019-01-14 14:22:09.228 UTC [gossip.privdata] func1 -> ERRO 04a Failed disseminating private RWSet for TxID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d , namespace covenants collection COL$ 2019-01-14 14:22:09.228 UTC [gossip.service] DistributePrivateData -> ERRO 04b Failed to distributed private collection, txID d98f251d83fa3431047480a15f2132c5183183eb05795c5d07d9b16001f4368d channel covenants d$` From what i've found, it is caused by the fact that my anchor peers were not added to the channel. I'm now having issues finding out how to add the anchor peers to the channel. If you know what function to use to do so, i'd be happy if you could share that .

rickr (Mon, 14 Jan 2019 15:04:33 GMT):
@dave.enyeart ^^ ?

knagware9 (Mon, 14 Jan 2019 15:12:57 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8u2LjuXxqL8cYfnaf) @david-lsq Please check this if it help https://gerrit.hyperledger.org/r/#/c/26956/

david-lsq (Mon, 14 Jan 2019 15:35:33 GMT):
thanks @knagware9

SandySun2000 (Mon, 14 Jan 2019 22:42:04 GMT):
@rickr One enterprise plan network just was updated to V1.1, the client got "java.lang.NoSuchMethodError: io/netty/handler/codec/http2/Http2ConnectionEncoder.writePing(Lio/netty/channel/ChannelHandlerContext;ZJLio/netty/channel/ChannelPromise;)Lio/netty/channel/ChannelFuture; (loaded from file:/opt/relay/integration-core-jar-with-dependencies.jar by sun.misc.Launcher$AppClassLoader@3549b660) called from class io.grpc.netty.NettyClientHandler (loaded from file:/opt/relay/integration-core-jar-with-dependencies.jar by sun.misc.Launcher$AppClassLoader@3549b660)."

SandySun2000 (Mon, 14 Jan 2019 22:42:26 GMT):
Is it a backward compatibility issue?

KenvinNguyen (Tue, 15 Jan 2019 06:35:46 GMT):
how we can get createdat of block via java sdk?

KenvinNguyen (Tue, 15 Jan 2019 06:35:46 GMT):
how we can get createdat of block via java sdk? and can we decrypt datahash on block?

schinivision (Tue, 15 Jan 2019 11:41:05 GMT):
Hi. If I invoke a query on a channel, e.g. channel.queryByChaincode(ccqu)... and this causes a shim.error in the chaincode that I am able to get the Content of the shim.error that is provided by the chaincode in the Java SDK? All I see is a InvalidArgumentException popping up stating Proposal response invalid.

rickr (Tue, 15 Jan 2019 14:32:58 GMT):
@SandySun2000 I think you don't have the right dependencies for the SDK

rickr (Tue, 15 Jan 2019 14:34:24 GMT):
@KenvinNguyen Data hash calculation on a block is done in the integration tests

rickr (Tue, 15 Jan 2019 14:42:10 GMT):
@schinivision https://github.com/hyperledger/fabric-sdk-java/blob/3495c0d29c00c6eee30ccbd9328451949c68c47b/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L704

schinivision (Tue, 15 Jan 2019 15:59:03 GMT):
@rickr Thanks for the Reply... But if I understand the code correctly than this is how you extract the payload from the chaincode query on a Success case... If L697 throws an error (which happens if the chaincode returns a shim.error) this exception will be caught in L711... But what I am interested is in the message that the shim.error returns in the chaincode... But the SDK just throws an Exception, and within that exception the message reads "Proposal response invalid"... is this because the SDK could not decode the response that is sent within shim.error?

schinivision (Tue, 15 Jan 2019 15:59:03 GMT):
@rickr Thanks for the Reply... But if I understand the code correctly than this is how you extract the payload from the chaincode query on a Success case... If L697 throws an error (which happens if the chaincode returns a shim.error) this exception will be caught in L711... But what I am interested is in the message that the shim.error returns in the chaincode... But the SDK just throws an Exception, and within that exception the message reads "Proposal response invalid"... is this because the SDK could not decode the response that is sent within shim.error? -> Example what shim.error could return is a String like this -> "{\"Invoke\":\"Failed\",\"Message\":\"Error JSON unmarshalling\"}"

dan13 (Tue, 15 Jan 2019 16:45:16 GMT):
Has joined the channel.

kevinkbc (Tue, 15 Jan 2019 17:06:36 GMT):
Hello, is there any pĺans to add android support for java sdk?

SandySun2000 (Tue, 15 Jan 2019 23:55:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yWB4feigMCdreBZnx) @rickr Rick, thanks for your reply, which jar file or which version of jar file that they are missing?

shivann (Wed, 16 Jan 2019 12:20:30 GMT):
Has joined the channel.

shivann (Wed, 16 Jan 2019 12:20:36 GMT):
grpcs

rickr (Wed, 16 Jan 2019 15:10:41 GMT):
@schinivision I think I looked at this once before and it would mean parsing it. Something I won't do. I think your chaincode can set a response like 4xxx that won't throw an exception and would not be considered success and you can get that status code.

rickr (Wed, 16 Jan 2019 15:10:49 GMT):
@kevinkbc No.

rickr (Wed, 16 Jan 2019 15:12:18 GMT):
@SandySun2000 I have no idea. Double check the required dependencies needed for the specific JSDK version they're using.

kevinkbc (Wed, 16 Jan 2019 15:30:33 GMT):
thank you @rickr

SandySun2000 (Wed, 16 Jan 2019 17:34:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5rqHhn3zFKXNZt6r4) @rickr ok. Thanks Rick

gaijinviki (Thu, 17 Jan 2019 04:59:58 GMT):
Has joined the channel.

KenvinNguyen (Thu, 17 Jan 2019 09:40:03 GMT):
hi guys, how to submit multiple transaction into 1 block?

schinivision (Thu, 17 Jan 2019 13:46:12 GMT):
@rickr Hi. I looked at the implementation of the go chaincode and there is just the two option -> shim.success returns a http 200 and -> shim.error returns a 500... therefore I wanted to parse the error.. because I am limited in the stati that I could interpret.

schinivision (Thu, 17 Jan 2019 13:49:36 GMT):
@KenvinNguyen as far as i know this is determined by the configtx.yml of the hyperledger that you connect to... Either the batch timeout will determine how much transactions will be in one block... (eg. you have a batch timeout of 2 seconds -> if you submit only one transaction per 2 seconds a block will only contain that one transaction) or the max message count (e.g. if you have a max message count of 10 then a block will never contain more than 10 transactions)

KenvinNguyen (Fri, 18 Jan 2019 03:42:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vyE4QGg5Qh36oMXwZ) @schinivision Thanks @schinivision for your answer, but I still confuse if multi transaction from difference user submit in the same time so does it combine those transaction into one block? if yes so multi user can review a same block that contain their transaction.:thinking:

KenvinNguyen (Fri, 18 Jan 2019 03:42:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vyE4QGg5Qh36oMXwZ) @schinivision Thanks @schinivision for your answer, but I still confuse if multi transaction from difference user submit in the same time so does it combine those transaction into one block? if yes so multi user can review a same block that contain their transaction. :thinking:

dan13 (Fri, 18 Jan 2019 15:37:00 GMT):
HLF 1.2 - a client calling chaincode requiring endorsement from peers in 2 orgs must have credentials for a user in each org in order to submit the proposal to the endorsing peer in each org, is that correct?

viktoriya (Sat, 19 Jan 2019 18:14:57 GMT):
Has joined the channel.

milko.mitropolitsky (Mon, 21 Jan 2019 09:58:25 GMT):
Has joined the channel.

milko.mitropolitsky (Mon, 21 Jan 2019 10:00:09 GMT):
Hello, I know this question is relevant for #fabric-ca, but since I am using the fabric-sdk-java, I thought the question might be relevant here as well. I am trying to implement the following scenario: Org1 is creating a channel and is installing Java chaincode. Org2 and Org3 need to add a transaction, i.e. call a method of the chaincode, without revealing their identity. It is really important that no user from Org1 knows which organization created the transaction, i.e. if it is a member of Org2 or Org3. From my research I found out that this is supposed to be done with Idemix. I am now stepping on top of the basic-network. I successfully managed to install the chaincode to the peer and am invoking it without problems. However, when I try to pass the user enrollment through the idemix `caClient.idemixEnroll`, the same scenario is not working. I have an `access denied` response. Error in the peer logs is: `ValidateProposalMessage -> WARN 056 channel [mychannel]: MSP error: could not decode the PEM structure` I tried editing the policies in configtx.yml and in the chaincode configuration during instantiation, but without any success. My question is, first: do you think this scenario that I described is feasable with fabric and fabric-ca, and second, what might be the problem with the Idemix enrollment?

milko.mitropolitsky (Mon, 21 Jan 2019 10:00:09 GMT):
Hello, I know this question is relevant for #fabric-ca, but since I am using the fabric-sdk-java, I thought the question might be relevant here as well. I am trying to implement the following scenario: Org1 is creating a channel and is installing Java chaincode. Org2 and Org3 need to add a transaction, i.e. call a method of the chaincode, without revealing their identity. It is really important that no user from Org1 knows which organization created the transaction, i.e. if it is a member of Org2 or Org3. From my research I found out that this is supposed to be done with Idemix. I am now stepping on top of the basic-network. I successfully managed to install the chaincode to the peer and am invoking it without problems. However, when I try to pass the user enrollment through the idemix `caClient.idemixEnroll`, the same scenario is not working. I have an `access denied` response. Error in the peer logs is: `ValidateProposalMessage -> WARN 056 channel [mychannel]: MSP error: could not decode the PEM structure` I tried editing the policies in configtx.yml and in the chaincode configuration during instantiation, but without any success. My question is, first: do you think this scenario that I described is feasable with fabric and fabric-ca, and second, what might be the problem with the Idemix enrollment? @adc ^^^

schinivision (Mon, 21 Jan 2019 14:03:48 GMT):
@KenvinNguyen I am not that deep into the user abstraction implementation. Here is how I understood it... In your scenario, if two users have the same read rights to the same channel (ledger) then yes, both could see all the results in the block (excluding the new private data feature, I haven't looked into that.) If you want to separate it you have to use different channels or look into the private data feature... But as far as I know... every transaction that is within the same ledger can be read by all participants that have a read permission on that ledger...@rickr knows maybe more about that.

rickr (Mon, 21 Jan 2019 14:37:47 GMT):
@dan13 It depends on your CC endorsement policy. There's something of an example that demos that in https://github.com/cr22rc/fabricSDKJavaMultiDomainSample if you follow the example comment real closely (needs run with older version of sdk but same principle)

rickr (Mon, 21 Jan 2019 14:45:52 GMT):
@milko.mitropolitsky Your beyond my understanding of idemix but you scenario _I think_ is exactly what Idemix is for. I really would post the error on #fabric-ca unless there seem to be an actual JSDK api issue. @adc ^^^

rickr (Mon, 21 Jan 2019 14:45:52 GMT):
@milko.mitropolitsky Your beyond my understanding of idemix but you scenario _I think_ is exactly what Idemix is for. I really would post the error on #fabric-ca unless there seem to be an actual JSDK api issue.

dan13 (Mon, 21 Jan 2019 15:07:54 GMT):
@rickr thanks, I'll dig into that -- scenario is chaincode policy requiring endorsement from at least one peer in 2 (both) Orgs, when I tried this having Org 1 client with Org 1 user sending proposal to Org 1 and Org2 peers (using single HFClient and Channel object), the Org 2 peer rejected the transaction because it was signed by user from Org 1 MSP (I will have to re-set up to capture exact error and report back)

pumicerD (Mon, 21 Jan 2019 19:39:54 GMT):
Has joined the channel.

bur (Tue, 22 Jan 2019 08:21:50 GMT):
Has joined the channel.

Jamie (Tue, 22 Jan 2019 17:14:16 GMT):
Has joined the channel.

incarose (Wed, 23 Jan 2019 00:26:41 GMT):
Has joined the channel.

ManjeetGambhir (Wed, 23 Jan 2019 18:54:29 GMT):
Hi @rickr , i am trying to implement EventHubDisconnected using fabric sdk 1.0.1 and implemented method "public void disconnected(EventHub eventHub) " to do recovery but couldn't able to figure out how to reconnect it ...there is no public method exposed to reconnect can you please suggest? or tell me the best way to reconnect

rickr (Wed, 23 Jan 2019 19:02:35 GMT):
Just looking and seems you can't .

ManjeetGambhir (Wed, 23 Jan 2019 19:03:25 GMT):
ok

ManjeetGambhir (Wed, 23 Jan 2019 19:03:45 GMT):
so there is no other way

rickr (Wed, 23 Jan 2019 19:03:52 GMT):
what are you trying to do ?

ManjeetGambhir (Wed, 23 Jan 2019 19:05:11 GMT):
it was observed that when eventhub disconnect with peer and reconnect after sometime, inbetween commited block got missed by eventhub

rickr (Wed, 23 Jan 2019 19:05:46 GMT):
you really should be using the peer eventing service

ManjeetGambhir (Wed, 23 Jan 2019 19:05:51 GMT):
i was to recover block events on reconnect

rickr (Wed, 23 Jan 2019 19:06:05 GMT):
2.0 is removing eventhubs

ManjeetGambhir (Wed, 23 Jan 2019 19:06:16 GMT):
I know ..but we are on production with fabric 1.0.1

ManjeetGambhir (Wed, 23 Jan 2019 19:07:01 GMT):
peer eventing model is planned later

rickr (Wed, 23 Jan 2019 19:10:06 GMT):
the peer eventing takes care of missed blocks by default

rickr (Wed, 23 Jan 2019 19:10:28 GMT):
it tries to start where it left off

rickr (Wed, 23 Jan 2019 19:10:55 GMT):
assuming the client stays up

kelvinzhong (Thu, 24 Jan 2019 02:47:44 GMT):
@rickr hi rick, i'm confusing that seems fabric try to implement a raft-based ordering service then move on to BFT-based ordering service, but as i know, the consensus of fabric is based on a transaction flow and the ordering service can't altered any transaction on it's own, why fabric care the consensus between the ordering service?

kelvinzhong (Thu, 24 Jan 2019 02:47:44 GMT):
@rickr hi rick, i'm confusing that seems fabric try to implement a raft-based ordering service then move on to BFT-based ordering service, but as i know, the consensus of fabric is based on a transaction flow and the ordering service can't altered any transaction on it's own, why fabric care the consensus between the orderer node?

kelvinzhong (Thu, 24 Jan 2019 02:47:44 GMT):
@rickr hi rick, i'm confusing that seems fabric try to implement a raft-based ordering service then move on to BFT-based ordering service, but as i know, the consensus of fabric is based on a transaction flow and the ordering service can't altered any transaction on it's own, why fabric care the consensus between the orderer nodes?

kelvinzhong (Thu, 24 Jan 2019 02:49:44 GMT):
even the BFT-based ordering service is delivered, i can't tell what's the different between Kaffka-based ordering service, even worse the BFT-based ordering service might slower in ordering.

gravity (Thu, 24 Jan 2019 21:05:03 GMT):
hello are there any tools which can be used to run performance testing against sdk application? or are there any test scenarios how do to this? I mean, should I measure the performance by sending request to an application? or are there any other ways to do this?

yulong12 (Fri, 25 Jan 2019 04:56:51 GMT):
Hi everyone. I want to ask a question. I set the endorpolicy is ``` dentities: # list roles to be used in the policy user1: {"role": {"name": "member", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP user2: {"role": {"name": "member", "mspId": "Org2MSP"}} policy: # the policy each MUST sign 2-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. - signed-by: "user1" - signed-by: "user2" ``` When I execute invoke ,it doesn't work

yulong12 (Fri, 25 Jan 2019 04:57:05 GMT):
so who can help me?

rickr (Fri, 25 Jan 2019 14:17:37 GMT):
@yulong12 its not the user signing it the peers (really the org the peer belongs to)

rickr (Fri, 25 Jan 2019 14:21:57 GMT):
@kelvinzhong If you're speaking of the new Raft based instead of Kafka Orderer _option_ there is no change in how the SDK will handle. I've been _told_ the Raft based allows a more simplified installation and overhead. For a more deep discussion I would recommend #fabric-orderer channel.

rickr (Fri, 25 Jan 2019 14:21:57 GMT):
@kelvinzhong If you're speaking of the upcoming v2.0 Raft based instead of Kafka Orderer _option_ there is no change in how the SDK will handle. I've been _told_ the Raft based allows a more simplified installation and overhead. For a more deep discussion I would recommend #fabric-orderer channel.

kelvinzhong (Mon, 28 Jan 2019 02:28:20 GMT):
@rickr sure, thx anyway:smile:

lehors (Mon, 28 Jan 2019 10:25:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4Q5Yq5WdRT8YpJEPM) @kelvinzhong the order is still a sensitive operation, because when two transactions conflict with one another, the first one will be marked valid and the second one invalid at the time the block is committed to the ledger. so people worried about bad players on the network do care.

kevinkbc (Mon, 28 Jan 2019 12:17:15 GMT):
How do you disenroll a user? I am using golang chaincode and java sdk, fabric v 1.2

skarim (Mon, 28 Jan 2019 14:30:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TpgNq2CDvkgfFuu2S) @kevinkbc You can revoke a user or a specific certificate, but if you are interested in "disenrolling" a user then you probably would like to revoke all it's certificate. See here for an example on how to revoke: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L326

kevinkbc (Mon, 28 Jan 2019 14:42:43 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2QRSjwt8WSjGgjt3W) @skarim thank you

frgomes (Mon, 28 Jan 2019 14:58:57 GMT):
Has joined the channel.

windykiss (Tue, 29 Jan 2019 04:16:53 GMT):
Has joined the channel.

bestbeforetoday (Tue, 29 Jan 2019 13:40:51 GMT):
Has joined the channel.

GianlucaPinto (Tue, 29 Jan 2019 14:59:38 GMT):
Has joined the channel.

GianlucaPinto (Tue, 29 Jan 2019 15:02:11 GMT):
hi all, i have create a network with 5 peer and only 1 org starting from the "first-network" dir. so, now i have a network without a ca and a tls enabled. i have a java app that will interface the blockchain. how craete the right client for this case? thanks in advance :-)

rickr (Tue, 29 Jan 2019 22:58:56 GMT):
@GianlucaPinto The SDK provides examples in the integration test. IMO best to take the time with a debugger and walk through them. https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario

kelvinzhong (Wed, 30 Jan 2019 01:51:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JNgncY9gfm5cMnh8t) @lehors got it, thx for the info

gravity (Wed, 30 Jan 2019 14:48:51 GMT):
hi @rickr what format of an endorsement policy should be used to convert it bytes and use it for method `ChaincodeEndorsementPolicy#fromBytes(policyBytes)` that format is not working https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/sdkintegration/chaincodeendorsementpolicy.yaml I saw it is in use with method `ChaincodeEndorsementPolicy#fromYamlFile(yamlFile)` in the End2EndIT.java, but I'm interested in method `fromBytes` I've tried to convert a string `OR('org1MSP.member')` to bytes, chaincode is instantiated successfully, but I'm getting the error during transactions: ``` 2019-01-30 14:25:52.724 UTC [committer/txvalidator] validateTx -> ERRO 25b VSCCValidateTx for transaction txId = c298e55a7b1e2b4cc65a5d9685e0ea7ae633f2750fb66b40ebe21823c7f0e836 returned error: validation of endorsement policy for chaincode common in tx 2:0 failed: Error unmarshaling to SignaturePolicy: proto: can't skip unknown wire type 7 ```

rickr (Wed, 30 Jan 2019 14:57:17 GMT):
@gravity Looking at the code all methods other than fromBytes converts and sets field policyBytes. So fromBytes sets that directly

gravity (Wed, 30 Jan 2019 15:05:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dkDsWRTZX5xRSCxJc) @rickr that's weird because if I read a policy from a yaml file to bytes and set it here, it does not work

rickr (Wed, 30 Jan 2019 15:36:57 GMT):
No the bytes there would be raw protobuf not a yaml file that was read in as bytes

akoenig (Wed, 30 Jan 2019 15:44:15 GMT):
Hi, I have a peer that is in two channels. And we work with a BlockListener in the network. When we install now a chaincode we get this warning from the channel:

akoenig (Wed, 30 Jan 2019 15:44:25 GMT):
``` if (!Objects.equals(name, blockchainID)) { logger.warn(format("Channel %s eventqueue got block event NOT FOR ME channelId %s from %s", name, blockchainID, from)); continue; // not targeted for this channel } ```

akoenig (Wed, 30 Jan 2019 15:44:56 GMT):
are we doing something wrong/bad? Or is this the normal behaviour that one channel gets the event from another channel?

rickr (Wed, 30 Jan 2019 15:45:15 GMT):
do you have two peer objects for each channel ?

akoenig (Wed, 30 Jan 2019 15:45:21 GMT):
yes

akoenig (Wed, 30 Jan 2019 15:46:25 GMT):
we call `final Peer peer = client.newPeer(peerName, peerLocation, peerProperties);` for each peer

akoenig (Wed, 30 Jan 2019 15:46:25 GMT):
we call `final Peer peer = client.newPeer(peerName, peerLocation, peerProperties);` for each channel

rickr (Wed, 30 Jan 2019 15:47:44 GMT):
two different channles objects

akoenig (Wed, 30 Jan 2019 15:50:50 GMT):
yes, for each channel a new object with new peers

rickr (Wed, 30 Jan 2019 15:51:49 GMT):
is the channelId the other channel ?

akoenig (Wed, 30 Jan 2019 15:51:56 GMT):
yes

rickr (Wed, 30 Jan 2019 15:53:36 GMT):
are you getting all the events you expect on the respective channels ?

akoenig (Wed, 30 Jan 2019 15:53:43 GMT):
yes

akoenig (Wed, 30 Jan 2019 15:57:02 GMT):
we are using the same eventhubs might be this the failure?

akoenig (Wed, 30 Jan 2019 15:57:15 GMT):
our test org has always the same eventhubs

rickr (Wed, 30 Jan 2019 15:58:58 GMT):
you using eventhubs ?

rickr (Wed, 30 Jan 2019 15:59:25 GMT):
Please move over to peer eventing

akoenig (Wed, 30 Jan 2019 15:59:37 GMT):
thought we need eventhubs for the blockchainlistener or are they not needed?

rickr (Wed, 30 Jan 2019 15:59:57 GMT):
They've been deprecated for some time.

akoenig (Wed, 30 Jan 2019 16:00:13 GMT):
so they are not needed for blockevent-listener?

akoenig (Wed, 30 Jan 2019 16:00:16 GMT):
then i will remove them :D

rickr (Wed, 30 Jan 2019 16:00:31 GMT):
what version are you on ?

akoenig (Wed, 30 Jan 2019 16:00:35 GMT):
1.2

akoenig (Wed, 30 Jan 2019 16:00:43 GMT):
but we want to swtich to 1.4 soon

akoenig (Wed, 30 Jan 2019 16:03:31 GMT):
we have implemented a BlockListener from the Java-Sdk. And thought we need EventHubs for this (and saw them from the tutorial). But if they are not needed we can remove them.

rickr (Wed, 30 Jan 2019 16:03:48 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fabric-v10-considerations

rickr (Wed, 30 Jan 2019 16:05:58 GMT):
1.4 sdk still has eventhubs to connect back to older version but fabric 1.4 does not support them 2.0 sdk will have eventubs removed

akoenig (Wed, 30 Jan 2019 16:09:25 GMT):
Okay, thank you very much for the informatin. So I will remove the logic and will have a look if it works.

akoenig (Wed, 30 Jan 2019 16:24:25 GMT):
@rickr thanks for your help, it's working now :)

akoenig (Wed, 30 Jan 2019 16:30:03 GMT):
but do you know why the class is not annotated with "deprecated"? Or are they in 1.4?

rickr (Wed, 30 Jan 2019 16:42:01 GMT):
I thought I did -- oversight

bdjidi (Wed, 30 Jan 2019 20:11:45 GMT):
Has left the channel.

helpsolution (Thu, 31 Jan 2019 08:21:46 GMT):
Has joined the channel.

helpsolution (Thu, 31 Jan 2019 08:23:31 GMT):
Hello! I am using Java SDK. I need to subscribe to chaincode events starting from a given block. Is it possible? And how? Node js sdk allows it, but I did not find it in the source code of java sdk

pumicerD (Thu, 31 Jan 2019 08:37:39 GMT):
@helpsolution I would think either the _registerChaincodeEventListener_ or _registerBlockListener_ method of your _Channel_ instance

helpsolution (Thu, 31 Jan 2019 08:43:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=3gscpcjNo2irmiLWv) @pumicerD public String registerChaincodeEventListener(Pattern chaincodeId, Pattern eventName, ChaincodeEventListener chaincodeEventListener) public String registerBlockListener(BlockListener listener)

fanjianhang (Thu, 31 Jan 2019 09:02:15 GMT):
@rickr hi, rick, i got the error ` Caused by: java.lang.NoSuchFieldError: id_tc26_signwithdigest_gost_3410_12_256` when i enroll a user in fabric-sdk-java 1.3. My machine is win7 with jdk1.8. Why does this error happened?

rickr (Thu, 31 Jan 2019 13:50:58 GMT):
@fanjianhang Just googling ( https://github.com/lightbody/browsermob-proxy/issues/712 ) seem to be a bouncy castle version error.

rickr (Thu, 31 Jan 2019 13:57:52 GMT):
@helpsolution there is something that starts a channnel peer listeners at a specific block https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/java/org/hyperledger/fabric/sdkintegration/End2endAndBackAgainIT.java#L276-L296

helpsolution (Thu, 31 Jan 2019 14:48:55 GMT):
@rickr Thanks, but it is not convenient((

helpsolution (Thu, 31 Jan 2019 14:49:04 GMT):
@rickr Is it possible to add functionality for selecting block numbers when registering event listeners as in node js sdk?

rickr (Thu, 31 Jan 2019 14:51:54 GMT):
Not on the list so far. I think you can always create a new client / channel / peer for specific block listener .. not maybe optimal but do think workable

helpsolution (Thu, 31 Jan 2019 15:52:34 GMT):
@rickr Ok, thanks)

helpsolution (Thu, 31 Jan 2019 16:04:09 GMT):
@rickr I encountered the following problem. I have 100 blocks for example, next I subscribing to events starting 0 block and back I got events without keeping order of blocks. But this very important. How solve this problem?

rickr (Thu, 31 Jan 2019 16:39:47 GMT):
that can happen cause of java thread dispatching ... -> I've used this https://ctrlv.it/id/164213/2696686186

helpsolution (Fri, 01 Feb 2019 08:44:25 GMT):
Thanks, but this is not optimal for my task... Is it possible to use 1 thread to receive events?

rickr (Fri, 01 Feb 2019 13:39:20 GMT):
Not today . Why does that not work for you ? In theory you could put in that code snippet I gave just some code that puts the events in to a queue and then have your _1 thread_ read from it.

helpsolution (Fri, 01 Feb 2019 14:38:17 GMT):
It is right, but if i have 10000000.. blocks it reduces performance

helpsolution (Fri, 01 Feb 2019 14:38:17 GMT):
It is right, but if i have 10000000.. blocks for example, it reduces performance

helpsolution (Fri, 01 Feb 2019 14:38:17 GMT):
It is right, but if I have 10000000.. blocks for example, it reduces performance

rickr (Fri, 01 Feb 2019 14:40:46 GMT):
have you tried with 10000000 blocks ? Was it not acceptable ?

helpsolution (Fri, 01 Feb 2019 14:42:25 GMT):
No, but the approach is a bit strange.

rickr (Fri, 01 Feb 2019 14:46:26 GMT):
I'm _guessing_ what ever you're doing with processing each block will more than likely be significantly slower than any queuing and will be the processing you would not want do with just _1 thread_ if possible.

Doug-K1 (Fri, 01 Feb 2019 19:10:17 GMT):
Has joined the channel.

helpsolution (Sun, 03 Feb 2019 10:52:39 GMT):
The fabric sends messages with preservation of order, but on the side of sdk the order is broken due to multithreading. It's right? If so, can I find out the number of threads?

AsifJaved (Sun, 03 Feb 2019 19:53:27 GMT):
hi everyone, how can i create an purely Android App with hyperledger fabric integeration ?????

gravity (Sun, 03 Feb 2019 21:37:37 GMT):
Hi @rickr are there any reasons in caching fabric-related objects in an application? For example, HFClient. An object of HFClient class is created with the user context of the caller. Is it ok to create this object every time user sends query/transaction?

rickr (Mon, 04 Feb 2019 13:30:55 GMT):
@AsifJaved https://github.com/hyperledger/fabric-sdk-java#is-android-supported

rickr (Mon, 04 Feb 2019 13:34:46 GMT):
@gravity I don't think that would be optimal in general. It may be ok if your application is rarely sending work to the Fabric .. but I would think that would be atypical use

rickr (Mon, 04 Feb 2019 13:35:03 GMT):
@helpsolution Threads are created as needed.

pumicerD (Mon, 04 Feb 2019 13:58:34 GMT):
Hi, how would I use the Java SDK to register an admin user ? Much like this example given for the CA client CLI : `fabric-ca-client register --id.name admin2 --id.affiliation org1.department1 --id.attrs 'hf.Revoker=true,admin=true:ecert'` I can set username and affiliation with `RegistrationRequest rr = new RegistrationRequest("admin2", "org1.department1")` the revoker attribute with `rr.setType(HFCAClient.HFCA_ATTRIBUTE_HFREVOKER)` what would be the way to set the admin attribute ?

rickr (Mon, 04 Feb 2019 14:01:20 GMT):
CA Admin is already registered. I don't think via the api you register another. @skarim

pumicerD (Mon, 04 Feb 2019 14:06:36 GMT):
The CA Admin is the bootstrap identity created when starting the server with `fabric-ca-server start -b :` Isn't it different than the Admin account generated by cryptogen ? (certs under _peerOrganizations/orgX/users/Admin@orgX_)

pumicerD (Mon, 04 Feb 2019 14:07:49 GMT):
That is the account I'm trying to register via the CA server, instead of cryptogen

rickr (Mon, 04 Feb 2019 14:09:32 GMT):
AFAIK You can't create a *Peer Admin* with the SDK api

rickr (Mon, 04 Feb 2019 14:10:27 GMT):
@skarim @smithbk ^^^

pumicerD (Mon, 04 Feb 2019 14:11:16 GMT):
Ok

smithbk (Mon, 04 Feb 2019 15:10:22 GMT):
@rickr The fabric-ca-server REST API allows specifying attributes. The question is whether the java SDK APIs supports that.

rickr (Mon, 04 Feb 2019 15:11:35 GMT):
@smithbk setting those attributes will give a user peer admin capablities ? Join channels, install chaincode etc

smithbk (Mon, 04 Feb 2019 15:13:02 GMT):
@rickr No, I thought @pumicerD was attempting to do the same thing that the `fabric-ca-client` command above does

rickr (Mon, 04 Feb 2019 15:13:35 GMT):
Thanks -- just want to make sure it's clear

pumicerD (Mon, 04 Feb 2019 15:14:53 GMT):
@smithbk @rickr I was trying to register a peer admin with this yeah

rickr (Mon, 04 Feb 2019 15:16:36 GMT):
Ok - then as stated that's not possible.

pumicerD (Mon, 04 Feb 2019 15:17:35 GMT):
alright, I'll just go with the CLI then, thanks

mahoney1 (Mon, 04 Feb 2019 15:24:49 GMT):
Has joined the channel.

mahoney1 (Mon, 04 Feb 2019 15:25:03 GMT):
hi Fabric Developers just letting you know about the "Hyperledger Fabric Developer" community call (lasts approx 30-60 mins) currently scheduled for Thursday February 7th 5pm UTC (5pm UK, 12pm ET, 9am PT).  The plan is to initially host this community call bi-weekly via Zoom webconference and is aimed at : - helping the worldwide Fabric Developer community grow in their development journey (eg. developing applications, smart contracts, chaincode, developing clients, using the SDK etc - eg. whether its NodeJS, Java, Go etc etc) - caters for the developer perspective and the developer community. - help developers understand / hear more about exciting new things in Fabric,eg. features upcoming or work in progress - ie things that appeal to the developer - to foster more interest, best practices etc in developing with Hyperledger Fabric. - opportunity to ask questions of the Fabric team eg. you may have feedback/questions on your experiences developing with Fabric - to share stuff you've done with the community, eg sample code / sample use cases that others may be interested in If you wish to share content on a call, just let me know via email direct or DM me on Rocketchat (ID: mahoney1) and I'll put an item on the agenda. Provide the following: - the topic (state whether its presentation, or demo etc) - the full name of the presenter, and - approx length of your pitch in minutes The Zoom webconference ID is https://zoom.us/my/hyperledger.community  and the aim is to grow interest in the Fabric developer ecosystem (this 'Fabric Developer' call clearly has a much broader scope as indicated - feel free to make suggestions too !). The current agenda is shown here -> https://wiki.hyperledger.org/display/fabric/Fabric+Developer+-+Meeting+Agendas+ many thanks for your time - feel free to forward this email if you think it is of interest to a colleague. Paul O'Mahony Community Lead Fabric Developer

pumicerD (Mon, 04 Feb 2019 15:54:03 GMT):
I am trying to sign a query proposal with *Idemix* credentials. Setup : - added a MSP definition of type `idemix` in _configtx.yaml_ and added it to the profiles' _Organizations_ - generated the crypto material with both `cryptogen` and `idemixgen`, then channel artifacts with `configtxgen` - mounted the generated _IssuerPublicKey_ and _RevocationPublicKey_ on the `fabric-ca` container I use as my organization's MSP - get a `HFCAClient` instance for this server, enroll as the CA admin, register and enroll a regular user account (with the x509 MSP ID) - get an `IdemixEnrollment` for this user (with the Idemix MSP ID) - set the `HFClient` instance's user context to an `IdemixUser` created with this enrollment - send the query proposal I get the following error message in my _peer_'s logs : 2019-02-04 15:41:58.960 UTC [endorser] ProcessProposal -> DEBU 1914 Entering: request from 192.168.16.1:44874 `2019-02-04 15:41:58.960 UTC [protoutils] ValidateProposalMessage -> DEBU 1915 ValidateProposalMessage starts for signed proposal 0xc003300dc0 2019-02-04 15:41:58.960 UTC [protoutils] validateChannelHeader -> DEBU 1916 validateChannelHeader info: header type 3 2019-02-04 15:41:58.960 UTC [protoutils] checkSignatureFromCreator -> DEBU 1917 begin 2019-02-04 15:41:58.960 UTC [msp] GetManagerForChain -> DEBU 1918 Returning existing manager for channel 'mychannel' 2019-02-04 15:41:58.962 UTC [msp] deserializeIdentityInternal -> DEBU 1919 idemixmsp: deserializing identity 2019-02-04 15:41:58.963 UTC [protoutils] checkSignatureFromCreator -> DEBU 191a creator is &{idemixMSP1 `�̨�_b4q�󃓫�H����As��&������i�E���2����� �jEg�����8� �a�c} 2019-02-04 15:41:58.963 UTC [msp] Validate -> DEBU 191b Validating identity &{NymPublicKey:0xc00331ef90 msp:0xc001dec420 id:0xc0032fa380 Role:msp_identifier:"idemixMSP1" role:CLIENT OU:msp_identifier:"idemixMSP1" organizational_unit_identifier:"org1" certifiers_identifier:"\326\202\233\006v\210}N\236w\344\243\t<\312d):\321EU\362Ow\224\021\357\007]-q\247" associationProof:[10 68 10 3 ... 2019-02-04 15:41:59.021 UTC [protoutils] ValidateProposalMessage -> WARN 191c channel [mychannel]: creator certificate is not valid: Failed verifing with opts [&{ [] [{1 [111 114 103 49]} {2 4} {0 } {0 }] 3 [] 0 0xc0002d2840 0}]: signature invalid: APrime and ABar don't have the expected structure 2019-02-04 15:41:59.021 UTC [endorser] ProcessProposal -> DEBU 191d Exit: request from 192.168.16.1:44874`

pumicerD (Mon, 04 Feb 2019 15:54:03 GMT):
I am trying to sign a query proposal with *Idemix* credentials. Setup : - added a MSP definition of type `idemix` in _configtx.yaml_ and added it to the profiles' _Organizations_ - generated the crypto material with both `cryptogen` and `idemixgen`, then channel artifacts with `configtxgen` - mounted the generated _IssuerPublicKey_ and _RevocationPublicKey_ on the `fabric-ca` container I use as my organization's MSP - get a `HFCAClient` instance for this server, enroll as the CA admin, register and enroll a regular user account (with the x509 MSP ID) - get an `IdemixEnrollment` for this user (with the Idemix MSP ID) - set the `HFClient` instance's user context to an `IdemixUser` created with this enrollment - send the query proposal I get the following error message in my _peer_'s logs : 2019-02-04 15:41:58.960 UTC [endorser] ProcessProposal -> DEBU 1914 Entering: request from 192.168.16.1:44874 `2019-02-04 15:41:58.960 UTC [protoutils] ValidateProposalMessage -> DEBU 1915 ValidateProposalMessage starts for signed proposal 0xc003300dc0 2019-02-04 15:41:58.960 UTC [protoutils] validateChannelHeader -> DEBU 1916 validateChannelHeader info: header type 3 2019-02-04 15:41:58.960 UTC [protoutils] checkSignatureFromCreator -> DEBU 1917 begin 2019-02-04 15:41:58.960 UTC [msp] GetManagerForChain -> DEBU 1918 Returning existing manager for channel 'mychannel' 2019-02-04 15:41:58.962 UTC [msp] deserializeIdentityInternal -> DEBU 1919 idemixmsp: deserializing identity 2019-02-04 15:41:58.963 UTC [protoutils] checkSignatureFromCreator -> DEBU 191a creator is &{idemixMSP1 `�̨�_b4q�󃓫�H����As��&������i�E���2����� �jEg�����8� �a�c} 2019-02-04 15:41:58.963 UTC [msp] Validate -> DEBU 191b Validating identity &{NymPublicKey:0xc00331ef90 msp:0xc001dec420 id:0xc0032fa380 Role:msp_identifier:"idemixMSP1" role:CLIENT OU:msp_identifier:"idemixMSP1" organizational_unit_identifier:"org1" certifiers_identifier:"\326\202\233\006v\210}N\236w\344\243\t<\312d):\321EU\362Ow\224\021\357\007]-q\247" associationProof:[10 68 10 3 ... 2019-02-04 15:41:59.021 UTC [protoutils] ValidateProposalMessage -> WARN 191c channel [mychannel]: creator certificate is not valid: Failed verifing with opts [&{ [] [{1 [111 114 103 49]} {2 4} {0 } {0 }] 3 [] 0 0xc0002d2840 0}]: signature invalid: APrime and ABar don't have the expected structure 2019-02-04 15:41:59.021 UTC [endorser] ProcessProposal -> DEBU 191d Exit: request from 192.168.16.1:44874` @adc ^^^^

pumicerD (Mon, 04 Feb 2019 15:56:38 GMT):
Looks like the peer is detecting the type of credential correctly (idemix) but the MSP id expected is _idemixMSP1_

pumicerD (Mon, 04 Feb 2019 15:57:31 GMT):
Is there something else I forgot to set here ? I can send queries and transactions just fine when using x509 credentials

smallant (Mon, 04 Feb 2019 17:52:56 GMT):
Has joined the channel.

smallant (Mon, 04 Feb 2019 17:53:31 GMT):
Hi to all, I'm using java SDK e i would like to know wich property should i change to override this timeout: Sending proposal to peer2-org1 failed because of timeout(20000 milliseconds) expiration

rickr (Tue, 05 Feb 2019 02:15:16 GMT):
@adc Any ideas on pumicerD issue above ?

rickr (Tue, 05 Feb 2019 02:19:25 GMT):
@smallant https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L51

rickr (Tue, 05 Feb 2019 02:19:25 GMT):
@smallant https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L51 and here https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/config.properties#L7

helpsolution (Tue, 05 Feb 2019 07:22:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=r2HdPtPaGnmZRQcep) @rickr Thanks. Can I manually control a number of threads? If not, will it possible in the future?

14gracel (Tue, 05 Feb 2019 16:39:48 GMT):
Has joined the channel.

bestbeforetoday (Tue, 05 Feb 2019 17:34:14 GMT):
Using NOfEvents to wait for transactions sent to the orderer to be commited on peers... say I have 2 peers I want to wait for but one of those peers drops offline, so will only going to get the transaction commit event from one of the two peers, is the CompletableFuture returned by `sendTransaction()` going to just hang forever (or fail with TimeoutException)? Or is there some logic in there that notices the peer dropping offline and will complete in some state with just the one (of two) events received?

bestbeforetoday (Tue, 05 Feb 2019 17:34:14 GMT):
Using NOfEvents to wait for transactions sent to the orderer to be commited on peers... say I have 2 peers I want to wait for but one of those peers drops offline, so I'm only going to get the transaction commit event from one of the two peers, is the CompletableFuture returned by `sendTransaction()` going to just hang forever (or fail with TimeoutException)? Or is there some logic in there that notices the peer dropping offline and will complete in some state with just the one (of two) events received?

rickr (Tue, 05 Feb 2019 19:15:21 GMT):
Users need to put a timeout on their Futures

rickr (Tue, 05 Feb 2019 19:15:21 GMT):
Users need to put a timeout on their Futures Note that peer eventing services will continue to try and connect and start where left off. So, if it's just a glitch it should still recover

bestbeforetoday (Wed, 06 Feb 2019 10:00:26 GMT):
So if I want to notice that one of the two peers I would like to receive commit events from has dropped offline so that I can unblock after receiving the commit event from the single active peer, I need to use the peer eventing service directly instead of NOfEvents? And is there a handy code example of how that is done anywhere?

rickr (Wed, 06 Feb 2019 13:34:41 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L4201 ?

rickr (Wed, 06 Feb 2019 13:35:23 GMT):
So what do you plan on doing when you unblock ?

rickr (Wed, 06 Feb 2019 13:37:31 GMT):
How will you know when it just a temporary glitch that can recover ?

bestbeforetoday (Wed, 06 Feb 2019 13:43:08 GMT):
@rickr That link points to the NOfEvents source, right? I recall that isn't the code that actually does the listening; just that keeps track of what things events have been received from? And you mentioned already that it doesn't deal with peers going offline so I'd like to know how I can write code to deal with that. Can you help?

rickr (Wed, 06 Feb 2019 13:58:18 GMT):
I don't have code that deals with peers off line . I kind of like to understand your use case. Like I stated what do you plan to do ? I think applications should have been written to wait on the future for a specified time. If the application then gets a timeout the application can decide what's appropriate for it's own recovery. It could just give up and report the error back up. It can continue to poll the peers needed to see if the transaction is there. Decided if it sees it on one continue to assume it's good. Or some other action

rickr (Wed, 06 Feb 2019 13:58:18 GMT):
I don't have code that deals with peers off line . I kind of like to understand your use case. Like I stated what do you plan to do ? I think applications should and have been written to wait on the future for a specified time. If the application then gets a timeout the application can decide what's appropriate for it's own recovery. It could just give up and report the error back up. It can continue to poll the peers needed to see if the transaction is there. Decided if it sees it on one continue to assume it's good. Or some other action

bestbeforetoday (Wed, 06 Feb 2019 14:08:26 GMT):
What I'd like is to say, look for commit events from all peers in a particular org, and to unblock when for every one of those peers I have either received a commit event or the peer is observed as offline. Then, provided I have received at least one successful commit and no errors, move on. I don't want to wait some arbitrary period of time for a peer that is observed as offline to (maybe or maybe not) come back online.

rickr (Wed, 06 Feb 2019 14:09:12 GMT):
How do you determine a peer is offline ?

bestbeforetoday (Wed, 06 Feb 2019 14:09:37 GMT):
Does the peer eventing service provide any notification of a communication failure with a peer?

rickr (Wed, 06 Feb 2019 14:10:29 GMT):
It has a connect handler that makes attempts to reconnect ...

bestbeforetoday (Wed, 06 Feb 2019 14:10:48 GMT):
Will that allow me to do what I described above?

rickr (Wed, 06 Feb 2019 14:11:38 GMT):
I don't know how you can say the peer is off line as opposed to just temporarily down or a network glitch

bestbeforetoday (Wed, 06 Feb 2019 14:12:11 GMT):
Let's treat all those as the same case. Not currently communicating. Will the connect handler allow me to achieve that?

rickr (Wed, 06 Feb 2019 14:12:48 GMT):
You can overried it do what you want

bestbeforetoday (Wed, 06 Feb 2019 14:13:13 GMT):
Are there any examples of this API in use? I'm struggling to find examples and documentation to understand usage

rickr (Wed, 06 Feb 2019 14:13:47 GMT):
you see the the what default handler is doing and start from there

bestbeforetoday (Wed, 06 Feb 2019 14:14:10 GMT):
Can you point me at the right point in the code for that?

rickr (Wed, 06 Feb 2019 14:15:48 GMT):
I thought I sent it to you already in a note https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/main/java/org/hyperledger/fabric/sdk/Peer.java#L571

bestbeforetoday (Wed, 06 Feb 2019 14:23:40 GMT):
Thanks. So I'd need to: 1. Register a disconnect handler for all the peers. 2. Register a BlockListener with the channel to look for a specific transaction commit event. 3. Somehow tie together myself disconnects to current listening tasks. Is that roughly correct?

bestbeforetoday (Wed, 06 Feb 2019 14:24:37 GMT):
Any way to get the current disconnect handler before calling `setPeerEventingServiceDisconnected()` so I can delegate to the original handler with my replacement safely?

bestbeforetoday (Wed, 06 Feb 2019 14:25:05 GMT):
How do I get information from the block events?

bestbeforetoday (Wed, 06 Feb 2019 14:26:42 GMT):
Am I just after `getTransactionID()` and `isValid()` on the transaction events to know I've received a successful commit?

rickr (Wed, 06 Feb 2019 15:18:13 GMT):
Sounds about right in general. Familiarize yourself with integration test they show most what the sdk has. There's in End2endIT that has blockwalker goes through a block

httran88 (Wed, 06 Feb 2019 15:57:26 GMT):
Hi Rick

gravity (Wed, 06 Feb 2019 22:14:32 GMT):
Hi all is it possible to describe an endorsement policy so a transaction should be endorsed by 3 peers? the actual question is, how an endorsement policy correlates with the number of endorser peers to which a transaction is sent? I read the documentation about endorsement policies, but it is still quite confusing for me thanks in advance

MHBauer (Wed, 06 Feb 2019 22:36:01 GMT):
Has joined the channel.

gaijinviki (Thu, 07 Feb 2019 06:41:34 GMT):
@rickr, Hi, I am getting some issues with the `sendTransactionProposalToEndorsers()` method in Channel.java. I am calling the method like so : ``` request.setChaincodeId(..... discoveryOptions = Channel.DiscoveryOptions.createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM); channel1.sendTransactionProposalToEndorsers(request, discoveryOptions);``` I am getting a `NULL POINTER EXCEPTION` at `org.hyperledger.fabric.sdk.Channel.sendTransactionProposalToEndorsers(Channel.java:3663)` Line 3663 is `serviceDiscovery.networkDiscovery(transactionContext, true);` I am unable to figure out the reason. It will be great it you can kindly help. Thanks!

gaijinviki (Thu, 07 Feb 2019 06:41:34 GMT):
@rickr, Hi, I am getting some issues with the `sendTransactionProposalToEndorsers()` method in Channel.java. I am calling the method like so : ``` request.setChaincodeId(.....) discoveryOptions = Channel.DiscoveryOptions.createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM); channel1.sendTransactionProposalToEndorsers(request, discoveryOptions);``` I am getting a `NULL POINTER EXCEPTION` at `org.hyperledger.fabric.sdk.Channel.sendTransactionProposalToEndorsers(Channel.java:3663)` Line 3663 is `serviceDiscovery.networkDiscovery(transactionContext, true);` I am unable to figure out the reason. It will be great it you can kindly help. Thanks!

helpsolution (Thu, 07 Feb 2019 07:00:04 GMT):
Hello, I have problem while connecting to fabric(tls enabled) with using java sdk. I got next errors: Sending proposal to peer0-ru failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem ... Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching peer0-ru found. I using examples from github of java sdk. ` private final static String PATH_CRYPTO_CONFIG ="cloud/network_resources/crypto-config"; private final static String ORG1_PEER0_NAME = "xxx"; private final static String ORG1_PEER0_ADDRESS = "grpcs://xxxx:xxxx"; private final static String ORG1_PEER0_CERT = PATH_CRYPTO_CONFIG + "/peerOrganizations/xxx/tls/server.crt"; private final static String ORDERER_NAME = "xxx"; private final static String ORDERER_ADDRESS = "grpcs://xxxx:xxxx"; private final static String ORDERER_CERT = PATH_CRYPTO_CONFIG + "/ordererOrganizations/xxx/tls/server.crt"; ..... Properties ordererProperties = new Properties(); ordererProperties.setProperty("trustServerCertificate", "true"); ordererProperties.setProperty("pemFile", ORDERER_CERT); ordererProperties.setProperty("hostnameOverride", ORDERER_NAME); ordererProperties.setProperty("sslProvider", "openSSL"); ordererProperties.setProperty("negotiationType", "TLS"); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[]{5L, TimeUnit.MINUTES}); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[]{8L, TimeUnit.SECONDS}); Orderer orderer = fabClient.getInstance().newOrderer(ORDERER_NAME, ORDERER_ADDRESS, ordererProperties); Properties peer0MyOrgProperties = new Properties(); peer0MyOrgProperties.setProperty("trustServerCertificate", "true"); peer0MyOrgProperties.setProperty("pemFile", ORG1_PEER0_CERT); peer0MyOrgProperties.setProperty("hostnameOverride", ORG1_PEER0_NAME ); peer0MyOrgProperties.setProperty("sslProvider", "openSSL"); peer0MyOrgProperties.setProperty("negotiationType", "TLS"); peer0MyOrgProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); Peer peer = fabClient.getInstance().newPeer(ORG1_PEER0_NAME, ORG1_PEER0_ADDRESS, peer0MyOrgProperties); channel.addPeer(peer); channel.addOrderer(orderer); channel.initialize();` Can you help me?) thanks

helpsolution (Thu, 07 Feb 2019 07:00:04 GMT):
Hello, I have problem while connecting to fabric(tls enabled) with using java sdk. I got next errors: Sending proposal to peer0-ru failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem ... Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching peer0-ru found. I using examples from github of java sdk. ` private final static String PATH_CRYPTO_CONFIG ="cloud/network_resources/crypto-config"; private final static String ORG1_PEER0_NAME = "xxx"; private final static String ORG1_PEER0_ADDRESS = "grpcs://xxxx:xxxx"; private final static String ORG1_PEER0_CERT = PATH_CRYPTO_CONFIG + "/peerOrganizations/xxx/tls/server.crt"; private final static String ORDERER_NAME = "xxx"; private final static String ORDERER_ADDRESS = "grpcs://xxxx:xxxx"; private final static String ORDERER_CERT = PATH_CRYPTO_CONFIG + "/ordererOrganizations/xxx/tls/server.crt"; ..... Properties ordererProperties = new Properties(); ordererProperties.setProperty("trustServerCertificate", "true"); ordererProperties.setProperty("pemFile", ORDERER_CERT); ordererProperties.setProperty("hostnameOverride", ORDERER_NAME); ordererProperties.setProperty("sslProvider", "openSSL"); ordererProperties.setProperty("negotiationType", "TLS"); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[]{5L, TimeUnit.MINUTES}); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[]{8L, TimeUnit.SECONDS}); Orderer orderer = fabClient.getInstance().newOrderer(ORDERER_NAME, ORDERER_ADDRESS, ordererProperties); Properties peer0MyOrgProperties = new Properties(); peer0MyOrgProperties.setProperty("trustServerCertificate", "true"); peer0MyOrgProperties.setProperty("pemFile", ORG1_PEER0_CERT); peer0MyOrgProperties.setProperty("hostnameOverride", ORG1_PEER0_NAME ); peer0MyOrgProperties.setProperty("sslProvider", "openSSL"); peer0MyOrgProperties.setProperty("negotiationType", "TLS"); peer0MyOrgProperties.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); Peer peer = fabClient.getInstance().newPeer(ORG1_PEER0_NAME, ORG1_PEER0_ADDRESS, peer0MyOrgProperties); channel.addPeer(peer); channel.addOrderer(orderer); channel.initialize();` Can you help me?) thanks

gaijinviki (Thu, 07 Feb 2019 09:28:26 GMT):
Hello, I am getting the following error when initializing a channel ```Exception in thread "main" java.lang.UnsatisfiedLinkError: failed to load the required native library at io.netty.handler.ssl.OpenSsl.ensureAvailability(OpenSsl.java:327) at io.netty.handler.ssl.ReferenceCountedOpenSslContext.(ReferenceCountedOpenSslContext.java:202) at io.netty.handler.ssl.ReferenceCountedOpenSslContext.(ReferenceCountedOpenSslContext.java:191) at io.netty.handler.ssl.OpenSslContext.(OpenSslContext.java:34) at io.netty.handler.ssl.OpenSslClientContext.(OpenSslClientContext.java:188) at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:775) at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:446) at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:262) at org.hyperledger.fabric.sdk.Endpoint.createEndpoint(Endpoint.java:487) at org.hyperledger.fabric.sdk.Peer.initiateEventing(Peer.java:148) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1129) at com.example.pta.geode.demo.invocation.InvokePutChaincode.(InvokePutChaincode.java:89) at com.example.pta.geode.demo.TransactionAsyncEventListener2.initialize(TransactionAsyncEventListener2.java:239) at org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeDeclarablesMap(CacheCreation.java:617)``` Any idea how to solve this issue ?

gaijinviki (Thu, 07 Feb 2019 09:28:26 GMT):
Hello, I am getting the following error when initializing a channel ```Exception in thread "main" java.lang.UnsatisfiedLinkError: failed to load the required native library at io.netty.handler.ssl.OpenSsl.ensureAvailability(OpenSsl.java:327) at io.netty.handler.ssl.ReferenceCountedOpenSslContext.(ReferenceCountedOpenSslContext.java:202) at io.netty.handler.ssl.ReferenceCountedOpenSslContext.(ReferenceCountedOpenSslContext.java:191) at io.netty.handler.ssl.OpenSslContext.(OpenSslContext.java:34) at io.netty.handler.ssl.OpenSslClientContext.(OpenSslClientContext.java:188) at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:775) at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:446) at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:262) at org.hyperledger.fabric.sdk.Endpoint.createEndpoint(Endpoint.java:487) at org.hyperledger.fabric.sdk.Peer.initiateEventing(Peer.java:148) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1129) at com.rakuten.pta.geode.demo.invocation.InvokePutChaincode.(InvokePutChaincode.java:89) at com.rakuten.pta.geode.demo.TransactionAsyncEventListener2.initialize(TransactionAsyncEventListener2.java:239) at org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeDeclarablesMap(CacheCreation.java:617)``` Any idea what could be the problem?

gaijinviki (Thu, 07 Feb 2019 09:28:26 GMT):
Hello, I am getting the following error when initializing a channel ```Exception in thread "main" java.lang.UnsatisfiedLinkError: failed to load the required native library at io.netty.handler.ssl.OpenSsl.ensureAvailability(OpenSsl.java:327) at io.netty.handler.ssl.ReferenceCountedOpenSslContext.(ReferenceCountedOpenSslContext.java:202) at io.netty.handler.ssl.ReferenceCountedOpenSslContext.(ReferenceCountedOpenSslContext.java:191) at io.netty.handler.ssl.OpenSslContext.(OpenSslContext.java:34) at io.netty.handler.ssl.OpenSslClientContext.(OpenSslClientContext.java:188) at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:775) at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:446) at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:262) at org.hyperledger.fabric.sdk.Endpoint.createEndpoint(Endpoint.java:487) at org.hyperledger.fabric.sdk.Peer.initiateEventing(Peer.java:148) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1129) at com.example.pta.geode.demo.invocation.InvokePutChaincode.(InvokePutChaincode.java:89) at com.example.pta.geode.demo.TransactionAsyncEventListener2.initialize(TransactionAsyncEventListener2.java:239) at org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeDeclarablesMap(CacheCreation.java:617)``` Any idea what could be the problem?

gravity (Thu, 07 Feb 2019 09:40:35 GMT):
@gaijinviki met similar error previously try to add these dependencies: ``` io.netty netty-tcnative 2.0.10.Final provided io.netty netty-tcnative-boringssl-static 2.0.10.Final provided ```

gaijinviki (Thu, 07 Feb 2019 09:40:54 GMT):
Thank you, let me try that.

gravity (Thu, 07 Feb 2019 09:42:59 GMT):
@helpsolution try to add an additional property for peers and orderers: ``` properties.put("ssl-target-name-override", ${PEER_NAME | ORDERER_NAME}) ```

gaijinviki (Thu, 07 Feb 2019 09:54:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H7nxZ3PSBwqFM3TGn) @gravity , did not work. Still the same issue.

gaijinviki (Thu, 07 Feb 2019 09:54:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=H7nxZ3PSBwqFM3TGn) @gravity @gravity, did not work. Still the same issue.

gravity (Thu, 07 Feb 2019 10:01:11 GMT):
@gaijinviki what is the flow to reproduce this?

gravity (Thu, 07 Feb 2019 10:02:02 GMT):
and which version of sdk do you use?

gaijinviki (Thu, 07 Feb 2019 10:19:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8uBzd3T5Z8esFKkRk) sorry my bad, the libs were not copied to the right place. It worked perfectly. Thank you!

mahoney1 (Thu, 07 Feb 2019 12:41:30 GMT):
a reminder that the Fabric Developer Community call later today is at 5pm UTC (5pm UK, 12pm ET, 9am PT) using Zoom: https://zoom.us/my/hyperledger.community .  The agenda is here -> https://wiki.hyperledger.org/display/fabric/Fabric+Developer+-+Meeting+Agendas+ . Please come join us, hear about exciting new work in progress, give feedback, ask questions or share your stories ! More info on the call can be found in this mail -> https://lists.hyperledger.org/g/fabric/message/5475 ... later, Paul (Fabric Developer Community Lead)

DeepakDahiya (Thu, 07 Feb 2019 13:12:36 GMT):
Has joined the channel.

rickr (Thu, 07 Feb 2019 13:38:36 GMT):
@gravity I don't think there's a way to pick a specific peer. Endorsements are by organization https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/fixture/sdkintegration/chaincodeendorsementpolicyAllMembers.yaml That is an example of needing both peers organizations to sign the endorsement for the integration tests. If the documentation is not clear I highly encourage you to bring this up in the #fabric-documentation so they can look on improving it.

rickr (Thu, 07 Feb 2019 13:48:36 GMT):
@gaijinviki and @gravity Our verification test are run with TLS enabled and pass. So I'm fairly certain the required dependencies are ok.

gaijinviki (Thu, 07 Feb 2019 14:01:19 GMT):
@rickr I had to add the dependencies to make it work. Maybe something wrong with my setup. And I am not using TLS, the error occurred during eventing initiation `org.hyperledger.fabric.sdk.Peer.initiateEventing(Peer.java:148)`

gravity (Thu, 07 Feb 2019 15:06:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QmSd8F5Cth9JHchk6) @rickr Actually I do use an endorsement policy similar to this. But I confused it with the validation of transaction proposal responses from the endorsement peers. I thought that if I have a policy (now I know that this policy is invaild) `AND("org1.peer", "org1.peer", "org3.peer")`, means that a transaction proposal must be sent to at least 3 endorsement peers for the endorsement.

gravity (Thu, 07 Feb 2019 15:06:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QmSd8F5Cth9JHchk6) @rickr Actually I do use an endorsement policy similar to this. But I confused it with the validation of transaction proposal responses from the endorsement peers. I thought that if I have a policy (now I know that this policy is invaild) `AND("org1.peer", "org1.peer", "org1.peer")`, means that a transaction proposal must be sent to at least 3 endorsement peers for the endorsement.

gravity (Thu, 07 Feb 2019 15:08:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pohSEZbckh58Hcc8B) @rickr so you are saying that it should work without adding these dependencies explicitly to an application, right?

rickr (Thu, 07 Feb 2019 15:30:09 GMT):
Endorsements are by organization. You would need an endorsement from a peer for each organization in the case I pointed to. If you don't have that and your send your endorsements to the Orderer the committers SHOULD mark the transaction as bad.

jdfigure (Thu, 07 Feb 2019 15:59:38 GMT):
service discovery

jdfigure (Thu, 07 Feb 2019 16:17:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jSYC6qDCKRJWhiTbk) @gravity @gravity - I'm seeing this same error using Service Discovery - were you able to resolve?

mahoney1 (Thu, 07 Feb 2019 18:01:44 GMT):
the SDK deck from today's Fabric Developer call is attached to the JIRA FYI https://jira.hyperledger.org/browse/FABJ-400

gravity (Thu, 07 Feb 2019 18:11:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=JAo25Cki8xLFXfFJa) @jdfigure no, it did not work for me

gravity (Thu, 07 Feb 2019 18:12:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HJe2RmrEh8iKzBaSr) @rickr now it's clear. transaction endorsement is done under the hood by the organization's entity that is requested in the policy.

jdfigure (Thu, 07 Feb 2019 21:06:26 GMT):
@gravity @rickr I think I've discovered why Service Discovery wasn't working (peer reporting `TLS handshake failed with error tls: client didn't provide a certificate`). It seems there's a bug in the `org.hyperledger.fabric.sdk.Channel#addPeer(org.hyperledger.fabric.sdk.Peer, org.hyperledger.fabric.sdk.Channel.PeerOptions)` method when using the `clientCertBytes` property instead of `clientCertFile`. This check fails to find the `clientCertBytes` property: ``` if (peerOptions.getPeerRoles().contains(PeerRole.SERVICE_DISCOVERY)) { final Properties properties = peer.getProperties(); if ((properties == null) || (isNullOrEmpty(properties.getProperty("clientCertFile")) && isNullOrEmpty(properties.getProperty("clientCertBytes")))) { TLSCertificateBuilder tlsCertificateBuilder = new TLSCertificateBuilder(); TLSCertificateKeyPair tlsCertificateKeyPair = tlsCertificateBuilder.clientCert(); peer.setTLSCertificateKeyPair(tlsCertificateKeyPair); } discoveryEndpoints.add(peer.getEndpoint()); } ``` Calling `properties.getProperty("clientCertBytes")` returns null because the property value is not a string. Instead, it should be using `properties.containsKey("clientCertBytes")`. When I used `clientCertFile` instead, everything works. The reason the ServiceDiscoveryIT tests work is because they are also using cert files instead of cert bytes.

gravity (Thu, 07 Feb 2019 21:09:26 GMT):
@jdfigure that's very interesting. thanks for letting me know

dan13 (Thu, 07 Feb 2019 23:32:17 GMT):
Is there a Java SDK equivalent to Go SDK Client.Execute (https://godoc.org/github.com/hyperledger/fabric-sdk-go/pkg/client/channel#Client.Execute) which "automatically chooses endorsers, service discovery, requests endorsements, signature validation, submits to the ordering service, watches events for commit, configurable retries" per https://jira.hyperledger.org/browse/FABN-692?focusedCommentId=48582&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-48582? It seems the Java SDK requires sendTransactionProposal, sendTransaction, a CompleteableFuture.get, and some wrapping retry logic to accomplish same -- much more developer complexity required

anjalinaik (Fri, 08 Feb 2019 04:24:11 GMT):
Hi All. Is there an option in fabric-java-sdk to upgrade a chaincode?

gaijinviki (Fri, 08 Feb 2019 05:23:47 GMT):
Hello, I am using java sdk to do service discovery during channel initiation. The peer external endpoint is set to `CORE_PEER_GOSSIP_EXTERNALENDPOINT=mycustomurl:8051` and so the sdk can connect to the peer, but the discovery peer is passing the orderer address as `orderer0.example.com`, and hence the sdk cannot resolve that. How can I change the external address of the orderer, preferably via some environment variable ?

gaijinviki (Fri, 08 Feb 2019 05:23:47 GMT):
Hello, I am using service discovery during channel initiation. The `CORE_PEER_GOSSIP_EXTERNALENDPOINT=mycustomurl:8051` and so the sdk can connect to the right peer, but the discovery peer is passing the orderer address as `orderer0.example.com`, and hence the sdk cannot resolve that. How can I change the address of the orderer, preferably via some environment variable ?

andrew-coleman (Fri, 08 Feb 2019 09:40:06 GMT):
@dan13 we are currently working on this for v2.0. See https://jira.hyperledger.org/browse/FABJ-400

bestbeforetoday (Fri, 08 Feb 2019 12:00:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=x7we86ME3KjKbYLfv) @jdfigure Is there a Jira for this? If not, it would be good to raise: https://jira.hyperledger.org/projects/FABJ/issues

kevinkbc (Fri, 08 Feb 2019 14:37:23 GMT):
does anyone have a good example of adding a lot of stuff at once on the ledger?

kevinkbc (Fri, 08 Feb 2019 14:39:36 GMT):
I've made method using an invoke "add" that adds a single record to the ledger. Now I want to add a list (10000+). i tried to use a for executing for each element in the list but I got this "EE-ManagedExecutorService-default-Thread-4) failed to execute transaction 441ff090abf44ae948fe8b7f0de0f36e48b2b0cce170785b66cb172005dc893d: failed to register event:1.4 as launching: chaincode event:1.4 has already been launched"

aatkddny (Fri, 08 Feb 2019 15:35:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Wetynfb4Cs9Z6Ej5j) @kevinkbc I only have an example from 1.2 - netty saturated and started throwing exceptions at about the 25 concurrent thread mark. I had a different issue to fix and never got back to it, so we (still) throttle.

kevinkbc (Fri, 08 Feb 2019 15:37:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=wAEp9yKBtwgHak6ro) @aatkddny I am usinh hyperleddeger fabric 1.2 and sdk 1.2

aatkddny (Fri, 08 Feb 2019 15:46:25 GMT):
then don't try to put too much in at once.

jdfigure (Fri, 08 Feb 2019 16:03:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mKqTAcbGEC8HHkrLs) @bestbeforetoday I don't I have access to add a JIRA ticket.

bestbeforetoday (Fri, 08 Feb 2019 16:06:41 GMT):
@jdfigure I think you just need to be logged into Jira with a Linux Foundation ID, which I guess you have to connect to RocketChat

kevinkbc (Fri, 08 Feb 2019 16:56:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=omnXBTMyaNSdN3anc) @aatkddny I dont have much experience with multithread. Is there a simple way to control the number of threads?

kevinkbc (Fri, 08 Feb 2019 17:00:32 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dMZ7M8pJArWGAGEEZ) I noticed it is currently using 5 threads. So i guess i have to use more threads, or addmore information in a block

jdfigure (Fri, 08 Feb 2019 17:02:59 GMT):
@bestbeforetoday I'm oblivious to the obvious sometimes: https://jira.hyperledger.org/browse/FABJ-406

aatkddny (Fri, 08 Feb 2019 17:35:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dMZ7M8pJArWGAGEEZ) @kevinkbc I mean on your input side from the list. I was using a camel route as a consumer from a messaging system in my case. Under the covers it's an ExecutorService and you can set the thread count in there. You will hit the "my thread doesn't return until the orderer has cut a block" limit too if you are trying for throughput. You'll see...

smallant (Fri, 08 Feb 2019 17:56:01 GMT):
is there any way to change the transaction timeout? What property should i change? Currently having this error after increasing the proposal timeout: 2019-02-08 14:14:07.179 ERROR 82913 --- [nio-9999-exec-1] org.hyperledger.fabric.sdk.Channel : Sending proposal to peer1-org1 failed because of: gRPC failure=Status{code=UNKNOWN, description=error executing chaincode: failed to execute transaction: timeout expired while executing transaction, cause=null}

circlespainter (Sun, 10 Feb 2019 14:56:29 GMT):
Has joined the channel.

mahoney1 (Mon, 11 Feb 2019 11:44:02 GMT):
FYI everyone - edited recording (zip containing MP4, transcripts) of the Fabric Developer Community call (Feb 7) is out on the Hyperledger Fabric wiki -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

kevinkbc (Mon, 11 Feb 2019 12:51:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=e9NdQrdAFeTgCntLQ) @aatkddny thanks

smallant (Mon, 11 Feb 2019 13:23:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=icThiTDYscSGWYxSQ) anyone that can help me on this?

knagware9 (Mon, 11 Feb 2019 13:45:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=RhjENhcurGkkkbGv2) @smallant first try to change with invoke.js file ,,there will be timeout paramter and second you can modify core.yaml file for timour

rickr (Mon, 11 Feb 2019 14:10:47 GMT):
@smallant https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L484 ? and .. https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/config.properties#L6 and .. https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L51

smallant (Mon, 11 Feb 2019 14:50:43 GMT):
the proposal time is high and i can change. This gives me after I execute an heavy duty chaincode that usually takes more than 30s

smallant (Mon, 11 Feb 2019 14:50:55 GMT):
the proposal timeout is currently on the 60 sec

kevinkbc (Mon, 11 Feb 2019 17:15:52 GMT):
failed to execute transaction f675475c11fea75da9751e1dd36fc53d43becc8c545d1ba442e6c5e8a2048c7c: failed to register [chaincode name]:[chaincode version] as launching: chaincode [chaincode name]:[chaincode version] has already been launched sdk and fabric v1.2 Any help on this?

vtech (Tue, 12 Feb 2019 04:39:39 GMT):
Has joined the channel.

chill37 (Tue, 12 Feb 2019 04:44:40 GMT):
ENDORSEMENT policy loading without service discovery. Is it possible to load the endorsement policy layout without the service discovery in fabric JAVA Sdk? I can't seem to find it....if anyone could give me a hint on this, I would greatly appreciate it.

biswaranjan (Tue, 12 Feb 2019 05:04:10 GMT):
Has joined the channel.

vtech (Tue, 12 Feb 2019 12:34:56 GMT):
Hi All, Is there any example to test Idemix & Private data in single transaction? i found independent Junit for both but while trying to integrate both doesn't work as it fails in CA name assertion. Any help /pointer is really appreciated.

rickr (Tue, 12 Feb 2019 15:29:34 GMT):
@vtech I don't see from an SDK perspective it would make a difference. From the SDK the API is pretty much independent. With out any more details pointing to an SDK issue the question I think you should ask on the #fabric-peer-endorser-committer is what testing they've done prior to release that shows it's working.

rickr (Tue, 12 Feb 2019 15:29:34 GMT):
@vtech I don't see from an SDK perspective it would make a difference. From the SDK the API is pretty much independent. With out any more details pointing to an SDK issue the question I think you should ask on the #fabric-peer-endorser-committer is what testing they've done prior to release that shows they both work together

rickr (Tue, 12 Feb 2019 15:39:40 GMT):
@chill37 The endorsement policy is specified when the chaincode is instantiated. It can't be expected that the SDK knows what the endorsement policy really is for any any chaincode. The chaincode could have been instantiated by some entirety different organization than the client/SDK is running in. Thus service discovery. Short of that there _may_ be out of bound knowledge/agreement/policy what is needed.

loneimmortal (Tue, 12 Feb 2019 15:57:45 GMT):
Has joined the channel.

kocahan (Tue, 12 Feb 2019 20:14:31 GMT):
Has joined the channel.

chill37 (Wed, 13 Feb 2019 04:28:48 GMT):
@rickr I see. But since the chaincode has its policy written (somewhere), can't I load the policy that is lying somewhere? isn't there a way to load this? somewhere from Channel.class or ChaincodeSpec? I know and tested the service discovery where we can load and select peers based on the policy. I was hoping I could do the same without the discovery. For now, my setup is that I'm instantiating the Chaincode with cli. Then I use JAVA Sdk to query/invoke. But I would like to know the policy so that I can only call the necessary peers. Thanks!

anjalinaik (Wed, 13 Feb 2019 05:59:34 GMT):
Hi Experts.How do i install and instantiate a java chaincode using fabric-java-sdk?

chill37 (Wed, 13 Feb 2019 07:00:04 GMT):
@rickr oh now I get it. I can use service discovery to get the endorsement layout only right? At first I thought service discovery should be only used when query/invoke. is it possible to use service discovery functions even when I don't have any peers property as "discover:true"?

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as ``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ```

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as below. I have verified idemix user is set up , am I missing anything ?``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ```

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as below. I have verified idemix user is set up , am I missing anything ?``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ```

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as below. I have verified idemix user is set up , am I missing anything ?``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ``` I am trying to retrieve the idemix credential in private_data _chaincode ``` // Getting attributes from an idemix credential ou, found, err := cid.GetAttributeValue(stub, "ou"); logger.Info("ou is *******************************: " + ou) if !strings.HasSuffix(ou, "department1") { return shim.Error(fmt.Sprintf("Incorrect 'ou' returned, got '%s' expecting to end with 'department1'", ou)) } ```

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as below. I have verified idemix user is set up , am I missing anything ?``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ``` I am trying to retrieve the idemix credential in private_data _chaincode ``` Getting attributes from an idemix credential ou, found, err := cid.GetAttributeValue(stub, "ou"); logger.Info("ou is *******************************: " + ou) if !strings.HasSuffix(ou, "department1") { return shim.Error(fmt.Sprintf("Incorrect 'ou' returned, got '%s' expecting to end with 'department1'", ou)) } ```

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as below. I have verified idemix user is set up , am I missing anything ?``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ``` I am trying to retrieve the idemix credential in private_data _chaincode ``` //Getting attributes from an idemix credential ou, found, err := cid.GetAttributeValue(stub, "ou"); logger.Info("ou is *******************************: " + ou) if !strings.HasSuffix(ou, "department1") { return shim.Error(fmt.Sprintf("Incorrect 'ou' returned, got '%s' expecting to end with 'department1'", ou)) } ```

vtech (Wed, 13 Feb 2019 07:07:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=F3RKHXxaogs2KnaMj) @rickr Error trace I am getting as below. I have verified idemix user is set up , am I missing anything ?``` Now query chaincode ChaincodeID(private_data_cc7_go:github.com/private_data_cc:1) on channel bar for the value of b expecting to see: 250 java.lang.AssertionError: Failed query proposal from peer peer0.org2.example.com status: FAILURE. Messages: Incorrect 'ou' returned, got '' expecting to end with 'department1'. Was verified : false at org.junit.Assert.fail(Assert.java:88) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.queryChaincodeForExpectedValue(PrivateDataIT.java:588) at org.hyperledger.fabric.sdkintegration.PrivateDataIT.lambda$1(PrivateDataIT.java:407) ``` I am trying to retrieve the idemix credential in private_data _chaincode ``` // Invoke makes payment of X units from A to B func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { logger.Info("########### private_data_cc Invoke ###########") function, args := stub.GetFunctionAndParameters() // Getting attributes from an idemix credential ou, found, err := cid.GetAttributeValue(stub, "ou"); logger.Info("ou is *******************************: " + ou) if !strings.HasSuffix(ou, "department1") { return shim.Error(fmt.Sprintf("Incorrect 'ou' returned, got '%s' expecting to end with 'department1'", ou)) } ```

Subhankar 3 (Wed, 13 Feb 2019 11:35:54 GMT):
tls

rickr (Wed, 13 Feb 2019 13:22:21 GMT):
@anjalinaik https://github.com/hyperledger/fabric-sdk-java/tree/a2140f9bba57a63c58d9ee8579fea7164bf3beb2#end-to-end-test-scenario ?

rickr (Wed, 13 Feb 2019 13:22:21 GMT):
@anjalinaik https://github.com/hyperledger/fabric-sdk-java/tree/a2140f9bba57a63c58d9ee8579fea7164bf3beb2#end-to-end-test-scenario End2endIT.java ?

rickr (Wed, 13 Feb 2019 13:35:04 GMT):
@vtech Too little to go on and probably better asked on #fabric-chaincode-dev. We have a sample that is running I think that's doing the same. It appears to be ok. https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/fixture/sdkintegration/gocc/sampleIdemix/src/github.com/example_cc/example_cc.go#L88

rickr (Wed, 13 Feb 2019 13:39:11 GMT):
@chill37 Not sure I understand you question. The example for service discovery is there - https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java Adds peer with service discovery role and creates channel and invokes chaincode.

rickr (Wed, 13 Feb 2019 13:39:11 GMT):
@chill37 Not sure I understand your question. The example for service discovery is there - https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java Adds peer with service discovery role and creates channel and invokes chaincode.

vtech (Wed, 13 Feb 2019 15:20:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gHA69is6pSXw4puu8) @rickr I am trying to execute private data with idemix set up. I have set up the idemix credentials and used the private data chaincode (https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/fixture/sdkintegration/gocc/samplePrivateData/src/github.com/private_data_cc/private_data_cc.go ). Now in this private data chaincode while retrieving the ou attributes `ou, found, err := cid.GetAttributeValue(stub, "ou");` throws the above error.

vtech (Wed, 13 Feb 2019 15:20:51 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gHA69is6pSXw4puu8) @rickr I am trying to execute private data with idemix set up. I have set up the idemix credentials and used the private data chaincode (https://github.com/hyperledger/fabric-sdk-java/blob/a2140f9bba57a63c58d9ee8579fea7164bf3beb2/src/test/fixture/sdkintegration/gocc/samplePrivateData/src/github.com/private_data_cc/private_data_cc.go ). Now in this private data chaincode while retrieving the ou attributes `ou, found, err := cid.GetAttributeValue(stub, "ou");` throws the above error. What can be wrong/missing in this process ?

rickr (Wed, 13 Feb 2019 15:29:56 GMT):
@vtech can you _simplify_ ? Add to your chanincode a new function that just returns back a string "i'm good" and do that GetAttributeValue so there's no privadata involved. Also as stated I don't think the place to start here is on this channel. It's really a #fabric-chaincode-dev channel where issue rise while executing chaincode should be worked out. The experts on that should be monitoring it.

vtech (Wed, 13 Feb 2019 15:42:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=c3WqNhaonBfJxA8ww) @rickr Yeah with out private data it works fine and i am able to get the GetAttributeValue , but having issue while trying with private data. I will further ask it in #fabric-chaincode-dev . Thanks.

allenyang (Thu, 14 Feb 2019 08:40:17 GMT):
Has joined the channel.

danacr (Thu, 14 Feb 2019 20:05:30 GMT):
Has left the channel.

pchochu (Thu, 14 Feb 2019 20:58:37 GMT):
Has joined the channel.

jjean (Fri, 15 Feb 2019 09:22:18 GMT):
Has joined the channel.

jjean (Fri, 15 Feb 2019 09:43:22 GMT):
Hi, I'm trying to integrate the java Fabric sdk (v2.0) to my app built with Gradle (it's a JHipster generated app, with a Java, Spring back-end) to query and invoke my 1.4 Hyperledger Fabric network. After reading the fabric sdk README, I guess I have to add the maven dependencie and the .jar of the Fabric sdk somewhere, any hint/advice please ?

jjean (Fri, 15 Feb 2019 09:43:22 GMT):
Hi, I'm trying to integrate the java Fabric sdk to my app built with Gradle (it's a JHipster generated app, with a Java, Spring back-end) to query and invoke my 1.4 Hyperledger Fabric network. After reading the fabric sdk README, I guess I have to add the maven dependencie and the .jar of the Fabric sdk somewhere, any hint/advice please ?

dan13 (Fri, 15 Feb 2019 14:28:59 GMT):
@jjean is this what you are looking for? https://github.com/hyperledger/fabric-sdk-java

jjean (Fri, 15 Feb 2019 14:50:32 GMT):
Thank you for your answer @dan13, yes I found the fabric sdk here, I successfully added the .jar to my Gradle and I'm now trying to understand the End to end test to send query and invoke the Hyperledger network of the tutorial "build your first network"...

dan13 (Fri, 15 Feb 2019 15:52:28 GMT):
@jjean you may find https://github.com/IBM/blockchain-application-using-fabric-java-sdk and https://medium.com/@lkolisko/tutorial-invoking-chaincode-from-hyperledger-fabric-java-sdk-e8dea535a1be and https://github.com/vishal3152/HyperledgerFabric-Java-Client may be useful to get started.

dan13 (Fri, 15 Feb 2019 15:52:28 GMT):
@jjean you may find https://github.com/IBM/blockchain-application-using-fabric-java-sdk and https://medium.com/@lkolisko/tutorial-invoking-chaincode-from-hyperledger-fabric-java-sdk-e8dea535a1be and https://github.com/vishal3152/HyperledgerFabric-Java-Client are useful to get started. I have not found a good full solution example available anywhere yet.

rickr (Fri, 15 Feb 2019 19:33:47 GMT):
@jjean If _you're just starting off_ I'd recommend what the README.md suggest. Have it pass the Integration test. Build Successful indicates the tests are working with the fabric configuration provided (_fabric.sh_ script) and all is setup. Then import and get everything resolved in your IDE. Debugging the integration tests shows everything you can do and lets you follow the code. Once done you have a place to start copying code for your own application.

gravity (Mon, 18 Feb 2019 09:41:08 GMT):
hi @rickr what is the point of setting up the `version` field in `ChaincodeID` for `TransactionProposalRequest` and `QueryByChaincodeRequest` when it's actually is ignored? for example, if I install a chaincode on channel `ch1` version `1.0` and instatiate it, and later try to send transaction proposal or query request, I can put any other version to the ChaincodeID of the proposal/query, for example `1.0qwerty` and it will proceed. But, if do not put version to the `ChaincodeID`, it will throw NPE

jjean (Mon, 18 Feb 2019 12:38:53 GMT):
Hi, how could I turn off the following logs for Java SDK? `2019-02-18 13:35:55.126 DEBUG 6061 --- [pool-3-thread-1] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 3, name: eventhub01, channelName: mychannel, url: grpc://localhost:7053} connect is done with connect status: false 2019-02-18 13:35:55.130 DEBUG 6061 --- [-worker-ELG-1-4] io.grpc.netty.NettyClientHandler`

rickr (Mon, 18 Feb 2019 13:59:09 GMT):
@jjean You can control sdk logging by using log4j . That is DEBUG and by default the SDK is in WARN level which should not produce that.

rickr (Mon, 18 Feb 2019 14:14:54 GMT):
@gravity ChaincodeID mirrored protobuf structure. It was to uniquely identify the chaincode but in the early days things kept chainging. The idea was if you set it appropriately the SDK would use from it what was needed. Please submit a JIRA for the NPE case you're observing with a quick example that should not happen. It must be a non common scenario as no one as reported it. There is a change coming in 2.0 that entirely changes chaincode deployment and ChaincodeID should will not be used anymore with that.

gravity (Mon, 18 Feb 2019 16:52:12 GMT):
@rickr ok, will report that. there is another question: what happens after chaincode upgrade? does the chaincode with the newer version become the default chaincode to be called on all subsequent chaincode invocations?

rickr (Mon, 18 Feb 2019 16:53:58 GMT):
@gravity yes only the latest.

gravity (Mon, 18 Feb 2019 16:58:21 GMT):
got it, thanks

jjean (Mon, 18 Feb 2019 17:23:21 GMT):
Thanks @rickr !

mahoney1 (Mon, 18 Feb 2019 17:29:49 GMT):
fyi / heads-up : next Fabric Developer Community call is planned for this Thurs February 21st - https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Community+Call - contributions are welcome to the agenda ! More info on the call can be found [here](https://lists.hyperledger.org/g/fabric/topic/hyperledger_fabric_developer/29654592?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,29654592)

jjean (Tue, 19 Feb 2019 13:55:10 GMT):
Hi, could you tell me if the call to `channel.sendTransactionProposal(request, channel.getPeers())` (channel is an instance of `org.hyperledger.fabric.sdk.Channel`) is busy waiting ?

rickr (Tue, 19 Feb 2019 15:33:26 GMT):
@jjean It waits for peers to endorse (run) the chaincode or times out.

jjean (Tue, 19 Feb 2019 15:35:41 GMT):
@rickr I meant to ask : is `sendTransactionProposal` an asynchronous method ?

rickr (Tue, 19 Feb 2019 15:36:17 GMT):
no

jjean (Tue, 19 Feb 2019 15:36:45 GMT):
Ok, thanks

jdfigure (Tue, 19 Feb 2019 17:11:34 GMT):
Has anyone experienced a high number of connections from the Java SDK to an anchor peer? We're trying to track down a memory issue on our peers (seeing upwards of 20GB RAM used by our anchor peer). We're seeing that the SDK is establishing 22K connections to the anchor peer under load. It seems to be related to the default ExecutorPool settings in `HFClient`. We've turned off all event listeners. Any ideas?

rickr (Tue, 19 Feb 2019 18:11:25 GMT):
@jdfigure I've not heard of any issues. I knew one group that was creating the channel doing the request, shutting down the channel .. repeat for each request which caused problems. So what version of the SDK and when you say you turned off all event listeners .. I assume that just added info and the problem persists?

jdfigure (Tue, 19 Feb 2019 19:25:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bgMisZ9Ns3SQS4BXM) @rickr Yes, the fact that we turned off event listeners was added info. We were doing something similar (i.e. creating HFClient and channel per request). Right now we're modifying our our approach to use a singleton HFClient instance, re-using channels on that client, and using the TransactionRequest.setUserContext for transaction-level user context. I assume that's a better model?

rickr (Tue, 19 Feb 2019 20:12:05 GMT):
@jdfigure yes

jdfigure (Tue, 19 Feb 2019 20:26:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hzhxYoWAjQfqtQpwG) @rickr thanks for your input - our singleton HFClient and channel re-use refactor is showing tremendous improvements.

gravity (Tue, 19 Feb 2019 20:59:18 GMT):
Hello. How to handle the situation when the enrollment certificates for peers are expired? can I issue the reenroll request for peers from an application and expect that peer's enrollment cert will be renewed?

gravity (Tue, 19 Feb 2019 20:59:18 GMT):
Hello. How to handle the situation when the enrollment certificates for peers are expired? can I issue the reenroll request for peers from an application and expect that peer's enrollment cert will be renewed? @skarim

gravity (Tue, 19 Feb 2019 20:59:18 GMT):
Hello. How to handle the situation when the enrollment certificates for peers are expired? can I issue the reenroll request for peers from an application and expect that peer's enrollment cert will be renewed?

rickr (Tue, 19 Feb 2019 21:08:21 GMT):
@gravity I don't think that will work. Probably better asked on #fabric-peer-endorser-committer channel

skarim (Tue, 19 Feb 2019 21:30:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hfoYFGEt75SMtKWmW) @gravity If the certificate is expired, you would not be able to use `reenroll` as the certificate would fail to pass validation cause it's expired. In this case, you would have to use `enroll` using your username/password. Once, you enroll you will get back a new certificate and this certificate would have to be used by the peer.

gravity (Tue, 19 Feb 2019 22:02:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yRGd8WWxT9jd3zovM) @skarim for example, if a certificate is going to be expired in, let's say, 5 days, I can `reenroll` peer's certificate, and to use this reenrolled certificate a peer must be restarted, right? and the same for the `enroll` when the certificate expired - peer must be restarted, right? are there any other actions to be done to accept this newly enrolled or re-enrolled certificate?

skarim (Tue, 19 Feb 2019 22:33:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gkcw9Y2nRCdK2rprF) @gravity If it hasn't expired yet, then yes you can use `reenroll`. After getting the new certificate, a peer restart is required. I believe that should be it.

gravity (Tue, 19 Feb 2019 22:52:24 GMT):
@skarim got it, thanks

aatkddny (Tue, 19 Feb 2019 23:24:31 GMT):
haven't had a need to go through the sdk for a while. is there a way to tell events that haven't been

aatkddny (Tue, 19 Feb 2019 23:24:31 GMT):
haven't had a need to go through the sdk for a while, and i'll do so tomorrow, but i'm trying to save some time searching. we've been losing events because we've had some issues with peer instability in the cloud. is there an example of a way to tell the events that haven't been triggered on a peer and to replay them in the sdk at all, or something i can co-opt, or am i going to be walking the blocks and dummying events from the tx manually?

sandy (Wed, 20 Feb 2019 04:16:10 GMT):
Has joined the channel.

aatkddny (Wed, 20 Feb 2019 13:07:45 GMT):
Answering my own question - haven't been there for a while. testPeerServiceEventingReplay in End2endAndBackAgainIT.java looks like just what I need. I'll leave this here in case anyone else has this issue.

rickr (Wed, 20 Feb 2019 13:54:45 GMT):
Hi @aatkddny yes that should be where you look at. However the SDK using peereventing services should try to continue to connect and would start getting the last block it seen. You can change behavior https://github.com/hyperledger/fabric-sdk-java/blob/d2bc6d50e362a140970a509ade25f2f2c69e6c0f/src/main/java/org/hyperledger/fabric/sdk/Peer.java#L523-571 So if you're client is up and running and the peer goes down and comes back up -- it _shouldn't_ miss blocks. Obviously this dependent on memory and if your client goes down that's not going to help. Ultimately if an application really needs to be bullet proof it needs some blocklistener that tracks the blocks it has processed and persists that somewhere so if it needs to restart it can begin at that point.

aatkddny (Wed, 20 Feb 2019 16:07:49 GMT):
@rickr and that's what it looks like i'm going to end up having to implement. in my case this set of peers don't always necessarily going down - they have other problems too that i won't air here - and they aren't under my direct control. what we are seeing though is that we aren't reliably getting all the events, and we need them to guarantee integrity.

aatkddny (Wed, 20 Feb 2019 16:07:49 GMT):
@rickr and that's what it looks like i'm going to end up having to implement. in my case this set of peers don't always necessarily go down per se - they have other problems too that i won't air here - and they aren't under my direct control. what we are seeing though is that we aren't reliably getting all the events, and we need them to guarantee integrity.

gravity (Wed, 20 Feb 2019 17:09:49 GMT):
Hi all there is a question regarding the chaincode event listeners. if I set up an event to be thrown in a chaincode function, but this function returned `shim.Error()`, will I receive this event in the registered event listener on the application side? thanks in advance

dave.enyeart (Wed, 20 Feb 2019 18:05:49 GMT):
@gravity you will not receive it... you only receive events as blocks/transactions are committed... a shim error doesn't get past endorsement phase

gravity (Wed, 20 Feb 2019 18:46:41 GMT):
@dave.enyeart understand, thanks

mahoney1 (Thu, 21 Feb 2019 12:22:27 GMT):
reminder that the Fabric Developer Community call is today at 5pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android:https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Community+Call - be great to hear from you later ! :-) regards Paul

prakash04 (Thu, 21 Feb 2019 19:26:49 GMT):
Has joined the channel.

mahoney1 (Fri, 22 Feb 2019 09:48:26 GMT):
hi everyone - just to say: the recording of the Fabric Developer Community Call yesterday (02/21) can be downloaded from https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings FYI

Jamie (Fri, 22 Feb 2019 11:07:37 GMT):
Hi. When running the ./fabric.sh restart from src/test/fixture/sdkintegration folder i am receiving an error. Error - Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/peer/msp: could not load a valid signer certificate from directory /etc/hyperledger/peer/msp/signcerts: stat /etc/hyperledger/peer/msp/signcerts: no such file or directory

Jamie (Fri, 22 Feb 2019 11:07:37 GMT):
Hi. When running the ./fabric.sh restart from src/test/fixture/sdkintegration folder i am receiving an error. Error - Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/peer/msp: could not load a valid signer certificate from directory /etc/hyperledger/peer/msp/signcerts: stat /etc/hyperledger/peer/msp/signcerts: no such file or directory

Jamie (Fri, 22 Feb 2019 11:07:37 GMT):
Hi. When running the ./fabric.sh restart from src/test/fixture/sdkintegration folder i am receiving an error. Error - Cannot run peer because error when setting up MSP of type bccsp from directory /etc/hyperledger/peer/msp: could not load a valid signer certificate from directory /etc/hyperledger/peer/msp/signcerts: stat /etc/hyperledger/peer/msp/signcerts: no such file or directory Something wrong with some access. in the mapped volume the folder does exists.

gravity (Fri, 22 Feb 2019 12:06:17 GMT):
Hi all is it a good practice to have a singleton instance of the `HFClient` and set user context on transaction level (and do not set user context directly to the `HFClient`)? our current implementation creates `HFClient` instance per user, but it seems like overhead.

rickr (Fri, 22 Feb 2019 14:17:06 GMT):
@Jamie Have to believe something local to your environment. I run that many times daily and so do many other users. This is the first report of an issue with it that I can remember.

rickr (Fri, 22 Feb 2019 14:20:35 GMT):
@gravity Most of the API lets you directly set the usercontext. I highly recommend doing that unless you only have one user. If your application is going to be multi-threaded there's no way you can control the user context by switching it on the client.

gravity (Fri, 22 Feb 2019 14:42:09 GMT):
@rickr So, for example, I can create, let' say, 2 instances of `HFClient` - the first one for an admin (peer admin) and set user context for it after creating it. This instance I will be using only for admin actions, like create channel, install chaincode, instantiate etc. THere should be no problems because I have only one peer admin. Also, I will create another HFClient instance, but won't set user context, only crypto primitives. This instance will be in use only for queries/transactions where I will set user context directly to the query/transaction proposals. is this setup more or less ok?

rickr (Fri, 22 Feb 2019 14:44:57 GMT):
Yes that will work. But a bit overkill most likely, I think you should be able to just one instance of HFClient

gravity (Fri, 22 Feb 2019 14:46:34 GMT):
@rickr thanks a lot

gad0lim (Fri, 22 Feb 2019 20:02:58 GMT):
Has joined the channel.

gad0lim (Fri, 22 Feb 2019 20:03:14 GMT):
hey, is there any example of connectin with grpc from android?

gad0lim (Fri, 22 Feb 2019 20:03:14 GMT):
hey, is there any example of connection with grpc from android?

gad0lim (Fri, 22 Feb 2019 20:03:41 GMT):
readme.md mentions that android sdk is not supported

gad0lim (Fri, 22 Feb 2019 20:03:41 GMT):
readme.md for java sdk mentions that android sdk is not supported

gad0lim (Fri, 22 Feb 2019 20:03:41 GMT):
Readme.md for java sdk mentions that android sdk is not supported.

gad0lim (Fri, 22 Feb 2019 20:05:21 GMT):
I would like still try to have kind of minimal "fabric" client to interact with my contract directly by talking to peers

gad0lim (Fri, 22 Feb 2019 20:14:28 GMT):
other question would be what's the blocker for android support

gad0lim (Fri, 22 Feb 2019 20:53:37 GMT):
ah... have to switch to web3j

gad0lim (Fri, 22 Feb 2019 20:53:37 GMT):
ah... have to switch to web3j :(

gad0lim (Fri, 22 Feb 2019 20:53:37 GMT):
ah... have to switch to web3j and ethereum :(

rickr (Fri, 22 Feb 2019 22:55:04 GMT):
I would design my mobile app to not be _blockchain aware_. Have it concentrate on the UI experience. Use a REST request to the backend to an SDK to do the blockchain work. The same REST request could be used for both Android and IOS. Not tied to any specific backend technology. Just my two cents.

rickr (Fri, 22 Feb 2019 22:55:04 GMT):
@gad0lim I would design my mobile app to not be _blockchain aware_. Have it concentrate on the UI experience. Use a REST request to the backend to an SDK to do the blockchain work. The same REST request could be used for both Android and IOS. Not tied to any specific backend technology. Just my two cents.

dan13 (Sun, 24 Feb 2019 02:33:22 GMT):
As I understand it, a channel object is needed to transact/query, and userContext is required for HFClient to get context to a channel (e.g., via loadChannelFromConfig()). Assuming a per-transaction userContext is required during operation, what is the best practice for setting up the HFClient and Channels? Is there a any required relationship(s) between the User used to get context to the channel and the User used to transact/query?

dan13 (Sun, 24 Feb 2019 02:33:22 GMT):
As I understand it, a channel object is needed to transact/query, and userContext is required for HFClient to get context to a channel (e.g., via loadChannelFromConfig()). Assuming a per-transaction userContext is required during operation, what is the best practice for setting up the HFClient and Channels? Is there a any required relationship(s) between the User used to get context to the channel and the User used to transact/query? If a single API is operating on behalf of multiple Orgs, correct to say that an HFClient per Org is required?

ashutoshkapuskar (Sun, 24 Feb 2019 23:27:22 GMT):
Has joined the channel.

ashutoshkapuskar (Sun, 24 Feb 2019 23:29:13 GMT):
Where can I find Javadoc and/or any documentation about the APIs in fabric-sdk-java

yulong12 (Mon, 25 Feb 2019 02:14:50 GMT):
Hi everyone! I have a question.The application about fabric-sdk-java whether run in S390?

chill37 (Mon, 25 Feb 2019 07:32:44 GMT):
@ashutoshkapuskar I don't think there is one. you should just try with the example within the sdk. or some of these websites helped. https://github.com/lkolisko/scratch/tree/master/hyperledger/fabric-sdk-java-scratch https://github.com/IBM/blockchain-application-using-fabric-java-sdk

chill37 (Mon, 25 Feb 2019 07:35:41 GMT):
Hi @rickr Is there a way to call system chaincode(LSCC to be specific) directly and without using chaincode-to-chaincode? I see that Java SDK supports some SCC natively, (e.g. queryinstalledChaincodes...etc) but I would like to call LSCC.GetChaincodeData But, too many methods are hidden with a private method so can't call necessary parameters (such as sendProposalToPeers() in Peer class) Is there another way?

Jamie (Mon, 25 Feb 2019 08:38:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rJu6HvHAtS7F2bkAJ) @rickr @rickr The script was working fine for me sometime back, before i went for a vacation. I feel the volumes are not getting mapped in the docker container. I am sure it is some issue with the docker stale data. Any suggestions?

Jamie (Mon, 25 Feb 2019 08:38:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rJu6HvHAtS7F2bkAJ) @rickr The script was working fine for me sometime back, before i went for a vacation. I feel the volumes are not getting mapped in the docker container. I am sure it is some issue with the docker stale data. Any suggestions?

rickr (Mon, 25 Feb 2019 13:13:32 GMT):
@dan13 I think you should only really need one HFClient in an application instance for most cases. Each organization has it's own private credentials artifacts so it's doubtful there would be cases or sharing those. The SDK doesn't know you application requirements so how you use the client context is probably highly dependent on that. If your application is such that a single user will start it and give credentials then probable just set it on the HFClient and your done. If your application instance is going to be switching between users most all APIs have a version that accepts the usercontext and then that's probably the better way to go. There should be no problem with a usercontext that creates the channel and then another usercontext uses it. I little bit of this is sort of showed in: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/cd7a114cebd48ff50b6ec14e47d62cf79bda9d3d/src/main/java/org/cr22rc/MultiDomainSample.java

rickr (Mon, 25 Feb 2019 13:13:32 GMT):
@dan13 I think you should only really need one HFClient in an application instance for most cases. Each organization has it's own private credentials artifacts so it's doubtful there would be cases or sharing those. The SDK doesn't know your application requirements so how you use the client context is probably highly dependent on that. If your application is such that a single user will start it and give credentials then probable just set it on the HFClient and your done. If your application instance is going to be switching between users most all APIs have a version that accepts the usercontext and then that's probably the better way to go. There should be no problem with a usercontext that creates the channel and then another usercontext uses it. I little bit of this is sort of showed in: https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/cd7a114cebd48ff50b6ec14e47d62cf79bda9d3d/src/main/java/org/cr22rc/MultiDomainSample.java

rickr (Mon, 25 Feb 2019 13:15:25 GMT):
@ashutoshkapuskar Follow the README.md

rickr (Mon, 25 Feb 2019 13:18:06 GMT):
@chill37 I don't think so. I think the SDK covers the calls to those that we expected the user to call.

rickr (Mon, 25 Feb 2019 13:21:35 GMT):
@Jamie Not really. You could to into the docker image and look. If this is just something you're _playing with_ maybe just delete everything including docker images and container instance and start over would be the quickest.

rickr (Mon, 25 Feb 2019 13:21:35 GMT):
@Jamie Not really. You could go into the docker container instances and look. If this is just something you're _playing with_ maybe just delete everything including docker images and container instance and start over would be the quickest.

rickr (Mon, 25 Feb 2019 13:29:06 GMT):
What I'm thinking has happened is that you left the peers and orderers running while on vacation and they continued to dump logging information filling up your docker volumes. The volumes are now full. ... just a theory.

dan13 (Mon, 25 Feb 2019 14:24:44 GMT):
@rickr thank you! a word from the experts is worth 100 hours of trying stuff :)

dan13 (Mon, 25 Feb 2019 14:24:44 GMT):
@rickr thank you! a word from the experts is worth 100 hours of trying stuff :)

chill37 (Tue, 26 Feb 2019 05:08:05 GMT):
@rickr because I wanted to call the LSCC.GetChaincodeData to get the ChaincodeData struct(to get the policy out of it). I can see that I can extend the LSCCProposalBuilder to build my own LSCC caller, but I need the Channel.sendProposalToPeers() function public to actually to querying. Is there a way I could propose and fabric dev would implement it? (e.g. via JIRA)

Jamie (Tue, 26 Feb 2019 13:14:16 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WLuEWizDBkvaNpkgs) @rickr I downgraded docker version to 18.0.3 and then it worked fine. Thanks for discussing the issue, it encourages.

anjalinaik (Wed, 27 Feb 2019 10:04:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5wJfv97LDLjfY7Gnn) @rickr thankyou very much :)

anjalinaik (Thu, 28 Feb 2019 09:21:39 GMT):
when do we use chaincode event listener ?

allenyang (Thu, 28 Feb 2019 09:23:05 GMT):
who have good tool to generate "network-config.yaml"?

allenyang (Thu, 28 Feb 2019 09:28:07 GMT):
I use fabric-sdk-java to load the "network-config.yaml", I can work, I want know if there have good framework to generate "network-config.yaml"

rickr (Thu, 28 Feb 2019 13:35:43 GMT):
I don't know of any _tools_ to create a network-config.yaml other than _vi_ :)

FlorianStoica (Thu, 28 Feb 2019 14:49:59 GMT):
Has joined the channel.

FlorianStoica (Thu, 28 Feb 2019 14:57:21 GMT):
Hello, I have the following issue, I've used as a test the "SimpleChaincode.java" from fabric samples, deployed, instantiated, query works. The issue that I have is that invoke calls the contract I get the output "[nio-8080-exec-4] n.s.f.c.manager.ChaincodeManager : a: 90 b: 210" , but on the next query value of a is still 100 somehow stub.putState doesn't do the job, and I have no error anywhere. This is the output from the chaincode docker: INFO: new value of A: 90 Feb 28, 2019 2:52:49 PM org.hyperledger.fabric.example.SimpleChaincode invoke INFO: new value of B: 210 Feb 28, 2019 2:52:49 PM org.hyperledger.fabric.example.SimpleChaincode invoke INFO: Transfer complete

FlorianStoica (Thu, 28 Feb 2019 14:58:19 GMT):
Feb 28, 2019 2:52:56 PM org.hyperledger.fabric.example.SimpleChaincode query INFO: Query Response: Name: a, Amount: 100

rickr (Thu, 28 Feb 2019 15:41:23 GMT):
I'm _guessing_ you're not waiting for the committer peers to write the transaction. When you send the endorsements to the Orderer you would back a Future not till that future is done (.get()) would you know it's been written. Also this assumes you have peer's with the role of event listener. Another quick (hack) is to just after sending to the Orderer do a sleep for 30 sec :(

rickr (Thu, 28 Feb 2019 15:41:23 GMT):
I'm _guessing_ you're not waiting for the committer peers to write the transaction. When you send the endorsements to the Orderer you would get back a Future. Not till that future is done (.get()) would you know it's been written. Also this assumes you have peer's with the role of event listener. Another quick (hack) is to just after sending to the Orderer do a sleep for 30 sec :(

gravity (Thu, 28 Feb 2019 19:17:43 GMT):
hi @rickr \text{\textquoteleft}Not till that future is done (.get()) would you know it's been written. Also this assumes you have peer's with the role of event listener. Another quick (hack) is to just after sending to the Orderer do a sleep for 30 sec\text{\textquoteright} Do I need to have peers with the role event listener If I call `join` on the future that is returned from `sendTransaction`?

gravity (Thu, 28 Feb 2019 19:17:43 GMT):
hi @rickr \text{\textquoteleft}Also this assumes you have peer's with the role of event listener. Another quick (hack) is to just after sending to the Orderer do a sleep for 30 sec\text{\textquoteright} Do I need to have peers with the role event listener If I call `join` on the future that is returned from `sendTransaction`?

gravity (Thu, 28 Feb 2019 19:17:43 GMT):
hi @rickr >>> Also this assumes you have peer's with the role of event listener. Another quick (hack) is to just after sending to the Orderer do a sleep for 30 sec Do I need to have peers with the role event listener If I call `join` on the future that is returned from `sendTransaction`?

gravity (Thu, 28 Feb 2019 19:17:43 GMT):
hi @rickr > Also this assumes you have peer's with the role of event listener. Another quick (hack) is to just after sending to the Orderer do a sleep for 30 sec Do I need to have peers with the role event listener If I call `join` on the future that is returned from `sendTransaction`?

dan13 (Thu, 28 Feb 2019 19:26:48 GMT):
@rickr can you clarify "Not till that future is done (.get()) would you know it's been written" -- what exactly is "written" when the get() returns? Block created by orderer, block processed by all peers on channel, block processed by peer(s) you are listening to, that specific transaction committed by all peers on channel, that specific transaction committed by peers you are listening to, or something else?

FlorianStoica (Thu, 28 Feb 2019 21:25:00 GMT):
@rickr something else seems to be the problem even with sleep the result is the same

dan13 (Fri, 01 Mar 2019 01:22:36 GMT):
@FlorianStoica I ran https://medium.com/@aleksobol/explained-java-chaincode-in-hyperledger-fabric-fc63fccc84a3 -- perhaps that example will work better for you if you need java chaincode specifically. Doesn't take very long to get through.

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. i am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. i am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` Also in the grpc logs i am repeatedly getting the below warning.``` WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. i am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` Also in the grpc logs i am repeatedly getting the below warning.``` WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. i am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` Also in the grpc logs i am repeatedly getting the below warning.``` WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. i am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` Also in the grpc logs i am repeatedly getting the below warning. `WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError` ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. I am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` ``` ``` Also in the grpc logs i am repeatedly getting the below warning. `WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError`

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. I am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` ``` WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. I am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` Also in the grpc logs i am repeatedly getting the below warning. ``` WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError ```

anjalinaik (Fri, 01 Mar 2019 06:05:17 GMT):
Hi experts. I am running Service discovery to invoke a transaction. I am getting this error. Can anyone please guide me?``` ServiceDiscoveryException: Failed to find and endorsers for chaincode ``` Also in the grpc logs, I am repeatedly getting the below warning. ``` WARNING: [io.grpc.internal.ManagedChannelImpl-965] Failed to resolve name. status=Status{code=UNAVAILABLE, description=NameResolver returned an empty list, cause=null} Mar 01, 2019 11:37:51 AM io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError ```

yacovm (Fri, 01 Mar 2019 11:00:37 GMT):
@rickr ^

anjalinaik (Fri, 01 Mar 2019 12:10:40 GMT):
In a multi host network, what should be the value of `CORE_PEER_GOSSIP_EXTERNALENDPOINT` . Is it IP_OF_MACHINE: PORT or PEER_NAME:PORT

FlorianStoica (Fri, 01 Mar 2019 12:46:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=FoLGtjN9pjpmK3xug) @anjalinaik I used peer_name:port

skykira (Fri, 01 Mar 2019 12:52:33 GMT):
Who can tell me how to encrypt the parameters passed to the chaincode? thanks..

skykira (Fri, 01 Mar 2019 12:53:57 GMT):
I didn't find the code about `--transient`

rickr (Fri, 01 Mar 2019 13:05:09 GMT):
@skykira probably this: https://github.com/hyperledger/fabric-sdk-java/blob/d69047fed436eef746b0dc20fda1084122a85c1e/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L575-L590

rickr (Fri, 01 Mar 2019 13:07:55 GMT):
@gravity I've never used `join` Basically used two method calls *.get* which will make your code wait for the future to be resolved, essentially make it synchronous, or thenApply which is like a call back.

skykira (Fri, 01 Mar 2019 13:10:30 GMT):
thans,i see ~

gravity (Fri, 01 Mar 2019 13:13:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=agrCMmCzrXkjDvud8) @rickr so, If I use `get` or `thenApply`, there is no need to define peers with the role `event_listener`, right?

rickr (Fri, 01 Mar 2019 13:23:05 GMT):
@dan13 Your code sends endorsed proposal to the orderer (transaction) to be actually written to the ledger it gets a Future as the result. Roughly committing peers get blocks from the orderer that has that transaction and then writes them to the ledger. Between that time any query for your result will not show up. Peers your application has as PeerRole.EVENT_SOURCE get notified that the block has been written and will complete that Future. So if you are waiting for the future via _.get._ or _.thenApply_ and you query for you result it should be evident.

rickr (Fri, 01 Mar 2019 13:40:40 GMT):
@anjalinaik Basically it seems the peer hostname is not resolving from what I can tell. There was a bug in grpc 1.16 https://github.com/grpc/grpc-java/issues/5032 SDK 1.4 is using 1.17 but if you're on an older version could play a role.

rickr (Fri, 01 Mar 2019 13:40:40 GMT):
@anjalinaik Basically it seems the peer hostname is not resolving from what I can tell. There was a bug in grpc 1.16 https://github.com/grpc/grpc-java/issues/5032 The SDK 1.4 is using grpc 1.17 but if you're on an older version could play a role.

rickr (Fri, 01 Mar 2019 13:48:38 GMT):
@gravity @dan13 Most of this is shown the integration tests https://github.com/hyperledger/fabric-sdk-java/blob/d69047fed436eef746b0dc20fda1084122a85c1e/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L532-L546

gravity (Fri, 01 Mar 2019 14:20:35 GMT):
@rickr what will happen if I do not specify the number of events `nOfEvents` in transaction options?

rickr (Fri, 01 Mar 2019 15:03:21 GMT):
The default is wait for all the peers which are listening for blocks (PeerRole.EVENT_SOURCE)

indigogrape (Fri, 01 Mar 2019 20:44:32 GMT):
Has joined the channel.

indigogrape (Fri, 01 Mar 2019 21:28:02 GMT):

broken_pipe.txt

indigogrape (Fri, 01 Mar 2019 22:11:20 GMT):
Hey guys, I've created a single host setup using the fabric 1.1.0 images on an AWS instance and everything works fine on that setup. I've then transitioned into using a multi-host setup with Docker swarm overlay network with 3 AWS instances. It seems to work fine for the most part except for every 2 hours where the peer resets the connection and I receive an error in the SDK (attached below). I thought it might have been affected by the network setup so I removed all the containers except for a single peer, single orderer, and single couchDB, but I still get the same error (still in an overlay network even though the other machines aren't used). The client that connects to the network is on a remote machine and uses only the default GRPC keepalive properties. Each request reuses a single HFClient and Channel object and not shutdown after the request finishes.

indigogrape (Fri, 01 Mar 2019 22:11:28 GMT):

broken_pipe.txt

rickr (Sat, 02 Mar 2019 00:39:12 GMT):
Only thing that comes to mind are setting that you say you're setting -> https://github.com/hyperledger/fabric-sdk-java#firewalls-load-balancers-network-proxies

mujeeb (Sun, 03 Mar 2019 12:25:39 GMT):
Has joined the channel.

mahoney1 (Mon, 04 Mar 2019 10:15:39 GMT):
fyi / heads-up : next Fabric Developer Community call is planned for this Thurs March 7th - https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - contributions are welcome to the agenda ! More info on the call can be found [here](https://lists.hyperledger.org/g/fabric/topic/next_hyperledger_fabric/30211987?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,30211987)

amolpednekar (Mon, 04 Mar 2019 11:53:32 GMT):
@rickr - Using Fabric SDK 1.2.2, I've integrated it with a SpringBoot REST API and am able to make requests But my program console continuously gives me this warning `2019-03-04 17:19:43.504 WARN 18732 --- [ault-executor-1] o.h.fabric.sdk.PeerEventServiceClient : Channel mychannel peer peer0.org1.persistent.com attempts 1230 Status returned failure code 404 (NOT_FOUND) during peer service event registration`

FlorianStoica (Mon, 04 Mar 2019 13:49:24 GMT):
Hello guys, after I do an Invoke/Query I periodically get this error messages: 2019-03-04 15:44:53.868 WARN 1012 --- [ault-executor-1] org.hyperledger.fabric.sdk.EventHub : EventHub{id: 3, name: eventhub01, channelName: mychannel, url: grpcs://localhost:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) I have a feeling that something remains opened did not see what could be can you give me a hint ?

anjalinaik (Tue, 05 Mar 2019 05:49:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QjvRp8Yt7EgF5zife) @rickr Hi @rickr. I have upgraded the sdk version. I am receiving the same error again. Any suggestions? I am running the fabric version 1.3 though.

anjalinaik (Tue, 05 Mar 2019 05:49:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QjvRp8Yt7EgF5zife) @rickr Hi @rickr. I have upgraded the SDK version. I am receiving the same error again. Any suggestions? I am running the fabric version 1.3 though.

anjalinaik (Tue, 05 Mar 2019 05:49:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=QjvRp8Yt7EgF5zife) @rickr Hi @rickr. I have upgraded the SDK version to 1.4.0, however I am receiving the same error again. Any suggestions? I am running the fabric version 1.3 though.

anjalinaik (Tue, 05 Mar 2019 05:52:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oC3EeE42M5xosxcb9) @FlorianStoica thankyou for your reply. Are you able to run the discovery service with the said settings?

ashlinSajan (Tue, 05 Mar 2019 06:17:05 GMT):
Has joined the channel.

kalyan.aruru (Tue, 05 Mar 2019 07:02:39 GMT):
Has joined the channel.

kalyan.aruru (Tue, 05 Mar 2019 07:06:15 GMT):
Hi All, Do we have any chaincode event handling examples or tutorials? Please let me know

anjalinaik (Tue, 05 Mar 2019 08:29:24 GMT):
Can anyone please help me with below error on Service Discovery``` [pool-5-thread-1] INFO org.hyperledger.fabric.sdk.ServiceDiscovery - Channel mychannel doing discovery with peer: Peer{ id: 3, name: pr1, channelName: mychannel, url: grpc://10.80.102.129:8051} [pool-5-thread-1] ERROR org.hyperledger.fabric.sdk.ServiceDiscovery - Error failed constructing descriptor for chaincodes: [pool-5-thread-1] WARN org.hyperledger.fabric.sdk.ServiceDiscovery - Channel mychannel failed to find all layouts for chaincodes. Expected: 1 and found: 0 [grpc-default-executor-21] WARN org.hyperledger.fabric.sdk.PeerEventServiceClient - Received error on PeerEventServiceClient{id: 8360, channel: mychannel, peerName: pr1:7051, url: grpc://pr1:7051}, attempts 8351. UNAVAILABLE: Unable to resolve host pr1 [grpc-default-executor-21] WARN org.hyperledger.fabric.sdk.PeerEventServiceClient - Received error on PeerEventServiceClient{id: 8410, channel: mychannel, peerName: pr1:7051, url: grpc://pr1:7051}, attempts 8401. UNAVAILABLE: Unable to resolve host pr1 ```

rickr (Tue, 05 Mar 2019 13:31:56 GMT):
@amolpednekar This usually means you have a peer eventing service going to a channel that doesn't exist or the peer hasn't joined the channel.

rickr (Tue, 05 Mar 2019 13:44:42 GMT):
@FlorianStoica Eventhubs are no longer supported https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fabric-v10-considerations I think they were pulled in 1.2

rickr (Tue, 05 Mar 2019 13:49:17 GMT):
@kalyan.aruru https://github.com/hyperledger/fabric-sdk-java/blob/dbc41c1a119f9567ec7b39d972663813c45e0d04/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L369-L383

rickr (Tue, 05 Mar 2019 14:04:51 GMT):
@anjalinaik Seems that discovery didn't find any chaincodes for it. Was your chaincode initialized ?

matthewehoward (Tue, 05 Mar 2019 14:13:19 GMT):
Has joined the channel.

Antimttr (Tue, 05 Mar 2019 18:46:06 GMT):
Has joined the channel.

Antimttr (Tue, 05 Mar 2019 18:46:12 GMT):
is there a good example of a Java api like the nodejs api in balance-transfer? im preferably looking for a java sdk implementation into an api like balance transfer does

rickr (Tue, 05 Mar 2019 18:50:41 GMT):
@Antimttr https://github.com/hyperledger/fabric-sdk-java#end-to-end-test-scenario ?

Antimttr (Tue, 05 Mar 2019 20:55:59 GMT):
@rickr do any of those build a restful api ala balance-transfer?

rickr (Tue, 05 Mar 2019 22:57:52 GMT):
It's not a back end to a REST HTTP API. Simple balance transfer moving quantity from one key to another

rickr (Tue, 05 Mar 2019 22:57:52 GMT):
It's not a back end to a REST HTTP API. Simple balance transfer moving quantity from one key in the ledger to another.

rickr (Tue, 05 Mar 2019 22:57:52 GMT):
It's not a back end to a REST HTTP API. Simple balance transfer moving specific quantity from one key in the ledger to another.

anjalinaik (Wed, 06 Mar 2019 04:18:39 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=L6yKpsDxYmumZvvZW) @rickr Yes the chaincode is instantiated. The docker container is formed as well.

Antimttr (Wed, 06 Mar 2019 04:53:21 GMT):
@rickr is there any more advanced example that implements a restful api?

daijianw (Wed, 06 Mar 2019 08:12:56 GMT):
@rickr https://jira.hyperledger.org/browse/FABN-855 fixed the problem of node sdk can't install packaged chaincode. Is fabric java sdk now able to install packaged chaincode? Thanks.

anjalinaik (Wed, 06 Mar 2019 11:41:18 GMT):

Screenshot from 2019-03-06 17-08-48.png

anjalinaik (Wed, 06 Mar 2019 11:41:18 GMT):

Screenshot from 2019-03-06 17-08-48.png

anjalinaik (Wed, 06 Mar 2019 11:41:18 GMT):

Screenshot from 2019-03-06 17-08-48.png

anjalinaik (Wed, 06 Mar 2019 11:41:18 GMT):

Screenshot from 2019-03-06 17-08-48.png

rickr (Wed, 06 Mar 2019 13:21:14 GMT):
@daijianw No not for <2.0 Everything changes with version 2.0 and I have code that will install the new chaincode package that it has.

rickr (Wed, 06 Mar 2019 13:32:27 GMT):
@anjalinaik No of test really required gossip working .. I'll be frank in that I'm not sure if gossip is set up right. Most of that was set up by someone else. I'll get some one to look at it

rickr (Wed, 06 Mar 2019 13:32:27 GMT):
@anjalinaik None of test really required gossip working .. I'll be frank in that I'm not sure if gossip is set up right. Most of that was set up by someone else. I'll get some one to look at it

gravity (Wed, 06 Mar 2019 13:36:40 GMT):
hi @rickr I'm running a network v1.4.0 and JSDK v1.4.0 when I do initialize a channel, sometime I get this exception https://pastebin.com/4s2a2YH1 what can cause this exception? is it critical? thanks in advance

rickr (Wed, 06 Mar 2019 13:48:09 GMT):
@gravity When you initialize if you have any peers doing service discovery it will start that. I think in this case that peer is not ready. Service discovery should retry later or when it's services is needed and it hasn't completed. So the short answer is _I think_ it's ok.

james3443112 (Wed, 06 Mar 2019 14:27:34 GMT):

java-sdk.png

james3443112 (Wed, 06 Mar 2019 14:27:35 GMT):

cli.png

james3443112 (Wed, 06 Mar 2019 14:27:37 GMT):
hi guys , i have a question: when i use java-sdk v1.4.0 to install(instantiated) a chaincode(https://github.com/hyperledger/fabric-samples/tree/release-1.4/chaincode/marbles02/go) i find there is no index in couchdb but when i use cli(peer chaincode) install/instantiated the same chaincode , i find index in couchdb

rickr (Wed, 06 Mar 2019 14:43:22 GMT):
@james3443112 I'm _guessing_ for the SDK you're not specifying the meta data correctly See End2endIT.java search for meta-inf

james3443112 (Wed, 06 Mar 2019 14:45:47 GMT):
thx, i will check it

Antimttr (Wed, 06 Mar 2019 15:52:21 GMT):
so theres no examples of java being used to communicate via api, what front ends to people write for the java sdk?

Antimttr (Wed, 06 Mar 2019 15:52:27 GMT):
is it all native software?

dan13 (Wed, 06 Mar 2019 17:14:18 GMT):
@Antimttr One (of a myriad) possible full stack would be something like React JS UI -> Java (Spring Boot?) UI Service APIs -> Java Fabric Services (i.e., code that calls chaincode via Java SDK) -> HLF Chaincode. It's up to you to decide how to expose your application on Fabric to other applications to want use it.

Antimttr (Wed, 06 Mar 2019 17:15:49 GMT):
right

Antimttr (Wed, 06 Mar 2019 17:16:50 GMT):
like on my current POC, i'm modifying balance transfer, so im doing Laravel Gateway -> Nodejs SDK Fabric Services API -> HLF Chaincode

Antimttr (Wed, 06 Mar 2019 17:17:32 GMT):
its allowed me to rapidly prototype, but no idemix so I'll have to start from scratch as far as the fabric services api

Antimttr (Wed, 06 Mar 2019 17:17:35 GMT):
w/java

Antimttr (Wed, 06 Mar 2019 17:18:13 GMT):
i was just hoping for some great examples on the java side similar to balance transfer

Antimttr (Wed, 06 Mar 2019 17:18:17 GMT):
but i guess that doesnt exist :/

anjalinaik (Thu, 07 Mar 2019 04:00:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HiRbZTfz8NLHdDxQv) @rickr can you please guide me to the correct gossip settings

anjalinaik (Thu, 07 Mar 2019 06:05:52 GMT):
Hi Experts. In https://github.com/hyperledger/fabric-sdk-java/blob/8044bac1bfe9baf9d6360b067e0d6b5445cc953d/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java, on creation of first channel, isnt the channel definition updated to define the anchor peers in the organization?

anjalinaik (Thu, 07 Mar 2019 06:05:52 GMT):
Hi Experts. In https://github.com/hyperledger/fabric-sdk-java/blob/8044bac1bfe9baf9d6360b067e0d6b5445cc953d/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java, on creation of first channel, isnt the channel definition updated to define the anchor peers in the organization? Please correct me if i am wrong. Is the channel defination updation optional?

daijianw (Thu, 07 Mar 2019 09:08:32 GMT):
@rickr thanks for the information.

mahoney1 (Thu, 07 Mar 2019 11:24:41 GMT):
reminder that the Fabric Developer Community call is today at 5pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android:https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - past Recordings & Slides (PDF) here: https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings - be great to hear from you later ! 🙂 regards Paul

rickr (Thu, 07 Mar 2019 13:01:10 GMT):
@anjalinaik According to our Gossip expert @yacovm, in docker-compose.yaml and peer-base.yaml the only things to be done is remove all `CORE_PEER_GOSSIP_ENDPOINT` and `CORE_PEER_GOSSIP_SKIPHANDSHAKE` lines . Example of how to add anchor peers: https://github.com/hyperledger/fabric-sdk-java/blob/dbc41c1a119f9567ec7b39d972663813c45e0d04/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java#L220-L249

yacovm (Thu, 07 Mar 2019 13:02:06 GMT):
Rick don't go around telling people I am expert on stuff :(

yacovm (Thu, 07 Mar 2019 13:02:28 GMT):
They will flood my private chats :rolling_eyes:

rickr (Thu, 07 Mar 2019 13:03:11 GMT):
Ok Don't @anjalinaik don't remove those lines .. I was mistaken he's not an expert! :rofl:

yacovm (Thu, 07 Mar 2019 13:03:28 GMT):
the `CORE_PEER_GOSSIP_ENDPOINT` is for overriding the internal endpoint that the peer reports to other peers

yacovm (Thu, 07 Mar 2019 13:03:36 GMT):
usually you don't need to use that at all

yacovm (Thu, 07 Mar 2019 13:04:07 GMT):
the only use case where you want to use it, is if you have a peer in docker inside a VM, and another peer in docker, in another VM, and they are all in the same org

yacovm (Thu, 07 Mar 2019 13:04:22 GMT):
in such a case- both peers would have internal endpoints that are not routable to one another

yacovm (Thu, 07 Mar 2019 13:04:38 GMT):
setting `CORE_PEER_GOSSIP_ENDPOINT` to be the VM's external interface solves this

yacovm (Thu, 07 Mar 2019 13:04:47 GMT):
because it overrides the internal endpoints they report to peers within their own org

mahoney1 (Thu, 07 Mar 2019 15:33:27 GMT):
FYI - reminder that Fabric Developer Community call is today (in 90mins) at 5pm UTC (5pm UK, 12pm ET, 9am PT) https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mahoney1 (Thu, 07 Mar 2019 18:22:51 GMT):
FYI - posted the recording file: `2019-0307-fabricdevcommunitycall.zip` (incl MP4 and chat transcript) from today's Fabric Developer Community Call at -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

ashutoshkapuskar (Fri, 08 Mar 2019 06:31:52 GMT):
The method "newSuccessResponse" is used in SimpleChaincode.java -- which is provided with the Fabric-java-sdk. But where (in which class) is this method defined? Thank you.

anjalinaik (Fri, 08 Mar 2019 09:25:37 GMT):
Hi Experts. I am running update channel configuration [ changing the timeout from 2s to 5s] after creation of a new channel. ``` /home/anjali/anjali/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/emBlock/WEB-INF/classes/emBlock/func.sh createChannelTransaction emudhra test12 /home/anjali/anjali/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/emBlock/WEB-INF/classes/emBlock/bin/configtxgen [http-nio-8080-exec-3] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 5, name: peer1, channelName: null, url: grpc://10.80.102.129:8051}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 5, name: peer1, channelName: test12, url: grpc://10.80.102.129:8051} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 8, name: peer2, channelName: null, url: grpc://10.80.102.129:8052}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 8, name: peer2, channelName: test12, url: grpc://10.80.102.129:8052} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 3, name: test12} eventThread started shutdown: false thread: null Got 200 status for encoding the new desired channel config bytes ``` so the logs show that the channel has been updated with the new configuration. However if i take out the responseString as json and verify, the changes are not reflected in it. what may be wrong?

anjalinaik (Fri, 08 Mar 2019 09:25:37 GMT):
Hi Experts. I am running update channel configuration [ changing the timeout from 2s to 5s] after creation of a new channel. ``` [http-nio-8080-exec-3] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 5, name: peer1, channelName: null, url: grpc://10.80.102.129:8051}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 5, name: peer1, channelName: test12, url: grpc://10.80.102.129:8051} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 8, name: peer2, channelName: null, url: grpc://10.80.102.129:8052}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 8, name: peer2, channelName: test12, url: grpc://10.80.102.129:8052} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 3, name: test12} eventThread started shutdown: false thread: null Got 200 status for encoding the new desired channel config bytes ``` so the logs show that the channel has been updated with the new configuration. However if i take out the responseString as json and verify, the changes are not reflected in it. what may be wrong?

anjalinaik (Fri, 08 Mar 2019 09:25:37 GMT):
Hi Experts. I am running update channel configuration [ changing the timeout from 2s to 5s] after creation of a new channel. ``` [http-nio-8080-exec-3] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 5, name: peer1, channelName: null, url: grpc://10.80.102.129:8051}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 5, name: peer1, channelName: test12, url: grpc://10.80.102.129:8051} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 8, name: peer2, channelName: null, url: grpc://10.80.102.129:8052}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 8, name: peer2, channelName: test12, url: grpc://10.80.102.129:8052} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 3, name: test12} eventThread started shutdown: false thread: null Got 200 status for encoding the new desired channel config bytes ``` so the logs show that the channel has been updated with the new configuration. However if i take out the responseString as json and verify, the changes are not reflected in it. what may be wrong?

anjalinaik (Fri, 08 Mar 2019 09:25:37 GMT):
Hi Experts. I am running update channel configuration [ changing the timeout from 2s to 5s] after creation of a new channel. ``` [http-nio-8080-exec-3] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 5, name: peer1, channelName: null, url: grpc://10.80.102.129:8051}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 5, name: peer1, channelName: test12, url: grpc://10.80.102.129:8051} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 8, name: peer2, channelName: null, url: grpc://10.80.102.129:8052}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 8, name: peer2, channelName: test12, url: grpc://10.80.102.129:8052} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 3, name: test12} eventThread started shutdown: false thread: null Got 200 status for encoding the new desired channel config bytes Got 200 status for updated config bytes needed for updateChannelConfiguration ``` so the logs show that the channel has been updated with the new configuration. However if i take out the responseString as json and verify, the changes are not reflected in it. what may be wrong?

anjalinaik (Fri, 08 Mar 2019 09:25:37 GMT):
Hi Experts. I am running update channel configuration [ changing the timeout from 2s to 5s] after creation of a new channel. ``` [http-nio-8080-exec-3] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 5, name: peer1, channelName: null, url: grpc://10.80.102.129:8051}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 5, name: peer1, channelName: test12, url: grpc://10.80.102.129:8051} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel{id: 3, name: test12} joining Peer{ id: 8, name: peer2, channelName: null, url: grpc://10.80.102.129:8052}. [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Peer Peer{ id: 8, name: peer2, channelName: test12, url: grpc://10.80.102.129:8052} joined into channel Channel{id: 3, name: test12} [http-nio-8080-exec-3] INFO org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 3, name: test12} eventThread started shutdown: false thread: null Got 200 status for encoding the new desired channel config bytes Got 200 status for updated config bytes needed for updateChannelConfiguration ``` so the logs show that the channel has been updated with the new configuration. However if i take out the responseString as json and verify, the changes are not reflected in it. what may be wrong? also, I am getting no logs from the configtxlator docker service

rickr (Fri, 08 Mar 2019 12:42:57 GMT):
@ashutoshkapuskar Did a grep for newSuccessResponse in my top SDK directory .. no hits ``` grep -sri newSuccessResponse . find -name SimpleChaincode.java ``` Sure you're not using the version of SDK <1.0 ?

SatheeshNehru (Fri, 08 Mar 2019 13:05:26 GMT):
Has joined the channel.

SatheeshNehru (Mon, 11 Mar 2019 07:34:58 GMT):
how to generate certificate using java sdk using fabric ca

rickr (Mon, 11 Mar 2019 11:17:23 GMT):
@SatheeshNehru Integration samples show an Admin register other user and that user enroll to get a certificate. Suggestion set up and walk through the examples as the README.md states. https://github.com/hyperledger/fabric-sdk-java/tree/dbc41c1a119f9567ec7b39d972663813c45e0d04#end-to-end-test-scenario

JorgeNavarro (Mon, 11 Mar 2019 12:02:01 GMT):
Has joined the channel.

AndresMartinezMelgar.itcl (Mon, 11 Mar 2019 12:48:24 GMT):
Hi, someone knows a tutorial/video to learn to use java sdk? I have deploy my network in 3 pc, 4 orgs with 2 peer each one, and 1 channel, kafka orderer. Next step is know how can i connect my components(peer, orderer, channel....) with sdk thx for any help

aatkddny (Mon, 11 Mar 2019 13:03:07 GMT):
Not sure if this is a java thing or somewhere else tbh. Network isn't new. Kafka is set with ``` - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" ``` Configtx.yaml is set to ``` # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB ``` But I'm getting this back: ``` "exceptionTrace" : " com.mo.fabric.exception.FabricException: Not enough endorsers for invoke: createVerification. 2 endorser(s) returned with an error: Sending proposal to fabric-peer-org15-20654c failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=gRPC message exceeds maximum size 4194304: 4357851, cause=null} ``` Not really sure where this gRPC limit is set.

aatkddny (Mon, 11 Mar 2019 13:03:07 GMT):
Network isn't new. Kafka is set with ``` - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" ``` Configtx.yaml is set to ``` # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB ``` But I'm getting this back: ``` "exceptionTrace" : " com.mo.fabric.exception.FabricException: Not enough endorsers for invoke: createVerification. 2 endorser(s) returned with an error: Sending proposal to fabric-peer-org15-20654c failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=gRPC message exceeds maximum size 4194304: 4357851, cause=null} ``` Not really sure where this gRPC limit is set. A few seconds of google finds this - https://stackoverflow.com/questions/39753730/java-grpc-how-to-increase-the-message-size-limit-in-a-managedchannel but I'm not sure if there's a property to up this without searching through the codebase.

aatkddny (Mon, 11 Mar 2019 13:03:07 GMT):
Network isn't new. Kafka is set with ``` - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" ``` Configtx.yaml is set to ``` # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB ``` But I'm getting this back: ``` "exceptionTrace" : " com.mo.fabric.exception.FabricException: Not enough endorsers for invoke: createVerification. 2 endorser(s) returned with an error: Sending proposal to fabric-peer-org15-20654c failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=gRPC message exceeds maximum size 4194304: 4357851, cause=null} ``` Not really sure where this gRPC limit is set. A few seconds of google finds this - https://stackoverflow.com/questions/39753730/java-grpc-how-to-increase-the-message-size-limit-in-a-managedchannel but I'm not sure if there's a property to up this without searching through the codebase. I can try setting grpc.NettyChannelBuilderOption.maxInboundMessageSize in the properties I return for network config for the peer locally, but that doesn't help me when my production version is cloud hosted - I don't have access to edit the config (and nor imo should I be doing so).

aatkddny (Mon, 11 Mar 2019 13:03:07 GMT):
Network isn't new. Kafka is set with ``` - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" ``` Configtx.yaml is set to ``` # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB ``` But I'm getting this back: ``` "exceptionTrace" : " com.mo.fabric.exception.FabricException: Not enough endorsers for invoke: createVerification. 2 endorser(s) returned with an error: Sending proposal to fabric-peer-org15-20654c failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=gRPC message exceeds maximum size 4194304: 4357851, cause=null} ``` Not really sure where this gRPC limit is set. A few seconds of google finds this - https://stackoverflow.com/questions/39753730/java-grpc-how-to-increase-the-message-size-limit-in-a-managedchannel but I'm not sure if there's a property to increase this value this without searching through the codebase. The only one I can see locally is grpc.NettyChannelBuilderOption.maxInboundMessageSize in the properties I create for NetworkConfig for the peers in my local test instance, but I'm not sure that's the correct value and even if it is, that doesn't help me when my production version is cloud hosted - I don't have access to edit the config (and nor imo should I be doing so).

aatkddny (Mon, 11 Mar 2019 13:03:07 GMT):
Network isn't new. Kafka is set with ``` - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" ``` Configtx.yaml is set to ``` # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 99 MB ``` But I'm getting this back: ``` "exceptionTrace" : " com.mo.fabric.exception.FabricException: Not enough endorsers for invoke: createVerification. 2 endorser(s) returned with an error: Sending proposal to fabric-peer-org15-20654c failed because of: gRPC failure=Status{code=RESOURCE_EXHAUSTED, description=gRPC message exceeds maximum size 4194304: 4357851, cause=null} ``` Not really sure where this gRPC limit is set. A few seconds of google finds this - https://stackoverflow.com/questions/39753730/java-grpc-how-to-increase-the-message-size-limit-in-a-managedchannel and this https://github.com/grpc/grpc-java/issues/4451 but I'm not sure if there's a property to increase this value this without searching through the codebase. The only one I can see locally is grpc.NettyChannelBuilderOption.maxInboundMessageSize in the properties I create for NetworkConfig for the peers in my local test instance, but I'm not sure that's the correct value and even if it is, that doesn't help me when my production version is cloud hosted - I don't have access to edit the config (and nor imo should I be doing so).

rickr (Mon, 11 Mar 2019 13:51:37 GMT):
@aatkddny https://github.com/hyperledger/fabric-sdk-java/tree/dbc41c1a119f9567ec7b39d972663813c45e0d04#javasecurityinvalidkeyexception-illegal-key-size ?

rickr (Mon, 11 Mar 2019 13:51:37 GMT):
@aatkddny https://github.com/hyperledger/fabric-sdk-java/tree/dbc41c1a119f9567ec7b39d972663813c45e0d04#grpc-message-frame-size-exceeds-maximum ?

aatkddny (Mon, 11 Mar 2019 13:56:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sJhpfySNNC9gx5uTv) That's what I think I said I could set locally above. My problem comes when the network properties are coming from another provider. I don't think it's good practice for me to be editing their network configuration before trying to do a load from it.

aatkddny (Mon, 11 Mar 2019 13:56:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=sJhpfySNNC9gx5uTv) @rickr That's what I think I said I could set locally above. My problem comes when the network properties are coming from another provider. I don't think it's good practice for me to be editing their network configuration before trying to do a load from it.

rickr (Mon, 11 Mar 2019 14:07:12 GMT):
@aatkddny https://github.com/hyperledger/fabric-sdk-java/blob/dbc41c1a119f9567ec7b39d972663813c45e0d04/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java#L117-L141

Antimttr (Mon, 11 Mar 2019 21:20:31 GMT):
is there a reason that the end2endIT.java uses the GOlang chaincode and not the java chaincode?

Antimttr (Mon, 11 Mar 2019 21:20:44 GMT):
or is there no java chiancode?

yacovm (Mon, 11 Mar 2019 21:28:58 GMT):
there is a chaincode in java @Antimttr

yacovm (Mon, 11 Mar 2019 21:29:12 GMT):
#fabric-java-chaincode

Antimttr (Mon, 11 Mar 2019 21:29:39 GMT):
thats why they call you the expert :D

Antimttr (Mon, 11 Mar 2019 21:31:15 GMT):
ok i think i get it now, they're actualy sending out to golang or other sdks

Antimttr (Mon, 11 Mar 2019 21:31:31 GMT):
the configuration setting is called CHAIN_GOLANG_CODE

yacovm (Mon, 11 Mar 2019 21:32:47 GMT):
@gennadyl is the java chaincode expert

Antimttr (Mon, 11 Mar 2019 21:38:14 GMT):
have you written any http api for java yet? i'd love to talk to someone whose done that

yacovm (Mon, 11 Mar 2019 21:40:16 GMT):
HTTP API for fabric or in general?

Antimttr (Mon, 11 Mar 2019 21:40:25 GMT):
well for the java sdk

Antimttr (Mon, 11 Mar 2019 21:40:36 GMT):
i found the great one for nodejs in the balance transfer demo

yacovm (Mon, 11 Mar 2019 21:40:47 GMT):
no, i never tried using java SDK

Antimttr (Mon, 11 Mar 2019 21:40:53 GMT):
now i basically have to port it to java sdk

yacovm (Mon, 11 Mar 2019 21:41:07 GMT):
only once pushed a code change to it

Antimttr (Mon, 11 Mar 2019 21:41:37 GMT):
its a bummer cuz normally i'd avoid java like the plague

Antimttr (Mon, 11 Mar 2019 21:41:47 GMT):
but its the only sdk that supports idemix

yacovm (Mon, 11 Mar 2019 21:41:58 GMT):
you use idemix in fabric?

Antimttr (Mon, 11 Mar 2019 21:42:04 GMT):
i want to

yacovm (Mon, 11 Mar 2019 21:42:16 GMT):
nice

Antimttr (Mon, 11 Mar 2019 21:42:38 GMT):
the application im building requires a level of anonymity for its participants

Antimttr (Mon, 11 Mar 2019 21:42:47 GMT):
because they're competitors

Antimttr (Mon, 11 Mar 2019 21:44:41 GMT):
have you use idemix yet?

Antimttr (Mon, 11 Mar 2019 21:44:41 GMT):
have you used idemix yet?

yacovm (Mon, 11 Mar 2019 21:54:35 GMT):
no, @adc did.

Antimttr (Mon, 11 Mar 2019 21:57:05 GMT):
nice, maybe i'll see him on here one of these days

Antimttr (Mon, 11 Mar 2019 21:58:26 GMT):
my goal is to implement a complete management gateway, that can do single org or multi org management, with secure store, idemix and couchedb

Antimttr (Mon, 11 Mar 2019 21:58:48 GMT):
as well as the actual chaincode

Antimttr (Mon, 11 Mar 2019 22:07:38 GMT):
anyone know what the differences are between endtoendIT and endtoendandbackagainIT?

Antimttr (Mon, 11 Mar 2019 22:07:47 GMT):
second one seems to be slightly shorter than the first

Antimttr (Mon, 11 Mar 2019 22:08:22 GMT):
https://github.com/hyperledger/fabric-sdk-java

Antimttr (Mon, 11 Mar 2019 22:08:25 GMT):
that gives a few details

KyunghoKim (Tue, 12 Mar 2019 03:12:03 GMT):
Has joined the channel.

DLTChacha (Tue, 12 Mar 2019 10:28:45 GMT):
Has joined the channel.

gravity (Tue, 12 Mar 2019 11:47:43 GMT):
Hi all are there any best practices on how to identify, authenticate and authorize a user in a chaincode? is it enough to use `cn` from the `x509Certificate`?

rickr (Tue, 12 Mar 2019 11:49:28 GMT):
@gravity Better asked on #fabric-chaincode-dev

aatkddny (Tue, 12 Mar 2019 13:30:40 GMT):
Ok to flog my particular dead horse some more. `grpc.NettyChannelBuilderOption.maxInboundMessageSize` is expected to be set in the properties for each of the peers/orderers et al. It's propagated to the NettyChannelBuilder in Endpoint Here's my problem. I call my "Enterprise Blockchain Network" provider for the NetworkConfig. It's passed back as a json payload which I coerce into a JsonObject (due to the NetworkConfig reqs). This particular value isn't set. Is there *really* an expectation that I go through the (multiple) JsonObjects returned - one per org - to find all of my peers/orderers and look for the properties - if there are any returned or create if not - in all of the network configurations for all of the orgs in this fabric and manually insert this value into every single one?

aatkddny (Tue, 12 Mar 2019 13:30:40 GMT):
Ok to flog my particular dead horse some more. `grpc.NettyChannelBuilderOption.maxInboundMessageSize` is expected to be set in the properties for each of the peers/orderers et al. It's propagated to the NettyChannelBuilder in Endpoint. I don't see an override where it can be set as an environment variable. Here's my problem. I call my "Enterprise Blockchain Network" provider for the NetworkConfig. It's passed back as a json payload which I coerce into a JsonObject (due to the NetworkConfig reqs). This particular value isn't set. Is there *really* an expectation that I go through the (multiple) JsonObjects returned - one per org - to find all of my peers/orderers and look for the properties - if there are any returned or create if not - in all of the network configurations for all of the orgs in this fabric and manually insert this value into every single one?

rickr (Tue, 12 Mar 2019 13:38:58 GMT):
Hmm -- maybe a disconnect in understanding. The link I provided showed that you could adjust the peer/ordererer properties before you create the channel from the neteworkconfig. 1) is that not what you want ? 2) is that not working ?

aatkddny (Tue, 12 Mar 2019 13:51:12 GMT):
The disconnect is this. This is our production blockchain network and it's hosted by a third party that's rather involved in same technology. There are a number of orgs in it. We are proxying access to all of them on their behalf, so we get multiple network configurations. I get the network configurations from this supplier by making calls for same. It comes back as a series of json payloads. If you want the code it looks like this: ``` JsonReader reader = Json.createReader(new StringReader(json)); JsonObject jo = (JsonObject) reader.read(); org.setJo(jo); return NetworkConfig.fromJsonObject(jo); ``` This then gets passed into the channel create code to do a loadFromNetworkObject. I don't touch it after I received it. Yes I could go through each of these NetworkConfig objects and edit the properties associated with each peer and each orderer and inject this same value into every single one of the properties in there, but this seems like the wrong way to do this. My network is such that every peer has the potential to see the same size of message (the size that's set in configtx.yaml for max message size). If it's set once there, it seems wrong for me to have to inject it all over the place because of a bad default in a builder. I'd expect to set a global variable and have that used. As a more philosophical question, it also seems wrong to edit a network configuration returned from a third party network to accommodate an SDK. The whole idea (I thought) was to not have to manually build this configuration any more.

aatkddny (Tue, 12 Mar 2019 13:51:12 GMT):
The disconnect is this. This is our production blockchain network and it's hosted by a third party that's rather involved in same technology. There are a number of orgs in it. We are proxying access to all of them on their behalf, so we get multiple network configurations. I get the network configurations from this supplier by making calls for same. It comes back as a series of json payloads. If you want the code it looks like this: ``` JsonReader reader = Json.createReader(new StringReader(json)); JsonObject jo = (JsonObject) reader.read(); org.setJo(jo); return NetworkConfig.fromJsonObject(jo); ``` This then gets passed into the channel create code to do a loadFromNetworkObject. I don't touch it after I received it. Yes I could go through each of these NetworkConfig objects and edit the properties associated with each peer and each orderer and inject this same value into every single one of the properties in there, but this seems like the wrong way to do this. My network is such that every peer has the potential to see the same size of message (the size that's set in configtx.yaml for max message size). If it's set once there, it seems wrong for me to have to inject it all over the place because of a bad default in a builder. I'd expect to set a global variable and have that used, or better to have it returned from the network provider so I can use it without having to worry that there's a mismatch. As a more philosophical question, it also seems wrong to edit a network configuration returned from a third party network to accommodate an SDK. The whole idea (I thought) was to not have to manually build this configuration any more.

aatkddny (Tue, 12 Mar 2019 13:51:12 GMT):
The disconnect is this. This is our production blockchain network and it's hosted by a third party that's rather involved in same technology. My access is limited to interaction with APIs. There are a number of orgs in it. We are proxying access to all of them on their behalf, so we get multiple network configurations. I get the network configurations from this supplier by making calls for same. It comes back as a series of json payloads. If you want the code it looks like this: ``` JsonReader reader = Json.createReader(new StringReader(json)); JsonObject jo = (JsonObject) reader.read(); org.setJo(jo); return NetworkConfig.fromJsonObject(jo); ``` This then gets passed into the channel create code to do a loadFromNetworkObject. I don't touch it after I received it. Yes I could go through each of these NetworkConfig objects and edit the properties associated with each peer and each orderer and inject this same value into every single one of the properties in there, but this seems like the wrong way to do this. My network is such that every peer has the potential to see the same size of message (the size that's set in configtx.yaml for max message size). If it's set once there, it seems wrong for me to have to inject it all over the place because of a bad default in a builder. I'd expect to set a global variable and have that used, or better to have it returned from the network provider so I can use it without having to worry that there's a mismatch. As a more philosophical question, it also seems wrong to edit a network configuration returned from a third party network to accommodate an SDK. The whole idea (I thought) was to not have to manually build this configuration any more.

rickr (Tue, 12 Mar 2019 13:59:18 GMT):
This seems to me a very easy adjust. The common code point (function, method) where you load the network would do this adjustment. Your application could then have a *global* variable (yuck) to what it's set.

aatkddny (Tue, 12 Mar 2019 14:04:04 GMT):
The question isn't whether I can. Obviously I *can*. It's whether this is the *correct* way to do this. There's exactly *one* maximum message size for an entire fabric network and it's set when the network is created. In this case I can't even see configtx so I'm forced to guess that they kept the default value. I will now have to write code to edit the network definitions I get back from my provider just so I can set the same value - that can't change - in around 400 places.

aatkddny (Tue, 12 Mar 2019 14:04:04 GMT):
The question isn't whether I can. Obviously I *can*. It's whether this is the *correct* way to do this. There's exactly *one* maximum message size for an entire fabric network and it's set when the network is created. In this case I can't even see configtx so I'm forced to guess that they kept the default value. I will now have to write code to edit the network definitions I get back from my provider just so I can set the same value - that can't change - in around 400 places.

AlessandroPrimavera (Tue, 12 Mar 2019 14:10:54 GMT):
Has joined the channel.

rickr (Tue, 12 Mar 2019 14:43:25 GMT):
@aatkddny AFAIK there was no defined property in the netwrokconfig for max message size. Setting this is different for each SDK grpc. The networkconfig had a `grpc.keepalive_time_ms` which really Node based :( The JSDK does for that do the remap. There would need to be some agreement on how a grpc message size should be specified in the Networkconfig. I'm not understanding why changing in 400 places - when a common method call by your application to loading a network could do that adjustment.

lupass93 (Tue, 12 Mar 2019 15:11:02 GMT):
Has joined the channel.

aatkddny (Tue, 12 Mar 2019 15:22:15 GMT):
The 400 places is because I have a lot of nodes and a lot of channels.

aatkddny (Tue, 12 Mar 2019 15:33:55 GMT):
Ok I added a ticket for same. https://jira.hyperledger.org/browse/FAB-14605 In this case, the 400 places is a consequence of the node count and the way network config is returned. 400 places in the set of network configurations, not the code.

aatkddny (Tue, 12 Mar 2019 15:33:55 GMT):
Ok I added a ticket for same. https://jira.hyperledger.org/browse/FAB-14605 In this case, the 400 places is a consequence of the node count and the way network config is returned. 400 places in the set of network configurations, not the code. It's one piece of code, but it sets the same value many many times.

rickr (Tue, 12 Mar 2019 15:54:50 GMT):
@aatkddny ```` JsonReader reader = Json.createReader(new StringReader(json)); JsonObject jo = (JsonObject) reader.read(); org.setJo(jo); NetworkConfig nwc= NetworkConfig.fromJsonObject(jo); nwc.getPeerNames().forEach(peerName -> { try { Properties peerProperties = nwc.getPeerProperties(peerName); peerProperties.setProperty("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); nwc(peerName, peerProperties); } catch (InvalidArgumentException e) { throw new RuntimeException(e); } }); return nwc; ```

rickr (Tue, 12 Mar 2019 15:54:50 GMT):
@aatkddny ```` JsonReader reader = Json.createReader(new StringReader(json)); JsonObject jo = (JsonObject) reader.read(); org.setJo(jo); NetworkConfig nwc= NetworkConfig.fromJsonObject(jo); nwc.getPeerNames().forEach(peerName -> { try { Properties peerProperties = nwc.getPeerProperties(peerName); peerProperties.setProperty("grpc.NettyChannelBuilderOption.maxInboundMessageSize", 9000000); nwc.setPeerProperties(peerName, peerProperties); } catch (InvalidArgumentException e) { throw new RuntimeException(e); } }); return nwc; ```

aatkddny (Tue, 12 Mar 2019 15:57:28 GMT):
Thx, but I already wrote the code. I added same for orderer and event hub.

rickr (Tue, 12 Mar 2019 15:57:58 GMT):
and .. that's not what you wanted ?

aatkddny (Tue, 12 Mar 2019 15:58:42 GMT):
Not really. I want to not have to edit provided properties from a third party because of a limitation in the SDK.

rickr (Tue, 12 Mar 2019 15:59:11 GMT):
ok but that's 400 places you're changing :)

rickr (Tue, 12 Mar 2019 16:00:22 GMT):
If your're having to do that in 400 places I would agree OUCH .. but this doesn't seem to be that horrible to do

aatkddny (Tue, 12 Mar 2019 16:01:06 GMT):
Edit programatically or manually is irrelevant. As a client to an SDK and to a fabric network I ought to not have to be acting as man in the middle. When - and it will - the network configuration layout changes, I as the client shouldn't be forced to change my code.

aatkddny (Tue, 12 Mar 2019 16:01:06 GMT):
Edit programatically or manually is irrelevant. As a client to an SDK and to a fabric network I ought to not have to be acting as man in the middle. When - and it will - the network configuration layout changes, I as the client shouldn't be forced to change the glue code that I don't think I should have to write in the first place.

aatkddny (Tue, 12 Mar 2019 16:01:06 GMT):
Edit programatically or manually is irrelevant. As a client to an SDK and to a fabric network I ought to not have to be acting as man in the middle. When - and it will - the network configuration layout changes, I as the client shouldn't be forced to change the glue code that I don't think I should have to write in the first place. I - as the client - am not a party to this contract. This forces me to become one.

aatkddny (Tue, 12 Mar 2019 16:01:06 GMT):
Edit programatically or manually is irrelevant. As a client using an sdk to connect to a fabric network, I ought to not to be forced to act as man in the middle to a contract between sdk and fabric. When - and it will - the network configuration layout changes, I the client, shouldn't be forced to change glue code that I don't think I should have to write in the first place. I am not a party to this contract. This forces me to become one.

Antimttr (Tue, 12 Mar 2019 18:01:10 GMT):
@aatkddny i feel your pain, and i agree!

rickr (Tue, 12 Mar 2019 18:31:26 GMT):
There's no "contract" that specifies max message size. irregardless of the SDK. The contract you speak of the NetworkConfig/Connection Profile as I said had no specification for setting that.

aatkddny (Tue, 12 Mar 2019 18:52:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gxLhmmAkJrf8RQpvX) But there *is* a contract between sdk and fabric. A user shouldn't have to act as a man in the middle between these two because a required field is missing from that contract. You either fix the contract or allow the user to pass in the field separately.

aatkddny (Tue, 12 Mar 2019 18:52:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=gxLhmmAkJrf8RQpvX) But there *is* a contract between sdk and fabric. A user shouldn't have to act as a man in the middle between these two because a required field is missing from that contract. You (one) either fix the contract or allow the user to pass in the field separately.

rickr (Tue, 12 Mar 2019 18:58:39 GMT):
@aatkddny Show me a specification that states setting the max message size please

SatheeshNehru (Wed, 13 Mar 2019 06:42:02 GMT):
whats difference between add peer and join peer?

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 08:39:11 GMT):
Hi, i am trying to install a chaincode in java. I think that it hasn't have mistakes, but when i try to install i receive theses errors

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 08:39:11 GMT):

Clipboard - March 13, 2019 9:39 AM

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 09:24:33 GMT):
ok, i solved it. I put wrong path

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 09:57:07 GMT):
): when i try to instantiated the chaincode i receive this:

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 09:57:10 GMT):

Clipboard - March 13, 2019 10:57 AM

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 10:08:15 GMT):
what is the function of hyperledger/fabric-javaenv docker image? It will be used to install and instantiated chaincodes?

AndresMartinezMelgar.itcl (Wed, 13 Mar 2019 10:09:57 GMT):
Is it look like fabric-tools?

rickr (Wed, 13 Mar 2019 12:41:06 GMT):
@SatheeshNehru You only ever *join* a peer belonging to _your own organization_ to a channel once at the beginning. You would only *add* peers from other organizations or peers of your own organization you've already *joined* when recreating the channel SDK object.

rickr (Wed, 13 Mar 2019 12:56:11 GMT):
@SatheeshNehru base java docker environment

rickr (Wed, 13 Mar 2019 12:56:11 GMT):
@SatheeshNehru base java chaincode docker environment

aatkddny (Wed, 13 Mar 2019 13:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EzvWEgjdEdfyNvoHG) @rickr You an I both know there isn't one. Yet. But seeing the amount of grpc. specific stuff that has been stuffed into the connection profile, there's space for one more. I'm counting 5 different grpc properties already in the one I'm looking at.

aatkddny (Wed, 13 Mar 2019 13:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EzvWEgjdEdfyNvoHG) @rickr You an I both know there isn't one. Yet. But seeing the amount of grpc. specific stuff that has been stuffed into the connection profile, there's space for one more. I'm counting 5 different grpc properties already in the one I'm looking at. And as an aside having fixed that value in the SDK the message gets blown out by the network max kafka message size anyway. It's not even that big...

aatkddny (Wed, 13 Mar 2019 13:04:05 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EzvWEgjdEdfyNvoHG) @rickr You and I both know there isn't one. Yet. But seeing the amount of grpc. specific stuff that has been stuffed into the connection profile, there's space for one more. I'm counting 5 different grpc properties already in the one I'm looking at. And as an aside having fixed that value in the SDK the message gets blown out by the network max kafka message size anyway. It's not even that big...

rickr (Wed, 13 Mar 2019 13:47:40 GMT):
Not in any specific details so every SDK can implement uniformly and authors know what to set : nothing for the SDK to do

rickr (Wed, 13 Mar 2019 13:52:24 GMT):
Besides -- I don't think it's even right for that to be there. That document general purpose is for infrastructure providers to give to clients so they can easily construct the network with SDK of their choice to work with it. But as an infrastructure provider I have no idea what chaincode you will be deploying and what it's requirements are. Even as the chaincode author you may not know. One request may come in and produce just a few bytes of results to the client. Another request could produce 300MB.

gravity (Wed, 13 Mar 2019 17:23:25 GMT):
Hi all. Is it actually reasonable to have more than one intermediate ca server? I mean, is it enough to have only one ica and scale it for better availability?

rickr (Wed, 13 Mar 2019 18:43:36 GMT):
@gravity Hate to push people elsewhere, but so others may benefit , please ask on #fabric-ca

gravity (Wed, 13 Mar 2019 20:01:26 GMT):
thanks, will ask but, to be honest, this room is the most responsive among others :)

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 07:30:01 GMT):
Hi @rickr , I'm having a problem when I try to instantiate a chaincode written in java. I'm doing exactly the same steps as the example byfn.sh but in kubernetes. I have changed what is necessary in the build.gradle file. I have successfully installed the chaincode, but when I try to instantiate it I get maven-related problems. I attach a couple of photos

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 07:31:08 GMT):

Installation

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 07:31:40 GMT):

instantiated

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 07:33:42 GMT):

folders and files system

daijianw (Thu, 14 Mar 2019 09:17:18 GMT):
updateAnchorPeer

sstone1 (Thu, 14 Mar 2019 09:40:47 GMT):
Error: could not update anchor peers

nkl199 (Thu, 14 Mar 2019 10:06:44 GMT):
Has joined the channel.

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 12:19:59 GMT):
Hi, i have a mistake when i want create a new channel with java sdk. I receive this log, but i cant find any info. Thanks

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 12:20:02 GMT):

Clipboard - March 14, 2019 1:20 PM

AndresMartinezMelgar.itcl (Thu, 14 Mar 2019 12:20:42 GMT):
line 91 is: Channel mychannel = fabClient.getInstance().newChannel(Config.CHANNEL_NAME,orderer,channelConfiguration,channelConfigurationSignatures);

rickr (Thu, 14 Mar 2019 12:33:47 GMT):
@AndresMartinezMelgar.itcl Need to look at possibly the Orderer logs.

chill37 (Thu, 14 Mar 2019 12:45:06 GMT):
Hi. while going through endorsement policy, how do I get MSPID for IDENTITY/ANONYMITY of MSP Principal? I'm not really sure how the identity/anonymity would work from User's perspective as well. Currently I'm trying to decode the Endorsement Policy, but Identity/ANonymity of MSPPrincipal only has type value and nothing else, so I'm curious. Thanx!

gravity (Thu, 14 Mar 2019 16:48:17 GMT):
Hi all is there any difference between `HFCAClient.HFCA_TYPE_CLIENT` and `HFCAClient.HFCA_TYPE_USER`? from my observation, identities that are registered using these types are the same and they both behave like a common user

skarim (Thu, 14 Mar 2019 16:52:59 GMT):
The type of the identity ends up as an attribute in the certificate. You can then use cid library in chaincode to apply logic based on types if you'd like. Otherwise identities will behave the same.

gravity (Thu, 14 Mar 2019 17:18:30 GMT):
@skarim got it, thanks

Antimttr (Thu, 14 Mar 2019 20:19:27 GMT):
hey @skarim ! you were responsible for writing idemix in the java sdk if i'm not mistaken?

skarim (Thu, 14 Mar 2019 21:13:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=6tPCYGrPBYEW8Crfh) @Antimttr I wrote the idemix end to end test case, but the actually java implementation was written by someone else

Antimttr (Thu, 14 Mar 2019 22:00:46 GMT):
@skarim ah nice, I have interest at my company to port the idemix from java to js. Right now im working on making a version of the balance transfer demo js api in java to get access to idemix

Antimttr (Thu, 14 Mar 2019 22:12:01 GMT):
In end2endIT.java theres a lot of references to SampleOrg, SampleStore, etc. So for a real implementation what data structure would these be replaced with?

Antimttr (Thu, 14 Mar 2019 22:12:10 GMT):
is there an Org and a Store class somewhere?

Antimttr (Thu, 14 Mar 2019 22:18:04 GMT):
seems like its just for staging test cases

Antimttr (Thu, 14 Mar 2019 22:18:39 GMT):
is there any non-test-case based java sdk example code anywhere?

Antimttr (Thu, 14 Mar 2019 22:19:04 GMT):
like from an actual implementation?

aatkddny (Thu, 14 Mar 2019 23:19:31 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=pZ7zPvJryCFWhASwE) FWIW - we stuck them all into a nosql database. Our app is a spring boot thing that's way too complicated to reproduce, but I'll give you our user definition to get you started. ``` @Document public class FabricUser implements org.hyperledger.fabric.sdk.User { @Id private String id; private String name; private String organization; private String mspId; private String secret; private String affiliation; private Boolean admin; private Boolean peerAdmin; private Set roles; private String account; @Transient @JsonIgnore private Enrollment enrollment; String enrollmentDetails; ``` You;'ll want this too. I lifted it from some of the code in the samples. ``` /** * Serialize enrollment details */ private void saveEnrollmentDetails() throws IOException { enrollmentDetails = null; if (enrollment != null) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(enrollment); oos.flush(); enrollmentDetails = Hex.toHexString(bos.toByteArray()); bos.close(); } } private void readEnrollmentDetails() throws IOException, ClassNotFoundException { if (StringUtils.hasText(enrollmentDetails)) { byte[] serialized = Hex.decode(enrollmentDetails); ByteArrayInputStream bis = new ByteArrayInputStream(serialized); ObjectInputStream ois; ois = new ObjectInputStream(bis); enrollment = (Enrollment) ois.readObject(); } } ```

Antimttr (Fri, 15 Mar 2019 03:25:06 GMT):
@aatkddny ok interesting, thanks. I started with spring and it was horrifyingly complex, coming from like nodejs. I opted for jersey, way more straight forward, clean code imho

aatkddny (Fri, 15 Mar 2019 13:06:29 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xMCxraAGa4grG2oNr) In this case the complexity is the logic, not the framework. The application I culled the user class from was custom written to build and instantiate any network from scratch (compose) or build (k8s) from a simple network definition file. It allows us to remove human error editing and submitting all the yaml files, and makes stopping and starting a fabric - something we've done a lot as we test - much quicker.

Antimttr (Fri, 15 Mar 2019 14:20:28 GMT):
@aatkddny I was just wondering what the business case was for storing all those records in perpetuity in a db? Is this to act as a backup for the ledger in case you need to rebuild corrupted data down the road?

aatkddny (Fri, 15 Mar 2019 14:22:06 GMT):
Well for the user you need to save the enrollment that the ca issues.

aatkddny (Fri, 15 Mar 2019 14:22:06 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vTQJtPMs4N2QYZim7) @Antimttr We save the msp anchor tx - because we do them after we create the channel. the channel.tx type records are used from disk when we create the channels, but we do that as part of creating the network. Adding channels on the fly uses an external process.

Antimttr (Fri, 15 Mar 2019 14:22:31 GMT):
do you also save like the channel creation stuff?

Antimttr (Fri, 15 Mar 2019 14:26:40 GMT):
theres also a class they have called Sample store are you saving the data that fills up those objects?

Antimttr (Fri, 15 Mar 2019 14:28:39 GMT):
so the msp anchor is an artifact created by the use of idemix if im not mistaken?

aatkddny (Fri, 15 Mar 2019 14:31:11 GMT):
sample store is just a kv store. we save users, we load channels from a network configuration. we have two flavors for this. one that gets the config from our favorite blockchain service provider, and one that internally constructs a network config from our saved network properties for the stuff we have in our data center.

aatkddny (Fri, 15 Mar 2019 14:31:11 GMT):
sample store is just a kv store. we save users, we load channels from a network configuration. we have two flavors for this. one that gets the config from our favorite blockchain service provider, and one that internally constructs a network config from our saved network properties for the stuff we have in our data center. We save org, orderer and channel information in a configuration database.

Antimttr (Fri, 15 Mar 2019 14:40:47 GMT):
So the configuration database is just referenced by your hyperledger management tools? (your sdk implementation)

Antimttr (Fri, 15 Mar 2019 14:41:47 GMT):
Do you also keep offledger backups of all the ledger transactions for your implementation as well?

Antimttr (Fri, 15 Mar 2019 14:42:24 GMT):
@aatkddny have you run into the issue where the docker images will fill up your disk volumes with gossip logs? that happens to me about once a week

Antimttr (Fri, 15 Mar 2019 14:42:29 GMT):
w/the balance transfer demo

aatkddny (Fri, 15 Mar 2019 14:44:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ftYnoYaq5wASz8v83) @Antimttr We are moving that way. As it Tx volume scales out the UI is starting to slow down. There's also an issue with maximum asset size - we were aggregating on chain and hit a roadblock there.

aatkddny (Fri, 15 Mar 2019 14:44:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ftYnoYaq5wASz8v83) @Antimttr We are moving that way. We knew we needed to for reporting, but the real tine stuff has pushed us to up the priority. As it Tx volume scales out the UI is starting to slow down. There's also an issue with maximum asset size - we were aggregating on chain and hit a roadblock there.

dan13 (Fri, 15 Mar 2019 14:45:02 GMT):
Can someone explain the below? IBM Blockchain Platform Starter (HLF 1.2): 2 Orgs, Org 1 has 1 Peer, Org 2 currently has no (zero) peers. Java SDK-based Client app uses an Org 1 user and peer, and registers persistent (i.e., outside of any transactional context) Block and Chaincode Event listeners (logged under "EventService" below) at startup and is logging every event they receive. A single transaction is sent to a simple chaincode that emits an "event1" event. The questions are 1. Why are the listeners seeing the same event repeatedly? 2. Why is the period varying? 3. Why are some blocks coming from peer "null" (Lines 3 and 5) which then stops? ``` 2019-03-14 15:21:16.898 INFO AppService : createAsset: Proposal Created: externalId=987, hash=306d70af59bb740d5bab5bd5b534dfb77f4f206c46eb8931a761dac6a643cc71, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619 2019-03-14 15:21:18.623 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 15:21:18.623 INFO EventService : Received Block peer=null, number=246, # trans=1 2019-03-14 15:21:18.624 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 15:21:18.624 INFO EventService : Received Event peer=null, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 15:21:18.624 INFO AppService : createAsset: Commit Successful: externalId=987, blockEvent=org.hyperledger.fabric.sdk.BlockEvent$TransactionEvent@4829380f 2019-03-14 15:29:58.199 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 15:29:58.199 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 15:38:18.510 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 15:38:18.510 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 15:48:19.391 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 15:48:19.391 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 15:52:39.454 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 15:52:39.455 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 16:02:40.944 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 16:02:40.944 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 2019-03-14 16:12:41.914 INFO EventService : Received Block peer=org1-peer1, number=246, # trans=1 2019-03-14 16:12:41.914 INFO EventService : Received Event peer=org1-peer1, handle=CHAINCODE_EVENTS_HANDLEcdcbc87d-28f3-4b37-a650-b1a6123d8d12CHAINCODE_EVENTS_HANDLE, chaincodeId=testApp, name=event1, transactionId=02356529a8ace2cdfb1596fce10aa5d547ddc2e993dba55d82db6da27a4dc619, payload=987 (reasonably sure this would have continued indefinitely if not stopped....) ``` Thanks!

Antimttr (Fri, 15 Mar 2019 14:47:16 GMT):
@aatkddny by maximum asset size you mean teh szie of any single ledger transaction? or do you mean the aggregate size of all transactions on the ledger?

aatkddny (Fri, 15 Mar 2019 14:49:47 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ut35mcF6XeQ2vGZCQ) @Antimttr single tx - the size of the message sent to the orderer is bound.

Antimttr (Fri, 15 Mar 2019 14:50:01 GMT):
Is your UI that's slowing down tightly coupled with your SDK implementation, or are you making RESTful api calls to it from a web app?

aatkddny (Fri, 15 Mar 2019 14:50:28 GMT):
@dan13 - you get an event from each peer. there are two kinds - block and actual event. the payload differs between the two.

aatkddny (Fri, 15 Mar 2019 14:55:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EkojxfnmoJvJMezzT) @Antimttr We have a dashboard. It aggregates sets of assets from more than one channel by invoking chaincode on each of the channels. As asset count increases response time also goes up. Yes yes I know - a blockchain is a lousy database, but until the work to fix it is scheduled this is what we have. To reduce asset count we were aggregating a specific set of periodic assets (daily metrics) into one uber asset. This hit a size limitation in our cloud instance.

aatkddny (Fri, 15 Mar 2019 14:55:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EkojxfnmoJvJMezzT) @Antimttr We have a dashboard. It aggregates sets of assets from more than one channel by invoking chaincode on each of the channels inside a rest endpoint. As asset count increases response time also goes up. Yes yes I know - a blockchain is a lousy database, but until the work to fix it is scheduled this is what we have. To reduce asset count we were aggregating a specific set of periodic assets (daily metrics) into one uber asset. This hit a size limitation in our cloud instance.

Antimttr (Fri, 15 Mar 2019 14:56:52 GMT):
Ahh ok. Yeah our use case is a bit different so that (probably) wont be an issue. Our typical record size will be under 1kb and we'll only be doing a few hundred transactions a day (max). But its good to keep these things in mind

Antimttr (Fri, 15 Mar 2019 14:57:18 GMT):
Your dashboard. does it use synchronis or asynchronis calls to the hyperledger? also are you doing any caching of your hyperledger api calls?

aatkddny (Fri, 15 Mar 2019 15:00:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oawJBfbiaGA3MaXgm) The calls into the fabric are async. We self-synchronize so we can aggregate in the endpoint before it goes back to the browser. It'll get fixed when we put in something a bit more performant and the ui guys rejig the code to paginate.

Antimttr (Fri, 15 Mar 2019 15:01:49 GMT):
did you implement the pagination options in your hyperledger sdk implementation? I'm glad that they put that in there, atleast its in the node sdk

Antimttr (Fri, 15 Mar 2019 15:01:53 GMT):
hopefuly its also in the java sdk

dan13 (Fri, 15 Mar 2019 15:43:39 GMT):
@aatkddny Thanks -- the question is why am I receiving the same event -- block and chaincode -- multiple times. See the trace -- the peer is pushing the same data repeatedly.

dan13 (Fri, 15 Mar 2019 15:43:39 GMT):
@aatkddny Thanks -- the question is why am I receiving the same event -- block and chaincode -- multiple times. See the trace -- the same (single) peer is pushing the same data repeatedly.

aatkddny (Fri, 15 Mar 2019 15:45:22 GMT):
its not the same event. one is for the block one for each tx in the block. since default cut rate is 2s you are probably getting one of each.

dan13 (Fri, 15 Mar 2019 15:48:37 GMT):
@aatkddny see the log trace above. I have a block listener and a chaincode listener. 1 transaction occurred on the network with 1 peer. I would expect 1 block listener log (the block event), and 1 chaincode listener log (the chaincode event). I get multiple with the exact same payload (per type). It sounds like you are confirming my expectation, but that doesn't match the logs. In any event, if you are confirming my expectation, then I will research further - thanks

aatkddny (Fri, 15 Mar 2019 15:49:26 GMT):
you get an event for each peer on the channel iirc.

Antimttr (Fri, 15 Mar 2019 15:56:13 GMT):
@aatkddny do you also store this data structure in your database? https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/SampleOrg.java

Antimttr (Fri, 15 Mar 2019 15:57:43 GMT):
seems like some of this data would also reside in the network.yaml and orgX.yaml

Antimttr (Fri, 15 Mar 2019 15:58:23 GMT):
from the end2endIT file they load it using checkConfig(), so right from the config files

Antimttr (Fri, 15 Mar 2019 15:58:37 GMT):
so it would seem redundant to also store it in another db table

Antimttr (Fri, 15 Mar 2019 15:58:50 GMT):
but maybe you'd want to see all the iterations/revision of the data

aatkddny (Fri, 15 Mar 2019 16:07:55 GMT):
we do it differently. we have a very simple internal format config file that describes the network - orgs, number of peers and channel relationships. we do everything from that. everything as in run any crypto, run any configtxgens, generate the yaml files for docker or k8s and save what we need to allow us to build a networkconfig so we can do a channel.loadfromnetworkconfig when our real applications go to use this fabric. that's why we save stuff to the db - there's no redundancy for us. our implementation is different.

aatkddny (Fri, 15 Mar 2019 16:07:55 GMT):
we do it differently. we have a very simple internal format config file that describes the network - orgs, number of peers and channel relationships. we do everything from that. everything as in run any crypto, run any configtxgens, generate the yaml files for docker or k8s and save what we need to allow us to build a networkconfig so we can do a channel.loadfromnetworkconfig when our real applications go to use this fabric. that's why we save stuff to the db - there's no redundancy for us. ymmv

Antimttr (Fri, 15 Mar 2019 16:09:34 GMT):
ok so basically

Antimttr (Fri, 15 Mar 2019 16:09:54 GMT):
you created your own configurator, which generates the logical hyperledger network configuration files

Antimttr (Fri, 15 Mar 2019 16:10:04 GMT):
does it also dynmically generate the docker-compose.yaml file?

aatkddny (Fri, 15 Mar 2019 16:10:11 GMT):
yes

Antimttr (Fri, 15 Mar 2019 16:10:25 GMT):
yeah i was thinking about making one of those for my administration gateway

aatkddny (Fri, 15 Mar 2019 16:11:39 GMT):
well ours has a switch - it'll do either compose or kubernetes. when you scale out more orgs compose falls flat. swarm isn't well supported so you end up moving (painfully in my case) to kubernetes.

Antimttr (Fri, 15 Mar 2019 16:11:59 GMT):
oh really?

Antimttr (Fri, 15 Mar 2019 16:12:12 GMT):
how many orgs did it take to get to that point?

Antimttr (Fri, 15 Mar 2019 16:12:21 GMT):
(and how many peers?)

Antimttr (Fri, 15 Mar 2019 16:12:57 GMT):
also were all these running on a single host server?

Antimttr (Fri, 15 Mar 2019 16:13:05 GMT):
or do you have them spread out amongst multiple servers?

Antimttr (Fri, 15 Mar 2019 16:13:34 GMT):
are the kubernetes images rolled for us like the docker images are?

Antimttr (Fri, 15 Mar 2019 16:13:38 GMT):
like by the hyperledger folks

Antimttr (Fri, 15 Mar 2019 16:13:43 GMT):
or did you have to roll your own?

Antimttr (Fri, 15 Mar 2019 16:14:17 GMT):
or can you use the docker images with kubernetes?

Antimttr (Fri, 15 Mar 2019 16:26:53 GMT):
it seems like you can

aatkddny (Fri, 15 Mar 2019 16:29:17 GMT):
we tapped out at about 8 two node orgs in docker. compose was single docker and single large server. when we started this there were no kubernetes images - it was all roll your own. there are some published now that use helm charts so that'll make it easier, but there's still no tls in any of them.

aatkddny (Fri, 15 Mar 2019 16:29:17 GMT):
we tapped out at about 8 two node orgs in docker. compose was single docker and single large server. kubernetes is running 20 or so orgs on a 6 node cluster. when we started this there were no kubernetes images - it was all roll your own. there are some published now that use helm charts so that'll make it easier, but there's still no tls in any of them.

Antimttr (Fri, 15 Mar 2019 16:30:13 GMT):
so you rolled your own to get around that limitation?

aatkddny (Fri, 15 Mar 2019 16:30:26 GMT):
yes. we autogen all the files.

aatkddny (Fri, 15 Mar 2019 16:30:26 GMT):
yes. we autogen all the files from the config

Antimttr (Fri, 15 Mar 2019 16:31:21 GMT):
are you able to just modify the existing not tls images, or you have to completely start from scratch?

Antimttr (Fri, 15 Mar 2019 16:31:21 GMT):
are you able to just modify the existing non-tls images, or you have to completely start from scratch?

PradeepJaligama (Fri, 15 Mar 2019 16:33:15 GMT):
there is also something called as network launcher that supports a wide variety of options..

Antimttr (Fri, 15 Mar 2019 16:33:31 GMT):
is that in kubernetes?

PradeepJaligama (Fri, 15 Mar 2019 16:34:05 GMT):
i dont think so

PradeepJaligama (Fri, 15 Mar 2019 16:34:11 GMT):
but could be useful for local deployments

PradeepJaligama (Fri, 15 Mar 2019 16:34:27 GMT):
https://github.com/hyperledger/fabric-test/tree/master/tools/NL

Antimttr (Fri, 15 Mar 2019 16:35:37 GMT):
says it is using codebase v1.0.0, i guess it hasnt been updated for 1.4? or does it work regardless of subversion?

aatkddny (Fri, 15 Mar 2019 16:38:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oncL5AuzDmNMY5FLK) @Antimttr We started from scratch. the images didn't exist when we started this project.

Antimttr (Fri, 15 Mar 2019 16:39:01 GMT):
i wonder if theres any hyperledger docs that discuss rolling your own peer/orderer/ca nodes

Antimttr (Fri, 15 Mar 2019 16:39:13 GMT):
i've never rolled my own docker image before

aatkddny (Fri, 15 Mar 2019 16:40:24 GMT):
use scripts and substitute. i'll give you a simple kafka one to get you started - this is for HLF-1.4.0 {..} are the substitution points ``` apiVersion: v1 kind: Service metadata: name: kafka{ID} spec: ports: - name: "9092" protocol: TCP port: 9092 - name: server protocol: TCP port: 9093 selector: name: kafka{ID} clusterIP: None --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: kafka{ID} spec: replicas: 1 strategy: type: Recreate template: metadata: labels: name: kafka{ID} app: kafka spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 podAffinityTerm: labelSelector: matchExpressions: - key: "app" operator: In values: - "kafka" topologyKey: "kubernetes.io/hostname" terminationGracePeriodSeconds: 60 restartPolicy: Always dnsPolicy: ClusterFirst schedulerName: default-scheduler containers: - name: kafka{ID} image: hyperledger/fabric-kafka:0.4.14 imagePullPolicy: IfNotPresent env: - name: KAFKA_BROKER_ID value: "{ID}" - name: KAFKA_ZOOKEEPER_CONNECT value: {ZOOKEEPER} - name: KAFKA_LOG_RETENTION_HOURS value: "-1" - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" - name: KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE value: "false" - name: KAFKA_DEFAULT_REPLICATION_FACTOR value: "{REPLICATION}" - name: KAFKA_MIN_INSYNC_REPLICAS value: "{INSYNC}" - name: KAFKA_ADVERTISED_HOST_NAME value: kafka{ID} - name: KAFKA_CONTROLLED_SHUTDOWN_ENABLED value: "true" - name: KAFKA_LOG_DIR value: /share - name: KAFKA_LOG_DIRS value: /share - name: GODEBUG value: netdns=go volumeMounts: - mountPath: /share name: kfk subPath: kafka/kafka{ID} lifecycle: preStop: exec: command: - /opt/kafka/bin/kafka-server-stop.sh volumes: - name: kfk persistentVolumeClaim: claimName: {CLAIM} --- ```

aatkddny (Fri, 15 Mar 2019 16:40:24 GMT):
use scripts and substitute. i'll give you a simple kafka one to get you started - this is for HLF-1.4.0 {..} are the substitution points ``` apiVersion: v1 kind: Service metadata: name: kafka{ID} spec: ports: - name: "9092" protocol: TCP port: 9092 - name: server protocol: TCP port: 9093 selector: name: kafka{ID} clusterIP: None --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: kafka{ID} spec: replicas: 1 strategy: type: Recreate template: metadata: labels: name: kafka{ID} app: kafka spec: affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 1 podAffinityTerm: labelSelector: matchExpressions: - key: "app" operator: In values: - "kafka" topologyKey: "kubernetes.io/hostname" terminationGracePeriodSeconds: 60 restartPolicy: Always dnsPolicy: ClusterFirst schedulerName: default-scheduler containers: - name: kafka{ID} image: hyperledger/fabric-kafka:0.4.14 imagePullPolicy: IfNotPresent env: - name: KAFKA_BROKER_ID value: "{ID}" - name: KAFKA_ZOOKEEPER_CONNECT value: {ZOOKEEPER} - name: KAFKA_LOG_RETENTION_HOURS value: "-1" - name: KAFKA_MESSAGE_MAX_BYTES value: "103809024" - name: KAFKA_REPLICA_FETCH_MAX_BYTES value: "103809024" - name: KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE value: "false" - name: KAFKA_DEFAULT_REPLICATION_FACTOR value: "{REPLICATION}" - name: KAFKA_MIN_INSYNC_REPLICAS value: "{INSYNC}" - name: KAFKA_ADVERTISED_HOST_NAME value: kafka{ID} - name: KAFKA_CONTROLLED_SHUTDOWN_ENABLED value: "true" - name: KAFKA_LOG_DIR value: /share - name: KAFKA_LOG_DIRS value: /share - name: GODEBUG value: netdns=go volumeMounts: - mountPath: /share name: kfk subPath: kafka/kafka{ID} lifecycle: preStop: exec: command: - /opt/kafka/bin/kafka-server-stop.sh volumes: - name: kfk persistentVolumeClaim: claimName: {CLAIM} --- ```

PradeepJaligama (Fri, 15 Mar 2019 16:44:04 GMT):
ya, NL is not really updated since 1.0

Antimttr (Fri, 15 Mar 2019 16:48:07 GMT):
@aatkddny thanks for the info! im checking out this now: https://kubernetes.io/docs/tutorials/configuration/configure-redis-using-configmap/ seems like this would be a good scalable solution

Antimttr (Fri, 15 Mar 2019 16:48:41 GMT):
how many orgs are you working with now on your kubernetes setup?

aatkddny (Fri, 15 Mar 2019 17:39:19 GMT):
more than 20

aatkddny (Fri, 15 Mar 2019 17:42:09 GMT):
tbh if i was starting from scratch i'd look at adapting the hlf- stuff in here https://github.com/helm/charts/tree/master/stable

Patriq (Sun, 17 Mar 2019 12:10:44 GMT):
Has joined the channel.

aatkddny (Sun, 17 Mar 2019 22:31:59 GMT):
Anyone hit and figure a workaround for this? `HFCAClient url does not support path portion in url remove path` Trying to put an ingress on my CA in k8s and need to use paths - have a bunch of endpoints that I need to differentiate between.

aatkddny (Sun, 17 Mar 2019 22:31:59 GMT):
Anyone hit and figure a workaround for this? `HFCAClient url does not support path portion in url remove path` Trying to put an ingress on my CA in k8s and need to use paths - have a bunch of endpoints that I need to differentiate between. With a path and a little rewrite voodoo something like this `http://localhost/firstca/api/v1/cainfo` becomes valid and I'm not restricted to defining NodePorts all over the place.

aatkddny (Sun, 17 Mar 2019 22:31:59 GMT):
Anyone hit and figure a workaround for this? `HFCAClient url does not support path portion in url remove path` Trying to put an ingress on my CA in k8s and need to use paths - have a bunch of endpoints that I need to differentiate between. With a path and a little rewrite voodoo something like this `http://localhost/firstca/api/v1/cainfo` becomes valid and I'm not restricted to defining NodePorts all over the place. Edit: Looks like the peers and the orderers (parseGrpcUrl) are going to have the same problem.

aatkddny (Sun, 17 Mar 2019 22:31:59 GMT):
Anyone hit and figure a workaround for this? `HFCAClient url does not support path portion in url remove path` Trying to put an ingress on my CA in k8s and need to use paths - have a bunch of endpoints that I need to differentiate between. With a path and a little rewrite voodoo something like this `http://localhost/firstca/api/v1/cainfo` becomes valid and I'm not restricted to defining NodePorts all over the place. Edit: Looks like the peers and the orderers (parseGrpcUrl) are going to have the same problem.

aatkddny (Sun, 17 Mar 2019 22:31:59 GMT):
Anyone hit and figure a workaround for this? `java.lang.IllegalArgumentException: HFCAClient url does not support path portion in url remove path:` Trying to put an ingress on my CA in k8s and need to use paths - have a bunch of endpoints that I need to differentiate between. With a path and a little rewrite voodoo something like this `http://localhost/firstca/api/v1/cainfo` becomes valid and I'm not restricted to defining NodePorts all over the place. Edit: Looks like the peers and the orderers (parseGrpcUrl) are going to have the same problem.

aatkddny (Sun, 17 Mar 2019 22:31:59 GMT):
Anyone hit and figure a workaround for this? `java.lang.IllegalArgumentException: HFCAClient url does not support path portion in url remove path:` Trying to put an ingress on my CA in k8s and need to use paths - have a bunch of endpoints that I need to differentiate between. With a path and a little rewrite voodoo something like this `http://localhost:80/firstca/api/v1/cainfo` becomes a valid call to my CA and I'm not restricted to defining NodePorts all over the place. Edit: Looks like the peers and the orderers (parseGrpcUrl) are going to have the same problem.

anjalinaik (Mon, 18 Mar 2019 08:50:27 GMT):
Hi all.. is there any tutorial for adding a organization to an exisiting fabric network dynamically using fabric-sdk-java?

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service dicscovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml```` org1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/ess.ess.com/peers/ess1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service dicscovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml```` org1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/ess.ess.com/peers/ess1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service dicscovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml```` org1peer1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/ess.ess.com/peers/ess1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service discovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml```` org1peer1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/ess.ess.com/peers/ess1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service discovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml` ``` org1peer1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/ess.ess.com/peers/ess1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service discovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml` ``` org1peer1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/ess.ess.com/peers/ess1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1peer1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service discovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml` ``` org1peer1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/org1.org1.com/peers/org1peer1:/etc/hyperledger/crypto/peer - org1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1peer1 ```

anjalinaik (Mon, 18 Mar 2019 09:42:43 GMT):
@rickr Can you please guide me the changes needed to be done in configtx.yaml /crypto-config.yaml /docker-compose.yaml [peer settings] to enable service discovery in a multi-host network? `configtx.yaml` ``` Organizations: - &ess Name: org ID: org MSPDir: crypto-config/peerOrganizations/org.org.com/msp AnchorPeers: - Host: Port: ``` `crypto-config.yaml : Does it require any other parameters to be added ?```` ``` PeerOrgs: # --------------------------------------------------------------------------- # org1 # --------------------------------------------------------------------------- - Name: org1 Domain: org1.org1.com EnableNodeOUs: true Specs: - Hostname: org1peer1 CommonName: org1peer1 - Hostname: org1peer2 CommonName: org1peer2 Users: Count: 0 ``` ` docker-compose.yaml` ``` org1peer1: image: hyperledger/fabric-peer:1.3.0 deploy: restart_policy: condition: on-failure placement: constraints: - node.id == ecg3wsgs2b9r286v5jbavzi0t environment: - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=emtest - CORE_PEER_ID=org1peer1 - CORE_LOGGING_LEVEL=ERROR - CORE_PEER_NETWORKID=emtest - CORE_PEER_ADDRESS=org1peer1:7051 - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=org1peer1:7051 - CORE_PEER_GOSSIP_BOOTSTRAP=org1peer1:7051 - CORE_PEER_LOCALMSPID=org1 - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp - CORE_PEER_TLS_ENABLED=false - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt - CORE_LEDGER_STATE_STATEDATABASE=CouchDB - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=org1_CouchDB:5984 - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=user - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=pwd working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start volumes: - /var/run/:/host/var/run/ - ./crypto-config/peerOrganizations/org1.org1.com/peers/org1peer1:/etc/hyperledger/crypto/peer - org1peer1:/var/hyperledger/production ports: - 8052:7051 - 10052:7053 depends_on: - org1_CouchDB networks: emtest: aliases: - org1peer1 ```

gravity (Mon, 18 Mar 2019 14:50:54 GMT):
Hi all are there any critical reasons why JSDK does not have a method to fetch a single identity from a CA server but have a method to fetch a collection of identities by registrar? as I can see, fabric ca has an endpoint to fetch an identity by its enrollment id https://github.com/hyperledger/fabric-ca/blob/release-1.4/swagger/swagger-fabric-ca.json#L2275

mahoney1 (Mon, 18 Mar 2019 19:48:29 GMT):
fyi / heads-up : next Fabric Developer Community call is planned for this Thursday 21st March (5pm UTC - 5pm UK, 12pm ET, 9am PT ) contributions are welcome to the agenda ! More info on the call / latest agenda can be found here ->https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - cheers Paul

gravity (Tue, 19 Mar 2019 08:13:50 GMT):
hi all Have anyone tried to update `channel_group.groups.Application.groups.ORG_NAME.values.MSP.value.config.revocation_list` using the java sdk? The way I've prepared a channel updated is the same compared to this test: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.4/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java but, I've revoked a user with flag `genCRL:true` and put a returned string to the `channel_group.groups.Application.groups.ORG_NAME.values.MSP.value.config.revocation_list`, signed a transaction using the peer admin identity and sent a transactions I've tried to do so, but getting the error: ``` Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel channel155297569344711552975708888 orderer orderer0 status returned failure code 400 (BAD_REQUEST) during orderer next at org.hyperledger.fabric.sdk.OrdererClient$1.onNext(OrdererClient.java:182) ~[fabric-sdk-java-1.4.0.jar:na] at org.hyperledger.fabric.sdk.OrdererClient$1.onNext(OrdererClient.java:174) ~[fabric-sdk-java-1.4.0.jar:na] at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:421) ~[grpc-stub-1.17.1.jar:1.17.1] at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:519) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) ~[grpc-core-1.17.1.jar:1.17.1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_201] ... 1 common frames omitted ``` also, orderer node says the next: ``` 2019-03-19 07:59:59.822 UTC [orderer.common.broadcast] ProcessMessage -> WARN 018 [channel: channel155297569344711552975708888] Rejecting broadcast of config message from 10.130.101.214:50220 because of error: error authorizing update: proto: can't skip unknown wire type 6 ```

gravity (Tue, 19 Mar 2019 08:13:50 GMT):
hi all Have anyone tried to update `channel_group.groups.Application.groups.ORG_NAME.values.MSP.value.config.revocation_list` using the java sdk? The way I've prepared a channel updated is the same compared to this test: https://github.com/hyperledger/fabric-sdk-java/blob/release-1.4/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java but, I've revoked a user with flag `genCRL:true` and put a returned string to the `channel_group.groups.Application.groups.ORG_NAME.values.MSP.value.config.revocation_list`, signed a transaction using the peer admin identity and sent a transaction I've tried to do so, but getting the error: ``` Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel channel155297569344711552975708888 orderer orderer0 status returned failure code 400 (BAD_REQUEST) during orderer next at org.hyperledger.fabric.sdk.OrdererClient$1.onNext(OrdererClient.java:182) ~[fabric-sdk-java-1.4.0.jar:na] at org.hyperledger.fabric.sdk.OrdererClient$1.onNext(OrdererClient.java:174) ~[fabric-sdk-java-1.4.0.jar:na] at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:421) ~[grpc-stub-1.17.1.jar:1.17.1] at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:519) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.17.1.jar:1.17.1] at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) ~[grpc-core-1.17.1.jar:1.17.1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_201] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_201] ... 1 common frames omitted ``` also, orderer node says the next: ``` 2019-03-19 07:59:59.822 UTC [orderer.common.broadcast] ProcessMessage -> WARN 018 [channel: channel155297569344711552975708888] Rejecting broadcast of config message from 10.130.101.214:50220 because of error: error authorizing update: proto: can't skip unknown wire type 6 ```

rickr (Tue, 19 Mar 2019 12:55:36 GMT):
@anjalinaik Other than probably needing to add the anchorpeers to the configuration I'm not sure of any other requirement.

rickr (Tue, 19 Mar 2019 12:59:46 GMT):
@gravity https://github.com/hyperledger/fabric-sdk-java/blob/aaee816369cf8a5639fef7bd4dd223f355260dd1/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L602-L607

gravity (Tue, 19 Mar 2019 13:03:44 GMT):
@rickr oops, I've missed this integration test at all. thanks

gravity (Tue, 19 Mar 2019 13:04:58 GMT):
@rickr and regarding the question about `revocation_list` update? is it supported by Java SDK? https://chat.hyperledger.org/channel/fabric-sdk-java?msg=oMK3Brfg4Ab63LBAE

dan13 (Tue, 19 Mar 2019 16:54:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=NqhdukQ42tMNThuJT) @rickr if you have any quick thoughts about this issue (probably some concept I'm missing?) it would be much appreciated!

Antimttr (Tue, 19 Mar 2019 18:09:28 GMT):
In the java sdk's TestConfig.java file there are some default properties that get loaded: ``` defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.mspid", "Org1MSP"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.domname", "org1.example.com"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.ca_location", "http://" + LOCALHOST + ":7054"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.caName", "ca0"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.peer_locations", "peer0.org1.example.com@grpc://" + LOCALHOST + ":7051, peer1.org1.example.com@grpc://" + LOCALHOST + ":7056"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.orderer_locations", "orderer.example.com@grpc://" + LOCALHOST + ":7050"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.mspid", "Org2MSP"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.domname", "org2.example.com"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.ca_location", "http://" + LOCALHOST + ":8054"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.peer_locations", "peer0.org2.example.com@grpc://" + LOCALHOST + ":8051,peer1.org2.example.com@grpc://" + LOCALHOST + ":8056"); defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg2.orderer_locations", "orderer.example.com@grpc://" + LOCALHOST + ":7050"); ```

Antimttr (Tue, 19 Mar 2019 18:09:42 GMT):
Which of the configuration artifacts are these defaults replacing?

Antimttr (Tue, 19 Mar 2019 18:10:50 GMT):
the keys set dont seem to quite match any of the artifacts i've found so far, (like docker-compose.yaml, network-config.yaml, orgX.yaml

dan13 (Tue, 19 Mar 2019 18:24:05 GMT):
@Antimttr as I read it it is setting default JSDK network config values (values used to connect from java client to network) regardless of anything else (it's in a finally block)

Antimttr (Tue, 19 Mar 2019 18:24:33 GMT):
well yeah, but it first tries to read it from a file

Antimttr (Tue, 19 Mar 2019 18:24:44 GMT):
i was just wondering what configuration artifact that file corresponds to

Antimttr (Tue, 19 Mar 2019 18:25:29 GMT):
maybe its config.properties

Antimttr (Tue, 19 Mar 2019 18:25:40 GMT):
but this was a bit confusing because that file is totally commented out

Antimttr (Tue, 19 Mar 2019 18:26:30 GMT):
well thats in the Config.java anyways

Antimttr (Tue, 19 Mar 2019 18:26:41 GMT):
in TestConfig it tries to load testutils.properties

Antimttr (Tue, 19 Mar 2019 18:27:19 GMT):
Which doesnt exist in the repo i dled anywhere

Antimttr (Tue, 19 Mar 2019 18:28:15 GMT):
i would think in an actual implementation of the java sdk you'd want to read from actual configuration artifacts

Antimttr (Tue, 19 Mar 2019 18:28:32 GMT):
but the keys dont quite correspond to any of the keys in a real config file

Antimttr (Tue, 19 Mar 2019 18:28:45 GMT):
for instance: `defaultProperty(INTEGRATIONTESTS_ORG + "peerOrg1.ca_location", "http://" + LOCALHOST + ":7054");`

Antimttr (Tue, 19 Mar 2019 18:29:01 GMT):
ca_location i can only find references to in this TestConfig.java file

Antimttr (Tue, 19 Mar 2019 18:29:22 GMT):
doesnt seem to be an actual property from any configuration artifact

Antimttr (Tue, 19 Mar 2019 18:31:07 GMT):
vs something like the *network-config.yaml* file from balance-transfer demo contains keys like: ``` certificateAuthorities: ca-org1: url: https://localhost:7054 # the properties specified under this object are passed to the 'http' client verbatim when # making the request to the Fabric-CA server httpOptions: verify: false tlsCACerts: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem ```

Antimttr (Tue, 19 Mar 2019 18:31:39 GMT):
does ca_location get translated to one of these values at some point?

Antimttr (Tue, 19 Mar 2019 18:31:58 GMT):
the logical one would be url

Antimttr (Tue, 19 Mar 2019 18:32:14 GMT):
but nothing in the sdk docs really indicates that this is the case

Antimttr (Tue, 19 Mar 2019 18:38:41 GMT):
or are these special kinds of configuration files

Antimttr (Tue, 19 Mar 2019 18:38:45 GMT):
that are specific to the java sdk?

Antimttr (Tue, 19 Mar 2019 18:39:03 GMT):
if so can they be extrapolated out of the normal configuration artifacts?

Antimttr (Tue, 19 Mar 2019 18:39:10 GMT):
if they can, is there already a tool to do so?

Antimttr (Tue, 19 Mar 2019 18:46:34 GMT):
like NetworkConfig.java seems to do that for the network-config.yaml

Antimttr (Tue, 19 Mar 2019 19:28:40 GMT):
@rickr SHOULD the java sdk implementation load configuration data from the traditional artifacts or should it implement its own configuration data like the End2EndIT test does?

Antimttr (Tue, 19 Mar 2019 19:29:01 GMT):
to compare I dont really see this behavior in the other SDKs

Antimttr (Tue, 19 Mar 2019 19:29:05 GMT):
seems to be a java thing

Antimttr (Tue, 19 Mar 2019 19:29:24 GMT):
but its not clear why the difference exists

Antimttr (Tue, 19 Mar 2019 19:55:28 GMT):
https://github.com/IBM/blockchain-application-using-fabric-java-sdk

Antimttr (Tue, 19 Mar 2019 19:55:37 GMT):
hadnt seen this yet

Antimttr (Tue, 19 Mar 2019 19:55:53 GMT):
its for an old version but atleast it gives clues on how to implement the client from the sdk

rickr (Tue, 19 Mar 2019 21:33:34 GMT):
@dan13 Not sure but what version are you using of the SDK and Eventbubs are no longer supported

rickr (Tue, 19 Mar 2019 21:41:18 GMT):
@Antimttr none of the Sample or TestConfig are part of the SDK. https://github.com/cr22rc/fabricSDKJavaMultiDomainSample/blob/master/src/main/java/org/cr22rc/MultiDomainSample.java that's old but maybe it can help you. The `network-config.yaml` and NetworkConfigIT sample does the reconstructinon of the channel and CA as defined by that file.

SatheeshNehru (Wed, 20 Mar 2019 06:08:26 GMT):
can someone explain about system chaincode? what it does?and why its needed?can someone explain about system chaincode? what it does?and why its needed?

mahoney1 (Wed, 20 Mar 2019 09:23:30 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WjM8octTLTRtqv9Ps) @SatheeshNehru the answers here -> https://stackoverflow.com/questions/47134059/what-is-system-chaincode-in-fabric and the official doc links should explain it for you

AndresMartinezMelgar.itcl (Wed, 20 Mar 2019 10:35:32 GMT):
Hi anyone knows an example of java sdk which it is implemented on kubernetes? i only found https://github.com/IBM/blockchain-application-using-fabric-java-sdk and it doesnt work for me ):

dan13 (Wed, 20 Mar 2019 14:41:50 GMT):
@rickr Sorry - HLF 1.2 (IBP Starter -- not the new v2 beta), and registration occurs via: String eventListenerHandle = channel.registerChaincodeEventListener(Pattern.compile(".*"), Pattern.compile(Pattern.quote(eventName)), chaincodeEventListener); This is the new way of registering, correct?

rickr (Wed, 20 Mar 2019 15:07:33 GMT):
@dan13 Not really sure there are cases where the peer eventing service reconnects (due to network issue or peer start/stops) that it could get the block again and this would happen.

rickr (Wed, 20 Mar 2019 15:08:40 GMT):
The peer = null is really odd. You could enable the SDK trace that may give some more insight ( what version of the sdk ? )

dan13 (Wed, 20 Mar 2019 15:37:43 GMT):
@rickr Thanks. fabric-sdk-java version is 1.2.1. Even after a couple days, restarting the client app resulted in the same repeated events (both block and chaincode) ad infinitum for the last block on the ledger. Theoretically any listener app needs duplicate rejection anyway if it has multiple peer event sources for the same channel (if I understand correctly).

rickr (Wed, 20 Mar 2019 15:46:03 GMT):
so old ? anyway I may want to take a look at an SDK log of that if were convenient to capture than https://ctrlv.it/ paste there

rickr (Wed, 20 Mar 2019 15:46:03 GMT):
so old ? anyway I may want to take a look at an SDK log of that if were convenient to capture then paste here: https://ctrlv.it/

dan13 (Wed, 20 Mar 2019 16:30:14 GMT):
@rickr https://ctrlv.it/id/168656/1503245437 -- I'm guessing this is the log of the cause? What is root cause, if known for this error? "TRACE PeerEventServiceClient - Received error on peer eventing service on channel defaultchannel, peer org1-peer1, url grpcs://nfa574e3a3dd840e899b4acfffec2ba37-org1-peer1.us07.blockchain.ibm.com:31002, attempts 0. UNAVAILABLE: HTTP/2 error code: NO_ERROR Received Rst Stream"

rickr (Wed, 20 Mar 2019 16:50:06 GMT):
Yeah we just faithfully reprocess the block. You'd need to probably look at the peer logs see if something is going on there. Given it's probably behind a proxy (IBM BC) you may want to add this if you haven't done so -> https://github.com/hyperledger/fabric-sdk-java/tree/aaee816369cf8a5639fef7bd4dd223f355260dd1#firewalls-load-balancers-network-proxies

dan13 (Wed, 20 Mar 2019 17:15:03 GMT):
thanks @rickr - much appreciated! you guys should have a tip jar :D

sgaddam (Wed, 20 Mar 2019 17:56:35 GMT):
Has joined the channel.

seanli (Thu, 21 Mar 2019 09:16:09 GMT):
Has joined the channel.

mahoney1 (Thu, 21 Mar 2019 13:08:19 GMT):
FYI - reminder that Fabric Developer Community call is today (in 90mins) at 5pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mahoney1 (Thu, 21 Mar 2019 13:08:19 GMT):
FYI - reminder that Fabric Developer Community call is today at 5pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mahoney1 (Thu, 21 Mar 2019 17:00:52 GMT):
https://zoom.us/my/hyperledger.community

mahoney1 (Thu, 21 Mar 2019 17:00:52 GMT):
Community call starting shortly https://zoom.us/my/hyperledger.community

mahoney1 (Thu, 21 Mar 2019 18:29:43 GMT):
hi everyone, today's Fabric Developer Community call recording (mp4) is available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings (file: 2019-0321-fabricdevcommunitycall.zip)

mahoney1 (Thu, 21 Mar 2019 18:29:43 GMT):
hi everyone, today's Fabric Developer Community call recording (mp4) is available here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings (zipfile is 2019-0321-fabricdevcommunitycall)

Antimttr (Fri, 22 Mar 2019 18:56:46 GMT):
``` # # The client section is SDK-specific. The sample below is for the node.js SDK # client: # Which organization does this application instance belong to? The value must be the name of an org # defined under "organizations" organization: Org1 ```

Antimttr (Fri, 22 Mar 2019 18:56:58 GMT):
So this is from balance transfer configuration artifacts

Antimttr (Fri, 22 Mar 2019 18:57:30 GMT):
this is the org1.yaml network connection profile, my question is, are there any examples of the java-sdk specific network connection profile?

Antimttr (Fri, 22 Mar 2019 18:58:37 GMT):
ive looked in fabric-samples but it seems completely devoid of any java-sdk content

Antimttr (Fri, 22 Mar 2019 19:29:09 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/sdkintegration/e2e-2Orgs/v1.3/configtx.yaml

Antimttr (Fri, 22 Mar 2019 19:29:11 GMT):
found this

Antimttr (Fri, 22 Mar 2019 19:29:36 GMT):
but no client section

Antimttr (Fri, 22 Mar 2019 19:41:44 GMT):
From the file i linked above: ``` # SampleOrg defines an MSP using the sampleconfig. It should never be used # in production but may be used as a template for other definitions - &OrdererOrg ```

Antimttr (Fri, 22 Mar 2019 19:41:56 GMT):
anyone know the significance of the & in that value?

Antimttr (Fri, 22 Mar 2019 19:42:06 GMT):
couldnt find anything about it in the yaml syntax docs

Antimttr (Fri, 22 Mar 2019 21:02:36 GMT):
https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd

Antimttr (Fri, 22 Mar 2019 21:02:38 GMT):
found it!

Antimttr (Fri, 22 Mar 2019 21:49:44 GMT):
Anyone know what file this is reffering to? ``` # SampleOrg defines an MSP using the sampleconfig. It should never be used # in production but may be used as a template for other definitions ```

Antimttr (Fri, 22 Mar 2019 22:02:58 GMT):
Is there a reason netowrk connection profiles aren't part of the java sdk configuration artifacts?

Antimttr (Fri, 22 Mar 2019 22:03:12 GMT):
does teh java sdk not support network connection profiles?

Antimttr (Fri, 22 Mar 2019 22:05:32 GMT):
nm i foudn em

LucaPerico (Sun, 24 Mar 2019 13:09:15 GMT):
Has joined the channel.

gravity (Mon, 25 Mar 2019 13:56:06 GMT):
Hi all Has anyone customized CSR fields (ST, O, OU) for fabric-ca? is it necessary or is everything is up to business needs?

SandySun2000 (Tue, 26 Mar 2019 00:44:26 GMT):
2019-03-01 22:29:57.989 [INFO ] [,,,] [pool-33-thread-1] com.caligo.shili.hl.listener.tasks.HyperLedgerEventListener.received (HyperLedgerEventListener.java:73) - HyperLedgerEventListener blockNumber:8035, c.event:CompoundEvent, c.payload:{"eventData":{"CampaignPublishedEvent":[{"ownerId":"owner","campaignId":"5c7a22e45866545f3c3f0391","ripCode":"YOUTE","retailerGroupId":"1","retailerProfileId":"2","retailerCode":"00101"}],"PromotionCreatedEvent":[{"promotionId":"5c7a22e35866545f3c3f0390","ownerId":"owner","newState":0}]}}, c.txid:8041ea5f181aa16f21351f5c616c2c681f4231c02cc75ac1cc9bdaf96a1f9987 2019-03-01 22:29:57.989 [DEBUG] [,,,] [pool-30-thread-1] org.hyperledger.fabric.sdk.Channel.fire (Channel.java:5630) - Completing future as exception for channel caligo and transaction id: 8041ea5f181aa16f21351f5c616c2c681f4231c02cc75ac1cc9bdaf96a1f9987, validation code: 0A

SandySun2000 (Tue, 26 Mar 2019 00:45:31 GMT):
@rickr Can we confirm that blockNumber 8035 was committed? What does Validation code:0A mean? successfully?

rickr (Tue, 26 Mar 2019 11:52:06 GMT):
@SandySun2000 https://github.com/hyperledger/fabric/blob/dce0e5d8e7bbce5315d0895e5d1460640700285b/protos/peer/transaction.proto#L126

SandySun2000 (Tue, 26 Mar 2019 17:02:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=CevZkKXzETPaHLALz) @rickr Thanks Rick!

SandySun2000 (Tue, 26 Mar 2019 17:38:11 GMT):
@rickr in order to solve the issue, how can we tell which endorsement policy that it violated ? What's rule that you are checking? which log that I need to look to figure out what was causing 0A?

gravity (Tue, 26 Mar 2019 17:40:12 GMT):
Hi all Has anyone achieved some good throughput like 500-700 tps? I mean, using the java sdk to send transactions to a network my current setup has only 80 tps, but the environment where fabric is running is really poor

rickr (Tue, 26 Mar 2019 17:45:49 GMT):
@SandySun2000 when the CC is instantiated you specify an endorsement policy

SandySun2000 (Tue, 26 Mar 2019 17:47:09 GMT):
@rickr Do you have a sample code for me to follow?

rickr (Tue, 26 Mar 2019 18:35:42 GMT):
Samples in the integration tests

rickr (Tue, 26 Mar 2019 18:45:36 GMT):
The default is any Org can sign is sufficient. There's one caviet, If an org is later added it

rickr (Tue, 26 Mar 2019 18:45:36 GMT):
The default is any Org can sign is sufficient. There's one caviet, If an org is later added it's endorsement won't count till the CC si updated :(

SandySun2000 (Tue, 26 Mar 2019 18:48:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=d7ozyfL99fEPZcxYY) @rickr cool. got it. Thanks!

sandy (Wed, 27 Mar 2019 01:52:13 GMT):
@rickr Is it possible to update the level state DB of a particular peer without chaincode endorsements ?

SatheeshNehru (Wed, 27 Mar 2019 05:25:37 GMT):
in what possible ways the data in hyperledger fabirc can be changed what i mean is why there is need for endorsement??

rickr (Wed, 27 Mar 2019 08:19:39 GMT):
@sandy @SatheeshNehru ask on #fabric-questions

Antimttr (Wed, 27 Mar 2019 14:39:46 GMT):
@rickr hey rickr, i'm trying to talk to my CA server through the HFCAClient, the ca server is part of the balance transfer sample network. in the network-config.yaml theres an option being set: ``` httpOptions: verify: false ```

Antimttr (Wed, 27 Mar 2019 14:40:16 GMT):
how can i apply this option to the java sdk's HFCAClient? Right now im getting an error that the host name doesnt match the certificate name

Antimttr (Wed, 27 Mar 2019 14:40:23 GMT):
i'm assuming this option is what disables that check

Antimttr (Wed, 27 Mar 2019 14:40:45 GMT):
but im unsure about where to apply the setting, should it go into the properties that i pass into the contructor fo the hfcaclient?

Antimttr (Wed, 27 Mar 2019 14:41:29 GMT):
this is the error being thrown by the sdk: ``` org.hyperledger.fabric_ca.sdk.exception.InfoException: Url:https://localhost:7054, Failed to get info at org.hyperledger.fabric_ca.sdk.HFCAClient.info(HFCAClient.java:591) at com.mctlive.mcthlf.Main.main(Main.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:748) Caused by: javax.net.ssl.SSLPeerUnverifiedException: Certificate for doesn't match any of the subject alternative names: [] ```

Antimttr (Wed, 27 Mar 2019 16:18:36 GMT):
i think i found it: `properties.setProperty("allowAllHostNames", "true"); //testing environment only NOT FOR PRODUCTION!`

Antimttr (Wed, 27 Mar 2019 16:18:44 GMT):
that was in testconfig.java for reference

chill37 (Thu, 28 Mar 2019 00:52:30 GMT):
When sending a transaction, I see that there are options to select specific orderers. Does it make it more efficient(and maybe faster) to specify specific orderers when we are using multiple orderers/kafka/zookeeper? I thought kafka/zookeeper would do all the even distribution.

MHBauer (Thu, 28 Mar 2019 03:28:01 GMT):
Has left the channel.

rickr (Thu, 28 Mar 2019 12:40:48 GMT):
Allowing you to defined multiple orderers just lets the SDK provide mostly a simple fail over if one can't be connected. There is a _simplistic_ balancing by just picking a random one to start with. However the application should be allowed to select which orderer it really wants.

gravity (Thu, 28 Mar 2019 13:14:22 GMT):
Hi all is it recommended way to have peers that joined multiple channels and serve requests for them?

gravity (Thu, 28 Mar 2019 13:14:40 GMT):
or is it better to have separate peers for every channel?

rickr (Thu, 28 Mar 2019 13:32:27 GMT):
Today you can only attach peers, orderers to one channel

rickr (Thu, 28 Mar 2019 13:32:27 GMT):
Today you can only attach sdk peers, orderers instances to one channel

aatkddny (Thu, 28 Mar 2019 14:34:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ZEkq2RWBqfsqdo8fd) Unless I completely misunderstood the question, you can attach peers to multiple channels for sure - we do it since we have a lot of channels - but you need a different channel object for each. Caching the HFClient and the Channel objects speeds the whole process up significantly. Of course you still have to read each channel separately, but you'd expect that from the way channels are implemented.

aatkddny (Thu, 28 Mar 2019 14:38:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DXbjs6yLbG64NAK8b) You need to adjust the block cut rate and maximum message count in config.tx first. When you tune that to your liking you'll hit the issue with threading that netty has and that'll limit you. We started failing in triple digits /s iirc, but our tx rate for the one project we care about is significantly lower. I'll search for the post about the threading issue in a minute or two. It's back in here last year somewhere

aatkddny (Thu, 28 Mar 2019 14:38:13 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DXbjs6yLbG64NAK8b) You need to adjust the block cut rate and maximum message count in config.tx first. When you tune that to your liking you'll hit the issue with threading that netty has and that'll limit you. We started failing in triple digits /s iirc, but our tx rate for the one project we care about is significantly lower. I'll search for the post about the threading issue in a minute or two. It's back in here last year somewhere - edit: https://jira.hyperledger.org/browse/FAB-10604

chill37 (Fri, 29 Mar 2019 04:39:57 GMT):
@rickr Thanks for the answer...I do have one more Q.... Is it possible to have the 2 responses of response.getChaincodeActionResponsePayload() same but get SDKUtil.getProposalConsistencySets != 1?? Few times, I do get this error and the Chaincode does not take any time-related input. I thought since SDKUtil.getProposalConsistencySets() check for proposalResponse.getPayload(), it could be different from getChaincodeActionResponsePayload(). But I'm not really sure how that could be the case. Could you give a hint?

SatheeshNehru (Fri, 29 Mar 2019 06:38:02 GMT):
is it possible to install two chaincode with same ID on different peers

SatheeshNehru (Fri, 29 Mar 2019 06:38:02 GMT):
is it possible to install two different chaincode with same ID on different peers

anjalinaik (Fri, 29 Mar 2019 07:09:31 GMT):
Hi All. In Golang chaincode can we manipulate the query string to have conditions such as `> || <` in `stub.GetQueryResult`. If so, can you please provide me an example.

rickr (Fri, 29 Mar 2019 12:56:04 GMT):
@anjalinaik best asked on #fabric-chaincode-dev

rickr (Fri, 29 Mar 2019 12:56:50 GMT):
consistency set is more than the payload but also read/write set

rickr (Fri, 29 Mar 2019 12:56:50 GMT):
@chill37 consistency set is more than the payload but also read/write set

smallant (Fri, 29 Mar 2019 15:06:24 GMT):
Hi to all. Currently have a small network in one machine. We were doing some tests and got this error: GET_STATE failed: transaction ID: 6d7fac50d4c921a98e604b0c1fe2b7b964b91d00471fe67bf81464de86be99ad: Get http://peer2-org1-CouchDB:5984/BC_lscc/BC?attachments=true: dial tcp: lookup peer2-org1-CouchDB on 127.0.0.11:53: dial udp 127.0.0.11:53: socket: too many open files. We are making the calls trough java sdk and the network is 1.4

rickr (Fri, 29 Mar 2019 15:12:36 GMT):
Looks to be a peer error maybe they seen it on #fabric-peer-endorser-committer

adamhardie (Fri, 29 Mar 2019 15:15:13 GMT):
hello - any idea what would cause this when committing a transaction ? DEBUG | 2019-03-29 18:49:52.198 | earer_send | g.h.n.HyperLedgerNodeImpl | commitMessage : channel[messagebus] has successfully endorsed message id[8bfd7412-47f2-43a5-b4d4-3c7c2b4e7e72]; atempting commit ERROR | 2019-03-29 18:49:52.216 | executor-1 | o.h.f.s.OrdererClient | org.hyperledger.fabric.sdk.OrdererClient$1@7c7c454e managed channel isTerminated: false, isShutdown: false, state: IDLE ERROR | 2019-03-29 18:49:52.217 | executor-1 | o.h.f.s.OrdererClient | Received error on channel messagebus, orderer orderer.gmex-group, url grpc://10.186.182.165:7050, UNAVAILABLE: io exception io.grpc.StatusRuntimeException: UNAVAILABLE: io exception at io.grpc.Status.asRuntimeException(Status.java:526)

adamhardie (Fri, 29 Mar 2019 15:15:13 GMT):
hello - any idea what would cause this when committing a transaction ? DEBUG | 2019-03-29 18:49:52.198 | earer_send | g.h.n.HyperLedgerNodeImpl | commitMessage : channel[messagebus] has successfully endorsed message id[8bfd7412-47f2-43a5-b4d4-3c7c2b4e7e72]; atempting commit ERROR | 2019-03-29 18:49:52.216 | executor-1 | o.h.f.s.OrdererClient | org.hyperledger.fabric.sdk.OrdererClient$1@7c7c454e managed channel isTerminated: false, isShutdown: false, state: IDLE ERROR | 2019-03-29 18:49:52.217 | executor-1 | o.h.f.s.OrdererClient | Received error on channel messagebus, orderer orderer.group, url grpc://10.186.182.165:7050, UNAVAILABLE: io exception io.grpc.StatusRuntimeException: UNAVAILABLE: io exception at io.grpc.Status.asRuntimeException(Status.java:526)

adamhardie (Fri, 29 Mar 2019 15:15:13 GMT):
hello - any idea what would cause this when committing a transaction ? DEBUG | 2019-03-29 18:49:52.198 | earer_send | g.h.n.HyperLedgerNodeImpl | commitMessage : channel[messagebus] has successfully endorsed message id[8bfd7412-47f2-43a5-b4d4-3c7c2b4e7e72]; atempting commit ERROR | 2019-03-29 18:49:52.216 | executor-1 | o.h.f.s.OrdererClient | org.hyperledger.fabric.sdk.OrdererClient$1@7c7c454e managed channel isTerminated: false, isShutdown: false, state: IDLE ERROR | 2019-03-29 18:49:52.217 | executor-1 | o.h.f.s.OrdererClient | Received error on channel messagebus, orderer orderer.group, url grpc://10.x.x.x:7050, UNAVAILABLE: io exception io.grpc.StatusRuntimeException: UNAVAILABLE: io exception at io.grpc.Status.asRuntimeException(Status.java:526)

adamhardie (Fri, 29 Mar 2019 15:20:13 GMT):
further down i see :mountain_bicyclist_tone3: ERROR | 2019-03-29 18:49:52.261 | earer_send | o.h.f.s.OrdererClient | grpc status Code:io exception, Description UNAVAILABLE, java.io.IOException: Connection reset by peer

adamhardie (Fri, 29 Mar 2019 15:20:13 GMT):
further down i see : ERROR | 2019-03-29 18:49:52.261 | earer_send | o.h.f.s.OrdererClient | grpc status Code:io exception, Description UNAVAILABLE, java.io.IOException: Connection reset by peer

smallant (Fri, 29 Mar 2019 15:22:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DKNJpEpdGM4aPvz8X) @rickr thank you

rickr (Fri, 29 Mar 2019 15:40:59 GMT):
I assume the 'x.x.x' is just your editing in the url :) Was there anything in the orderer logs? Would need to take that to #fabric-orderer

gravity (Fri, 29 Mar 2019 15:47:00 GMT):
@rickr @aatkddny the original question was the next: is it recommended to have peers that serve requests only for a specific channel (peer0 and peer1 join channel0 and peer2 and peer3 join channel1)? or should it be better to join all peers(peer0, peer1, peer2, peer3) to all channels (channel0, channel1) and these peers will be serving requests for these channels? and there is one more question: if I have four peers (peer0-3) that are joined to channels multiple channels (channel0, channel1), these peers have the same chaincode installed (with the same version) and this chaincode is instantiated on both channels (channel0, channel1), will this setup work without any conflicts between chaincodes on these channels?

adamhardie (Fri, 29 Mar 2019 15:49:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=EKeKFK4w2M6t7xDyr) @rickr haha yeah :) it seemed to work at first, now its fallen over. ill move to the other channel , thanks

aatkddny (Fri, 29 Mar 2019 20:27:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HvtY4qarwKYLqCD6j) Q1 - doesn't it depend on the endorsement policy, and whether the peers need access to the data on the channel. We for example have a bunch of contracts between pairs of orgs that must remain private only to that pair, so (say) Org1 and Org2 are parties on one channel and Org2 and Org 3 on another. Org 2 can see everything, Orgs1 and 3 can only see "their" data. Yes you can do that with a permissioned channel, but not if you can't allow Org 1 to know that Org3 is also transacting with Org2. Q2 - it works fine. Or it does for at least as far as we tested it (multiple 10's of channels in a peer). The one caveat is that we always upgrade everything at once. Rolling updates haven't been tested.

aatkddny (Fri, 29 Mar 2019 20:27:02 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HvtY4qarwKYLqCD6j) Q1 - doesn't it depend on the endorsement policy, and whether the peers need access to the data on the channel. We for example have a bunch of contracts between pairs of orgs that must remain private only to that pair, so (say) Org1 and Org2 are parties on one channel and Org2 and Org 3 on another. Org 2 can see everything, Orgs1 and 3 can only see "their" data. Yes you can do that with a permissioned channel, but not if you can't allow Org 1 to know that Org3 is also transacting with Org2. Your use case should determine who connects where. Q2 - it works fine. Or it does for at least as far as we tested it (multiple 10's of channels in a peer). The one caveat is that we always upgrade everything at once. Rolling updates haven't been tested.

AlexTotheroh (Fri, 29 Mar 2019 22:43:48 GMT):
Has joined the channel.

AlexTotheroh (Fri, 29 Mar 2019 22:44:32 GMT):
It looks like there's no way to healthcheck peers/orderers through the SDK? Is that accurate?

AlexTotheroh (Fri, 29 Mar 2019 22:50:57 GMT):
see https://hyperledger-fabric.readthedocs.io/en/release-1.4/operations_service.html

aatkddny (Fri, 29 Mar 2019 22:51:54 GMT):
It's a simple rest call. Seems overkill to fold it into the SDK, no?

AlexTotheroh (Fri, 29 Mar 2019 22:54:46 GMT):
maybe, seems nice to be able to do: `peer.checkHealth()`

AlexTotheroh (Fri, 29 Mar 2019 23:04:48 GMT):
Actually, sorry, what I'm really after is a check on the grpc connection, which the linked healthcheck above doesn't appear to be

AlexTotheroh (Fri, 29 Mar 2019 23:04:55 GMT):
Something like this from the Node SDK: https://jira.hyperledger.org/projects/FABN/issues/FABN-597?filter=allopenissues

AlexTotheroh (Fri, 29 Mar 2019 23:04:55 GMT):
Something like this from the Node SDK JIRA archive: https://jira.hyperledger.org/projects/FABN/issues/FABN-597?filter=allopenissues

aatkddny (Fri, 29 Mar 2019 23:32:35 GMT):
those you can get from prometheus without too much angst i think. there's a bunch of "grpc_" stuff in there.

gravity (Sat, 30 Mar 2019 09:10:27 GMT):
@aatkddny how many peers do you have per channel?

aatkddny (Sat, 30 Mar 2019 14:07:33 GMT):
averages at 6 per channel.

lupass93 (Mon, 01 Apr 2019 13:36:31 GMT):
Hello at All! I have one question to ask. I have a blockchain network fabric 1.4 customized with 3 Peer in one Organization with 3 CouchDB and 1 CA( MSP). I have a Java SDK Client to connenct to blockchain network and invoke, query a chaincode and register and enroll new user. But when I Connect with Admin Peer User, all query and invoke it works properly. But when I Connect with a new User, registered and enrolled, I can't to do a Query Or Invoke because I have this message error:

lupass93 (Mon, 01 Apr 2019 13:36:43 GMT):
Peer0 docker logs is this : https://pastebin.com/eA0RUfLp

lupass93 (Mon, 01 Apr 2019 13:37:43 GMT):
Java Log Console Error: https://pastebin.com/dm7b21EB

lupass93 (Mon, 01 Apr 2019 13:42:25 GMT):
CA logs when register and enroll new User : https://pastebin.com/pU0dxUby

lupass93 (Mon, 01 Apr 2019 13:43:17 GMT):
Thank you very much!

sandy (Mon, 01 Apr 2019 14:52:56 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/network/network.html#adding-network-administrators . I have red this.. Here they are saying that one organisation can give admin permission to other. Am not able to understand it. What is network administrator?

aatkddny (Mon, 01 Apr 2019 15:00:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=yApAhYj3REJwknnmH) Your CA says you enrolled lucaclient. Your peer says Admin@Quid. Are you sure you are passing the right cert?

lupass93 (Mon, 01 Apr 2019 15:09:09 GMT):
I pass to HFCLient the User lucaclient and then invoke the chaincode

lupass93 (Mon, 01 Apr 2019 15:09:34 GMT):
If I pass AdminPeer it works properly

lupass93 (Mon, 01 Apr 2019 15:09:45 GMT):
If I pass lucaclient don't works

sandy (Mon, 01 Apr 2019 15:25:50 GMT):
is it possible to create network administrator without hyperledger composer?

xiaoningdev (Mon, 01 Apr 2019 15:34:10 GMT):
Has joined the channel.

gravity (Mon, 01 Apr 2019 18:09:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eojhbHw62NDJktvck) @aatkddny there is no need in caching channel objects. once it's initialized using HFClient, the latter holds a reference to a channel in a hashmap. the same is for HFClient - as long as a single instance of HFClient is enough, it can be created during application startup and reuse this object for every transaction by setting a user context directly to a transaction context. @rickr please correct me if I'm wrong

gravity (Mon, 01 Apr 2019 18:16:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=hwZzxo92pTuwmA3b8) @aatkddny I have not met these errors and messages. my application has really low TPS, like, 100-175, but cpu consumption for app is near the 40%. also, every peer runs on a k8s node with 8 vCPU and 16 GB ram, resource utilization is varying from 15% to 30%. and during the load testing, avg response time is 5 sec for transactions. every transaction is processed synchronously by calling `join` on a transactions future. also, I've tried asynchronous processing, but tps remains on the same level. any advice on how to improve tps would be helpful

aatkddny (Mon, 01 Apr 2019 18:33:36 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=9npKHrKXP5mM2iBw5) When I said cache I meant per client (org). We have a bunch of them. We keep a map of client information in a cache - including an hfclient and the networkconfig for each.

aatkddny (Mon, 01 Apr 2019 18:36:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rw4o4bG8M8i4R97Dn) Your turnaround time is based on the block cut rate. These 3 values in config.tx can be used to tune it. Reduce batch timeout and increase batch size. ``` # Batch Timeout: The amount of time to wait before creating a batch. BatchTimeout: 2s # Batch Size: Controls the number of messages batched into a block. # The orderer views messages opaquely, but typically, messages may # be considered to be Fabric transactions. The 'batch' is the group # of messages in the 'data' field of the block. Blocks will be a few kb # larger than the batch size, when signatures, hashes, and other metadata # is applied. BatchSize: # Max Message Count: The maximum number of messages to permit in a # batch. No block will contain more than this number of messages. MaxMessageCount: 10 # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. The maximum block size is this value # plus the size of the associated metadata (usually a few KB depending # upon the size of the signing identities). Any transaction larger than # this value will be rejected by ordering. If the "kafka" OrdererType is # selected, set 'message.max.bytes' and 'replica.fetch.max.bytes' on # the Kafka brokers to a value that is larger than this one. AbsoluteMaxBytes: 10 MB # Preferred Max Bytes: The preferred maximum number of bytes allowed # for the serialized messages in a batch. Roughly, this field may be considered # the best effort maximum size of a batch. A batch will fill with messages # until this size is reached (or the max message count, or batch timeout is # exceeded). If adding a new message to the batch would cause the batch to # exceed the preferred max bytes, then the current batch is closed and written # to a block, and a new batch containing the new message is created. If a # message larger than the preferred max bytes is received, then its batch # will contain only that message. Because messages may be larger than # preferred max bytes (up to AbsoluteMaxBytes), some batches may exceed # the preferred max bytes, but will always contain exactly one transaction. PreferredMaxBytes: 512 KB ```

aatkddny (Mon, 01 Apr 2019 18:36:52 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=rw4o4bG8M8i4R97Dn) Your turnaround time is based on the block cut rate. These 2 values in config.tx can be used to tune it. Reduce batch timeout and increase batch size - max message count. ``` # Batch Timeout: The amount of time to wait before creating a batch. BatchTimeout: 2s # Batch Size: Controls the number of messages batched into a block. # The orderer views messages opaquely, but typically, messages may # be considered to be Fabric transactions. The 'batch' is the group # of messages in the 'data' field of the block. Blocks will be a few kb # larger than the batch size, when signatures, hashes, and other metadata # is applied. BatchSize: # Max Message Count: The maximum number of messages to permit in a # batch. No block will contain more than this number of messages. MaxMessageCount: 10 ```

gravity (Mon, 01 Apr 2019 19:26:16 GMT):
@aatkddny I've tried to set timeout to 1s and diferent values(30, 50, 100, 250, 300) for max-message-count, but it did not help. the higher batchsize, the lower throughput. for testing purposes I've used JMeter with 50, 75, 100, 120 threads and Constant Throughput Timer was set to 1000 tps. the resulting tps was as I said 100-170 TPS. trandactions were sent to a single channel that has 4 peers (two of them are endorsers), all peers from the same org. the endorsement polucy is `OR("ORG1.peer")`

sandy (Tue, 02 Apr 2019 07:17:04 GMT):
hi.. As all the peers of the same channel has same ledger why we are getting endorsements from all the peers ? Is there any possibility of ledgers in the different peers of the same channel to be different?

gravity (Tue, 02 Apr 2019 07:43:59 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=jr9n9SkHf59jqoRDr) @sandy for example, you can change the data in peers world state database and in this case your peers can have different data sets, hence endorsement can fail

sandy (Tue, 02 Apr 2019 07:47:05 GMT):
@gravity why would someone changes the data in their peer? is there any use case to modify the peer data?

dave.enyeart (Tue, 02 Apr 2019 10:49:46 GMT):
No, there is no use case to modify peer data, if you do so you are essentially corrupting your own peer. Endorsements of that data on the peer will fail and the other members of the channel may ostracize you.

dan13 (Tue, 02 Apr 2019 14:14:22 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Djaf8M6WGra72M2g6) @aatkddny Can you clarify? Does this mean that your single client app/service makes calls on behalf of multiple Orgs, and that the method by which you are doing that is to have a singular HFClient per Org within the app (e.g., a shared Map where String is Org ID), and based on the specific requester (or other key data) the related HFClient is used?

aatkddny (Tue, 02 Apr 2019 14:24:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PetDnoShZLSNnYTej) @dan13 Yes. Multiple orgs. One HFClient per org (per calling instance). We swap in the actual user or admin as required into the user context to make the calls.

aatkddny (Tue, 02 Apr 2019 14:24:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=PetDnoShZLSNnYTej) @dan13 Yes. Multiple orgs. One HFClient per org (per calling instance). We swap in the actual user or admin as required into the user context to make the calls. We don't have enough volume to worry about collisions - iirc it's thread safe after dispatch, so it's mostly in our app.

gravity (Tue, 02 Apr 2019 14:34:03 GMT):
@aatkddny Hi How do initialize channel? From what I see, HFClient should have user context to initialize a channel correctly. But in this case the user context must be set directly to the HFClient and this makes it hard to reuse

dan13 (Tue, 02 Apr 2019 14:41:18 GMT):
@aatkddny Thank you! Can you explain "We don't have enough volume to worry about collisions - iirc it's thread safe after dispatch, so it's mostly in our app" -- where would those collisions possibly occur? I assume you build a TransactionProposalRequest applying the request-specific user context using setUserContext() and then use the matching HFClient/Channel to send the proposal and then transaction. All of that should be completely safe, right? @gravity I was told here earlier that there is no problem initializing HFClient with user A from Org 1 and then transacting with different users from Org 1 (by setting on proposal) -- is your experience different?

gravity (Tue, 02 Apr 2019 14:49:03 GMT):
@dan13 actually I do the same but was wondering whether I missed smth or not

dan13 (Tue, 02 Apr 2019 14:53:19 GMT):
@gravity same boat different ocean :D

gravity (Tue, 02 Apr 2019 17:17:14 GMT):
@dan13 how do you process transactions futures - synchronously(by calling `get()` or `join()` on future) or asynchronously(`thenApply()` or `thenAccept`)?

gravity (Tue, 02 Apr 2019 17:17:14 GMT):
@dan13 how do you process transactions futures - synchronously(by calling `get()` or `join()` on future) or asynchronously(`thenApply()` or `thenAccept()`)?

dan13 (Tue, 02 Apr 2019 17:51:37 GMT):
@gravity sync (get) at the moment. are you using async, and if so, did you switch from sync?

aatkddny (Tue, 02 Apr 2019 18:22:38 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mxZvaKQ73GBHMGKgw) HFClient isn't synchronized in our app. We could (in theory) get something that overwrites the user context if we had two in flight transactions before it was sent to sdk.

Antimttr (Tue, 02 Apr 2019 18:53:17 GMT):
is there a specific place to report bugs in the java sdk?

Antimttr (Tue, 02 Apr 2019 19:31:02 GMT):
Is there a way to store enrollment information in a db and reconstitute it into an Enrollment object?

gravity (Tue, 02 Apr 2019 20:20:08 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=dGRnQTJzgvJu9m6kW) @dan13 well, I'm going to. what I see now in our app, synchronous way of transaction processing holds a lot of resources while waiting for the future to complete. for example, if I receive a request from the front end to issue a transaction for a particular user, I should fetch an enrollment object from the database for this user, then send send a proposal, send a transaction and wait for it to complete. and if if I understand correctly, all these actions happen in the same thread. also, as long as we send a request to a database from this thread, the latter can hold a thread (taken from the db connection pool). that means that a db thread is also blocked by synchronous call to `get()` or `join()` and you have have high transaction arrival rate, the db connection pool will be exhausted and a connection to a database will be lost. that is my observation. please correct me if I'm wrong

Antimttr (Tue, 02 Apr 2019 20:35:52 GMT):
@Antimttr was able to generate the enrollment object by using a pem->Keypair function i found on SO: ``` public static KeyPair keyToValue(String pkcs8key) { Reader rdr = new StringReader(pkcs8key); KeyPair pair = null; try { Object parsed = new org.bouncycastle.openssl.PEMParser(rdr).readObject(); pair = new org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter().getKeyPair((org.bouncycastle.openssl.PEMKeyPair) parsed); } catch(Exception e) { System.out.println("ERROR: Unable to generate enrollment: " + e.getMessage()); e.printStackTrace(); return null; } return pair; } } ```

dan13 (Tue, 02 Apr 2019 20:43:15 GMT):
@gravity I see. Yes, you would not want to tie db thread to the longer-lived ledger-interacting thread.

tzejan (Wed, 03 Apr 2019 03:29:47 GMT):
Has joined the channel.

gravity (Wed, 03 Apr 2019 06:36:17 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Rq3iJjLJkBppsfYLL) @Antimttr you can serialize this object using, for example, Kryo lib and encode it to Hex string (or smth else), and store it in a database. also, you can encrypt this string and store the encrypted version in a db

gravity (Wed, 03 Apr 2019 06:40:09 GMT):
@Antimttr and when you want to use an Enrollment object, fetch encrypted hex from db, decrypt it, decode from hex string to byte[] and deserialize using the same Kryo lib

Antimttr (Wed, 03 Apr 2019 14:27:13 GMT):
@gravity right now im serializing my POJO LedgerUser object i wrote and storing it in mongo without encrypting the key

Antimttr (Wed, 03 Apr 2019 14:27:28 GMT):
you think i should store it encrypted at rest though?

gravity (Wed, 03 Apr 2019 14:33:52 GMT):
@Antimttr everything is up to app requirements

Antimttr (Wed, 03 Apr 2019 14:35:15 GMT):
i guess im looking more for best practices

Antimttr (Wed, 03 Apr 2019 14:35:20 GMT):
than a particular requirement

Antimttr (Wed, 03 Apr 2019 14:36:18 GMT):
quoting walmon from -questions: "You should safetly store the crypto objects generated after enroll"

Antimttr (Wed, 03 Apr 2019 14:36:33 GMT):
sounds like he's saying encrypt at rest is best practice

giteliot (Wed, 03 Apr 2019 15:43:10 GMT):
Has joined the channel.

mahoney1 (Wed, 03 Apr 2019 17:50:50 GMT):
FYI - reminder that Fabric Developer Community call tomorrow (Thurs) is at 4pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - latest agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

Antimttr (Wed, 03 Apr 2019 21:37:08 GMT):
Hey there, question about HFClient. Should the instantiation of the HFClient be singleton wrt the entire client, or can you have instances you create for each thread?

Antimttr (Wed, 03 Apr 2019 21:37:43 GMT):
like im using Jersey to do my restful implementation, which has a threadpool and it loads a new thread for every query

Antimttr (Wed, 03 Apr 2019 21:37:59 GMT):
should it use the same instance of HFClient for every thread, or can i instantiate a new one for each thread?

Antimttr (Wed, 03 Apr 2019 21:46:24 GMT):
``` //example of setting keepAlive to avoid timeouts on inactive http2 connections. // Under 5 minutes would require changes to server side to accept faster ping rates. ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {5L, TimeUnit.MINUTES}); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {8L, TimeUnit.SECONDS}); ordererProperties.put("grpc.NettyChannelBuilderOption.keepAliveWithoutCalls", new Object[] {true}); ```

Antimttr (Wed, 03 Apr 2019 21:46:34 GMT):
Another question, what is the significance of these settings?

Antimttr (Wed, 03 Apr 2019 21:47:01 GMT):
what happens if an inactive http2 connection is timed out?

Antimttr (Wed, 03 Apr 2019 21:47:11 GMT):
does this effect channel creation? or orderer operation?

Antimttr (Wed, 03 Apr 2019 21:47:44 GMT):
That's from end2endIT.java btw

Antimttr (Wed, 03 Apr 2019 22:07:41 GMT):
Also, do i need a separate specific peerAdmin like they use in end2endIT, or can you use the org Admin to act as the peerAdmin? What is the point of having one admin do peer stuff and the other admin be the org admin?

rickr (Wed, 03 Apr 2019 23:39:57 GMT):
In general I don't see a wide use case for have more than one client .. if any. As for those setting try reading the README.md end2end :) .. should be pointers in there. Your application could create as many user it likes. There are basically four general types of users used by the sdk. There is orderer admin that can create the channel and update it like adding new organizations. There is a peerAdmin that can join organizations peers to the channel, deploy chaincode to the channel etc. There is an admin for the CA that we should IMO have named registrar that can register new regular users who then enroll to get their certificate/keys. Regular user can as the SDK is setup just invoke and query chaincode. There a lot of configuration that can be changed on both CA and Peers, Orderers (Fabric) that could change that. It's not for every SDK to document that. See the fabric documentation

rickr (Wed, 03 Apr 2019 23:39:57 GMT):
In general I don't see a wide use case for having more than one client .. if any. As for those setting try reading the README.md end2end :) .. should be pointers in there. Your application could create as many user it likes. There are basically four general types of users used by the sdk. There is orderer admin that can create the channel and update it like adding new organizations. There is a peerAdmin that can join organizations peers to the channel, deploy chaincode to the channel etc. There is an admin for the CA that we should IMO have named registrar that can register new regular users who then enroll to get their certificate/keys. Regular user can as the SDK is setup just invoke and query chaincode. There a lot of configuration that can be changed on both CA and Peers, Orderers (Fabric) that could change that. It's not for every SDK to document that. See the fabric documentation

Antimttr (Thu, 04 Apr 2019 02:53:17 GMT):
@rickr where is the name of the peerAdmin specified in the end2endIT example? all i can find is this: ``` sampleStore.getMember(sampleOrgName + "Admin", sampleOrgName, sampleOrg.getMSPID(), Util.findFileSk(Paths.get(testConfig.getTestChannelPath(), "crypto-config/peerOrganizations/", sampleOrgDomainName, format("/users/Admin@%s/msp/keystore", sampleOrgDomainName)).toFile()), Paths.get(testConfig.getTestChannelPath(), "crypto-config/peerOrganizations/", sampleOrgDomainName, format("/users/Admin@%s/msp/signcerts/Admin@%s-cert.pem", sampleOrgDomainName, sampleOrgDomainName)).toFile()); ```

Antimttr (Thu, 04 Apr 2019 02:53:59 GMT):
which basically creates a new sampleuser object with that cert, however where is it specified that Org1Admin is the peer admin for org1?

Antimttr (Thu, 04 Apr 2019 02:53:59 GMT):
which basically creates a new sampleuser object with that cert. Where is it specified that Org1Admin is the peer admin for org1?

Antimttr (Thu, 04 Apr 2019 02:58:26 GMT):
my best guess is that its specified in the msp directory structure by an identifying certificate: `\src\test\fixture\sdkintegration\e2e-2Orgs\v1.3\crypto-config\peerOrganizations\org1.example.com\msp\admincerts\Admin@org1.example.com-cert.pem`

Antimttr (Thu, 04 Apr 2019 02:58:26 GMT):
my best guess is that its specified in the msp directory structure by an identifying certificate: `src\test\fixture\sdkintegration\e2e-2Orgs\v1.3\crypto-config\peerOrganizations\org1.example.com\users\Admin@org1.example.com\msp\keystore\581fa072e48dc2a516f664df94ea687447c071f89fc0b783b147956a08929dcc_sk`

Antimttr (Thu, 04 Apr 2019 02:58:26 GMT):
my best guess is that its specified in the msp directory structure by an identifying certificate: `src\test\fixture\sdkintegration\e2e-2Orgs\v1.3\crypto-config\peerOrganizations\org1.example.com\users\Admin@org1.example.com\msp\signcerts\Admin@org1.example.com-cert.pem`

Antimttr (Thu, 04 Apr 2019 02:58:30 GMT):
is this correct?

anjalinaik (Thu, 04 Apr 2019 06:26:20 GMT):
Hi All . Is there a fabric-sdk-java equivalent to below code to check the identity of the person who performs query/ invoke ? ``` const ClientIdentity = require('fabric-shim').ClientIdentity; let cid = new ClientIdentity(stub); // "stub" is the ChaincodeStub object passed to Init() and Invoke() methods if (cid.assertAttributeValue('hf.role', 'auditor')) { // proceed to carry out auditing} ```

anjalinaik (Thu, 04 Apr 2019 06:26:20 GMT):
Hi All . Is there a `fabric-sdk-java` code equivalent to below code to check the identity of the person who performs query/ invoke ? ``` const ClientIdentity = require('fabric-shim').ClientIdentity; let cid = new ClientIdentity(stub); // "stub" is the ChaincodeStub object passed to Init() and Invoke() methods if (cid.assertAttributeValue('hf.role', 'auditor')) { // proceed to carry out auditing} ```

mahoney1 (Thu, 04 Apr 2019 15:31:27 GMT):
FYI - reminder that the Fabric Developer Community call is in 30mins - 4pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

rolsonquadras (Thu, 04 Apr 2019 20:32:34 GMT):
Has joined the channel.

rickr (Thu, 04 Apr 2019 23:37:45 GMT):
@Antimttr think that's the peerAdmin cert for one of the the orgs

aatkddny (Fri, 05 Apr 2019 01:08:53 GMT):
As Rick said, it's the peer admin for org1 as generated by cryptogen. The directory structure and names are all by convention or from the crypto-config.yaml file you feed it. There's a little on it here - https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html?highlight=cryptogen%20directory%20structure

adamhardie (Fri, 05 Apr 2019 14:55:37 GMT):
when i send a ProposalResponse collection to the channel with channel.sendTransaction, sometimes we wait for 1 minute and still do not find a response

adamhardie (Fri, 05 Apr 2019 14:56:06 GMT):
i can see the event appearing on the channel via my other applications, but the committer does not know if it is successful

adamhardie (Fri, 05 Apr 2019 14:56:39 GMT):
currently, we throw a timeout exception. but it is very difficult to know if it is caused by a bad error, or if we just have not heard a response

adamhardie (Fri, 05 Apr 2019 14:57:05 GMT):
is there a suggestion at what would prevent the SDK receiving the TransactionEvent CompletableFuture ?

rickr (Fri, 05 Apr 2019 15:04:26 GMT):
@adamhardie Not experienced that. If you wait for about 10min there is a routine that wil kick in that should print a warning log what events did not report. Also there should be extensive logging at trace showing what events are reporting .. what level of the SDK ?

adamhardie (Fri, 05 Apr 2019 15:05:18 GMT):
i will increase log level - and in fact this is being experienced in a server without much logging

adamhardie (Fri, 05 Apr 2019 15:05:31 GMT):
let me increase the timeout to 11 minutes and change the logging - will get back to you

rickr (Fri, 05 Apr 2019 15:06:04 GMT):
the logging on the client sdk side :wink:

Antimttr (Fri, 05 Apr 2019 15:46:27 GMT):
``` Logging for the SDK can be enabled with setting environment variables: ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=TRACE ORG_HYPERLEDGER_FABRIC_CA_SDK_LOGLEVEL=TRACE ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR= # dumps protobuf and diagnostic data. Can be produce large amounts of data! ``` Is this an environmental variable we set in the docker instance of the peers? or is this a variable you set in the sdk client's execution environment?

rickr (Fri, 05 Apr 2019 15:47:31 GMT):
client env

rickr (Fri, 05 Apr 2019 19:26:16 GMT):
@Antimttr By chance are you going through some proxy/firewall. If yes, look at the README.md FAQ for properties you may need to set

Antimttr (Fri, 05 Apr 2019 19:30:11 GMT):
Yeah I read about that. I am not but I'm just in a dev environment at this point. There's certainly a possibility that someone running the client could go through firewalls

Antimttr (Fri, 05 Apr 2019 19:31:23 GMT):
Is there a specific place in the artifacts or msp directory structures where the policy files are stored? I cant seem to find any

Antimttr (Fri, 05 Apr 2019 19:31:50 GMT):
trying to figure out where the policy is for determining how many orgs need to sign off on a particular channel creation

aatkddny (Sat, 06 Apr 2019 02:04:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MPGmQAfyyM8ndEkEv) I think it gets encoded into the channel genesis block from configtx.yaml - from the ChannelDefaults under Admins, no? So the default would be majority.

aatkddny (Sat, 06 Apr 2019 02:04:41 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=MPGmQAfyyM8ndEkEv) I think it gets encoded into the channel genesis block from configtx.yaml - from the ChannelDefaults under Admins, no? So the default would be majority. I may be dead wrong - we sorta cheat as I have access to *all* the channel member organization's peer admins. I just build an array of all the `getChannelConfigurationSignature` results for all of them, so I never really have to think about it.

Randyshu2018 (Mon, 08 Apr 2019 02:16:18 GMT):

Clipboard - April 8, 2019 10:14 AM

adamhardie (Mon, 08 Apr 2019 09:43:38 GMT):
looking at HL logging - i can see DEBUG | 2019-04-08 10:41:36.160 | earer_send | o.h.f.s.OrdererClient | OrdererClient-messagebus-orderer0.group(grpc://10.186.xxx.xxx:7050)Done waiting for reply! Got:status: SUCCESS so we can see the send to orderer is successful then the CompletableFuture timedGet times out 5 seconds later.: Caused by: java.util.concurrent.TimeoutException at java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771) ~[?:1.8.0_201]

adamhardie (Mon, 08 Apr 2019 09:44:25 GMT):
here is the code to send the transaction sentSuccessfully = chnl.sendTransaction(responses).get(MESSAGE_TIMEOUT_SECS, SECONDS).isValid(); this appears the same as in e2e it

gravity (Mon, 08 Apr 2019 10:15:50 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=qvZAHRRwemYfpxCXk) @aatkddny are these peers unique for this channel? or are they joined in other channels?

rickr (Mon, 08 Apr 2019 18:57:12 GMT):
@adamhardie In general, the future is not done when sent to orderer. It gets completed when all eventing peers have seen the block with the transaction. Which means on those peers the transaction is on the ledger.

SandySun2000 (Tue, 09 Apr 2019 00:53:42 GMT):
@rickr When the user tries to update chaincode, it failed at the first try: services.HLHelperService.lambda$createAndExecuteTransaction$2 (HLHelperService.[java:183)](java:183)) - Cause:{} org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID 9472f24aad4871d3819391111902f8eb1fb1c21f24dc37f832338322078092a6 status 10 but when he uploaded and updated same version of CC then it works. Can you please help to find solution for his issue?

AliciaDominic (Tue, 09 Apr 2019 06:00:57 GMT):
Has joined the channel.

aatkddny (Tue, 09 Apr 2019 06:40:20 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vAfBHndFSK6JwYJJW) Peers are members of multiple channels.

josephnicholas (Tue, 09 Apr 2019 07:12:27 GMT):
Has joined the channel.

AndresMartinezMelgar.itcl (Tue, 09 Apr 2019 08:21:18 GMT):
Hi, why my query method doent work? private Response query(ChaincodeStub stub, List params) { try{ String key = params.get(0); String state = stub.getStringState(key); if(state==null) { return newErrorResponse("Id doesnt exit"); } _logger.info("STATE--> "+state); return newSuccessResponse(state); }catch (Throwable e) { return newErrorResponse(e); } } When i look "logger.info" i find the spected result, but return statment is always blank peer chaincode query..... doesnt return nothing

adamhardie (Tue, 09 Apr 2019 09:14:53 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DKAnQFpKbRRYPK8Qk) @rickr So, possibly the eventing peer in my network is either not receiving the block (although, the block is distributed to other listening peers).. Or the orderer is unable to tell the committer that the block has been successfully pushed to the eventing peer

rickr (Tue, 09 Apr 2019 11:43:52 GMT):
@adamhardie There is extensive logging (trace) on the sdk on events it's getting.

rickr (Tue, 09 Apr 2019 11:46:30 GMT):
@SandySun2000 there was first time some issue with the endorsement conflicting ..

rickr (Tue, 09 Apr 2019 11:47:45 GMT):
@AndresMartinezMelgar.itcl Is this on the chaincode side ? I would work this on #fabric-chaincode-dev

AndresMartinezMelgar.itcl (Tue, 09 Apr 2019 11:51:32 GMT):
@rickr ok, right now i post there

adamhardie (Tue, 09 Apr 2019 13:18:30 GMT):
yes, so it is the DeliverResponse we are expecting that never arrives. example successful message has this logging after "onComplete received." TRACE | 2019-04-09 12:40:23.816 | xecutor-16 | o.h.f.s.PeerEventServiceClient | DeliverResponse channel messagebus peer peer0.group resp status value:0 status UNKNOWN, typecase BLOCK TRACE | 2019-04-09 12:40:23.816 | xecutor-16 | o.h.f.s.PeerEventServiceClient | Channel messagebus peer peer0.group got event block hex hashcode: 0000000017068e29, block number: 28695

rickr (Tue, 09 Apr 2019 14:22:43 GMT):
@adamhardie so the above is a block that you did receive but you have cases where you are expecting a block and that message above is not appear?

rickr (Tue, 09 Apr 2019 14:22:43 GMT):
@adamhardie so the above is a block that you did receive but you have cases where you are expecting a block and that message above is not appearing?

adamhardie (Tue, 09 Apr 2019 14:24:18 GMT):
indeed. deliver response never arrives

adamhardie (Tue, 09 Apr 2019 14:24:29 GMT):
seems a networking issue possibly

rickr (Tue, 09 Apr 2019 14:26:24 GMT):
are you running though a proxy/load balancer ?

rickr (Tue, 09 Apr 2019 14:27:37 GMT):
if yes, see README.md FAQ

adamhardie (Tue, 09 Apr 2019 14:39:56 GMT):
no proxy or LB

adamhardie (Tue, 09 Apr 2019 14:40:17 GMT):
seems that, after application restart, it takes 15 minutes for this to start happening.

adamhardie (Tue, 09 Apr 2019 14:40:28 GMT):
regularly the issue appears after 15 mins of normal working

rickr (Tue, 09 Apr 2019 14:42:50 GMT):
no errors ? No messages that the eventing service is reconnecting ?

rickr (Tue, 09 Apr 2019 14:43:14 GMT):
I've not had anyone else report issues

rickr (Tue, 09 Apr 2019 14:43:59 GMT):
Just for fun ... I would look at the README.md for the properties to add for loadbalancers just to see if that would help

adamhardie (Tue, 09 Apr 2019 15:01:19 GMT):
nothing.. on the unsuccessful i get this on SDK client

adamhardie (Tue, 09 Apr 2019 15:01:22 GMT):
DEBUG | 2019-04-09 14:08:02.226 | earer_send | o.h.f.s.Channel | Channel messagebus successful sent to Orderer transaction id: e30507683e39d9832eace0ae74bc31d0be9a1140b4128c1a8f765fed444d9422 TRACE | 2019-04-09 14:08:02.227 | xecutor-17 | o.h.f.s.OrdererClient | org.hyperledger.fabric.sdk.OrdererClient$1@43f7ad79 onComplete received.

adamhardie (Tue, 09 Apr 2019 15:01:31 GMT):
then the future times out

adamhardie (Tue, 09 Apr 2019 15:01:36 GMT):
and orderer log shows no error

adamhardie (Tue, 09 Apr 2019 15:03:06 GMT):
have pastebin of orderer if needs be

adamhardie (Tue, 09 Apr 2019 15:03:11 GMT):
i will check the readme now

adamhardie (Tue, 09 Apr 2019 15:36:46 GMT):
will try this deployment and get back to you :) thanks for the pointer

SandySun2000 (Tue, 09 Apr 2019 16:30:14 GMT):
@rickr but they don't need to fix anything but just invoke the update again then the issue is gone. Their question is why the update chaincode failed at the first invoke but success at the 2nd one?

SandySun2000 (Tue, 09 Apr 2019 16:30:14 GMT):
@rickr They don't need to fix anything but just invoke the update again then the issue is gone. Their question is why the update chaincode failed at the first invoke but success at the 2nd one?

rickr (Tue, 09 Apr 2019 16:46:21 GMT):
@SandySun2000 The sdk has little to do but send the update to fabric. The fact that it worked the second time and I have not heard any reported issue with the SDK doing updates makes me doubtful anything is wrong with was sent. The only way to know for sure is capture the issue with logging at debug both sdks and fabric. Then since the rejection is by the commiting peer and the SDK is just reporting it you would need to start them looking at it.

rickr (Tue, 09 Apr 2019 16:46:21 GMT):
@SandySun2000 The sdk has little to do but send the update to fabric. The fact that it worked the second time and I have not heard any reported issue with the SDK doing updates makes me doubtful anything is wrong with what was sent. The only way to know for sure is capture the issue with logging at debug both sdks and fabric. Then since the rejection is by the commiting peer and the SDK is just reporting it you would need to start them looking at it.

SandySun2000 (Tue, 09 Apr 2019 17:05:50 GMT):
@rickr thanks. Let me get the logs.

Randyshu2018 (Wed, 10 Apr 2019 05:44:11 GMT):
Anyone know how to fix it ? Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching localhost found.

Randyshu2018 (Wed, 10 Apr 2019 09:06:09 GMT):
why I continues receive block event even no new block produce?

rickr (Wed, 10 Apr 2019 11:59:05 GMT):
@Randyshu2018 Most likely cert does not match. See https://github.com/hyperledger/fabric-sdk-java/blob/ef153c833ba55f77e0ca12379691c82b79b975ce/src/test/java/org/hyperledger/fabric/sdk/testutils/TestConfig.java#L446 sets property to override what's the cert

adamhardie (Wed, 10 Apr 2019 12:31:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Je5b6w4X5z455oiNr) i have observed the 15 minute timeout issue once more - with the new orderer config fields

adamhardie (Wed, 10 Apr 2019 12:31:51 GMT):
we hang here for 5 seconds, then timeout TRACE | 2019-04-10 13:30:57.285 | executor-5 | o.h.f.s.OrdererClient | org.hyperledger.fabric.sdk.OrdererClient$1@9cd1655 onComplete received.

Antimttr (Wed, 10 Apr 2019 20:40:25 GMT):
I just got channel creation working in my client implemenation. However there's a small issue. I am checking to see if the channel already exists by calling HFClient.getChannel(name), and this works fine as long as i dont restart the client. if i do this comes up empty, even though a channel exists on the hyperledger. so my question is how can i load the channel state from the hyperledger into the sdk client so this doesn't happen?

Antimttr (Wed, 10 Apr 2019 22:36:33 GMT):
OK so i solved it by serializing the channel after its created, storing it in mongo and then loading it up back into the HFClient after reloading my client.

Randyshu2018 (Thu, 11 Apr 2019 01:06:28 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=bTFrBm89nTw76pq4c) @rickr U are right~,I forgot to set pemFile properties.

jonathan-blood (Thu, 11 Apr 2019 07:08:04 GMT):
Has joined the channel.

Randyshu2018 (Thu, 11 Apr 2019 07:48:10 GMT):
Is fabric-sdk-java support to synchronize full blocks like fabric-sdk-node do?

Randyshu2018 (Thu, 11 Apr 2019 07:48:10 GMT):
Is fabric-sdk-java support to synchronize full blocks like fabric-sdk-node do when registerBlockEvent?

rickr (Thu, 11 Apr 2019 14:28:38 GMT):
Syncroized?

rickr (Thu, 11 Apr 2019 14:28:38 GMT):
Synchronized?

Antimttr (Thu, 11 Apr 2019 14:56:44 GMT):
@rickr In the end2endIT, i couldn't find an example of anchor peers being updated with a channel, like you have in the balance-transfer api

Antimttr (Thu, 11 Apr 2019 14:57:01 GMT):
am i just missing it or is that not a thing with the java sdk?

Antimttr (Thu, 11 Apr 2019 14:57:27 GMT):
that operation would use the /artifacts/channel/Org1MSPanchors.tx file

rickr (Thu, 11 Apr 2019 15:45:23 GMT):
Updating the channel example is provided... again (re)- look over the readme.md

Antimttr (Thu, 11 Apr 2019 16:02:19 GMT):
can't find any mention of anchor peers in the readme

Antimttr (Thu, 11 Apr 2019 16:02:41 GMT):
only normal peers

Antimttr (Thu, 11 Apr 2019 16:02:44 GMT):
which i'm already writing

Antimttr (Thu, 11 Apr 2019 16:04:15 GMT):
@rickr near as i can tell constructChannel() instantiates the orderers, creates the channel and then adds regular peers, no mention of anchor peers

Antimttr (Thu, 11 Apr 2019 16:04:30 GMT):
infact I cant even find any use of the word anchor in the readme or in end2endIT

Antimttr (Thu, 11 Apr 2019 16:05:09 GMT):
that's why i was wondering if this is even a part of the java sdk implementation

Antimttr (Thu, 11 Apr 2019 16:06:05 GMT):
likewise, I can't find any equivilent of the channel.initialize() sdk call in the nodejs implementation

Antimttr (Thu, 11 Apr 2019 16:06:25 GMT):
but it seems that the initialize() call can only be made after peers have been added

Antimttr (Thu, 11 Apr 2019 16:21:44 GMT):
@rickr so i did find mention of anchor peers in https://github.com/hyperledger/fabric-sdk-java/blob/8044bac1bfe9baf9d6360b067e0d6b5445cc953d/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java

Antimttr (Thu, 11 Apr 2019 16:21:53 GMT):
i assume this is what you're talking about

Antimttr (Thu, 11 Apr 2019 16:27:11 GMT):
``` /** * Update channel scenario * See http://hyperledger-fabric.readthedocs.io/en/master/configtxlator.html * for details. */ ``` dead link in the code

Antimttr (Thu, 11 Apr 2019 16:27:40 GMT):
im guessing it corresponds to this page: https://hyperledger-fabric.readthedocs.io/en/release-1.4/channel_update_tutorial.html?highlight=configtxlator

Antimttr (Thu, 11 Apr 2019 16:27:42 GMT):
but not really sure

Randyshu2018 (Fri, 12 Apr 2019 01:18:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ohWaRSXMro8CsF4sA) @Antimttr maybe u are looking for this https://github.com/siyuyifang/balance-transfer-java

Antimttr (Fri, 12 Apr 2019 02:05:34 GMT):
oh wow

Antimttr (Fri, 12 Apr 2019 02:05:55 GMT):
@Randyshu2018 thankyou x10000000000000

Antimttr (Fri, 12 Apr 2019 02:10:57 GMT):
interesting

Antimttr (Fri, 12 Apr 2019 02:11:16 GMT):
its based on 1.0 which is too bad cuz i think things have changed a lot

Antimttr (Fri, 12 Apr 2019 02:11:32 GMT):
and it doesnt have the whole channel update anchor peers thing

Antimttr (Fri, 12 Apr 2019 02:11:49 GMT):
still, very cool to see someone else implement that

Antimttr (Fri, 12 Apr 2019 02:18:11 GMT):
if only there was a more up to date example

Antimttr (Fri, 12 Apr 2019 02:18:38 GMT):
like do i really need to update the anchors like the nodejs sdk does

Antimttr (Fri, 12 Apr 2019 02:18:41 GMT):
not sure

Antimttr (Fri, 12 Apr 2019 02:24:32 GMT):
seems pretty straight forward updating the anchor peers by the command line, but the java example has all this code testing out the sdk so its hard to pull out from that what i actually need to execute to do it

Antimttr (Fri, 12 Apr 2019 02:26:18 GMT):
what's even more confusing is than in https://github.com/hyperledger/fabric-sdk-java/blob/d2bc6d50e362a140970a509ade25f2f2c69e6c0f/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java there's not really any reference to the configtxgen generated file Org1MSPanchors.tx which both the nodejs sdk implementation and the command line use

Antimttr (Fri, 12 Apr 2019 02:26:18 GMT):
what's even more confusing is that in https://github.com/hyperledger/fabric-sdk-java/blob/d2bc6d50e362a140970a509ade25f2f2c69e6c0f/src/test/java/org/hyperledger/fabric/sdkintegration/UpdateChannelIT.java there's not really any reference to the configtxgen generated file Org1MSPanchors.tx which both the nodejs sdk implementation and the command line use

Antimttr (Fri, 12 Apr 2019 02:26:25 GMT):
but maybe its burried in some helper funciton somewhere

Antimttr (Fri, 12 Apr 2019 14:34:22 GMT):
In updateChannelIT.java: ``` String responseAsString = configTxlatorDecode(httpclient, channelConfigurationBytes); ```

Antimttr (Fri, 12 Apr 2019 14:34:40 GMT):
is this the same as an `Org1MSPanchors.tx"` ?

Antimttr (Fri, 12 Apr 2019 14:36:58 GMT):
i guess im confused but it seems like this updatechannelit deal doesn't actually add anchor peers to the channel

Antimttr (Fri, 12 Apr 2019 15:09:04 GMT):
having reviewed the code from updatechannelit and the channel.java from the sdk once again i think i found what i need: ``` // Get config update for adding an anchor peer. Channel.AnchorPeersConfigUpdateResult configUpdateAnchorPeers = fooChannel.getConfigUpdateAnchorPeers(fooChannel.getPeers().iterator().next(), sampleOrg.getPeerAdmin(), Arrays.asList(PEER_0_ORG_1_EXAMPLE_COM_7051), null); //Now add anchor peer to channel configuration. fooChannel.updateChannelConfiguration(configUpdateAnchorPeers.getUpdateChannelConfiguration(), client.getUpdateChannelConfigurationSignature(configUpdateAnchorPeers.getUpdateChannelConfiguration(), sampleOrg.getPeerAdmin())); ```

Antimttr (Fri, 12 Apr 2019 15:09:31 GMT):
near as i can tell this will add t he anchor and update the channel with the new configuration block

Antimttr (Fri, 12 Apr 2019 15:10:58 GMT):
Apparently you dont use, or don't need to use a 'Org1MSPanchors.tx' to do this, unlike in the other sdk examples?

Antimttr (Fri, 12 Apr 2019 15:11:00 GMT):
dunno

Antimttr (Fri, 12 Apr 2019 15:28:12 GMT):
so in the updatechannelit.java, it uses the format: "peer0.org1.example.com:7051" to tell the sdk what anchor peer to add. my question is, does the address have to be that of the physical listener, ie: localhost:7051 or can it be the name of the peer?

Antimttr (Fri, 12 Apr 2019 15:28:35 GMT):
i'm guessing its the latter, but how does it reconsile the peer name to the physical address/url?

Antimttr (Fri, 12 Apr 2019 15:28:35 GMT):
i'm guessing its the latter, but how does it resolve the peer name to the physical address/url?

Antimttr (Fri, 12 Apr 2019 19:50:21 GMT):
that was in fact the way to do it

gravity (Mon, 15 Apr 2019 08:39:58 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=AXBaQ9EKr7JPndfGz) @Antimttr peers run in docker containers and there is internal dns resolver.

bilalahmed (Mon, 15 Apr 2019 12:50:37 GMT):
Has joined the channel.

bilalahmed (Mon, 15 Apr 2019 12:55:09 GMT):
I have just started working with JAVA SDK after leaving composer. Can anyone please share a running example or guide that how should I start working with this?

bilalahmed (Mon, 15 Apr 2019 13:00:05 GMT):
I'm getting NullPointerException on: Enrollment adminEnrollment = caClient.enroll("admin", "adminpw");

rickr (Mon, 15 Apr 2019 13:05:14 GMT):
@bilalahmed Have looked at the README ?

bilalahmed (Mon, 15 Apr 2019 13:17:03 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=2RW6xioeArhCMkaS2) @rickr README of https://github.com/hyperledger/fabric-sdk-java?

bilalahmed (Mon, 15 Apr 2019 13:51:51 GMT):
import org.hyperledger.fabric.protos -->> Cannot resolve symbol 'protos'

rickr (Mon, 15 Apr 2019 13:53:43 GMT):
so your unit tests and integration test are passing ?

bilalahmed (Mon, 15 Apr 2019 13:57:56 GMT):
No, I'm getting error on all the packages from 'protoes' For example: Error:(74, 44) java: package org.hyperledger.fabric.protos.common does not exist

rickr (Mon, 15 Apr 2019 13:58:20 GMT):
when doing what ?

bilalahmed (Mon, 15 Apr 2019 13:58:46 GMT):
while running End2endIT.java tests

rickr (Mon, 15 Apr 2019 13:58:57 GMT):
how are you running it ?

bilalahmed (Mon, 15 Apr 2019 14:00:04 GMT):

Screen Shot 2019-04-15 at 6.59.51 PM.png

rickr (Mon, 15 Apr 2019 14:00:24 GMT):
in ide ?

bilalahmed (Mon, 15 Apr 2019 14:00:35 GMT):
yeah, Intelij Idea

rickr (Mon, 15 Apr 2019 14:00:58 GMT):
Well I don't see that stated in the README.md :wink:

bilalahmed (Mon, 15 Apr 2019 14:02:10 GMT):
Can you please guide then how may I run these? Its a JAVA code so I opened in IDEA and ran following the way I run tests normally.

rickr (Mon, 15 Apr 2019 14:03:20 GMT):
What about this ? https://github.com/hyperledger/fabric-sdk-java#running-the-integration-tests

bilalahmed (Mon, 15 Apr 2019 14:06:12 GMT):
Thanks, sorry I missed it, its downloading the missing repos now.

rickr (Mon, 15 Apr 2019 14:08:40 GMT):
Get the test and integration working first. Then you know your environment is all running and is good. *Then* as it says it the READM.md start working through the integration tests (best with a debugger) The protos are generated code it your test all pass then they have to be there :wink:

rickr (Mon, 15 Apr 2019 14:08:40 GMT):
Get the test and integration working first. Then you know your environment is all running and is good. *Then* as it says it the READM.md start working through the integration tests (best with a debugger) The protos are generated code if your test all pass then they have to be there :wink:

bilalahmed (Mon, 15 Apr 2019 14:10:13 GMT):
Okay, thanks a lot. Will follow your suggestions. To learn JAVA SDK should we start from unit tests and learn from code or is there any documentation for the development and deployment of chaincodes using JAVA SDK?

rickr (Mon, 15 Apr 2019 14:12:27 GMT):
As it says -- you should have some basic of fabric behind your belt. The integratons tests do 95% of what any application will do the sdk. Mostly just follow what's in those files ignore most of that's happening the the Sample stuff as that's not really part of the SDK

bilalahmed (Mon, 15 Apr 2019 14:16:08 GMT):
okay, perfect. I'll first try to run these tests.

quaider (Tue, 16 Apr 2019 06:31:49 GMT):
Has joined the channel.

quaider (Tue, 16 Apr 2019 06:32:13 GMT):
hi, i get IllegalArgumentException when instantiate chaincode

quaider (Tue, 16 Apr 2019 06:32:27 GMT):
the message is `The proposal responses have 2 inconsistent groups with 0 that are invalid`

quaider (Tue, 16 Apr 2019 06:32:41 GMT):
here is my test case

quaider (Tue, 16 Apr 2019 06:32:49 GMT):
install chaincode with couchdb indexes , instantiate chaincode with error above install chaincode without indexes, instantiate chaincode success

quaider (Tue, 16 Apr 2019 06:34:35 GMT):
the only difference is use couchdb indexes or not

AndresMartinezMelgar.itcl (Tue, 16 Apr 2019 06:42:09 GMT):
Hi i receive this error when i try to create a new channel, java.security.NoSuchAlgorithmException: ECDSA KeyFactory not available what is the meaning of these error?

quaider (Tue, 16 Apr 2019 06:44:47 GMT):
you should add this code ` Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());`

AndresMartinezMelgar.itcl (Tue, 16 Apr 2019 06:48:30 GMT):
@quaider where i must add this code?

quaider (Tue, 16 Apr 2019 06:54:50 GMT):
i am not sure, my error is different `java.security.NoSuchProviderException: no such provider: BC` with yours

gravity (Tue, 16 Apr 2019 07:04:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=p9pDE2CiLQAJoP4Ze) @quaider full stacktrace from peer where you instantiate a chaincode might be helpful to identify the problem

gravity (Tue, 16 Apr 2019 07:05:49 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=8S2PFFZPYPAe7tkY2) @AndresMartinezMelgar.itcl when do you get this exception?

chill37 (Tue, 16 Apr 2019 07:07:00 GMT):
HI, when I use channel.sendTransaction(responses, orderers); is there a way to know which orderer node has actually made this transaction successful? I guess I could see from the log, but I would like to make use of that info, so I was wondering if that orderer info (e.g. orderer1.example.com) is buried somewhere in the transaction info that I can look it up

quaider (Tue, 16 Apr 2019 07:10:27 GMT):

Clipboard - April 16, 2019 3:10 PM

quaider (Tue, 16 Apr 2019 07:13:00 GMT):
i found that the payload has a bit difference, i have 2 peer, but only occurs when use indexes

quaider (Tue, 16 Apr 2019 07:13:51 GMT):
@gravity

AndresMartinezMelgar.itcl (Tue, 16 Apr 2019 07:15:23 GMT):

Clipboard - April 16, 2019 9:15 AM

AndresMartinezMelgar.itcl (Tue, 16 Apr 2019 07:15:35 GMT):
@gravity

AndresMartinezMelgar.itcl (Tue, 16 Apr 2019 07:15:35 GMT):
@gravity i receive this error when i try to create a channel

gravity (Tue, 16 Apr 2019 07:16:46 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=HAWjZ8oPxzPZZzRCL) @quaider have you added your indexes to the chaincode directory? https://hyperledger-fabric.readthedocs.io/en/release-1.4/couchdb_tutorial.html#cdb-add-index

quaider (Tue, 16 Apr 2019 07:18:22 GMT):
@gravity yes,

quaider (Tue, 16 Apr 2019 07:18:30 GMT):

Clipboard - April 16, 2019 3:18 PM

quaider (Tue, 16 Apr 2019 07:18:47 GMT):

Clipboard - April 16, 2019 3:18 PM

gravity (Tue, 16 Apr 2019 07:22:23 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=zQMpkJsYLjaHZTJye) @AndresMartinezMelgar.itcl try to add this before sending create channel tx: ``` Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); ```

gravity (Tue, 16 Apr 2019 07:27:21 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uw45bfZzZfED6pAje) @quaider I can see that there is no chaincode sources near the indexes directory

quaider (Tue, 16 Apr 2019 07:30:04 GMT):
where the indexes dir should i put in? resources or src/main/java? @gravity

gravity (Tue, 16 Apr 2019 07:32:06 GMT):
@quaider what is a package structure under the `/src/main/java` ?

quaider (Tue, 16 Apr 2019 07:34:21 GMT):

Clipboard - April 16, 2019 3:34 PM

gravity (Tue, 16 Apr 2019 07:37:51 GMT):
@quaider try to put indexes to the package `com.cnabs.chaincode.fileapp` near the chaincode sources the final structure should be `com.cnabs.chaincode.fileapp.META-INF/statedb/couchdb/indexes/index-filepath.json`

quaider (Tue, 16 Apr 2019 07:38:56 GMT):
ok, i will try, thanks :slight_smile:

quaider (Tue, 16 Apr 2019 07:41:32 GMT):

Clipboard - April 16, 2019 3:41 PM

gravity (Tue, 16 Apr 2019 07:43:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=fLsDXRTvAg9PZh9L9) @quaider you did this to avoid inconsistency? if you do, you shouldn't do this

quaider (Tue, 16 Apr 2019 08:07:02 GMT):
@gravity its my error

quaider (Tue, 16 Apr 2019 08:07:08 GMT):
when i install chaincode, i make a mistake, i use `hardcode clone` to get a new InstallProposalRequest instance which i ignore to set the `chaincodeMetaInfLocation` property this cause one peer get indexes, anthor not...

AndresMartinezMelgar.itcl (Tue, 16 Apr 2019 11:18:48 GMT):
hello, anyone knows some project that was developed with the java sdk in version 1.3?

rickr (Tue, 16 Apr 2019 12:16:51 GMT):
@chill37 Only really the log shows. I think if it's really important to your application you can send to just a specific Orderer ... should be easy to guess then :) May I ask why your application really cares? The use case?

Antimttr (Tue, 16 Apr 2019 16:44:35 GMT):
I am getting ' chaincodePath must be null for Node chaincode' when I'm attempting to install nodejs chaincode with the java sdk. Does this mean that javasdk can't install nodejs chaincode?

Antimttr (Tue, 16 Apr 2019 16:44:35 GMT):
I am getting 'chaincodePath must be null for Node chaincode' when I'm attempting to install nodejs chaincode with the java sdk. Does this mean that javasdk can't install nodejs chaincode?

Antimttr (Tue, 16 Apr 2019 16:44:35 GMT):
I am getting `chaincodePath must be null for Node chaincode` when I'm attempting to install nodejs chaincode with the java sdk. Does this mean that javasdk can't install nodejs chaincode?

Antimttr (Tue, 16 Apr 2019 16:49:48 GMT):
OK nm, all i had to do was remove chaincodepath, but still specify chaincode source

Antimttr (Tue, 16 Apr 2019 17:03:12 GMT):
Sweet, chaincode installed and instantiated for the first time!

Antimttr (Tue, 16 Apr 2019 17:03:19 GMT):
now time to write an invoker

Antimttr (Tue, 16 Apr 2019 20:07:15 GMT):
``` }).get(testConfig.getTransactionWaitTime(), TimeUnit.SECONDS); ```

Antimttr (Tue, 16 Apr 2019 20:07:34 GMT):
this is line 724 from end2endIT.java any idea at all what this is doing?

Antimttr (Tue, 16 Apr 2019 20:07:55 GMT):
is it required to send a transaction to the orderer?

Antimttr (Tue, 16 Apr 2019 20:10:32 GMT):
ok i think i found it, just seems to be something that performs a timeout

Antimttr (Tue, 16 Apr 2019 20:10:40 GMT):
so then not required but useful

chill37 (Wed, 17 Apr 2019 05:52:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=foH2bA5gEJaorf4vm) @rickr @rickr that's true, but I don't want to override the given functionality (i.e. get multiple orderers, try each one if it fails, break when success) our usage is because we are making a separate log. so I am getting all the basic success/fail, input/output, interval, etc for all peers including the orderer. I could get the output from peers, but I couldnt

chill37 (Wed, 17 Apr 2019 05:52:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=foH2bA5gEJaorf4vm) @rickr @rickr that's true, but I don't want to override the given functionality (i.e. get multiple orderers, try each one if it fails, break when success) our usage is because we are making a separate log. so I am getting all the basic success/fail, input/output, interval, etc for all peers including the orderer. I could get the output from peers, but I couldnt get it for the orderer other than the total success/fail

chill37 (Wed, 17 Apr 2019 05:52:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=foH2bA5gEJaorf4vm) @rickr @rickr that's true, but I don't want to override the given functionality (i.e. get multiple orderers, try each one if it fails, break when success) our usage is because we are making our own log. so I am getting all the basic success/fail, input/output, interval, etc for all peers including the orderer. I could get the output from peers, but I couldnt get it for the orderer other than the total success/fail

chill37 (Wed, 17 Apr 2019 05:52:07 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=foH2bA5gEJaorf4vm) @rickr @rickr that's true, but I don't want to override the given functionality (i.e. get multiple orderers, try each one if it fails, break when success) our usage is because we are making our own log(for tracing). so I am getting all the basic success/fail, input/output, interval, etc for all peers including the orderer. I could get the output from peers, but I couldnt get it for the orderer other than the total success/fail

bilalahmed (Wed, 17 Apr 2019 12:39:31 GMT):
Anyone encountered the issue: Unable to load the library 'netty_tcnative_osx_x86_64', trying other loading mechanism. java.lang.UnsatisfiedLinkError: no netty_tcnative_osx_x86_64 in java.library.path

Antimttr (Wed, 17 Apr 2019 16:45:16 GMT):
i have

Antimttr (Wed, 17 Apr 2019 16:45:41 GMT):
i restarted my dockers and wiped them clean and it went away though

Antimttr (Wed, 17 Apr 2019 18:03:25 GMT):
are there any examples of how to unpack and use a TransactionEnvelopeInfo object from a TransactionEvent object?

Antimttr (Wed, 17 Apr 2019 18:18:32 GMT):
i think i found it, it's in BlockWalker()

chill37 (Thu, 18 Apr 2019 01:27:48 GMT):
@Antimttr where is this Blockwalker() that you just mentioned? which class?

bilalahmed (Thu, 18 Apr 2019 10:13:30 GMT):
Hello, Can anyone please guide that how can we pass peer/orderers certificates in JAVA SDK while playing with grpcs when TLS is enabled. Thanks

bilalahmed (Thu, 18 Apr 2019 10:20:39 GMT):
What is the use of EndPoint class in this context?

rickr (Thu, 18 Apr 2019 12:12:37 GMT):
@bilalahmed EndPoint is internal to the SDK not public. The READEM.md states how the Integration test can be run with TLS enabled so you can follow that. https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/HFClient.html newPeer newOrderer methods have explanation of the properties. You could have seen these being used in https://github.com/hyperledger/fabric-sdk-java/blob/df422e10fa38bf8a627dd81e7ad038404d625576/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L813-L824 and a few lines below that for the Peer. Take the time read the README.md follow the integration tests step for step :wink:

rickr (Thu, 18 Apr 2019 12:14:47 GMT):
@chill37 take time follow the integration test they show walking the blocks

bilalahmed (Thu, 18 Apr 2019 13:09:15 GMT):
@rickr I'm following Read.me but not being able to get rid of the following error: TransactionException: Channel mychannel, send transactions failed on orderer OrdererClient{id: 5, channel: ttchannel, name: orderer.example.com, url: grpcs://orderer.example.com:7050}. Reason: timeout after 10000 ms.

bilalahmed (Thu, 18 Apr 2019 13:19:09 GMT):
One suggestion: Not everyone use the same names of peer/orderers/ca etc. to build network setup which are being used the tutorials. Like I did, I gave my names to peers/orderers organisations etc. So, I can't use the provided SDK intergations. So, It would have been a much better approach that proper documentation is provided instead of taking SDK understanding from code. I'll write a detailed documentation on JAVA SDK once I cross all the hurdles.

Antimttr (Thu, 18 Apr 2019 13:25:10 GMT):
@chill37 its in End2EndIT.java towards the end after runtests

rickr (Thu, 18 Apr 2019 14:17:45 GMT):
@bilalahmed Don't understand your suggestion on the names. You can walk step for step in a debugger through the integration test that show the api in *action* and in context. You *know* the code is current and because the test actually are passing it's not stale like I've seen many _tutorials_ go. If you've taken some time and familiarized yourself with those examples writing your application is really a matter of copy/paste/modify.

Antimttr (Thu, 18 Apr 2019 15:02:41 GMT):
thats what i did, and although I wouldn't say it was easy. I was able to make a completely functioning POC client by extracting the relevant bits from the end2endit files

Antimttr (Thu, 18 Apr 2019 15:03:34 GMT):
If we don't end up using this implementation I wouldn't mind contributing it as another example application for the java sdk

medikent (Thu, 18 Apr 2019 16:08:54 GMT):
Has joined the channel.

chill37 (Fri, 19 Apr 2019 06:58:10 GMT):
@Antimttr @rickr Found it. Thanks!

OrestFremy (Fri, 19 Apr 2019 18:45:10 GMT):
Has joined the channel.

OrestFremy (Fri, 19 Apr 2019 18:50:11 GMT):
Hello, i am stucked with chaincode instantiate. I have following exception : error starting container: error starting container: API error (400): OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"chaincode\": executable file not found in $PATH": unknown, on peerPeer{ id: 14, name: peer0.a.example.com, channelName: common, url: grpcs://peer0.a.example.com:7051} .

OrestFremy (Fri, 19 Apr 2019 18:50:11 GMT):
Hello, i am stucked with chaincode instantiate. I have following exception : error starting container: error starting container: API error (400): OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"chaincode\": executable file not found in $PATH": unknown, on peerPeer{ id: 14, name: peer0.a.example.com, channelName: common, url: grpcs://peer0.a.example.com:7051} . Can anyone help me with this?

OrestFremy (Fri, 19 Apr 2019 18:50:11 GMT):
Hello, i am stucked with chaincode instantiate. I have following exception : error starting container: error starting container: API error (400): OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"chaincode\": executable file not found in $PATH": unknown, on peerPeer{ id: 14, name: peer0.a.example.com, channelName: common, url: grpcs://peer0.a.example.com:7051} . Can anyone help me with this? I set the same chaincode path as when i installed it on peer

OrestFremy (Fri, 19 Apr 2019 18:50:11 GMT):
@rickr @Antimttr Hello, i am stucked with chaincode instantiate. I have following exception : error starting container: error starting container: API error (400): OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"chaincode\": executable file not found in $PATH": unknown, on peerPeer{ id: 14, name: peer0.a.example.com, channelName: common, url: grpcs://peer0.a.example.com:7051} . Can anyone help me with this? I set the same chaincode path as when i installed it on peer

rickr (Sat, 20 Apr 2019 19:16:48 GMT):
FYI The latest SDK (master) has v2.0 chaincode lifecycle management APIs which is a major change to how chaincode is deployed. Previous APIs are deprecated. Once a channel is migrated to v2.0 capabilities the v1.x APIs can no longer be used.

Antimttr (Mon, 22 Apr 2019 00:39:17 GMT):
@rickr any example of 2.0 implementations for java yet? or is that all in the repo

anjalinaik (Mon, 22 Apr 2019 05:42:50 GMT):
How do we expose the chaincode functions to external applications? Do we need to create rest API specific to chaincode through fabric-java-sdk or is there an alternative?

knagware9 (Mon, 22 Apr 2019 06:36:09 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=TqQ6swhhsLtEywhhz) @anjalinaik yes we need to build rest api using java sdk or you can directly implement java sdk in your application without rest api

anjalinaik (Mon, 22 Apr 2019 08:12:14 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=mohpeYRLH3bkyWBqq) @knagware9 thankyou :)

anjalinaik (Mon, 22 Apr 2019 08:49:11 GMT):
Hi Team. Can we limit the identity of user for the visibility of chaincode events.

rickr (Mon, 22 Apr 2019 10:39:06 GMT):
Test

ZLL (Mon, 22 Apr 2019 11:12:47 GMT):
Has joined the channel.

rickr (Mon, 22 Apr 2019 11:55:28 GMT):
@anjalinaik What are you asking? Can you prevent a specific user from seeing chaincode events? Do you want in the chaincode events to not be able to identify the user? Something else ?

bilalahmed (Mon, 22 Apr 2019 12:50:45 GMT):
I've setup a whole network. Channel is created and peers/orderers already joined it. Now, I want to write a client application to perform transactions and invoke chaincode already deployed on peers on this network. Now, I can see in SDK client.newChannel(), so will this create a new channel or will acquire channel already setup on the network?

bilalahmed (Mon, 22 Apr 2019 12:51:53 GMT):
For new channel name, I'm getting the following error on orderer container logs: [channel: baychannel] Rejecting broadcast of config message from 172.28.0.1:33414 because of error: error validating channel creation transaction for new channel 'newchannel', could not succesfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied

bilalahmed (Mon, 22 Apr 2019 12:51:53 GMT):
For new channel name, I'm getting the following error on orderer container logs: [channel: newchannel] Rejecting broadcast of config message from 172.28.0.1:33414 because of error: error validating channel creation transaction for new channel 'newchannel', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied

bilalahmed (Mon, 22 Apr 2019 12:54:07 GMT):
And when I pass the name of the channel which is already setup on the network, I get the following on orderer: [channel: ttchannel] Rejecting broadcast of config message from 172.28.0.1:33424 because of error: error applying config update to existing channel 'ttchannel': error authorizing update: error validating ReadSet: proposed update requires that key [Group] /Channel/Application be at version 0, but it is currently at version 1

bilalahmed (Mon, 22 Apr 2019 12:54:15 GMT):
@rickr can you please help

bilalahmed (Mon, 22 Apr 2019 12:59:30 GMT):
This error usually occur when channel is already created!

rickr (Mon, 22 Apr 2019 13:09:52 GMT):
Show in the integration examples of how to connect to an existing channel.

rickr (Mon, 22 Apr 2019 13:09:52 GMT):
Shown in the integration examples of how to connect to an existing channel.

bilalahmed (Mon, 22 Apr 2019 13:12:02 GMT):
great, can you please share fileName or particular section? Thanjs

bilalahmed (Mon, 22 Apr 2019 13:12:02 GMT):
great, can you please share fileName or particular section? Thanks

bilalahmed (Mon, 22 Apr 2019 13:20:07 GMT):
client.getChannel("mychannel") is returning null

Antimttr (Mon, 22 Apr 2019 13:33:00 GMT):
@BilalAhmad its in the buildchannel() function i beleive

BilalAhmad (Mon, 22 Apr 2019 13:33:00 GMT):
Has joined the channel.

Antimttr (Mon, 22 Apr 2019 13:33:09 GMT):
in end2endit.java

Antimttr (Mon, 22 Apr 2019 13:33:49 GMT):
you have to install the channel, then join peers to it, then add orderers

Antimttr (Mon, 22 Apr 2019 13:33:49 GMT):
you have to install the channel, then join peers to it, then add anchors

chill37 (Mon, 22 Apr 2019 16:12:39 GMT):
If I have mycc calling mycc2, and mycc2 has a more strict policy (mycc: O1 OR O2, mycc2: O1 AND O2), how can i call them? I saw the integration example of ServiceDiscoveryIT.java and tried to put .setServiceDiscoveryChaincodeInterests(Channel.ServiceDiscoveryChaincodeCalls.createServiceDiscoveryChaincodeCalls("mycc2") when trying to send proposal but got error: failed to find and endorser is there anything else I should do? when I tried cc-to-cc with same AND policy, it worked fine. Thanks upfront @rickr !

rickr (Mon, 22 Apr 2019 17:51:53 GMT):
Have you tried with getting an endorsements from O1 and O2 outside of Service discovery?

yacovm (Mon, 22 Apr 2019 18:31:10 GMT):
@chill37 you can try and use the `discover` CLI and ask the peer the same query.

yacovm (Mon, 22 Apr 2019 18:32:03 GMT):
it should work...

sejalpawar (Tue, 23 Apr 2019 11:06:33 GMT):
Has joined the channel.

sejalpawar (Tue, 23 Apr 2019 11:07:23 GMT):
Hey, I am getting the following errors while running tests:

sejalpawar (Tue, 23 Apr 2019 11:08:26 GMT):
Running org.hyperledger.fabric.sdk.PeerTest 2019-04-23 10:52:06,454 main INFO SampleStore:91 - Could not find the file "/home/ubuntu/test.properties" 2019-04-23 10:52:06,462 main INFO SampleStore:91 - Could not find the file "/home/ubuntu/test.properties" [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.966 s - in org.hyperledger.fabric.sdk.PeerTest [INFO] Running org.hyperledger.fabric.sdk.EndpointTest 2019-04-23 10:52:07,121 main ERROR Endpoint:466 - Failed endpoint grpcs://localhost:594 to parse certificate TLS client

sejalpawar (Tue, 23 Apr 2019 11:09:45 GMT):
I tried removing docker volumes (docker volume prune --force), deleting peer containers (docker rm -f $(docker ps -aq)) and restarting the network

sejalpawar (Tue, 23 Apr 2019 11:10:07 GMT):
The file test.properties does exist at the path

chill37 (Tue, 23 Apr 2019 11:41:22 GMT):
@rickr yes. when I used channel.queryByChaincode() instead of channel.sendProposalToEndorsers() using all peers, it worked successfully. when I did some digging, I found out that, sdChaincodeMap outputs null when called from sendProposalToEndorsers() Channel.class line3654: final Map sdChaindcodeMap = serviceDiscovery.discoverEndorserEndpoints(transactionContext, ccl); Initially, when called from channel.initialize(), it has the full map but when called from sendProposal() it somehow outputs null. do you have any other suggestions? I was looking at this this whole 2 days, but haven't got any answers yet.....any ideas I appreciate it. @yacovm unfortunately, I'm trying to make it work using the java-sdk. Thanks though!

chill37 (Tue, 23 Apr 2019 11:41:22 GMT):
@rickr yes. when I used channel.queryByChaincode() instead of channel.sendProposalToEndorsers() using all peers, it worked successfully. when I did some digging, I found out that, sdChaincodeMap outputs null when called from sendProposalToEndorsers() Channel.class line3654: final Map sdChaindcodeMap = serviceDiscovery.discoverEndorserEndpoints(transactionContext, ccl); Initially, when called from channel.initialize(), it has the full map but when called from sendProposal() it somehow outputs null. do you have any other suggestions? I was looking at this this whole 2 days, but haven't got any answers yet.....any ideas I appreciate it. @yacovm unfortunately, I'm trying to make it work using the java-sdk. Thanks though!

chill37 (Tue, 23 Apr 2019 11:41:22 GMT):
@rickr yes. when I used channel.queryByChaincode() instead of channel.sendProposalToEndorsers() using all peers, it worked successfully. when I did some digging, I found out that, sdChaincodeMap outputs null when called from sendProposalToEndorsers() Channel.class line3654: final Map sdChaindcodeMap = serviceDiscovery.discoverEndorserEndpoints(transactionContext, ccl); Initially, when called from channel.initialize(), it has the full map but when called from sendProposal() it somehow outputs null. do you have any other suggestions? I was looking at this this whole 2 days, but haven't got any answers yet.....any ideas I appreciate it.

chill37 (Tue, 23 Apr 2019 11:41:22 GMT):
@rickr yes. when I used channel.queryByChaincode() instead of channel.sendProposalToEndorsers() using all peers, it worked successfully. when I did some digging, I found out that, sdChaincodeMap outputs null when called from sendProposalToEndorsers() Channel.class line3654: final Map sdChaindcodeMap = serviceDiscovery.discoverEndorserEndpoints(transactionContext, ccl); ServiceDiscovery.class line466: final Protocol.Response response = serviceDiscoveryPeer.sendDiscoveryRequestAsync(sr).get(SERVICE_DISCOVERY_WAITTIME, TimeUnit.MILLISECONDS); gives this response below: error { content: "failed constructing descriptor for chaincodes: chaincodes: " } Initially, when called from channel.initialize(), it has the full map but when called from sendProposal() it somehow outputs null. do you have any other suggestions? I was looking at this this whole 2 days, but haven't got any answers yet.....any ideas I appreciate it.

chill37 (Tue, 23 Apr 2019 11:42:54 GMT):
@sejalpawar are you sure its localhost:594 and not localhost:5984? just a simple observation

chill37 (Tue, 23 Apr 2019 11:42:54 GMT):
@sejalpawar are you sure its localhost:594 and not localhost:5984? just a simple observation

chill37 (Tue, 23 Apr 2019 11:43:46 GMT):
@yacovm unfortunately, I'm trying to make it work using the java-sdk. Thanks though!

chill37 (Tue, 23 Apr 2019 11:44:07 GMT):
@sejalpawar are you sure its localhost:594 and not localhost:5984? just a simple observation

sejalpawar (Tue, 23 Apr 2019 11:49:00 GMT):
I didn't modify any files and that's what the error says

rickr (Tue, 23 Apr 2019 12:05:53 GMT):
@sejalpawar https://github.com/hyperledger/fabric-sdk-java#running-the-unit-tests

rickr (Tue, 23 Apr 2019 12:10:43 GMT):
@chill37 What version of the SDK? Can you put the SDK in logging trace mode, reproduce the error and then paste the logs using https://ctrlv.it/

chill37 (Tue, 23 Apr 2019 12:11:54 GMT):
@rickr v1.4.0 hold on....let me give you the trace log

rickr (Tue, 23 Apr 2019 12:14:02 GMT):
if you can make sure it has included the point where the channel is being initialized to error.

chill37 (Tue, 23 Apr 2019 12:17:20 GMT):
@rickr https://ctrlv.it/id/174822/755764539 will this work?

chill37 (Tue, 23 Apr 2019 12:19:16 GMT):
@rickr https://ctrlv.it/id/174824/516370265 cleaner version

rickr (Tue, 23 Apr 2019 12:48:32 GMT):
@chill37 Can you try to see if what yacovm suggests to get another point of reference. Also include the peer log of that error This maybe the SDK not sending the request ok, or environment setup doing the above will see if env. is ok.

chill37 (Tue, 23 Apr 2019 12:50:35 GMT):
@rickr you mean just the discover command? e.g. 1) discover --configFile conf.yaml --MSP Org1MSP --peerTLSCA /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt --userKey /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/bc777711397ae659a7d87ef5c9b6c6909b39757c0559b93637d1159f79bccf6e_sk --userCert /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem saveConfig 2) discover --configFile conf.yaml peers --channel mychannel --server peer0.org1.example.com:7051

chill37 (Tue, 23 Apr 2019 12:53:37 GMT):
OUTPUT: (got the whole peers) https://ctrlv.it/id/174830/354665286

rickr (Tue, 23 Apr 2019 12:54:56 GMT):
check if there is an option for chaincode query

chill37 (Tue, 23 Apr 2019 12:55:03 GMT):
or did you mean the one with endorser layout

chill37 (Tue, 23 Apr 2019 12:55:03 GMT):
https://ctrlv.it/id/174831/18613710

rickr (Tue, 23 Apr 2019 12:56:33 GMT):
is there an option for chaincode to chaincode ?

chill37 (Tue, 23 Apr 2019 12:56:34 GMT):
mycc2: https://ctrlv.it/id/174832/1659874682

chill37 (Tue, 23 Apr 2019 12:57:45 GMT):
well I made a chaincode function that invokes mycc2.query() or mycc2.invoke() function with response := stub.InvokeChaincode(anotherCCName, chainCodeArgs, anotherChannel)

chill37 (Tue, 23 Apr 2019 12:57:45 GMT):
well I made a chaincode function that invokes mycc2.query() or mycc2.invoke() function with response := stub.InvokeChaincode(anotherCCName, chainCodeArgs, anotherChannel) in my chaincode-exmaple.go

rickr (Tue, 23 Apr 2019 12:59:00 GMT):
on the command line there must be a chaincode mycc then mycc2

rickr (Tue, 23 Apr 2019 12:59:39 GMT):
Can you also rerun the sdk with trace and include the peer trace too

chill37 (Tue, 23 Apr 2019 13:03:11 GMT):
I did the trace log with -Dlogging.level.org.hyperledger.fabric.sdk=trace so peer is there too... or did you want protos.peer/?

rickr (Tue, 23 Apr 2019 13:04:07 GMT):
fabric peer's log

chill37 (Tue, 23 Apr 2019 13:06:46 GMT):
peer: https://ctrlv.it/id/174833/130118697

chill37 (Tue, 23 Apr 2019 13:06:46 GMT):
peer: https://ctrlv.it/id/174833/130118697 hold on this is only info and above

rickr (Tue, 23 Apr 2019 13:10:40 GMT):
@yacovm can you tell if the sdk is sending this request ok https://ctrlv.it/id/174833/130118697 2019-04-23 12:18:41.076 UTC [discovery] chaincodeQuery -> ERRO 2362 Failed constructing descriptor for chaincode chaincodes: chaincodes: ,: cannot satisfy any principal combination

rickr (Tue, 23 Apr 2019 13:11:25 GMT):
@chill37 do you have anchor peers defined in your network ?

chill37 (Tue, 23 Apr 2019 13:12:15 GMT):
yes. I'm basically using first network...modifying just a little. MSP1Anchor.tx and msp2anchor.tx is there and updated

chill37 (Tue, 23 Apr 2019 13:13:36 GMT):
this log is there when I do BYFN up . ################################################################# ####### Generating anchor peer update for Org1MSP ########## ################################################################# + configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP

rickr (Tue, 23 Apr 2019 13:16:57 GMT):
ok that produces a file Org1MSPanchors.tx you then need to use that to do the actual update .. I assume your doing that

chill37 (Tue, 23 Apr 2019 13:18:47 GMT):
yes. I didn't change that part from the byfn peer log in debug at that fail moment: https://ctrlv.it/id/174834/872116487

chill37 (Tue, 23 Apr 2019 13:21:19 GMT):
here is the update part Updating anchor peers for org1... + peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem + res=0 + set +x 2019-04-23 13:21:02.305 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized 2019-04-23 13:21:02.343 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update ===================== Anchor peers updated for org 'Org1MSP' on channel 'mychannel' ===================== Updating anchor peers for org2... + peer channel update -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem + res=0 + set +x 2019-04-23 13:21:05.456 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized 2019-04-23 13:21:05.487 UTC [channelCmd] update -> INFO 002 Successfully submitted channel update ===================== Anchor peers updated for org 'Org2MSP' on channel 'mychannel' =====================

rickr (Tue, 23 Apr 2019 13:23:32 GMT):
@yacovm > https://ctrlv.it/id/174834/872116487 can you look at this? See if SDK is sending request ok. As a novice on the peer code it looks ok. Result is no endorsement however.

chill37 (Tue, 23 Apr 2019 13:24:17 GMT):
Thanks @rickr and @yacovm for helping out!

sejalpawar (Tue, 23 Apr 2019 13:24:18 GMT):
@rickr I have followed the method for test execution and tried commands "mvn install" and "mvn package"..

rickr (Tue, 23 Apr 2019 13:25:03 GMT):
Whats the final output if you `mvn clean install` ?

sejalpawar (Tue, 23 Apr 2019 13:29:43 GMT):
@rickr output: https://hastebin.com/ejaxihecux.cs

rickr (Tue, 23 Apr 2019 13:38:43 GMT):
was that it ?

sejalpawar (Tue, 23 Apr 2019 13:40:33 GMT):
Yes, it stopped on that for atleast a couple of minutes

rickr (Tue, 23 Apr 2019 13:42:30 GMT):
did not go on .. are you running this on a virtual machine ?

sejalpawar (Tue, 23 Apr 2019 13:42:37 GMT):
AWS

sejalpawar (Tue, 23 Apr 2019 13:42:55 GMT):
t3.medium instance

rickr (Tue, 23 Apr 2019 13:44:16 GMT):
most likely not enough entropy http://giovannitorres.me/increasing-entropy-on-virtual-machines.html

rickr (Tue, 23 Apr 2019 13:48:25 GMT):
for now you could in org/hyperledger/fabric/sdk/identity/IdemixIdentitiesTest.java add ignore : @Ignore public class IdemixIdentitiesTest {

rickr (Tue, 23 Apr 2019 13:49:11 GMT):
if you're not doing Idemix stuff should be ok. otherwise you'll need to fix the entropy on the machine

sejalpawar (Tue, 23 Apr 2019 13:54:18 GMT):
It shows the same error after increasing entropy

sejalpawar (Tue, 23 Apr 2019 13:55:22 GMT):
Wait.. it finished execution this time

sejalpawar (Tue, 23 Apr 2019 13:56:37 GMT):
https://hastebin.com/wehimojelo.cs

sejalpawar (Tue, 23 Apr 2019 13:56:44 GMT):
new output

sejalpawar (Tue, 23 Apr 2019 13:59:22 GMT):
Steps I took for running tests:

sejalpawar (Tue, 23 Apr 2019 13:59:24 GMT):
docker rm -f $(docker ps -aq) docker volume prune --force docker network prune --force rm -rf test.properties git clone https://github.com/hyperledger/fabric-sdk-java.git cd fabric-sdk-java/src/test/fixture/sdkintegration ./fabric.sh clean ./fabric.sh restart cd ../../../../ mvn clean install

sejalpawar (Tue, 23 Apr 2019 14:00:56 GMT):
Environment: openjdk version "1.8.0_191", docker version 18.09, docker-compose version 1.71.1

rickr (Tue, 23 Apr 2019 14:08:48 GMT):
says build success

Antimttr (Tue, 23 Apr 2019 14:40:31 GMT):
@rickr what would be a good way with the java sdk to check for chaincode instantiation?

Antimttr (Tue, 23 Apr 2019 14:40:45 GMT):
I know how to check for installation using queryInstalledChaincodes()

rickr (Tue, 23 Apr 2019 14:49:43 GMT):
Should be covered in the integration tests

Antimttr (Tue, 23 Apr 2019 14:50:47 GMT):
well

Antimttr (Tue, 23 Apr 2019 14:50:50 GMT):
it is and it isnt

Antimttr (Tue, 23 Apr 2019 14:51:00 GMT):
see the integration tests actualy send out the transaction proposals

Antimttr (Tue, 23 Apr 2019 14:51:15 GMT):
and they test to verify that the proposal was accepted by the orderer(s)

Antimttr (Tue, 23 Apr 2019 14:51:22 GMT):
but what if you dont have the proposal?

Antimttr (Tue, 23 Apr 2019 14:51:25 GMT):
how to test then?

rickr (Tue, 23 Apr 2019 14:51:39 GMT):
What integration test have you took the time to walk through ?

Antimttr (Tue, 23 Apr 2019 14:51:49 GMT):
end2endit and the other one

Antimttr (Tue, 23 Apr 2019 14:52:08 GMT):
servicediscoveryit

Antimttr (Tue, 23 Apr 2019 14:52:08 GMT):
updatechannel

rickr (Tue, 23 Apr 2019 14:53:57 GMT):
@Antimttr End2endAndBackAgainIT.java ?

Antimttr (Tue, 23 Apr 2019 14:54:07 GMT):
ill check that one

sejalpawar (Tue, 23 Apr 2019 14:54:32 GMT):
@rickr what about the line couldn't find file /home/ubuntu/test.properties? Is it an error that's supposed to occur or is it an error that occurs but we can ignore?

Antimttr (Tue, 23 Apr 2019 14:55:38 GMT):
` private static boolean checkInstantiatedChaincode` there it is!

rickr (Tue, 23 Apr 2019 14:56:17 GMT):
@sejalpawar

rickr (Tue, 23 Apr 2019 14:56:20 GMT):

Clipboard - April 23, 2019 10:56 AM

sejalpawar (Tue, 23 Apr 2019 15:00:30 GMT):
Thanks @rickr !

yacovm (Tue, 23 Apr 2019 15:19:44 GMT):
@chill37 @rickr I have a bug :(

yacovm (Tue, 23 Apr 2019 15:20:44 GMT):
the reduce function doesn't work well when the input to it is 2 sets that are identical

yacovm (Tue, 23 Apr 2019 15:24:09 GMT):
i'll fix it soon and push a fix

rickr (Tue, 23 Apr 2019 15:41:39 GMT):
`I have a bug` I'm going to record this for posterity !! LOL :wink:

yacovm (Tue, 23 Apr 2019 15:42:19 GMT):
hey even god makes mistakes

yacovm (Tue, 23 Apr 2019 15:43:50 GMT):
@chill37 can you open a JIRA please? http://jira.hyperledger.org/

rickr (Tue, 23 Apr 2019 15:43:54 GMT):
Thanks for help, Amen :pray_tone1:

rickr (Tue, 23 Apr 2019 15:43:54 GMT):
Thanks for the help, Amen :pray_tone1:

Antimttr (Tue, 23 Apr 2019 16:16:51 GMT):
@rickr correct me if i'm wrong but if you're using nodejs chaincode, then a call to private static boolean checkInstalledChaincode(HFClient client, Peer peer, String ccName, String ccPath, String ccVersion) shoudl contain a blank ccPath, since nodejs doesnt allow you to set a chaincode path when you're installing it originally, right?

Antimttr (Tue, 23 Apr 2019 16:16:51 GMT):
@rickr correct me if i'm wrong but if you're using nodejs chaincode, then a call to `private static boolean checkInstalledChaincode(HFClient client, Peer peer, String ccName, String ccPath, String ccVersion)` should contain a blank ccPath, since nodejs doesnt allow you to set a chaincode path when you're installing it originally, right?

Antimttr (Tue, 23 Apr 2019 16:17:35 GMT):
atleast I'm getting a blank chaincode path when i retrieve the chaincode info object from the client

Antimttr (Tue, 23 Apr 2019 16:17:49 GMT):
i assume its because im using nodejs chaincode

Antimttr (Tue, 23 Apr 2019 16:18:42 GMT):
and even though i set this: `installProposalRequest.setChaincodeSourceLocation(Paths.get(chaincodePath).toFile());` it doesn't actually mean i'm setting a chaincodePath like you would with java chaincode

yacovm (Tue, 23 Apr 2019 16:47:50 GMT):
@rickr @chill37 https://gerrit.hyperledger.org/r/#/c/31068/

rickr (Tue, 23 Apr 2019 17:18:00 GMT):
@Antimttr Not clear what your asking. When installing chaincode only GO type chaincode needs a chaincode path.

rickr (Tue, 23 Apr 2019 17:19:18 GMT):
which is really the GOPATH. Node and Java have no concept of that.

Antimttr (Tue, 23 Apr 2019 18:52:09 GMT):
@rickr when I call 'chaincodeIDBuilder.setPath(chaincodePath);' during installation of chaincode on a nodejs chaincode type it throws an exception

Antimttr (Tue, 23 Apr 2019 18:52:09 GMT):
@rickr when I call `chaincodeIDBuilder.setPath(chaincodePath);` during installation of chaincode on a nodejs chaincode type it throws an exception

Antimttr (Tue, 23 Apr 2019 18:52:16 GMT):
says that i shouldnt set the path for node chaincode

Antimttr (Tue, 23 Apr 2019 18:52:27 GMT):
so i only set the path if its not node

Antimttr (Tue, 23 Apr 2019 18:53:45 GMT):
then later, when im reading my chaincodeinfo object, for the nodejs chaincode the getPath() returns an empty string

rickr (Tue, 23 Apr 2019 19:02:21 GMT):
ok

rickr (Tue, 23 Apr 2019 19:02:55 GMT):
that's what the Fabric returns if you don't set it.

chill37 (Wed, 24 Apr 2019 00:21:13 GMT):
@yacovm @rickr Thanks yacovm. I just saw the msg about opening up the JIRA(different timezone. just came back to office). Saw that you've already opened and fixed the code Thank you both for taking time to check on it! :pray:

anjalinaik (Wed, 24 Apr 2019 05:52:44 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=uNijkMWyNsSGuiLa5) @rickr yes I meant, Can we prevent a specific user from seeing a chaincode event.

anjalinaik (Wed, 24 Apr 2019 05:53:23 GMT):
Hi Team, is there a sample code for adding an organization dynamically to the channel using fabric-java-sdk

yyyyyyy9 (Wed, 24 Apr 2019 07:24:07 GMT):
Has left the channel.

JorgeNavarro (Wed, 24 Apr 2019 07:34:15 GMT):
Hello, someone has a basic example that explains how to create a channel with java sdk 1.3?

AndresMartinezMelgar.itcl (Wed, 24 Apr 2019 07:36:42 GMT):
Hi, if i have a 1.3 network version,can i use 1.0v from sdk?

yacovm (Wed, 24 Apr 2019 07:45:19 GMT):
@chill37 I merged the fix to all branches from 1.2 to the latest branch

rickr (Wed, 24 Apr 2019 11:08:49 GMT):
@anjalinaik I don't think so. If there is it would be a Fabric server config. I'd ask on #fabric-questions or #fabric-peer-endorser-committer

rickr (Wed, 24 Apr 2019 11:10:51 GMT):
@JorgeNavarro Nothing has changed on the SDK side. You need to create an orderer block using configtx tool It documented in the README.md

rickr (Wed, 24 Apr 2019 11:13:00 GMT):
@AndresMartinezMelgar.itcl Nothing that's ever tested. The expectation your app moves up with SDK version to match fabric. The SDK offers some _backward_ compatibility

AndresMartinezMelgar.itcl (Wed, 24 Apr 2019 11:40:30 GMT):
@rickr Thanks

anjalinaik (Thu, 25 Apr 2019 04:07:18 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=4ha6JjQ5yg84at6QQ) @rickr thankyou :smiley:

anjalinaik (Thu, 25 Apr 2019 05:08:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=D4iDXc8psaziXxNSx) @rickr how about this? Do we have a sample code for dynamic addition of orgs to a channel.

chill37 (Thu, 25 Apr 2019 05:19:56 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=LfR28s6c8av4MssTk) @yacovm I saw the updates. thanks!

AndresMartinezMelgar.itcl (Thu, 25 Apr 2019 06:23:51 GMT):
The variable "properties" of "Peer peer = client.new Peer (name, grpc URL, properties);" To which it refers? I know I have to create an object properties, but what do I have to put inside it?

bilalahmed (Thu, 25 Apr 2019 06:48:42 GMT):
Here is sample properties object: Properties peerProperties = new Properties(); peerProperties.setProperty("sslProvider", "openSSL"); peerProperties.setProperty("negotiationType", "TLS"); peerProperties.setProperty("trustServerCertificate", "true"); //testing environment only NOT FOR PRODUCTION! peerProperties.setProperty("hostnameOverride", "peer0.org1.example.com"); peerProperties.setProperty("pemFile", "/Users/BAY/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt");

bilalahmed (Thu, 25 Apr 2019 06:50:24 GMT):
please update accordingly

AndresMartinezMelgar.itcl (Thu, 25 Apr 2019 06:50:25 GMT):
@bilalahmed so properties doesnt come from any file?

bilalahmed (Thu, 25 Apr 2019 06:51:16 GMT):
it depends, you can specify properties/configs in some JSON/YAML file and read from that file to populate this properties object

bilalahmed (Thu, 25 Apr 2019 06:51:42 GMT):
please refer to the SDK Integration tests

AndresMartinezMelgar.itcl (Thu, 25 Apr 2019 06:52:08 GMT):
ok thx

bilalahmed (Thu, 25 Apr 2019 06:53:16 GMT):
you are welcome, lemme know if you further need any help as I recently worked with it so familiar with possible issues one encounters while implementing it.

anjalinaik (Thu, 25 Apr 2019 10:47:56 GMT):
Can anyone please guide me with below error. I have a network configured for a single organization with 2 peers in it. I have installed private_data_cc.go to verify private data. I have defined the collection.yaml file for all the members in org1. Yet i am unable to query data from org1peer2. [able to query data from org1peer1] .org1peer2 logs: ``` 2019-04-25 10:40:05.166 UTC [ledgermgmt] CreateLedger -> INFO 0fa Creating ledger [mychan] with genesis block 2019-04-25 10:40:05.346 UTC [ledgermgmt] CreateLedger -> INFO 0fb Created ledger [mychan] with genesis block 2019-04-25 10:40:05.364 UTC [gossip/state] NewGossipStateProvider -> INFO 0fc Updating metadata information, current ledger sequence is at = 0, next expected block is = 1 2019-04-25 10:40:11.367 UTC [gossip/service] func1 -> INFO 0fd Elected as a leader, starting delivery service for channel mychan 2019-04-25 10:42:00.587 UTC [gossip/privdata] StoreBlock -> INFO 0fe [mychan] Received block [1] from buffer 2019-04-25 10:43:38.203 UTC [gossip/privdata] StoreBlock -> INFO 0ff [mychan] Received block [2] from buffer 2019-04-25 10:43:42.549 UTC [gossip/privdata] StoreBlock -> INFO 100 [mychan] Received block [3] from buffer 2019-04-25 10:43:46.449 UTC [endorser] ProcessProposal -> ERRO 101 [mychan][1cd2661f] simulateProposal() resulted in chaincode name:"privi" response status 500 for txid: 1cd2661f2065360b5d6ad34c2379765d30296f65b494b964501ce044cbe6a0da 2019-04-25 10:43:46.600 UTC [gossip/privdata] fetchPrivateData -> WARN 102 Do not know any peer in the channel( mychan ) that matches the policies , aborting 2019-04-25 10:43:46.600 UTC [gossip/privdata] fetchFromPeers -> WARN 103 Failed fetching private data for block 3 from peers: Empty membership 2019-04-25 10:43:51.606 UTC [gossip/privdata] fetchPrivateData -> WARN 104 Do not know any peer in the channel( mychan ) that matches the policies , aborting 2019-04-25 10:43:51.606 UTC [gossip/privdata] fetchFromPeers -> WARN 105 Failed fetching private data for block 3 from peers: Empty membership 2019-04-25 10:43:56.611 UTC [gossip/privdata] fetchPrivateData -> WARN 106 Do not know any peer in the channel( mychan ) that matches the policies , aborting 2019-04-25 10:43:56.611 UTC [gossip/privdata] fetchFromPeers -> WARN 107 Failed fetching private data for block 3 from peers: Empty membership ```

AndresMartinezMelgar.itcl (Thu, 25 Apr 2019 11:09:26 GMT):

Clipboard - April 25, 2019 1:08 PM

Fias (Fri, 26 Apr 2019 06:55:12 GMT):
Has joined the channel.

darapich92 (Fri, 26 Apr 2019 07:06:09 GMT):
hello everybody, today i try to instantiate Java Chaincode in the fabric java sdk 1.4.0. i got success from peers admin but when i instantiate this chaincode to Channel i receive message "Java chaincode is work-in-progress and disabled" and receive status Failure, Could you explain me Why?

rickr (Fri, 26 Apr 2019 11:54:09 GMT):
@AndresMartinezMelgar.itcl Please take not sdk issue to related channel #fabric-questions maybe?

rickr (Fri, 26 Apr 2019 11:54:09 GMT):
@AndresMartinezMelgar.itcl Please take non sdk issue to related channel #fabric-questions maybe?

rickr (Fri, 26 Apr 2019 11:56:52 GMT):
@darapich92 You must be going against a later Fabric version. I think java chaincode came in 1.3. If you are running that or later then ask on #fabric-java-chaincode

rickr (Fri, 26 Apr 2019 11:58:50 GMT):
@anjalinaik Best asked on #fabric-peer-endorser-committer

darapich92 (Fri, 26 Apr 2019 15:22:39 GMT):
@rickr thank you very much for your information.

ZLL (Sat, 27 Apr 2019 12:10:19 GMT):
How can fabric-sdk-java dynamically add node organization channel ? Is there a sample for reference?

pdintchev (Sat, 27 Apr 2019 17:39:06 GMT):
Has joined the channel.

tsnyder (Sun, 28 Apr 2019 10:46:13 GMT):
I have a network config of 5 Peers with 2 channels across a differing subset of the Peers. I am using Fabric 1.4.1, Java SDK, and have Service Discovery and the Eventing Services working within the client app. My question relates to periodically refreshing the Service Discovery info. Currently the service discovery happens within .initialize(). Is there a way of refreshing the channel information without tearing it down and calling initialize again? To do this I need to shutdown the channel, remove my BlockListeners and recreate everything again.

APelser (Sun, 28 Apr 2019 17:49:09 GMT):
Has joined the channel.

APelser (Sun, 28 Apr 2019 18:11:25 GMT):
Hello people! I have set up a TLS-enable Hyperledger network on one machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen, Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org0.example.com (...)"). When using the Java SDK (version 1.4.1 from Maven) however, I can only let the _first_ peer of the _first_ organisation validate my proposals (this is also the peer for which there is no port mapping).The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine),

APelser (Sun, 28 Apr 2019 18:53:52 GMT):
Hello people! I have set up a TLS-enables Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org0.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the _first_ peer of the _first_ organisation validate them (this is also the peer for which there is no port mapping, but I've tried changing ports, to no avail). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query (`Channel.queryByChaincode`), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org0.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so. I've already tried using ports 7051/7053 for all peers though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query (`Channel.queryByChaincode`), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: tlsca.example.com-cert.pem (for the orderer), ca.org.example.com-cert.pem (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so. I've already tried using ports 7051/7053 for all peers though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query (`Channel.queryByChaincode`), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: tlsca.example.com-cert.pem (for the orderer), ca.org.example.com-cert.pem (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so - for all other peers, an error occurs (see down below). I've already tried using ports 7051/7053 for all peers though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query (`Channel.queryByChaincode`), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: tlsca.example.com-cert.pem (for the orderer), ca.org.example.com-cert.pem (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so - for all other peers, an error occurs (see down below). I've already tried addressing all peers using ports 7051/7053 though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query (`Channel.queryByChaincode`), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: tlsca.example.com-cert.pem (for the orderer), ca.org.example.com-cert.pem (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so - for all other peers, an error occurs (see down below). I've already tried addressing all peers using ports 7051/7053 though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query ( `Channel.queryByChaincode` ), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: tlsca.example.com-cert.pem (for the orderer), ca.org.example.com-cert.pem (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so - for all other peers, an error occurs (see down below). I've already tried addressing all peers using ports 7051/7053 though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query ( `Channel.queryByChaincode` ), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: `tlsca.example.com-cert.pem` (for the orderer), `ca.org.example.com-cert.pem` (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so - for all other peers, an error occurs (see down below). I've already tried addressing all peers using ports 7051/7053 though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query ( `Channel.queryByChaincode` ), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: `tlsca.example.com-cert.pem` (for the orderer), `ca.org.example.com-cert.pem` (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these files are correct though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

APelser (Sun, 28 Apr 2019 19:46:12 GMT):
Hello people! I have set up a TLS-enabled Hyperledger network on a single physical machine, using Fabric 1.4.1 with Java chaincode. Cryptographic materials were generated using cryptogen and Docker is used for running the network components. Everything works absolutely fine when using CLI commands (e.g. "docker exec peer0.org.example.com (...)"). My goal is to use the Java SDK (version 1.4.1 from Maven) to connect to an existing channel, possibly with pre-generated crypto-materials, and query/invoke the (already installed/instantiated, and functioning chaincode). However, when the time comes to get my proposals validated, I can only let the peer that doesn't have its ports mapped do so - for all other peers, an error occurs (see down below). I've already tried addressing all peers using ports 7051/7053 though, to no avail (different errors, basically telling me the host can't be found). The steps I'm taking are: enrolling an admin with the CA (goes fine), registering and enrolling a user with the CA (goes fine), creating a new channel through `HFClient.newChannel`, adding peers and orderers to it, sending a query ( `Channel.queryByChaincode` ), and then waiting a second before reading the response. The following error is produced when calling `ProposalResponse.getChaincodeActionResponsePayload()`: `gRPC failure=Status{code=UNKNOWN, description=channel closed, cause=java.nio.channels.ClosedChannelException}`. During channel setup, the PEM-files I am providing are: `tlsca.example.com-cert.pem` (for the orderer), `ca.org.example.com-cert.pem` (for the CA) and `crypto-config/peerOrganizations/org.example.com/peers/peer.org.example.com/tls/server.crt` (for the peers). I am not sure if these are the correct files though. I've already tried digging through the docker container logs, but I found nothing, not even a warning. Does anyone have any idea what the cause of this error could possibly be (and why the error message has to be this unclear)? If needed I can provide all relevant files. Thanks very much in advance for all help.

AndresMartinezMelgar.itcl (Mon, 29 Apr 2019 09:12:32 GMT):
hello, in order to install and instantiate a java chaincode whit JAVA-SDK within the kubernetes cluster, do I need to implement a "fabric-javaenv" docker?

rickr (Mon, 29 Apr 2019 11:54:51 GMT):
@ZLL I don't know of a sample. The fabric should IMO document what needs to be done as it's not specific to the any SDK. UpdateChannelIT.java does show for the most simplistic change of a channel parameter (Batch size) changing. You'd roughly be doing that with I think the system channel.

rickr (Mon, 29 Apr 2019 12:08:58 GMT):
@tsnyder https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Config.java#L460 https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5159-L5169

rickr (Mon, 29 Apr 2019 12:15:57 GMT):
@APelser Some configuration issue I'm thinking which is hard to determine from just a description. But If you are creating the channel via the SDK then *joining* the peers via the sdk .. if this is a connection configuration issue .. how is that working ?

rickr (Mon, 29 Apr 2019 12:19:01 GMT):
@AndresMartinezMelgar.itcl I don't think so .. on production (GA'ed) It's been my experience that the peer will pull it down for you. @gennadyl

rickr (Mon, 29 Apr 2019 12:19:01 GMT):
@AndresMartinezMelgar.itcl I don't think so .. on production (GA'ed) It's been my experience that the peer will pull the javaenv down for you. @gennadyl

rickr (Mon, 29 Apr 2019 12:29:15 GMT):
@APelser if its a connection issue try looking at `openssl s_client -connect l` to get connection as an independent test .. it also usually gives back better error messages than grpc/ssl connection do.

rickr (Mon, 29 Apr 2019 12:29:15 GMT):
@APelser if its a connection issue try looking at `openssl s_client -connect ` to get connection as an independent test .. it also usually gives back better error messages than grpc/ssl connection do. google openssl s_client

APelser (Mon, 29 Apr 2019 13:53:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=h8bnHqQHc544KKyci) @rickr I don't think I am joining the peers, I am calling `Channel.addPeer()`/`Channel.addEventhub()`, and finally `Channel.initialize()` , as is done in the example I found online. As far as I understand, this is not the same as sending a join proposal - but please correct me if I'm wrong. Also, I actually managed to get things working by mapping _all_ ports to themselves in peers (7051->7051 in peer0, 7101->7101 in peer1, and so on) in the docker-compose file. I honestly have no idea why this would work better than what I did before (7051->7051 for peer0, 7101->7051 for peer1, ...). I'm not 100% sure this is a proper solution though, since mapping ports to themselves just feels silly - but maybe that's just due a lack of knowledge, of course. Any chance you could explain/know of a resource that will teach me how the ports used in the docker environment variables (CORE_PEER_ADDRESS, CORE_PEER_CHAINCODELISTENADDRESS, and so on) should relate to the port mappings? I thought I had this covered, since it was working without the Java SDK, but I clearly missed something. If you wish I can send the docker-compose file I am currently producing when I run the network.

APelser (Mon, 29 Apr 2019 13:53:19 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=h8bnHqQHc544KKyci) @rickr I don't think I am joining the peers, I am calling `Channel.addPeer()` / `Channel.addEventhub()`, and finally `Channel.initialize()` , as is done in the example I found online. As far as I understand, this is not the same as sending a join proposal - but please correct me if I'm wrong. Also, I actually managed to get things working by mapping _all_ ports to themselves in peers (7051->7051 in peer0, 7101->7101 in peer1, and so on) in the docker-compose file. I honestly have no idea why this would work better than what I did before (7051->7051 for peer0, 7101->7051 for peer1, ...). I'm not 100% sure this is a proper solution though, since mapping ports to themselves just feels silly - but maybe that's just due a lack of knowledge, of course. Any chance you could explain/know of a resource that will teach me how the ports used in the docker environment variables (CORE_PEER_ADDRESS, CORE_PEER_CHAINCODELISTENADDRESS, and so on) should relate to the port mappings? I thought I had this covered, since it was working without the Java SDK, but I clearly missed something. If you wish I can send the docker-compose file I am currently producing when I run the network.

APelser (Mon, 29 Apr 2019 14:09:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eYdxnf7bjCNTjwzHQ) @rickr Thanks, I didn't know of this command before. Using it revealed that "there is no peer certificate available" at the address that I would expect peer1 to listen on. This certificate is available when I use the solution/workaround I mentioned in my previous post, so I think this explains the error - the SSL handshake can't take place.

APelser (Mon, 29 Apr 2019 14:09:12 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=eYdxnf7bjCNTjwzHQ) @rickr Thanks, I didn't know of this command before. Using it revealed that there is "no peer certificate available" at the address that I would expect peer1 to listen on. This certificate is available when I use the solution/workaround I mentioned in my previous post, so I think this explains the error - the SSL handshake can't take place.

darapich92 (Mon, 29 Apr 2019 15:04:47 GMT):
hello everybody, today i am trying to run Junit test with End2endIT.class but when i enroll user, i got error in `HFCAInfo info = ca.info();` and got this message `org.hyperledger.fabric_ca.sdk.exception.InfoException: Url:http://localhost:7054, Failed to get info` . could anybody tell me why? or localhost:7054 is offline?

ZLL (Tue, 30 Apr 2019 04:11:53 GMT):
@rickr Thanks, I found this file, but I am using Fabric 1.0. Although I can't use it now, thank you for your answer.

tsnyder (Tue, 30 Apr 2019 07:14:26 GMT):
@rickr Thanks. Regarding the Service Discovery. When sending a transaction Proposal do you need to be using the channel.sendTransactionProposalToEndorsers(TransactionProposalRequest transactionProposalRequest, DiscoveryOptions discoveryOptions) method, or will any sendTransactionProposal method work to use updated Service Discovery info?

rickr (Tue, 30 Apr 2019 11:55:16 GMT):
@tsnyder I you're using SD you should be using that method for your endorsements.

sejalpawar (Tue, 30 Apr 2019 13:52:52 GMT):
@rickr Hey, is there support for Auditor in Idemix in Fabric Java sdk?

vhulendamoraba (Wed, 01 May 2019 01:05:55 GMT):
Has joined the channel.

darapich92 (Wed, 01 May 2019 14:14:44 GMT):
hi everybody, i wonder when i start fabric.sh up, i saw a command `Starting server in home directory: /etc/hyperledger/fabric-ca-server` but i could not find that file in that directory. do you know where is it?

rickr (Wed, 01 May 2019 16:27:01 GMT):
Probably in the docker container running the fabric-ca

Antimttr (Wed, 01 May 2019 17:16:23 GMT):
Is there any reason why or how a registrar could successfully enroll a user, but then the same registrar user fails this call: `identities = ca.getHFCAIdentities(orgAdmin);` ?

Antimttr (Wed, 01 May 2019 17:16:45 GMT):
Got this result: `[HTTP Status Code: 401] - Error while getting all users from url 'https://localhost:8054': GET request to https://localhost:8054 failed request body . Response: {"result":"","errors":[{"code":20,"message":"Authentication failure"}`

Antimttr (Wed, 01 May 2019 17:17:06 GMT):
yet the same registrar user is able to register new users just fine

Antimttr (Wed, 01 May 2019 17:17:30 GMT):
confirmed name and secret are the same as defined in network-config.yaml

rickr (Wed, 01 May 2019 17:19:22 GMT):
@skarim ^^^

skarim (Wed, 01 May 2019 17:24:37 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WxnMjFfaG9hFA6FKp) @Antimttr The read the docs on listing identities describes the authorization checks that are performed. Please refer to: https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html#dynamically-updating-identities The two things you should check to see if you can get a particular user are type and affiliation.

Antimttr (Wed, 01 May 2019 17:35:05 GMT):
@skarim according to the javadoc for getHFCAIdentities() should ` gets all identities that the registrar is allowed to see` so in my case i tried to use the registered org admin so it should see all the registered users in the org

Antimttr (Wed, 01 May 2019 17:36:46 GMT):
atleast thats what it does when i use the same operation with the node sdk

Antimttr (Wed, 01 May 2019 19:31:10 GMT):
why would a registrar which works fine to register and enroll new identities not be allowed to list them

Antimttr (Wed, 01 May 2019 19:31:12 GMT):
it makes no sense

Antimttr (Wed, 01 May 2019 21:19:41 GMT):
@skarim so i can get the identity lists with the client this way: `/fabric-ca-client identity list -u https://admin:adminpw@ca.org2.example.com:8054 --tls.certfiles /home/mwest/go/src/github.com/hyperledger/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem Name: admin, Type: client, Affiliation: , Max Enrollments: -1, Attributes: [{Name:hf.Registrar.Attributes Value:* ECert:false} {Name:hf.AffiliationMgr Value:1 ECert:false} {Name:hf.Registrar.Roles Value:* ECert:false} {Name:hf.Registrar.DelegateRoles Value:* ECert:false} {Name:hf.Revoker Value:1 ECert:false} {Name:hf.IntermediateCA Value:1 ECert:false} {Name:hf.GenCRL Value:1 ECert:false}`

Antimttr (Wed, 01 May 2019 21:19:41 GMT):
@skarim so i can get the identity lists with the client this way: ```/fabric-ca-client identity list -u https://admin:adminpw@ca.org2.example.com:8054 --tls.certfiles /home/mwest/go/src/github.com/hyperledger/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem Name: admin, Type: client, Affiliation: , Max Enrollments: -1, Attributes: [{Name:hf.Registrar.Attributes Value:* ECert:false} {Name:hf.AffiliationMgr Value:1 ECert:false} {Name:hf.Registrar.Roles Value:* ECert:false} {Name:hf.Registrar.DelegateRoles Value:* ECert:false} {Name:hf.Revoker Value:1 ECert:false} {Name:hf.IntermediateCA Value:1 ECert:false} {Name:hf.GenCRL Value:1 ECert:false}```

Antimttr (Wed, 01 May 2019 21:20:20 GMT):
however doing the same command through the sdk fails

Antimttr (Wed, 01 May 2019 21:20:33 GMT):
as i detailed above

Antimttr (Wed, 01 May 2019 21:23:07 GMT):
as far as i can tell the admin user is a valid registrar

Antimttr (Wed, 01 May 2019 21:23:17 GMT):
if im interperating that correctly

Antimttr (Wed, 01 May 2019 21:28:01 GMT):
@rickr is there any way through the sdk to specify a cert file for the user like i did with the command line client?

Antimttr (Wed, 01 May 2019 21:28:30 GMT):
all the user object has is its own Enrollment object which i dunno if thats the same data as the tls cert file but perhaps that's what it needs?

Antimttr (Wed, 01 May 2019 21:30:21 GMT):
``` Enrollment enroll = caClient.enroll(orgAdmin.getName(), config.GetAdminSecret(orgNum)); orgAdmin.setEnrollment(enroll); orgAdmin.setEnrollmentSecret(config.GetAdminSecret(orgNum)); orgAdmin.setMspId(org.getMSPID()); orgAdmin.setTlsCertPEM(enroll.getCert()); orgAdmin.setTlsKeyPEM(Crypto.getPEMStringFromPrivateKey(enroll.getKey())); orgAdmin.setEnrolled(true); orgAdmin.setType("CA_ADMIN"); org.setAdmin(orgAdmin); System.out.println("Admin username: " + orgAdmin.getName() + " pass: " + orgAdmin.getEnrollmentSecret()); System.out.println("Printing Enrollment Data for Registrar: "); LedgerUserModel.outputEnrollmentAuth(orgAdmin, CryptoSuite.Factory.getCryptoSuite()); Collection identities = null; try { identities = caClient.getHFCAIdentities(orgAdmin); } catch(IdentityException ie) { System.out.println("ERROR: ListAllUsers: Identity Exception received: " + ie.getMessage()); } catch(InvalidArgumentException ie) { System.out.println("ERROR: ListAllUsers: Invalid registrar user passed: " + ie.getMessage()); }```

Antimttr (Wed, 01 May 2019 21:30:27 GMT):
here is the code from my client

Antimttr (Wed, 01 May 2019 21:30:51 GMT):
as you can see its literally enrolling the admin, then immediately using that enrollment object to query for identities

Antimttr (Wed, 01 May 2019 21:30:53 GMT):
and its failing

Antimttr (Wed, 01 May 2019 21:31:21 GMT):
however I can use the same user to register new identities with the same CA

Antimttr (Wed, 01 May 2019 21:37:24 GMT):
this is the result of that code: ``` INFO: Enrolling Admin for Org: Org2 Admin username: admin pass: adminpw Printing Enrollment Data for Registrar: User cert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNBVENDQWFpZ0F3SUJBZ0lVQk5VTVF1TnczTjBYcWkveExURXM1NDZrWXZvd0NnWUlLb1pJemowRUF3SXcKY3pFTE1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDa05oYkdsbWIzSnVhV0V4RmpBVUJnTlZCQWNURFZOaApiaUJHY21GdVkybHpZMjh4R1RBWEJnTlZCQW9URUc5eVp6SXVaWGhoYlhCc1pTNWpiMjB4SERBYUJnTlZCQU1UCkUyTmhMbTl5WnpJdVpYaGhiWEJzWlM1amIyMHdIaGNOTVRrd05UQXhNVGN3TmpBd1doY05NakF3TkRNd01UY3gKTVRBd1dqQWhNUTh3RFFZRFZRUUxFd1pqYkdsbGJuUXhEakFNQmdOVkJBTVRCV0ZrYldsdU1Ga3dFd1lIS29aSQp6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVvNHYrbUlYb3FCbzB3cE5LVzdJaGRtSkxOSU1jTWU4SDBUZ3ZlOStuCkRhNjNOa3BaVGp4dVAwekFzWXJZWkJFWks4RWlrbk9wSmtSOTFtaDJSaUU1dWFOc01Hb3dEZ1lEVlIwUEFRSC8KQkFRREFnZUFNQXdHQTFVZEV3RUIvd1FDTUFBd0hRWURWUjBPQkJZRUZDcW5xQmFCSm1TKzZ1SndaTFBDaVRtZwpTMFZYTUNzR0ExVWRJd1FrTUNLQUlLZlVmdnBHcHJvSGN3eUZEKzBzRTNYZkp6WU5jaWYwak53dmdPVUZaNEFGCk1Bb0dDQ3FHU000OUJBTUNBMGNBTUVRQ0lIQnA0eWhuQ1JFV0phRlR4UDZvYXRoOHJMaE5TNTZLUjk2WWlrUlUKb1VTQ0FpQXc5ZXRDVHNScEpCOUIrMVExL2Q2d2NvVG56WExCSC9ET3Zhb0NJZ1ZWeEE9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== User key: MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgR7CZweZmztSTrcg8/1k7A/fjDZFJRv0HJ3TovPjO552gCgYIKoZIzj0DAQehRANCAASji/6YheioGjTCk0pbsiF2Yks0gxwx7wfROC9736cNrrc2SllOPG4/TMCxithkERkrwSKSc6kmRH3WaHZGITm5 ERROR: ListAllUsers: Identity Exception received: [HTTP Status Code: 401] - Error while getting all users from url 'https://localhost:8054': GET request to https://localhost:8054 failed request body . Response: {"result":"","errors":[{"code":20,"message":"Authentication failure"} ],"messages":[],"success":false} ```

Antimttr (Wed, 01 May 2019 21:37:58 GMT):
as you can see the username and password are correct, and the enrollmen data exists

Antimttr (Wed, 01 May 2019 21:38:40 GMT):
does the sdk need to be configured to use tls? i mean all the other operations i send to it work fine

Antimttr (Wed, 01 May 2019 21:38:43 GMT):
its just this one operation

rickr (Wed, 01 May 2019 22:06:01 GMT):
Nothing with TLS because you got a 401. I think if you go log at the fabric_ca logs you'll see it's processing it. So please take those logs to the #fabric-ca channel and and first find out why it's not working. If they indicate the sdk is somehow sending the wrong request then we can look at here.

rickr (Wed, 01 May 2019 22:06:01 GMT):
Nothing with TLS because you got a 401. I think if you go look at the fabric_ca logs you'll see it's processing it. So please take those logs to the #fabric-ca channel and and first find out why it's not working. If they indicate the sdk is somehow sending the wrong request then we can look at here.

Antimttr (Wed, 01 May 2019 22:07:30 GMT):
by fabric_ca logs you mean the logs generated on the fabric_ca docker, correct?

rickr (Wed, 01 May 2019 22:07:46 GMT):
That would be them

Antimttr (Wed, 01 May 2019 22:07:58 GMT):
ok ill figure out how to get to them

rickr (Wed, 01 May 2019 22:09:52 GMT):
BTW make sure you're also using the latest SDK

Antimttr (Wed, 01 May 2019 22:10:21 GMT):
i think i dled it when it was 1.4.0

Antimttr (Wed, 01 May 2019 22:10:25 GMT):
i havent updated since then

Antimttr (Wed, 01 May 2019 22:10:41 GMT):
ill update to 1.4.1

Antimttr (Wed, 01 May 2019 22:17:56 GMT):
``` 2019/05/01 22:05:48 [DEBUG] Received request for /api/v1/identities?ca=ca-org2 2019/05/01 22:05:48 [DEBUG] Caller is using a x509 certificate 2019/05/01 22:05:48 [DEBUG] Failed to verify token based on new authentication header requirements: %!s() 2019/05/01 22:05:48 [DEBUG] Received identity update request from 2019/05/01 22:05:48 [INFO] 172.29.0.1:33242 GET /api/v1/identities?ca=ca-org2 401 25 "Invalid token in authorization header: Token signature validation failed" ```

Antimttr (Wed, 01 May 2019 22:18:06 GMT):
looks like it might have something to do with an old sdk going by line 3

Antimttr (Wed, 01 May 2019 22:27:55 GMT):
nm i just confirmed my client is using 1.4.1 sdk

Antimttr (Wed, 01 May 2019 22:28:14 GMT):
although the docker images might be 1.4.0....

Antimttr (Wed, 01 May 2019 22:29:34 GMT):
` [DEBUG] ca.Config: &{Version:1.4.0 Cfg:{Identities:{PasswordAttempts:10 AllowR...`

sejalpawar (Thu, 02 May 2019 09:39:53 GMT):
Hey I am trying to invoke a proposal using an idemix user and it shows the following error: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [mychannel] creator org [Org1IdemixMSP], cause=null}

sejalpawar (Thu, 02 May 2019 09:40:17 GMT):
My code for creating idemix enrollment:

sejalpawar (Thu, 02 May 2019 09:40:28 GMT):
UserContext idemixUser = new UserContext(); idemixUser.setName("idemixTestUser1"); RegistrationRequest rr = new RegistrationRequest(idemixUser.getName(), "org1"); String enrollmentSecret = ca_client.register(rr, caAdmin); String mspID = "Org1IdemixMSP"; Enrollment x509Enrollment = ca_client.enroll(idemixUser.getName(), enrollmentSecret); Enrollment idemixEnrollment = ca_client.idemixEnroll(x509Enrollment, mspID); idemixUser.setEnrollment(idemixEnrollment); idemixUser.setMspId("Org1IdemixMSP"); client.setUserContext(idemixUser);

sejalpawar (Thu, 02 May 2019 09:42:08 GMT):
I have included the idemix MSP in configtx.yaml and mounted the idemix IssuerPublicKey in $FABRIC_CA_HOME in docker container...

sejalpawar (Thu, 02 May 2019 09:42:27 GMT):
Any clues?

sejalpawar (Thu, 02 May 2019 09:46:07 GMT):
docker log: channel [mychannel]: creator certificate is not valid: Failed verifing with opts [&{ [] [{1 [111 114 103 49]} {2 1} {0 } {0 }] 3 [] 0 0xc0000b6938 0}]: signature invalid: APrime and ABar don't have the expected structure

mahoney1 (Thu, 02 May 2019 11:34:34 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android:https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - be great to hear from you later ! 🙂 regards Paul

Antimttr (Thu, 02 May 2019 16:05:34 GMT):
i made sure to upgrade my docker images to 1.4.1, didnt make any difference

Antimttr (Thu, 02 May 2019 16:53:01 GMT):
I confirmed all my crypto material is pointing to the correct files

Antimttr (Thu, 02 May 2019 16:53:40 GMT):
Comparing my previous log from fabric-ca to the log generated by the nodejs sdk: ``` 2019/05/02 16:02:29 [DEBUG] Received request for /api/v1/identities?ca=ca-org1 2019/05/02 16:02:29 [DEBUG] Caller is using a x509 certificate 2019/05/02 16:02:29 [DEBUG] Failed to verify token based on new authentication header requirements: %!s() 2019/05/02 16:02:29 [DEBUG] Checking for revocation/expiration of certificate owned by 'admin' 2019/05/02 16:02:29 [DEBUG] DB: Get certificate by serial (5657cacd7d4fdfed0b98b6bde267a46909c336fa) and aki (e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011) 2019/05/02 16:02:29 [DEBUG] DB: Getting identity admin 2019/05/02 16:02:29 [DEBUG] Successful token authentication of 'admin' 2019/05/02 16:02:29 [DEBUG] Received identity update request from admin 2019/05/02 16:02:29 [DEBUG] Processing identity configuration update request 2019/05/02 16:02:29 [DEBUG] Processing GET all IDs request 2019/05/02 16:02:29 [DEBUG] Requesting all identities that the caller is authorized view 2019/05/02 16:02:29 [DEBUG] Checking to see if caller 'admin' is a registrar 2019/05/02 16:02:29 [DEBUG] DB: Get all identities per affiliation '' and types '*' 2019/05/02 16:02:29 [DEBUG] Number of identities to be delivered in each chunk: 100 2019/05/02 16:02:29 [INFO] 172.31.0.1:48638 GET /api/v1/identities?ca=ca-org1 200 0 "OK" ```

Antimttr (Thu, 02 May 2019 16:54:12 GMT):
seems like the nodejs sdk also gets that message

Antimttr (Thu, 02 May 2019 16:54:24 GMT):
but simply carries on and continues to get the requested data

Antimttr (Thu, 02 May 2019 16:54:35 GMT):
where as the javasdk just stops after that 3rd line

rickr (Thu, 02 May 2019 17:54:30 GMT):
put the jsdk in trace mode logging and the CA output full!! and paste to https://ctrlv.it/ @skarim

rickr (Thu, 02 May 2019 17:54:30 GMT):
put the jsdk in trace mode logging and the CA output full!! and paste both using https://ctrlv.it/ @skarim

Antimttr (Thu, 02 May 2019 17:56:58 GMT):
ok

rickr (Thu, 02 May 2019 17:57:57 GMT):
and you're on JSDK >= v1.4 ?

rickr (Thu, 02 May 2019 17:59:02 GMT):
if thats the case you should never see that 3rd line because only the new authentication is actually used.

Antimttr (Thu, 02 May 2019 17:59:07 GMT):
java sdk 1.4.1

Antimttr (Thu, 02 May 2019 17:59:17 GMT):
i also updated the dockerr images to 1.4.1

rickr (Thu, 02 May 2019 17:59:45 GMT):
Have looked at the JSDK examples of using that api?

Antimttr (Thu, 02 May 2019 18:00:01 GMT):
yes, thats where i got the code from,

rickr (Thu, 02 May 2019 18:00:37 GMT):
probably the problem (just kidding )

Antimttr (Thu, 02 May 2019 18:01:01 GMT):
specifically: hfcaclientit.java line 648

Antimttr (Thu, 02 May 2019 18:01:23 GMT):
its pretty straight forward

rickr (Thu, 02 May 2019 18:01:30 GMT):
Are you using the docker fabric that the SDK comes whith ... or your own ?

Antimttr (Thu, 02 May 2019 18:01:35 GMT):
just grabs the ca admin, and then uses it to call the function

Antimttr (Thu, 02 May 2019 18:02:08 GMT):
im using the docker image i just grabbed this morning from the main hyperledger repo

Antimttr (Thu, 02 May 2019 18:02:34 GMT):
and the sdk i got via maven: ``` org.hyperledger.fabric-sdk-java fabric-sdk-java 1.4.1 ```

rickr (Thu, 02 May 2019 18:02:35 GMT):
but are you using the fabric set up in the SDK our your own ?

Antimttr (Thu, 02 May 2019 18:02:49 GMT):
oh im using balance-transfer

Antimttr (Thu, 02 May 2019 18:02:53 GMT):
from samples

Antimttr (Thu, 02 May 2019 18:04:35 GMT):
and didnt really change it much besides using a slightly modified chaincode

Antimttr (Thu, 02 May 2019 19:41:52 GMT):
@rickr Do i need to export ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR in order for the sdk to output, or is it outputting to stderr? I dont see any extra output on stdout

Antimttr (Thu, 02 May 2019 19:42:11 GMT):
or does it use some sort of logging system

Antimttr (Thu, 02 May 2019 19:45:33 GMT):
ahh ok i think you set it in properties that you feed to the client object

Antimttr (Thu, 02 May 2019 19:45:35 GMT):
ill try that

rickr (Thu, 02 May 2019 19:57:04 GMT):
You don't need ORG_HYPERLEDGER_FABRIC_SDK_DIAGNOSTICFILEDIR only for fabric not fabric-ca interaction

Antimttr (Thu, 02 May 2019 20:02:27 GMT):
ok set the export ORG_HYPERLEDGER_FABRIC_CA_SDK_LOGLEVEL=TRACE in the shell running my client and in the properties for HFCAClient i set LOGGERLEVEL to TRACE

Antimttr (Thu, 02 May 2019 20:02:27 GMT):
ok set the export ORG_HYPERLEDGER_FABRIC_CA_SDK_LOGLEVEL=TRACE in the shell running my client and in the properties for HFCAClient i set 'org.hyperledger.fabric.sdk.loglevel' to TRACE

Antimttr (Thu, 02 May 2019 20:02:29 GMT):
hoping that does

Antimttr (Thu, 02 May 2019 20:10:47 GMT):
also set in my docker-compose.yaml for both the ca's: FABRIC_LOGGING_SPEC=DEBUG

Antimttr (Thu, 02 May 2019 20:11:17 GMT):
though i think balance-transfer does that already

Antimttr (Thu, 02 May 2019 20:13:50 GMT):
ok here's my ca output: https://ctrlv.it/id/176614/70646644

Antimttr (Thu, 02 May 2019 20:14:52 GMT):
i didnt notice any extra output to my java client with those options enabled but heres the output anyways: https://ctrlv.it/id/176615/3301194123

rickr (Thu, 02 May 2019 20:22:01 GMT):
where is the corresponding SDK trace ?

Antimttr (Thu, 02 May 2019 20:22:12 GMT):
where does the sdk trace show up on?

Antimttr (Thu, 02 May 2019 20:22:23 GMT):
doesnt seem to go to sdtout

rickr (Thu, 02 May 2019 20:22:27 GMT):
by default to the console

Antimttr (Thu, 02 May 2019 20:22:39 GMT):
i pasted all the console output for my client

Antimttr (Thu, 02 May 2019 20:22:46 GMT):
but theres nothing extra for the sdk

Antimttr (Thu, 02 May 2019 20:23:09 GMT):
i exported the variable: ``` $ export ```

Antimttr (Thu, 02 May 2019 20:23:09 GMT):
i exported the variable: ``` $ export ```

Antimttr (Thu, 02 May 2019 20:23:43 GMT):
``` declare -x ORG_HYPERLEDGER_FABRIC_CA_SDK_LOGLEVEL="TRACE" declare -x ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL="TRACE" ```

Antimttr (Thu, 02 May 2019 20:26:30 GMT):
i wonder if its cuz im using maven?

skarim (Thu, 02 May 2019 20:26:54 GMT):
@Antimttr Thanks for the log. Will try to see if we can reproduce it.

Antimttr (Thu, 02 May 2019 20:31:48 GMT):
@skarim thanks for taking a look!

rickr (Thu, 02 May 2019 20:42:54 GMT):
@Antimttr would it be easy for you to change your ca name to remove the dash and see if that then works?

Antimttr (Thu, 02 May 2019 20:50:59 GMT):
i think so, its just in the artifacts config files

Antimttr (Thu, 02 May 2019 20:51:00 GMT):
let me try

Antimttr (Thu, 02 May 2019 20:58:30 GMT):
didn't seem to affect much: https://ctrlv.it/id/176635/3046120177

rickr (Thu, 02 May 2019 21:16:00 GMT):
@Antimttr I think we have it reproduced. But it may be next week before get any fix out

Antimttr (Thu, 02 May 2019 21:34:19 GMT):
oh wow, its an actual bug?

Antimttr (Thu, 02 May 2019 21:34:34 GMT):
ok, i'll wait patiently, thanks for your help :D

rickr (Thu, 02 May 2019 22:43:53 GMT):
@Antimttr I'm guessing your fabric-ca is not really using multiple instance (multiple ca names configured) you could try create the hfclient w/o any caname. It defaults to the root one if there is only one and that I think will get around the issue.

rickr (Thu, 02 May 2019 22:43:53 GMT):
@Antimttr I'm guessing your fabric-ca is not really using multiple instance (multiple ca names configured) you could try create the hfcaclient w/o any caname. It defaults to the root one if there is only one and that I think will get around the issue.

rickr (Thu, 02 May 2019 22:45:53 GMT):
It would be also helpful to know if that workes

rickr (Thu, 02 May 2019 22:45:53 GMT):
It would be also helpful to know if that works

yerganat (Fri, 03 May 2019 03:50:09 GMT):
Has joined the channel.

yerganat (Fri, 03 May 2019 03:50:24 GMT):
hello all I am interested on collobarate in hyperladger fabric java sdk How i can involved? where i can get tasks to make and request pull ?

rickr (Fri, 03 May 2019 11:37:52 GMT):
@yerganat some thing to get started is doc'ed in fabric docs https://fabric-docs-test.readthedocs.io/en/latest/CONTRIBUTING/ Is probably the place to start. Take note of the gerrit part as github is not used.

Antimttr (Fri, 03 May 2019 14:41:11 GMT):
@rickr if i pass null for caname i get this: ``` ERROR: Failed to instantiate CA Client: name must not be null or an empty string. org.hyperledger.fabric_ca.sdk.exception.InvalidArgumentException: name must not be null or an empty string. at org.hyperledger.fabric_ca.sdk.HFCAClient.createNewInstance(HFCAClient.java:306) at com.mctlive.mcthlf.model.OrganizationModel.initOrgs(OrganizationModel.java:41) at com.mctlive.mcthlf.Main.main(Main.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:748) ERROR: Failed to initialize organization data. ```

rickr (Fri, 03 May 2019 14:42:04 GMT):
no null is no good .. should be a method where there is no caname

Antimttr (Fri, 03 May 2019 14:42:30 GMT):
i see it, let me try

Antimttr (Fri, 03 May 2019 14:43:02 GMT):
it worked!

Antimttr (Fri, 03 May 2019 14:43:42 GMT):
interesting bug

Antimttr (Fri, 03 May 2019 14:47:25 GMT):
TGIF!

yerganat (Sat, 04 May 2019 06:11:00 GMT):
@rickr thanks I have started install from docker I will tell when i complite installation Can I get tasks from JIRA(fabric-sdk-java)?

rickr (Sat, 04 May 2019 13:00:38 GMT):
Till v2.0 is out only addressing defects. Major work items are usually defined by new features on the Fabric side and I'm not aware at the moment any post v2.0

darapich92 (Sun, 05 May 2019 15:30:23 GMT):
hello everyone, i am learning HLF java sdk, End2endIT, but i wonder how endorsers endorse user's request? it is called from docker? i saw endorser address grpc://localhost:7056 but i couldn't access via browser, could anyone tell me? i am sorry, I am very new with HLF.

darapich92 (Sun, 05 May 2019 15:32:15 GMT):
Actually, i want to see endorser's code, could you guide me?

Pai (Mon, 06 May 2019 06:13:28 GMT):
Has joined the channel.

VivekAnandPanda (Mon, 06 May 2019 07:24:16 GMT):
Has joined the channel.

VivekAnandPanda (Mon, 06 May 2019 07:26:17 GMT):
Hi everyone, I am trying to deploy and initiate Java chaincode from Java SDK. But getting failure response. Can you please walkthrough how to deploy and initiate Java chaincode from Java client SDK?

rickr (Mon, 06 May 2019 11:53:50 GMT):
@darapich92 Starting with the SDK at _ground zero_ is not IMO the best bet. Look through the Fabric documentation to get some background first. Endorsement is done by the Peer that's in the SDK setup is running in docker. It's not http but grpc protocol that's used to communicate between SDKs and the Fabric.

sejalpawar (Mon, 06 May 2019 11:56:17 GMT):
Hey there, I am trying to invoke transaction using an idemix credential:

rickr (Mon, 06 May 2019 11:57:24 GMT):
@VivekAnandPanda If you follow the SDK README.md it guides you to get the Integration test running and passing. One of the integration test does deploy Java chaincode. The Readme.md does reference it. Please take the time to follow that

sejalpawar (Mon, 06 May 2019 11:57:58 GMT):
UserContext idemixUser = new UserContext(); idemixUser.setName("idemixTestUser18"); RegistrationRequest rr = new RegistrationRequest(idemixUser.getName(), "org1"); String enrollmentSecret = ca_client.register(rr, caAdmin); String mspID = "Org1IdemixMSP"; Enrollment x509Enrollment = ca_client.enroll(idemixUser.getName(), enrollmentSecret); Enrollment idemixEnrollment = ca_client.idemixEnroll(x509Enrollment, mspID); System.out.println(idemixEnrollment.getCert()); //returns null System.out.println(idemixEnrollment.getKey()); //returns null idemixUser.setEnrollment(idemixEnrollment); idemixUser.setMspId(mspID); client.setUserContext(idemixUser);

sejalpawar (Mon, 06 May 2019 11:58:38 GMT):
On the SDK side, I get: Expecting a PEM-encoded X509 certificate; PEM block not found org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Proposal response is invalid.

sejalpawar (Mon, 06 May 2019 11:59:20 GMT):
Can someone please tell me what went wrong?

rickr (Mon, 06 May 2019 12:01:11 GMT):
Is the usercontext you're using set to a user with an Idemix mspid ?

rickr (Mon, 06 May 2019 12:02:16 GMT):
Please follow the code provided as an example in the Integration tests.

sejalpawar (Mon, 06 May 2019 12:07:49 GMT):
I have two MSPs: Org1MSP is an x509 MSP and Org1IdemixMSP is the idemix MSP

sejalpawar (Mon, 06 May 2019 12:08:05 GMT):
In the code above, I had set it to Idemix MSP

sejalpawar (Mon, 06 May 2019 12:08:18 GMT):
Is that incorrect?

rickr (Mon, 06 May 2019 12:09:53 GMT):
looks right

sejalpawar (Mon, 06 May 2019 12:17:15 GMT):
It ran once correctly and started failing thereafter. Is there some kind of default setting that I need to override on the CA side? I simply init and start the CA server fabric-ca-server start -b admin:adminpw --home $PWD

rickr (Mon, 06 May 2019 12:24:20 GMT):
You need to restart if you want to again register the same user .. ask on #fabric-ca

darapich92 (Mon, 06 May 2019 13:12:41 GMT):
@rickr thank you for your recommendation. Please correct me if i am wrong. I understand Endorsers who role to endorse the client's tx. Since i test that End2endIT java sdk, i don't know what kind of policy that endorsers check before endorse client's tx. Could you tell me how can i access to endorser's code?

sejalpawar (Mon, 06 May 2019 13:40:26 GMT):
okay I will look into it.. thanks

smallant (Mon, 06 May 2019 14:40:44 GMT):
hi to all currently im having this following exception when invoking the chaincode: Channel Channel{id: 1, name: mychannel} sending proposal with transaction 3b03a47f5e654d1dba96e4611435306228610dbbb328ae664a25dc9891d0e4fc to Peer{ id: 8, name: peer1.io, channelName: mychannel, url: grpcs://peer1.io:7051} failed because of timeout(35000 milliseconds) expiration. Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: 3b03a47f5e654d1dba96e4611435306228610dbbb328ae664a25dc9891d0e4fc to Peer{ id: 5, name: peer2.io, channelName: mychannel, url: grpcs://peer2.io:7051} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLException: handshake timed out at io.netty.handler.ssl.SslHandler.handshake(...)(Unknown Source) Does anyone have any idea? The certificates are correct for all the peers and for my machine

ranjan008 (Tue, 07 May 2019 04:55:34 GMT):
@rickr can I implement custom store to store keys and certificates through java-sdk ? If yes which interface should I override in java?

rickr (Tue, 07 May 2019 12:05:26 GMT):
No need for that

rickr (Tue, 07 May 2019 12:05:26 GMT):
No need for that. As an application store them in your own database in what ever fomat works best for your application

rickr (Tue, 07 May 2019 12:05:26 GMT):
No need for that. As an application store them in your own database in what ever format works best for your application. The SDK is IMO for interacting with Fabric. There are dozen of persistent technologies in Java that all the SDK would do is call your application back to do the actual store in whatever schema your application desired.

Antimttr (Tue, 07 May 2019 15:10:18 GMT):
i used mongodb for my state storage

Antimttr (Tue, 07 May 2019 17:51:35 GMT):
@rickr does the javasdk examples include a chaincode update routine anywhere?

rickr (Tue, 07 May 2019 19:39:43 GMT):
yes :)

Antimttr (Tue, 07 May 2019 19:41:39 GMT):
i looked through em all i couldnt find it :/

Antimttr (Tue, 07 May 2019 19:41:52 GMT):
update channel updates everything except the chaincode from what i could see

Antimttr (Tue, 07 May 2019 19:42:11 GMT):
which file is it in?

rickr (Tue, 07 May 2019 20:17:14 GMT):

Clipboard - May 7, 2019 4:17 PM

Antimttr (Tue, 07 May 2019 20:18:06 GMT):
thanks!

rickr (Tue, 07 May 2019 20:18:09 GMT):
That's actually deprecated .. the lifecycle example shows what it would be

Antimttr (Tue, 07 May 2019 20:18:12 GMT):
ill check that file

Antimttr (Tue, 07 May 2019 20:18:17 GMT):
oh

Antimttr (Tue, 07 May 2019 20:18:29 GMT):
deprecated for 2.0 or for 1.4?

rickr (Tue, 07 May 2019 20:18:38 GMT):
2.0

Antimttr (Tue, 07 May 2019 20:18:51 GMT):
is 2.0 about to come out? seems still far off

Antimttr (Tue, 07 May 2019 20:18:56 GMT):
but i dont know what the timetable is

Antimttr (Tue, 07 May 2019 20:20:02 GMT):
i saw notes in end2endit about using lifecycle stuff but i didnt see any examples of it

c-an (Wed, 08 May 2019 01:25:10 GMT):
Has joined the channel.

rickr (Wed, 08 May 2019 01:27:19 GMT):
Last I heard target was for end of June time frame.

c-an (Wed, 08 May 2019 01:40:46 GMT):
hello!

stone-ch (Wed, 08 May 2019 04:58:38 GMT):
Has joined the channel.

sejalpawar (Wed, 08 May 2019 08:09:57 GMT):
Hey there! I am invoking a transaction using an idemix user twice and returning the creator's public key from chaincode side which is used to raise the transaction. However, the byte[] array returned is different in the two transaction requests. Is there an issue with my implementation or is this intended?

sejalpawar (Wed, 08 May 2019 08:10:24 GMT):
This is my code to access public key of creator on chaincode side:

sejalpawar (Wed, 08 May 2019 08:10:54 GMT):
creator, err := stub.GetCreator() if err != nil { return shim.Error(err.Error()) } sid := &msp.SerializedIdentity{} err = proto.Unmarshal(creator, sid) if err != nil { return shim.Error("failed to unmarshal transaction invoker's identity "+err.Error()) } idemixID := &msp.SerializedIdemixIdentity{} err = proto.Unmarshal(sid.IdBytes, idemixID) if err != nil { return shim.Error("failed to unmarshal transaction invoker's idemix identity "+err.Error()) } return shim.Success(idemixID.Nymx)

sejalpawar (Wed, 08 May 2019 08:13:37 GMT):
In Java SDK: byte[] res = responses.iterator().next().getChaincodeActionResponsePayload(); for(byte x: res) System.out.print(x+" ");

rickr (Wed, 08 May 2019 13:08:24 GMT):
Ok - not being the idemix guru I do think that's the intent. It should generate a new creator cert each time making it _non-linkable_

sejalpawar (Wed, 08 May 2019 15:07:09 GMT):
I am looking for the class org.hyperledger.fabric.protos.peer.FabricProposal.SignedProposal which is imported in https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/Channel.java

sejalpawar (Wed, 08 May 2019 15:07:22 GMT):
But I can't seem to be able to find it

sejalpawar (Wed, 08 May 2019 15:07:34 GMT):
Can someone please help?

rickr (Wed, 08 May 2019 20:49:35 GMT):
README.md FAQ

casstait (Thu, 09 May 2019 01:36:52 GMT):
Has joined the channel.

casstait (Thu, 09 May 2019 01:36:53 GMT):
Is there anyone that could guide me on how to update a client side application using the java fabric SDK connect to an IBP enterprise service when Mutual TLS is enabled?

casstait (Thu, 09 May 2019 06:11:10 GMT):
When mutual TLS is disabled on the IBP service, the code currently written works as expected, however when mutual TLS is enabled on the IBP service, I receive an error: Response: {"result":"","errors":[{"code":0,"message":"Registration of 'casstest' failed in affiliation validation: : scode: 401, local code: 44, local msg: Caller does not have authority to act on affiliation 'PeerOrg1', remote code: 20, remote msg: Authorization failure"} ],"messages":[],"success":false}. What do I need to do to alter the existing code to establish a mutual TLS connection? I used the following tutorial as a guide: https://developer.ibm.com/tutorials/hyperledger-fabric-java-sdk-for-tls-enabled-fabric-network/

tsnyder (Thu, 09 May 2019 10:57:05 GMT):
I have working code with the java sdk with uses Service Discovery to obtain the channel information and accesses both the Peers and Orderers using TLS. The Connections to the Peers and Service Discovery works fine. Endorsement works fine. If I have a solo Orderer sending to the Orderer works fine. However, if I use etcdraft Orderers I receive a certificate validation error as follows: 1759 [grpc-default-worker-ELG-1-2] DEBUG io.netty.handler.ssl.ReferenceCountedOpenSslContext - verification of certificate failed sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

tsnyder (Thu, 09 May 2019 11:00:09 GMT):
The gossip is working, the channel creation is working, Peer connection to the Orderers is working. It is only the Client APP to the etcdraft Orderer nodes where the SSL handshake does not work. Within the Orderer I see the following series of messages - 2019-05-09 06:45:56.898 UTC [core.comm] ServerHandshake -> ERRO 0b1 TLS handshake failed with error remote error: tls: internal error server=Orderer remoteaddress=172.17.0.14:56220 2019-05-09 06:45:56.972 UTC [core.comm] ServerHandshake -> ERRO 0b2 TLS handshake failed with error remote error: tls: internal error server=Orderer remoteaddress=172.17.0.14:56230 2019-05-09 06:45:57.023 UTC [core.comm] ServerHandshake -> ERRO 0b3 TLS handshake failed with error remote error: tls: internal error server=Orderer remoteaddress=172.17.0.14:56232

tsnyder (Thu, 09 May 2019 11:44:40 GMT):
Alll Fabric components including the Java SDK are 1.4.1

rickr (Thu, 09 May 2019 12:38:31 GMT):
@casstait does not appear as TLS error as it seems like it made the connection. Support for IBM IBP is through IBM you should open a support ticket.

rickr (Thu, 09 May 2019 12:48:46 GMT):
@tsnyder no way to guess from just that description. The SDK gets certs from SD so there's no way to know what it received was at fault or what it did with what it received is at fault :smile: The SDK is _clueless_ about whether Orderer is solo, kafka, or raft based. Would need complete logs at trace level for all involved SDK, orderer, and peers from the very begging to point of failure to even begin to isolate.

tsnyder (Thu, 09 May 2019 12:50:50 GMT):
@rickr I have the logs from the BasicConfiguration.configure() within the sdk. Only partial logs from the Orderer nodes. It is inside a Kubernetes environment.

tsnyder (Thu, 09 May 2019 12:51:12 GMT):
how can I send them to you? They are very long (pages)

rickr (Thu, 09 May 2019 12:52:09 GMT):
You could also override the SD add orderer and get the certificate or get the certificates from the logs and try and use openssl s_client to see if they work with it

rickr (Thu, 09 May 2019 12:52:33 GMT):
that would be insightful

rickr (Thu, 09 May 2019 12:53:45 GMT):
https://ctrlv.it/

tsnyder (Thu, 09 May 2019 12:54:17 GMT):
I was thinking of building the channel myself as a test - but maybe you are right. Just build the orderer, include it into the channel and see. Will try that this weekend. (Today is the start of my wseekend :) )

dan13 (Thu, 09 May 2019 19:59:27 GMT):
HLF 1.4.0, Java SDK 1.4.0, Go Chaincode: When using ServiceDiscovery in call to channel.sendTransactionProposalToEndorsers and chaincode exits with shim.Error("message"), I cannot get access to "message", as that method call throws org.hyperledger.fabric.sdk.exception.ProposalException: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Could not meet endorsement policy for chaincode. If do not use ServiceDiscovery, then I receive ProposalResponses with isVerified=false containing the "message" and other error info (status, etc.) that I can then read. Am I doing something wrong? How can I get the detailed error info when using ServiceDiscovery?

rickr (Thu, 09 May 2019 20:12:42 GMT):
@dan13 What was the actual error ? Maybe need an *improvement* on that error path.

dan13 (Thu, 09 May 2019 20:20:17 GMT):
@rickr Go chaincode: return shim.Error("No data found for " + id) where the preceding operation was a query call to another chaincode on a different channel (this call worked, just returned no results which is an application error for our use case)

rickr (Thu, 09 May 2019 20:21:31 GMT):
So I should reproduce by have SD executed some chaincode that returns an error

dan13 (Thu, 09 May 2019 20:22:39 GMT):
yes, it should be that simple. For reference, the full method call for us is: proposalResponses = channel.sendTransactionProposalToEndorsers(proposalRequest, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true));

dan13 (Thu, 09 May 2019 20:22:39 GMT):
yes, it should be that simple. For reference, the full method call for us is: proposalResponses = channel.sendTransactionProposalToEndorsers(proposalRequest, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true)); as opposed to (non-SD): proposalResponses = channel.sendTransactionProposal(proposalRequest, channel.getPeers(EnumSet.of(Peer.PeerRole.ENDORSING_PEER)));

rickr (Thu, 09 May 2019 20:25:08 GMT):
The actual fix is probably in the SD handler which is only a _reference implementation_ and can be replaced by the application :) :)

dan13 (Thu, 09 May 2019 20:30:27 GMT):
@rickr ah! I will look into that - thank you!

rickr (Thu, 09 May 2019 20:34:46 GMT):
.. was mostly _tongue in cheek_ .. still will look in to fixing it

dan13 (Fri, 10 May 2019 00:49:32 GMT):
the error seems to originate in Channel class, if I'm reading things correctly

tsnyder (Fri, 10 May 2019 14:42:30 GMT):
@ricker - Did you receive the logs I sent to the link you provided above?

tsnyder (Fri, 10 May 2019 14:42:30 GMT):
@rickr - Did you receive the logs I sent to the link you provided above?

dan13 (Fri, 10 May 2019 15:17:15 GMT):
@rickr My RTFM error: inspectResults: If service discovery does not find the the needed endorsers for a specific chaincode it will by default throw a ServiceDiscoveryException. Setting this to true will have the method return the all the endorsements it did obtained. Setting this true fixed my issue.

rickr (Fri, 10 May 2019 15:28:48 GMT):
Glad something does work _occasionally_

nitishbhardwaj19 (Sat, 11 May 2019 11:17:15 GMT):
Has joined the channel.

nitishbhardwaj19 (Sat, 11 May 2019 11:17:16 GMT):
Hi, I hope everyone is doing good. I am trying to use fabric-java-sdk. I am going through End2endAndBackAgainIt.java. It's well written, easy to follow, but, I am confused about from where does they are loading properties file. I couldn't find any properties file with the name HFCSampletest.properties anywhere. Could someone point me to the required properties file to run a fabric-java-sdk.

nitishbhardwaj19 (Sat, 11 May 2019 11:17:16 GMT):
Hi, I hope everyone is doing good. I am trying to use fabric-java-sdk. I am going through End2endAndBackAgainIt.java. It's well written, easy to follow, but, I am confused about from where does they are loading properties file. I couldn't find any properties file with the name HFCSampletest.properties anywhere. Could someone point me to the required properties file to run a fabric-java-sdk. ``` @rickr ```

nitishbhardwaj19 (Sat, 11 May 2019 11:17:16 GMT):
Hi, I hope everyone is doing good. I am trying to use fabric-java-sdk. I am going through End2endAndBackAgainIt.java. It's well written, easy to follow, but, I am confused about from where does they are loading properties file. I couldn't find any properties file with the name HFCSampletest.properties anywhere. Could someone point me to the required properties file to run a fabric-java-sdk. @rickr

nitishbhardwaj19 (Sat, 11 May 2019 11:17:16 GMT):
Hi, I hope everyone is doing good. I am trying to use fabric-sdk-java. I am going through End2endAndBackAgainIt.java. It's well written, easy to follow, but, I am confused about from where does they are loading properties file. I couldn't find any properties file with the name HFCSampletest.properties anywhere. Could someone point me to the required properties file to run a fabric-sdk-java. @rickr

nitishbhardwaj19 (Sat, 11 May 2019 11:17:16 GMT):
Hi, I hope everyone is doing good. I am trying to use fabric-sdk-java. I am going through End2endAndBackAgainIt.java. It's well written, easy to follow, but, I am confused about from where does they are loading properties file. I couldn't find any properties file with the name HFCSampletest.properties anywhere. Could someone point me to the required properties file to run a fabric-sdk-java. @rickr Could you please share a sample properties file.

Jelle.Diet (Sat, 11 May 2019 12:37:01 GMT):
Hello everyone, I'm working with the java sdk at the moment and reading my connection details from a json/yaml file. However I can't seem to find how to get the peer and orderer url from the NetworkConfig class? Can anyone help me out?

Jelle.Diet (Sat, 11 May 2019 12:37:01 GMT):
Hello everyone, I'm working with the java sdk at the moment and reading my connection details from a json/yaml file. However I can't seem to find how to get the peer and orderer url from the NetworkConfig class? Can anyone help me out? Edit: using fabric-java-sdk 1.4.1

nitishbhardwaj19 (Sat, 11 May 2019 12:58:29 GMT):
@ju

nitishbhardwaj19 (Sat, 11 May 2019 13:00:51 GMT):
I am struggling to get this as well. I haven't found any sample for it yet. Please let me know if you find anything.

Jelle.Diet (Sat, 11 May 2019 13:09:02 GMT):
I took a look at the code and file seems to be created when running the setup

nitishbhardwaj19 (Sat, 11 May 2019 13:11:55 GMT):
ohh that's great. I can't run it in my local due to some technical restrictions. Will it be possible for you to share the generated file? I am curious to know how we can use the connection.json to configure required properties in this SDK.

Jelle.Diet (Sat, 11 May 2019 13:14:38 GMT):
I think I have the connection yaml file for the basic network somewhere hold on

rickr (Sat, 11 May 2019 14:07:12 GMT):
@Jelle.Diet Not following exactly what it is you're doing. Should not be necessary. Follow the NetworkconfigIT example it loads the channel from the connection property file. Once loaded you _could_ query the channel for peers and orderers that have the URL but not sure why that is even needed. https://github.com/hyperledger/fabric-sdk-java/blob/433432f4fb7f04251f40af0b2e1af96678169804/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java

rickr (Sat, 11 May 2019 14:07:12 GMT):
@Jelle.Diet Not following exactly what it is you're doing. Should not be necessary. Follow the NetworkconfigIT example it loads the channel from the connection profile file. Once loaded you _could_ query the channel for peers and orderers that have the URL but not sure why that is even needed. https://github.com/hyperledger/fabric-sdk-java/blob/433432f4fb7f04251f40af0b2e1af96678169804/src/test/java/org/hyperledger/fabric/sdkintegration/NetworkConfigIT.java

rickr (Sat, 11 May 2019 14:16:37 GMT):
@nitishbhardwaj19 HFCSampletest.properties you won't find it. It's created as the test is run. Should be deleted after testing is done.

Jelle.Diet (Sat, 11 May 2019 14:39:43 GMT):
Ah I made it work, I was creating a new channel and adding a peer and orderer to it manually

tsnyder (Sun, 12 May 2019 07:23:32 GMT):
@rickr - I have isolated the problem with the Service Discovery, TLS and Raft. The issue is that when each node (Peer or Orderer) is built within the EndPoint it first does not find the SSL Context. It then goes and finds the TLS Cert. For the orderer nodes it always uses the orderer1 cert and not the orderer orgs tls cert. I ran the test using the BasicConfigure and SSL tracing. I have raised a jira item on this. I attached the console log, configtx.yaml, and crypto-config.yaml to the jira item.

nitishbhardwaj19 (Sun, 12 May 2019 14:27:12 GMT):
Thanks @rickr for your quick response.

nitishbhardwaj19 (Sun, 12 May 2019 15:42:06 GMT):
Hi @rickr What is the optimal way for creating an instance of HFCAClient and HFClient. Should it be created just once for each org or a new instance must be created for each operation?

rickr (Sun, 12 May 2019 18:20:16 GMT):
@nitishbhardwaj19 https://github.com/hyperledger/fabric-sdk-java/tree/433432f4fb7f04251f40af0b2e1af96678169804#should-an-application-create-more-than-one-hfclient

AndresMartinezMelgar.itcl (Mon, 13 May 2019 06:29:56 GMT):
Hi, I'm using the java sdk. When I make a valid transaction a new block is created (normal behavior) but when I make a query I also create a block. I understand that this behavior is not normal, but I do not know for sure. I think i am not using correct function

oborovyk (Mon, 13 May 2019 11:36:47 GMT):
Hi @rickr . Are the readme params(https://github.com/hyperledger/fabric-sdk-java#firewalls-load-balancers-network-proxies) enough for grpc problem solving?

oborovyk (Mon, 13 May 2019 11:39:44 GMT):
we are using loadChannelFromConfig(...) but it can't read the keepAliveWithoutCalls boolean property. there's a workaround for keepAliveTimeout, keepAliveTime in NetworkConfig though

rickr (Mon, 13 May 2019 11:52:33 GMT):
@oborovyk NetworkConfigIT shows how you can add any propertes or change them before any channel is loaded.

rickr (Mon, 13 May 2019 11:55:58 GMT):
@AndresMartinezMelgar.itcl block should not be written if your chaincode doing the query is not changing any properties. Also if it's just a query using your chaincode it should not be sent to the Orderer by your application.

oborovyk (Mon, 13 May 2019 12:39:59 GMT):
cool that worked. Can we add a pull request to fix the loadChannelFromConfig method?

rickr (Mon, 13 May 2019 12:53:39 GMT):
nothing is broken

oborovyk (Mon, 13 May 2019 12:59:10 GMT):
I think it should work with json only without adding properties manually. Or was it intended for partial load? Look at: private Node createNode.. in NetworkConfig.java. Wdyt?

rickr (Mon, 13 May 2019 13:01:15 GMT):
The document was for network providers to tell how to configure your network for what they provided. Those properties are specific to your client. Your application may behind a firewall and need them some other application may not.

Igor-Ivaniuk (Mon, 13 May 2019 13:05:59 GMT):
The point was that the defined properties are not parsed according to JSON types, but rather are provided as Strings

Igor-Ivaniuk (Mon, 13 May 2019 13:07:09 GMT):
Which is not compatible with, for example, Netty GRPC implementation

oborovyk (Mon, 13 May 2019 13:09:41 GMT):
Indeed and there's a workaround in NetworkConfig but only for 2 props if (null != props) { String value = props.getProperty("grpc.keepalive_time_ms"); if (null != value) { props.remove("grpc.keepalive_time_ms"); props.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {new Long(value), TimeUnit.MILLISECONDS}); } value = props.getProperty("grpc.keepalive_timeout_ms"); if (null != value) { props.remove("grpc.keepalive_timeout_ms"); props.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {new Long(value), TimeUnit.MILLISECONDS}); } }

oborovyk (Mon, 13 May 2019 13:09:41 GMT):
Indeed and there's a workaround in NetworkConfig but only for 2 props ` if (null != props) { String value = props.getProperty("grpc.keepalive_time_ms"); if (null != value) { props.remove("grpc.keepalive_time_ms"); props.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {new Long(value), TimeUnit.MILLISECONDS}); } value = props.getProperty("grpc.keepalive_timeout_ms"); if (null != value) { props.remove("grpc.keepalive_timeout_ms"); props.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {new Long(value), TimeUnit.MILLISECONDS}); } }`

oborovyk (Mon, 13 May 2019 13:09:41 GMT):
Indeed and there's a workaround in NetworkConfig but only for 2 props ``` if (null != props) { String value = props.getProperty("grpc.keepalive_time_ms"); if (null != value) { props.remove("grpc.keepalive_time_ms"); props.put("grpc.NettyChannelBuilderOption.keepAliveTime", new Object[] {new Long(value), TimeUnit.MILLISECONDS}); } value = props.getProperty("grpc.keepalive_timeout_ms"); if (null != value) { props.remove("grpc.keepalive_timeout_ms"); props.put("grpc.NettyChannelBuilderOption.keepAliveTimeout", new Object[] {new Long(value), TimeUnit.MILLISECONDS}); } }```

nitishbhardwaj19 (Tue, 14 May 2019 07:49:45 GMT):
Where does artifacts folder(with all the crypto certs) needs to be added? I am getting connection timeout with hfcaClient.info();``` ``connection.json``` { "name": "orga-network", "x-type": "hlfv1", "version": "1.0.0", "client": { "organization": "orga", "connection": { "timeout": { "peer": { "endorser": "300", "eventHub": "300", "eventReg": "300"}, "orderer": "300" } } }, "channels": { "firstchannel": { "orderers": [ "orderer2nd-orgc" ], "peers": { "peer1st-orgb": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer2nd-orgb": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true } } } }, "organizations": { "orga": { "mspid": "orga", "peers": [ ], "certificateAuthorities": [ "ca1st-orga" ] }, "orgb": { "mspid": "orgb", "peers": [ "peer1st-orgb", "peer2nd-orgb" ], "certificateAuthorities": [ "ca1st-orgb" ] } }, "orderers": { "orderer2nd-orgc": { "url": "grpc://xx.xx.xx.xx:7050", "grpcOptions": { "ssl-target-name-override": "orderer2nd-orgc" }, "tlsCACerts": { "pem": "artifacts/keyfiles/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" } } }, "peers": { "peer1st-orgb": { "url": "grpc://xx.xx.xx.xx:7051", "eventUrl": "grpc://xx.xx.xx.xx:7053", "grpcOptions": { "ssl-target-name-override": "peer1st-orgb" }, "tlsCACerts": { "pem": "artifacts/keyfiles/orgb/tlsca/tlsca.orgb-cert.pem" } }, "peer2nd-orgb": { "url": "grpc://xx.xx.xx.xx:7051", "eventUrl": "grpc://xx.xx.xx.xx:7053", "grpcOptions": { "ssl-target-name-override": "peer2nd-orgb" }, "tlsCACerts": { "pem": "artifacts/keyfiles/orgb/tlsca/tlsca.orgb-cert.pem" } } }, "certificateAuthorities": { "ca1st-orga": { "url": "http://xx.xx.xx.xx:7054", "caName": "ca1st-orga", "httpOptions": {"verify": false}, "tlsCACerts": { "path": "artifacts/keyfiles/orga/tlsca/tlsca.orga-cert.pem" } }, "ca1st-orgb": { "url": "http://xx.xx.xx.xx:7054", "caName": "ca1st-orgb", "httpOptions": {"verify": false}, "tlsCACerts": { "path": "artifacts/keyfiles/orgb/tlsca/tlsca.orgb-cert.pem" } } } } ``` `` NOTE: I am using spring boot and added connection.json and artifacts folder under resources ```

nitishbhardwaj19 (Tue, 14 May 2019 07:49:45 GMT):
@rickr @Igor-Ivaniuk Where does artifacts folder(with all the crypto certs) needs to be added? I am getting connection timeout with hfcaClient.info();``` ``connection.json``` { "name": "orga-network", "x-type": "hlfv1", "version": "1.0.0", "client": { "organization": "orga", "connection": { "timeout": { "peer": { "endorser": "300", "eventHub": "300", "eventReg": "300"}, "orderer": "300" } } }, "channels": { "firstchannel": { "orderers": [ "orderer2nd-orgc" ], "peers": { "peer1st-orgb": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true }, "peer2nd-orgb": { "endorsingPeer": true, "chaincodeQuery": true, "eventSource": true } } } }, "organizations": { "orga": { "mspid": "orga", "peers": [ ], "certificateAuthorities": [ "ca1st-orga" ] }, "orgb": { "mspid": "orgb", "peers": [ "peer1st-orgb", "peer2nd-orgb" ], "certificateAuthorities": [ "ca1st-orgb" ] } }, "orderers": { "orderer2nd-orgc": { "url": "grpc://xx.xx.xx.xx:7050", "grpcOptions": { "ssl-target-name-override": "orderer2nd-orgc" }, "tlsCACerts": { "pem": "artifacts/keyfiles/orgc/orderers/orderer2nd-orgc.orgc/tls/ca.crt" } } }, "peers": { "peer1st-orgb": { "url": "grpc://xx.xx.xx.xx:7051", "eventUrl": "grpc://xx.xx.xx.xx:7053", "grpcOptions": { "ssl-target-name-override": "peer1st-orgb" }, "tlsCACerts": { "pem": "artifacts/keyfiles/orgb/tlsca/tlsca.orgb-cert.pem" } }, "peer2nd-orgb": { "url": "grpc://xx.xx.xx.xx:7051", "eventUrl": "grpc://xx.xx.xx.xx:7053", "grpcOptions": { "ssl-target-name-override": "peer2nd-orgb" }, "tlsCACerts": { "pem": "artifacts/keyfiles/orgb/tlsca/tlsca.orgb-cert.pem" } } }, "certificateAuthorities": { "ca1st-orga": { "url": "http://xx.xx.xx.xx:7054", "caName": "ca1st-orga", "httpOptions": {"verify": false}, "tlsCACerts": { "path": "artifacts/keyfiles/orga/tlsca/tlsca.orga-cert.pem" } }, "ca1st-orgb": { "url": "http://xx.xx.xx.xx:7054", "caName": "ca1st-orgb", "httpOptions": {"verify": false}, "tlsCACerts": { "path": "artifacts/keyfiles/orgb/tlsca/tlsca.orgb-cert.pem" } } } } ``` `` NOTE: I am using spring boot and added connection.json and artifacts folder under resources ```

nitishbhardwaj19 (Tue, 14 May 2019 08:18:34 GMT):

debug.png

nitishbhardwaj19 (Tue, 14 May 2019 17:21:20 GMT):
It actually fails at hfcaClient.info() when it tries to call CA http://xx.xxx.xxx.xxx:7054/api/v1/cainfo, gets Connection Timeout. But, I can't find any logs on CA. Seems like it's not able to reachout to CA. Strange thing is that the same configuration worked with Node SDK. It would be really great if someone can help me out with this.

nitishbhardwaj19 (Wed, 15 May 2019 01:34:33 GMT):

POSTCall.png

AndresMartinezMelgar.itcl (Wed, 15 May 2019 07:28:36 GMT):
Hi, how can i know if an user exist within CA server and recover this user(if exist)

AndresMartinezMelgar.itcl (Wed, 15 May 2019 07:28:36 GMT):
Hi, how can i know if an user exist within CA server and recover this user(if exist). With Java SDK

rickr (Wed, 15 May 2019 11:49:50 GMT):
@AndresMartinezMelgar.itcl look at https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java search for HFCAIdentity see if those APIs help

rickr (Wed, 15 May 2019 12:00:52 GMT):
@nitishbhardwaj19 The SDK tests run with TLS enabled connecting the HFCAClient and are passing. Have you followed it? As an independent connect try using `openssl s_client -connect` to see if that works

rickr (Wed, 15 May 2019 12:02:58 GMT):
Also I see a url in that one picture that looks to be url="http:/..." if this is tls I think *https* is going to work better.

nitishbhardwaj19 (Wed, 15 May 2019 12:58:03 GMT):
@rickr Thanks for replying. I have not configured TLS anywhere in HLF network. This is just a test network to check the connectivity with SDK. I am able to connect with Postman though. I am not sure why it doesn't connect with SDK client, trying to enable fiddler logs to get more information. I will update you soon.

rickr (Wed, 15 May 2019 13:09:29 GMT):
@nitishbhardwaj19 what is the level of fabric you're using ?

rickr (Wed, 15 May 2019 13:09:29 GMT):
@nitishbhardwaj19 what is the level/version of fabric you're using ?

nitishbhardwaj19 (Wed, 15 May 2019 13:16:54 GMT):
Fabric version is 1.4. I found the issue. It's because of the proxy which is being configured. The Proxy isn't allowing any http communication and I get connection timeout. Fiddler actually helped me to identify it. @rickr Thanks alot for looking into this. Though I am getting another error now, but at least the first one is resolved. :)

kevinkbc (Wed, 15 May 2019 13:36:15 GMT):
I am using hyperledger fabric 1.2 in IBM cloud starter plan and I want to connect with my java application (did everything until now with dockers) using java sdk 1.2 also. I got a connection profile - json file - with infos about url, ports, etc. There is also pems for ca. Got kinda lost. Does anyone have any material / tutorial about this?

kevinkbc (Wed, 15 May 2019 13:38:19 GMT):
I saw that node sdk have a loadFromConfig who gets this json. I am also searching for something similar in java

rickr (Wed, 15 May 2019 13:55:03 GMT):
@kevinkbc Searched README.md for connection profile?

rickr (Wed, 15 May 2019 13:55:03 GMT):
@kevinkbc Searched README.md for connection profile? Glad to help on specific JSDK questions, but support for IBM BC should be through IBM :wink:

kevinkbc (Wed, 15 May 2019 14:28:52 GMT):
thanks, I found it now. The problem was that I was looking in release 1.2 branch, but even though NetworkConfig is already there in this version, there is nothing about it in readme (only in 1.3+)

rickr (Wed, 15 May 2019 14:39:29 GMT):
@kevinkbc I think you should consider working with the latest 1.4.x JSDK

kevinkbc (Wed, 15 May 2019 14:45:23 GMT):
I will see the differences, but I am leving the company at the end of this month. So, that is not my decision.

kevinkbc (Wed, 15 May 2019 14:45:23 GMT):
I will see the differences, but I am leaving the company at the end of this month. So, that is not my decision.

mahoney1 (Thu, 16 May 2019 10:28:03 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call - be great to hear from you later ! 🙂 regards Paul

balamcyril (Thu, 16 May 2019 12:43:46 GMT):
Has joined the channel.

balamcyril (Thu, 16 May 2019 12:43:49 GMT):
hello, i have clone the fabric sdk java 1.4.1, setup all the dependencies with maven and start all the docker containner. But i don't know how to run each endtoend demo?

rickr (Thu, 16 May 2019 13:03:24 GMT):
@balamcyril Have your read the README.md ?

mauricio (Thu, 16 May 2019 13:08:59 GMT):
Has joined the channel.

mauricio (Thu, 16 May 2019 13:10:51 GMT):
Hi, can I use Scala instead of Java for chaincode and sdk ? Scala has interoperability with java then I can use chaincode java and sdk libraries. Someone has tried it?

balamcyril (Thu, 16 May 2019 13:31:08 GMT):
yes i have read it, i finish all the installation process. but i have some error on maven install "[ERROR] /home/cyril/go/src/fabric-sdk-java/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java:[700,25] cannot find symbol"

rickr (Thu, 16 May 2019 13:33:48 GMT):
@balamcyril not seen that before. I have seen where doing a` mvn clean install` again once all has been downloaded from maven fix some oddities

balamcyril (Thu, 16 May 2019 13:35:08 GMT):
what is the best version of java to use to deploy fabric-sdk-java, i'm using java 11 and it seems there is a lot of problemm

rickr (Thu, 16 May 2019 13:35:17 GMT):
@mauricio google it? I don't know any direct effort for Scala .. did see some reference out there.

mauricio (Thu, 16 May 2019 13:35:56 GMT):
I already google it and I found only a couple posts

mauricio (Thu, 16 May 2019 13:36:08 GMT):
Thanks!

rickr (Thu, 16 May 2019 13:36:28 GMT):
@balamcyril we only test with 8

rickr (Thu, 16 May 2019 13:36:52 GMT):
IMO should step back and try to get that doing first

balamcyril (Thu, 16 May 2019 13:38:58 GMT):
ok thanks, i will try to test with java 8

Jelle.Diet (Thu, 16 May 2019 13:44:42 GMT):
When you getHistory for a key you get all the transactions, timestamps and an isDelete flag

Jelle.Diet (Thu, 16 May 2019 13:45:02 GMT):
But when will the isDelete flag be true, since you can no longer get the history when the key is deleted?

Jelle.Diet (Thu, 16 May 2019 13:45:02 GMT):
Is it also possible to get history for all deleted records for example? or query for history?

balamcyril (Thu, 16 May 2019 13:50:05 GMT):
I try with java 8 and is work fine, the is to many DEPRECATED library in java 9n 10 and 11

balamcyril (Thu, 16 May 2019 13:50:32 GMT):
it seems that fabric-sdk-java is juste work with java8

rickr (Thu, 16 May 2019 14:58:22 GMT):
@balamcyril not sure however I do remember -> https://chat.hyperledger.org/channel/fabric-sdk-java?msg=DKkyx7pztXXbzugyF

mauricio (Thu, 16 May 2019 15:08:27 GMT):
Has left the channel.

rickr (Thu, 16 May 2019 20:00:27 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=xdh2Xr9c7iMH84MWQ) @jeffgarratt

sejalpawar (Fri, 17 May 2019 07:25:13 GMT):
@rickr Can you take a look at this jira? I have mentioned you in a comment: https://jira.hyperledger.org/browse/FABJ-439

balamcyril (Fri, 17 May 2019 07:26:48 GMT):
Hello, i finaly setup all and include the project in eclipse, but i face a last problem, all the "import org.hyperledger.fabric.protos.*" is doen't work, it seems that the project don't see all the .proto file

Jelle.Diet (Fri, 17 May 2019 09:58:26 GMT):
After I get the history of transactions for a certain key, how can I get the User that initiated that transaction from the transactioninfo in the sdk? I can't seem to figure it out

rickr (Fri, 17 May 2019 10:54:25 GMT):
@balamcyril https://github.com/hyperledger/fabric-sdk-java/tree/433432f4fb7f04251f40af0b2e1af96678169804#missing-protobuf-classes

rickr (Fri, 17 May 2019 10:57:37 GMT):
@Jelle.Diet I think that's shown in the Integration tests.

Jelle.Diet (Fri, 17 May 2019 11:21:05 GMT):
I only found a small sample in End2endIT that shows how to get the transaction ID and validation code of a transactionInfo, not any information about the user

rickr (Fri, 17 May 2019 11:28:00 GMT):
blockwalker routine doesn't have it?

Jelle.Diet (Fri, 17 May 2019 11:49:12 GMT):
Ah yes from the blockinfo it gets the mspId and certificate of the user, can it also be used to get the name? and can the same be done from TransactionInfo instead of BlockInfo?

rickr (Fri, 17 May 2019 12:05:18 GMT):
There is no `name`, Only mspid and the signers signature Whats there is what I know is available

Jelle.Diet (Fri, 17 May 2019 12:06:08 GMT):
how would you recommend getting the signing User from that information?

dan13 (Fri, 17 May 2019 14:21:11 GMT):
@Jelle.Diet the cert contains the username, right?

SandySun2000 (Fri, 17 May 2019 16:37:15 GMT):
@rickr The tutorial "https://developer.ibm.com/tutorials/hyperledger-fabric-java-sdk-for-tls-enabled-fabric-network" helps to connect to an IBP instance where the TLS was enabled, that could help to establish mTLS, but the tutorial didn't show the steps how the IBP instance will authenticate to the app using its certificate. Do you have any doc or tutorial to explain the missing steps?

rickr (Fri, 17 May 2019 17:17:01 GMT):
Mutual TLS if that's what your asking about is done by the grpcs /ssl connection layer. The only requirement is the client/sdk/application needs to provide for the connecit is a client certificate.

rickr (Fri, 17 May 2019 17:17:01 GMT):
Mutual TLS if that's what your asking about is done by the grpcs /ssl connection layer. The only requirement is the client/sdk/application needs to provide for the connecit is a client tls certificate/key.

gennadyl (Sun, 19 May 2019 11:50:20 GMT):
I wrote chaincode in Kotlin and it worked, so I assume Scala will work as well

yeousunn (Mon, 20 May 2019 03:26:24 GMT):
Has joined the channel.

yeousunn (Mon, 20 May 2019 05:48:26 GMT):
Hi, anyone facing `package org.hyperledger.fabric.protos.idemix does not exist` error? I am using Intellij IDEA to open the project. mvn install works fine, however IDE shows error when I build. The project is unable to find `protos` package.

kakali (Mon, 20 May 2019 06:02:51 GMT):
Has joined the channel.

kakali (Mon, 20 May 2019 06:02:52 GMT):
can anyone help me ? I have this issue when I compile fabric-sdk-java. fabric-sdk-java/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java:[62,22] package javax.xml.bind does not exist

tballast (Mon, 20 May 2019 08:42:33 GMT):
@kakali take a look at this: https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist Likely that you're using a new version of java where the modules were removed.

DVasin (Mon, 20 May 2019 13:04:14 GMT):
Has joined the channel.

DVasin (Mon, 20 May 2019 13:04:14 GMT):
Hi guys. Is it possible (and is there any examples) for interacting with byfn network (without ca) using Java SDK?

DVasin (Mon, 20 May 2019 13:04:59 GMT):
Is is ca nessecary for accessing the network via Java SDK?

rickr (Mon, 20 May 2019 21:25:43 GMT):
No CA is strictly required for Fabric. I just connected to Fabric's BYFN load I'ts user/creds and tls/certs for the connections.

smallant (Mon, 20 May 2019 23:35:15 GMT):
hi to all, I'm using the java sdk to connect to my network and i received a peculiar error: May 20, 2019 @ 15:34:01.216 peer1 [33m2019-05-20 13:34:01.216 UTC [valimpl] preprocessProtoBlock -> WARN 0ed[0m Channel [mychannel]: Block [13] Transaction index [0] TxId [6adad972827e6296f14a6bcca79855ada25f2ccd0403980383155bf9dac7c95] marked as invalid by committer. Reason code [DUPLICATE_TXID] How can this happen?? PS: I'm using the txID as a key when I store my data

sandy (Tue, 21 May 2019 03:19:36 GMT):
Hi guys... Instead of using fabric directly using SDK, can we use hyperledger composer directly for all cases ?

nitishbhardwaj19 (Tue, 21 May 2019 05:22:15 GMT):
@rickr Hope you are doing good. Could you please let me know if we are expected to save *Enrollment enrollment* in AppUser? If so, how can we persist it in DB? Should we use blob get just save private and public keys? What is the ideal scenario?

nitishbhardwaj19 (Tue, 21 May 2019 05:22:15 GMT):
@rickr Hope you are doing good. Could you please let me know if we are expected to save *Enrollment enrollment* in AppUser? If so, how can we persist it in DB? Should we use blob and just save private and public keys? What is the ideal scenario?

darapich92 (Tue, 21 May 2019 06:53:28 GMT):
hello all, Currently i test the End2EndIT and one block contains 1 transaction. do you know how can orderer inserts many transactions to a block?

Randyshu2018 (Tue, 21 May 2019 07:00:35 GMT):
only org admin can submit transaction ?

nitishbhardwaj19 (Tue, 21 May 2019 07:03:41 GMT):
@Randyshu2018 Any user can submit the transaction as long as he is a part of the organization. For that, you would have to first register and enroll different users for the organization(using org admin).

Randyshu2018 (Tue, 21 May 2019 07:04:44 GMT):
yean,I have did it,but I got some error like this'java.lang.Exception: io.grpc.StatusRuntimeException: UNKNOWN: access denied: channel [mychannel] creator org [Org1MSP] '

Randyshu2018 (Tue, 21 May 2019 07:05:30 GMT):
also the same error display in peer log '2019-05-21 06:59:51.053 UTC [protoutils] ValidateProposalMessage -> WARN 094 channel [mychannel]: MSP error: the supplied identity is not valid: x509: certificate signed by unknown authority 2019-05-21 06:59:51.054 UTC [comm.grpc.server] 1 -> INFO 095 unary call completed {"grpc.start_time": "2019-05-21T06:59:51.053Z", "grpc.service": "protos.Endorser", "grpc.method": "ProcessProposal", "grpc.peer_address": "172.20.0.1:37322", "error": "access denied: channel [mychannel] creator org [Org1MSP]", "grpc.code": "Unknown", "grpc.call_duration": "668.9µs"}'

nitishbhardwaj19 (Tue, 21 May 2019 07:06:46 GMT):
How are you managing your Enrollment certs? Do you use the same set of certs to create User object which is being generated at the time of enroll?

Randyshu2018 (Tue, 21 May 2019 07:08:04 GMT):
Using fabric-ca interface to register and enroll user and then save the enroment to the samplestore

Randyshu2018 (Tue, 21 May 2019 07:08:54 GMT):
when using user,I get user from samplestore and then setUserContext.

Randyshu2018 (Tue, 21 May 2019 07:10:54 GMT):
I think the user cert is invalid except admin .but I need some method to correct them,do you have any idea

Randyshu2018 (Tue, 21 May 2019 08:38:43 GMT):
tks for your reply,my problem has resolved.

nitishbhardwaj19 (Tue, 21 May 2019 09:12:07 GMT):
sorry, just saw your ping. Good to know that it's resolved now.

DVasin (Tue, 21 May 2019 11:36:26 GMT):
Hi, guys. I,m able to invoke chaincode using Java SDK, changes are commited to ledger, all good, except

DVasin (Tue, 21 May 2019 11:36:26 GMT):
CompletableFuture waiting = channel.sendTransaction(trp); waiting.get(60, TimeUnit.SECONDS);

DVasin (Tue, 21 May 2019 11:36:26 GMT):
This feature never returns and time-outs (despite transaction being commited to ledger)

DVasin (Tue, 21 May 2019 11:36:26 GMT):
I configure channels like this (i,e. adding event hub) Peer peer = client.newPeer("peer0.org1.example.com", "grpc://localhost:7051"); // eventhub name and endpoint in fabcar network EventHub eventHub = client.newEventHub("eventhub01", "grpc://localhost:7053"); // orderer name and endpoint in fabcar network Orderer orderer = client.newOrderer("orderer.example.com", "grpc://localhost:7050"); // channel name in fabcar network Channel channel = client.newChannel("mychannel"); channel.addPeer(peer); channel.addEventHub(eventHub); channel.addOrderer(orderer); channel.initialize(); return channel;

DVasin (Tue, 21 May 2019 11:36:26 GMT):
What am I doing wrong, any ideas?

rickr (Tue, 21 May 2019 11:53:30 GMT):
@smallant Not sure how that is happening. That's the first case of that error code I've seen reported here. I can only _ guess _ you're sending the endorsement to the Orderer twice? May take that to the #fabric-peer-endorser-committer channel.

rickr (Tue, 21 May 2019 11:57:17 GMT):
@sandy There is no *composer* for Java. Work is in progress for Java programming model. It only I think covers transactions ( invoking chiancode ) https://github.com/hyperledger/fabric-gateway-java

rickr (Tue, 21 May 2019 12:01:32 GMT):
@nitishbhardwaj19 Yes the application needs to manage persisting it's data. The SampleStore and SampleOrg have a simple implementation of it.

rickr (Tue, 21 May 2019 12:04:47 GMT):
@darapich92 Depends on serveral factors like in the configblock there is a batch size that will trigger a block to be created once that's reached and a some timeout. For exact details ask on #fabric-orderer

rickr (Tue, 21 May 2019 12:08:02 GMT):
@DVasin not directly releated to your question but eventhubs have long been deprecated. What version of fabric/sdk are you using? Up the time 5min ? see what happens.

rickr (Tue, 21 May 2019 12:08:02 GMT):
@DVasin not directly releated to your question but eventhubs have long been deprecated. What version of fabric/sdk are you using? Up the time 5min ? see what happens. Also putting the sdk to logging trace mode shows if events are being received and after about 10 min there is a cleanup thread that kicks off and should report with a warning for any transactions that have not received a response.

smallant (Tue, 21 May 2019 12:23:17 GMT):
Thank you, I'll redirect my question to there

darapich92 (Tue, 21 May 2019 15:07:15 GMT):
@rickr thank you very much. i will the same question to the recommended group. all the best!

horse (Tue, 21 May 2019 18:11:52 GMT):
Has joined the channel.

DarionHernandez (Tue, 21 May 2019 23:35:05 GMT):
Has joined the channel.

darapich92 (Wed, 22 May 2019 02:09:25 GMT):
@rickr hi, i am sorry to ask you but i eager to know the solution to insert multi Tx in a block. Could you guide me how to configblock?

kakali (Wed, 22 May 2019 03:22:43 GMT):
can anyone help me? I need an example for connecting fabric by sdk-java

Randyshu2018 (Wed, 22 May 2019 05:19:05 GMT):

Clipboard - May 22, 2019 1:17 PM

tehsunnliu (Wed, 22 May 2019 07:06:38 GMT):
Has joined the channel.

tballast (Wed, 22 May 2019 08:44:29 GMT):
@kakali Take a look at this file: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java Using the resources here: https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/fixture/sdkintegration This is a good example of what the SDK can do. There are a lot of other examples there too, but this at least covers the basics.

chill37 (Wed, 22 May 2019 10:36:48 GMT):
Invoke hangs when peer container irrelevant to endorsing is stopped. I’m not sure if it’s a bug, something I did wrong, or just-is by design. Thanks for looking into it! Current Setup: BYFN Solo Network Simulation: - query and invoke using service discovery - I stop peer container (docker stop peer0.org1.example.com) - Query still works fine - Invoke HANGS forever My Reasoning is: Discovered peers are only 3 (through network discovery) But, eventing peers are 4 (when called within channel.sendTransaction()) 1 event still waiting for reply to be completed Is this the reason or am I doing something wrong? I believe that network discovery should also refresh the peer list of channel.getPeers() --------logs---------- Discovered Peers 2019-05-22T18:13:08.471 INFO o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 222 - Channel mychannel doing discovery with peer: Peer peer1.org1.example.com:8051 url: grpcs://peer1.org1.example.com:8051 2019-05-22T18:13:08.477 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 309 - Channel mychannel discovered orderer MSPID: OrdererMSP, endpoint: orderer.example.com:7050 2019-05-22T18:13:08.477 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org1MSP, endpoint: peer1.org1.example.com:8051 2019-05-22T18:13:08.478 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org2MSP, endpoint: peer1.org2.example.com:10051 2019-05-22T18:13:08.478 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org2MSP, endpoint: peer0.org2.example.com:9051 2019-05-22T18:13:08.478 DEBUG o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 346 - Channel mychannel service discovery completed: true getEventingPeers 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer1.org2.example.com:10051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer0.org1.example.com:7051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer0.org2.example.com:9051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer1.org1.example.com:8051

chill37 (Wed, 22 May 2019 10:36:48 GMT):
Invoke hangs when peer container irrelevant to endorsing is stopped. I’m not sure if it’s a bug, something I did wrong, or just-is by design. Thanks for looking into it! Current Setup: BYFN Solo Network Simulation: - query and invoke using service discovery - I stop peer container (docker stop peer0.org1.example.com) - Query still works fine - Invoke HANGS forever My Reasoning is: - Discovered peers are only 3 (through network discovery) - But, eventing peers are 4 (when called within channel.sendTransaction()) - 1 event still waiting for reply to be completed Is this the reason or am I doing something wrong? I believe that network discovery should also refresh the peer list of channel.getPeers() --------logs---------- Discovered Peers 2019-05-22T18:13:08.471 INFO o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 222 - Channel mychannel doing discovery with peer: Peer peer1.org1.example.com:8051 url: grpcs://peer1.org1.example.com:8051 2019-05-22T18:13:08.477 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 309 - Channel mychannel discovered orderer MSPID: OrdererMSP, endpoint: orderer.example.com:7050 2019-05-22T18:13:08.477 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org1MSP, endpoint: peer1.org1.example.com:8051 2019-05-22T18:13:08.478 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org2MSP, endpoint: peer1.org2.example.com:10051 2019-05-22T18:13:08.478 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org2MSP, endpoint: peer0.org2.example.com:9051 2019-05-22T18:13:08.478 DEBUG o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 346 - Channel mychannel service discovery completed: true getEventingPeers 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer1.org2.example.com:10051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer0.org1.example.com:7051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer0.org2.example.com:9051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer1.org1.example.com:8051

chill37 (Wed, 22 May 2019 10:36:48 GMT):
Invoke hangs when peer container irrelevant to endorsing is stopped. I’m not sure if it’s a bug, something I did wrong, or just-is by design. Thanks for looking into it! Current Setup: BYFN Solo Network Simulation: - query and invoke using service discovery - I stop peer container (docker stop peer0.org1.example.com) - Query still works fine - Invoke HANGS forever My Reasoning is: - Discovered peers are only 3 (through network discovery) - But, eventing peers are 4 (when called within channel.sendTransaction()) - 1 event still waiting for reply to be completed Is this the reason or am I doing something wrong? I believe that network discovery should also refresh the peer list of channel.getPeers() --------code--------- (few option codes omitted) responses = channel.sendTransactionProposalToEndorsers(request, discoveryOptions); CompletableFuture cf = channel.sendTransaction(responses, transactionOptions); cf.get(); --------logs---------- Discovered Peers 2019-05-22T18:13:08.471 INFO o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 222 - Channel mychannel doing discovery with peer: Peer peer1.org1.example.com:8051 url: grpcs://peer1.org1.example.com:8051 2019-05-22T18:13:08.477 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 309 - Channel mychannel discovered orderer MSPID: OrdererMSP, endpoint: orderer.example.com:7050 2019-05-22T18:13:08.477 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org1MSP, endpoint: peer1.org1.example.com:8051 2019-05-22T18:13:08.478 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org2MSP, endpoint: peer1.org2.example.com:10051 2019-05-22T18:13:08.478 TRACE o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 330 - Channel mychannel discovered peer MSPID: Org2MSP, endpoint: peer0.org2.example.com:9051 2019-05-22T18:13:08.478 DEBUG o.h.f.s.ServiceDiscovery [http-nio-8080-exec-5] 346 - Channel mychannel service discovery completed: true getEventingPeers 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer1.org2.example.com:10051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer0.org1.example.com:7051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer0.org2.example.com:9051 2019-05-22T18:13:27.373 INFO c.l.b.f.f.c.FabricClient [pool-17-thread-1] 631 - ####:peer1.org1.example.com:8051

rickr (Wed, 22 May 2019 12:07:52 GMT):
@Randyshu2018 The most universal format would be a PEM encoded google it some https://www.programcreek.com/java-api-examples/?api=org.bouncycastle.util.io.pem.PemWriter would probably give best results

rickr (Wed, 22 May 2019 12:27:28 GMT):
@chill37 By default the sdk will listen to all eventing peers on the channel. The sendTransaction _by default_ will wait on all eventingPeers to see the block with the transaction. You can change that and specify on that method specific peers, or no peers at all just send it to the orderer. If a peer does not report like in your case the sdk continues to try to connect and block events in the case it just a network glitch or temporary issue with the peer. Given a network is involved their can't be any guarantee a peer will report. On the future can set a timeout. Your application needs to know how it should do recovery.

rickr (Wed, 22 May 2019 12:27:28 GMT):
@chill37 By default the sdk will listen to all eventing peers on the channel. The sendTransaction _by default_ will wait on all eventingPeers to see the block with the transaction. You can change that and specify on that method specific peers, or no peers at all just send it to the orderer. If a peer does not report like in your case the sdk continues to try to reconnect to get block events in the case it just a network glitch or temporary issue with the peer. Given a network is involved their can't be any guarantee a peer will report. On the future can set a timeout. Your application needs to know how it should do recovery.

chill37 (Wed, 22 May 2019 12:31:17 GMT):
@rickr I see. So you are saying this result is by design. In case one peer is lost for quite some time, wouldn't it be nice for sendTransaction() to have an option such as 'wait only on peers who participated on Proposal', namely the peers in proposal response? Just a thought.

chill37 (Wed, 22 May 2019 12:46:02 GMT):
anyway, thanks for making it clear! I wasn't so sure if I was doing anything wrong :joy:

rickr (Wed, 22 May 2019 12:48:25 GMT):
I think it's a situation where the sdk is caught in the middle. There is never IMO going to be a behavior that every application is going to like. You do know the peers that endorsed. You should be able to specify them on the sendTransaction

chill37 (Wed, 22 May 2019 12:51:51 GMT):
yes. now that I'm sure, I'll have to implement it. Thanks as always!

Randyshu2018 (Wed, 22 May 2019 14:17:07 GMT):
tks u , but the private key created by fabric-ca-java also doesn't work with fabric-sdk-node...the key file's length is longer than others.

nitishbhardwaj19 (Wed, 22 May 2019 18:08:41 GMT):
Hi @rickr I get an Exception when I try to reload PrivateKey instance from the privateKeyString which is generated by Enrollment object.``` ``java.security.InvalidKeyException: IOException : version mismatch: (supported: 00, parsed: 01 at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:352) ~[na:1.8.0_152] at sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:357) ~[na:1.8.0_152] at sun.security.ec.ECPrivateKeyImpl.(ECPrivateKeyImpl.java:73) ~[sunec.jar:1.8.0_161] at sun.security.ec.ECKeyFactory.implGeneratePrivate(ECKeyFactory.java:237) ~[sunec.jar:1.8.0_161] at sun.security.ec.ECKeyFactory.engineGeneratePrivate(ECKeyFactory.java:165) ~[sunec.jar:1.8.0_161] at java.security.KeyFactory.generatePrivate(KeyFactory.java:372) ~[na:1.8.0_152]` ```

nitishbhardwaj19 (Wed, 22 May 2019 18:09:05 GMT):
Any ideas about this?

nitishbhardwaj19 (Wed, 22 May 2019 18:10:06 GMT):
`enrollment.setCert(base64Certs); //final byte[] keyBytes = user.getPrivatekeyString().getBytes(); final byte[] privateKeyBytes = Base64.getDecoder().decode(user.getPrivatekeyString()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes); KeyFactory kf = KeyFactory.getInstance(user.getPrivateKeyAlgotithm()); PrivateKey privKey = kf.generatePrivate(keySpec); enrollment.setKey(privKey);`

nitishbhardwaj19 (Wed, 22 May 2019 18:10:06 GMT):
``enrollment.setCert(base64Certs); //final byte[] keyBytes = user.getPrivatekeyString().getBytes(); final byte[] privateKeyBytes = Base64.getDecoder().decode(user.getPrivatekeyString()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes); KeyFactory kf = KeyFactory.getInstance(user.getPrivateKeyAlgotithm()); PrivateKey privKey = kf.generatePrivate(keySpec); enrollment.setKey(privKey);``

nitishbhardwaj19 (Wed, 22 May 2019 18:10:06 GMT):
``enrollment.setCert(base64Certs); //final byte[] keyBytes = user.getPrivatekeyString().getBytes(); final byte[] privateKeyBytes = Base64.getDecoder().decode(user.getPrivatekeyString()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes); KeyFactory kf = KeyFactory.getInstance(user.getPrivateKeyAlgotithm()); PrivateKey privKey = kf.generatePrivate(keySpec); enrollment.setKey(privKey);`

nitishbhardwaj19 (Wed, 22 May 2019 18:10:06 GMT):
`enrollment.setCert(base64Certs); //final byte[] keyBytes = user.getPrivatekeyString().getBytes(); final byte[] privateKeyBytes = Base64.getDecoder().decode(user.getPrivatekeyString()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes); KeyFactory kf = KeyFactory.getInstance(user.getPrivateKeyAlgotithm()); PrivateKey privKey = kf.generatePrivate(keySpec); enrollment.setKey(privKey);`

nitishbhardwaj19 (Wed, 22 May 2019 18:10:06 GMT):
Gets the Exception at PrivateKey privKey = kf.generatePrivate(keySpec);``` ``enrollment.setCert(base64Certs); //final byte[] keyBytes = user.getPrivatekeyString().getBytes(); final byte[] privateKeyBytes = Base64.getDecoder().decode(user.getPrivatekeyString()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyBytes); KeyFactory kf = KeyFactory.getInstance(user.getPrivateKeyAlgotithm()); PrivateKey privKey = kf.generatePrivate(keySpec); enrollment.setKey(privKey);`

nitishbhardwaj19 (Wed, 22 May 2019 18:17:54 GMT):
privateKeyString:``` ` public static String getPEMStringFromPrivateKey(PrivateKey privateKey) throws IOException { StringWriter pemStrWriter = new StringWriter(); JcaPEMWriter pemWriter = new JcaPEMWriter(pemStrWriter); pemWriter.writeObject(privateKey); pemWriter.close(); String privateKeyString = pemStrWriter.toString(); privateKeyString = privateKeyString.replaceAll("\\\r\n", "").replace("-----BEGIN EC PRIVATE KEY-----", "").replace("-----END EC PRIVATE KEY-----", ""); return privateKeyString; }`` ```

nitishbhardwaj19 (Wed, 22 May 2019 18:17:54 GMT):
I even tried this:``` `` final Reader pemReader = new StringReader(user.getPrivatekeyString()); PrivateKeyInfo pemPair = null; try (PEMParser pemParser = new PEMParser(pemReader)) { pemPair = (PrivateKeyInfo) pemParser.readObject(); } catch (IOException e) { e.printStackTrace(); } try { PrivateKey privateKey = new JcaPEMKeyConverter().setProvider(BouncyCastleProvider.PROVIDER_NAME).getPrivateKey(pemPair); enrollment.setKey(privateKey); } catch (PEMException e) { e.printStackTrace(); }`

nitishbhardwaj19 (Wed, 22 May 2019 18:57:12 GMT):
But I get *ClassCastException org.bouncycastle.openssl.PEMKeyPair cannot be cast to org.bouncycastle.asn1.pkcs.PrivateKeyInfo*. I am not doing string.replace operation anymore while saving the keys.``` ```

Antimttr (Wed, 22 May 2019 19:06:43 GMT):
yeah i ran into the same thing

Antimttr (Wed, 22 May 2019 19:06:43 GMT):
@nitishbhardwaj19 yeah i ran into the same thing

Antimttr (Wed, 22 May 2019 19:06:50 GMT):
i ended up using some helper functions to get it working

Antimttr (Wed, 22 May 2019 19:08:23 GMT):
uses a deprecated function but it seems to work just fine

Antimttr (Wed, 22 May 2019 19:08:23 GMT):
uses a deprecated library but it seems to work just fine

Antimttr (Wed, 22 May 2019 19:08:27 GMT):
``` /** * This function uses PEMWriter to extract a PEM encoded string from a private key object. * @param privateKey The private key object which contains the private key to use to extract the PEM string. * @return String Returns a PEM encoded string * @throws IOException From PEMWriter */ public static String getPEMStringFromPrivateKey(PrivateKey privateKey) throws IOException { StringWriter pemStrWriter = new StringWriter(); PEMWriter pemWriter = new PEMWriter(pemStrWriter); pemWriter.writeObject(privateKey); pemWriter.close(); return pemStrWriter.toString(); } /** * This method utilizes the bouncycastle OpenSSL library to parse a PEM encoded Key and converts it into a KeyPair * object. * @param pkcs8key String PEM encoded key string * @return KeyPair Object contains the decoded values from the PEM key */ public static KeyPair keyToValue(String pkcs8key) { Reader rdr = new StringReader(pkcs8key); KeyPair pair = null; try { Object parsed = new org.bouncycastle.openssl.PEMParser(rdr).readObject(); pair = new org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter().getKeyPair((org.bouncycastle.openssl.PEMKeyPair) parsed); } catch(Exception e) { System.out.println("ERROR: Unable to generate enrollment: " + e.getMessage()); e.printStackTrace(); return null; } return pair; } /** * This method utilizes the Bouncycastle OpenSSL library to extract a PrivateKey object from a PEM encoded byte * stream. * @param data The byte array which contains the stream. * @return PrivateKey An object which contains the decoded private key. * @throws IOException From Bouncycastle. */ public static PrivateKey getPrivateKeyFromBytes(byte[] data) throws IOException { final Reader pemReader = new StringReader(new String(data)); final PrivateKeyInfo pemPair; try (PEMParser pemParser = new PEMParser(pemReader)) { pemPair = (PrivateKeyInfo) pemParser.readObject(); } Security.addProvider(new BouncyCastleProvider()); PrivateKey privateKey = new JcaPEMKeyConverter() .setProvider(BouncyCastleProvider.PROVIDER_NAME).getPrivateKey(pemPair); return privateKey; } ```

nitishbhardwaj19 (Thu, 23 May 2019 04:53:03 GMT):
@Antimttr Thanks for sharing this. But, I am getting classCastExcetion: java.lang.ClassCastException: org.bouncycastle.openssl.PEMKeyPair cannot be cast to org.bouncycastle.asn1.pkcs.PrivateKeyInfo

nitishbhardwaj19 (Thu, 23 May 2019 05:12:04 GMT):
I got another reference, may be it will help someone``` `/** * Reads a base64-format PEM key and returns a Java PrivateKey for it. * @param privateKey PEM-encoded private key */ public static PrivateKey readPrivateKey(String privateKey) { try (StringReader keyReader = new StringReader(privateKey); PEMParser pemReader = new PEMParser(keyReader)) { JcaPEMKeyConverter converter = new JcaPEMKeyConverter(); Object keyPair = pemReader.readObject(); if (keyPair instanceof PrivateKeyInfo) { return converter.getPrivateKey((PrivateKeyInfo) keyPair); } else { return converter.getPrivateKey(((PEMKeyPair) keyPair).getPrivateKeyInfo()); } } catch (IOException x) { // Shouldn't occur, since we're only reading from strings throw new RuntimeException(x); } }` ```

Subhankar 3 (Thu, 23 May 2019 07:07:55 GMT):
what is difference between channel.addPeer() and channel.joinPeer() in sdk?

kakali (Thu, 23 May 2019 08:10:31 GMT):
@tballast thanks

SatheeshNehru (Thu, 23 May 2019 10:45:48 GMT):
how to use getcreator api it returns byte array is there any possibility of getting sumbmitter id??

rickr (Thu, 23 May 2019 11:05:07 GMT):
@Subhankar 3 see Readme.md .. good to read it end2end :wink:

rickr (Thu, 23 May 2019 11:06:37 GMT):
@SatheeshNehru You should be getting the certificate of the person that signed the proposal

Jelle.Diet (Thu, 23 May 2019 12:27:00 GMT):
Is it possible to use the fabric java sdk with JDK 1.7?

Antimttr (Thu, 23 May 2019 14:40:24 GMT):
@rickr does the java sdk have any facilities to help adding an org to a channel? specifically can you create teh channel update difference pb/json files? Also can it perform the signature on those files? if there's any example code for these processes please let me know

rickr (Thu, 23 May 2019 14:45:07 GMT):
Updating a channel is listed in the README.md.

Antimttr (Thu, 23 May 2019 14:54:53 GMT):
right that has updating a channel configuration but specifically for the tasks needed to add an org to teh channel you have to use this command: `jq -s '.[0] * {"channel_group":{"groups":{"Application":{"groups": {"Org3MSP":.[1]}}}}}' config.json ./channel-artifacts/org3.json > modified_config.json` or something like it

Antimttr (Thu, 23 May 2019 14:55:16 GMT):
would i still need to run this command externally? or does the sdk provide facilities for performing the same action?

Antimttr (Thu, 23 May 2019 14:56:05 GMT):
seems like the jq command and the cryptotxgen commands will need to be run externally if im not mistaken?

Antimttr (Thu, 23 May 2019 14:56:05 GMT):
seems like the jq command and the configtxgen commands will need to be run externally if im not mistaken?

Antimttr (Thu, 23 May 2019 15:21:22 GMT):
So after reading https://hyperledger-fabric.readthedocs.io/en/release-1.4/channel_update_tutorial.html multiple times I have formulated a multi step proccess for creating a new org and joining it to a channel:

Antimttr (Thu, 23 May 2019 15:22:20 GMT):
1. create the new org's crypto artifacts using cryptogen from base artifact files

Antimttr (Thu, 23 May 2019 15:22:49 GMT):
2. modify and update the channel with the new crypto material generated in step 1

Antimttr (Thu, 23 May 2019 15:22:49 GMT):
2. modify and update the channel config with the new crypto material generated in step 1

Antimttr (Thu, 23 May 2019 15:23:56 GMT):
3. configure leader elections on the new org's peers and join them to the channel

Antimttr (Thu, 23 May 2019 15:24:44 GMT):
4. update the channels chaincode with the new policy which includes the new organization

Antimttr (Thu, 23 May 2019 15:24:44 GMT):
4. update the channels chaincode with the new policy which includes the new organization (this would constitute a new version of the chaincode on the channel)

Antimttr (Thu, 23 May 2019 15:25:32 GMT):
@rickr let me know if im missing anything

Antimttr (Thu, 23 May 2019 15:26:43 GMT):
seems like step one will still require the running of cryptogen which is not something the sdk deals with

Antimttr (Thu, 23 May 2019 15:27:42 GMT):
and step 2 modifying the json configuration would be something best left to the jq utility, in the example sdk code they make a very simple modification, replacing a value of an existing json key with a different value. but adding a new org is going to be a lot more modification than that

Antimttr (Thu, 23 May 2019 15:28:22 GMT):
@rickr have you ever performed all this with just the sdk only? or would you use the external tools as well?

rickr (Thu, 23 May 2019 15:49:21 GMT):
@Antimttr I have not. (honest!) The SDK does provides the means to send channel updates blocks which is needed. It admittedly keeps it simple (changing batch timeout) to keep the test and example simple. The change requires modifying json representation for changes. How the application does that is not up to the SDK. For any details on specific changes I don't feel its up to each SDK to document. Fabric documentations needs to provide and give help in appropriate rocket chat channel #fabric-questions .

Antimttr (Thu, 23 May 2019 15:52:28 GMT):
one thing i've noticed is that the doc i linked above uses command line configtxlator, where as the sdk example uses an RESTful API version of it running in a docker image. I'm curious how i could translate the commands in the doc to API calls that you use in the SDK example

Antimttr (Thu, 23 May 2019 15:52:47 GMT):
i suppose theres a document somewhere on how to use the configtxlator docker image api somewhere

Antimttr (Thu, 23 May 2019 15:52:47 GMT):
i suppose theres a document somewhere on how to use the configtxlator docker image api

Antimttr (Thu, 23 May 2019 15:55:37 GMT):
actualy the doc uses configtxgen not configtxlator

rickr (Thu, 23 May 2019 15:56:08 GMT):
I _think_ the REST APIs are limited to what's shown in the JSDK which is to get a json representations and update blocks which is shown to do the changes.

Antimttr (Thu, 23 May 2019 15:57:52 GMT):
ok i think i found the doc for the api here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/configtxlator.html

kn3118 (Thu, 23 May 2019 16:36:39 GMT):
Has joined the channel.

Antimttr (Thu, 23 May 2019 16:57:49 GMT):
is calling `fooChannel.getChannelConfigurationBytes()` equivilent to the following command: `peer channel fetch config config_block.pb -o orderer.example.com:7050 -c $CHANNEL_NAME --tls --cafile $ORDERER_CA` ?

Antimttr (Thu, 23 May 2019 18:53:53 GMT):
@rickr in order to join the peers of a newly added org to the channel we have to pass it the genesis block. Using peer commands you do this: `peer channel join -b mychannel.block` I was looking for some equivalent option in

Antimttr (Thu, 23 May 2019 18:53:53 GMT):
@rickr in order to join the peers of a newly added org to the channel we have to pass it the genesis block. Using peer commands you do this: `peer channel join -b mychannel.block` I was looking for some equivalent option in `channel.joinPeer()` but i couldn't find a way to specify a block to pass in. do you know if there is a way of doing this with the jsdk?

Antimttr (Thu, 23 May 2019 18:55:23 GMT):
or does this command automatically grab the genesis block on the channel as part of its regular operation?

Antimttr (Thu, 23 May 2019 18:56:55 GMT):
looking at the decompiled byte code i do see that it is grabbing the genesis block: `this.genesisBlock = this.getGenesisBlock(orderer);`

Antimttr (Thu, 23 May 2019 18:57:22 GMT):
so maybe i dont need to pass it explicitly

rickr (Thu, 23 May 2019 19:41:00 GMT):
just use the joinPeer command the sdk has

kevinkbc (Thu, 23 May 2019 19:50:42 GMT):
hey everyone, how can the sdk retry failed transactions? Is there any test that can shed some light on this @rickr ?

rickr (Thu, 23 May 2019 20:05:00 GMT):
@kevinkbc Nope, because the SDK doesn't retry failed transactionsl

Randyshu2018 (Fri, 24 May 2019 01:34:34 GMT):
Why HFCAClient.enroll() doesn't return root certificate and certificate chain?

Randyshu2018 (Fri, 24 May 2019 07:17:01 GMT):

Clipboard - May 24, 2019 3:16 PM

rickr (Fri, 24 May 2019 11:28:02 GMT):
Why do you need it?

nitishbhardwaj19 (Fri, 24 May 2019 13:09:39 GMT):
@rickr @Antimttr Thanks for your quick responses guys. You guys rock. I need your help again :)

nitishbhardwaj19 (Fri, 24 May 2019 13:11:07 GMT):
I am trying to do a query on a basic Balance-Transfer setup. My Fabric network is already up and running. I have added all the required details in connection.json and loading it in netwrokConfig.

nitishbhardwaj19 (Fri, 24 May 2019 13:12:36 GMT):
How do I connect to the channel which is preconfigured and has required config in connection.json? I have created a new instance of HFClient but it doesn't have the channel details.

nitishbhardwaj19 (Fri, 24 May 2019 13:12:59 GMT):

HFClient

nitishbhardwaj19 (Fri, 24 May 2019 13:16:00 GMT):
@rickr & @Antimttr Just went through docs again and found that there is a method, * loadChannelFromConfig(String channelName, NetworkConfig networkConfig)* I guess that should do the job. Let me give it a shot

nitishbhardwaj19 (Fri, 24 May 2019 13:16:33 GMT):
Oh, the method is in HFClient class in case someone wants to know it.

Jelle.Diet (Fri, 24 May 2019 13:17:19 GMT):
Channel newChannel = hfClient.loadChannelFromConfig("CHANNEL_NAME", networkConfig); newChannel.initialize();

nitishbhardwaj19 (Fri, 24 May 2019 13:18:52 GMT):
Thanks @Jelle.Diet :) You guys rock.

kevinkbc (Fri, 24 May 2019 13:19:10 GMT):
So if I need a retry, I should actually send a new transaction with the same data?

kevinkbc (Fri, 24 May 2019 13:40:35 GMT):
Or there is some way to retry using chaincode?

nitishbhardwaj19 (Fri, 24 May 2019 13:51:28 GMT):
@Jelle.Diet Why does it requires to set UserContext just to load channelConfig?

nitishbhardwaj19 (Fri, 24 May 2019 13:54:05 GMT):
All I wanted is to initial HFClient first with all the configured channels and get it ready to be injected as a Bean dependency. I was planning to set the UserContext in all the subsequent requests for performing operation.

rickr (Fri, 24 May 2019 14:11:07 GMT):
There is _no magic_ You need to get enough valid endorsements and keep trying Once enough endorsements have been obtained, send them to the Orderer. If you don't observe via the peer eventing or querying for the transaction and fiind that the transaction is valid ... you need to start over with getting endorsements again. rinse, repeat till successfull

balamcyril (Fri, 24 May 2019 14:20:35 GMT):
Hello, i want to know how unlinkability and anonymity is provide by using Idemix Credential since CA and MSP have acces to client information?

Jelle.Diet (Fri, 24 May 2019 14:36:08 GMT):
you need to pass the peerAdmin UserContext because the channel needs a signer

nitishbhardwaj19 (Fri, 24 May 2019 14:45:03 GMT):
Yeah, that's what I am passing at he moment. But, I just confused about why it's needed as the channel is already configured and running over actual network. The config is just has it's pointers

nitishbhardwaj19 (Fri, 24 May 2019 14:45:03 GMT):
Yeah, that's what I am passing at the moment. But, I just confused about why it's needed as the channel is already configured and running over actual network. The config is just has it's pointers

nitishbhardwaj19 (Fri, 24 May 2019 14:45:03 GMT):
Yeah, that's what I am passing at the moment. But, I am just confused about why it's needed as the channel is already configured and running over actual network. The config is just has it's pointers

Jelle.Diet (Fri, 24 May 2019 14:52:37 GMT):
I looked in the code and it forcibly checks if the usercontext, throwing an exception if it's null. I'm not sure why it's 100% needed, maybe @rickr can help?

Jelle.Diet (Fri, 24 May 2019 14:52:37 GMT):
I looked in the code and it forcibly checks the usercontext, throwing an exception if it's null. I'm not sure why it's 100% needed, maybe @rickr can help?

kevinkbc (Fri, 24 May 2019 14:56:33 GMT):
I got it. The issue for me was that I am connecting with IBM cloud and I sent 100 transactions, they were divided into 5 different threads. One thread failed to connect due to network issues and all the 20 transactions that thread would send failed

kevinkbc (Fri, 24 May 2019 14:57:04 GMT):
That is the kind of problem I did not have when I was developing locally with the dockers

nitishbhardwaj19 (Fri, 24 May 2019 15:26:29 GMT):
I am just digging to the code, couldn't see any references which needs usercontext to load channel

JorgeNavarro (Mon, 27 May 2019 07:55:58 GMT):
Hello, what is the function of channel.addEventHub()? Im using java sdk.

nmutter (Mon, 27 May 2019 09:36:31 GMT):
Has joined the channel.

nmutter (Mon, 27 May 2019 09:36:34 GMT):
Hey, I want to setup Peers in different organizations. Therefore, each org will have an own client. I'm searching for instructions on how to create java-sdk-clients for this distributed setup. Like how would a channel creation work with multiple clients? Do all need to use the same serialized channel, or can they create it on their own?...? I just know samples where one client controls all the peers. Would be great if someone has experience with this :)

nmutter (Mon, 27 May 2019 09:39:41 GMT):
as far as I know EventHubs should not be used anymore. registerBlockListener is the replacement for them. but could not find documentation :)

JorgeNavarro (Mon, 27 May 2019 10:07:29 GMT):
in which sdk version should not be used?

nmutter (Mon, 27 May 2019 11:05:22 GMT):
I thought 1.4. But now I saw in the end2end test they still use it https://github.com/hyperledger/fabric-sdk-java/blob/3c1a119595c57f429dfa2f5daa615c471b8e983a/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L904 . Sorry I can not be more helpful, a colleague told me that with the eventhub but i have no document for it

JorgeNavarro (Mon, 27 May 2019 11:10:20 GMT):
@rickr help me pls

akoenig (Mon, 27 May 2019 12:02:47 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/release_v1.1.0_notes.md#fab-6066-jsdk-channel-service-for-events

akoenig (Mon, 27 May 2019 12:02:58 GMT):
here is the link and the information about the eventhubs

akoenig (Mon, 27 May 2019 12:04:18 GMT):
and here is the "link" to the conversation with rickr :) https://chat.hyperledger.org/channel/fabric-sdk-java?msg=cRKBTR4jn7E6KD2Jk

balamcyril (Mon, 27 May 2019 13:10:13 GMT):
hello, which function is verify the userContext in fabric MSP before agree the user to make queries in the network?

balamcyril (Mon, 27 May 2019 13:23:16 GMT):
In fabric-sdk-java implementation of idemix credentia, i don't see when the user is generate a fresh credential before sending the transaction to the peer or orderer. we just see when the user credential is set in user trasaction without any other generation step

Jelle.Diet (Mon, 27 May 2019 13:27:19 GMT):
The user gets his keys and certificate when enrolling, which are then used by the HFClient to send the transaction

balamcyril (Mon, 27 May 2019 13:36:38 GMT):
yes i see this step and i understand that part. but idemix credential is provide anonymity and unlinkability for user during this authentication with the MSP. i get this answer from @mastersingh24 " this credential is actually not used to submit transactions. What actually happens is that the client generates a fresh credential from the enrollment credential and uses that to submit transactions", the i want to know when and where this step is done

Randyshu2018 (Tue, 28 May 2019 01:40:02 GMT):
considering security,I don't want to expose org admin account to peer,so how can i finishing join/install/...for peer node?

AndresMartinezMelgar.itcl (Tue, 28 May 2019 07:48:22 GMT):

Clipboard - May 28, 2019 9:48 AM

AndresMartinezMelgar.itcl (Tue, 28 May 2019 07:49:54 GMT):
Inside peers and orderer logs there arent any error, but when i put "peer chaincode list --instantiated -C channel" i keep receive "chaincode is in version 1.0"

AndresMartinezMelgar.itcl (Tue, 28 May 2019 07:51:26 GMT):
my steps are: 1º install and instantiated chaincode in version 1.0 2º install version 2.0 3º send a upgradeProposalRequest with sdk

AndresMartinezMelgar.itcl (Tue, 28 May 2019 07:52:19 GMT):
Any idea which i am doing wrong?

Jelle.Diet (Tue, 28 May 2019 08:08:48 GMT):
are you sending the transaction afterwards?

AndresMartinezMelgar.itcl (Tue, 28 May 2019 08:09:29 GMT):
yes

AndresMartinezMelgar.itcl (Tue, 28 May 2019 08:09:55 GMT):
channel.sendTransaccion()

Jelle.Diet (Tue, 28 May 2019 08:09:57 GMT):
with your succesful proposal responses?

AndresMartinezMelgar.itcl (Tue, 28 May 2019 08:10:08 GMT):
yes

Jelle.Diet (Tue, 28 May 2019 08:12:01 GMT):
Can't help then sorry, remember that upgrading can take a bit though

AndresMartinezMelgar.itcl (Tue, 28 May 2019 08:12:32 GMT):
ok, i wait a bit more

AndresMartinezMelgar.itcl (Tue, 28 May 2019 08:13:41 GMT):
ok. this take a lot of time but it works

AndresMartinezMelgar.itcl (Tue, 28 May 2019 08:14:00 GMT):
thx anyway

Jelle.Diet (Tue, 28 May 2019 08:14:18 GMT):
glad it worked at least

JorgeNavarro (Tue, 28 May 2019 08:38:34 GMT):
okay i will read it thank you

Randyshu2018 (Tue, 28 May 2019 09:03:54 GMT):
Is this a bug when requesting getHFCACertificates method with caName? ``` addCAToURL method have been invoked twice. ```

Randyshu2018 (Tue, 28 May 2019 09:03:54 GMT):
Is this a bug when requesting getHFCACertificates method with caName? ``` //addCAToURL method have been invoked twice. String getURL(String endpoint, Map queryMap) throws URISyntaxException, MalformedURLException, InvalidArgumentException { setUpSSL(); String url = addCAToURL(this.url + endpoint); URIBuilder uri = new URIBuilder(url); if (queryMap != null) { for (Map.Entry param : queryMap.entrySet()) { if (!Utils.isNullOrEmpty(param.getValue())) { uri.addParameter(param.getKey(), param.getValue()); } } } return uri.build().toURL().toString(); } String getHTTPAuthCertificate(Enrollment enrollment, String method, String url, String body) throws Exception { Base64.Encoder b64 = Base64.getEncoder(); String cert = b64.encodeToString(enrollment.getCert().getBytes(UTF_8)); body = b64.encodeToString(body.getBytes(UTF_8)); String signString; // Cache the version, so don't need to make info call everytime the same client is used if (newPayloadType == null) { newPayloadType = true; // If CA version is less than 1.4.0, use old payload String caVersion = info().getVersion(); logger.info(format("CA Version: %s", caVersion)); if (Utils.isNullOrEmpty(caVersion)) { newPayloadType = false; } String version = caVersion + "."; if (version.startsWith("1.1.") || version.startsWith("1.2.") || version.startsWith("1.3.")) { newPayloadType = false; } } if (newPayloadType) { url = addCAToURL(url); String file = b64.encodeToString(new URL(url).getFile().getBytes(UTF_8)); signString = method + "." + file + "." + body + "." + cert; } else { signString = body + "." + cert; } byte[] signature = cryptoSuite.sign(enrollment.getKey(), signString.getBytes(UTF_8)); return cert + "." + b64.encodeToString(signature); } ```

Randyshu2018 (Tue, 28 May 2019 09:03:54 GMT):
Is this a bug when requesting getHFCACertificates method with caName? ``` //addCAToURL method has been invoked twice. String getURL(String endpoint, Map queryMap) throws URISyntaxException, MalformedURLException, InvalidArgumentException { setUpSSL(); String url = addCAToURL(this.url + endpoint); URIBuilder uri = new URIBuilder(url); if (queryMap != null) { for (Map.Entry param : queryMap.entrySet()) { if (!Utils.isNullOrEmpty(param.getValue())) { uri.addParameter(param.getKey(), param.getValue()); } } } return uri.build().toURL().toString(); } String getHTTPAuthCertificate(Enrollment enrollment, String method, String url, String body) throws Exception { Base64.Encoder b64 = Base64.getEncoder(); String cert = b64.encodeToString(enrollment.getCert().getBytes(UTF_8)); body = b64.encodeToString(body.getBytes(UTF_8)); String signString; // Cache the version, so don't need to make info call everytime the same client is used if (newPayloadType == null) { newPayloadType = true; // If CA version is less than 1.4.0, use old payload String caVersion = info().getVersion(); logger.info(format("CA Version: %s", caVersion)); if (Utils.isNullOrEmpty(caVersion)) { newPayloadType = false; } String version = caVersion + "."; if (version.startsWith("1.1.") || version.startsWith("1.2.") || version.startsWith("1.3.")) { newPayloadType = false; } } if (newPayloadType) { url = addCAToURL(url); String file = b64.encodeToString(new URL(url).getFile().getBytes(UTF_8)); signString = method + "." + file + "." + body + "." + cert; } else { signString = body + "." + cert; } byte[] signature = cryptoSuite.sign(enrollment.getKey(), signString.getBytes(UTF_8)); return cert + "." + b64.encodeToString(signature); } ```

AndresMartinezMelgar.itcl (Tue, 28 May 2019 09:34:33 GMT):
if i have a net with 4 peer, then one of them crash down ... how can i get him in to network again? if this peer stand up again ( it have same name, ip, ports...) why dont login in net? I get to join again this peer to channel, but chaincodes are not present when i put peer chaincode list --installed . Must i update my channel? I am using java sdk 1.3

nitishbhardwaj19 (Wed, 29 May 2019 06:14:40 GMT):
It is advisable to use volume mounts such that a peer can resume from the state it went off.

AndresMartinezMelgar.itcl (Wed, 29 May 2019 06:16:59 GMT):
sure, but i dont know if is posible make a volume mounts from /

nmutter (Wed, 29 May 2019 10:26:19 GMT):
push - can someone give me a hint to where to look? I have no problem setting up a network with just one client (which knows all peers and peeradmin accounts), but in reality the parties dont give me their peeradmin account. So the setup has to work distributed and I do not know how

AndresMartinezMelgar.itcl (Wed, 29 May 2019 11:08:29 GMT):
Hi i am trying to upgrade version from 1.0 to 2.0 of my chaincode, but i am receiving this proposal--> 3 are OK and 1 failed( allways fail this one)

AndresMartinezMelgar.itcl (Wed, 29 May 2019 11:08:33 GMT):

Clipboard - 29 de mayo de 2019 13:08

RodrigoMedeiros (Wed, 29 May 2019 17:17:05 GMT):
Has joined the channel.

sejalpawar (Thu, 30 May 2019 10:16:40 GMT):
I have a 3 Org network. Org1 and Org3 form a PDC. When I invoke a transaction, I get the error:

sejalpawar (Thu, 30 May 2019 10:17:07 GMT):
INFO: Invoke Status - FAILURE from peer peer0.org2.example.com May 30, 2019 10:10:52 AM org.app.End2EndIdemix sendTransaction INFO: Received Message: GET_STATE failed: transaction ID: 2f96831e04fc937b24955a9fd80832801663b99da259a9928cd846de2c1e6fed: private data matching public hash version is not available. Public hash version = &version.Height{BlockNum:0x3, TxNum:0x0}, Private data version = (*version.Height)(nil)

sejalpawar (Thu, 30 May 2019 10:17:07 GMT):
INFO: Invoke Status - FAILURE from peer peer0.org2.example.com INFO: Received Message: GET_STATE failed: transaction ID: 2f96831e04fc937b24955a9fd80832801663b99da259a9928cd846de2c1e6fed: private data matching public hash version is not available. Public hash version = &version.Height{BlockNum:0x3, TxNum:0x0}, Private data version = (*version.Height)(nil)

sejalpawar (Thu, 30 May 2019 10:18:05 GMT):
How can I stop Org2 from getting the transaction request? Org2 is not an endorsing peer as per my endorsement policy in yaml file.

sejalpawar (Thu, 30 May 2019 10:18:52 GMT):
But channel.sendTransaction() issues transaction to all peers on channel irrespective of endorsement policy

bestbeforetoday (Thu, 30 May 2019 14:41:26 GMT):
@sejalpawar You can specify a collection of peers to which the proposal should be sent as a second argument to `Channel.sendTransactionProposal()`. Or if you have discovery enabled then perhaps `Channel.sendTransactionProposalToEndorsers()` might work better

sejalpawar (Thu, 30 May 2019 15:03:35 GMT):
@bestbeforetoday I was able to send the request to selected peers but now the block is not being persisted in the chain i.e. the changes made in the transaction are not being reflected

sejalpawar (Thu, 30 May 2019 15:05:54 GMT):
Endorsement Policy: identities: user1: {"role": {"name": "peer", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP user2: {"role": {"name": "peer", "mspId": "Org2MSP"}} user3: {"role": {"name": "peer", "mspId": "Org3MSP"}} policy: # the policy each MUST sign 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. # - signed-by: "user1" #- signed-by: "user2" - signed-by: "user3"

Antimttr (Thu, 30 May 2019 15:07:51 GMT):
yeah if you want it on the chaincode you need to send it to orderers

Antimttr (Thu, 30 May 2019 15:08:00 GMT):
just like you did if you setup a channel configuration change

Antimttr (Thu, 30 May 2019 15:08:05 GMT):
send it to peers first, then orderers

sejalpawar (Thu, 30 May 2019 15:08:55 GMT):
Collection responses = mychannel.sendTransactionProposal(request, peer);

sejalpawar (Thu, 30 May 2019 15:08:57 GMT):
CompletableFuture cf = mychannel.sendTransaction(responses);

sejalpawar (Thu, 30 May 2019 15:09:32 GMT):
I have

Antimttr (Thu, 30 May 2019 15:12:28 GMT):
are you checking the responses to ensure its actually working?

sejalpawar (Thu, 30 May 2019 15:13:09 GMT):
yeah they return success

Antimttr (Thu, 30 May 2019 15:13:14 GMT):
you hsould be able to count the endorsements on the invocation

sejalpawar (Thu, 30 May 2019 15:23:06 GMT):
hey solved! Had to add cf.join() instead of Thread.sleep() post sendTransaction()

sejalpawar (Thu, 30 May 2019 15:23:10 GMT):
Thank you

sejalpawar (Thu, 30 May 2019 15:23:45 GMT):
I am confused though.. why does the function getEndorsingPeers() send request to add peers on the channel?

sejalpawar (Thu, 30 May 2019 15:23:45 GMT):
Endorsement Policy: identities: user1: {"role": {"name": "peer", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP user2: {"role": {"name": "peer", "mspId": "Org2MSP"}} user3: {"role": {"name": "peer", "mspId": "Org3MSP"}} policy: # the policy each MUST sign 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. # - signed-by: "user1" #- signed-by: "user2" - signed-by: "user3"

sejalpawar (Thu, 30 May 2019 15:23:45 GMT):
Oh, I left it for default values. I am guessing the default is true..

sejalpawar (Thu, 30 May 2019 15:23:52 GMT):
all* peers

Antimttr (Thu, 30 May 2019 15:24:11 GMT):
are all your peers set as endorsers?

Antimttr (Thu, 30 May 2019 15:24:13 GMT):
in the network-config

sejalpawar (Thu, 30 May 2019 15:24:50 GMT):
No.. Endorsement Policy: identities: user1: {"role": {"name": "peer", "mspId": "Org1MSP"}} # role member in org with mspid Org1MSP user2: {"role": {"name": "peer", "mspId": "Org2MSP"}} user3: {"role": {"name": "peer", "mspId": "Org3MSP"}} policy: # the policy each MUST sign 1-of: # signed by one of these groups can be -of where is any digit 2-of, 3-of etc.. # - signed-by: "user1" #- signed-by: "user2" - signed-by: "user3"

sejalpawar (Thu, 30 May 2019 15:25:24 GMT):
this is the endorsementPolicy.yaml

Antimttr (Thu, 30 May 2019 15:25:44 GMT):
right, but what about in your network config under channel

Antimttr (Thu, 30 May 2019 15:25:50 GMT):
thats where the roles for the peers are defined

Antimttr (Thu, 30 May 2019 15:26:08 GMT):
``` peer1.org1.example.com: endorsingPeer: false chaincodeQuery: true ledgerQuery: true eventSource: false ```

Antimttr (Thu, 30 May 2019 15:26:11 GMT):
like that

sejalpawar (Thu, 30 May 2019 15:27:30 GMT):
Oh, I left it for default values

sejalpawar (Thu, 30 May 2019 15:27:37 GMT):
I am guessing the default is true

Antimttr (Thu, 30 May 2019 15:27:56 GMT):
if thats the case then all your peers on the hcannel would be defined as endorsers

Antimttr (Thu, 30 May 2019 15:28:06 GMT):
and thats why they're all getting sent the transaction

sejalpawar (Thu, 30 May 2019 15:28:37 GMT):
got it

Antimttr (Thu, 30 May 2019 15:29:02 GMT):
im still a bit confused as to what actually references the network-config.yaml

Antimttr (Thu, 30 May 2019 15:29:22 GMT):
doesnt seem like the nodes actually reference the artifacts directory, other than for cypto assets

Antimttr (Thu, 30 May 2019 15:29:30 GMT):
but maybe i just missed it

sejalpawar (Thu, 30 May 2019 15:30:12 GMT):
Can you point me to where I can find the endorsingPeer setting? as in a sample config file

Antimttr (Thu, 30 May 2019 15:30:25 GMT):
network-config.yaml

Antimttr (Thu, 30 May 2019 15:30:28 GMT):
is where i got that from

Antimttr (Thu, 30 May 2019 15:30:38 GMT):
that one is from the balance-transfer sample

Antimttr (Thu, 30 May 2019 15:31:02 GMT):
im looking for the same file in the first-network sample and i cant locate it

sejalpawar (Thu, 30 May 2019 15:31:44 GMT):
I will try adding the line in docker-compose definition peers?

sejalpawar (Thu, 30 May 2019 15:31:44 GMT):
I will try adding the line in docker-compose definition of peers?

Antimttr (Thu, 30 May 2019 15:31:59 GMT):
``` The network connection profile provides client applications the information about the target # blockchain network that are necessary for the applications to interact with it. These are all # knowledge that must be acquired from out-of-band sources. This file provides such a source. ```

Antimttr (Thu, 30 May 2019 15:32:09 GMT):
so thats from the top of one of the network-config's

Antimttr (Thu, 30 May 2019 15:32:22 GMT):
i guess afaict network-config isnt actually used by the nodes at all

Antimttr (Thu, 30 May 2019 15:32:27 GMT):
and is just for your client to reference

Antimttr (Thu, 30 May 2019 15:33:29 GMT):
im guesssing, not sure about this but im guessing that you're supposed to refer to them when you join a peer to a channel and give it this command:

Antimttr (Thu, 30 May 2019 15:33:33 GMT):
``` channel.joinPeer(peer, Channel.PeerOptions.createPeerOptions() .setPeerRoles(EnumSet.of(Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE))); ```

Antimttr (Thu, 30 May 2019 15:34:00 GMT):
so then you would read that network-config.yaml and figure out which of those values to set for setPeerRoles()

Antimttr (Thu, 30 May 2019 15:34:20 GMT):
i think ill need to fix that in my implementation

sejalpawar (Thu, 30 May 2019 15:35:49 GMT):
I just commented out the endorsement file line while instantiating the chaincode.. and its absense doesnt seem to make any difference

Antimttr (Thu, 30 May 2019 15:36:49 GMT):
right because i think nothing actually refers to that file

Antimttr (Thu, 30 May 2019 15:36:57 GMT):
your app is supposed to when it gives that command above

Antimttr (Thu, 30 May 2019 15:37:05 GMT):
and THAT is when the actual roles for the peers are established

Antimttr (Thu, 30 May 2019 15:37:43 GMT):
are you joining your peers via the sdk or did you one run of those sample scripts to do it?

sejalpawar (Thu, 30 May 2019 15:37:50 GMT):
sdk

Antimttr (Thu, 30 May 2019 15:38:01 GMT):
so what does your joinPeer() call look like?

sejalpawar (Thu, 30 May 2019 15:38:47 GMT):
peer[i][j] = client.newPeer(peerName, "grpcs://localhost:"+String.valueOf(portNo), peerProperties); mychannel.joinPeer(peer[i][j]);

Antimttr (Thu, 30 May 2019 15:39:34 GMT):
so you arent setting peer options...

Antimttr (Thu, 30 May 2019 15:39:40 GMT):
or is that what you're calling peerProperties

sejalpawar (Thu, 30 May 2019 15:40:04 GMT):
No, my peer properties is just for TLS

sejalpawar (Thu, 30 May 2019 15:40:16 GMT):
I am not explicitly setting peer roles

Antimttr (Thu, 30 May 2019 15:40:20 GMT):
right, so maybe its using some defaults then

Antimttr (Thu, 30 May 2019 15:40:28 GMT):
internal defaults to the sdk

Antimttr (Thu, 30 May 2019 15:40:59 GMT):
i went off of the end2end example

Antimttr (Thu, 30 May 2019 15:41:05 GMT):
and they explicitly set peeroptions

sejalpawar (Thu, 30 May 2019 15:42:28 GMT):
Oh okay got it

sejalpawar (Thu, 30 May 2019 15:44:08 GMT):
also, maybe we can create a jira for private data example where in an org is not part of the PDC?

Antimttr (Thu, 30 May 2019 15:47:17 GMT):
yeah i havent messed around with private data much

Antimttr (Thu, 30 May 2019 15:47:30 GMT):
not sure that ill be using it in my application

mahoney1 (Thu, 30 May 2019 15:52:13 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

sejalpawar (Thu, 30 May 2019 15:59:22 GMT):
@Antimttr if I send proposal requests to all peers, collect responses and send only successful responses to orderer would that work?

Antimttr (Thu, 30 May 2019 15:59:57 GMT):
yeah, i dont think sending uncessful requests to the orderers works

Antimttr (Thu, 30 May 2019 15:59:57 GMT):
yeah, i dont think sending unsuccessful requests to the orderers works

sejalpawar (Thu, 30 May 2019 16:00:27 GMT):
okay

Antimttr (Thu, 30 May 2019 16:00:39 GMT):
yeah i put all the successes into their own data structure

Antimttr (Thu, 30 May 2019 16:00:44 GMT):
and only pass those to the orderers

Antimttr (Thu, 30 May 2019 16:01:24 GMT):
though, if i get any failures that also is a breaking condition for my function

sejalpawar (Thu, 30 May 2019 16:02:30 GMT):
Hmmm... we could check for something like 2 out of 3 responses and pass it to orderer

Antimttr (Thu, 30 May 2019 16:03:04 GMT):
im not using dynamic network though

Antimttr (Thu, 30 May 2019 16:03:09 GMT):
my network will always be well defined

SatheeshNehru (Fri, 31 May 2019 12:09:06 GMT):
is there any equvalent java class for clientidentity that is defined in node https://medium.com/@avinashvazratkar446022/attribute-based-access-control-in-hyperledger-fabric-9ed7d7bf9905

hanubc7743 (Sat, 01 Jun 2019 11:56:48 GMT):
Has joined the channel.

nitishbhardwaj19 (Sun, 02 Jun 2019 18:13:50 GMT):
@Antimttr @Jelle.Diet @rickr Has any one faced this? ``` `2019-06-02 23:19:24.466 ERROR 25442 --- [nio-8213-exec-1] o.hyperledger.fabric.sdk.OrdererClient : OrdererClient{id: 14, channel: mychannel, name: orderer.example.com, url: grpcs://localhost:7050} grpc status Code:io exception, Description UNAVAILABLE, javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem```` I am using balance-transfer sample network as a HLF network. It's running on localhost`

nitishbhardwaj19 (Sun, 02 Jun 2019 18:13:50 GMT):
@Antimttr @Jelle.Diet @rickr Has any one faced this? ``` `2019-06-02 23:19:24.466 ERROR 25442 --- [nio-8213-exec-1] o.hyperledger.fabric.sdk.OrdererClient : OrdererClient{id: 14, channel: mychannel, name: orderer.example.com, url: grpcs://localhost:7050} grpc status Code:io exception, Description UNAVAILABLE, javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem```` I am using balance-transfer sample network as a HLF network. It's running on localhost. By default, SSL is enabled`

nitishbhardwaj19 (Sun, 02 Jun 2019 18:13:50 GMT):
@Antimttr @Jelle.Diet @rickr Has any one faced this? ``` `2019-06-02 23:19:24.466 ERROR 25442 --- [nio-8213-exec-1] o.hyperledger.fabric.sdk.OrdererClient : OrdererClient{id: 14, channel: mychannel, name: orderer.example.com, url: grpcs://localhost:7050} grpc status Code:io exception, Description UNAVAILABLE, javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem```` I am using balance-transfer sample network as a HLF network. It's running on localhost. SSL is enabled by default`

nitishbhardwaj19 (Sun, 02 Jun 2019 18:13:50 GMT):
@Antimttr @Jelle.Diet @rickr Has any one faced this? ``` `2019-06-02 23:19:24.466 ERROR 25442 --- [nio-8213-exec-1] o.hyperledger.fabric.sdk.OrdererClient : OrdererClient{id: 14, channel: mychannel, name: orderer.example.com, url: grpcs://localhost:7050} grpc status Code:io exception, Description UNAVAILABLE, javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching localhost found.` I am using balance-transfer sample network as a HLF network. It's running on localhost. SSL is enabled by default`

nitishbhardwaj19 (Mon, 03 Jun 2019 03:48:40 GMT):
Guys, any thoughts on this error? I am stuck with this. Not sure if I am missing any configuration

rickr (Mon, 03 Jun 2019 12:41:44 GMT):
@nitishbhardwaj19 You're connecting with *localhost* I'm _guessing_ that's not what servers certificate is using. Look at hostnameOverride property

rickr (Mon, 03 Jun 2019 12:46:12 GMT):
@SatheeshNehru Not 100% what that class is. But the JSDK has a User interface that has what the SDK needs to sign with.

nmutter (Mon, 03 Jun 2019 16:03:38 GMT):
@rickr can you maybe help me with this? sorry to ping you ... I guess that there are instructions or best practices somewhere (which I don't find).

rickr (Mon, 03 Jun 2019 18:40:54 GMT):
Peers/ Organizations in the *real world* ( think Ford/GM/Toyota ) would not be sharing very little. They'd have their own clients running with their own credentials with own CAs etc

rickr (Mon, 03 Jun 2019 18:40:54 GMT):
Peers/ Organizations in the *real world* ( think Ford/GM/Toyota ) would be sharing very little. They'd have their own clients running with their own credentials with own CAs etc

anand.fast (Tue, 04 Jun 2019 01:21:54 GMT):
Has joined the channel.

nmutter (Tue, 04 Jun 2019 08:21:34 GMT):
I understand. What I don't have is an example or instructions, on how these "own clients" should be implemented to create and join a channel. My first challenge was, to test if my peer is already in a channel, if not I want to join it. But the channel may not exist, so if it does not exist I will create it. I really am doing try and error and not really know where I could find the informations/examples for how to do this best.

Jelle.Diet (Tue, 04 Jun 2019 08:39:44 GMT):
How can I set the hfcaclient timeout for enrollment to a higher value? is there a property in config.properties / Config.java?

rickr (Tue, 04 Jun 2019 12:16:40 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/519cc0a44c90eb84276a8104b805f9053ca073c9/src/main/java/org/hyperledger/fabric_ca/sdk/helper/Config.java#L276-L295

tballast (Tue, 04 Jun 2019 12:29:50 GMT):
@nmutter You've used the examples that ship with the Java SDK right? If you take a look at them, you'll see that the network that comes with it is a 2 org network. In the End2EndIT.java test the client basically loops through all of the organizations, however I believe that in the real world this wouldn't be possible. (Ie. https://github.com/hyperledger/fabric-sdk-java/blob/519cc0a44c90eb84276a8104b805f9053ca073c9/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L162) When it runs the fabric test it actually only uses a single organization though ( https://github.com/hyperledger/fabric-sdk-java/blob/519cc0a44c90eb84276a8104b805f9053ca073c9/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L205 ) So, what I _think_ you can do, is basically have two different client applications where one of them uses the credentials for Org1 and the other for Org2 and then do all the transacting you want with the network. Does that make sense? In a real world application (like Ford/GM), they wouldn't be sharing user credentials with one another. So each client would only have access to the credentials that belong to the respective organizations.

rickr (Tue, 04 Jun 2019 12:39:05 GMT):
@tballast @nmutter Just to add the new Lifecycle example better shows two different orgs cooperating but this is not at all realistic within a single instance of an application. https://github.com/hyperledger/fabric-sdk-java/blob/519cc0a44c90eb84276a8104b805f9053ca073c9/src/test/java/org/hyperledger/fabric/sdkintegration/End2endLifecycleIT.java

nmutter (Tue, 04 Jun 2019 13:06:50 GMT):
thanks @tballast I used the End2EndIT.java for most of my work till now. The End2endLifecycleIT does look more pormising as it basically uses two clients for two orgs, thanks @rickr . I searched such an example for 1.4, but could not find it (and still cant :) ).

rickr (Tue, 04 Jun 2019 13:11:29 GMT):
maybe out of date https://github.com/cr22rc/fabricSDKJavaMultiDomainSample

nmutter (Tue, 04 Jun 2019 14:08:25 GMT):
thanks, will have a look

nitishbhardwaj19 (Thu, 06 Jun 2019 20:08:39 GMT):
You are right @rickr I checked the cert file. Certificates were generated with the name as orderer.example.com

nitishbhardwaj19 (Thu, 06 Jun 2019 20:13:21 GMT):
@rickr I agree, but won't these clients still shares some details about the Org? Like Peers details of different Org which needs to be joined to a channel.

nitishbhardwaj19 (Thu, 06 Jun 2019 20:25:08 GMT):
@Antimttr @rickr If we create peer on the fly(without defining config in network-config.yaml), and join those peers to the channel. Will Channel object be able to figure out who all are endorsing peers at the time of TransactionProposals being sent by its own? Or will it send the proposal to all the peers who has joined the channel?

balamcyril (Fri, 07 Jun 2019 14:03:50 GMT):
hello, i want to understand want the function IdemixCredRequest(BIG sk, BIG issuerNonce, IdemixIssuerPublicKey ipk) is make. He create a zkp of what?

nitishbhardwaj19 (Mon, 10 Jun 2019 01:19:29 GMT):
@rickr @Antimttr @Jelle.Diet Thanks for all your help guys. I have integrated SDK with a HLF network. It's working as expected. I just have one doubt, how do I on-board a new Org? I know that we are suppose to have 1 HFClient per org, but what if I want to host a new instance of SDK for the org who is on-boarding the network. If I do so, how would I add peers of the org which is already a participant to the new orgs HFClient? It would be really great if someone can share their experience with adding a new Org, really appreciate guys

darapich92 (Mon, 10 Jun 2019 03:36:17 GMT):

Screenshot from 2019-06-10 12-35-46.png

nitishbhardwaj19 (Mon, 10 Jun 2019 11:26:38 GMT):
Guys, what must be input for chaincodePath of `InstallProposalRequest` ? I need to install GO_LANG chaincode via inputstream of the chaincode file which I am taking as an input in my API. I checked the code, by default SDK expects a value for chaincodePath else it throws an exception. Therefore, I am just passing a dummy value. But the installProposal fails with an``` Error: gzip: invalid header ```

nitishbhardwaj19 (Mon, 10 Jun 2019 11:26:38 GMT):
Guys, what should be expected input for chaincodePath of `InstallProposalRequest` ? I need to install GO_LANG chaincode via inputstream of the chaincode file which I am taking as an input in my API. I checked the code, by default SDK expects a value for chaincodePath else it throws an exception. Therefore, I am just passing a dummy value. But the installProposal fails with an``` Error: gzip: invalid header ```

nitishbhardwaj19 (Mon, 10 Jun 2019 11:27:40 GMT):
NOTE: I am running SDK and HLF on windows

rickr (Mon, 10 Jun 2019 11:49:10 GMT):
@nitishbhardwaj19 chaincodePath would be like your GO path in that input stream as if it were on a filesystem no difference.

rickr (Mon, 10 Jun 2019 11:50:19 GMT):
@nitishbhardwaj19 add vs join is mentioned in the README.md

nitishbhardwaj19 (Mon, 10 Jun 2019 11:52:09 GMT):
Do I need to have GO installed on my system for it?

nitishbhardwaj19 (Mon, 10 Jun 2019 11:54:10 GMT):
Thanks for replying, I understand the difference between add and join. I just wanted to know what if we are running two instances of SDK, one per org. In that case, how would we enforce that HFClient is in sync with channel information about the peers.

Javi (Mon, 10 Jun 2019 14:26:57 GMT):
Has joined the channel.

Javi (Mon, 10 Jun 2019 14:27:18 GMT):
Hi people! :grinning: I created a chaincode that saves a struct of 6 integers, and I developed a middleware in java using the fabric sdk to write data to the ledger using spring, each request takes ~2 sec to complete, is this normal? how I can reduce this time? I'm using tls on all conections, but 2 seconds is much time for a simple write of 6 values... any idea?

rickr (Mon, 10 Jun 2019 14:50:33 GMT):
Don't follow your question. Know what peers to connect to is out of bound information. You can use service discovery to help with that but even there you'll need to know at least one peer that will be doing the service discovery

Javi (Mon, 10 Jun 2019 15:00:16 GMT):
I measured time to complete in proposal and transaction, these are the results ``` Transaction proposal takes 69 ms to finish Send transaction takes 2250 ms to complete ```

Javi (Mon, 10 Jun 2019 15:00:36 GMT):
I'm testing with a test org with only 1 peer, in my local machine....

nitishbhardwaj19 (Mon, 10 Jun 2019 15:08:38 GMT):
Right, I am sorry for not being clear. Let me re-phrase the question. I have 1 SDK instance which has singleton HFClient. I add Peers, Orderer to HFClient and create a channel and jointhese peers to the Channel. Now, the problem is, that if I am running another instance of SDK for another ORG, how will this org can refresh it's HFClient details like peers of a channel if Org1 adds another peer to the same channel. The channel at network level will definitely have the information about joined peers, but since there are 2 copies of HFClient which has a channel representation needs to be in sync as well.

rickr (Mon, 10 Jun 2019 17:38:54 GMT):
If you don't use service discovery there's no *magic*. Another organization will need _out of bounds_ inform you it running (or not) a new peer in another location. The only reason you would care is to get an endorsment from that peer's organization. Generally just having one is sufficient. Having more than one peer form another organization would give you redundancy and/or possible load sharing.

nitishbhardwaj19 (Mon, 10 Jun 2019 19:28:45 GMT):
Sure, Thanks @rickr.

yerganat (Tue, 11 Jun 2019 08:38:27 GMT):
hello @rickr Now i interested on the fabric The tasks from jira is can be done for every body and do not paid?)

Jelle.Diet (Tue, 11 Jun 2019 09:32:08 GMT):
What would be the best way to set channel batch timeout? Should i follow the UpdateChannelIT example, or can this be set in the connection profile for example?

rickr (Tue, 11 Jun 2019 12:25:11 GMT):
@yerganat Opensource anyone can contribute.

rickr (Tue, 11 Jun 2019 12:26:09 GMT):
@Jelle.Diet Nothing in the connection profile will address batch timeout.

smithbk (Tue, 11 Jun 2019 18:58:48 GMT):
Has left the channel.

nitishbhardwaj19 (Wed, 12 Jun 2019 08:55:07 GMT):
Has anyone tried running the sdk on windows? I am getting a weird error while I try to instantiate the chaincode. ``` ``error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 \"can't load package: package C:/Go: cannot find package \"C:/Go\" in any of:\n\t/opt/go/src/C:/Go (from $GOROOT)\n\t/chaincode/input/src/C:/Go (from $GOPATH)\n\t/opt/gopath/src/C:/Go\n\` ```

nitishbhardwaj19 (Wed, 12 Jun 2019 08:55:41 GMT):
This has to be related to GO, I GOPATH is C:\GO\bin

bestbeforetoday (Wed, 12 Jun 2019 09:48:32 GMT):
I think by default send transaction will, in addition to sending the transaction to the orderer, also wait to receive commit events from all the eventing peers in the network, which can take a while. You can configure different wait options (including not waiting for commits to happen on peers) depending on your performance and consistency requirements.

nitishbhardwaj19 (Wed, 12 Jun 2019 10:26:26 GMT):
I think there is some issue with windows, I don't get any response back for install proposals for JAVA chaincode.

nitishbhardwaj19 (Wed, 12 Jun 2019 10:27:24 GMT):
I recheck, chaincode is successfully installed on peers, but yet, I am don't get any response for channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers());

nitishbhardwaj19 (Wed, 12 Jun 2019 10:27:24 GMT):
I re-checked, chaincode is successfully installed on peers, but yet, I am don't get any response for channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers());

nitishbhardwaj19 (Wed, 12 Jun 2019 10:28:39 GMT):
and it gets timeout in 300 seconds, which is way too long just to instantiate chaincode on a local HLF network,

nitishbhardwaj19 (Wed, 12 Jun 2019 10:28:39 GMT):
and it gets timeout in 300 seconds, which is way too long for just instantiating chaincode on a local HLF network,

nitishbhardwaj19 (Wed, 12 Jun 2019 10:29:27 GMT):
I am not sure if I am missing something. I just followed End2endIT and End2endJavaIT

rickr (Wed, 12 Jun 2019 11:49:35 GMT):
I have in the past heard starting chaincode on windows takes time. I would still try and double that.

nitishbhardwaj19 (Wed, 12 Jun 2019 12:18:12 GMT):
@rickr Thanks a lot, really appreciate your prompt response. It would be of great help!!

nitishbhardwaj19 (Wed, 12 Jun 2019 12:39:19 GMT):
I verified it again, this time it just took 15 seconds to instantiate the chaincode :) Everything worked as expected. Not sure why it wasn't working the whole day. I will get back to you in case I find something else

nitishbhardwaj19 (Wed, 12 Jun 2019 12:58:51 GMT):
May be it could be a network issue. I was connected with a dongle and now I am on a wifi. That's the only change that I see. But bottom line is, it's working as expected. :) Thanks @rickr

nitishbhardwaj19 (Wed, 12 Jun 2019 13:32:19 GMT):
@rickr I am still not sure what should be chaincodePath for installing GO chaincode. Should it be GOPATH?

rickr (Wed, 12 Jun 2019 13:44:51 GMT):
yes relative to where you package .. look at running end2endIT in a debugger you'll see how it's set there.

aatkddny (Thu, 13 Jun 2019 00:15:46 GMT):
@rickr - Are there any significant changes to the network configuration json for 1.4.1 vs 1.4 when moving to raft. If I self-generate the same network configuration as I have for a kafka setup will a channel.loadFromNetworkConfig still work or are there gotchas you can think of off the top of your head? I'm going to have to suck it and see, but figured I'd try to save some time. TIA.

rickr (Thu, 13 Jun 2019 13:32:24 GMT):
@aatkddny I have not tested with Raft. The SDKs _should_ not care what's implementing the Orderer. IMO if it does, it would be a bug on the Fabric side.

hanubc7743 (Thu, 13 Jun 2019 15:32:12 GMT):
Hi, What is the stable version java sdk?

hanubc7743 (Thu, 13 Jun 2019 16:42:55 GMT):
Anyone can share the sample application development by using java sdk?

Charles99 (Thu, 13 Jun 2019 16:48:14 GMT):
Has joined the channel.

Randyshu2018 (Fri, 14 Jun 2019 01:07:26 GMT):
https://github.com/MindtreeLtd/balance-transfer-java

nitishbhardwaj19 (Fri, 14 Jun 2019 02:33:27 GMT):
Hi, I am curious to know when are we expected to use `foo.shutdown(boolean);` What is the recommendation to do so? Should we shut it down after each operation to save resources on sdk?

nitishbhardwaj19 (Fri, 14 Jun 2019 02:33:27 GMT):
Hi, I am curious to know when are we expected to use `channel.shutdown(boolean);` What is the recommendation to do so? Should we shut it down after each operation to save resources on sdk?

nitishbhardwaj19 (Fri, 14 Jun 2019 06:23:34 GMT):

nitishbhardwaj19 - Fri Jun 14 2019 11:53:20 GMT+0530 (India Standard Time).txt

nitishbhardwaj19 (Fri, 14 Jun 2019 06:25:14 GMT):
Hi, I am trying to integrate ServiceDiscovery. I am able to get ProposalResponses using service discovery but, the system just stuck when I call channel.sendTrancation(reponse). Would be great if anyone can share their experience with service discovery. ``` `2019-06-14 11:32:19.033 INFO 1576 --- [io-8213-exec-10] o.h.fabric.sdk.ServiceDiscovery : Channel mychannel doing discovery with peer: Peer{ id: 7, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://peer0.org1.example.com:7051} 2019-06-14 11:32:24.945 INFO 1576 --- [io-8213-exec-10] c.b.f.s.c.TransactionController : Transaction proposal on channel mychannel SUCCESS with transaction id:ae4d94daf9f3bc359095012f11987daaacf4b84c0517b02720ea5ab81e42b10e 2019-06-14 11:32:25.659 INFO 1576 --- [io-8213-exec-10] c.b.f.s.c.TransactionController : invoke chaincode proposal was good 2019-06-14 11:32:32.275 WARN 1576 --- [pool-1-thread-3] o.h.fabric.sdk.PeerEventServiceClient : PeerEventServiceClient{id: 258, channel: mychannel, peerName: peer1.org1.example.com:7051, url: grpc://peer1.org1.example.com:7051} Channel mychannel connect time exceeded for peer eventing service peer1.org1.example.com:7051, timed out at 5000 ms. 2019-06-14 11:32:50.429 INFO 1576 --- [io-8213-exec-10] c.b.f.s.c.TransactionController : Successfully sent and received responses for all transaction proposals 2019-06-14 11:32:59.205 WARN 1576 --- [ault-executor-5] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 270, channel: mychannel, peerName: peer1.org1.example.com:7051, url: grpc://peer1.org1.example.com:7051}, attempts 251. INTERNAL: http2 exception 2019-06-14 11:33:19.444 INFO 1576 --- [pool-3-thread-1] o.h.fabric.sdk.ServiceDiscovery : Channel mychannel doing discovery with peer: Peer{ id: 11, name: peer1.org1.example.com, channelName: mychannel, url: grpcs://peer1.org1.example.com:7056} 2019-06-14 11:33:24.610 WARN 1576 --- [ault-executor-1] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 320, channel: mychannel, peerName: peer1.org1.example.com:7051, url: grpc://peer1.org1.example.com:7051}, attempts 301. INTERNAL: http2 exception 2019-06-14 11:33:50.057 WARN 1576 --- [ault-executor-1] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 370, channel: mychannel, peerName: peer1.org1.example.com:7051, url: grpc://peer1.org1.example.com:7051}, attempts 351. INTERNAL: http2 exception` ```

nitishbhardwaj19 (Fri, 14 Jun 2019 06:28:09 GMT):
Steps to create channel:``` ` channel = hfClient.newChannel(channelName, orderer, channelConfiguration, hfClient.getChannelConfigurationSignature(channelConfiguration, hfClient.getUserContext()));```` sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:");``` channel.setServiceDiscoveryProperties(sdprops);``` channel.joinPeer(newPeer, createPeerOptions().setPeerRoles(EnumSet.of(Peer.PeerRole.SERVICE_DISCOVERY, Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE)));`````` ``` ``` ``` ``` ``` ```

nitishbhardwaj19 (Fri, 14 Jun 2019 06:28:09 GMT):
Steps to create channel:``` ` channel = hfClient.newChannel(channelName, orderer, channelConfiguration, hfClient.getChannelConfigurationSignature(channelConfiguration, hfClient.getUserContext()));` `sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:");` `channel.setServiceDiscoveryProperties(sdprops);` `channel.joinPeer(newPeer, createPeerOptions().setPeerRoles(EnumSet.of(Peer.PeerRole.SERVICE_DISCOVERY, Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE)));```` `channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true));` ``` ``` ``` ``` ``` ``` ``` ```

nitishbhardwaj19 (Fri, 14 Jun 2019 06:28:09 GMT):
Steps to create channel: ` channel = hfClient.newChannel(channelName, orderer, channelConfiguration, hfClient.getChannelConfigurationSignature(channelConfiguration, hfClient.getUserContext())); sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:"); channel.setServiceDiscoveryProperties(sdprops); channel.joinPeer(newPeer, createPeerOptions().setPeerRoles(EnumSet.of(Peer.PeerRole.SERVICE_DISCOVERY, Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE))); responses = channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true)); channel.sendTransaction(responses) `

nitishbhardwaj19 (Fri, 14 Jun 2019 06:28:09 GMT):
Steps to create channel: ` `channel = hfClient.newChannel(channelName, orderer, channelConfiguration, hfClient.getChannelConfigurationSignature(channelConfiguration, hfClient.getUserContext())); sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:"); channel.setServiceDiscoveryProperties(sdprops); channel.joinPeer(newPeer, createPeerOptions().setPeerRoles(EnumSet.of(Peer.PeerRole.SERVICE_DISCOVERY, Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE))); responses = channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true)); channel.sendTransaction(responses) ``

nitishbhardwaj19 (Fri, 14 Jun 2019 06:28:09 GMT):
Steps to create channel: `` channel = hfClient.newChannel(channelName, orderer, channelConfiguration, hfClient.getChannelConfigurationSignature(channelConfiguration, hfClient.getUserContext()));`` ``sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:");`` ``channel.setServiceDiscoveryProperties(sdprops);`` ``channel.joinPeer(newPeer, createPeerOptions().setPeerRoles(EnumSet.of(Peer.PeerRole.SERVICE_DISCOVERY, Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE))); responses = channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true));`` ``channel.sendTransaction(responses)`` `

nitishbhardwaj19 (Fri, 14 Jun 2019 06:28:09 GMT):
Steps to create channel: ` channel = hfClient.newChannel(channelName, orderer, channelConfiguration, hfClient.getChannelConfigurationSignature(channelConfiguration, hfClient.getUserContext()));` `sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:");` `channel.setServiceDiscoveryProperties(sdprops);` `channel.joinPeer(newPeer, createPeerOptions().setPeerRoles(EnumSet.of(Peer.PeerRole.SERVICE_DISCOVERY, Peer.PeerRole.ENDORSING_PEER, Peer.PeerRole.LEDGER_QUERY, Peer.PeerRole.CHAINCODE_QUERY, Peer.PeerRole.EVENT_SOURCE)));` `responses = channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM)` `.setForceDiscovery(true));` `channel.sendTransaction(responses)`

nitishbhardwaj19 (Fri, 14 Jun 2019 06:36:08 GMT):
Have I missed something?

SatheeshNehru (Fri, 14 Jun 2019 07:08:38 GMT):
is there java api available for reenrolling identity?

Randyshu2018 (Fri, 14 Jun 2019 09:31:44 GMT):
HFCAClient.reenroll

bestbeforetoday (Fri, 14 Jun 2019 10:21:53 GMT):
`channel.initialize()` ?

nitishbhardwaj19 (Fri, 14 Jun 2019 10:22:57 GMT):
Channel is already initialized, that why I get endorsements.

nitishbhardwaj19 (Fri, 14 Jun 2019 10:27:28 GMT):
I missed that to mentioned that here, I am sorry

balamcyril (Fri, 14 Jun 2019 11:48:17 GMT):
Hello, why a iget an error when i want to get idemix credential from admin, the CA didn't return the OU value

bestbeforetoday (Fri, 14 Jun 2019 11:57:38 GMT):
Guessing that it's something to do with the peer or network configuration as I have invocations using discovery OK like so: ```channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true));```

bestbeforetoday (Fri, 14 Jun 2019 11:57:38 GMT):
Guessing that it's something to do with the peer or network configuration as I have invocations using discovery OK like so: ```channel.sendTransactionProposalToEndorsers(request, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM).setForceDiscovery(true)); ```

nitishbhardwaj19 (Fri, 14 Jun 2019 12:00:09 GMT):
May be, I am using the same network like byfn

nitishbhardwaj19 (Fri, 14 Jun 2019 12:00:49 GMT):
I am not able to figure out the issue as I do get response for endorsements using discovery

nitishbhardwaj19 (Fri, 14 Jun 2019 12:01:28 GMT):
It's just that when I sent those responses to channel to commit, It takes forever to return the response

nitishbhardwaj19 (Fri, 14 Jun 2019 12:01:54 GMT):
The same setup works flawless if I don't use service discovery

balamcyril (Fri, 14 Jun 2019 12:39:36 GMT):
Idemix admin

Raumo0 (Fri, 14 Jun 2019 14:01:46 GMT):
Has joined the channel.

Raumo0 (Fri, 14 Jun 2019 14:24:41 GMT):
Hello, I have a problem with sending transactions, can someone help? ``` org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel channel1 failed with peer :. Status FAILURE, details: Channel Channel{id: 3, name: channel1} Sending proposal with transaction: 76ad466af2313bb53e22cbde597c206707 to Peer{ id: 1, name: :, channelName: channel1, url: grpcs://:} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem ``` I read this post, but I can not figure it out. Can someone tell me?: https://stackoverflow.com/a/53676602

nitishbhardwaj19 (Fri, 14 Jun 2019 14:55:43 GMT):
I guess you need to configure all the related certs to work with TLS enabled network when you add Orderer and peers to HFclient

Raumo0 (Fri, 14 Jun 2019 15:20:38 GMT):
All certificates? Not just a CA certificate? like this: properties.put("pemBytes", HYPERLEDGER_FABRIC_CA_PEM.getBytes());

Raumo0 (Fri, 14 Jun 2019 15:20:38 GMT):
@nitishbhardwaj19 All certificates? Not just a CA certificate? like this: `properties.put("pemBytes", HYPERLEDGER_FABRIC_CA_PEM.getBytes());`

Raumo0 (Fri, 14 Jun 2019 15:23:49 GMT):
This error occurs when I connect to the IBM Blockchain cloud. When I run locally everything works fine.

nitishbhardwaj19 (Fri, 14 Jun 2019 16:24:38 GMT):
Hi @bestbeforetoday I re-tried it again, it worked as expected. :)

nitishbhardwaj19 (Fri, 14 Jun 2019 16:25:07 GMT):
How are you adding orderers to channel to be discovered?

nitishbhardwaj19 (Fri, 14 Jun 2019 16:53:21 GMT):
Has anyone ever got this error?``` `Caused by: io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 1503010002 at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:85) ~[netty-codec-http2-4.1.34.Final.jar:4.1.34.Final]` ```

nitishbhardwaj19 (Fri, 14 Jun 2019 16:59:58 GMT):
need to use grpcs protocol instead of grps to resolve this.

nitishbhardwaj19 (Fri, 14 Jun 2019 17:24:32 GMT):
It was an issue with Docker. I replicated the issue again. Restarting docker service resolved the issue.

nitishbhardwaj19 (Fri, 14 Jun 2019 17:25:22 GMT):
It was an issue with Docker. I replicated the issue again. Restarting docker service resolved the issue.

hanubc7743 (Fri, 14 Jun 2019 18:03:46 GMT):
Hi Anyone please suggest me which SDK is best for development?

Antimttr (Fri, 14 Jun 2019 18:39:56 GMT):
well depends on what language you're comfortable with

Antimttr (Fri, 14 Jun 2019 18:40:27 GMT):
i'd say objectively the Golang sdk is going to have the most features and always most up to date, since I beleive that is the primary sdk, with node and java close behind

davidkel (Fri, 14 Jun 2019 18:50:08 GMT):
@Antimttr @hanubc7743 the Go SDK has never been officially released, there are only alpha versions. The fabric documentation does say that the only 2 official sdks are node and java. This is mentioned in several places in the docs (although the docs are obviously out of date in that respect as they mention the rest sdk which doesn't exist anymore). Node has the new fabric-network api, but java will get that soon. Java on the other hand has support for IDEMIX and is the only sdk that has that, so if you need IDEMIX then you will have to use the Java SDK.

davidkel (Fri, 14 Jun 2019 18:50:08 GMT):
@Antimttr @hanubc7743 the Go SDK has never been officially released, there are only alpha versions. The fabric documentation does say that the only 2 official sdks are node and java. This is mentioned in several places in the docs (although the docs are obviously out of date in that respect as they mention the rest sdk which doesn't exist anymore). Node has the new fabric-network api, but java will get that soon. Java on the other hand has support for IDEMIX and is the only sdk that has that, so if you need IDEMIX then you will have to use the Java SDK. You then need to consider what language to write chaincode in, again there is a choice of node, java and go.

Antimttr (Fri, 14 Jun 2019 19:10:49 GMT):
interesting, thanks for the info

hanubc7743 (Fri, 14 Jun 2019 19:58:26 GMT):
@Antimttr @davidkel all SDK's supporting all features or is there any diffrence

Antimttr (Fri, 14 Jun 2019 19:59:26 GMT):
java for idemix, nodejs for fabric-network api. that's the main difference in feature set

hanubc7743 (Sun, 16 Jun 2019 17:41:49 GMT):
Hi I am getting below error ./bin/configtxgen -profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block 2019-06-16 23:07:20.775 IST [common.tools.configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen for output operations is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'. 2019-06-16 23:07:20.775 IST [common.tools.configtxgen] main -> INFO 002 Loading configuration 2019-06-16 23:07:20.788 IST [common.tools.configtxgen.localconfig] Load -> PANI 003 Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 2019-06-16 23:07:20.788 IST [common.tools.configtxgen] func1 -> PANI 004 Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 panic: Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 [recovered] panic: Error unmarshaling config into struct: 1 error(s) decoding: * '' has invalid keys: v1_1 goroutine 1 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000121970, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000b2240, 0xc0002f9804, 0xc00009b1a0, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc0000b2240, 0xc00009b1a0, 0x59, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc0000b2248, 0xc0002f9938, 0x1, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75 main.main.func1() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:250 +0x1a9 panic(0xd4fc40, 0xc0003018e0) /opt/go/go1.11.1.linux.amd64/src/runtime/panic.go:513 +0x1b9 github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000121970, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000b2220, 0xc0002f9c04, 0xc00009b080, 0x59, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(0xc0000b2220, 0xc00009b080, 0x59, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc0000b2228, 0xc0002f9d98, 0x2, 0x2) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75 github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7ffeb116516d, 0xe, 0x0, 0x0, 0x0, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:282 +0x580 main.main() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:261 +0xb2f Anyone know any solution please?

SatheeshNehru (Mon, 17 Jun 2019 07:05:54 GMT):
will reenrollment revoke older certs???

Randyshu2018 (Mon, 17 Jun 2019 07:28:31 GMT):
I'm confused with fabric-gataway.wallet, is it designed for fabtoken or simple certificate

davidkel (Mon, 17 Jun 2019 07:42:48 GMT):
It's for holding identities, not related to fabtoken

Randyshu2018 (Mon, 17 Jun 2019 07:47:07 GMT):
I want to use some traditional wallet features,for example: list wallet ,create wallet ,import wallet and list wallet identities and so on, any samples for that?

davidkel (Mon, 17 Jun 2019 08:01:39 GMT):
Have a look at the node client samples in github.com/hyperledger/fabric-samples. Also there is some useful info in the fabric tutorials for example https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html#application-structure

davidkel (Mon, 17 Jun 2019 08:01:39 GMT):
Have a look at the node client samples in github.com/hyperledger/fabric-samples. Also there is some useful info in the fabric tutorials for example https://hyperledger-fabric.readthedocs.io/en/release-1.4/tutorial/commercial_paper.html#application-structure Should give you some idea of the pattern

Randyshu2018 (Mon, 17 Jun 2019 09:22:01 GMT):
thank you

Randyshu2018 (Mon, 17 Jun 2019 09:24:17 GMT):
any resource about fabric-gateway-java with TLS

rickr (Mon, 17 Jun 2019 12:32:04 GMT):
I think the response messages say's it you need to provide a channel id

hanubc7743 (Mon, 17 Jun 2019 12:43:04 GMT):
where i need to provide channel id?

Raumo0 (Mon, 17 Jun 2019 14:10:30 GMT):
Can someone tell me how to send transactions using my certificate and private key, and not generate a new one when enroll? I can create enroll along with enrollmentRequest, but for this I need to have a certificate + private key + public key. I did not understand how to get the public key.

Raumo0 (Mon, 17 Jun 2019 15:05:03 GMT):
Upd: It was necessary to set the properties of certificates on the peer, previously it was installed only on the CA.

Raumo0 (Mon, 17 Jun 2019 15:05:03 GMT):
Upd: It was necessary to set the properties of certificates on the peer and orderer, previously it was installed only on the CA.

rickr (Mon, 17 Jun 2019 16:44:57 GMT):
should not

swikar (Tue, 18 Jun 2019 08:59:24 GMT):
Has joined the channel.

swikar (Tue, 18 Jun 2019 08:59:26 GMT):
hi

swikar (Tue, 18 Jun 2019 09:00:18 GMT):
Hello I am new here. I want to use fabric-java-sdk into my project. Can I hope I will get help here if I needed? Thanks

lesleyannj (Tue, 18 Jun 2019 15:39:40 GMT):
Has joined the channel.

Antimttr (Tue, 18 Jun 2019 18:23:23 GMT):
@swikar keep hope alive!

hanubc7743 (Tue, 18 Jun 2019 19:51:48 GMT):
Hi Anybody know how to work with hyperledger fabric java sdk and ipfs?

Antimttr (Tue, 18 Jun 2019 19:53:37 GMT):
i've been working with the java sdk for what feels like most of my life

Antimttr (Tue, 18 Jun 2019 19:53:44 GMT):
but in actuality just a few months

kynguyen910 (Wed, 19 Jun 2019 08:18:17 GMT):
Has joined the channel.

kynguyen910 (Wed, 19 Jun 2019 09:11:51 GMT):
Hi I'm using fabric sdk 1.3.0 and I got warning like message below `[invoke_fabric_nw1] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [invoke_fabric_nw1] WARN org.hyperledger.fabric_ca.sdk.helper.Config - Failed to load any configuration from: config.properties. `

kynguyen910 (Wed, 19 Jun 2019 09:11:51 GMT):
Hi I'm using fabric sdk 1.3.0 and I got warning like message below `[invoke_fabric_nw1] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [invoke_fabric_nw1] WARN org.hyperledger.fabric_ca.sdk.helper.Config - Failed to load any configuration from: config.properties. ` so I can't submit proposal request to the network. Do you know how to fix that? thanks

kynguyen910 (Wed, 19 Jun 2019 09:11:51 GMT):
Hi I'm using fabric sdk 1.3.0 and I got warning like message below ```[invoke_fabric_nw1] WARN org.hyperledger.fabric.sdk.helper.Config - Failed to load any configuration from: config.properties. Using toolkit defaults [invoke_fabric_nw1] WARN org.hyperledger.fabric_ca.sdk.helper.Config - Failed to load any configuration from: config.properties. ``` so I can't submit proposal request to the network. Do you know how to fix that? thanks

rickr (Wed, 19 Jun 2019 11:51:30 GMT):
Warning it's benign _unless_ you actually had a configuration file that you expected to load. The default file has everything commented out to take the defaults https://github.com/hyperledger/fabric-sdk-java/blob/master/config.properties

rickr (Wed, 19 Jun 2019 11:51:30 GMT):
@kynguyen910 Warning it's benign _unless_ you actually had a configuration file that you expected to load. The default file has everything commented out to take the defaults https://github.com/hyperledger/fabric-sdk-java/blob/master/config.properties

bestbeforetoday (Wed, 19 Jun 2019 14:47:52 GMT):
There isn't anything different about how you use the _fabric-gateway-java_ API with TLS and non-TLS networks. And how you use TLS with _fabric-gateway-java_ is no different to how you use it with other client APIs. The differences are in the Fabric network configuration. So the connection profile needs to have appropriate certificate information, for example: https://raw.githubusercontent.com/hyperledger/fabric-gateway-java/master/src/test/java/org/hyperledger/fabric/gateway/connection-tls.json And appropriate tls options need to specific when using the `peer` command to create, join and update channels (e.g. `--tls true --cafile cert.pem`), and using the `peer` command for chaincode install and instantiate

karthick15v (Wed, 19 Jun 2019 15:15:09 GMT):
Hi , I am new to hyperledger-fabric and trying to use fabric java sdk 1.3.0 in my project for a while now. In this,For a n*ew channel creation process* we must have a p*re-generated channel.tx artifacts with binded channel name*(using configtxgen tool ).

karthick15v (Wed, 19 Jun 2019 15:15:09 GMT):
Hi , I am new to hyperledger-fabric and trying to use fabric java sdk 1.3.0 in my project for a while now. In this,For a *new channel creation process* we must have a p*re-generated channel.tx artifacts with binded channel name*(using configtxgen tool ).

karthick15v (Wed, 19 Jun 2019 15:15:09 GMT):
Hi , I am new to hyperledger-fabric and trying to use fabric java sdk 1.3.0 in my project for a while now. In this,For a *new channel creation process* we must have a *pre-generated channel.tx artifacts with binded channel name*(using configtxgen tool ).

karthick15v (Wed, 19 Jun 2019 15:16:25 GMT):
But for Dynamic web application, depending upon a per generated wouldn’t a bottle neck and Is there any other way to *generate a channel artifacts on runtime*

karthick15v (Wed, 19 Jun 2019 15:16:53 GMT):
https://stackoverflow.com/questions/56593577/dynamic-channel-artifactschannel-tx-in-hyperledger-fabric

SandySun2000 (Wed, 19 Jun 2019 17:44:22 GMT):
@rickr The customer is using java hyperledger fabric SDK(1.4) which is using the network config as JSON. In this JSON we need to mention the channel details(including smart contract name & peer info), but for V2.0, the channel information has been removed from the connection profile.

SandySun2000 (Wed, 19 Jun 2019 17:44:47 GMT):
@rickr Do you have any suggestion how to deal with the change?

hanubc7743 (Wed, 19 Jun 2019 17:46:28 GMT):
Hi Can we integrate oracle db instead of couch db in hyperledger fabric?

rickr (Wed, 19 Jun 2019 20:54:33 GMT):
@SandySun2000 I know of no changes to the connection profile. Can you point me to the JIRA which made those changes?

rickr (Wed, 19 Jun 2019 20:55:36 GMT):
@hanubc7743 I doubt it. but this is not the channel to discuss. Try #fabric-ledger

kynguyen910 (Thu, 20 Jun 2019 03:31:15 GMT):
Hi @rickr , thank for your answer, but I don't know why I got the error message when I submit proposal request like below ``` Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel referpluschannel failed with peer peer1.bcass.com. Status FAILURE, details: Channel Channel{id: 1, name: referpluschannel} Sending proposal with transaction: 60dcbce1bb329c4e0168e9f81a7349d4c2b02ed1f053586b63b470efadfaf3c9 to Peer{ id: 2, name: peer1.bcass.com, channelName: referpluschannel, url: grpc://209.148.67.218:7051} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [referpluschannel] creator org [Org1MSP], cause=null} ```

kynguyen910 (Thu, 20 Jun 2019 03:32:40 GMT):
look like I facing with issue *access denied*

rickr (Thu, 20 Jun 2019 16:05:26 GMT):
Most likely your usercontext was not set to a user that can perform the operation

balamcyril (Fri, 21 Jun 2019 15:38:17 GMT):
Hello, i'm try to send a transaction to the orderer but i have this error: java.util.concurrent.ExecutionException: java.lang.AssertionError: Test failed1 with java.util.concurrent.CompletionException exception org.hyperledger.fabric.sdk.exception.TransactionEventException: Received invalid transaction event. Transaction ID abbf579a75f6e93c2dac8493413d817093b5c44ed81453cf3a13df359fe0cea2 status 11

Antimttr (Fri, 21 Jun 2019 15:41:23 GMT):
did you send it to the peers first?

Antimttr (Fri, 21 Jun 2019 15:41:57 GMT):
you should submit to peers first, then the result of their query is what you send to the orderer (as i understand it)

rickr (Fri, 21 Jun 2019 16:04:05 GMT):
https://github.com/hyperledger/fabric-sdk-java#transaction-sent-to-orderer-results-in-future-with-exception-validation-code-xxx-where-can-i-find-what-that-means

rickr (Fri, 21 Jun 2019 16:04:58 GMT):
More than likely your transaction read a variable that subsequently got updated

nitishbhardwaj19 (Sat, 22 Jun 2019 09:35:15 GMT):
I am running a sample network which is being shipped along with balance-transfer of fabric-samples. The containers are running in local docker environment and TLS is enabled. I am getting SSL error when I try to communicate with peer``` `Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching peer0.org2.example.com found. at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:214) ~[na:1.8.0_202] at sun.security.util.HostnameChecker.match(HostnameChecker.java:96) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:436) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:252) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:136) ~[na:1.8.0_202] at io.netty.handler.ssl.OpenSslTlsv13X509ExtendedTrustManager.checkServerTrusted(OpenSslTlsv13X509ExtendedTrustManager.java:239) ~[netty-handler-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.ReferenceCountedOpenSslClientContext$ExtendedTrustManagerVerifyCallback.verify(ReferenceCountedOpenSslClientContext.java:242) ~[netty-handler-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier.verify(ReferenceCountedOpenSslContext.java:670) ~[netty-handler-4.1.34.Final.jar:4.1.34.Final] ... 27 common frames omitted ` ```

nitishbhardwaj19 (Sat, 22 Jun 2019 09:35:15 GMT):
I am running a sample network which is being shipped along with balance-transfer of fabric-samples. The containers are running in local docker environment and TLS is enabled. I am getting SSL error when I try to communicate with peer to install or instantiate chaincode``` `Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching peer0.org2.example.com found. at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:214) ~[na:1.8.0_202] at sun.security.util.HostnameChecker.match(HostnameChecker.java:96) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:436) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:252) ~[na:1.8.0_202] at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:136) ~[na:1.8.0_202] at io.netty.handler.ssl.OpenSslTlsv13X509ExtendedTrustManager.checkServerTrusted(OpenSslTlsv13X509ExtendedTrustManager.java:239) ~[netty-handler-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.ReferenceCountedOpenSslClientContext$ExtendedTrustManagerVerifyCallback.verify(ReferenceCountedOpenSslClientContext.java:242) ~[netty-handler-4.1.34.Final.jar:4.1.34.Final] at io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier.verify(ReferenceCountedOpenSslContext.java:670) ~[netty-handler-4.1.34.Final.jar:4.1.34.Final] ... 27 common frames omitted ` ```

nitishbhardwaj19 (Sat, 22 Jun 2019 09:36:56 GMT):
`if (this.helper.isTlsEnabled()) { /** * TODO: set certs for secure tls communication, this is a sample */ sdprops.put("org.hyperledger.fabric.sdk.discovery.default.clientCertFile", "artifacts\\channel\\crypto-config\\peerOrganizations\\org1.example.com\\users\\User1@org1.example.com\\tls\\server.crt"); sdprops.put("org.hyperledger.fabric.sdk.discovery.default.clientKeyFile", "artifacts\\channel\\crypto-config\\peerOrganizations\\org1.example.com\\users\\User1@org1.example.com\\tls\\server.key"); `

nitishbhardwaj19 (Sat, 22 Jun 2019 09:36:56 GMT):
``` if (this.helper.isTlsEnabled()) { /** * TODO: set certs for secure tls communication, this is a sample */ sdprops.put("org.hyperledger.fabric.sdk.discovery.default.clientCertFile", "artifacts\\channel\\crypto-config\\peerOrganizations\\org1.example.com\\users\\User1@org1.example.com\\tls\\server.crt"); sdprops.put("org.hyperledger.fabric.sdk.discovery.default.clientKeyFile", "artifacts\\channel\\crypto-config\\peerOrganizations\\org1.example.com\\users\\User1@org1.example.com\\tls\\server.key"); ```

nitishbhardwaj19 (Sat, 22 Jun 2019 09:38:27 GMT):
Sample settings for peer in network config:``` peers: peer0.org1.example.com: # this URL is used to send endorsement and query requests url: grpcs://peer0.org1.example.com:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com tlsCACerts: path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt ```

nitishbhardwaj19 (Sat, 22 Jun 2019 09:40:57 GMT):
I have added host entries in my hosts file for peers and orderers. I am not sure what am I missing here to work with TLS enabled network. Would be great if someone can share their thoughts.

AndresMartinezMelgar.itcl (Sun, 23 Jun 2019 09:38:16 GMT):
Hi, how can i check if i instantiated successfully a peer/orderer?

nitishbhardwaj19 (Sun, 23 Jun 2019 16:50:19 GMT):
@rickr any thoughts?

nitishbhardwaj19 (Sun, 23 Jun 2019 16:51:35 GMT):
I keep on getting following error:``` 2019-06-23 22:20:00.642 INFO 2064 --- [pool-5-thread-1] o.h.fabric.sdk.ServiceDiscovery : Channel mychannel doing discovery with peer: Peer{ id: 5, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://peer0.org1.example.com:7051} 2019-06-23 22:20:12.053 WARN 2064 --- [ault-executor-5] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 716, channel: mychannel, peerName: peer1.org1.example.com:7051, url: grpcs://peer1.org1.example.com:7051}, attempts 701. UNAVAILABLE: io exception 2019-06-23 22:20:38.528 WARN 2064 --- [ault-executor-3] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 766, channel: mychannel, peerName: peer1.org1.example.com:7051, url: grpcs://peer1.org1.example.com:7051}, attempts 751. UNAVAILABLE: io exception ```

nitishbhardwaj19 (Sun, 23 Jun 2019 16:53:48 GMT):
And I don't get any response from channel when I send any successful proposals to commit. Though it gets the transaction committed in the ledger.

nitishbhardwaj19 (Sun, 23 Jun 2019 17:09:27 GMT):
Strange thing is that peer container is up and running, not sure why it throws an error of UNAVAILABLE

nitishbhardwaj19 (Sun, 23 Jun 2019 17:09:27 GMT):
@rickr , @Antimttr , @Jelle.Diet Strange thing is that peer container is up and running, not sure why it throws an error of UNAVAILABLE

balamcyril (Mon, 24 Jun 2019 11:40:00 GMT):
I don't understant why it refuse my transaction. I have create and instantiation proposal in 2 different thread which initialise respectively a for thread1 and b for thread 2 and send it to my 2 peer for endorsement. All the 2 value is succefully endors by the peer. But when i'm trying to send the transaction to the orderer, it success for the first thread and and error for the second with invalid transaction while all the peers succeful endorse the transaction

balamcyril (Mon, 24 Jun 2019 11:42:15 GMT):
Collection responses1= new LinkedList<>(); Collection successful1 = new LinkedList<>(); Collection failed1 = new LinkedList<>(); //Deprecated use v2.0 Lifecycle chaincode management. InstantiateProposalRequest instantiateProposalRequest = client.newInstantiationProposalRequest(); instantiateProposalRequest.setProposalWaitTime(DEPLOYWAITTIME); instantiateProposalRequest.setChaincodeID(chaincodeID); instantiateProposalRequest.setChaincodeLanguage(CHAIN_CODE_LANG); instantiateProposalRequest.setFcn("init"); out("thread %d: %s-%s",i,a,b); instantiateProposalRequest.setArgs(new String[] {a, "500", b, "" + (200 + i)}); Map tm = new HashMap<>(); tm.put("HyperLedgerFabric", "InstantiateProposalRequest:JavaSDK".getBytes(UTF_8)); tm.put("method", "InstantiateProposalRequest".getBytes(UTF_8)); try { instantiateProposalRequest.setTransientMap(tm); } catch (InvalidArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } ChaincodeEndorsementPolicy chaincodeEndorsementPolicy = new ChaincodeEndorsementPolicy(); try { chaincodeEndorsementPolicy.fromYamlFile(new File(TEST_FIXTURES_PATH + "/sdkintegration/chaincodeendorsementpolicy.yaml")); } catch (ChaincodeEndorsementPolicyParseException | IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } instantiateProposalRequest.setChaincodeEndorsementPolicy(chaincodeEndorsementPolicy); successful1.clear(); failed1.clear(); if (isFooChain) { //Send responses both ways with specifying peers and by using those on the channel. try { responses1 = channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers()); } catch (InvalidArgumentException | ProposalException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { //Deprecated use v2.0 Lifecycle chaincode management. try { responses1 = channel.sendInstantiationProposal(instantiateProposalRequest); } catch (InvalidArgumentException | ProposalException e) { // TODO Auto-generated catch block e.printStackTrace(); } } for (ProposalResponse response : responses1) { if (response.isVerified() && response.getStatus() == ProposalResponse.Status.SUCCESS) { successful1.add(response); out("t: %d - Succesful instantiate proposal response Txid: %s from peer %s",i, response.getTransactionID(), response.getPeer().getName()); } else { failed1.add(response); } } if (failed1.size() > 0) { for (ProposalResponse fail : failed1) { out("Not enough endorsers for instantiate :" + successful.size() + "endorser failed with " + fail.getMessage() + ", on peer" + fail.getPeer()); } ProposalResponse first = failed1.iterator().next(); fail("Not enough endorsers for instantiate :" + successful1.size() + "endorser failed with " + first.getMessage() + ". Was verified:" + first.isVerified()); } Channel.NOfEvents nOfEvents = createNofEvents(); if (!channel.getPeers(EnumSet.of(PeerRole.EVENT_SOURCE)).isEmpty()) { nOfEvents.addPeers(channel.getPeers(EnumSet.of(PeerRole.EVENT_SOURCE))); } try { channel.sendTransaction(successful1, createTransactionOptions() //Basically the default options but shows it's usage. .userContext(client.getUserContext()) //could be a different user context. this is the default. .shuffleOrders(false) // don't shuffle any orderers the default is true. .orderers(channel.getOrderers()) // specify the orderers we want to try this transaction. Fails once all Orderers are tried. // The events to signal the completion of the interest in the transaction ).thenApply(transactionEvent -> { out("je suis sortie %d", i); waitOnFabric(0);

rickr (Mon, 24 Jun 2019 12:20:55 GMT):
Maybe look at hostnameOverride property

rickr (Mon, 24 Jun 2019 12:29:58 GMT):
If you've written a variable in chaincode You'll need to wait for that to be sent to orderer then wait till the future is resolved before reading/modifying it again.

rickr (Mon, 24 Jun 2019 12:31:38 GMT):
Chaincode get's instantiated. I don't know what you mean by Peers and Orderers being instantiated.

balamcyril (Mon, 24 Jun 2019 12:35:45 GMT):
in my code i want to test how many initializatio transaction could be handle by the order, for that, i send several transaction to the orderer with different thread, to see if the orderer could handle all these transaction. Actulaly i'm just using 2 thread an it's not working

balamcyril (Mon, 24 Jun 2019 12:38:44 GMT):
for each thread i'm using different variable, so it not possible to have a collixion with different transaction

rickr (Mon, 24 Jun 2019 13:14:07 GMT):
I've had up to 400 threads changing and querying different values running for hours

rickr (Mon, 24 Jun 2019 13:24:24 GMT):
Also even if its the *same* variable you need to make sure any changes are committed to the peers before you try to do an endorsement using that variable again.

nitishbhardwaj19 (Mon, 24 Jun 2019 14:40:09 GMT):
@rickr Thanks for replying. I found an interesting jira ticket https://jira.hyperledger.org/browse/FAB-11834. I don't know why, but one of my peer is unreachable when I use TLS. As this Jira ticket suggests, it is expected. I am handling this at code now. Though I am still not sure about why Peer is unreachable in TLS mode. I am just using hostnames and gprcs protocols.

rickr (Mon, 24 Jun 2019 15:41:55 GMT):
Google `openssl s_client -connect` try to connect to the same peer with that.

Randyshu2018 (Tue, 25 Jun 2019 02:43:44 GMT):
A java question:how to deal with connection.yaml and artifacts's path after they compiled to jar file.

Randyshu2018 (Tue, 25 Jun 2019 02:45:26 GMT):
after convert to jar file ,the certificate path are always wrong.

Coada (Tue, 25 Jun 2019 10:49:33 GMT):
Has joined the channel.

Coada (Tue, 25 Jun 2019 10:49:34 GMT):
Hello! I am using the Java SDK 1.4.1 to interact with my Fabric network setup using Docker (Compose). My setup consists of 2 peers and one OSN, all part of a channel with instantiated chaincode. I am now testing what happens if one peer goes down, by stopping the docker container. I execute a function in the chaincode and get 1 valid (from the online peer) and 1 invalid (from the offline peer) proposalResponses. I send the valid response to the OSN, however *waiting on the future blocks indefinitely*. If I query the online peer, I can confirm that the transaction has gone through. Is there any way I can get the future to return?

rickr (Tue, 25 Jun 2019 11:25:56 GMT):
When dealing with networking your future should have some timeout. If it does timeout, your application can decided it's own recovery strategy. Report the error to user, Query peers for each transaction to see if it's done.

Coada (Tue, 25 Jun 2019 12:03:30 GMT):
Hello rickr, thanks for your reply. I have now added a timeout. I am also looking into adding TransactionOptions to the request, and setting the future to return when `X` peers have seen it where `X` is the size of the proposalResponses. What is the difference between `createNoEvents().setN()` and `createNofEvents().setN()`?

Coada (Tue, 25 Jun 2019 13:01:50 GMT):
Nvm I solved it. createNoEvents() is the same as _no_ events, while createNofEvents is number of events. It is clear now that I am looking at it - however perhaps some Javadoc can be added to these methods to differentiate them a bit more?

mhs22 (Wed, 26 Jun 2019 07:26:31 GMT):
Has joined the channel.

mhs22 (Wed, 26 Jun 2019 08:34:46 GMT):
Hello! I have a question. Is there a way to set database for storing user identity in java sdk?

mhs22 (Wed, 26 Jun 2019 08:36:14 GMT):
I know there are three options for storing user identity (file, database, hsm), and I developed it with nodejs sdk before.

rickr (Wed, 26 Jun 2019 12:23:38 GMT):
None in the core sdk. There is a Java programming model work in progress that I think has something like that. The SDK does does show storing credentials as properties files in the integration tests.

erictran1910 (Wed, 26 Jun 2019 16:45:34 GMT):
Has joined the channel.

erictran1910 (Wed, 26 Jun 2019 16:45:50 GMT):
hi anyone iam newbie in java sdk

erictran1910 (Wed, 26 Jun 2019 16:46:51 GMT):
is there any tutorial to do some basic stuff like create & initialize channel, join peers into channel ? https://github.com/hyperledger/fabric-sdk-java/ is too much and i dont know where to start

Antimttr (Wed, 26 Jun 2019 17:35:31 GMT):
@erictran1910 I used the end2endit suite in the java sdk, I wish there was another answer but its really the only resource that is complete. The good news is i was able to build a basically complete client application modeled after it (of course I added JWT, databases, and a jersey Restful api too)

erictran1910 (Thu, 27 Jun 2019 04:30:09 GMT):
@erictran1910 I used the end2endit suite in the java sdk, I wish there was another answer but its really the only resource that is complete.

erictran1910 (Thu, 27 Jun 2019 04:31:19 GMT):
hi @Antimttr can i pull your complete source code

erictran1910 (Thu, 27 Jun 2019 04:31:19 GMT):
hi @Antimttr can i see your complete source code for reference ?

mhs22 (Thu, 27 Jun 2019 05:04:42 GMT):
@rickr you mean, the current java sdk doesn't provide db, hsm integration feature?

MattiaBolzonella (Thu, 27 Jun 2019 09:27:00 GMT):
Has joined the channel.

MattiaBolzonella (Thu, 27 Jun 2019 09:27:06 GMT):
Hi, I've configured a fabric network, installed and istantiated chaincode. All guides that i've seen doesn't specify how to connect the SDK to a running network, can someone help me with the steps to follow in order to connect and interact with a running fabric network via SDK?

MattiaBolzonella (Thu, 27 Jun 2019 09:27:06 GMT):
Hi, I've configured a fabric network, installed and istantiated chaincode. All guides that i've seen don't specify how to connect the SDK to a running network, can someone help me with the steps to follow in order to connect and interact with a running fabric network via SDK?

tballast (Thu, 27 Jun 2019 10:23:17 GMT):
@MattiaBolzonella If you look in (this)[https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/java/org/hyperledger/fabric/sdkintegration] directory you will see a number of different tests that can be run which will al connect to a network and perform a variety of different functions. Take a look specificallt at End2EndIT.java first, and then perhaps the others. The network that should be running when you run these tests is defined in [this](https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/fixture/sdkintegration) directory. Take a look at the fabric.sh script to see what to do.

tballast (Thu, 27 Jun 2019 10:23:17 GMT):
@MattiaBolzonella If you look in [this](https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/java/org/hyperledger/fabric/sdkintegration) directory you will see a number of different tests that can be run which will al connect to a network and perform a variety of different functions. Take a look specificallt at End2EndIT.java first, and then perhaps the others. The network that should be running when you run these tests is defined in [this](https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/fixture/sdkintegration) directory. Take a look at the fabric.sh script to see what to do.

MattiaBolzonella (Thu, 27 Jun 2019 10:28:34 GMT):
Thank you very much, I'll get a look at the repo

mahoney1 (Thu, 27 Jun 2019 10:40:47 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

Patriq (Thu, 27 Jun 2019 14:05:56 GMT):
Has left the channel.

mahoney1 (Thu, 27 Jun 2019 17:04:59 GMT):
recording from today's Fabric Developer community call (0627 zip) has been posted here -> https://wiki.hyperledger.org/display/fabric/Community-Call-Recordings

yeousunn (Fri, 28 Jun 2019 02:28:53 GMT):
Hi Guys, anyone here know why we get only one orderer when querying the network like `mychannel.getOrderers()`. The network is running raft orderer service with 5 orderer node. Does it only consider the leader node?

yeousunn (Fri, 28 Jun 2019 02:53:21 GMT):
Even `mychannel.getPeers()` is giving me only 1 peer, it should be 4 in total and 2 per organization. Is there anything that I need to configure to get the correct result?

yeousunn (Fri, 28 Jun 2019 03:07:04 GMT):
Ok, This is based on number of orderers/peers I specify in the configuration file. not the actual count of nodes.

bestbeforetoday (Fri, 28 Jun 2019 08:07:44 GMT):
If you configure your client to use discovery (which requires the network to be configured in a suitable manner with anchor peers etc.), you should be able to specify a minimal set of peers in your common connection profile, and it should discover all the other nodes in the network when you call initialize() on the channel object.

yeousunn (Fri, 28 Jun 2019 08:10:59 GMT):
Thank you for the reply. I am using the first-network sample right now. Is there any specific document related to that?

bestbeforetoday (Fri, 28 Jun 2019 08:44:29 GMT):
The steps for set up of the first-network at https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html do mention configuring anchor peers, so things might be OK from that end. With the Java SDK, there needs to be a channel in the connection profile, and that channel needs to reference a peer that has `"discover": true` in its list of roles

yeousunn (Fri, 28 Jun 2019 08:46:30 GMT):
okay, thank you. much clear on that now. :thumbsup:

tballast (Fri, 28 Jun 2019 10:51:00 GMT):
in the HFClient.java file there are two ways to create a new channel: `Channel newChannel(String name)` OR `Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures)` I just want to make sure in understand correctly - if you've already got a running Fabric network with a channel and running chaincode, you can use the first, whereas the second one will call to the orderer and actually try to join this channel to the network, right?

tballast (Fri, 28 Jun 2019 10:51:00 GMT):
in the [HFClient.java](https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L230_ file there are two ways to create a new channel: `Channel newChannel(String name)` OR `Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures)` I just want to make sure in understand correctly - if you've already got a running Fabric network with a channel and running chaincode, you can use the first, whereas the second one will call to the orderer and actually try to join this channel to the network, right?

tballast (Fri, 28 Jun 2019 10:51:00 GMT):
in the [HFClient.java](https://github.com/hyperledger/fabric-sdk-java/blob/master/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L230_) file there are two ways to create a new channel: `Channel newChannel(String name)` OR `Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures)` I just want to make sure in understand correctly - if you've already got a running Fabric network with a channel and running chaincode, you can use the first, whereas the second one will call to the orderer and actually try to join this channel to the network, right?

balamcyril (Fri, 28 Jun 2019 11:42:24 GMT):
Error while registering the user

rickr (Fri, 28 Jun 2019 12:44:55 GMT):
No. If you had your application running and it shutsdown See README.md Take the time to follow the integration test There is one there about recreate the channel

rickr (Fri, 28 Jun 2019 12:46:09 GMT):
https://github.com/hyperledger/fabric-sdk-java/tree/e0af6681ccc829ee624f8e5d90d5a9b74724d023#end-to-end-test-scenario

JakaKrajnc (Sat, 29 Jun 2019 18:57:45 GMT):
Has joined the channel.

nitishbhardwaj19 (Sun, 30 Jun 2019 11:58:41 GMT):
Hi @rickr I am trying to retrieve channel information from `channelConfigurationBytes`. I checked UpdateChannelIT. I am not able to get where should the `CONFIGTXLATOR_LOCATION` be hosted? Do we really have any reference which can be hosted as a server for configtx. Would be great if you can share some thoughts.``` HttpPost httppost = new HttpPost(CONFIGTXLATOR_LOCATION + "/protolator/decode/common.Config"); httppost.setEntity(new ByteArrayEntity(channelConfigurationBytes)); HttpResponse response = httpclient.execute(httppost); ```

tballast (Mon, 01 Jul 2019 13:31:16 GMT):
Is there a way to pull the registered users as well as their secrets from the CA? I have a client application that, on first boot, enroll an Admin, then register and enroll a user. I can save this user locally and then reboot the client and everything is OK. However, if I don't save the user locally, then I have no way of using this user as everytime I try to enroll it to get the secret, I get an error saying it already exists. When I call `HFCAClient.getHFCAIdentities(adminUser);` I can see the user is enrolled with the network, however the secret property is empty. Is there a way to obtain it?

aatkddny (Mon, 01 Jul 2019 22:17:53 GMT):
I'm not rick, but just as an fyi you can start it as a service locally - it comes up on 7059 as a default. Or you can use a processbuilder to run it in a shell. i'm told there's a k8s container available for it too but i haven't got round to trying that yet.

Antimttr (Mon, 01 Jul 2019 22:25:19 GMT):
@tballast what i do is enroll the user, get the provided key and encrypt it and store it in my user database, that way i have the secret if i need it

nitishbhardwaj19 (Tue, 02 Jul 2019 01:19:43 GMT):
Thanks for sharing the information. This is great. I didn't know about it. Do we have any document which covers steps to host this as a service? It would be great if you could share some points.

balamcyril (Tue, 02 Jul 2019 09:00:49 GMT):
hello, why some time i receive this error from some threads when try the registration to the CA: org.hyperledger.fabric_ca.sdk.exception.RegistrationException: Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@131a7bd2 url: http://localhost:7054 null, Caused by: java.lang.NullPointerException.

tballast (Tue, 02 Jul 2019 09:48:28 GMT):
@Antimttr I've been doing something very similar, which works well for rebooting the client. I was just wondering about what would happen if I lost the credentials in a production environment.

Jelle.Diet (Tue, 02 Jul 2019 10:10:56 GMT):
Can private data collections always be purged afterwards (for gdpr compliance) or is there a limit on how many transactions the data can be a part of before it becomes immutable?

aatkddny (Tue, 02 Jul 2019 12:29:42 GMT):
It's in the older versions of the documentation. https://hyperledger-fabric.readthedocs.io/en/v1.1.0-alpha/configtxlator.html

aatkddny (Tue, 02 Jul 2019 12:31:13 GMT):
Apparently - and I haven't (yet) tried it it is also here. I've taken this from the kubernetes channel, where I asked if there was a containerized version I can stick inside my cluster. ``` configtxlater is in the `us.gcr.io/provenance-io/hyperledger-fabric-tools` image ... you should be able to start and run an instance using that image ... ```

aatkddny (Tue, 02 Jul 2019 14:27:55 GMT):
anyone manage to add an org using the sdk with tls on? i thought i had it all down pat - and i did without tls - but switching the orderers to raft has me back to square one. org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel genesischannel failed with peer ordererpeer-orderer. Status FAILURE, details: Channel Channel{id: 1, name: genesischannel} Sending proposal with transaction: c4131e67ff70bbee1e7aec713701bfc2a8f4e4a13eca302b52d56f2c09f1e83d to Peer{ id: 5, name: ordererpeer-orderer, channelName: genesischannel, url: grpcs://localhost:30025} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:30025

aatkddny (Tue, 02 Jul 2019 14:27:55 GMT):
anyone manage to add an org using the sdk with tls on? i thought i had it all down pat - and i did without tls - but switching the orderers to raft has me back to square one. ```org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel genesischannel failed with peer ordererpeer-orderer. Status FAILURE, details: Channel Channel{id: 1, name: genesischannel} Sending proposal with transaction: c4131e67ff70bbee1e7aec713701bfc2a8f4e4a13eca302b52d56f2c09f1e83d to Peer{ id: 5, name: ordererpeer-orderer, channelName: genesischannel, url: grpcs://localhost:30025} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:30025 ``` I'm also getting these - which I'm not used to seeing `2019-07-02 09:40:47.769 WARN 20517 --- [nio-8095-exec-1] org.hyperledger.fabric.sdk.Channel : Channel genesischannel could not load peer CA certificates from any peers.`

aatkddny (Tue, 02 Jul 2019 14:30:26 GMT):
Yes I have a hostname override. And the certs are self-signed using cryptogen.

aatkddny (Tue, 02 Jul 2019 18:48:51 GMT):
so i have a problem with the peer code. `parseGrpcUrl` in `org.hyperledger.fabric.sdk.helper.Utils` requires `throw new RuntimeException("URL must be of the format protocol://host:port. Found: '" + url + "'");` This doesn't work so well with an ingress. Anyone have a workaround?

aatkddny (Tue, 02 Jul 2019 18:48:51 GMT):
so i have a problem with the peer code. `parseGrpcUrl` in `org.hyperledger.fabric.sdk.helper.Utils` requires `throw new RuntimeException("URL must be of the format protocol://host:port. Found: '" + url + "'");` This doesn't work so well with an ingress if I set the path to /{service}. Anyone have a workaround? I believe a NodePort doesn't work with GRPCS.

aatkddny (Tue, 02 Jul 2019 18:48:51 GMT):
so i have a problem with the peer code. `parseGrpcUrl` in `org.hyperledger.fabric.sdk.helper.Utils` requires `throw new RuntimeException("URL must be of the format protocol://host:port. Found: '" + url + "'");` This doesn't work so well with an ingress if I set the path to /{service}. Anyone have a workaround?

yeousunn (Wed, 03 Jul 2019 00:57:41 GMT):
Hello Guys, I am following the service discovery from this link https://github.com/hyperledger/fabric-sdk-java/blob/release-1.4/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java but I am unable to discover peers, I should get count 4 but I am getting only one. I noticed that it say I need to add entries into host file. is it necessary for all network? I am using the first-network for the test. I am using version 1.4

nitishbhardwaj19 (Wed, 03 Jul 2019 04:05:53 GMT):
Thanks for sharing this. I found this reference too https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/configtxlator.html?highlight=config

aatkddny (Wed, 03 Jul 2019 16:03:50 GMT):
Anyone manage to get this working with TLS on? Is client TLS a requirement or have I stuffed something up? I keep getting `Endpoint grpcs://localhost:30025 with no ssl context` in my log followed by a connection refused.

aatkddny (Wed, 03 Jul 2019 16:03:50 GMT):
Anyone manage to get this working with TLS on? Is client TLS a requirement or have I stuffed something up? Trying to run with just the server stuff set. I keep getting `Endpoint grpcs://localhost:30025 with no ssl context` in my log followed by a connection refused.

aatkddny (Wed, 03 Jul 2019 16:03:50 GMT):
Has anyone manage to get this working with TLS on inside Kubernetes? I've been fine up until the 1.4.1 release using Kafka - well fine is relative. Kafka has presented some issues. We need to move to raft ordering. Raft requires TLS. Fabric is moving to Kubernetes native (finally). I can't find a way to talk to my peers with TLS on. I can't use an ingress because of the problem I described above - note TODO: ``` Properties props = new Properties(); Pattern p = Pattern.compile("([^:]+)[:]//([^:]+)[:]([0-9]+)", Pattern.CASE_INSENSITIVE); Matcher m = p.matcher(url); if (m.matches()) { props.setProperty("protocol", m.group(1)); props.setProperty("host", m.group(2)); props.setProperty("port", m.group(3)); String protocol = props.getProperty("protocol"); if (!"grpc".equals(protocol) && !"grpcs".equals(protocol)) { throw new RuntimeException(format("Invalid protocol expected grpc or grpcs and found %s.", protocol)); } } else { throw new RuntimeException("URL must be of the format protocol://host:port. Found: '" + url + "'"); } // TODO: allow all possible formats of the URL ``` I can't get a NodePort (which is how everything is exposed now) to work. I don't believe I can use GRPCS with NodePorts. The last resort I have is to try to stick my code inside the K8S cluster, but that restricts me to a single cluster - which isn't realistic long term. Anyone have a workaround?

mattremy (Wed, 03 Jul 2019 17:18:15 GMT):
A very basic question... What is the difference between creating an identity and registering and enrolling an identity? Even when an identity, it does get registered?

dan13 (Wed, 03 Jul 2019 19:09:49 GMT):
Host file entries are needed to map logical names to IP addresses when there is no name server. On a real network with DNS there would be no need to set host file entries.

dan13 (Wed, 03 Jul 2019 19:16:10 GMT):
You create the identity in CA and then enroll the identity. Enrollment returns the PK and cert needed to sign transactions as that identity. This may help: https://stackoverflow.com/questions/49917351/cas-enrollment-registration-for-hyperledger-fabric

yeousunn (Thu, 04 Jul 2019 00:56:50 GMT):
thank you for the reply, I am using fabric samples first-network which runs docker containers. I tried adding entries to hosts file. I am still not able to discover the nodes. Not sure what is missing. ancheor peer is configured by default. I am not sure what else I am missing.

yeousunn (Thu, 04 Jul 2019 00:56:50 GMT):
thank you for the reply, I am using fabric samples first-network which runs docker containers. I tried adding entries to hosts file. I am still not able to discover the nodes. The ancheor peer is configured by default. I am not sure what else I am missing.

lotty02cho (Thu, 04 Jul 2019 01:20:32 GMT):
Has joined the channel.

lotty02cho (Thu, 04 Jul 2019 01:20:36 GMT):
enroll

githubcpc (Thu, 04 Jul 2019 02:02:49 GMT):
Has fabric-sdk-java supported HLFv1.4.1? I use fabric-sdk-java release-1.4 ,but I can not connect to my HLF env.

lotty02cho (Thu, 04 Jul 2019 04:28:05 GMT):
Does anyone know or explain how to connect between fabric-sdk-java and byfn network?

githubcpc (Thu, 04 Jul 2019 06:39:01 GMT):
@lotty02cho I think you can try to run End2endIT.

mattiabolzonella1 (Thu, 04 Jul 2019 06:45:34 GMT):
Has joined the channel.

mattiabolzonella1 (Thu, 04 Jul 2019 07:29:32 GMT):
I have configured the service discovery in the docker compose, the peers can see each others but in the SDK ``` io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError WARNING: [io.grpc.internal.ManagedChannelImpl-9] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host peer1.org1.mydomain.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: peer1.org1.mydomain.com: Name or service not known ``` The network is running using TLS, I can't figure out what i'm missing. Any help is appreciated, thanks!

mattiabolzonella1 (Thu, 04 Jul 2019 09:05:42 GMT):
It seems that the SDK cannot resolve the EXTERNAL_ENDPOINT in the docker-compose file. But in the peer debug the discovery service and gossip are working fine

mattiabolzonella1 (Thu, 04 Jul 2019 14:40:32 GMT):
Have you solved the problem? I'm struggling too

mattremy (Thu, 04 Jul 2019 19:56:57 GMT):
Is there a way that I can retrieve custom extensions from the x509Certificate generated by fabric-ca server. The extensions oid is "1.2.3.4.5.6.7.8.1". It is DER encoded Octet, but since it is custom, the usual class files cant decode it. Any pointers?

yeousunn (Fri, 05 Jul 2019 00:46:17 GMT):
no, still have the problem. only reply I get from people is to configure anchor peer and enable discovery. I have done both and followed the example. Still not able to discover other nodes.

qsmen (Fri, 05 Jul 2019 01:56:30 GMT):
applicaiton is writen in java sdk. an error "No subject alternative DNS name matching org1.example.com found" is reported when doing transaction. It is not the first time that this quesiton is asked. Please help to solve. Thank you

yeousunn (Fri, 05 Jul 2019 03:34:28 GMT):
are you sure it's the correct DNS? shouldn't it be peer0.org1.example.com or peer1.org1.example.com?

qsmen (Fri, 05 Jul 2019 06:53:39 GMT):
yes, DNS correct. the error is ""No subject alternative DNS name matching peer0.org1.example.com found".

qsmen (Fri, 05 Jul 2019 07:02:12 GMT):
for java sdk it is not easy to set proper parameters for applications. we need more documents to help us. no related posts are returned when searching in fabric-sdk-node channel with the key words "no subject alternative dns name".

qsmen (Fri, 05 Jul 2019 07:03:40 GMT):
my colleague modifys codes in almost random way, the problem is solved.

mattiabolzonella1 (Fri, 05 Jul 2019 07:07:46 GMT):
I think i resolved the problem: the application is not running on docker so the addresses returned by the discovery service are not valid and must be mapped to localhost:port. To do so i modified `/etc/hosts/` mapping all the addresses of the peer in the fabric network with 127.0.0.1

mattiabolzonella1 (Fri, 05 Jul 2019 07:07:46 GMT):
I think i resolved the problem: the application is not running on docker so the addresses returned by the discovery service are not valid and must be mapped to localhost:port. To do so i modified `/etc/hosts` mapping all the addresses of the peer in the fabric network with 127.0.0.1

mattiabolzonella1 (Fri, 05 Jul 2019 07:07:46 GMT):
I think i resolved the problem: the application is not running on docker so the addresses returned by the discovery service are not valid and must be mapped to localhost:port. To do so i modified `/etc/hosts` mapping all peers'addresses in the fabric network with 127.0.0.1

srinu_chunduru (Fri, 05 Jul 2019 08:34:08 GMT):
Has joined the channel.

srinu_chunduru (Fri, 05 Jul 2019 08:34:10 GMT):
Hi Team, I am working on HyperLedger Fabric Java chain code. I feel there is some issue with getStateByRange method. when i pass startKey and endKey as empty, it is not returning any data. But it is working with empty values in GO and NodeJS. Documentation show that both can be empty, but it's not working. Can you please help me in this?

sandy (Fri, 05 Jul 2019 09:41:44 GMT):
Hi. Am getting this error during chaincode instantiation.. ` SimulateProposal -> ERRO 119 [mychannel][486eca5b] failed to invoke chaincode name:"lscc" , error: container exited with 1 github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch.func1 /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:63 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1333 chaincode registration failed `

sandy (Fri, 05 Jul 2019 09:42:09 GMT):
Can you please help me on this?

heatherp (Fri, 05 Jul 2019 11:31:32 GMT):
Has joined the channel.

mattiabolzonella1 (Fri, 05 Jul 2019 13:42:59 GMT):
Have you solved the issue? I have the same problem with my Raft orderers, the transaction is valid thou

mattiabolzonella1 (Fri, 05 Jul 2019 13:52:45 GMT):
Not sure if it can help but i i solved in this way (I use the discovery service): ```Collection transactionPropResp = channel.sendTransactionProposalToEndorsers(transactionProposalRequest, DiscoveryOptions.createDiscoveryOptions().setForceDiscovery(true).setEndorsementSelector(ServiceDiscovery.DEFAULT_ENDORSEMENT_SELECTION));```

mattiabolzonella1 (Fri, 05 Jul 2019 13:52:45 GMT):
Not sure if it can help but i i solved in this way (I use the discovery service): ```Collection transactionPropResp = channel.sendTransactionProposalToEndorsers(transactionProposalRequest, DiscoveryOptions.createDiscoveryOptions().setForceDiscovery(true).setEndorsementSelector(ServiceDiscovery.DEFAULT_ENDORSEMENT_SELECTION));```

dan13 (Fri, 05 Jul 2019 23:13:08 GMT):
You have the peer your client connects to configured for service discovery? In your network config json you want to set the "discover" attribute to true for your peer. Also, Looking at org.hyperledger.fabric.sdk.Channel class and debugging into it should help you figure out what is going on.

rescalona (Sat, 06 Jul 2019 04:55:55 GMT):
Has joined the channel.

asaningmaxchain123 (Sat, 06 Jul 2019 12:02:36 GMT):
@rickr do you use the `jmeter` to test the fabric by using the java-sdk

asaningmaxchain123 (Sat, 06 Jul 2019 12:05:36 GMT):
when i use it,i meet some question, when i set the Thread Number to the 100, the `fabric-sdk-java` setup 10000 thread. it meet the following error `can't create native thread`

yeousunn (Mon, 08 Jul 2019 00:42:44 GMT):
I have all peers discovery set to true. `- CORE_PEER_DISCOVERY_ENABLED=true`

liurain (Mon, 08 Jul 2019 02:40:36 GMT):
Has joined the channel.

liurain (Mon, 08 Jul 2019 02:40:37 GMT):
Hi, everybody I want to endorse the contract using different peer nodes of the same channel in different threads. But a HFClient object can only create a Channel object with the same name. How should I handle this situation correctly? Thanks

liurain (Mon, 08 Jul 2019 02:41:03 GMT):
Hi, everybody I want to endorse the contract using different peer nodes of the same channel in different threads. But a HFClient object can only create a Channel object with the same name. How should I handle this situation correctly? Thanks

qsmen (Mon, 08 Jul 2019 07:02:09 GMT):
not completely solved. from the description, you find the endorser by using service discovery. However, your problem is with raft order. it is a little strange.

qsmen (Mon, 08 Jul 2019 07:03:50 GMT):
@mattiabolzonella1 . I dont know if the erro "no subject alternative..." is binded to java sdk. I found no such error in nodejs sdk channel.

liurain (Mon, 08 Jul 2019 07:10:26 GMT):
You can check if the owner in the TLS certificate is the same as the node host name (container name).

qsmen (Mon, 08 Jul 2019 07:15:51 GMT):
the owner in tls ca certificate or in tls server certificate?

liurain (Mon, 08 Jul 2019 07:16:40 GMT):
tls server certificate

mattiabolzonella1 (Mon, 08 Jul 2019 07:49:11 GMT):
Do you set the external endpoint for each peer? And if you use a connection profile, did you set `discovery: true` in it for the peer to which tour sdk is connecting?

yeousunn (Mon, 08 Jul 2019 08:23:44 GMT):
I am using the default first-network sample. I have enabled discovery on all peers using the following property in docker environment `CORE_PEER_DISCOVERY_ENABLED=true` for all peers. External Endpoints are already configured in the sample.

yeousunn (Mon, 08 Jul 2019 08:23:44 GMT):
I am using the default first-network sample. I have enabled discovery on all peers using the following property in docker environment `CORE_PEER_DISCOVERY_ENABLED=true`. External Endpoints are already configured in the sample.

mattiabolzonella1 (Mon, 08 Jul 2019 08:26:38 GMT):
The strange thing is that the trasanction is successfully commited on the network

qsmen (Mon, 08 Jul 2019 08:44:58 GMT):
are you sure transaction is in peer's blockchain? or just in order's blockchain?

mattiabolzonella1 (Mon, 08 Jul 2019 09:59:57 GMT):
Yeah, from Fabric Explorer the transaction is valid and committed. Explorer is attached to an anchor peer, so it seems that the transaction is in the blockchain. There is another way to make sure if the transaction is in the peer's blockchain?

mattiabolzonella1 (Mon, 08 Jul 2019 09:59:57 GMT):
Yeah, from Fabric Explorer the transaction is valid and committed. Explorer is attached to an anchor peer, so it seems that the transaction is in the peer's blockchain. There is another way to make sure if the transaction is in the peer's blockchain?

mattiabolzonella1 (Mon, 08 Jul 2019 10:04:32 GMT):
Very strange, I'd check the docker logs of a peer to see if the discovery service is working. Set `CORE_LOGGING_PEER=DEBUG` in the peer's composer file

rjones (Mon, 08 Jul 2019 13:51:53 GMT):
Has joined the channel.

rjones (Mon, 08 Jul 2019 13:51:54 GMT):
@mastersingh24 is now an owner

rjones (Mon, 08 Jul 2019 13:51:58 GMT):
mastersingh24

rjones (Mon, 08 Jul 2019 13:52:09 GMT):
Has left the channel.

Vishal3152 (Mon, 08 Jul 2019 13:56:02 GMT):
Has joined the channel.

Vishal3152 (Mon, 08 Jul 2019 13:57:35 GMT):
Is there HSM support available in java-sdk?

nitishbhardwaj19 (Mon, 08 Jul 2019 15:12:21 GMT):
The README mentions this as a limitation

yeousunn (Tue, 09 Jul 2019 00:39:21 GMT):
I can see `registerDiscoveryService -> INFO 01c Discovery service activated`

qsmen (Tue, 09 Jul 2019 00:47:17 GMT):
you are lucky. my transaction just resides in order, not in peers

mattiabolzonella1 (Tue, 09 Jul 2019 08:23:31 GMT):
How did you figure out that the transaction resides only in orderer?

qsmen (Tue, 09 Jul 2019 08:26:56 GMT):
Lastblocknumber={36} Commitblock-> wrote block 36 Grpc server.serve failed to complete security handshake from “10.244.1.1:58916”

qsmen (Tue, 09 Jul 2019 08:27:18 GMT):
where the ip is running cni

qsmen (Tue, 09 Jul 2019 08:29:14 GMT):
i guess order can not find peer container. Now, my colleagure solved the problem in almost random way by modifying codes related to tls

mattiabolzonella1 (Tue, 09 Jul 2019 09:57:20 GMT):
I understand. Anyway the problem with the orderer is still bothering me. I cannot send proposal response only to the first orderer and not to the other in the raft cluster, still DNS resolution problem and in the log of the first orderer i see TLS handshake failure. Each orderer's container has a dedicate internal port and the same external port 7050, and i think that the setting is correct.

mattiabolzonella1 (Tue, 09 Jul 2019 09:57:20 GMT):
I understand. Anyway the problem with the orderer is still bothering me. I can only send proposal responseto the first orderer and not to the other in the raft cluster, still DNS resolution problem and in the log of the first orderer i see TLS handshake failure. Each orderer's container has a dedicate internal port and the same external port 7050, and i think that the setting is correct.

aatkddny (Wed, 10 Jul 2019 00:13:03 GMT):
I have a small problem with the code in Channel.java at ``` public Peer addPeer(SDPeerAdditionInfo sdPeerAddition) throws InvalidArgumentException, ServiceDiscoveryException { ``` this to be exact: ``` peer = sdPeerAddition.getClient().newPeer(endpoint, protocol + "//" + endpoint, properties); ``` Connecting an org to a channel to install chaincode on it. My org is `peer0-org` and it is at `localhost:30020`. It's constructing `grpcs://peer0-org:30020` It's ultimately coming from Channel.java ``` for (SDEndorser sdEndorser : sdNetwork.getEndorsers()) { final String sdEndorserMspid = sdEndorser.getMspid(); Peer peer = peerEndpointMap.get(sdEndorser.getEndpoint()); if (null == peer) { if (shutdown) { return; } logger.debug(format("Channel %s doing channel update found new peer mspid: %s, endpoint: %s", name, sdEndorserMspid, sdEndorser.getEndpoint())); sdPeerAddition.addPeer(new SDPeerAdditionInfo() { @Override public String getMspId() { return sdEndorserMspid; } @Override public String getEndpoint() { return sdEndorser.getEndpoint(); } ``` How should I get round this? Editing my hosts file isn't really going to scale well into a cluster.

aatkddny (Wed, 10 Jul 2019 00:13:03 GMT):
I have a small problem with the code in Channel.java at ``` public Peer addPeer(SDPeerAdditionInfo sdPeerAddition) throws InvalidArgumentException, ServiceDiscoveryException { ``` this to be exact: ``` peer = sdPeerAddition.getClient().newPeer(endpoint, protocol + "//" + endpoint, properties); ``` It was thrown when I tried connecting an org to a channel to install a piece of chaincode on it. My org is inside a k8s cluster at `peer0-org` and it is accessed externally through a node port at `localhost:30020`. It's constructing `grpcs://peer0-org:30020` and failing to get to it. It's ultimately coming from the service discovery piece inside Channel.java in `void sdUpdate(SDNetwork sdNetwork) throws InvalidArgumentException, ServiceDiscoveryException { ` ``` for (SDEndorser sdEndorser : sdNetwork.getEndorsers()) { final String sdEndorserMspid = sdEndorser.getMspid(); Peer peer = peerEndpointMap.get(sdEndorser.getEndpoint()); if (null == peer) { if (shutdown) { return; } logger.debug(format("Channel %s doing channel update found new peer mspid: %s, endpoint: %s", name, sdEndorserMspid, sdEndorser.getEndpoint())); sdPeerAddition.addPeer(new SDPeerAdditionInfo() { @Override public String getMspId() { return sdEndorserMspid; } @Override public String getEndpoint() { return sdEndorser.getEndpoint(); } ``` How should I get round this? Editing my hosts file isn't really going to scale well into a cluster.

aatkddny (Wed, 10 Jul 2019 00:13:03 GMT):
I have a small problem with the code in Channel.java at ``` public Peer addPeer(SDPeerAdditionInfo sdPeerAddition) throws InvalidArgumentException, ServiceDiscoveryException { ``` this to be exact: ``` peer = sdPeerAddition.getClient().newPeer(endpoint, protocol + "//" + endpoint, properties); ``` It was thrown when I tried connecting an org to a channel to install a piece of chaincode on it. My org is inside a k8s cluster at `peer0-org` and it is accessed externally through a node port at `localhost:30020`. It's constructing `grpcs://peer0-org:30020` and failing to get to it. It's ultimately coming from the service discovery piece inside Channel.java in `void sdUpdate(SDNetwork sdNetwork) throws InvalidArgumentException, ServiceDiscoveryException { ` ``` for (SDEndorser sdEndorser : sdNetwork.getEndorsers()) { final String sdEndorserMspid = sdEndorser.getMspid(); Peer peer = peerEndpointMap.get(sdEndorser.getEndpoint()); if (null == peer) { if (shutdown) { return; } logger.debug(format("Channel %s doing channel update found new peer mspid: %s, endpoint: %s", name, sdEndorserMspid, sdEndorser.getEndpoint())); sdPeerAddition.addPeer(new SDPeerAdditionInfo() { @Override public String getMspId() { return sdEndorserMspid; } @Override public String getEndpoint() { return sdEndorser.getEndpoint(); } ``` How should I get round this? Editing my hosts file isn't really going to scale well into a cluster and I'm loathe to point everything to the exposed host:port services.

qsmen (Wed, 10 Jul 2019 00:52:05 GMT):
maybe you can ask for help in fabric-orderer channel.

mattiabolzonella1 (Wed, 10 Jul 2019 07:07:19 GMT):
Yeah i think i'll ask there, thanks!

mattiabolzonella1 (Wed, 10 Jul 2019 09:21:07 GMT):

RaftOrderers_&_JavaSDK.txt

aatkddny (Thu, 11 Jul 2019 00:04:53 GMT):
Adding to my original message. Which is unfortunate. Even editing the hosts file isn't enough. By time it gets to the peer that starts throwing these: ``` 2019-07-10 23:54:34.126 UTC [grpc] HandleSubConnStateChange -> DEBU 4398 pickfirstBalancer: HandleSubConnStateChange: 0xc001eeef20, CONNECTING 2019-07-10 23:54:34.129 UTC [grpc] createTransport -> DEBU 4399 grpc: addrConn.createTransport failed to connect to {10.1.6.241:7051 0 }. Err :connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for 127.0.0.1, not 10.1.6.241". Reconnecting... ``` It was fine - meaning the two peers were talking to one another - until it went through the eventing code and the stuff above.

SatheeshNehru (Thu, 11 Jul 2019 05:46:02 GMT):
is there any way to view chaincode inside the peer ??

Vishal3152 (Thu, 11 Jul 2019 07:39:44 GMT):
Hi group,

Vishal3152 (Thu, 11 Jul 2019 07:40:14 GMT):
I am trying to mvn install fabric-sdk-java. All test cases are failing with this error:

Vishal3152 (Thu, 11 Jul 2019 07:40:15 GMT):
[INFO] ------------------------------------------------------- [INFO] Running org.hyperledger.fabric_ca.sdk.HFCAAffiliationTest 2019-07-11 07:10:29,579 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" 2019-07-11 07:10:29,585 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" 2019-07-11 07:10:29,613 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" 2019-07-11 07:10:29,614 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" 2019-07-11 07:10:29,645 main ERROR HFCAAffiliation:274 - Error while creating affiliation neworg1 url: http://localhost:99/api/v1/affiliations null

Vishal3152 (Thu, 11 Jul 2019 07:40:43 GMT):
Nowhere in the repo I could find how this file is created.

mahoney1 (Thu, 11 Jul 2019 11:52:15 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

bestbeforetoday (Thu, 11 Jul 2019 15:17:57 GMT):
Not sure if I understand your requirement correctly but perhaps you could use the overload of `Channel.sendTransactionProposal()` that allows you to specify which peers the proposal should be sent to for endorsement. You could specify an appropriate set of peers for each thread

mahoney1 (Thu, 11 Jul 2019 15:41:00 GMT):
FYI - reminder that the Fabric Developer Community call is in 20mins - 4pm UTC (5pm UK, 12pm ET, 9am PT) Meeting Id: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

aatkddny (Fri, 12 Jul 2019 14:11:31 GMT):
So I have a problem with the eventing service. It's throwing constant errors - there's an issue with connecting to the peer to catch up on missed blocks. ``` o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 14, channel: org-channel, peerName: peer1-org:30022, url: grpcs://peer1-org:30022}, attempts 0. UNAVAILABLE: Channel shutdownNow invoked ``` It's doing service discovery - log follows - to build the properties inside the peer. The call ultimately comes from `Peer#reconnectPeerEventServiceClient` log: ``` sdk.Peer : Peer{ id: 13, name: peer1-org:30022, channelName: org-channel, url: grpcs://peer1-org:30022, mspid: OrgMSP} reconnecting. Starting block number: newest sdk.ServiceDiscovery : Channel org-channel starting service rediscovery after 120 seconds. sdk.ServiceDiscovery : Full network discovery force: true sdk.ServiceDiscovery : Network discovery force: true sdk.ServiceDiscovery : Channel org-channel doing discovery with peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} sdk.Peer : peer.sendDiscoveryRequstAsync Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} sdk.EndorserClient : EndorserClient{id: 8, channel: org-channel, name:peer1-org, url: grpcs://localhost:30022} grpc channel isActive: true, isShutdown: false, isTerminated: false, state: READY sdk.ServiceDiscovery : Channel org-channel service discovery MSPID OrdererMSP adding TLSCert <.cut for size.> sdk.ServiceDiscovery : Channel org-channel service discovery MSPID OrgMSP adding TLSCert <.cut for size.> sdk.ServiceDiscovery : Channel: org-channel peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} discovered orderer MSPID: OrdererMSP, endpoint: raft0-orderer:7050 sdk.ServiceDiscovery : Channel org-channel no tls intermediary ca certs for mspid: OrdererMSP sdk.ServiceDiscovery : Channel: org-channel peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} discovered orderer MSPID: OrdererMSP, endpoint: raft1-orderer:7050 sdk.ServiceDiscovery : Channel org-channel no tls intermediary ca certs for mspid: OrdererMSP sdk.ServiceDiscovery : Channel: org-channel peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} discovered orderer MSPID: OrdererMSP, endpoint: raft2-orderer:7050 sdk.ServiceDiscovery : Channel org-channel no tls intermediary ca certs for mspid: OrdererMSP sdk.ServiceDiscovery : Channel org-channel no tls intermediary ca certs for mspid: OrgMSP sdk.ServiceDiscovery : Channel org-channel peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} discovered peer mspid group: OrgMSP, endpoint: peer0-org:30020, mspid: OrgMSP sdk.ServiceDiscovery : Channel org-channel no tls intermediary ca certs for mspid: OrgMSP sdk.ServiceDiscovery : Channel org-channel peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} discovered peer mspid group: OrgMSP, endpoint: peer1-org:30022, mspid: OrgMSP sdk.ServiceDiscovery : Channel org-channel service discovery completed: true sdk.ServiceDiscovery : Discover of chaincode names was empty. sdk.Channel : Channel org-channel doing channel update for service discovery. sdk.ServiceDiscovery : Full network rediscovery completed. sdk.ServiceDiscovery : Channel org-channel starting service rediscovery after 120 seconds. sdk.ServiceDiscovery : Full network discovery force: true sdk.ServiceDiscovery : Network discovery force: true sdk.ServiceDiscovery : Channel org-channel doing discovery with peer: Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} sdk.Peer : peer.sendDiscoveryRequstAsync Peer{ id: 6, name: peer1-org, channelName: org-channel, url: grpcs://localhost:30022} ```

aatkddny (Fri, 12 Jul 2019 14:16:51 GMT):
So the problem is an ssl issue where it eventually throws `java.io.IOException: No extension found with name NetscapeCertType` There's a handshake failure on the peer. The properties coming in to the endpoint have two values: `pembytes` and `org.hyperledger.fabric.sdk.peer.organization_mspid` The properties I build to talk to a peer have a few more properties in there. These to be precise `sslProvider, negotiationType, hostnameOverride, pemBytes, clientKeyBytes, clientCertBytes` Since I *can* talk to a peer clearly one of them is required.

aatkddny (Fri, 12 Jul 2019 14:16:51 GMT):
So the problem is an ssl issue where it eventually throws `java.io.IOException: No extension found with name NetscapeCertType` There's a handshake failure on the peer in the logs. The properties coming in to the endpoint have two values: `pembytes` and `org.hyperledger.fabric.sdk.peer.organization_mspid` The properties I build to talk to a peer have a few more properties in there. These to be precise `sslProvider, negotiationType, hostnameOverride, pemBytes, clientKeyBytes, clientCertBytes` Since I *can* talk to a peer clearly one of them is required. Am I missing some configuration that I need to set these somewhere before this kicks off?

SatoshiNishishita (Fri, 12 Jul 2019 16:09:34 GMT):
Has joined the channel.

SatoshiNishishita (Fri, 12 Jul 2019 16:09:37 GMT):
Hi team, please share me fabric sdk sample code. for example, connect the fabcar chaincode.

SatoshiNishishita (Fri, 12 Jul 2019 16:09:37 GMT):
Hi team, please share me fabric sdk sample code. for example, connect the fabcar chaincode. Thank you.

iramiller (Fri, 12 Jul 2019 16:25:26 GMT):
@aatkddny -- your experience sounds familiar to me. I rolled infrastructure scripts to manage all the cluster org/channel/chaincode management tasks instead of trying to use the Java (we are actually using Kotlin) SDK. I really recommend that you put components inside of the cluster that talk to HLF and expose services which can serve as proxies to the HLF interfaces that are designed to work well with your K8s load balancers and ingress. Essentially treat the HLF Java SDK like a 'resource' in your software architecture (similar to Postgres and the like). Oh and don't be afraid to fork things and modify for your needs. It really hasn't been too bad to maintain.

aatkddny (Fri, 12 Jul 2019 16:47:04 GMT):
@iramiller My next step forward is probably to dockerize my spring boot admin software and stick it into my cluster rather than having it run standalone. Which I wish I didn't have to do... Hopefully that'll ameliorate *some* of my networking problems. The problem is that won't fix things when I need to join peers across multiple clusters. I really don't want to have to fork the SDK - keeping my own stuff working between fabric versions is enough of a chore. It's a real shame that java is treated as a second class citizen when compared to node.

davidkel (Fri, 12 Jul 2019 17:11:17 GMT):
You could always raise a jira and of course I'm sure that contributions are always welcome

SatoshiNishishita (Fri, 12 Jul 2019 17:15:59 GMT):
Thank you. I constructed basic-network. And deployed fabcar chaincode.

SatoshiNishishita (Fri, 12 Jul 2019 17:15:59 GMT):
Thank you. I constructed basic-network. And deployed fabcar chaincode. my hope is connecting this chaincode with fabric-java-sdk. But there is nothing simple sample client code. Currently I made client code (below). Please give me an advice to complete this code. CryptoSuite cryptoSuite = CryptoSuite.Factory.getCryptoSuite(); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(cryptoSuite); Peer peer = client.newPeer("peer", "grpc://localhost:7051"); EventHub eventHub = client.newEventHub("ebenthub", "grpc://localhost:7053"); Orderer orderer = client.newOrderer("orderer", "grpc://localhost:7050"); Channel channel = client.newChannel("mychannel"); channel.addPeer(peer); channel.addEventHub(eventHub); channel.addOrderer(orderer); channel.initialize();

iramiller (Fri, 12 Jul 2019 17:33:22 GMT):
Contributions are certainly helpful ... but when you disagree with core architecture such as how peers/chaincode are handled such that you fork and replace that (but not fully covering existing use cases) I am not sure that any useful code is going to get contributed back from that.

iramiller (Fri, 12 Jul 2019 17:34:30 GMT):
Which is why I choose to contribute helpful info or at least provide some detail on my experience and solutions here in leu of code.

SatoshiNishishita (Fri, 12 Jul 2019 17:37:43 GMT):
Hi team, please share me fabric sdk sample code. for example, connect the fabcar chaincode. Thank you.

SatoshiNishishita (Fri, 12 Jul 2019 17:38:21 GMT):
Thank you. I constructed basic-network. And deployed fabcar chaincode. my hope is connecting this chaincode with fabric-java-sdk. But there is nothing simple sample client code. Currently I made client code (below). Please give me an advice to complete this code. CryptoSuite cryptoSuite = CryptoSuite.Factory.getCryptoSuite(); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(cryptoSuite); Peer peer = client.newPeer("peer", "grpc://localhost:7051"); EventHub eventHub = client.newEventHub("ebenthub", "grpc://localhost:7053"); Orderer orderer = client.newOrderer("orderer", "grpc://localhost:7050"); Channel channel = client.newChannel("mychannel"); channel.addPeer(peer); channel.addEventHub(eventHub); channel.addOrderer(orderer); channel.initialize();

SatoshiNishishita (Fri, 12 Jul 2019 17:39:35 GMT):
Thank you. I constructed basic-network. And deployed fabcar chaincode. my hope is connecting this chaincode with fabric-java-sdk. But there is nothing simple sample client code. Currently I made client code (below). Please give me an advice to complete this code. CryptoSuite cryptoSuite = CryptoSuite.Factory.getCryptoSuite(); HFClient client = HFClient.createNewInstance(); client.setCryptoSuite(cryptoSuite); Peer peer = client.newPeer("peer", "grpc://localhost:7051"); EventHub eventHub = client.newEventHub("ebenthub", "grpc://localhost:7053"); Orderer orderer = client.newOrderer("orderer", "grpc://localhost:7050"); Channel channel = client.newChannel("mychannel"); channel.addPeer(peer); channel.addEventHub(eventHub); channel.addOrderer(orderer); channel.initialize();

aatkddny (Fri, 12 Jul 2019 18:27:51 GMT):
your hfclient needs a user context for sure - you need a peer admin iirc.

liurain (Mon, 15 Jul 2019 01:20:45 GMT):
Your understanding is correct, thank you very much for your help.

githubcpc (Mon, 15 Jul 2019 01:37:50 GMT):
Can I use Fabric-sdk-java to create a new channel?

githubcpc (Mon, 15 Jul 2019 02:48:03 GMT):
Just like node-sdk , https://fabric-sdk-node.github.io/tutorial-channel-create.html. new ChannelConfig --> signChannelConfig --> updateChannel

liurain (Mon, 15 Jul 2019 09:05:45 GMT):
This is no problem.

liurain (Mon, 15 Jul 2019 09:15:21 GMT):
Hi everyone, I want to use the fabric-sdk-java to get the latest configuration block of the system channel. But I found that only one private method, Channel.getConfigurationBlock(), can get this block. Can you give me a workable way?

sandy (Mon, 15 Jul 2019 11:30:48 GMT):
How to configure ChainCodeEndorsementPolicy using ChainCodeEndorsementPolicy.fromBytes method?

sandy (Mon, 15 Jul 2019 11:32:01 GMT):
I have configured using ChainCodeEndorsementPolicy.fromBytes("AND('Org1MSP.member','Org2MSP.member')") but it doesn't seems working..

sandy (Mon, 15 Jul 2019 11:32:12 GMT):
getting error like error unmarshaling to signature policy hyperledger

sandy (Mon, 15 Jul 2019 11:32:23 GMT):
Can someone assist me on this?

Jelle.Diet (Mon, 15 Jul 2019 11:39:52 GMT):
The method seems to expect a byte array not a string, so try converting your string to bytes: ChainCodeEndorsementPolicy.fromBytes("AND('Org1MSP.member','Org2MSP.member')".getBytes(StandardCharsets.UTF_8))

sandy (Mon, 15 Jul 2019 11:46:21 GMT):
Sorry... I already used haincodeEndorsementPolicy.fromBytes("AND('Org1MSP.member','Org2MSP.member')".getBytes())

sandy (Mon, 15 Jul 2019 11:46:36 GMT):
But it is throwing error unmarshaling to signature policy hyperledger

sandy (Mon, 15 Jul 2019 12:15:09 GMT):
I have configured using ChainCodeEndorsementPolicy.fromBytes("AND('Org1MSP.member','Org2MSP.member')",getBytes()) but it doesn't seems working.. It is throwing error " error unmarshaling to signature policy hyperledger" @Jelle.Diet @rickr . Can you please help?

Jelle.Diet (Mon, 15 Jul 2019 12:23:29 GMT):
I have noticed that that way of defining policy might be outdated, to get it work I had to use the version shown here https://fabric-sdk-node.github.io/release-1.4/tutorial-private-data.html

Relax20190715 (Mon, 15 Jul 2019 12:43:10 GMT):
Has joined the channel.

ihormudryy (Mon, 15 Jul 2019 12:50:01 GMT):
Has joined the channel.

liurain (Tue, 16 Jul 2019 01:04:46 GMT):
You can refer to the example in the test case.`src/test/fixture/sample_chaincode_endorsement_policies/testCCEPPolicy.yaml`

darapich92 (Tue, 16 Jul 2019 06:02:38 GMT):
hi all, i have a question related to the verification of the signature of CA. for instance, org1 issued a certificate for Client 1 and how can another org is org2 can verify client1's certificate? could you guide me to the source code that i can learn?

sandy (Tue, 16 Jul 2019 12:16:21 GMT):
Hi.. As both the orgs are in the same channel , the root certifcates of the CA of both the orgs are present in the genesis block of the channel. Using the root CA certificate,Org2 can verify Org1's client certificate...

githubcpc (Wed, 17 Jul 2019 09:53:10 GMT):
Can I use Fabric-sdk-java to create a new channel with org1.peer and org2.peer? I hava already create a new channel with single org successfully.But I can't create with two orgs.

tballast (Wed, 17 Jul 2019 11:24:54 GMT):
When using the Java SDK, I wish to instantiate chaincode on a channel, and I have an endorsement policy that requires that it is endorsed by both Org1 and Org2. I am running my client from the context of Org1, which will not know about the private keys of Org2. I set up my channel and attach the Org 1 peers as well as an Org2 peer, however it always fails the endorsement stage. In the logs of the docker containers I see the following: ``` 2019-07-17 10:36:35.868 UTC [cauthdsl] func1 -> DEBU b8de 0xc0024b0660 gate 1563359795868828340 evaluation starts 2019-07-17 10:36:35.868 UTC [cauthdsl] func2 -> DEBU b8df 0xc0024b0660 signed by 0 principal evaluation starts (used [false]) 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e0 0xc0024b0660 processing identity 0 with bytes of aa4b30 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e1 0xc0024b0660 identity 0 does not satisfy principal: This identity is not an admin 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e2 0xc0024b0660 principal evaluation fails 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e3 0xc0024b0660 signed by 1 principal evaluation starts (used [false]) 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e4 0xc0024b0660 processing identity 0 with bytes of aa4b30 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e5 0xc0024b0660 identity 0 does not satisfy principal: the identity is a member of a different MSP (expected Org2MSP, got Org1MSP) 2019-07-17 10:36:35.869 UTC [cauthdsl] func2 -> DEBU b8e6 0xc0024b0660 principal evaluation fails 2019-07-17 10:36:35.869 UTC [cauthdsl] func1 -> DEBU b8e7 0xc0024b0660 gate 1563359795868828340 evaluation fails ... 2019-07-17 10:36:35.870 UTC [endorser] ProcessProposal -> ERRO b8ef [www.reportix.com][6cd4345c] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: 6cd4345c7ecb09121adaa1e1d345eddb633397972c4e20b19c393ed9fa3649c4 ``` How can I submit transactions as Org1, when endorsement is required by _both_ Org1 and Org2, without knowing the information from Org2? Am I missing something?

tballast (Wed, 17 Jul 2019 15:31:49 GMT):
I wish to upgrade chaincode via a Java client. I am using Java chaincode. I am _also_ upgrading via the cli. If I install the java chaincode on peer0, I need to specify a path so it installs correctly. When I install the chaincode on peer1 with the client, it forces me to make the path null. Then, when I try to use the client to construct and UpgradeProposal, it complains that the two chaincodes are inconsistent. How is it possible to do this?

dan13 (Wed, 17 Jul 2019 17:18:45 GMT):
slow

yeousunn (Thu, 18 Jul 2019 01:51:19 GMT):
Hi all, I am using discovery to find out number of nodes on the fabric network, my configuration looks like this ``` channels: mychannel: orderers: - orderer.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true discover: true ``` ``` peers: peer0.org1.example.com: url: grpcs://192.168.14.245:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com grpc.http2.keepalive_time: 15 hostnameOverride: peer0.org1.example.com tlsCACerts: path: /home/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt ``` It returnes 5 peer node when I call `getPeers()` function ``` Collection peers = mychannel.getPeers(); int noOfPeers = peers.size(); ``` When I dump peers I can see that it has double entry for anchor peer, in my case id: 3 and id: 6 ``` [ Peer{ id: 7, name: peer0.org2.example.com:9051, channelName: mychannel, url: grpcs://peer0.org2.example.com:9051}, Peer{ id: 9, name: peer1.org2.example.com:10051, channelName: mychannel, url: grpcs://peer1.org2.example.com:10051}, Peer{ id: 3, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://192.168.14.245:7051}, Peer{ id: 6, name: peer0.org1.example.com:7051, channelName: mychannel, url: grpcs://peer0.org1.example.com:7051}, Peer{ id: 8, name: peer1.org1.example.com:8051, channelName: mychannel, url: grpcs://peer1.org1.example.com:8051} ] ``` I am using first-network sample for this. Anyone know why this is happening?

yeousunn (Thu, 18 Jul 2019 01:51:19 GMT):
Hi all, I am using discovery to find out number of nodes on the fabric network, my configuration looks like this ``` channels: mychannel: orderers: - orderer.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true discover: true ``` ``` peers: peer0.org1.example.com: url: grpcs://192.168.14.245:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com grpc.http2.keepalive_time: 15 hostnameOverride: peer0.org1.example.com tlsCACerts: path: /home/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt ``` It returns 5 peer node when I call `getPeers()` function ``` Collection peers = mychannel.getPeers(); int noOfPeers = peers.size(); ``` When I dump peers I can see that it has double entry for anchor peer, in my case id: 3 and id: 6 ``` [ Peer{ id: 7, name: peer0.org2.example.com:9051, channelName: mychannel, url: grpcs://peer0.org2.example.com:9051}, Peer{ id: 9, name: peer1.org2.example.com:10051, channelName: mychannel, url: grpcs://peer1.org2.example.com:10051}, Peer{ id: 3, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://192.168.14.245:7051}, Peer{ id: 6, name: peer0.org1.example.com:7051, channelName: mychannel, url: grpcs://peer0.org1.example.com:7051}, Peer{ id: 8, name: peer1.org1.example.com:8051, channelName: mychannel, url: grpcs://peer1.org1.example.com:8051} ] ``` I am using first-network sample for this. Anyone know why this is happening?

yeousunn (Thu, 18 Jul 2019 01:51:19 GMT):
Hi all, I am using discovery to find out number of nodes on the fabric network, my configuration looks like this ``` channels: mychannel: orderers: - orderer.example.com peers: peer0.org1.example.com: endorsingPeer: true chaincodeQuery: true ledgerQuery: true eventSource: true discover: true ``` ``` peers: peer0.org1.example.com: url: grpcs://192.168.14.245:7051 grpcOptions: ssl-target-name-override: peer0.org1.example.com grpc.http2.keepalive_time: 15 hostnameOverride: peer0.org1.example.com tlsCACerts: path: /home/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt ``` It returns 5 peer node instead of 4 when I call `getPeers()` function ``` Collection peers = mychannel.getPeers(); int noOfPeers = peers.size(); ``` When I dump peers I can see that it has double entry for anchor peer, in my case id: 3 and id: 6 ``` [ Peer{ id: 7, name: peer0.org2.example.com:9051, channelName: mychannel, url: grpcs://peer0.org2.example.com:9051}, Peer{ id: 9, name: peer1.org2.example.com:10051, channelName: mychannel, url: grpcs://peer1.org2.example.com:10051}, Peer{ id: 3, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://192.168.14.245:7051}, Peer{ id: 6, name: peer0.org1.example.com:7051, channelName: mychannel, url: grpcs://peer0.org1.example.com:7051}, Peer{ id: 8, name: peer1.org1.example.com:8051, channelName: mychannel, url: grpcs://peer1.org1.example.com:8051} ] ``` I am using first-network sample for this. Anyone know why this is happening?

chill37 (Thu, 18 Jul 2019 04:25:21 GMT):
Hi. is there any steps I'm missing in contributing this? Just trying to get into habit of contributing so trying out a simple typo first. Not sure if this is how I should be doing it. could anyone check it for me? It's FABJ-454 https://jira.hyperledger.org/projects/FABJ/issues/FABJ-454?filter=allopenissues

yeousunn (Thu, 18 Jul 2019 07:01:00 GMT):
Ok, I solved it by editing /etc/hosts file and adding an entry for peer ``` 192.168.14.245 peer0.org1.example.com ```

davidkel (Thu, 18 Jul 2019 07:38:18 GMT):
It might be worth raising a JIRA as well about this to see if it's possible to handle better.

yeousunn (Thu, 18 Jul 2019 07:43:50 GMT):
alright, will submit to jira.

bestbeforetoday (Thu, 18 Jul 2019 08:33:56 GMT):
That looks fine as a Jira. To contribute a fix you will need to clone the Git repository and push changes back to Gerrit for review. There is some useful information in the project README.md displayed at https://github.com/hyperledger/fabric-sdk-java, and the Gerrit repository is at https://gerrit.hyperledger.org/r/admin/repos/fabric-sdk-java

bestbeforetoday (Thu, 18 Jul 2019 08:46:14 GMT):
I see you're two steps ahead of me and have already raised two (identical) CRs in Gerrit! I have merged one and -2'd the duplicate

chill37 (Thu, 18 Jul 2019 08:47:55 GMT):
@bestbeforetoday i wasnt too sure about the process. Thanks! I will abondon the other commit.

SatheeshNehru (Thu, 18 Jul 2019 13:20:21 GMT):
in fabcar example data is stored as document in couchdb whereas in mycc[chaincode_example02] data is stored as attachment in couchdb when does it store as document ?and when as attachment?

dan13 (Thu, 18 Jul 2019 18:53:40 GMT):
HLF 1.4.1 - running locally (ubuntu-based pc) we are seeing very slow (>>60s) times to submit a transaction proposal using idemix credentials (<1s with normal x509) -- has anyone else experienced this? Using -Djava.security.egd=file:/dev/./urandom to reduce the SecureRandom time did not make any difference. Thx!

yeousunn (Fri, 19 Jul 2019 00:47:10 GMT):
https://jira.hyperledger.org/browse/FABJ-460

yeousunn (Fri, 19 Jul 2019 07:21:35 GMT):
Hi, I have a few channels and different number of peers joined to those channels, I am querying channel and retrieving all the peers that are joined to the channel. I can get all the peers if I have that channel configuration in yaml file. But what if I don't have configuration for the channels? Right now I get null for channel that has no configuration in yaml. Is there a way to do this without adding configuration for all channels?

yeousunn (Fri, 19 Jul 2019 08:53:36 GMT):
When I am querying peers with out discovery I am getting the following result > FabricPeer(name=peer1.org1.example.com, url=grpcs://192.168.14.245:8051, protocol=grpcs, properties={pemFile=/home/thgy/work/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt, ssl-target-name-override=peer1.org1.example.com, grpc.http2.keepalive_time=15, hostnameOverride=peer1.org1.example.com}) But when I enable discovery I get > FabricPeer(name=peer0.org2.example.com:9051, url=grpcs://peer0.org2.example.com:9051, protocol=grpcs, properties={pemBytes=[B@635fe6c2}) In place of pemFile I am getting pemBytes when discovery is enabled. I need pemFile information.

yeousunn (Fri, 19 Jul 2019 08:53:36 GMT):
When I am querying peers with out discovery I am getting the following result > FabricPeer(name=peer1.org1.example.com, url=grpcs://192.168.14.245:8051, protocol=grpcs, properties={pemFile=/home/work/hyperledger/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt, ssl-target-name-override=peer1.org1.example.com, grpc.http2.keepalive_time=15, hostnameOverride=peer1.org1.example.com}) But when I enable discovery I get > FabricPeer(name=peer0.org2.example.com:9051, url=grpcs://peer0.org2.example.com:9051, protocol=grpcs, properties={pemBytes=[B@635fe6c2}) In place of pemFile I am getting pemBytes when discovery is enabled. I need pemFile information.

asaningmaxchain123 (Fri, 19 Jul 2019 15:36:50 GMT):
Has left the channel.

dan13 (Fri, 19 Jul 2019 15:47:47 GMT):
If you convert the byte array to string, what do you get?

yeousunn (Mon, 22 Jul 2019 02:11:37 GMT):
String value: {pemBytes=[B@6e1fe857}

dan13 (Mon, 22 Jul 2019 02:13:56 GMT):
that's just the byte array toString, which is from Object -- try String s = new String(bytes)

yeousunn (Mon, 22 Jul 2019 02:33:51 GMT):
That is "Properties" object.

yeousunn (Mon, 22 Jul 2019 02:35:14 GMT):

Clipboard - July 22, 2019 10:34 AM

yeousunn (Mon, 22 Jul 2019 02:37:46 GMT):
It's like this, When I have `discover: true` I get correct information for the anchor peer. but for other peers. the Properties field is Json value with some bytes.

yeousunn (Mon, 22 Jul 2019 02:47:21 GMT):
I think this as to do with config file. anchor peer information is taken from config file where as other peers are discovered.

yeousunn (Mon, 22 Jul 2019 02:47:21 GMT):
I think this has to do with config file. anchor peer information is taken from config file where as other peers are discovered.

yeousunn (Mon, 22 Jul 2019 03:01:36 GMT):
and this code` String p = peer.getProperties().getProperty("pemBytes");` returns `null`

yeousunn (Mon, 22 Jul 2019 05:34:49 GMT):
Is there a way to make Peer object using the names returned by `OrgInfo.getPeerNames();`?

tballast (Mon, 22 Jul 2019 11:23:40 GMT):
In the End2EndIT example there are 3 users defines. The Admin, the User, and the PeerAdmin. What is the difference between Admin and PeerAdmin?

tballast (Mon, 22 Jul 2019 11:23:40 GMT):
In the End2EndIT example there are 3 users defined. The Admin, the User, and the PeerAdmin. What is the difference between Admin and PeerAdmin?

Antimttr (Mon, 22 Jul 2019 14:37:23 GMT):
i beleive admin is the admin cert for the ca, where as peeradmin is the actual admin account on the channel

Antimttr (Mon, 22 Jul 2019 14:38:12 GMT):
so one is for enrolling users, the other is for signing endorsements for channel config changes and the like

tballast (Mon, 22 Jul 2019 15:00:13 GMT):
Ahh ok I see, thank you. From what I've seen that makes sense.

darapich92 (Wed, 24 Jul 2019 09:42:32 GMT):
hi all, i have a question related to register a user in Java sdk. i called ca0 to register a user by setting the affiliation "Org1.department". i failed in registration and i saw the error message in the cmd is "Failed getting affiliation 'org1.department': Failed to get affiliation: sql: no rows in result set". Could you tell me where is the sql where stored the affiliations?

yuriiuhlanov (Wed, 24 Jul 2019 16:04:21 GMT):
please refer to the documentation https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#registering-a-new-identity. The first thing that comes to my mind is your registrar has different affiliation than that you are setting at the new client

mahoney1 (Thu, 25 Jul 2019 14:36:11 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

tballast (Fri, 26 Jul 2019 07:50:59 GMT):
Is the primary purpose of the NetworkConfig class to run a non-administrative client? I am trying to use it, however if you want to actually stand a network up (Ie. create a channel from scratch, join peers to it, etc) then it seems that this not ideal. Anyone have experience with it?

tballast (Fri, 26 Jul 2019 08:53:06 GMT):
Or rather, not necessarily non-administrative, but at the very least it seems like one is unable to create a channel from scratch with the network config alone.

mahoney1 (Fri, 26 Jul 2019 10:14:18 GMT):
@tballast you would be using the Client to create channels, nodes, join peers etc from scratch ->https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/HFClient.html whereas NetworkConfig https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/NetworkConfig.html holds details of network and channel configurations of the running network, typically loaded from an external config file (eg. json, yaml etc).

tballast (Fri, 26 Jul 2019 10:20:16 GMT):
@mahoney1 I see. Yea, that makes sense, I was just wondering because even if you're using the NetworkConfig, you still need to have a client to interact with the network. However, if you want to do something like create it from scratch you need to join the peers to it, and create an orderer, but you can't pull all of this information from the NetworkConfig, just really basic stuff like names and properties (no locations or Peer Roles, etc.) So in that case, the actual _initialization_ (construct channel, install/instantiate chaincode) of the network is fairly separate from the _interaction_ (invoke, query, etc). I thought that perhaps the yaml file could be used as a properties file for building the network from scratch, but it doesn't look like it.

Bentipe (Fri, 26 Jul 2019 10:29:23 GMT):
Has joined the channel.

dan13 (Fri, 26 Jul 2019 15:55:57 GMT):
If you look at the IBM Blockchain Platform (IBP) 2.0, you build everything (other than the k8s cluster) through a "blockchain console" web app. I think scripting (like byfn.sh) makes more sense for blockchain-based apps rather than blockchain-as-a-service providers (IBP) but strictly my opinion. Either way you start with some description of your desired network -- and the only requirement is that it has all the info necessary to be successful -- and use some means to instantiate it.

cody588 (Tue, 30 Jul 2019 07:12:21 GMT):
Has joined the channel.

Vishal3152 (Tue, 30 Jul 2019 11:06:45 GMT):
The affiliation - org1.department doe snot exist.

Vishal3152 (Tue, 30 Jul 2019 11:07:22 GMT):
You can view or add affiliation for signing using fabric-ca-client affiliation command

sandy (Tue, 30 Jul 2019 14:30:19 GMT):
hi.. Am using putState(Key,JSON) to store document in couchdb.. Is there anyway to store unique uuid inside a document as a field?

sandy (Tue, 30 Jul 2019 14:32:05 GMT):
am trying to use uuid as a PK for the document.. Any idea?

Kupiku_2k (Thu, 01 Aug 2019 11:48:07 GMT):
Has joined the channel.

Kupiku_2k (Thu, 01 Aug 2019 11:49:17 GMT):
Hi guys, I have a problem calling to a chaincode with fabric-java-sdk I have a network with 2 peer, 3 orderer (raft), a fabric-ca and a fabricTLS-ca Here in my channel initialization code: Properties properties = new Properties(); properties.put("pemBytes", configuration.getCertBytes()); properties.put("negotiationType", "TLS"); properties.put("sslProvider", "openSSL"); // initialize channel Channel channel = client.newChannel(channelName); // peers name and endpoint for (HyperLedgerFabricComponent peer : configuration.getPeers()) { channel.addPeer((client.newPeer(peer.getName(), peer.getUrl(), properties))); } // orderer name and endpoint for (HyperLedgerFabricComponent orderer : configuration.getOrderers()) { channel.addOrderer(client.newOrderer(orderer.getName(), orderer.getUrl(), properties)); } channel.registerBlockListener(blockEventListener); return channel.initialize(); When I run I get this error "2019-08-01 13:07:13,436 [WARN http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:initialize:1268] Channel testchannel could not load peer CA certificates from any peers. ""2019-08-01 13:07:14,521 [INFO http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:initialize:1309] Channel Channel{id: 1, name: testchannel} eventThread started shutdown: false thread: null ""2019-08-01 13:08:32,720 [ERROR http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:sendProposalToPeers:4469] Channel Channel{id: 1, name: testchannel} Sending proposal with transaction: ea56bbc2800b99dd642c52cbb29329e1e6049f2f1cda32c06cedcf1f8a8bd222 to Peer{ id: 2, name: peer0.test.es, channelName: testchannel, url: grpcs://172.33.13.79:7051} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem at io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier.verify(ReferenceCountedOpenSslContext.java:629) ...... Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397) ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ... 34 more } I an using tls-cert.pem of the fabricTLS-ca. Is that correct? Any ideas? Thank you

Kupiku_2k (Thu, 01 Aug 2019 11:49:17 GMT):
Hi guys, I have a problem calling to a chaincode with fabric-java-sdk I have a network with 2 peer, 3 orderer (raft), a fabric-ca and a fabricTLS-ca Here in my channel initialization code: Properties properties = new Properties(); properties.put("pemBytes", configuration.getCertBytes()); properties.put("negotiationType", "TLS"); properties.put("sslProvider", "openSSL"); // initialize channel Channel channel = client.newChannel(channelName); // peers name and endpoint for (HyperLedgerFabricComponent peer : configuration.getPeers()) { channel.addPeer((client.newPeer(peer.getName(), peer.getUrl(), properties))); } // orderer name and endpoint for (HyperLedgerFabricComponent orderer : configuration.getOrderers()) { channel.addOrderer(client.newOrderer(orderer.getName(), orderer.getUrl(), properties)); } channel.registerBlockListener(blockEventListener); return channel.initialize(); When I run I get this error "2019-08-01 13:07:13,436 [WARN http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:initialize:1268] Channel testchannel could not load peer CA certificates from any peers. ""2019-08-01 13:07:14,521 [INFO http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:initialize:1309] Channel Channel{id: 1, name: testchannel} eventThread started shutdown: false thread: null ""2019-08-01 13:08:32,720 [ERROR http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:sendProposalToPeers:4469] Channel Channel{id: 1, name: testchannel} Sending proposal with transaction: ea56bbc2800b99dd642c52cbb29329e1e6049f2f1cda32c06cedcf1f8a8bd222 to Peer{ id: 2, name: peer0.test.es, channelName: testchannel, url: grpcs://172.33.13.79:7051} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem at io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier.verify(ReferenceCountedOpenSslContext.java:629) ...... Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397) ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ... 34 more } I an using tls-cert.pem of the fabricTLS-ca. Is that correct? Any ideas? PD: channel exsits, a chaincode is instantiated there and I can invoke successfully the chaincode inside a peer (using TLS) Thank you

Kupiku_2k (Thu, 01 Aug 2019 11:49:17 GMT):
Hi guys, I have a problem calling to a chaincode with fabric-java-sdk I have a network with 2 peer, 3 orderer (raft), a fabric-ca and a fabricTLS-ca Here in my channel initialization code: Properties properties = new Properties(); properties.put("pemBytes", configuration.getCertBytes()); properties.put("negotiationType", "TLS"); properties.put("sslProvider", "openSSL"); // initialize channel Channel channel = client.newChannel(channelName); // peers name and endpoint for (HyperLedgerFabricComponent peer : configuration.getPeers()) { channel.addPeer((client.newPeer(peer.getName(), peer.getUrl(), properties))); } // orderer name and endpoint for (HyperLedgerFabricComponent orderer : configuration.getOrderers()) { channel.addOrderer(client.newOrderer(orderer.getName(), orderer.getUrl(), properties)); } channel.registerBlockListener(blockEventListener); return channel.initialize(); When I run I get this error "2019-08-01 13:07:13,436 [WARN http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:initialize:1268] Channel testchannel could not load peer CA certificates from any peers. ""2019-08-01 13:07:14,521 [INFO http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:initialize:1309] Channel Channel{id: 1, name: testchannel} eventThread started shutdown: false thread: null ""2019-08-01 13:08:32,720 [ERROR http-nio-8084-exec-1] [org.hyperledger.fabric.sdk.Channel:sendProposalToPeers:4469] Channel Channel{id: 1, name: testchannel} Sending proposal with transaction: ea56bbc2800b99dd642c52cbb29329e1e6049f2f1cda32c06cedcf1f8a8bd222 to Peer{ id: 2, name: peer0.test.es, channelName: testchannel, url: grpcs://172.33.13.79:7051} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem at io.netty.handler.ssl.ReferenceCountedOpenSslContext$AbstractCertificateVerifier.verify(ReferenceCountedOpenSslContext.java:629) ...... Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397) ... 27 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ... 34 more } I an using tls-cert.pem of the fabricTLS-ca. Is that correct? Any ideas? PD: channel exists, a chaincode is instantiated there and I can invoke successfully the chaincode inside a peer (using TLS) Thank you

bestbeforetoday (Thu, 01 Aug 2019 15:26:47 GMT):
A beta/early release of the Contracts programming model for developing Java chaincode was mentioned over in the #fabric-chaincode-dev channel. There is also an accompanying Gateway programming model for the client SDK. A blog post with lots of description and code snippets is at http://proterra.me.uk/nx01/programming/2019/07/31/201/ Direct link to the client SDK: https://github.com/hyperledger/fabric-gateway-java

bestbeforetoday (Thu, 01 Aug 2019 15:27:34 GMT):
Feedback is welcome

jyellick (Thu, 01 Aug 2019 18:25:16 GMT):
@bestbeforetoday It seems like the Java SDK CI may be broken? https://gerrit.hyperledger.org/r/c/fabric-sdk-java/+/32638 the error I'm seeing here doesn't seem like it could be related to my change

bestbeforetoday (Thu, 01 Aug 2019 18:31:37 GMT):
The protobuf definitions got changed, which has broken the SDK build. I hope to have a fix in soon. https://gerrit.hyperledger.org/r/c/fabric-sdk-java/+/32611

jyellick (Thu, 01 Aug 2019 18:33:19 GMT):
Should I be good to rebase on that, or would you recommend I hold off?

bestbeforetoday (Thu, 01 Aug 2019 18:34:54 GMT):
I keep spotting little niggles, like missing license headers. If this build passes then I think I'll try to get this patch set in regardless so the build is passing again

huxd (Fri, 02 Aug 2019 01:29:48 GMT):
Has joined the channel.

lotty02cho (Fri, 02 Aug 2019 08:15:02 GMT):
I try to run End2endIT using IntelliJ but when I start, Run 'End2endIT.java', the error comes out like below, ``` RUNNING: End2endIT. ***** Enrolling Users ***** 2019-08-02 07:54:52,362 main INFO HFCAClient:594 - CA Name: ca0, Version: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNRekNDQWVxZ0F3SUJBZ0lSQU0vdmFEdlBzeUlpQzlodm41bm5SOEF3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpFdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekV1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGd3TWpJMU1USTBNekk1V2hjTk1qZ3dNakl6TVRJME16STUKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dBMVVFQ2hNUWIzSm5NUzVsZUdGdGNHeGxMbU52YlRFY01Cb0dBMVVFCkF4TVRZMkV1YjNKbk1TNWxlR0Z0Y0d4bExtTnZiVEJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUEKQkxxSTlkWDdkOU5HbzNndUw1RlA4b3RHc2lCak43QnpkNmRHL0NheUpEZmpOUkczNFlPOHQyOTl1NkVvRlh2egpwY2pBTUd1MFVLVHJ6TWZjeU91emNNeWpYekJkTUE0R0ExVWREd0VCL3dRRUF3SUJwakFQQmdOVkhTVUVDREFHCkJnUlZIU1VBTUE4R0ExVWRFd0VCL3dRRk1BTUJBZjh3S1FZRFZSME9CQ0lFSUxITU5NUHkwTStBZUdqNk9ob1IKaDAwZ1FUQ0VYOWp1czIwdVdVVFhkbmNjTUFvR0NDcUdTTTQ5QkFNQ0EwY0FNRVFDSUY3V2wzQTExekVOcjFDbwpxR3l1M2g0ZkN1a2t0RlZ5Ry9XUEpVeWxWWGpJQWlCOUxqcFhtOUVSZ0pNZlpzakRJekNqOU00YVF1Vk45WExrClhueDB1b0t6N2c9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==, issuerPublicKey: CgJPVQoEUm9sZQoMRW5yb2xsbWVudElEChBSZXZvY2F0aW9uSGFuZGxlEkQKIDwI9XgGar29lWsgJQ5P++7nzIIlwWWGLEJ51ykde2A1EiCqCseWTnj4fux5l9ozepRqBhlZDfRZQFOKy755TIRikhpECiBvNt5Wcruon1yTI2OEtyActT1S0GLFcfCWXRMFykliiBIgL2P8/HJvbEI5pLb0LgoTUA1JDYYS+/MKC5irpY6t25wiRAogCAVRXVLX9SAwPD64Io0XEBFzpU0AOLnlUO84CJEN/XMSINGlHg7UFotyrB8gssFv3O56azHl+2X+k0nC2fS4IJY7IkQKILXIuSKsaLPOEnzyALvLpiW5rwRrAZZGHtkGx4CDUyY3EiDTMRCTEROrAXB/ZINA+RP3FzeUgnDLxLOes+OubkOQIyJECiA0wS8aoljJ6XkaAm6viC3+OY1WhN+zlEgfckCrIeFzixIgOKoxJtgZrFma+LPjLye6/RYlejeNegmSePueBMhOctYiRAogP3UpF6MJUiwgP1WAEdcEUmA1qBzM/pnh/P4DvTClVNsSII0ME/JUvx2G/KanqXhHSdiOPO8JMvl/oT9j86NE5acMKogBCiAkGHyPPIpfZ62j37rU+vuyhyVn3GTzHxzfENb4L81d9hIg4lovQafbr+EQ8oOgJNQYJTNoxrwt03gX0KoS351tA9AaIAprAFVW8Rj/oz5qv8EgezttuHVW6CeYxhClVaUXgkv8IiCB5IQt3kHBcfaLZ0G6T07NcgX0yEcLq/SCjjIzC+OMITJECiBjX+SptFK5yiKrp6p2unJEQzicZrOl7pcjQaYCRscHxBIgNa9BFzQiJmywsmJlMcjSexW66XrrJZzTGZIGjeuiobU6RAogiyMMfc2QIHR94xmd+qIfFFeu8C0G3x/as3asLSH63YcSIEPbCHzdb/sMxS5h42sPx+bhLbJ0UzYMapdOKilxyluFQiC+JXB0Nrg+JUDkXOO30VuNa1OWTaY+uui66lvI59+s/EogS5zQNR8QLbjptQUWittI672tran5xUvtidx7QeTSjQVSIHRZz7ANrFN/racCNVLnIrCqzxKU+QGje3+AuKvFasmy, issuerRevocationPublicKey: LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUhZd0VBWUhLb1pJemowQ0FRWUZLNEVFQUNJRFlnQUU3d0JoWklYNkFHNE9ZTDRlNmlYMVJRZlNkL1VkL2pNdApjS3JZZjZzM0cyZm9QSU5PYXFyeFg4WFIrcGJDRm5ObjFla0JnaE4wZ0RKMnlOeUQ2M3lhM2l4d05jblVLbEZlCml5NlRhRHo3enBOMWVQSmxXeWhjSFJSQk1la2VMQVRvCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo= 2019-08-02 07:54:52,381 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" .... org.hyperledger.fabric_ca.sdk.exception.RegistrationException: Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@3d285d7e url: http://localhost:7054 POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} .... Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} ``` Does anyone know about how to solve this issue?

lotty02cho (Fri, 02 Aug 2019 08:15:02 GMT):
I try to run End2endIT using IntelliJ but when I start, Run 'End2endIT.java', the error comes out like below, ``` RUNNING: End2endIT. ***** Enrolling Users ***** 2019-08-02 07:54:52,362 main INFO HFCAClient:594 - CA Name: ca0, Version: LS0tLS1CRUdJTiBDRVJUSUZJ.... 2019-08-02 07:54:52,381 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" 2019-08-02 07:54:52,405 main INFO SampleStore:91 - Could not find the file "/tmp/HFCSampletest.properties" 2019-08-02 07:54:53,533 main INFO HFCAClient:594 - CA Name: ca0, Version: LS0tLS1CRUdJTiBDRVJUSU..... 2019-08-02 07:54:53,535 main INFO HFCAClient:1542 - CA Version: 1.4.2 2019-08-02 07:54:53,592 main ERROR HFCAClient:1458 - POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} 2019-08-02 07:54:53,593 main ERROR HFCAClient:405 - org.hyperledger.fabric.sdkintegration.SampleUser@3d285d7e .... org.hyperledger.fabric_ca.sdk.exception.RegistrationException: Error while registering the user org.hyperledger.fabric.sdkintegration.SampleUser@3d285d7e url: http://localhost:7054 POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} .... Caused by: org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to http://localhost:7054 failed request body {"id":"user1","type":"client","affiliation":"org1.department1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'user1' failed: Identity 'user1' is already registered"} ],"messages":[],"success":false} ``` Does anyone know about how to solve this issue?

tballast (Fri, 02 Aug 2019 08:33:11 GMT):
you're trying to run the example twice in a row is my guess. If you tear down the network and do it again you probably won't see this error. On the first run through it registers `user1`, and on the second run it's trying to do the same, but it's already been done.

Rosan (Fri, 02 Aug 2019 08:53:58 GMT):
Has joined the channel.

tballast (Fri, 02 Aug 2019 11:18:21 GMT):
Has anyone written a java client that is used to construct a network from scratch (ie. create the channel from scratch, _join_ peers, instantiate chaincode, etc.) and if so, do you have a clean way of handling whether peers need to be added or joined?

aatkddny (Fri, 02 Aug 2019 13:06:29 GMT):
Yes. - I use separate records that tracks everything. Build the yaml files to instantiate the network and construct network config from them when its running too. There's a surprisingly small amount of information you need to store. In this case I have a list of peers in each channel record.

tballast (Fri, 02 Aug 2019 13:15:12 GMT):
Ahh ok so you dynamically create the network-config file? I've tried to use it but found it somewhat useless when trying to stand the network up because you cant pull the information you need from it (at least not with the NetworkConfig class). So then if you construct the network on one PC, then can you just give those files to someone else to run from another one where they would only need to read it and then jsut add those peers?

aatkddny (Fri, 02 Aug 2019 13:21:15 GMT):
yes. i do it from scratch with what i have in the records.

tballast (Fri, 02 Aug 2019 14:06:09 GMT):
When you say "separate records" what do you mean? like, what I have now is essentially just a properties file that has the peer information and stuff, then I read this in and just join all the peers belonging to the organization. I don't have a yaml file for this. Are you using your own custom code to build the network config, or is this something provided by the SDK? Sorry for all the questions, I've spent a fair bit of time on this though, and I need a better way to handle it.

aatkddny (Fri, 02 Aug 2019 14:10:37 GMT):
Its all custom. I generate the yaml files to create the network and a set of network descriptor records (orgs, users) inside a nosql database. i track ca enrollments there also - it gives me a place to stash the certs after i encrypt them. when i create a channel i add a channel record and track the peers that have joined in there (actually it's orgs because I join all the peers at the same time when i create the channel, but the idea is the same). when i go to use the network these records are then used to build the network config that allows me to do a channel.loadfromnetworkconfig to interact with the thing. does that help?

tballast (Fri, 02 Aug 2019 14:18:27 GMT):
:ok_hand: Awesome. That sounds like a pretty great setup. So in this case, if there are no records, will you assume that you need to setup the network from scratch, or will that always be a step in which the user must be aware that they're constructing from scratch?

aatkddny (Fri, 02 Aug 2019 14:27:39 GMT):
there's a rest endpoint - you pass in a config file with the orgs and a few other pieces and it builds the yaml files and a bash script to start the network. you run scp in and run that on a server and you are gtg.

nitishbhardwaj19 (Sun, 04 Aug 2019 13:45:14 GMT):
Hi, Hope everyone is doing good. I am trying to install & instantiate chaincode using JAVA-SDK. It does works perfectly fine for Node and JAVA chaincode, but I am getting a strange error with GO chaincode. I am not sure if I am missing something. Would be great if anyone could help.``` `Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package github.com/example_cc: no Go files in /chaincode/input/src/github.com/example_cc`` ```

nitishbhardwaj19 (Sun, 04 Aug 2019 14:19:57 GMT):
NOTE: GO chaincode gets instantiated if I use `setChaincodeSourceLocation` option to install chaincode. But It fails if I use option `setChaincodeInputStream`

nitishbhardwaj19 (Sun, 04 Aug 2019 14:19:57 GMT):
NOTE: GO chaincode gets instantiated if I use `setChaincodeSourceLocation` option to install chaincode. But It fails if I use option `setChaincodeInputStream`(Though JAVA and Node chaincode works with option)

rescalona (Mon, 05 Aug 2019 01:49:04 GMT):
Has left the channel.

aatkddny (Tue, 06 Aug 2019 00:29:43 GMT):
This works fine for me. I'll provide you a sample for comparison if it'll help. ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = pathHelper.getChaincodeInstall(ccid); Path src = Paths.get("src"); log.info("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(packageCCTarGzInputStream(base, src)); ``` and ``` private InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); // First look to see if there's a META-INF directory try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying META_INF - {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } ```

aatkddny (Tue, 06 Aug 2019 00:29:43 GMT):
This works fine for me. I'll provide you a sample for comparison if it'll help. I lifted some of it from the examples, so it'll look familiar if you've been through them. ``` InstallProposalRequest ipr = client.newInstallProposalRequest(); ipr.setChaincodeID(ccid); ipr.setChaincodeVersion(ccid.getVersion()); Path base = pathHelper.getChaincodeInstall(ccid); Path src = Paths.get("src"); log.info("Chaincode will be installed from {}", base.toAbsolutePath().toString()); ipr.setChaincodeInputStream(packageCCTarGzInputStream(base, src)); ``` and ``` private InputStream packageCCTarGzInputStream(Path src, Path goPathPrefix) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(500000); TarArchiveOutputStream aos = new TarArchiveOutputStream(new GzipCompressorOutputStream(new BufferedOutputStream(bos))); aos.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU); // First look to see if there's a META-INF directory try (Stream paths = Files.walk(src)) { paths.forEach(pt -> { int root = src.getNameCount() - 1; Path px = pt.subpath(root, pt.getNameCount()); log.info(px.toString()); if (px.getNameCount() > 1 && px.getName(1).toString().equals("META-INF")) { try { Path pxx = px.subpath(1, px.getNameCount()); log.info("Copying META_INF - {} to {}", pt.toString(), pxx.toString()); copyFile(pt.toFile(), pxx.toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } else { try { log.info("Copying {} to {}", pt.toString(), goPathPrefix.resolve(px).toString()); copyFile(pt.toFile(), goPathPrefix.resolve(px).toString(), aos); } catch (IOException e) { log.error("IO Issue", e); } } }); } aos.close(); return new ByteArrayInputStream(bos.toByteArray()); } ```

aatkddny (Tue, 06 Aug 2019 00:32:30 GMT):
try adding a hostname override flag in the properties too.

aatkddny (Tue, 06 Aug 2019 00:34:30 GMT):
this is a cross post from the kubernetes list. has anyone got service discovery working with k8s and the java sdk? i thought it was a security issue brought on by my move to raft, but it fails with a plain vanilla kafka (and no tls) setup too. different errors, but at the same point in time - trying to install/instantiate chaincode.

yeousunn (Wed, 07 Aug 2019 01:13:11 GMT):
Hello guys, I am using fabric-sdk-java to query the network and find the block details. when using `channel.queryBlockchainInfo();` I get block at height 37 and when using `channel.queryBlockByNumber(current);` The current block height is 36, for both the function returned block is the same with same block hash, but block height is different. Is it by design?

mahoney1 (Wed, 07 Aug 2019 17:26:14 GMT):
reminder that the Fabric Developer Community call tomorrow (Thu) is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

yeousunn (Thu, 08 Aug 2019 03:05:54 GMT):
Hi Guys, I am trying to instantiate chaincode using this code `channel.sendInstantiationProposal(instantiateProposalRequest, channel.getPeers());`. The code executes without error and docker container is created for the chaincode. but when I check peer's for instantiated chaincode, it is not listed on peer. I have to manually run `peer chaincode instantiate` on peer to start using the chaincode. Is there anything else I need to do to get chaincode listed on peer using the java sdk?

mahoney1 (Thu, 08 Aug 2019 10:26:54 GMT):
There is an example in [E2E](https://github.com/hyperledger/fabric-sdk-java/blob/release-1.4/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L483) - I believe after you get sufficient responses from `sendInstantiationProposal` you would need to then `sendTransaction()` as shown (Instantiating a chaincode is a full transaction operation)

mahoney1 (Thu, 08 Aug 2019 10:26:54 GMT):
There is an example in [**E2E**](https://github.com/hyperledger/fabric-sdk-java/blob/release-1.4/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L483) in fabric-sdk-java - I believe after you get sufficient responses from `sendInstantiationProposal` you would need to then `sendTransaction()` as shown (Instantiating a chaincode is a full transaction operation)

mahoney1 (Thu, 08 Aug 2019 10:26:54 GMT):
There is an example in [E2E](https://github.com/hyperledger/fabric-sdk-java/blob/release-1.4/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L483) in fabric-sdk-java - I believe after you get sufficient responses from `sendInstantiationProposal` you would need to then `sendTransaction()` as shown (Instantiating a chaincode is a full transaction operation)

aatkddny (Thu, 08 Aug 2019 17:41:57 GMT):
suspect no-one has tried this, but it's worth trying before i go down the rabbit hole. creating a channel dynamically with raft ordering using n from m of the raft-orderers I have in hand. I have it working with m from m, but the one of the plus points of raft as i understood it was that you can use a subset for efficiency. is just adding the n orderers (and tracking them) to the channel when I create it sufficient or are there some other hoops to jump through?

aatkddny (Thu, 08 Aug 2019 17:41:57 GMT):
suspect no-one has tried this, but it's worth trying before i go down the rabbit hole. creating a channel dynamically with raft ordering using n from m of the raft-orderers I have in hand. I have it working with m from m, but one of the plus points of raft as i understood it was that you can use a subset for efficiency. is just adding the n orderers (and tracking them) to the channel when I create it sufficient or are there some other hoops to jump through?

aatkddny (Thu, 08 Aug 2019 17:41:57 GMT):
suspect no-one has tried this, but it's worth asking before i go down the rabbit hole. creating a channel dynamically with raft ordering using n from m of the raft-orderers I have in hand. I have it working with m from m, but one of the plus points of raft as i understood it was that you can use a subset for efficiency. is just adding the n orderers (and tracking them) to the channel when I create it sufficient or are there some other hoops to jump through?

aatkddny (Thu, 08 Aug 2019 17:41:57 GMT):
suspect no-one has tried this, but it's worth asking before i go down the rabbit hole. creating a channel dynamically with raft ordering using n from m of the raft-orderers I have in hand. I have it working with m from m, but one of the plus points of raft as i understood it was that you can use a subset for efficiency. is just adding the n orderers (and tracking them) to the channel when I create it sufficient or are there some other hoops to jump through? The channel definition appears only to reference the original consortium - which lists all of the orderers. i'm hoping that doesn't mean i have to partition the consortiums too.

yacovm (Thu, 08 Aug 2019 21:07:59 GMT):
@aatkddny we tried it ;)

yacovm (Thu, 08 Aug 2019 21:08:56 GMT):
it is possible to create `m out of n`, or `n out of n` , but i think that creating `n out of n` and then removing them gradually is easier. To make the `m out of n` you need to pass in a special flag in the CLI

yacovm (Thu, 08 Aug 2019 21:11:14 GMT):
It is possible

yeousunn (Fri, 09 Aug 2019 00:38:57 GMT):
Thank you for the reply. I will check it out. :relaxed:

yeousunn (Fri, 09 Aug 2019 01:02:27 GMT):
it worked, thanks :ok_hand: :v:

yeousunn (Fri, 09 Aug 2019 03:00:12 GMT):
Is there a way to get all the function names written in a chaincode?

heenas06 (Fri, 09 Aug 2019 08:38:25 GMT):
Has joined the channel.

heenas06 (Fri, 09 Aug 2019 08:41:37 GMT):
Hi can this setup aviabe on git?

yeousunn (Fri, 09 Aug 2019 08:51:18 GMT):
Hi @heenas06 , which code are you referring to?

heenas06 (Fri, 09 Aug 2019 08:55:41 GMT):
Hi I am trying to setup multi-channel using raft

heenas06 (Fri, 09 Aug 2019 08:57:35 GMT):
i did raft ordering services using balance transfer-sample now i want to add new channel & new org in that ......

yeousunn (Fri, 09 Aug 2019 09:00:19 GMT):
are you trying with java-sdk?

yeousunn (Fri, 09 Aug 2019 09:02:54 GMT):
I follow the samples given here: https://github.com/hyperledger/fabric-sdk-java/tree/master/src/test/java/org/hyperledger/fabric/sdkintegration

heenas06 (Fri, 09 Aug 2019 09:03:52 GMT):
ok thank you...will refer this...

paranjan (Fri, 09 Aug 2019 09:32:43 GMT):
Has joined the channel.

aatkddny (Fri, 09 Aug 2019 14:26:05 GMT):
@yacovm I get that. I was more interested in the mechanics. Let me try to explain why - or what - I'm asking. My configtx has a consortium profile that I add all my members to, before defining channels for the inter party relationships. Let's call it "All-Members-Consortium". In there there's a section that looks like this - ignore the number of orderers, I know I need to up it for n from m. ``` Orderer: <<: *OrdererDefaults OrdererType: etcdraft EtcdRaft: Consenters: - Host: raft0-orderer Port: 7050 ClientTLSCert: raft0-orderer/tls/server.crt ServerTLSCert:raft0-orderer/tls/server.crt - Host: raft1-orderer Port: 7050 ClientTLSCert: raft1-orderer/tls/server.crt ServerTLSCert: raft1-orderer/tls/server.crt - Host: raft2-orderer Port: 7050 ClientTLSCert: raft2-orderer/tls/server.crt ServerTLSCert: raft2-orderer/tls/server.crt Addresses: - raft0-orderer:7050 - raft1-orderer:7050 - raft2-orderer:7050 Organizations: - *Orderer Capabilities: <<: *OrdererCapabilities ``` So when I define a channel it's like this: ``` SomeOrg1-SomeOrg2-Channel: Consortium: AllMember-Consortium Application: <<: *ApplicationDefaults Organizations: - *SomeOrg2 - *SomeOrg1 Capabilities: <<: *ApplicationCapabilities ``` Boilerplate, right.

aatkddny (Fri, 09 Aug 2019 14:26:05 GMT):
@yacovm I get that. I was more interested in the mechanics. Let me try to explain why - or what - I'm asking. My configtx has a consortium profile that I add all my members to, before defining channels for the inter party relationships. Let's call it "All-Members-Consortium". In there there's a section that looks like this - ignore the number of orderers, I know I need to up it for n from m. ``` Orderer: <<: *OrdererDefaults OrdererType: etcdraft EtcdRaft: Consenters: - Host: raft0-orderer Port: 7050 ClientTLSCert: raft0-orderer/tls/server.crt ServerTLSCert:raft0-orderer/tls/server.crt - Host: raft1-orderer Port: 7050 ClientTLSCert: raft1-orderer/tls/server.crt ServerTLSCert: raft1-orderer/tls/server.crt - Host: raft2-orderer Port: 7050 ClientTLSCert: raft2-orderer/tls/server.crt ServerTLSCert: raft2-orderer/tls/server.crt Addresses: - raft0-orderer:7050 - raft1-orderer:7050 - raft2-orderer:7050 Organizations: - *Orderer Capabilities: <<: *OrdererCapabilities ``` So when I define a channel it's like this: ``` SomeOrg1-SomeOrg2-Channel: Consortium: AllMember-Consortium Application: <<: *ApplicationDefaults Organizations: - *SomeOrg2 - *SomeOrg1 Capabilities: <<: *ApplicationCapabilities ``` Boilerplate, right. When I create a channel with the SDK the code I use is cribbed from an early version of the End2End... examples. The relevant piece looks like this: ``` // Just pick the first orderer in the list to create the channel. Orderer anOrderer = orderers.iterator().next(); orderers.remove(anOrderer); log.debug("Calling SDK to create a new channel {}", cd.getId()); Channel channel = client.newChannel(cd.getId(), anOrderer, channelConfiguration, signatures); log.debug("Back from SDK after creating new channel {}", cd.getId()); if (orderers.size() > 0) { for (Orderer orderer : orderers) { // Add remaining orderers if any. channel.addOrderer(orderer); } log.debug("Added {} remaining orderers - {}", orderers.size(), orderers.stream().map(o -> o.getName()).collect(Collectors.joining(" "))); ``` My question is is it sufficient to discriminate here - restrict the list of orderers to n (rather than the m that's returned now) and that's all that it requires, or do I need to have different consortium profiles - one each with the correct n orderers, or is there an override at the channel level that I can expose into the genesis block for that channel?

aatkddny (Fri, 09 Aug 2019 14:26:05 GMT):
@yacovm I get that. I was more interested in the mechanics. Let me try to explain why - or what - I'm asking. My configtx has a consortium profile that I add all my members to, before defining channels for the inter party relationships. Let's call it "All-Members-Consortium". In there there's a section that looks like this - ignore the number of orderers, I know I need to up it for n from m. ``` Orderer: <<: *OrdererDefaults OrdererType: etcdraft EtcdRaft: Consenters: - Host: raft0-orderer Port: 7050 ClientTLSCert: raft0-orderer/tls/server.crt ServerTLSCert:raft0-orderer/tls/server.crt - Host: raft1-orderer Port: 7050 ClientTLSCert: raft1-orderer/tls/server.crt ServerTLSCert: raft1-orderer/tls/server.crt - Host: raft2-orderer Port: 7050 ClientTLSCert: raft2-orderer/tls/server.crt ServerTLSCert: raft2-orderer/tls/server.crt Addresses: - raft0-orderer:7050 - raft1-orderer:7050 - raft2-orderer:7050 Organizations: - *Orderer Capabilities: <<: *OrdererCapabilities ``` So when I define a channel it's like this: ``` SomeOrg1-SomeOrg2-Channel: Consortium: AllMember-Consortium Application: <<: *ApplicationDefaults Organizations: - *SomeOrg2 - *SomeOrg1 Capabilities: <<: *ApplicationCapabilities ``` Boilerplate, right. When I create a channel with the SDK the code I use is cribbed from an early version of the End2End... examples. The relevant piece looks like this: ``` // Just pick the first orderer in the list to create the channel. Orderer anOrderer = orderers.iterator().next(); orderers.remove(anOrderer); log.debug("Calling SDK to create a new channel {}", cd.getId()); Channel channel = client.newChannel(cd.getId(), anOrderer, channelConfiguration, signatures); log.debug("Back from SDK after creating new channel {}", cd.getId()); if (orderers.size() > 0) { for (Orderer orderer : orderers) { // Add remaining orderers if any. channel.addOrderer(orderer); } log.debug("Added {} remaining orderers - {}", orderers.size(), orderers.stream().map(o -> o.getName()).collect(Collectors.joining(" "))); ``` My question is is it sufficient to discriminate here - restrict the list of orderers to n (rather than the m that's returned now) and that's all that it requires, or do I need to have different consortium profiles - one each with the correct n orderers, or is there an override that I can't find an example for at the channel level that I will encode the subset into the genesis block for that channel?

yacovm (Fri, 09 Aug 2019 14:56:32 GMT):
you're using the SDK and I have no clue how to use it, I never did

yacovm (Fri, 09 Aug 2019 14:56:55 GMT):
in general, to create a channel with a subset of orderers you just need to change the consenters array

yacovm (Fri, 09 Aug 2019 14:56:59 GMT):
that's it... nothing more

aatkddny (Fri, 09 Aug 2019 15:09:11 GMT):
The array in configtx.yaml?

aatkddny (Fri, 09 Aug 2019 15:10:21 GMT):
@yacovm - the array defined in the profile you use that comes from configtx.yaml that's encoded into the channel genesis block?

yacovm (Fri, 09 Aug 2019 15:10:40 GMT):
yeah...

aatkddny (Fri, 09 Aug 2019 15:11:42 GMT):
Which gets me back to my question - or part of it. Is there a way to override that on a per channel basis? It seems an awful design to have to have multiple profiles to use a subset of the orderers.

yacovm (Fri, 09 Aug 2019 15:15:24 GMT):
oh... but can't you just change the file without changing the profile?

yacovm (Fri, 09 Aug 2019 15:15:40 GMT):
these stuff are really designed to be scripted and automated

yacovm (Fri, 09 Aug 2019 15:16:22 GMT):
Fabric is eggs, flour, and a bowl. You make the cake yourself, and sometimes you even have instructions how to do that

aatkddny (Fri, 09 Aug 2019 15:17:21 GMT):
Which file? Configtx? You mean regenerate *that* profile as required? It's the same idea as having multiple profiles.

yacovm (Fri, 09 Aug 2019 15:17:35 GMT):
yeah configtx

aatkddny (Fri, 09 Aug 2019 15:17:41 GMT):
Ugh.

yacovm (Fri, 09 Aug 2019 15:17:53 GMT):
hey... it's either multiple profiles

yacovm (Fri, 09 Aug 2019 15:17:58 GMT):
or a single one you edit

yacovm (Fri, 09 Aug 2019 15:18:12 GMT):
any way you look at it - you need to script stuff and automate stuff

yacovm (Fri, 09 Aug 2019 15:18:27 GMT):
but - creating a channel should not be done too much in your life

yacovm (Fri, 09 Aug 2019 15:18:39 GMT):
if you end up creating channels on a daily basis - you're using Fabric wrong

yacovm (Fri, 09 Aug 2019 15:18:48 GMT):
unless you're building a fabric SaaS offering

aatkddny (Fri, 09 Aug 2019 15:20:46 GMT):
I generate it already. It's just a poor (imo) design to not allow a subset of the list you provide for the genesis block to be defined in the individual channel blocks for the same consortium. I generate the channels when I generate a new network. I do that a lot more than you'd think in dev, which is why I spent such a lot of time to make it as close to zero touch as possible. This is a refinement to allow me to specify a subset of raft orderers, and I was looking to see if there's an accepted way to do that.

yacovm (Fri, 09 Aug 2019 15:21:36 GMT):
@jyellick ^

jyellick (Fri, 09 Aug 2019 15:24:22 GMT):
Are you saking to be able to have a set of orderers tied to a consortium? I'm a little late here, and skimmed the thread, so fear I'm missing the real question/point.

jyellick (Fri, 09 Aug 2019 15:24:22 GMT):
Are you asking to be able to have a set of orderers tied to a consortium? I'm a little late here, and skimmed the thread, so fear I'm missing the real question/point.

yacovm (Fri, 09 Aug 2019 15:25:06 GMT):
he wants to be able to specify many channels, each with different subset of orderers, without duplicating profiles

yacovm (Fri, 09 Aug 2019 15:25:13 GMT):
@aatkddny did i get you right?

aatkddny (Fri, 09 Aug 2019 15:25:35 GMT):
yes. exactly right.

yacovm (Fri, 09 Aug 2019 15:25:54 GMT):
I guess you can use the inheritance property of the YAML and use it to inherit as much information as possible

jyellick (Fri, 09 Aug 2019 15:26:40 GMT):
That would generally be my recommendation. You're generating different channel creation txes, so, you're going to need to give the tool different inputs, no way around that. But, you should be able to use basically the same profile for every one via yaml references and only change the orderers

aatkddny (Fri, 09 Aug 2019 15:26:41 GMT):
i define the consortium in a profile in configtx and list all the orderers. i ought to be able to pick a subset for this channel - or what's the point - without having to create a new consortium profile (or bogart the original)

jyellick (Fri, 09 Aug 2019 15:27:21 GMT):
I don't follow... you can pick a subset of the orderers when creating a new channel.

aatkddny (Fri, 09 Aug 2019 15:27:26 GMT):
how?

aatkddny (Fri, 09 Aug 2019 15:27:40 GMT):
that's the genesis of this. is there an override in the channel definition?

jyellick (Fri, 09 Aug 2019 15:28:13 GMT):
By default, when generating a channel creation tx, everything outside of application section is essentially ignored. This is to keep you from shooting yourself in the foot, by overriding things that are already specified in the orderer system channel. Things like your orderer addresses, block validation policy, etc.

jyellick (Fri, 09 Aug 2019 15:29:05 GMT):
However, you can use the `-baseProfile` flag when generating your channel creation tx. This will generate a channel creation tx which is _exactly_ as specified in the profile, applying any differences from the base profile.

jyellick (Fri, 09 Aug 2019 15:29:28 GMT):
This is definitely a little dangerous and error prone, so not something we typically encourage users to do. It's usually easier to generate the channel, then update it.

jyellick (Fri, 09 Aug 2019 15:30:26 GMT):
Note, to pick a subset of orderers, you'll need the consent of the ordering admin, so they'll also need to sign your channel creation tx.

jyellick (Fri, 09 Aug 2019 15:30:57 GMT):
We almost added an example of this, but decided against it https://gerrit.hyperledger.org/r/c/fabric-samples/+/30938

aatkddny (Fri, 09 Aug 2019 15:33:32 GMT):
ok so there is a way to do it. that was what i was trying to figure out. i have to get the orderer admin to sign anything to do with the system channels, so that's the same as everything else. What's interesting - to me at least as an aside - was that I need to get that AND all the orgs to consent to add a new member. I figured the orderer would suffice. One final thing. Your text above implies that it's possible to remove orderers dynamically by editing the config. Is that considered a better route than doing it as part of the channel generate with the profile?

aatkddny (Fri, 09 Aug 2019 15:33:32 GMT):
ok so there is a way to do it. that was what i was trying to figure out. i have to get the orderer admin to sign anything to do with the system channels, so that's the same as everything else. What's interesting - to me at least as an aside - was that I need to get that AND all the orgs to consent to add a new member to the consortium. I figured the orderer would suffice. One final thing. Your text above implies that it's possible to remove orderers dynamically by editing the config. Is that considered a better route than doing it as part of the channel generate with the profile?

aatkddny (Fri, 09 Aug 2019 15:33:32 GMT):
ok so there is a way to do it. that was what i was trying to figure out. i have to get the orderer admin to sign anything to do with the system channels, so that's the same as everything else. What's interesting - to me at least as an aside - was that I need to get that AND all the orgs to consent to add a new member to the consortium. I figured the orderer would suffice. One final thing. Your text above implies that it's possible to remove orderers dynamically by editing the channel block. Is that considered a better route than doing it as part of the channel generate with the profile?

jyellick (Fri, 09 Aug 2019 15:36:09 GMT):
You can modify consortium membership with only an orderer signature

jyellick (Fri, 09 Aug 2019 15:36:25 GMT):
But you cannot modify existing channel membership

jyellick (Fri, 09 Aug 2019 15:36:25 GMT):
But you cannot modify existing channel membership (only a majority of app org admins can do that)

aatkddny (Fri, 09 Aug 2019 15:36:38 GMT):
not by default. It throws a sub policy not satisfied.

aatkddny (Fri, 09 Aug 2019 15:36:57 GMT):
i had to add sigs from all the other org admins to do so.

jyellick (Fri, 09 Aug 2019 15:37:17 GMT):
There is something going wrong with your update then. Perhaps you are modifying the other org definitions as well?

jyellick (Fri, 09 Aug 2019 15:37:47 GMT):
The only time you should need a consortium member signature when modifying the orderer system channel is when you try to modify a consortium org member's org definition.

aatkddny (Fri, 09 Aug 2019 15:38:01 GMT):
added a new org. created and stood up the nodes. then tried to add to the consortium.

aatkddny (Fri, 09 Aug 2019 15:38:23 GMT):
required sigs from the other admins as well as the orderer admin.

jyellick (Fri, 09 Aug 2019 15:38:41 GMT):
All I can say is that, at least with the default set of policies, this is not the case.

aatkddny (Fri, 09 Aug 2019 15:39:06 GMT):
wrote the code to do this yesterday so it's still fresh. policies are from the configtx template - those i didn't change.

jyellick (Fri, 09 Aug 2019 15:39:36 GMT):
Look at the `mod_policy` value for the `/Channel/Consortiums/` group

jyellick (Fri, 09 Aug 2019 15:39:40 GMT):
What is that set to?

aatkddny (Fri, 09 Aug 2019 15:40:44 GMT):
the default. it's not overwritten.

jyellick (Fri, 09 Aug 2019 15:41:56 GMT):
https://github.com/hyperledger/fabric/blob/fbbeb01233b888b66fc5e3516beb19951ce70011/common/tools/configtxgen/encoder/encoder.go#L401

jyellick (Fri, 09 Aug 2019 15:42:19 GMT):
This is the default, which is `/Channel/Orderer/Admins`, which says only a quorum of ordering admins should have to sign off on updates.

aatkddny (Fri, 09 Aug 2019 15:43:12 GMT):
Here's my profile for the genesis block. All I did was cut the org list out. ``` Profiles: Genesis: <<: *ChannelDefaults Capabilities: <<: *ChannelCapabilities Orderer: <<: *OrdererDefaults OrdererType: etcdraft EtcdRaft: Consenters: - Host: raft0-orderer Port: 7050 ClientTLSCert: raft0-orderer/tls/server.crt ServerTLSCert: aft0-orderer/tls/server.crt - Host: raft1-orderer Port: 7050 ClientTLSCert: raft1-orderer/tls/server.crt ServerTLSCert: raft1-orderer/tls/server.crt - Host: raft2-orderer Port: 7050 ClientTLSCert: raft2-orderer/tls/server.crt ServerTLSCert: raft2-orderer/tls/server.crt Addresses: - raft0-orderer:7050 - raft1-orderer:7050 - raft2-orderer:7050 Organizations: - *Orderer Capabilities: <<: *OrdererCapabilities Application: <<: *ApplicationDefaults Organizations: - <<: * Consortiums: AllMember-Consortium: Organizations: - * ```

jyellick (Fri, 09 Aug 2019 15:43:16 GMT):
Adding or removing members (sub-groups) will only trigger this policy. The only way the other member policies would need to be satisfied, is if you were also modifying the definitions of those members.

aatkddny (Fri, 09 Aug 2019 15:44:22 GMT):
``` Channel: &ChannelDefaults # Policies defines the set of policies at this level of the config tree # For Channel policies, their canonical path is # /Channel/ Policies: # Who may invoke the 'Deliver' API Readers: Type: ImplicitMeta Rule: "ANY Readers" # Who may invoke the 'Broadcast' API Writers: Type: ImplicitMeta Rule: "ANY Writers" # By default, who may modify elements at this config level Admins: Type: ImplicitMeta Rule: "MAJORITY Admins" # Capabilities describes the channel level capabilities, see the # dedicated Capabilities section elsewhere in this file for a full # description Capabilities: <<: *ChannelCapabilities ``` This is boilerplate. I'm not sure how I've got it so different.

jyellick (Fri, 09 Aug 2019 15:46:43 GMT):
It's your config update that is likely the problem. Compare the versions in the read-set for your existing orgs to the versions in the write-set of those orgs. I expect you'll find they are different. One common mistake is not re-encoding the original config through `configtxlator` if you are pulling via an SDK. Proto marshaling is non-deterministic by default so `configtxlator` takes special steps when encoding which are necessary to safely compare when computing the update.

aatkddny (Fri, 09 Aug 2019 15:47:50 GMT):
I generate the update transaction through configtxlator.

jyellick (Fri, 09 Aug 2019 15:48:46 GMT):
Yes, but the inputs, the original config, did you generate that via configtxlator's encode function?

aatkddny (Fri, 09 Aug 2019 15:49:02 GMT):
this is the same code i use for all my system channel updates.

aatkddny (Fri, 09 Aug 2019 15:49:12 GMT):
yes.

jyellick (Fri, 09 Aug 2019 15:49:47 GMT):
Then you should compare your read-set and write-set versions for those orgs.

aatkddny (Fri, 09 Aug 2019 15:50:18 GMT):
decode the block using configtxgen. edit it. pass the two to configtxgen to generate an update and do a channel update.

aatkddny (Fri, 09 Aug 2019 15:50:18 GMT):
decode the block using configtxgen. edit it. pass the two to configtxlator to generate an update and do a channel update.

jyellick (Fri, 09 Aug 2019 15:50:48 GMT):
If they match, and you are still requiring their signatures when updating the consortium definition, then this would be a bug that's worth investigating.

aatkddny (Fri, 09 Aug 2019 15:52:28 GMT):
i'm assuming i put the new org in the right place. ```"channel_group">"groups">"Consortiums">"groups">"All-Member-Consortium">"groups"```

aatkddny (Fri, 09 Aug 2019 15:52:42 GMT):
All-Member... is my consortium here

aatkddny (Fri, 09 Aug 2019 15:53:08 GMT):
It does let me create channels with this new org, so I *think* I got it right.

jyellick (Fri, 09 Aug 2019 15:54:14 GMT):
Yes, that's the right spot to put it. But, the `mod_policy` of `All-Member-Consortium` _should_ be `/Channel/Orderer/Admins`, which means you should be able to add and remove group members satisfying only that policy.

aatkddny (Fri, 09 Aug 2019 15:54:30 GMT):
Well it doesn't work. Sorry.

jyellick (Fri, 09 Aug 2019 15:56:04 GMT):
I was just trying to help :), other users are able to modify consortium membership with only an orderer signature jsut fine

jyellick (Fri, 09 Aug 2019 15:56:04 GMT):
I was just trying to help :), other users are able to modify consortium membership with only an orderer signature just fine

aatkddny (Fri, 09 Aug 2019 15:57:10 GMT):
Not sure what' different. I saw the problem in the orderer output. Would a copy of the genesis block help?

jyellick (Fri, 09 Aug 2019 15:58:16 GMT):
If you could share the artifacts from your config update flow, I expect I could get to the bottom of it. Your original config,your modified config, and your config update.

aatkddny (Fri, 09 Aug 2019 16:00:04 GMT):
Let me regenerate them and I'll get back to you.

aatkddny (Fri, 09 Aug 2019 16:02:49 GMT):
String of channel config and update work or you need more?

jyellick (Fri, 09 Aug 2019 16:03:18 GMT):
The JSON or the protos are fine, whatever's easier for you.

aatkddny (Fri, 09 Aug 2019 16:08:00 GMT):

beforeandafter.txt

aatkddny (Fri, 09 Aug 2019 16:08:07 GMT):
Does this work?

aatkddny (Fri, 09 Aug 2019 16:08:31 GMT):
Without stepping into the SDK - which I'm not set up to do without more work - I can't get the photos.

aatkddny (Fri, 09 Aug 2019 16:08:35 GMT):
*protos

jyellick (Fri, 09 Aug 2019 16:09:12 GMT):
Let me look

jyellick (Fri, 09 Aug 2019 16:10:26 GMT):
I see 'original' and 'update', but I don't see a 'modified'. I might be able to figure it out without the modified one, let me look.

aatkddny (Fri, 09 Aug 2019 16:12:35 GMT):
modified is the piece that i patch in? wait one.

jyellick (Fri, 09 Aug 2019 16:13:49 GMT):
I'm also getting a parse error on the update json

jyellick (Fri, 09 Aug 2019 16:14:02 GMT):
Rather than pasting them all in one file, maybe just upload the 3 JSON files

aatkddny (Fri, 09 Aug 2019 16:24:14 GMT):
I autopen them - they exist only as java objects - that's what took the time.

aatkddny (Fri, 09 Aug 2019 16:24:14 GMT):
I autogen them - they exist only as java objects - that's what took the time.

aatkddny (Fri, 09 Aug 2019 16:24:44 GMT):

decode-json-channel-config.txt

aatkddny (Fri, 09 Aug 2019 16:24:45 GMT):

update-config.txt

aatkddny (Fri, 09 Aug 2019 16:24:47 GMT):

mapped-result.txt

jyellick (Fri, 09 Aug 2019 16:31:27 GMT):
Alright, so I see three JSONs, two of which are (nearly) identical, with just the sequence number be moved, the other seems to add an org

jyellick (Fri, 09 Aug 2019 16:32:00 GMT):
What I'm missing is the actual config update JSON

aatkddny (Fri, 09 Aug 2019 16:46:00 GMT):
all I do after the mapped-result is /protolator/encode/common.Config and then convert it to a byte array.

aatkddny (Fri, 09 Aug 2019 16:47:30 GMT):
wait. lmk again.

aatkddny (Fri, 09 Aug 2019 16:47:30 GMT):
wait. let me look again. there's another call to configtxlator i need to decode.

aatkddny (Fri, 09 Aug 2019 16:51:29 GMT):

update-cfgtx.txt

jyellick (Fri, 09 Aug 2019 17:02:34 GMT):
Hmmm, that looks close to right, but looks almost like it was decoded as the wrong proto type? I'd expect something that has a `read_set` and a `write_set` field in it

aatkddny (Fri, 09 Aug 2019 17:04:51 GMT):
Let me regenerate from scratch with a new install. Give me a minute to reset everything. That last is the decoded output from /configtxlator/compute/update-from-configs which I assume is what you are looking for.

aatkddny (Fri, 09 Aug 2019 17:06:15 GMT):

original-channel-config.txt

aatkddny (Fri, 09 Aug 2019 17:06:32 GMT):

channel-config-with-extra-member.txt

aatkddny (Fri, 09 Aug 2019 17:07:44 GMT):

updated-config-bytes.txt

aatkddny (Fri, 09 Aug 2019 17:10:01 GMT):
the last gets passed into the sdk as an `UpdateChannelConfiguration` which is signed by the orderer admin (and the peer admins for each of the other orgs) through a client using the orderer admin as the user. Code looks like this ``` // Sign the update configuration - orderer needs to do this. This is a special case, unlike the channels where the members sign. UpdateChannelConfiguration updateChannelConfiguration = new UpdateChannelConfiguration(updateBytes); byte[] osig = client.getUpdateChannelConfigurationSignature(updateChannelConfiguration, client.getUserContext()); Collection orgs = orgs(); orgs.remove(org.getName()); // byte[][] signatures = getSignatures(orgs, updateChannelConfiguration); Set sigs = new HashSet<>(); sigs.add(osig); Arrays.stream(getSignatures(orgs, updateChannelConfiguration)).forEach(a -> sigs.add(a)); byte[][] signatures = sigs.toArray(new byte[0][]); // Now do actual channel update. c.updateChannelConfiguration(updateChannelConfiguration, signatures); ```

jyellick (Fri, 09 Aug 2019 17:12:59 GMT):
`updated-config-bytes.txt` above seems to be JSON still?

jyellick (Fri, 09 Aug 2019 17:13:19 GMT):
That bin is of type `common.ConfigUpdate`, my guess is that you've decoded it as a `common.Config`

aatkddny (Fri, 09 Aug 2019 17:13:44 GMT):
I translated it for you.

aatkddny (Fri, 09 Aug 2019 17:13:44 GMT):
I translated it for you. And yes it used common.Config to do so.

aatkddny (Fri, 09 Aug 2019 17:13:55 GMT):
You want the bytes?

aatkddny (Fri, 09 Aug 2019 17:19:36 GMT):

updated-config-bytes.txt

jyellick (Fri, 09 Aug 2019 17:30:00 GMT):
I think I see your problem

jyellick (Fri, 09 Aug 2019 17:30:40 GMT):
You have an `Application` section in your orderer system channel

jyellick (Fri, 09 Aug 2019 17:30:48 GMT):
And, your consortium members are in it

jyellick (Fri, 09 Aug 2019 17:31:22 GMT):
It has a `mod_policy` of `Admins`, which, as a full path is `/Channel/Application/Admins`, which requires a majority of your consortium members to sign off.

jyellick (Fri, 09 Aug 2019 17:31:50 GMT):
Your config update is modifying the `ACLs` section of your `/Channel/Application` group.

jyellick (Fri, 09 Aug 2019 17:32:04 GMT):
This is unintentional, and a symptom of what I was guessing at earlier.

aatkddny (Fri, 09 Aug 2019 17:32:29 GMT):
I do. It's a copy of the only configtx I found that actually worked for raft...

aatkddny (Fri, 09 Aug 2019 17:32:37 GMT):
``` Application: <<: *ApplicationDefaults Organizations: - <<: *BeantownLager - <<: *Block - <<: *Mediaocean - <<: *Orderer - <<: *Xtreme Consortiums: AllMember-Consortium: Organizations: - *BeantownLager - *Block - *Mediaocean - *Xtreme - *Chain ```

aatkddny (Fri, 09 Aug 2019 17:32:37 GMT):
``` Application: <<: *ApplicationDefaults Organizations: - <<: Consortiums: AllMember-Consortium: Organizations: - * ```

jyellick (Fri, 09 Aug 2019 17:32:57 GMT):
What you have done, is you have retrieved the original configuration as protobuf (binary), decoded it to JSON, modified it, and re-encoded it as binary. Then you have passed these two binaries to configtxlator to compute your update

jyellick (Fri, 09 Aug 2019 17:33:10 GMT):
This flow looks correct, but it's actually subtly wrong.

jyellick (Fri, 09 Aug 2019 17:34:26 GMT):
You must retrieve your original configuration as protobuf, decode it to JSON, *re-encode the original JSON to protobuf with configtxlator*, modify the JSON, and re-encode the modified JSON, and send the pair of re-encoded protos to configtxlator. _Not_ the original proto and the reencoded one.

jyellick (Fri, 09 Aug 2019 17:35:20 GMT):
This is necessary, as I mentioned before, because protobuf encoding is non-determinstic (usually), and the original proto you retrieved, was not encoded with any effort for determinism. When configtxlator encodes, it uses a special scheme for deterministically encoding protos.

jyellick (Fri, 09 Aug 2019 17:36:05 GMT):
When you computed the update with your original proto, and your re-encoded proto, the order of the ACLs were changed, because of random order map iteration. To the update computation, it looked like you had changed this field. So, it was encoded into your update erroneously.

aatkddny (Fri, 09 Aug 2019 17:40:39 GMT):
I retrieved the current channel block as binary. So this is the original here. If I understand this correctly, I need to run it through a decode/encode pair before using it as the first file. Then the second one is the decoded, modified, re-encoded one I have. Yuck. That wasn't in the example I cribbed from... Also are you saying that the Application section in the profile isn't needed at all?

aatkddny (Fri, 09 Aug 2019 17:40:39 GMT):
I retrieved the current channel block as binary. So this is the original here. If I understand this correctly, I need to run it through a decode/encode pair before using it as the first file. Then the second one is the decoded, modified, re-encoded one I have. Yuck. That wasn't in the example I cribbed from... Is it the same for all the other examples - adding anchor members, creating channels et al, or is this *special*. Also are you saying that the Application section in the profile isn't needed at all?

aatkddny (Fri, 09 Aug 2019 17:40:39 GMT):
I retrieved the current channel block as binary. So this is the original here. If I understand this correctly, I need to run it through a decode/encode pair before using it as the first file. Then the second one is the decoded, modified, re-encoded one I have. Yuck. That wasn't in the example I cribbed from... Is it the same for all the other examples - adding anchor members, creating channels et al, or is this *special*. Also are you saying that the Application section in the profile isn't needed at all? The intent is that *only* the orderer has visibility to the system channel to prevent data leakage.

jyellick (Fri, 09 Aug 2019 17:45:36 GMT):
Most of the examples are derived from the CLI, by nature of not being able to drill through the proto structures ends up doing the JSON re-encoding by side-effect.

jyellick (Fri, 09 Aug 2019 17:46:01 GMT):
But yes, for a correct config update, you need to do a wash cycle of the binary input through configtxlator before trying to compute the update.

jyellick (Fri, 09 Aug 2019 17:47:55 GMT):
As far as not needing the application section in your orderer system channel, yes, you should be able to do without this. However, unless there is an application section, you will not be able to connect peers to this channel. So, if your update flow involves pulling the channel config via a peer (which, the Java SDK does by default I believe), then you do need it. I know that the Java SDK was looking into adding another API for pulling config direct from orderers to bypass this limiation (this is what the CLI does), but I'm not sure where that stands.

aatkddny (Fri, 09 Aug 2019 17:52:20 GMT):
You pull it via a client instance that uses the orderer admin as a user. It creates a channel object then adds in orderers and peers as required. It used to be that you needed an extra "orderer-peer" but that limitation seems to have been removed in either 1.3 or 1.4. I'm now able to do this with a channel with no peers attached so I guess it's been fixed.

aatkddny (Fri, 09 Aug 2019 17:55:14 GMT):
Ok, I'll remove the application section in this profile template and see what that does when I re-gen this network. If that's good I'll try adding a selective orderer section to define a subset of orderers in the channels. Which is what started this all... Thanks for your help here.

jyellick (Fri, 09 Aug 2019 17:56:25 GMT):
Sure thing, good luck

aatkddny (Fri, 09 Aug 2019 18:41:10 GMT):
Yup. Works now with just the orderer admin. Thanks again.

cDown (Mon, 12 Aug 2019 06:48:35 GMT):
Has joined the channel.

akoenig (Mon, 12 Aug 2019 10:49:06 GMT):
Hi, I want to get the GenisisBlock from a channel. Is it correct that when I call "queryBlockByNumber(0)" I will get the genisisBlock?

bis2019 (Mon, 12 Aug 2019 16:46:25 GMT):
Has joined the channel.

medikent (Mon, 12 Aug 2019 17:56:09 GMT):
How significant are the changes to the Fabric SDK Java from 1.4.2 to 2.0.0? I imagine the upgraded service discovery, chaincode lifecycle, and the new chaincode deployment model are the main changes. Is that right?

sstone1 (Tue, 13 Aug 2019 08:17:21 GMT):
Same answer as for Node.js - the major changes are chaincode lifecycle. AFAIK, new chaincode deployment model (external builders) has no SDK impact. There’s also work that will continue to be done on top of the programming model enhancements delivered in 1.4.

Randyshu2018 (Tue, 13 Aug 2019 08:18:43 GMT):

If I don't set the request Attributes, above three attributes will be set to the default

Randyshu2018 (Tue, 13 Aug 2019 08:20:03 GMT):
but if I want set both default three attributes and customer attributes ,what should i do?

Randyshu2018 (Tue, 13 Aug 2019 09:58:24 GMT):

How to get the extension with java-sdk?

mahoney1 (Tue, 13 Aug 2019 10:04:02 GMT):
using the SDK, you can check out an example in the Fabric CA sdkintegration dir of setting custom attributes [here](https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L161)

akoenig (Tue, 13 Aug 2019 10:10:48 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=ewzvo3MA2giPohAzX) has some one an idea to get the genisisblock? Unfortunately the method of the channel object is private

akoenig (Tue, 13 Aug 2019 13:24:19 GMT):
Hi I want to add a new org to a channel and then add a peer from the new org to the network. I'm updating the channel-config and it all looks fine. Then I want to join with the peer. With this I need to provide the genisis block. In this block there is not the new org (because the org is not there from scratch). Now the new peer get's an error "MSP error: channel doesn't exist". What I'm doing wrong?

aatkddny (Tue, 13 Aug 2019 18:40:10 GMT):
Anyone get round the problem with setting the pembytes in the jsonobjects for network config? it won't accept a byte[] and the examples all use the file.

Randyshu2018 (Wed, 14 Aug 2019 01:47:26 GMT):
eh...but when i set that attributes,the default one will be replaced.

aatkddny (Thu, 15 Aug 2019 11:48:48 GMT):
What does GenesisBlock mean to you here? Usually you use a peer admin to get the latest block with a `Channel#getChannelConfigurationBytes()`. Then you'd update that, have the necessary peer admins sign it and do a `Channel#updateChannelConfiguration` There's a pretty easy to follow example in one of the SDK samples somewhere. If you are talking about what used to be called the genesis (but now iirc is system) channel - because you want to add a new channel, say - then it's the same idea but you patch in the orderer admin as the user into the client. The latest SDK version seems to have been amended to not require what I called an orderer-peer (special peer with orderer crypto) any more. Thanks to whoever did that, it's much much cleaner...

aatkddny (Thu, 15 Aug 2019 11:48:48 GMT):
What does GenesisBlock mean to you here? Usually you use a peer admin to get the latest block with a `Channel#getChannelConfigurationBytes()`. Then you'd update that, have the necessary peer admins sign it and do a `Channel#updateChannelConfiguration` There's a pretty easy to follow example in one of the SDK samples somewhere. If you are talking about what used to be called the genesis (but now iirc is system) channel - because you want to add a new channel, say - then it's the same idea but you patch in the orderer admin as the user into the client.

aatkddny (Thu, 15 Aug 2019 15:38:18 GMT):
there's a change to 2.0.0-SNAPSHOT that means I can add members to a system channel without having to define and add peers. I love it. Thankyou... Is it getting back ported into 1.4.x?

aatkddny (Fri, 16 Aug 2019 00:26:12 GMT):
trying to short circuit the debug process. this code used to work before it was rafted. Test network - I have a channel `everything-channel`. Able to read and write to it just fine. Add a new member to the consortium. Add same member to channel. Both work fine. Bring up peers for the new member. Try to start channel. Channel#initialize fails with ```org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel everything-channel failed with peer peer0-chain. Status FAILURE, details: Channel Channel{id: 29, name: everything-channel} Sending proposal with transaction: 66840b139d6cb5a3f3a863965772b7279c5ddbd89d5d28055bdde5d9ae2ee0ed to Peer{ id: 35, name: peer0-chain, channelName: everything-channel, url: grpcs://localhost:30060} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [everything-channel] creator org [ChainMSP], cause=null``` Peer has this: `[protoutils] ValidateProposalMessage -> WARN 047 channel [everything-channel]: MSP error: channel doesn't exist` Not sure what I did wrong, so I'm not sure where to start looking. Anyone have this happen to them?

aatkddny (Fri, 16 Aug 2019 00:26:12 GMT):
trying to short circuit the debug process. this code used to work before it was rafted. Test network - I have a channel `everything-channel`. Able to read and write to it just fine. Add a new member to the consortium. Add same member to channel. Both work fine. Bring up peers for the new member. Try to start channel to install chaincode on it. So it's the add orderers and peers manually and use the peer admin dance. Channel#initialize fails with ```org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel everything-channel failed with peer peer0-chain. Status FAILURE, details: Channel Channel{id: 29, name: everything-channel} Sending proposal with transaction: 66840b139d6cb5a3f3a863965772b7279c5ddbd89d5d28055bdde5d9ae2ee0ed to Peer{ id: 35, name: peer0-chain, channelName: everything-channel, url: grpcs://localhost:30060} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [everything-channel] creator org [ChainMSP], cause=null``` Peer has this: `[protoutils] ValidateProposalMessage -> WARN 047 channel [everything-channel]: MSP error: channel doesn't exist` Not sure what I did wrong, so I'm not sure where to start looking. Anyone have this happen to them?

aatkddny (Fri, 16 Aug 2019 00:26:12 GMT):
trying to short circuit the debug process. this code used to work before it was rafted. Test network - I have a channel `everything-channel`. Able to read and write to it just fine. Add a new member to the consortium. Add same member to channel. Both work fine. Bring up peers for the new member. Try to start channel to install chaincode on it. So it's the add orderers and peers manually and use the peer admin dance. Channel#initialize fails with ```org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel everything-channel failed with peer peer0-chain. Status FAILURE, details: Channel Channel{id: 29, name: everything-channel} Sending proposal with transaction: 66840b139d6cb5a3f3a863965772b7279c5ddbd89d5d28055bdde5d9ae2ee0ed to Peer{ id: 35, name: peer0-chain, channelName: everything-channel, url: grpcs://localhost:30060} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [everything-channel] creator org [ChainMSP], cause=null``` Peer has this: `[protoutils] ValidateProposalMessage -> WARN 047 channel [everything-channel]: MSP error: channel doesn't exist` Not sure what I did wrong, so I'm not sure where to start looking. Has the structure of the ccb changed since 1.2 and I'm poking stuff into the wrong place? Anyone have this happen to them?

aatkddny (Fri, 16 Aug 2019 00:26:12 GMT):
trying to short circuit the debug process. this code used to work before it was rafted. Test network - I have a channel `everything-channel`. Able to read and write to it just fine. Add a new member to the consortium. Add same member to channel. Both work fine. Bring up peers for the new member. Try to start channel to install chaincode on it. So it's the add orderers and peers manually and use the peer admin dance. Channel#initialize fails with ```org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel everything-channel failed with peer peer0-chain. Status FAILURE, details: Channel Channel{id: 29, name: everything-channel} Sending proposal with transaction: 66840b139d6cb5a3f3a863965772b7279c5ddbd89d5d28055bdde5d9ae2ee0ed to Peer{ id: 35, name: peer0-chain, channelName: everything-channel, url: grpcs://localhost:30060} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [everything-channel] creator org [ChainMSP], cause=null``` Peer has this: `[protoutils] ValidateProposalMessage -> WARN 047 channel [everything-channel]: MSP error: channel doesn't exist` Not sure what I did wrong, so I'm not sure where to start looking. Channel and system channel config looks ok - or at least the new org looks just like all the others. Anyone have this happen to them?

aatkddny (Fri, 16 Aug 2019 00:26:12 GMT):
trying to short circuit the debug process. this code used to work before it was rafted. Test network - I have a channel `everything-channel`. Able to read and write to it just fine from the other members. Add a new member to the consortium. Add same member to channel. Both work fine. Bring up peers for the new member. Try to start channel to install chaincode on it. So it's the add orderers and peers manually and use the peer admin dance. Channel#initialize fails with ```org.hyperledger.fabric.sdk.Channel : getConfigBlock for channel everything-channel failed with peer peer0-chain. Status FAILURE, details: Channel Channel{id: 29, name: everything-channel} Sending proposal with transaction: 66840b139d6cb5a3f3a863965772b7279c5ddbd89d5d28055bdde5d9ae2ee0ed to Peer{ id: 35, name: peer0-chain, channelName: everything-channel, url: grpcs://localhost:30060} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [everything-channel] creator org [ChainMSP], cause=null``` Peer has this: `[protoutils] ValidateProposalMessage -> WARN 047 channel [everything-channel]: MSP error: channel doesn't exist` Not sure what I did wrong, so I'm not sure where to start looking. Channel and system channel config looks ok - or at least the new org looks just like all the others. Anyone have this happen to them?

aatkddny (Fri, 16 Aug 2019 00:58:17 GMT):
edit: the only thing I can think of is that the genesis channel is coming from a file and holds the original block. could that be the issue here? i would expect it to update from an orderer.

aatkddny (Fri, 16 Aug 2019 00:58:17 GMT):
addendum: the only thing I can think of is that the genesis channel is coming from a file and holds the original block. could that be the issue here? i would expect it to update from an orderer.

SatheeshNehru (Mon, 19 Aug 2019 08:09:30 GMT):
https://github.com/hyperledger/fabric-chaincode-java/blob/bd59b349ad163ed04ac0ac0029427651d1a9fcf8/fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ClientIdentity.java#L91

bjcawanglu (Tue, 20 Aug 2019 02:05:01 GMT):
Has joined the channel.

tballast (Tue, 20 Aug 2019 09:25:14 GMT):
I am trying to implement service discovery, mostly following the Service discovery example in the Integration Tests, however I am not currently using TLS, and every time it tries to fetch the genesis blocks from my peers (two orgs, two peers each) it is using the grpcs protocol, and not just just grpc. I have not specified grpcs anywhere , it seems to be doing this by default. Is there a way to force it to use grpc? I am already using the `sdprops.put("org.hyperledger.fabric.sdk.discovery.default.protocol", "grpc:");` property.

Coada (Tue, 20 Aug 2019 12:08:14 GMT):
Hello! I am trying to create a Channel object to hold everything regarding a channel that has been created outside the scope of the Java application. My starting point is to call queryChannels(peer) and from the returned string(s) construct the object. However I still don't know which orderers are part of the channel, if it is initialized, etc. Perhaps this is not the way to go - how should I proceed?

bestbeforetoday (Tue, 20 Aug 2019 12:48:37 GMT):
I think if you have multiple orgs then you will need to be using TLS. As I understand it (which might not be perfectly correct!), the discovery information is passed between orgs using the gossip protocol using TLS.

ykim 1 (Tue, 20 Aug 2019 13:22:13 GMT):
Has joined the channel.

ykim 1 (Tue, 20 Aug 2019 13:22:15 GMT):
spring

tballast (Tue, 20 Aug 2019 13:35:21 GMT):
Hmm, ok gotcha. Yea, I was under the impression that it was with the gossip protocol but didn't know that it required TLS. I was able to get it to try to stop using TLS, however then I get an error along the lines of `url: grpc://peer1.org1.example.com:8051} was shutdown.`

tballast (Tue, 20 Aug 2019 16:01:33 GMT):
Is there a reason why, when communicating with a peer with TLS (querying chaincodes, for instance), the client would simply not be able to reach a specific peer? I try to query my peers to see which chaincodes are installed, and the client is able to easily talk to the first one at `grpcs://peer0.org1.example.com:7051`, but the second peer `grpcs://peer1.org1.example.com:8051` simply isn't reached at all. I have both of these mapped to localhost in my `/etc/hosts` file, and the only different I can see between the actual peer objects is that one has the property `"org.hyperledger.fabric.sdk.peer.organization_mspid" -> "Org1MSP"` while the other (the ont that can't be reached) doesn't. The first peer is also enabled for service discovery and the second isn't.

mattiabolzonella1 (Wed, 21 Aug 2019 07:56:41 GMT):
Hi, I've read that the API cannot query for all channels that exist but if I use several connection profiles each defining a channel, can I set the ConnectionProfile in the NetworkConfig object several time during the application execution? If so, it's a bad practice?

mahoney1 (Wed, 21 Aug 2019 10:11:29 GMT):
Depending on your use case, for queries, your applications would query using `evaluateTransaction` (example here -> https://github.com/hyperledger/fabric-gateway-java ) using the 1.4 new programming model shown (it simply picks a peer defined in the connection profile and sends the request to it, where it is evaluated) - on subject of multiple channels see here - see https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/application.html#network-channel and in particular how an identity would connect to the gateway (and perform an evaluateTransaction) For multiple channels see https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/application.html#network-channel - you would have to connect to the gateway with an identity and obviously disconnect when your unit of work is done for that gateway.

mattiabolzonella1 (Wed, 21 Aug 2019 10:14:28 GMT):
Thanks for the response! I'll check the links you posted

mattiabolzonella1 (Wed, 21 Aug 2019 10:56:30 GMT):
@mahoney1 Is the gateway SDK ready for a production envirorment?

sandy (Wed, 21 Aug 2019 11:18:27 GMT):
Is there any way to user thirparty certificate authority in hyperledger fabric?

Coada (Wed, 21 Aug 2019 11:26:04 GMT):
yes it's possible. You can get more specific answers in #fabric-ca

davidkel (Wed, 21 Aug 2019 12:41:10 GMT):
@mattiabolzonella1 not yet, it's still out as a preview for now.

davidkel (Wed, 21 Aug 2019 12:41:10 GMT):
@mattiabolzonella1 not yet, it's still out as a preview for now. Hopefully an official release will come soon

rthatcher (Wed, 21 Aug 2019 15:16:18 GMT):
Has joined the channel.

JiTian0225 (Thu, 22 Aug 2019 03:14:04 GMT):
Has joined the channel.

paranjan (Thu, 22 Aug 2019 08:12:30 GMT):
I would try to first provide the msp for the non-working peer and check. A peer belongs to an org, and that membership is governed by msp. So, peer without msp seems incorrect.

mattiabolzonella1 (Thu, 22 Aug 2019 08:17:32 GMT):
I'm exploring the gateway SDK and I have a problem using a file system wallet. I'm following the example here: https://github.com/hyperledger/fabric-gateway-java#how-to-use

mattiabolzonella1 (Thu, 22 Aug 2019 08:31:57 GMT):
I'm exploring the gateway SDK and I'm following the example here: https://github.com/hyperledger/fabric-gateway-java#how-to-use The wallet is correctly located by `Path.get("path/to/wallet")` and has the following structure; ``` wallet |--- Admin |--- adminCert.pem |--- pKey_sk ``` If I try to execute the method `getAllLabels()` it returns the label "Admin" which is the folder where certificate and private key are contained. But the method `wallet.exists("Admin")` it return false, like the isn't any label "Admin". Therefore, if I create a `Gateway.Builder` setting the `.identity(wallet,"Admin")` and try to execute `builder.connetct()` I receive the following exception: `java.lang.IllegalStateException: The gateway identity must be set`

mattiabolzonella1 (Thu, 22 Aug 2019 08:31:57 GMT):
I'm exploring the gateway SDK and I'm following the example here: https://github.com/hyperledger/fabric-gateway-java#how-to-use The wallet is correctly located by `Path.get("path/to/wallet")` and has the following structure; ``` wallet |--- Admin |--- adminCert.pem |--- pKey_sk ``` If I try to execute the method `getAllLabels()` it returns the label "Admin" which is the folder where certificate and private key are contained. But the method `wallet.exists("Admin")` returns false, like the isn't any label "Admin". Therefore, if I create a `Gateway.Builder` setting the `.identity(wallet,"Admin")` and try to execute `builder.connetct()` I receive the following exception: `java.lang.IllegalStateException: The gateway identity must be set`

davidkel (Thu, 22 Aug 2019 09:32:54 GMT):
@mattiabolzonella1 how did you create that wallet exactly ?

VivekGani (Thu, 22 Aug 2019 09:35:25 GMT):
Has joined the channel.

mattiabolzonella1 (Thu, 22 Aug 2019 09:37:44 GMT):
I've no experience with wallets and certificate, so i'm doing obvious mistakes I apologize. Looking here: https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/wallet.html#structure I assumed (wrongly) that a wallet is simply a folder in which are contaned various certificates. Now i think that I need some sort of tool in order to genereate wallets, am I correct?

davidkel (Thu, 22 Aug 2019 09:41:00 GMT):
You need to use the wallet api to import identities into wallets as it also generates a metadata file which is what you are missing. However it is a bug in the java implementation for getAllLabels() as it should check for the existence of the metadata file by calling the exists method itself. So would suggest raising a jira for that

mattiabolzonella1 (Thu, 22 Aug 2019 09:46:27 GMT):
The wallet API that you're referring is the class Wallet.Identity? So I need to call `createIdentity()` and the put the identity returned in the wallet using `put()`. Anyway, thanks for helping me!

davidkel (Thu, 22 Aug 2019 09:55:09 GMT):
Sounds about right :-)

mattiabolzonella1 (Thu, 22 Aug 2019 09:55:25 GMT):
Thanks!

davidkel (Thu, 22 Aug 2019 09:57:29 GMT):
``` final String basePath = "/home/dave/"; Path walletLoc = Paths.get(basePath, "wallet"); Wallet wallet = Wallet.createFileSystemWallet(walletLoc); String certificate = new String(Files.readAllBytes(Paths.get(basePath, "cert.pem"))); String privateKey = new String(Files.readAllBytes(Paths.get(basePath, "key.pem"))); Identity id = org.hyperledger.fabric.gateway.Wallet.Identity.createIdentity("Org1MSP", new StringReader(certificate), new StringReader(privateKey)); wallet.put("dave", id); ```

davidkel (Thu, 22 Aug 2019 09:58:20 GMT):
Bit messy but hopefully you get the idea

mattiabolzonella1 (Thu, 22 Aug 2019 09:59:57 GMT):
Awesome, I've coded more or less the same thing, now i can execute `connect()`

mahoney1 (Thu, 22 Aug 2019 14:18:04 GMT):
reminder that the Fabric Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

mattiabolzonella1 (Fri, 23 Aug 2019 07:51:38 GMT):
I'm looking at the source code of the gateway SDk, in particulare the `submitTransaction` method, I'm using the service discovery. As I can tell if the `TransactionProposal` fails (the chaincode returns a `TransactionResponse` with status 500) in the `Channel` class of the base SDK an Exception is thrown because the `DiscoveryOption` `inspectResult` is not set to `true` which is used if all `TransactionResponse` invalid and valid are required in the application for further inspection, like get the Response message. Instead, a generic `GatewayRuntimeException` is returned with the default message `"Could not meet endorsement policy for chaincode ... `. So my question is: Can i get the invalid response message returned by the chaincode using the gateway SDK?

mattiabolzonella1 (Fri, 23 Aug 2019 07:51:38 GMT):
I'm looking at the source code of the gateway SDk, in particulare the `submitTransaction` method, I'm using the service discovery. As I can tell if the `TransactionProposal` fails (the chaincode returns a `ProposalResponse` with status 500) in the `Channel` class of the base SDK an Exception is thrown because the `DiscoveryOption` `inspectResult` is not set to `true` which is used if all `ProposalResponse` invalid and valid are required in the application for further inspection, like get the Response message. Instead, a generic `GatewayRuntimeException` is returned with the default message `"Could not meet endorsement policy for chaincode ... `. So my question is: Can i get the invalid response message returned by the chaincode using the gateway SDK?

paranjan (Fri, 23 Aug 2019 08:44:07 GMT):
@mattiabolzonella1 Are you looking for this: https://gerrit.hyperledger.org/r/admin/repos/fabric-gateway-java?

mattiabolzonella1 (Fri, 23 Aug 2019 08:46:29 GMT):
I've already the source code, I cloned the repo you posted

aatkddny (Mon, 26 Aug 2019 21:39:37 GMT):
on a slow(er) connection. to save myself some google-fu anyone remember the setting to increase this timeout? ``` 2019-08-26 21:36:31.006 UTC [dockercontroller] deployImage -> ERRO 166 Error building image: Post http://localhost:2375/build?t=network-peer0-mediaocean-asset-1.0-7893610ac238115938ee4220f910a7e539e2304cc3491d967d8cce6ad0192f00: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: dial tcp: lookup auth.docker.io on 10.96.0.10:53: read udp 10.1.13.88:51688->10.96.0.10:53: i/o timeout```

aatkddny (Mon, 26 Aug 2019 21:39:37 GMT):
on a slow(er) connection. to save myself some google-fu anyone remember the setting to increase this timeout? ``` 2019-08-26 21:36:31.006 UTC [dockercontroller] deployImage -> ERRO 166 Error building image: Post http://localhost:2375/build?t=network-peer0-org-asset-1.0-7893610ac238115938ee4220f910a7e539e2304cc3491d967d8cce6ad0192f00: Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:latest: dial tcp: lookup auth.docker.io on 10.96.0.10:53: read udp 10.1.13.88:51688->10.96.0.10:53: i/o timeout```

lotty02cho (Tue, 27 Aug 2019 07:52:03 GMT):
how to start End2endIT.java?

tballast (Tue, 27 Aug 2019 11:18:04 GMT):
There is a folder called `fixture` which contains a bunch of docker stuff, and a script called `fabric.sh`. Run `fabric.sh up` and then you can run End2EndIT.java as a unit test in an IDE.

tballast (Tue, 27 Aug 2019 11:19:45 GMT):
When instantiating (java) chaincode with the SDK it is not possible to give it a path for the ChaincodeID. When doing it manually (ie. through the CLI) you must specify it. Thus, they end up with different chaincode IDs. If i install chaincode on Org1 peers with the SDK, and Org2 peers with the CLI, how can I get the program to realize these are the same?

Coada (Tue, 27 Aug 2019 14:41:14 GMT):
haha that sounds like a funny bug, although I am interested in the answer too in case we end up with this scenario

hyperlearner (Wed, 28 Aug 2019 06:42:04 GMT):
Has joined the channel.

hyperlearner (Wed, 28 Aug 2019 06:42:04 GMT):
pom.xml

hyperlearner (Wed, 28 Aug 2019 06:42:08 GMT):
pom.

lotty02cho (Wed, 28 Aug 2019 08:33:15 GMT):
how can I run End2EndIT.java in Eclipse?

tballast (Wed, 28 Aug 2019 08:34:16 GMT):
not sure, I use intelliJ, but I have it set up to run as a JUnit test. If you can do something like that it should work.

lotty02cho (Wed, 28 Aug 2019 08:45:57 GMT):
I'm using eclipse, when I click End2endIT.java and click right button, there is a Run as > Junit Test. So, I click it but it said that "No JUnit tests found." How can you start JUnit test? Thanks for replay:)

tballast (Wed, 28 Aug 2019 08:52:14 GMT):
Again, not sure for eclipse as I've never used it, but you may have to tell it exactly where you want it to look. Like, does it as for a "Main Class" or something? In intellij there are "Run Configurations" which have all of the details required for running in what ever way you want, and the JUnit tests are all "class tests" with, for example, the End2EndIT test class specified as the class to test.

lotty02cho (Wed, 28 Aug 2019 08:57:59 GMT):
Umm.. I'm already use node-sdk, so I'm very confused. and honestly I'm not good at java. so that's why I'm asking you. *my ultimate goal is to query data and invoke my own channel.* Let's say I already make byfn network, using fabric-samples/first-network, I try to query and invoke someone's data in mychannel.

tballast (Wed, 28 Aug 2019 09:00:58 GMT):
I see, yea that's alright. I know that getting it to run the first time can be tricky. What I would first recommend, if you haven't already, is just figure out how to get a basic application running using Eclipse. It can be a hello world or whatever, but maybe if it uses maven and imports a package that could be useful. Then, there is an example [here](https://medium.com/@lkolisko/hyperledger-fabric-sdk-java-basics-tutorial-a67b2b898410) which I've found useful for the basics of invoking and querying.

lotty02cho (Wed, 28 Aug 2019 09:09:31 GMT):
Umm.. I already saw that blog, what about using intelliJ? Is it comfortable to run fabric-sdk-java?

tballast (Wed, 28 Aug 2019 09:11:01 GMT):
I find it to be, yes. however, it also takes a little bit of setup. i believe that all of this can be done in Eclipse without too much trouble. The settings should be similar.

tballast (Wed, 28 Aug 2019 09:25:48 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/docs/EclipseSetup.md

mattiabolzonella1 (Wed, 28 Aug 2019 13:44:27 GMT):
How can i decode the protobuf used to implement the transaction Envelope? I need to get all writes done in a transaction

aatkddny (Wed, 28 Aug 2019 15:48:34 GMT):
Can't you just get them from the blocks by hanging an event listener off a peer?

JanKosecki (Wed, 28 Aug 2019 16:59:02 GMT):
Has joined the channel.

JanKosecki (Wed, 28 Aug 2019 16:59:03 GMT):
Hi, why `Channel#getDiscoveredChaincodeNames` returns chaincode names only and `Channel#queryInstantiatedChaincodes()` returns more data like version?

JanKosecki (Wed, 28 Aug 2019 16:59:03 GMT):
Hi, why `Channel#getDiscoveredChaincodeNames` returns chaincode names only and `Channel#queryInstantiatedChaincodes()` returns more data like version? I'm migrating my app to use service discovery and I'm not sure which method I should use when verifying, that chaincode has been definitely instantiated

JanKosecki (Wed, 28 Aug 2019 17:03:01 GMT):
Also, I have 3 peers in the same organization for resiliency with endorsement policy requiring only one peer to approve - it works fine using `sendTransactionProposalToEndorsers` - a proposal request is made to only one of 3 peers but then what is the best approach, when the same SDK clients wants to query chaincode?

JanKosecki (Wed, 28 Aug 2019 17:03:47 GMT):
Should I simply round-robin one of the peers, check if it's available and if yes query it? Or should I query all 3 peers (but then what if 1-2 peers are down)

nmutter (Wed, 28 Aug 2019 18:26:19 GMT):
I'm running different peers and clients on multiple servers. When executing transactions after start of a client everything is ok, but after ~3-4 minutes without activity all following requests will get timeouts. Is there some hearbeat value for the clients? If I restart the client, the connection will work again for some minutes. It feels like the connection timesout, but the sdk does not notice it?

nmutter (Wed, 28 Aug 2019 18:30:54 GMT):
Maybe I need to set the properties for peers and orderers? Like https://github.com/hyperledger/fabric-sdk-java/blob/31727ee7c44aa011b5906db102d939f1371736e6/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIT.java#L846

nmutter (Wed, 28 Aug 2019 18:49:46 GMT):
https://github.com/hyperledger/fabric-sdk-java/blob/master/README.md#firewalls-load-balancers-network-proxies

mattiabolzonella1 (Thu, 29 Aug 2019 06:38:53 GMT):
I have the txIds of past transactions and i would like to see what has been written in the world state in a past transaction. I can get the Envelope using `ProcessedTransaction` class but is a protobuf returned in `ByteString` and when I try to convert it to a String, no matter the charset, I get a string with gibberish character

nmutter (Thu, 29 Aug 2019 12:49:02 GMT):
Seems to have fixed the issue :)

bis2019 (Fri, 30 Aug 2019 14:47:02 GMT):
Hi everyone, I am having issue to install a chaincode with external dependencies with Java SDK. Very similar to this issue https://jira.hyperledger.org/browse/FABG-877 I tried to put the dependencies in the vendor but does with govendor but it's still not working

bis2019 (Fri, 30 Aug 2019 14:47:02 GMT):
Hi everyone, I am having issue to install a chaincode with external dependencies with Java SDK. Very similar to this issue https://jira.hyperledger.org/browse/FABG-877 I tried to put the dependencies in the vendor with govendor but it's still not working

bis2019 (Fri, 30 Aug 2019 14:48:40 GMT):
chaincode is written in go

bis2019 (Fri, 30 Aug 2019 14:50:23 GMT):
and i have this type of error with the java sdk mych - Chain code upgrade failed to execute transaction c84bf09f814e8d54358208cfb23380b897c18e9cc405e1cffa6696223009b95a: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "../input/src/poc/go/policy.go:6:2: cannot find package "github.com/satori/go.uuid" in any of: /opt/go/src/github.com/satori/go.uuid (from $GOROOT) /chaincode/input/src/github.com/satori/go.uuid (from $GOPATH) /opt/gopath/src/github.com/satori/go.uuid "

bis2019 (Fri, 30 Aug 2019 14:50:23 GMT):
and i have this type of error with the java sdk /code mych - Chain code upgrade failed to execute transaction c84bf09f814e8d54358208cfb23380b897c18e9cc405e1cffa6696223009b95a: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "../input/src/poc/go/policy.go:6:2: cannot find package "github.com/satori/go.uuid" in any of: /opt/go/src/github.com/satori/go.uuid (from $GOROOT) /chaincode/input/src/github.com/satori/go.uuid (from $GOPATH) /opt/gopath/src/github.com/satori/go.uuid "

bis2019 (Fri, 30 Aug 2019 14:50:23 GMT):
and i have this type of error with the java sdk mych - Chain code upgrade failed to execute transaction c84bf09f814e8d54358208cfb23380b897c18e9cc405e1cffa6696223009b95a: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "../input/src/poc/go/policy.go:6:2: cannot find package "github.com/satori/go.uuid" in any of: /opt/go/src/github.com/satori/go.uuid (from $GOROOT) /chaincode/input/src/github.com/satori/go.uuid (from $GOPATH) /opt/gopath/src/github.com/satori/go.uuid "

bis2019 (Fri, 30 Aug 2019 14:50:23 GMT):
and i have this type of error with the java sdk mych - Chain code upgrade failed to execute transaction c84bf09f814e8d54358208cfb23380b897c18e9cc405e1cffa6696223009b95a: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "../input/src/poc/go/policy.go:6:2: cannot find package "github.com/satori/go.uuid" in any of: /opt/go/src/github.com/satori/go.uuid (from $GOROOT) /chaincode/input/src/github.com/satori/go.uuid (from $GOPATH) /opt/gopath/src/github.com/satori/go.uuid "

bis2019 (Fri, 30 Aug 2019 14:53:02 GMT):
Did anyone managed to deploy GO chaincode with external dependecies through the Java SDK? Are there any workarounds?

aatkddny (Fri, 30 Aug 2019 17:25:36 GMT):
Have an issue that I'd like some clarification on. ``` out("sending transactionProposal to all peers with arguments: move(a,b,100)"); // Collection transactionPropResp = channel.sendTransactionProposalToEndorsers(transactionProposalRequest); Collection transactionPropResp = channel.sendTransactionProposal(transactionProposalRequest, channel.getPeers()); for (ProposalResponse response : transactionPropResp) { if (response.getStatus() == ProposalResponse.Status.SUCCESS) { out("Successful transaction proposal response Txid: %s from peer %s", response.getTransactionID(), response.getPeer().getName()); successful.add(response); } else { failed.add(response); } } out("Received %d transaction proposal responses. Successful+verified: %d . Failed: %d", transactionPropResp.size(), successful.size(), failed.size()); if (failed.size() > 0) { ProposalResponse firstTransactionProposalResponse = failed.iterator().next(); fail("Not enough endorsers for invoke(move a,b,100):" + failed.size() + " endorser error: " + firstTransactionProposalResponse.getMessage() + ". Was verified: " + firstTransactionProposalResponse.isVerified()); } ``` This is the sample code in the latest End2endIT.java. It's been pretty much the same since 1.0 as far as I can tell. If some of your endorsers fail - for a known reason (in my case they can't get to read from another channel) - what are you *supposed* to do here? You can't send all the ProposalResponses - the filing ones cause this to come out of Channel `The proposal responses have 1 inconsistent groups with 2 that are invalid. Expected all to be consistent and none to be invalid.` Send the ones that pass to the orderer and let it figure out if that's enough to pass endorsement? Figure

aatkddny (Fri, 30 Aug 2019 17:25:36 GMT):
Have an issue that I'd like some clarification on. ``` out("sending transactionProposal to all peers with arguments: move(a,b,100)"); // Collection transactionPropResp = channel.sendTransactionProposalToEndorsers(transactionProposalRequest); Collection transactionPropResp = channel.sendTransactionProposal(transactionProposalRequest, channel.getPeers()); for (ProposalResponse response : transactionPropResp) { if (response.getStatus() == ProposalResponse.Status.SUCCESS) { out("Successful transaction proposal response Txid: %s from peer %s", response.getTransactionID(), response.getPeer().getName()); successful.add(response); } else { failed.add(response); } } out("Received %d transaction proposal responses. Successful+verified: %d . Failed: %d", transactionPropResp.size(), successful.size(), failed.size()); if (failed.size() > 0) { ProposalResponse firstTransactionProposalResponse = failed.iterator().next(); fail("Not enough endorsers for invoke(move a,b,100):" + failed.size() + " endorser error: " + firstTransactionProposalResponse.getMessage() + ". Was verified: " + firstTransactionProposalResponse.isVerified()); } ``` This is the sample code in the latest End2endIT.java. It's been pretty much the same since 1.0 as far as I can tell. If some of your endorsers fail - for a known reason (in my case they can't get to read from another channel) - what are you *supposed* to do here? You can't send all the ProposalResponses - the failing ones cause this to come out of Channel `The proposal responses have 1 inconsistent groups with 2 that are invalid. Expected all to be consistent and none to be invalid.` So is it sufficient to send the ones that pass to the orderer and let it figure out if that's enough to pass endorsement? Or do you need to figure out if these responses pass yourself? My setup is a pure OR for all the orgs (single yes from any is sufficient) so without reconstituting a network that's in use it's difficult for me to test myself. Wondering if anyone knew off the top of their head.

Deviad (Sun, 01 Sep 2019 06:44:40 GMT):
Has joined the channel.

Deviad (Sun, 01 Sep 2019 06:44:45 GMT):
Hello

Deviad (Sun, 01 Sep 2019 06:45:31 GMT):
When I run the containers via docker-compose with the provided docker-compose.yml I get

Deviad (Sun, 01 Sep 2019 06:45:50 GMT):
``` ERROR: Duplicate mount points: [/Volumes/Data/Projects/fabric-gateway-java/src/test/fixtures/crypto-material:/etc/hyperledger/config:rw, /Volumes/Data/Projects/fabric-gateway-java/src/test/fixtures/crypto-material:/etc/hyperledger/config:rw] ```

Deviad (Sun, 01 Sep 2019 06:46:03 GMT):
The project I am using is fabric-gateway-java

paranjan (Sun, 01 Sep 2019 10:47:35 GMT):
Can you try following: JSONObject json = new JSONObject(new String(data, UTF_8));

paranjan (Sun, 01 Sep 2019 11:28:25 GMT):
Why is the fabric library has shim in its name? What is the significance of shim?

AndresMartinezMelgar.itcl (Mon, 02 Sep 2019 08:22:16 GMT):
Hi, i am working whit v1.3. I have a channel with 2 orgs(org1 and org2) and 3 peers each one. How can i add a new peer to org1?

AndresMartinezMelgar.itcl (Mon, 02 Sep 2019 08:23:48 GMT):
i see i can do "channel.addPeer(newPeer)", but it only works when i create channel, no after that

tballast (Mon, 02 Sep 2019 09:50:27 GMT):
Typically you _join_ the channel once it's been created. You only _add_ once at the beginning. https://github.com/hyperledger/fabric-sdk-java#whats-difference-between-joining-and-adding-a-peer-to-a-channel

Coada (Tue, 03 Sep 2019 09:10:10 GMT):
do you want to add a new peer (service) or add a running peer to a channel?

Deviad (Tue, 03 Sep 2019 14:59:36 GMT):
Hello

Deviad (Tue, 03 Sep 2019 15:01:21 GMT):
Can anyone please explain me how it is possible to create a wallet and allow users who just have a password to unlock it?

Deviad (Tue, 03 Sep 2019 15:01:46 GMT):
I want to use the inmemory wallet since I plan to store this data for a single application having only a single organization.

dan13 (Tue, 03 Sep 2019 18:09:45 GMT):
This is a great question. My assumption is that the client needs to decide how to process and then make appropriate adjustments to the transaction submitted to Orderer, or fail and return error to its caller. Likewise, if query and get different responses, figure a way to a) retry (assuming can wait for network to "settle"), b) pick the response with most instances responding (voting), or c) pick the response from the peer with the greatest block height, d) something else? Would be great to have some of these impl design patterns documented by the HLF team.

SteveKIM (Wed, 04 Sep 2019 01:23:08 GMT):
Has joined the channel.

SteveKIM (Wed, 04 Sep 2019 01:23:10 GMT):
Hi, I Change source and commit, there is a Hyperledger Jobbuilder error, but I don`t have an idea, plz let me know, jira number is FABJ-474

SteveKIM (Wed, 04 Sep 2019 01:23:10 GMT):
Hi, I Change source and commit, there is a Hyperledger Jobbuilder error, but I don`t have an idea, plz let me know, jira number is FABJ-474 https://jira.hyperledger.org/projects/FABJ/issues/FABJ-474?filter=allopenissues

nitishbhardwaj19 (Wed, 04 Sep 2019 16:37:37 GMT):
Hi, do we have anything similar to this https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/wallet.html?highlight=wallet. I know that HSM is not yet supported but do we have an interface to connect with other wallet types?

nitishbhardwaj19 (Wed, 04 Sep 2019 16:37:37 GMT):
Hi @all , do we have anything similar to this https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/wallet.html?highlight=wallet. I know that HSM is not yet supported but do we have an interface to connect with other wallet types?

bestbeforetoday (Wed, 04 Sep 2019 19:23:42 GMT):
Right now you can't get at the actual proposal responses from the exception that gets thrown, although the message should include the proposal response messages. It seems like it would be useful to get at the actual responses though. You could raise a Jira for this as a new requirement: https://jira.hyperledger.org/projects/FGJ

bestbeforetoday (Wed, 04 Sep 2019 19:27:33 GMT):
The approach we've taken with the higher level client APIs is to just send any good proposal responses to the orderer. The orderer may reject the submit if the endorsement policy is not satisfied, and you can also listen for successful commit events from peers

bestbeforetoday (Wed, 04 Sep 2019 19:33:44 GMT):
Are you hitting this problem trying to run the _fabric-gateway-java_ integration tests? The docker-compose files are just used by the tests and aren't intended to be examples of how to stand up a Fabric environment

aatkddny (Wed, 04 Sep 2019 19:35:22 GMT):
that's what i'm doing until it stops working...

bestbeforetoday (Wed, 04 Sep 2019 19:39:37 GMT):
The builds are in a bad state for various reasons right now: actual test failures (I think caused by changes outside of the SDK but still under investigation), CI pipeline not correctly reporting the build status, and there were problems reported with the build systems recently too

bestbeforetoday (Wed, 04 Sep 2019 20:01:05 GMT):
The high level _fabric-gateway-java_ API (https://github.com/hyperledger/fabric-gateway-java) has the some wallets as the Node SDK. I'm working on simplifying the wallet implementation for the 2.0 release of both of these SDKs so that it is easier to plug in your own back-end storage mechanisms

bestbeforetoday (Wed, 04 Sep 2019 20:01:05 GMT):
The high level _fabric-gateway-java_ API (https://github.com/hyperledger/fabric-gateway-java) has the same wallets as the Node SDK. I'm working on simplifying the wallet implementation for the 2.0 release of both of these SDKs so that it is easier to plug in your own back-end storage mechanisms

nitishbhardwaj19 (Thu, 05 Sep 2019 09:05:41 GMT):
Thanks for sharing this. Do we have any roadmap/plans to integrate HSM support with Fabric-SDK as well.

rthatcher (Thu, 05 Sep 2019 14:22:52 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Community+Call

nitishbhardwaj19 (Fri, 06 Sep 2019 02:09:13 GMT):
Do we still have a limitation to use HSM with a wallet? I couldn't find any method to connect/use HSM. Just have fileSystem and inMemory type.

nitishbhardwaj19 (Fri, 06 Sep 2019 02:09:13 GMT):
@bestbeforetoday Do we still have a limitation to use HSM with a wallet? I couldn't find any method to connect/use HSM. Just have fileSystem and inMemory type.

RyanGriffiths (Fri, 06 Sep 2019 12:14:46 GMT):
Has joined the channel.

RyanGriffiths (Fri, 06 Sep 2019 12:14:48 GMT):
I'm slightly confused as to why there are multiple TransactionActionInfos per TransactionEvent and was hoping someone here might be able to help me out! Each TransactionActionInfo - as I understand it - corresponds to a Collection from a particular ProposalRequest. But if there can be multiple TransactionActionInfos in a TransactionEvent, does that mean you can combine multiple Collection, from different ProposalRequests, into a single transaction to be sent to the orderer? And if so, which of the TxIDs is set within the TransactionEvent? Apologies if this is an obvious question. I did attempt to search the docs for an answer before posting here!

bestbeforetoday (Fri, 06 Sep 2019 12:37:32 GMT):
Somebody else might have a better, but here's one... :) Chaincode events are attached to TransactionActionInfos. A transaction invocation may emit multiple chaincode events so there may be multiple TransactionActionInfos in a TransactionEvent

bestbeforetoday (Fri, 06 Sep 2019 12:37:32 GMT):
Somebody else might have a better answer, but here's one... :) Chaincode events are attached to TransactionActionInfos. A transaction invocation may emit multiple chaincode events so there may be multiple TransactionActionInfos in a TransactionEvent

bestbeforetoday (Fri, 06 Sep 2019 12:40:37 GMT):
While I'd love to see HSM support using wallets in the Java SDK, I don't have any timeline for that right now, and it's not something I'm expecting to include in a first cut of the wallet refactoring I'm working on. First step would be to be able to make HSM work with the Java SDK and that's not something I personally know how to do right now. Any pointers from the community would be very welcome :)

RyanGriffiths (Fri, 06 Sep 2019 12:54:27 GMT):
Thanks, yep I was also going to look into how chaincode events behaved in this context!

Deviad (Sun, 08 Sep 2019 11:01:30 GMT):
I have got a question

Deviad (Sun, 08 Sep 2019 11:02:38 GMT):
My app has got a focus on usability and user experience. I would like to avoid the user to have to store on his computer a key which he could lose easily with a format, change of device; or a user might be willing to use multiple devices without having the hassle of having the key with him.

Deviad (Sun, 08 Sep 2019 11:03:20 GMT):
Is there any SDK to create the pem key required to enroll a user with the purpose of storing everything in a database like Mongo?

Deviad (Sun, 08 Sep 2019 11:03:43 GMT):
Is there a different approach for my use case? Is it documented somewhere?

Deviad (Sun, 08 Sep 2019 11:03:43 GMT):
Is there a different approach for my use case? Is it documented anywhere?

Deviad (Sun, 08 Sep 2019 11:48:14 GMT):
http://www.bouncycastle.org/wiki/display/JA1/BC+Version+2+APIs

Coada (Tue, 10 Sep 2019 08:19:51 GMT):
I have ended up in the deep ends of Fabric; private data collections. When performing a chaincode instantiation with Java SDK I can now also create a private data collection using a `StaticCollectionConfig`. The Fabric docs provide other datastructures for these configurations than what Java SDK accepts. In particular, I am looking for `memberOnlyRead` and `memberOnlyWrite` options. Is anyone here aware if these attributes are supported by Java SDK? I am unable to get it to work

Coada (Thu, 12 Sep 2019 13:15:50 GMT):
nobody? :cry:

heatherp (Thu, 12 Sep 2019 13:19:11 GMT):
@bestbeforetoday @andrew-coleman can you guys answer this please?

awjh (Thu, 12 Sep 2019 13:40:59 GMT):
Has joined the channel.

awjh (Thu, 12 Sep 2019 13:40:59 GMT):
If this is like the node SDK then I may be able to shed some light. The format required looks like this: ``` [ { "name": "Org1", "policy": { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 } ] } }, "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive": 0, "memberOnlyRead": true } ] ```

awjh (Thu, 12 Sep 2019 13:43:09 GMT):
There is (to my knowledger) no members only write. Fabric allows any peer to write to a private collection so long as the peer whose private collection it is approves the transaction (simplified). It will approve the transaction if the endorsement policy for the chaincode is met. Therefore the write aspect of a private collection is controlled by the chaincode's endorsement policy rather than the collection config

awjh (Thu, 12 Sep 2019 13:46:22 GMT):
This allows fabric to cut down on the number of peers having to execute the chaincode to meet the endorsement policy. Imagine an endorsement policy of `OR('Org1MSP.peer', 'Org2MSP.peer')` on a chaincode which writes to the private collections of Org1 and Org2. If the peer for Org1 returns true then there is no need for fabric to wait on the response of Org2's peer as the OR condition is already true. If private collections were member only write then since Org2 did not execute the chaincode it wouldn't have updated its private collection and therefore would be out of step with Org1. (Note: this is a simplified version of fabric's processes)

awjh (Thu, 12 Sep 2019 13:46:22 GMT):
This allows fabric to cut down on the number of peers having to execute the chaincode to meet the endorsement policy. Imagine an endorsement policy of `OR('Org1MSP.peer', 'Org2MSP.peer')` on a chaincode which writes to the private collections of Org1 and Org2. If the peer for Org1 returns true then there is no need for fabric to wait on the response of Org2's peer as the OR condition is already true. If private collections were member only write then since Org2 did not execute the chaincode it wouldn't have updated its private collection and therefore would be out of step with Org1

awjh (Thu, 12 Sep 2019 13:46:22 GMT):
This allows fabric to cut down on the number of peers having to execute the chaincode to meet the endorsement policy. Imagine an endorsement policy of `OR('Org1MSP.peer', 'Org2MSP.peer')` on a chaincode which writes to the private collections of Org1 and Org2. If the peer for Org1 returns true then there is no need for fabric to wait on the response of Org2's peer as the OR condition is already true. If private collections were member only write then since Org2 did not execute the chaincode it wouldn't have updated its private collection and therefore would be out of step with Org1.

awjh (Thu, 12 Sep 2019 13:49:13 GMT):
Forgot to mention. In the example I posted above the 0 in the signed-by refers to the index of the identity in the identities that it should be signed by

Coada (Thu, 12 Sep 2019 15:47:30 GMT):
@awjh I appreciate your extensive reply. However you highlight an important point - that it only applies if it is like the node SDK, which it isn't. The format is different (see https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/fixture/collectionProperties/testCollection.json) and there is no mention of a memberOnly property. Even if I add a memberOnlyRead property it seems to be ignored, I can query the private data as a non-member. As for member only write, it seems to just recently have been added so I realize I probably can't set it just yet: https://github.com/hyperledger/fabric-protos/blob/master/common/collection.proto#L61

awjh (Thu, 12 Sep 2019 15:51:39 GMT):
Okay, I unfortunately only have experience with the Node SDK :( Cheers for the heads up on membersOnlyWrite wasn't aware of that going in, will be useful for me once implemented in the SDKs

vijay5378 (Fri, 13 Sep 2019 11:26:37 GMT):
Hi ,class Attribute in package org.hyperledger.fabric_ca.sdk is non seriallizable. Can this be made serialisable? Is there any design consideration why attributes aren't serializable? Ideally I would want to construct a user object along with attributes, serialise it and store it somewhere to access it when needed.

jdfigure (Mon, 16 Sep 2019 16:06:49 GMT):
Hi! Is there a release date planned for Java SDK version 1.4.5?

bestbeforetoday (Tue, 17 Sep 2019 15:39:27 GMT):
No target date yet that I know of. Certainly we will want 1.4.5 published by the time the a release version of _fabric-gateway-java_ is published, since it relies on some changes that went into _fabric-sdk-java_ since 1.4.4. Is there a particular fix/change that you need published?

bestbeforetoday (Tue, 17 Sep 2019 15:41:35 GMT):
You could just serialize it yourself, either using your own de/serialization scheme or using the Attribute's `toJsonObject()` method

jdfigure (Tue, 17 Sep 2019 15:53:59 GMT):
Thanks for the update - we're trying out Java Gateway and that is the reason I asked.

SteveKIM (Wed, 18 Sep 2019 00:28:40 GMT):
I modified the source, but the review is not in progress. Checking gerrit does not change the state. Please confirm. https://jira.hyperledger.org/projects/FABJ/issues/FABJ-474?filter=allopenissues

SteveKIM (Wed, 18 Sep 2019 00:34:47 GMT):
Are you unable to proceed due to a build error? As I asked last time, it wasn't my source problem, but an error occurred at build time. Please check https://gerrit.hyperledger.org/r/c/fabric-sdk-java/+/33331

vijay5378 (Wed, 18 Sep 2019 08:13:04 GMT):
I did just that. I was just wondering if there was any specific reason for not being serializable.

bestbeforetoday (Wed, 18 Sep 2019 08:29:47 GMT):
The master build is not currently passing due to an issue related to the Node chaincode container. Once that's resolved and we can see verify builds pass we can start merging changes again

SteveKIM (Thu, 19 Sep 2019 04:19:54 GMT):
thanks for your message. I can wait for the problem to be solved. Will my gerrit state change automatically when the node chaincode container problem is solved?

mahoney1 (Thu, 19 Sep 2019 15:23:15 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (5pm UK, 12pm ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Fabric+Application+Developer+Community+Call

dan13 (Thu, 19 Sep 2019 20:33:50 GMT):
why are you not using setInspectResults(true) ? If I understood the question, this worked for us

gauravgiri (Fri, 20 Sep 2019 07:20:45 GMT):
I dockerized a simple spring boot application (fabric-sdk-java) client application. When running this docker application i get the below error for : The docker image is build from openjdk:8-alpine 

gauravgiri (Fri, 20 Sep 2019 07:20:45 GMT):
I dockerized a simple spring boot application (fabric-sdk-java) client application. When running this docker application i get the below error for : The docker image is build from openjdk:8-alpine E 06:50:50 20 [dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.UnsatisfiedLinkError: failed to load the required native library] with root cause java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative] at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:104) ~[netty-common-4.1.32.Final.jar!/:4.1.32.Final] at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) ~[netty-handler-4.1.32.Final.jar!/:4.1.32.Final] at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:93) ~[netty-handler-4.1.32.Final.jar!/:4.1.32.Final] at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:194) ~[grpc-netty-1.17.1.jar!/:1.17.1] at org.hyperledger.fabric.sdk.Endpoint.getSslContextBuilder(Endpoint.java:294) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:254) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Endpoint.createEndpoint(Endpoint.java:487) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Peer.getEndorserClient(Peer.java:248) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:231) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4085) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:858) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1776) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1613) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1107) ~[fabric-sdk-java-1.4.1.jar!/:?] at com.template.webserver.common.fabric.connector.FabricConnector.constructChannel(FabricConnector.java:180) ~[classes!/:?] at com.template.webserver.common.fabric.connector.FabricConnector.query(FabricConnector.java:70) ~[classes!/:?]

gauravgiri (Fri, 20 Sep 2019 07:20:45 GMT):
I dockerized a simple spring boot application (fabric-sdk-java) client application. When running this docker application i get the below error for : The docker image is build from openjdk:8-alpine E 06:50:50 20 [dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.UnsatisfiedLinkError: failed to load the required native library] with root cause java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative] at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:104) ~[netty-common-4.1.32.Final.jar!/:4.1.32.Final] at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) ~[netty-handler-4.1.32.Final.jar!/:4.1.32.Final] at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:93) ~[netty-handler-4.1.32.Final.jar!/:4.1.32.Final] at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:194) ~[grpc-netty-1.17.1.jar!/:1.17.1] at org.hyperledger.fabric.sdk.Endpoint.getSslContextBuilder(Endpoint.java:294) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:254) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Endpoint.createEndpoint(Endpoint.java:487) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Peer.getEndorserClient(Peer.java:248) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:231) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4085) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:858) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1776) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1613) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1107) ~[fabric-sdk-java-1.4.1.jar!/:?] at com.template.webserver.common.fabric.connector.FabricConnector.constructChannel(FabricConnector.java:180) ~[classes!/:?] at com.template.webserver.common.fabric.connector.FabricConnector.query(FabricConnector.java:70) ~[classes!/:?]

gauravgiri (Fri, 20 Sep 2019 07:20:45 GMT):
I dockerized a simple spring boot application (fabric-sdk-java) client application. When running this docker application i get the below error (java.lang.UnsatisfiedLinkError: failed to load the required native library) for : The docker image is build from openjdk:8-alpine E 06:50:50 20 [dispatcherServlet].log - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.UnsatisfiedLinkError: failed to load the required native library] with root cause java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative] at io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:104) ~[netty-common-4.1.32.Final.jar!/:4.1.32.Final] at io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) ~[netty-handler-4.1.32.Final.jar!/:4.1.32.Final] at io.netty.handler.ssl.OpenSsl.(OpenSsl.java:93) ~[netty-handler-4.1.32.Final.jar!/:4.1.32.Final] at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:194) ~[grpc-netty-1.17.1.jar!/:1.17.1] at org.hyperledger.fabric.sdk.Endpoint.getSslContextBuilder(Endpoint.java:294) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Endpoint.(Endpoint.java:254) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Endpoint.createEndpoint(Endpoint.java:487) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Peer.getEndorserClient(Peer.java:248) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Peer.sendProposalAsync(Peer.java:231) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4085) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:858) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:1776) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1613) ~[fabric-sdk-java-1.4.1.jar!/:?] at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1107) ~[fabric-sdk-java-1.4.1.jar!/:?] at com.template.webserver.common.fabric.connector.FabricConnector.constructChannel(FabricConnector.java:180) ~[classes!/:?] at com.template.webserver.common.fabric.connector.FabricConnector.query(FabricConnector.java:70) ~[classes!/:?]

Coada (Fri, 20 Sep 2019 07:38:09 GMT):
I ran into the same problem. The reason is that you are most likely using Alpine as a base for your Docker image - this is a great image because it is small, but the reason it is small is because most things have been removed from it. Netty-related native artifacts are needed for grpc communication. Replace `openjdk:8-jdk-alpine` to `openjdk:8` and you should be good to go :)

gauravgiri (Fri, 20 Sep 2019 07:39:26 GMT):
yes i used opejdk:8-alpine :) let me try

gauravgiri (Fri, 20 Sep 2019 07:39:26 GMT):
yes i used openjdk:8-alpine :) let me try

Coada (Fri, 20 Sep 2019 07:40:16 GMT):
however be aware your Docker image will explode from ~20MB to ~150MB

Coada (Fri, 20 Sep 2019 07:40:16 GMT):
however be aware your Docker image will explode from ~ 20MB to ~ 150MB

Coada (Fri, 20 Sep 2019 07:40:16 GMT):
however be aware your Docker image will explode from >20MB to >150MB

gauravgiri (Fri, 20 Sep 2019 07:40:35 GMT):
ahh ok, let me try, and check. thanks for this suggestion :)

gauravgiri (Fri, 20 Sep 2019 09:35:28 GMT):
thank you it worked :)

dtomczyk (Sat, 21 Sep 2019 11:56:36 GMT):
Has joined the channel.

Purbaja (Mon, 23 Sep 2019 11:50:30 GMT):
Has joined the channel.

jdfigure (Fri, 27 Sep 2019 15:41:13 GMT):
Basic Service Discovery question: when SD discovers a peer, and the peer requires mutual TLS, where/how does SD set the `clientCertBytes` and `clientCertKey` when communicating with the discovered peer? I'm seeing errors in our peers where it looks like SD isn't using a TLS client cert: `TLS handshake failed with error tls: client didn't provide a certificate`

yacovm (Fri, 27 Sep 2019 17:01:10 GMT):
you need to set it in the application @jdfigure

yacovm (Fri, 27 Sep 2019 17:01:22 GMT):
in the SDK configuration

jdfigure (Fri, 27 Sep 2019 18:57:46 GMT):
@yacovm `clientCertBytes` and `clientCertKey` are being set when the app connects to the anchor/discovery peer (let's call it peer-0 in this example) to do discovery. That works fine. During transaction proposal, SD will return discovered peer-1 as an endorser. The issue is peer-1 also uses mutual TLS. When `Peer.sendProposalAsync` executes and sets up `EndorserClient.getEndorserClient()` on peer-1 there is no `clientCertBytes` or `clientKeyBytes` in the Endpoint properties for peer-1. Thus, the transaction proposal fails with TLS handshake error on the peer.

jdfigure (Fri, 27 Sep 2019 18:57:46 GMT):
@yacovm `clientCertBytes` and `clientKeyBytes` are being set when the app connects to the anchor/discovery peer (let's call it peer-0 in this example) to do discovery. That works fine. During transaction proposal, SD will return discovered peer-1 as an endorser. The issue is peer-1 also uses mutual TLS. When `Peer.sendProposalAsync` executes and sets up `EndorserClient.getEndorserClient()` on peer-1 there is no `clientCertBytes` or `clientKeyBytes` in the Endpoint properties for peer-1. Thus, the transaction proposal fails with TLS handshake error on the peer.

duarte.diegod (Fri, 27 Sep 2019 20:57:28 GMT):
Has joined the channel.

duarte.diegod (Fri, 27 Sep 2019 20:58:48 GMT):
hi everyone

duarte.diegod (Fri, 27 Sep 2019 21:01:00 GMT):
I am having an issue using the SDK. I have a custom network and if I use the fabric-cli tool, I can invoke contract. However, if I try to invoke it by the SDK, I'm getting a 'Path does not chain with any of the trust anchors' error. What am I doing wrong?

jdfigure (Sat, 28 Sep 2019 20:42:55 GMT):
thanks @yacovm - I'm using the Java Gateway which wasn't setting the mutual TLS SD props I needed.

EltonSearcy (Mon, 30 Sep 2019 17:07:05 GMT):
Has joined the channel.

mattiabolzonella1 (Tue, 01 Oct 2019 08:13:14 GMT):
There are best practices for managing certificates in the SDK?

bestbeforetoday (Tue, 01 Oct 2019 14:29:18 GMT):
I've tried to capture that issue in a Jira: https://jira.hyperledger.org/browse/FGJ-49 Please add any additional information or corrections needed

bestbeforetoday (Tue, 01 Oct 2019 14:31:48 GMT):
With _fabric-sdk-java_ it is the responsibility of the application to manage identity credentials. _fabric-gateway-java_ has a *Wallet* that is used as a container for client credentials used to connect to Fabric

bestbeforetoday (Tue, 01 Oct 2019 14:33:49 GMT):
Note that I have done some refactoring of the wallet implementation for Node SDK v2.0 (_fabric-sdk-node_), and I plan to make similar changes for v2.0 of _fabric-gateway-java_. They will look very similar from an end user point of view; just the implementation is reworked

bestbeforetoday (Tue, 01 Oct 2019 14:33:49 GMT):
Note that I have done some refactoring of the wallet implementation for Node SDK v2.0 ( _fabric-sdk-node_ ), and I plan to make similar changes for v2.0 of _fabric-gateway-java_. They will look very similar from an end user point of view; just the implementation is reworked

Jelle.Diet (Wed, 02 Oct 2019 10:03:15 GMT):
Is there an example somewhere of how to use the Wallet in the fabric gateway java api?

mattiabolzonella1 (Wed, 02 Oct 2019 10:53:48 GMT):
Thanks for the response but unfortunately I do not use the gateway sdk due to limitation regarding the inspection of transaction response

Jelle.Diet (Wed, 02 Oct 2019 15:17:57 GMT):
Is there any news on when fabric-gateway-java will be released (not snapshot) ?

bestbeforetoday (Wed, 02 Oct 2019 15:18:38 GMT):
It's imminent. We're trying to publish now

Jelle.Diet (Wed, 02 Oct 2019 15:18:55 GMT):
ok great!

andrew-coleman (Wed, 02 Oct 2019 15:39:07 GMT):
Fabric Gateway Java (new programming model) is now released to Maven Central! Add the following to your pom.xml: org.hyperledger.fabric fabric-gateway-java 1.4.0

andrew-coleman (Wed, 02 Oct 2019 15:39:07 GMT):
Fabric Gateway Java (new programming model) is now released to Maven Central! Add the following to your pom.xml: ``` org.hyperledger.fabric fabric-gateway-java 1.4.0 ```

sstone1 (Wed, 02 Oct 2019 15:50:41 GMT):
@mattiabolzonella1 can you expand on that? what exactly are you inspecting?

Jelle.Diet (Thu, 03 Oct 2019 10:02:10 GMT):
For Fabric Gateway, is it recommended to build a new Gateway for every request or save it in the session for each user?

mahoney1 (Thu, 03 Oct 2019 10:46:26 GMT):
reminder that the Fabric Application Developer Community call today is at **3pm** UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

dtomczyk (Thu, 03 Oct 2019 13:12:49 GMT):
Where can I find good example about fabric-gateway-java with service discovery ?

bestbeforetoday (Thu, 03 Oct 2019 13:16:21 GMT):
Keep the Gateway for subsequent transactions by the same user

bestbeforetoday (Thu, 03 Oct 2019 13:47:39 GMT):
From a Gateway perspective, the only thing different with discovery should be setting discovery on with `GatewayBuilder.discovery(true)`. Setting up a Fabric environment that supports discovery is a little more involved but that's nothing specific to the SDK

bestbeforetoday (Thu, 03 Oct 2019 13:49:28 GMT):
There is a connection profile that the _fabric-gateway-java_ integration tests use for testing with discovery here: https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/java/org/hyperledger/fabric/gateway/connection-discovery.json

AbhishekDudhrejia (Fri, 04 Oct 2019 05:30:58 GMT):
Has joined the channel.

mattiabolzonella1 (Fri, 04 Oct 2019 06:35:26 GMT):
@sstone1 I'm refferring to this discussion

mattiabolzonella1 (Fri, 04 Oct 2019 06:36:05 GMT):
https://chat.hyperledger.org/channel/fabric-sdk-java?msg=nfDAGTPNXQGCgueB3 this discussion

dan13 (Fri, 04 Oct 2019 13:02:42 GMT):
@mattiabolzonella1 I have not gone down this path yet, but I have the same need you do. I do see that ContractException has a payload, so perhaps the path is to make sure the chaincode error is raised as ContractException instead of GatewayRuntimeException?

silliman (Fri, 04 Oct 2019 19:30:17 GMT):
Has anybody successfully used the Fabric Java SDK running within a 32-bit JVM to connect to a TLS-enabled orderer or peer?

Jelle.Diet (Mon, 07 Oct 2019 07:12:54 GMT):
Is there a way to get en Enrollment or User (from java sdk) from the gateway Identity object?

Jelle.Diet (Mon, 07 Oct 2019 07:12:54 GMT):
Is there a way to get an Enrollment or User (from java sdk) from the gateway Identity object?

aatkddny (Mon, 07 Oct 2019 15:16:44 GMT):
anyone using the ibm version and moving from 1.0 to 2.0? i have a question about connecting.

aatkddny (Mon, 07 Oct 2019 15:16:44 GMT):
anyone using the ibm version and moved from 1.0 to 2.0? i have a question about connection profiles.

jdfigure (Mon, 07 Oct 2019 15:53:18 GMT):
I'm running into an issue setting Netty options using a network config file. In my network config json file, setting an integer Netty config via `peers.grpcOptions` like `"grpc.NettyChannelBuilderOption.maxInboundMessageSize": 123456` causes `java.lang.NoSuchMethodException: io.grpc.netty.NettyChannelBuilder.maxInboundMessageSize(java.lang.String)` . The `org.hyperledger.fabric.sdk.NetworkConfig#getJsonValue` is converting the integer to its string value. This causes `org.hyperledger.fabric.sdk.Endpoint#addNettyBuilderProps` to fail because it can't find the appropriate method. Probably need a Jira for this?

davidkel (Mon, 07 Oct 2019 16:54:02 GMT):
Have you tried raising a ticket with IBM ?

aatkddny (Mon, 07 Oct 2019 17:19:59 GMT):
have you ever tried to use their support?

Jelle.Diet (Tue, 08 Oct 2019 07:45:39 GMT):
I use the ibm blockchain cloud platform if that's what you mean

bestbeforetoday (Tue, 08 Oct 2019 13:29:57 GMT):
Yes, please raise a Jira against _fabric-sdk-java_ : https://jira.hyperledger.org/projects/FABJ Or push up a fix if you prefer ;)

mauricio (Wed, 09 Oct 2019 02:34:07 GMT):
Has joined the channel.

icordoba (Wed, 09 Oct 2019 08:18:12 GMT):
Hello, can anybody link me to an example of how to update the anchor peers using sdk-java? (Equivalent to "Update the anchor peers" in the BYFN tutorial?

aatkddny (Wed, 09 Oct 2019 12:42:11 GMT):
have you ever added a peer to a channel? if so the process is very similar - you stick the update payload in something like this: ``` public Map addAnchorPeer(String msp, Map config, Map configJson) { Map x = (Map) config.get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Application"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get(msp); Map x5 = (Map) x4.get("values"); Map y = (Map) configJson.get("payload"); Map y1 = (Map) y.get("data"); Map y2 = (Map) y1.get("config_update"); Map y3 = (Map) y2.get("write_set"); Map y4 = (Map) y3.get("groups"); Map y5 = (Map) y4.get("Application"); Map y6 = (Map) y5.get("groups"); Map y7 = (Map) y6.get(msp); Map y8 = (Map) y7.get("values"); Map y9 = (Map) y8.get("AnchorPeers"); x5.put("AnchorPeers", y9); return config; ``` and then write it back. this code will never win an award for elegance - it was a bit of a suck it and see that i never got round to cleaning up, but you should get the idea.

aatkddny (Wed, 09 Oct 2019 12:42:11 GMT):
have you ever added a peer to a channel? if so the process is very similar - you stick the update payload in rather like this, instead of shoving it in `"channel_group">"groups">"Application">"groups"`: ``` public Map addAnchorPeer(String msp, Map config, Map configJson) { Map x = (Map) config.get("channel_group"); Map x1 = (Map) x.get("groups"); Map x2 = (Map) x1.get("Application"); Map x3 = (Map) x2.get("groups"); Map x4 = (Map) x3.get(msp); Map x5 = (Map) x4.get("values"); Map y = (Map) configJson.get("payload"); Map y1 = (Map) y.get("data"); Map y2 = (Map) y1.get("config_update"); Map y3 = (Map) y2.get("write_set"); Map y4 = (Map) y3.get("groups"); Map y5 = (Map) y4.get("Application"); Map y6 = (Map) y5.get("groups"); Map y7 = (Map) y6.get(msp); Map y8 = (Map) y7.get("values"); Map y9 = (Map) y8.get("AnchorPeers"); x5.put("AnchorPeers", y9); return config; ``` and then write it back. this code will never win an award for elegance - it was a bit of a suck it and see that i never got round to cleaning up, but you should get the idea.

dan13 (Thu, 10 Oct 2019 15:28:15 GMT):
@sstone1 any update on above question from @mattiabolzonella1 : "Can i get the invalid response message returned by the chaincode using the gateway SDK?"

bestbeforetoday (Thu, 10 Oct 2019 15:39:01 GMT):
@dan13 On the previous thread you linked I suggested raising a Jira to capture this as a requirement. I don't see any sign of that having happened so I'll raise one now

dan13 (Thu, 10 Oct 2019 15:54:41 GMT):
Ah, thanks -- must've missed that. Much appreciated!

bestbeforetoday (Thu, 10 Oct 2019 15:56:46 GMT):
Here is the Jira I have raised: https://jira.hyperledger.org/browse/FGJ-57 Feel free to comment if I've missed any information. I can't say how soon this is likely to get to the top of my todo list

aatkddny (Fri, 11 Oct 2019 01:21:31 GMT):
The intent with the gateway seems to be to make it a per user connection - which means having a lot more of them cached than the HFClient approach (where it's thread safe and you can swap users as soon as you submit the Tx). Is the Contract you get from the gateway still thread safe or do you need to do a gateway#getnetwork#get contract every time you want to run a Tx in a multithreaded environment? We have some system users that could potentially be running Txs concurrently. Also a suggestion for the Builder. I have a bunch of user ids that already implement User. I could extract the msp and the cert and pk from their Enrollment, so having a builder#identity method allowing me to pass them in would be quite nice. Or better - support passing in a User directly. so I don't have to roll my own Wallet (all our ids are encrypted and stored in a DB - our security team would have conniptions if I said we were storing user identities on the filesystem).

aatkddny (Fri, 11 Oct 2019 01:21:31 GMT):
The intent with the gateway seems to be to make it a per user connection - which means having a lot more of them cached than the HFClient approach (where it's thread safe and you can swap users as soon as you submit the Tx). Is the Contract you get from the gateway still thread safe or do you need to do a gateway#getnetwork#get contract every time you want to run a Tx in a multithreaded environment? We have some system users that could potentially be running Txs concurrently. Also a suggestion for the Builder. I have a bunch of user ids that already implement User. I could extract the msp and the cert and pk from their Enrollment, so having a builder#identity method allowing me to pass them in would be quite nice. Or better - support passing in a User directly. Then I don't have to roll my own Wallet (all our ids are encrypted and stored in a DB - our security team would have conniptions if I said we were storing user identities on the filesystem).

vtech (Fri, 11 Oct 2019 07:39:19 GMT):
hsm

Jelle.Diet (Fri, 11 Oct 2019 07:44:18 GMT):
It is possible to create an identity from an Enrollment if that's what you mean, like so : Identity identity = Wallet.Identity.createIdentity("Org1MSP", enrollment.getCert(), enrollment.getKey());

aatkddny (Fri, 11 Oct 2019 12:13:38 GMT):
That's fairly obvious. But unless you want to stick the then created identities into a wallet on your file system (or in memory) you still need to have a way to pass them into Gateway#Builder#Identity - all the methods there seem to require a wallet. In this case accepting the User as an alternative would - imnsho - help with integrating identities that have followed the User pattern. Or if the desire is to pretend none of that ever happened, just accepting an Identity without requiring the wallet, requiring that the implementing code build it would perform the same function. Either works. It's not a ton of code to write something that'll act as a wallet against a DB of User objects, but then you (one) are at the mercy of keeping up with whatever the next shiny thing is.

aatkddny (Fri, 11 Oct 2019 12:13:38 GMT):
That's fairly obvious. But unless you want to stick the then created identities into a wallet on your file system (or in memory) you still need to have a way to pass them into Gateway#Builder#Identity - all the methods there seem to require a wallet. Creating an in memory one just for this is a hack imo. In this case accepting the User as an alternative would - imnsho - help with integrating identities that have followed the User pattern. Or if the desire is to pretend none of that ever happened, just accepting an Identity without requiring the wallet, requiring that the implementing code build it would perform the same function. Either works. It's not a ton of code to write something that'll act as a wallet against a DB of User objects, but then you (one) are at the mercy of keeping up with whatever the next shiny thing is.

bestbeforetoday (Fri, 11 Oct 2019 13:20:30 GMT):
@aatkddny The design is that a gateway represents a single users connection. It might be possible for us optimise the internals so low-level resources are shared between Gateway instances but this does not happen today and is not something I expect to happen near-term.

bestbeforetoday (Fri, 11 Oct 2019 13:20:39 GMT):
You should be able to safely call `create/submit/evaluateTransaction()` concurrently so no need to keep calling `Gateway.getNetwork().getContract()`

bestbeforetoday (Fri, 11 Oct 2019 13:22:26 GMT):
I am planning on refactoring the wallet implementation for 2.0 in-line with the refactoring I've already done in _master_ branch of the Node SDK. Right now the objective is just equivalence with the way wallets and identities are used today. So your options would be to use an in-memory wallet and populate the content with externally stored identity information, or to write a `WalletStore` implementation that acts as an adapter to wherever your identity information is held. The refactor of wallets makes this much easier and more robust that before but does mean you have to deal with the identity persistent format, which might not be ideal for you

bestbeforetoday (Fri, 11 Oct 2019 13:23:46 GMT):
Being able to just supply an identity yourself without using a wallet sounds like a reasonable feature request. Could you raise a _Story_ to capture this in Jira? https://jira.hyperledger.org/projects/FGJ

aatkddny (Fri, 11 Oct 2019 13:27:25 GMT):
It appears - since I was trying it this am and have trace enabled - that the gateway is just a wrapper around the NetworkConfig/HFClient stuff I'm using anyway rather than something completely new. Until I have time to figure out where the ClassCast error I'm getting is coming from with the config I generate (somewhere in the certs) I'll leave it alone. I already wrote an implementation that does pretty what you said above to wrap my user service with an in memory wallet. It's not exactly rocket science, but the maintenance when something else new and shiny comes along is my concern. I'll add a jira. Thx.

aatkddny (Fri, 11 Oct 2019 13:41:30 GMT):
Also ``The design is that a gateway represents a single users connection. It might be possible for us optimise the internals so low-level resources are shared between Gateway instances but this does not happen today and is not something I expect to happen near-term.`` I'm talking about a single user identity - created for system processes - that may be running concurrently in multiple threads. So in this case (probably) the Network instance needs to be able to support multithreading, unless it creates a new HFClient under the covers for every Contract (which won't scale well). The HFClient (sort of) will multithread in that once you send the Tx, you can reuse it so you don't need to serialize for very long. Something that properly serializes this access internally would be helpful here.

aatkddny (Fri, 11 Oct 2019 13:41:30 GMT):
Also ``The design is that a gateway represents a single users connection. It might be possible for us optimise the internals so low-level resources are shared between Gateway instances but this does not happen today and is not something I expect to happen near-term.`` I'm talking about a single user identity - created for system processes - that may be running concurrently in multiple threads. So in this case (probably) the Network instance needs to be able to support multithreading, unless it creates a new HFClient under the covers for every Contract (which may not scale well because creating one of those seems to take a while longer than I'd like). The HFClient (sort of) will multithread in that once you send the Tx, you can reuse it so you don't need to serialize for very long. Something that properly serializes this access internally would be helpful here.

aatkddny (Fri, 11 Oct 2019 13:57:12 GMT):
@bestbeforetoday one final thing... My class cast issue above is the same thing I had to put a fix into my own code for. This comment covers it: ```* There's an issue with the way client certificates are passed. The JSON Object writers won't allow you to put a byte[] in as a value. This means the client certificate bytes need to be translated from the string representations and injected into the properties objects before you can use them. ``` Before I go digging into the code, do you remember how you are getting round this with the inputstream?

aatkddny (Fri, 11 Oct 2019 13:57:12 GMT):
@bestbeforetoday one final thing... My class cast issue above is the same thing I had to put a fix into my own code for. This comment covers it: ```* There's an issue with the way client certificates are passed. The JSON Object writers won't allow you to put a byte[] in as a value. This means the client certificate bytes need to be translated from the string representations and injected into the properties objects before you can use them. The SDK does this for PEM string, but not for these. ``` Before I go digging into the code, do you remember how you are getting round this with the inputstream?

aatkddny (Fri, 11 Oct 2019 13:57:12 GMT):
@bestbeforetoday one final thing... My class cast issue above is the same thing I had to put a fix into my own code for (FABJ-468). This comment covers it: ```* There's an issue with the way client certificates are passed. The JSON Object writers won't allow you to put a byte[] in as a value. This means the client certificate bytes need to be translated from the string representations and injected into the properties objects before you can use them. The SDK does this for PEM string, but not for these. ``` Before I go digging into the code, do you remember how you are getting round this with the inputstream?

aatkddny (Fri, 11 Oct 2019 18:25:15 GMT):
Addendums: You aren't. You have the same issue. If anyone else has this network config issue but wants to use the Gateway this'll fix you up. I was looking for a way in for a while before I remembered to use reflection... ``` GatewayImpl.Builder builder = (Builder) Gateway.createBuilder().identity(wallet, "id"); Field ccpField = builder.getClass().getDeclaredField("ccp"); ccpField.setAccessible(true); ccpField.set(builder, myNetworkConfig); ```

aatkddny (Fri, 11 Oct 2019 18:25:15 GMT):
Addendums: You aren't. You have the same issue. If anyone else has this network config issue but wants to use the Gateway this'll fix you up. I was looking for a way in for a while before I remembered to use reflection... ``` GatewayImpl.Builder builder = (Builder) Gateway.createBuilder().identity(wallet, "id"); Field ccpField = builder.getClass().getDeclaredField("ccp"); ccpField.setAccessible(true); ccpField.set(builder, myNetworkConfig); ```

aatkddny (Fri, 11 Oct 2019 18:25:15 GMT):
Addendum: You aren't. You have the same issue with the certs. If anyone else has this network config issue but wants to use the Gateway this'll fix you up. I was looking for a way in for a while before I remembered to use reflection... ``` GatewayImpl.Builder builder = (Builder) Gateway.createBuilder().identity(wallet, "id"); Field ccpField = builder.getClass().getDeclaredField("ccp"); ccpField.setAccessible(true); ccpField.set(builder, myNetworkConfig); ... do the connect and follow the example ```

aatkddny (Fri, 11 Oct 2019 18:25:15 GMT):
Addendum: You aren't. You have the same issue with the certs. If anyone else has this network config issue but wants to use the Gateway with a NetworkConfig in hand this'll fix you up. I was looking for a way in for a while before I remembered to use reflection... ``` GatewayImpl.Builder builder = (Builder) Gateway.createBuilder().identity(wallet, "id"); Field ccpField = builder.getClass().getDeclaredField("ccp"); ccpField.setAccessible(true); ccpField.set(builder, myNetworkConfig); ... do the connect and follow the example ```

dan13 (Fri, 11 Oct 2019 18:27:18 GMT):
Can you clarify the multithreading issue(s) with fabric-sdk-java HFClient? Under what conditions or how used you see threads conflicting?

aatkddny (Fri, 11 Oct 2019 18:41:54 GMT):
This might be a bit involved. I'll try not to make it too tl;dr Consider a single-threaded application where you have a single HFClient - hfc - and two Users - U1 and U2 You are already connected to the channel. To run a Tx you can stick U1 in hfc and off you go. You can then stick U2 in hfc and the same applies. You are free to run a Tx. Now same actors but multithreaded. U1 in thread1, U2 in thread2. If they are concurrent you can collide - swapping U2 for U1 while U1 is halfway through a Tx isn't going to do what you think it should do. So you would think you'd serialize the client for the entire Tx. Well not exactly. It turns out that you don't need to do it for the entire Tx. Just up until it ships it off. You DO need to serialize under these conditions though to avoid collisions. I'd need to dig back into the code - or the find the conversation with Rick on here about this some time ago - to find the exact spot. It's around one of the GRPC proto calls. So drifting back to my question here which is only tangentially related. I have a gateway for U1. Which gets a network. Which gets a contract. If am running multithreaded and U1 could in theory run transactions in more than one thread at the same time, what's the serialization strategy for reuse? Do I need to get a network in each thread, or a contract in each thread or can it be synchronized in the gateway code itself?

aatkddny (Fri, 11 Oct 2019 18:41:54 GMT):
@dan13 This might be a bit involved. I'll try not to make it too tl;dr Consider a single-threaded application where you have a single HFClient - hfc - and two Users - U1 and U2 You are already connected to the channel. To run a Tx you can stick U1 in hfc and off you go. You can then stick U2 in hfc and the same applies. You are free to run a Tx. Now same actors but multithreaded. U1 in thread1, U2 in thread2. If they are concurrent you can collide - swapping U2 for U1 while U1 is halfway through a Tx isn't going to do what you think it should do. So you would think you'd serialize the client for the entire Tx. Well not exactly. It turns out that you don't need to do it for the entire Tx. Just up until it ships it off. You DO need to serialize under these conditions though to avoid collisions. I'd need to dig back into the code - or the find the conversation with Rick on here about this some time ago - to find the exact spot. It's around one of the GRPC proto calls. So drifting back to my question here which is only tangentially related. I have a gateway for U1. Which gets a network. Which gets a contract. If am running multithreaded and U1 could in theory run transactions in more than one thread at the same time, what's the serialization strategy for reuse? Do I need to get a network in each thread, or a contract in each thread or can it be synchronized in the gateway code itself?

dan13 (Fri, 11 Oct 2019 19:13:20 GMT):
Thank you -- that was very cogently and concisely stated. I *hope* the answer to your last question is Contract (at worst). With respect to hfc, in my current situation I maintain an hfc instance per user (these are system-type users and only a few, all connected at service startup), so I'm never setting/switching the user. Seems like I avoided the multithread-user-switch issue, unless there are other problems with reusing hfc without user switch? I'll search for your previous conversation here! Thanks!

dan13 (Fri, 11 Oct 2019 19:13:20 GMT):
@aatkddny Thank you -- that was very cogently and concisely stated. I *hope* the answer to your last question is Contract (at worst). With respect to hfc, in my current situation I maintain an hfc instance per user (these are system-type users and only a few, all connected at service startup), so I'm never setting/switching the user. Seems like I avoided the multithread-user-switch issue, unless there are other problems with reusing hfc without user switch? I'll search for your previous conversation here! Thanks!

karthikspb (Mon, 14 Oct 2019 06:32:17 GMT):
Has joined the channel.

karthikspb (Mon, 14 Oct 2019 06:40:49 GMT):
Java chaincode cannot be deployed and instantiated through fabric sdk java

Jelle.Diet (Mon, 14 Oct 2019 07:53:01 GMT):
In my application I set the User on the TransactionProposalRequest itself, not switching the HFC User. Does this also avoidthe multithread issue?

HofmT (Mon, 14 Oct 2019 15:20:28 GMT):
Hi community, I'm also facing an issue when instantiating java chaincode through the fabric java SDK. I'm able to install the chaincode but I keep failing at instantiating it via the java SDK. When sending the installProposalRequest it always returns "Undefined contract method called". I have definitely no typo in the name. On top of that, I'm even able to instantiate it via the 'peer chaincode instantiate' command. It's just the SDK that is causing troubles. I thought it might be related to the fact that I'm using the annotation chaincode style which you can also find in the FabCar sample chaincode here: https://github.com/hyperledger/fabric-samples/tree/release-1.4/fabcar/java Other than that I'm using container version 1.4.3 and SDK version release 1.4 I appreciate your help. Please let me know if you need any further information. Thanks!

diego_ (Mon, 14 Oct 2019 17:08:27 GMT):
Has joined the channel.

bestbeforetoday (Tue, 15 Oct 2019 08:29:08 GMT):
You can use a single Contract instance to send multiple transactions concurrently. It is thread-safe. A new client is not created every time

bestbeforetoday (Tue, 15 Oct 2019 08:33:02 GMT):
I replied in another thread but... you can use a single Contract instance to invoke multiple transactions concurrently. The concurrency issue you might face is at the blockchain level if multiple in-flight transactions have overlapping read/write sets (i.e. they manipulate the same data keys). This will result in a failure but is nothing to do with the thread safety of the client API

aatkddny (Tue, 15 Oct 2019 13:08:32 GMT):
Has anyone got the Contract#addContractListener() stuff to work in a real environment? I'm having a problem where my contract listener isn't getting invoked - no matter which of the flavors I use. Even something as simple as the ripped off `stubContractListener` from the test examples never seems to get called. My GatewayImpl is cached - so I can see it just fine. I can follow the flow through to `Listeners.transactionFromContract(Consumer listener)` and I can see my stubbed consumer in the transaction event, but it's just never getting back to the accept method therein. My visibility inside eclipse is - shall we say - limited when it comes to lambdas. I've wasted a couple of hours on this now and its driving me nuts, which is why I'm asking if anyone has this working. At least then I'll be sure its something I messed up...

bestbeforetoday (Tue, 15 Oct 2019 13:34:02 GMT):
The scenario tests exercise the contract listeners in a real Fabric environment, and I've used it myself for demo purposes too, so it does work. The one thing to check is that you have peers marked with the _eventSource_ role as it's only those peers that the (low-level) SDK will connect to for receiving events.

aatkddny (Tue, 15 Oct 2019 13:40:48 GMT):
I can see the peers throwing block events. `Sending block event 'Channel everything-channel eventqueue got block event with block number: 32 for channel: everything-channel, from Peer{` As I said I can trace the thing into the Listeners class where it ends up in here: `Consumer transactionFromContract(Consumer listener)` and falls through to the `.forEach` in there. There has to be something strange with my Consumer. I'll look at it some more. Thx for the response.

bestbeforetoday (Tue, 15 Oct 2019 13:46:17 GMT):
In case it helps, from my demo code: ``` // Listen for block events. network.addBlockListener(this::acceptBlockEvent); // Listen for contract events. contract.addContractListener(this::acceptContractEvent); ``` ``` private void acceptBlockEvent(BlockEvent event) { long blockNumber = event.getBlockNumber(); System.out.println("Received block number " + blockNumber); } private void acceptContractEvent(ContractEvent event) { String message = String.format("Received contract event named %s with %s", event.getName(), getPayloadString(event.getPayload())); System.out.println(message); } private String getPayloadString(Optional payload) { return payload.map(bytes -> "payload: " + new String(bytes, StandardCharsets.UTF_8)) .orElse("no payload"); } ```

bestbeforetoday (Tue, 15 Oct 2019 13:47:35 GMT):
And the connection profile contains: ``` "channels": { "mychannel": { "orderers": [ "orderer.example.com" ], "peers": { "peer0.org1.example.com": { "endorsingPeer": true, "chaincodeQuery": true, "ledgerQuery": true, "eventSource": true } } } }, ```

bestbeforetoday (Tue, 15 Oct 2019 13:50:59 GMT):
Also, if you are receiving the block event OK, are you definitely emitting an event from the chaincode? From my (Node.js) demo chaincode: ``` async createCar(ctx, carNumber, make, model, color, owner) { ctx.stub.setEvent('createCar', Buffer.from(carNumber)); console.info('============= END : Create Car ==========='); } ```

bestbeforetoday (Tue, 15 Oct 2019 13:50:59 GMT):
Also, if you are receiving the block event OK, are you definitely emitting an event from the chaincode? From my (Node.js) demo chaincode: ``` async createCar(ctx, carNumber, make, model, color, owner) { ctx.stub.setEvent('createCar', Buffer.from(carNumber)); } ```

aatkddny (Tue, 15 Oct 2019 13:58:28 GMT):
I'm not getting the block either.

aatkddny (Tue, 15 Oct 2019 13:58:28 GMT):
I'm not getting the block either. Code is trivial - ``` Gateway gateway = cache.gateway(org, user); Network network = gateway.getNetwork(channel); Consumer cb = event -> { System.out.println("BLOCK_EVENT"); }; String path = "/tmp/checkpoint-" + Long.toString(System.currentTimeMillis()); Checkpointer cp = new FileCheckpointer(Paths.get(path)); network.addBlockListener(cp, cb); ```

aatkddny (Tue, 15 Oct 2019 14:00:56 GMT):
Cache is a cache of GatewayImpls by id.

bestbeforetoday (Tue, 15 Oct 2019 14:58:08 GMT):
One side note... if you are creating a new checkpoint file every time and not re-connecting to the file used previously, the checkpointing is really doing nothing for you so you should just add a block listener without checkpointer

aatkddny (Tue, 15 Oct 2019 14:59:51 GMT):
This was a test to see if checkpointing replayed what I missed.

bestbeforetoday (Tue, 15 Oct 2019 14:59:52 GMT):
If the peer is committing blocks but you are not receiving block events at your client, check the peer has the _eventSource_ role. You could try something like: ```network.getChannel().getPeers(EnumSet.of(Peer.PeerRole.EVENT_SOURCE)) ```

aatkddny (Tue, 15 Oct 2019 15:01:57 GMT):
I'm getting the blocks now. I'm not too bright - chaincode that doesn't throw events doesn't get called - :( I was hoping to use the checkpoint to replay everything that was missed for *this* listener. That would remove a ton of code in my app, and this was a test to see if it did just that.

aatkddny (Tue, 15 Oct 2019 15:01:57 GMT):
I'm getting the blocks now. I'm not too bright - chaincode that doesn't throw events doesn't get the eventing functions called - :( I was hoping to use the checkpoint as a crutch to replay everything that was missed for *this* listener. That would remove a ton of code in my app, and this was a test to see if it did just that.

aatkddny (Tue, 15 Oct 2019 15:01:57 GMT):
I'm getting the blocks now. I'm not too bright - chaincode that doesn't throw events doesn't get the eventing functions called - :( I was hoping to use the checkpoint as a crutch to replay everything that was missed for *this* listener. That would remove a ton of code in my app, and this was a test to see if it did just that. I could then rely on my stuff to be eventually consistent regardless of state, which would have been a rather nice bonus for me.

bestbeforetoday (Tue, 15 Oct 2019 15:06:36 GMT):
That is exactly what checkpointing is designed to do. You just need to make sure a given listener is using the same checkpointer. So if you are using a file to store checkpoint information (file checkpointer), your listener needs to connect to the same file every time it is started up. Something like: ```Checkpointer checkpointer = DefaultCheckpointers.file(Paths.get("contractcheckpoint.json"); contract.addContractListener(checkpointer, this::acceptContractEvent); ```

bestbeforetoday (Tue, 15 Oct 2019 15:06:36 GMT):
That is exactly what checkpointing is designed to do. You just need to make sure a given listener is using the same checkpointer. So if you are using a file to store checkpoint information (file checkpointer), your listener needs to connect to the same file every time it is started up. Something like: ```Checkpointer checkpointer = DefaultCheckpointers.file(Paths.get("contractcheckpoint.json")); contract.addContractListener(checkpointer, this::acceptContractEvent); ```

bestbeforetoday (Tue, 15 Oct 2019 15:07:41 GMT):
The very first time that listener is added, the checkpoint file will not exist and so the listener will start listening from the current point in time

bestbeforetoday (Tue, 15 Oct 2019 15:08:04 GMT):
As soon as any block events are received, they will be recorded in the checkpoint file

bestbeforetoday (Tue, 15 Oct 2019 15:08:33 GMT):
If you take your client off-line and restart it again later, re-attaching to the same checkpoint file, the listener will start receiving events from where it left off

aatkddny (Tue, 15 Oct 2019 15:08:37 GMT):
Then wouldn't I expect to get all the blocks for this listener if the checkpointer is new. Because right now I'm not getting anything until I do an update. I understand I need the same one - and I have a different thing than a file in mind for it. As I said this was a test.

aatkddny (Tue, 15 Oct 2019 15:08:37 GMT):
Then wouldn't I expect to get all the blocks - from block 0 - for this listener if the checkpointer is new. Because right now I'm not getting anything until I do an update. I understand I need the same one - and I have a different thing than a file in mind for it. As I said this was a test.

aatkddny (Tue, 15 Oct 2019 15:08:37 GMT):
Then wouldn't I expect to get all the blocks - from block 0 - for this listener if the checkpointer is new. Because right now I'm not getting anything until I do an update. I understand I need the same checkpointer to actually use this - and I have a different thing than a file in mind for it. As I said this was a test.

bestbeforetoday (Tue, 15 Oct 2019 15:10:24 GMT):
If you just want to play from block 0 then you could attach a listener as `contract.addContractListener(0, this::acceptContractEvent)`

aatkddny (Tue, 15 Oct 2019 15:12:35 GMT):
I don't. I want to have a real ongoing checkpointed set of blocks for trailing aggregations. But when I attach a listener - any listener - to a channel I want it to start from 0 if this is a new checkpointer. So it streams everything from 0->current once and once only to allow me to recreate and maintain the state at any point for any purpose.

aatkddny (Tue, 15 Oct 2019 15:12:35 GMT):
I don't. I want to have a real ongoing checkpointed set of blocks for trailing aggregations. But when I attach a listener - any listener - to a channel I want it to start from 0 if this is a new checkpointer. So it streams everything from 0->current once and once only *and keeps going* to allow me to recreate and maintain the state at any point for any purpose.

bestbeforetoday (Tue, 15 Oct 2019 15:14:47 GMT):
You should be able to do that with something like this: ``` Checkpointer checkpointer = DefaultCheckpointers.file(Paths.get("contractcheckpoint.json"); if (checkpointer.getBlockNumber() == Checkpointer.UNSET_BLOCK_NUMBER) { checkpointer.setBlockNumber(0); } contract.addContractListener(checkpointer, this::acceptContractEvent); ```

bestbeforetoday (Tue, 15 Oct 2019 15:14:47 GMT):
You should be able to do that with something like this: ``` Checkpointer checkpointer = DefaultCheckpointers.file(Paths.get("contractcheckpoint.json")); if (checkpointer.getBlockNumber() == Checkpointer.UNSET_BLOCK_NUMBER) { checkpointer.setBlockNumber(0); } contract.addContractListener(checkpointer, this::acceptContractEvent); ```

aatkddny (Tue, 15 Oct 2019 15:15:26 GMT):
So unset_block is latest and 0 is from start. Got it. Thx.

aatkddny (Tue, 15 Oct 2019 15:15:59 GMT):
Appreciate the help.

bestbeforetoday (Tue, 15 Oct 2019 15:16:05 GMT):
You're welcome! :)

bestbeforetoday (Tue, 15 Oct 2019 15:18:29 GMT):
You got it, the `UNSET_BLOCK_NUMBER` means this checkpointer has not yet seen any blocks. And the behaviour for checkpoint listening when no previous blocks have been seen is to start at the current block

biligunb (Wed, 16 Oct 2019 03:11:33 GMT):
Has joined the channel.

biligunb (Wed, 16 Oct 2019 03:11:35 GMT):
1 simple question Which one is faster? 1. Java SDK 2. Node SDK

gunso (Wed, 16 Oct 2019 10:10:57 GMT):
Has joined the channel.

gunso (Wed, 16 Oct 2019 10:16:36 GMT):
Hi, we think using fabric-gateway-java instead of fabric-sdk-java for our client in production environment. Is fabric-gateway-java stable?

bestbeforetoday (Wed, 16 Oct 2019 13:05:29 GMT):
Yes, it is at release version 1.4 now. The API will stay stable in the 1.4 branch

aatkddny (Wed, 16 Oct 2019 15:26:20 GMT):
Yeah - we see that fairly often in eventing - if the event dispatches another Tx that read assets in the original Tx. Function of the design, but it's a shame - or at least our devs think it's a shame - you can't flag that you don't care about reads in the RW TxSet somehow. :D

aatkddny (Wed, 16 Oct 2019 15:26:20 GMT):
Yeah - we see that fairly often in eventing - if the event dispatches another Tx that read assets in the original Tx. Function of the design, but it's a shame - or at least our devs think it's a shame - you (one) can't flag that you don't care about reads in the RW TxSet somehow. :D

gunso (Thu, 17 Oct 2019 00:40:26 GMT):
Got it. Thank you!

mahoney1 (Thu, 17 Oct 2019 09:04:40 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

gunso (Thu, 17 Oct 2019 09:16:08 GMT):
Hello again, sorry for a lot of questions. Is it possible to execute chaincode extending ChaincodeBase (not implementing ContractInterface) from fabric-java-gateway's API? I can find sample code using ContractInterface but not ChaincodeBase..

aatkddny (Thu, 17 Oct 2019 13:52:19 GMT):
It's org.hyperledger.fabric.sdktest.ProposalWaitTime to fix query timeouts, right? I should remember this by now...

aatkddny (Thu, 17 Oct 2019 13:52:19 GMT):
It's `org.hyperledger.fabric.sdktest.ProposalWaitTime` to fix query timeouts, right? I should remember this by now...

dan13 (Thu, 17 Oct 2019 14:49:43 GMT):
It was previously stated here that "the high level [gateway] is built on top of the low level. so you can use the low level SDK to call a high level smart contract (assuming you know what args to pass in), and the high level [gateway] SDK to call a low level smart contract (Invoke will just get called)". I have no personally tested this yet.

gunso (Fri, 18 Oct 2019 00:12:28 GMT):
Got it. Thank you for reply!

SamYuan1990 (Fri, 18 Oct 2019 07:27:11 GMT):
Has joined the channel.

SamYuan1990 (Fri, 18 Oct 2019 07:30:09 GMT):
Hi Guys, I am try with IdeMix feature with BYFN and I am confusing now. I am going to verify the IdeMix via golang cid interface in my chaincode. And I am create my user as idemixUser.setIdemixEnrollment(ca.idemixEnroll(idemixUser.getEnrollment(), mspID)); in End2endIdemixIT.java , however, my peer node reports error msg as MSP error: could not decode the PEM structure, and my client reports exception as description=access denied

SamYuan1990 (Fri, 18 Oct 2019 07:31:52 GMT):
can anyone help correct me about may I able to use a user with enrollment by (ca.idemixEnroll) directly to send transaction to fabric network? if not, what else should I do for make it working.

bestbeforetoday (Fri, 18 Oct 2019 12:06:56 GMT):
The integration tests for _fabric-gateway-java_ use both a Contract-based and a plain chaincode implementation to test against. You get hold of a plain chaincode by calling `network.getContract(chaincodeId)`. If you only have a single (default) smart contract in a chaincode container then you do the same to interact with a Contract. If you have multiple (namespaced) smart contracts in a chaincode container then you get hold of them using `network.getContract(chaincodeId, contractName)`. Other than that you use them identically from the client side.

gunso (Sat, 19 Oct 2019 12:49:26 GMT):
So, the test is done. Got it. Thanks!

justformorefun (Mon, 21 Oct 2019 06:29:29 GMT):
Has joined the channel.

justformorefun (Mon, 21 Oct 2019 06:29:30 GMT):
hi, guys. I came across error when I create channel using java sdk. The detailed error is following:org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel, send transaction failed on orderer OrdererClient{id: 4, channel: mychannel, name: orderer.example.com, url: grpc://localhost:7050}. Reason: Channel mychannel orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during orderer next at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:236) at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:161) at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:531) at org.hyperledger.fabric.sdk.Channel.(Channel.java:247) at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:340) at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:222) at org.jdjr.network.CreateChannel.main(CreateChannel.java:77) Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during orderer next at org.hyperledger.fabric.sdk.OrdererClient$1.onNext(OrdererClient.java:182) at org.hyperledger.fabric.sdk.OrdererClient$1.onNext(OrdererClient.java:174) at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:421) at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:519) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748). anyone here who knows the why? please help me. thanks.

justformorefun (Mon, 21 Oct 2019 06:37:41 GMT):
Another question: how to run single integration test case in fabric-java-sdk's repo? any commands available there? I look for mvn failsafe:integration-test -DskipITs=false, but it is for all integration test. Now I wanna to only run End2endIdemixIT.java integration test. Any replies will be thankful.

aatkddny (Mon, 21 Oct 2019 13:46:43 GMT):
Anyone use the Gateway code with IBP2? There seems to be a mismatch between the provided connection profile and the code in Identity#createIdentity. Specifically parser.readObject() is returning null. Yeah yeah - write my own implementation. I know...

medikent (Tue, 22 Oct 2019 04:41:10 GMT):
Are you able to invoke a chaincode method through the Java SDK?

medikent (Tue, 22 Oct 2019 04:42:17 GMT):
Did you find a solution to this? I haven't tried this myself yet.

medikent (Tue, 22 Oct 2019 04:44:23 GMT):
Have you written something that acts as a wallet against a DB of user objects? I am doing just that now and am looking for a good example.

medikent (Tue, 22 Oct 2019 04:46:50 GMT):
Do you know of a simple example that uses Spring Boot of an app that creates Fabric users and connects to Fabric with those newly created users?

medikent (Tue, 22 Oct 2019 04:52:02 GMT):
What are some possible causes for getting a gRPC *access denied* failure when getting the ConfigBlock? I am using a newly generated fabric identity to invoke a chaincode function on a channel. Do I need to create a user with access to a given channel? Below is my stack trace: ``` org.hyperledger.fabric.sdk.exception.ProposalException: org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel alexchannel failed with peer alex.example.org. Status FAILURE, details: Channel Channel{id: 4, name: alexchannel} Sending proposal with transaction: c88ec73a833a8a8e026e4f03090e058c44b9efec15873470ddd9e8dc2e22cdcc to Peer{ id: 1, name: alex.example.org, channelName: alexchannel, url: grpc://alex.example.org:8051} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [alexchannel] creator org [AlexMSP], cause=null} ```

justformorefun (Tue, 22 Oct 2019 06:39:35 GMT):
hi, everyone. should client side still use the private key in keystore directory for signing tx when trying idemix feature?

justformorefun (Tue, 22 Oct 2019 06:40:33 GMT):
yes but no idemix feature available

justformorefun (Tue, 22 Oct 2019 06:41:21 GMT):
@medikent

mattiabolzonella1 (Tue, 22 Oct 2019 08:58:07 GMT):
Hi, where couchDb indexes need to be placed inside the chaincode maven project?

medikent (Tue, 22 Oct 2019 14:43:42 GMT):
That's great. I am currently struggling to do invocation with the Java SDK. Do you know of a good example I could look at?

medikent (Tue, 22 Oct 2019 14:44:12 GMT):
Also, what functionality does Idemix give you?

justformorefun (Tue, 22 Oct 2019 15:30:42 GMT):
you can try https://github.com/IBM/blockchain-application-using-fabric-java-sdk

justformorefun (Tue, 22 Oct 2019 15:31:02 GMT):
but it does not support idemix

justformorefun (Tue, 22 Oct 2019 15:31:10 GMT):
good luch

justformorefun (Tue, 22 Oct 2019 15:31:15 GMT):
good luck

justformorefun (Tue, 22 Oct 2019 15:35:55 GMT):
hi, anyone here who know how to generate IssuerPublicKey ,IssuerRevocationPublicKey for org3.example.com and org4.example.com, these two org are idemix msp.

Bavaji (Tue, 22 Oct 2019 16:27:14 GMT):
Has joined the channel.

alecjones (Tue, 22 Oct 2019 18:58:32 GMT):
Has joined the channel.

alecjones (Tue, 22 Oct 2019 19:01:49 GMT):
Hello guys. I was trying to run the fabric java SDK from this repository (https://github.com/hyperledger/fabric-samples) but I get SSL error. Please check the attached error logs

alecjones (Tue, 22 Oct 2019 19:02:27 GMT):

logs.txt

nitishbhardwaj19 (Wed, 23 Oct 2019 07:31:52 GMT):
Hi @rickr, @bestbeforetoday I am trying to create a docker image for my java-sdk app. The app works great end-to-end when I tested in intellij. But, as soon I ran it as a docker container, I get a weird grpc connect exceptions when I try to join peers. Logs:

nitishbhardwaj19 (Wed, 23 Oct 2019 07:31:52 GMT):
Hi @rickr, @bestbeforetoday I am trying to create a docker image for my java-sdk app. The app works great end-to-end when I tested in intellij. But, as soon I ran it as a docker container, I get a weird grpc connect exceptions when I try to join peers. Logs:``` Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: peer1.org1.example.com/172.18.0.12:7056 ``` ``` I am able to enroll Users with CA and create a new channel ```

nitishbhardwaj19 (Wed, 23 Oct 2019 07:31:52 GMT):
Hi @rickr, @bestbeforetoday I am trying to create a docker image for my java-sdk app. The app works great end-to-end when I tested in intellij. But, as soon I ran it as a docker container, I get a weird grpc connect exceptions when I try to join peers. Base image for docker container is: openjdk:8. Logs:``` Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: peer1.org1.example.com/172.18.0.12:7056 ``` ``` I am able to enroll Users with CA and create a new channel ```

nitishbhardwaj19 (Wed, 23 Oct 2019 07:33:19 GMT):

logs.txt

alecjones (Wed, 23 Oct 2019 09:44:30 GMT):
```asd```

alecjones (Wed, 23 Oct 2019 09:46:10 GMT):
Hello guys. I get an error when invoking chaincode from this tutorial - https://github.com/IBM/blockchain-application-using-fabric-java-sdk. ```Oct 23, 2019 4:57:45 PM org.example.util.Util deleteDirectory INFO: Deleting - admin.ser Oct 23, 2019 4:57:45 PM org.example.util.Util deleteDirectory INFO: Deleting - org1 Oct 23, 2019 4:57:45 PM org.example.util.Util deleteDirectory INFO: Deleting - users log4j:WARN No appenders could be found for logger (org.hyperledger.fabric.sdk.helper.Config). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Oct 23, 2019 4:57:47 PM org.example.client.CAClient enrollAdminUser INFO: CA -http://localhost:7054 Enrolled Admin. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/D:/WORKSPACE/SKIOS/blockchain-tutorial/blockchain-application-using-fabric-java-sdk-master/network_resources/blockchain-client.jar) to field java.nio.Buffer.address WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Oct 23, 2019 4:57:49 PM org.example.client.ChannelClient sendTransactionProposal INFO: Sending transaction proposal on channel mychannel org.hyperledger.fabric.sdk.exception.InvalidArgumentException: Proposal response is invalid. at org.hyperledger.fabric.sdk.ProposalResponse.getChaincodeActionResponsePayload(ProposalResponse.java:272) at org.example.client.ChannelClient.sendTransactionProposal(ChannelClient.java:121) at org.example.chaincode.invocation.InvokeChaincode.main(InvokeChaincode.java:88)```

bestbeforetoday (Wed, 23 Oct 2019 12:56:09 GMT):
My guess would be that there is a networking issue with your docker containers. You could check whether your client container is on the same Docker virtual network as the peer and, if so, whether that is the correct IP address and port for the peer on the virtual network. If they are not connected to the same virtual network then check that all the correct port forwarding is in place to allow connections between your client container and the peer container via your host machines network layer. A simple approach to troubleshoot might be to connect to a shell terminal within the container and use the command-line to check network routing and connectivity

Sai_S 1 (Wed, 23 Oct 2019 14:51:11 GMT):
Has joined the channel.

medikent (Wed, 23 Oct 2019 20:40:01 GMT):
Any ideas why I would be getting an *access denied* gRPC error when trying to connect to a peer on my network through fabric-gateway-java?

medikent (Wed, 23 Oct 2019 20:41:40 GMT):
My error says "MSP error: channel doesn't exist"

medikent (Wed, 23 Oct 2019 20:41:46 GMT):
Yet the channel name is correct

nitishbhardwaj19 (Thu, 24 Oct 2019 04:16:10 GMT):
@bestbeforetoday Thanks for the suggestion. You are right. There was an issue with port mapping of that peer. I was mapping it with a different port which was being exposed other than 7051. Thanks for the suggestion.

nitishbhardwaj19 (Thu, 24 Oct 2019 04:16:10 GMT):
@bestbeforetoday Thanks for the suggestion. You are right. There was an issue with port mapping of that peer. I was mapping it with a different port which was being exposed other than 7051. Thank you so much for your input. You saved a day.

aatkddny (Thu, 24 Oct 2019 12:04:59 GMT):
This may be out of scope, and I think I already know the answer but figured I'd ask if anyone else had tried it yet. If we switch to the Gateway/Network/Contract pattern, can the constructs be serialized so they can be shared across sessions in multiple containers. I suspect the answer is no. And if that is the case, is there a recommended approach for scaling out - sticky sessions, multiple local copies inside each container, something else? I was going to go the multiple local copy route unless there's a good reason not to.

medikent (Thu, 24 Oct 2019 20:06:57 GMT):
Does anyone here have a working example of user enrollment and registration along with a working Fabric network setup I can use as a reference?

HofmT (Fri, 25 Oct 2019 07:52:59 GMT):
Unfortunately no, still getting the same error...

tschulshuh (Fri, 25 Oct 2019 14:22:51 GMT):
Has joined the channel.

tschulshuh (Fri, 25 Oct 2019 14:22:51 GMT):
Hello there, can someone tell me if it is possible to implement a private data collection by using java chaincode? i unterstand how private data is supposed to work on the network and sdk side, but cant figure out how i have to structure the java chaincode. Thanks

bestbeforetoday (Fri, 25 Oct 2019 15:18:26 GMT):
@HofmT I have a theory what the issue might be...

bestbeforetoday (Fri, 25 Oct 2019 15:20:35 GMT):
For some reason RocketChat isn't letting me reply to your thread right now so here goes... Any instantiate proposal sent by the Java SDK will include `init` as a function name to invoke during instantiate. My guess is that your contract implementation doesn't have an `init()` function and so the instantiate is failing. You could try implementing a no-op `init()` function in your contract to see if this allows you to instantiate using the Java SDK. If this does help, please let me know and perhaps we can make some changes to help this situation

bestbeforetoday (Fri, 25 Oct 2019 15:22:21 GMT):
If you need help with the chaincode / contract implementation, you might be better posting in the #fabric-chaincode-dev channel

bestbeforetoday (Fri, 25 Oct 2019 15:22:21 GMT):
If you need help with the chaincode / contract implementation, you might be better posting in the #fabric-java-chaincode channel

javier-ochoa (Sun, 27 Oct 2019 06:42:02 GMT):
Has joined the channel.

huxd (Mon, 28 Oct 2019 06:54:02 GMT):
does fabric-gateway-java SDK support idemix identity now? or does it intend to do that?

HofmT (Mon, 28 Oct 2019 09:21:23 GMT):
@bestbeforetoday Thank you, this did indeed fix the issue! I added the following code snippet into my contract: `@Transaction() public void init(final Context ctx) {} ` I just want to point out that it is important to include the parameter _Context ctx_ although it is not used. When I tested it without it, my Chaincode container crashed.

HofmT (Mon, 28 Oct 2019 09:21:23 GMT):
@bestbeforetoday Thank you, this did indeed fix the issue! I added the following code snippet into my contract: ```java @Transaction() public void init(final Context ctx) {} ``` I just want to point out that it is important to include the parameter _Context ctx_ although it is not used. When I tested it without it, my Chaincode container crashed.

HofmT (Mon, 28 Oct 2019 09:21:23 GMT):
@bestbeforetoday Thank you, this did indeed fix the issue! I added the following code snippet into my contract: ``` @Transaction() public void init(final Context ctx) {} ``` I just want to point out that it is important to include the parameter _Context ctx_ although it is not used. When I tested it without it, my Chaincode container crashed.

Bolzo 1 (Mon, 28 Oct 2019 09:24:04 GMT):
Has joined the channel.

ikar (Wed, 30 Oct 2019 09:10:41 GMT):
Has joined the channel.

ikar (Wed, 30 Oct 2019 09:11:31 GMT):
Hey there! I got to the project that is based on BYFN sample, but limited to one organisation only. In my app when I call following code: ``` private Contract getContract(Gateway gw) { return gw.getNetwork("mychannel").getContract("realchain"); } ``` following error is produced: 2019-10-30 09:34:51.433 INFO 23108 --- [nio-8080-exec-3] org.hyperledger.fabric.gateway.Gateway : Unable to load channel configuration from connection profile: org.hyperledger.fabric.sdk.exception.NetworkConfigurationException: Channel configuration has no channels defined. at org.hyperledger.fabric.sdk.NetworkConfig.loadChannel(NetworkConfig.java:519) ~[fabric-sdk-java-1.4.5-20190620.151745-1.jar:na] at org.hyperledger.fabric.sdk.HFClient.loadChannelFromConfig(HFClient.java:161) ~[fabric-sdk-java-1.4.5-20190620.151745-1.jar:na] at org.hyperledger.fabric.gateway.impl.GatewayImpl.getNetwork(GatewayImpl.java:258) ~[fabric-gateway-java-1.4.0-20191002.055106-31.jar:na] ... ...the app recovers somehow itself, but I suspect this error to slow down the whole interaction with the ledger. Also I'd love to keep my logs clean from exceptions if possible ;) Anyone encountered and resolved the same error?

ikar (Wed, 30 Oct 2019 09:11:31 GMT):
Hey there! I got to the project that is based on BYFN sample, but limited to one organisation only. In my app when I call following code: ``` private Contract getContract(Gateway gw) { return gw.getNetwork("mychannel").getContract("realchain"); } ``` following error is produced: ``` 2019-10-30 09:34:51.433 INFO 23108 --- [nio-8080-exec-3] org.hyperledger.fabric.gateway.Gateway : Unable to load channel configuration from connection profile: org.hyperledger.fabric.sdk.exception.NetworkConfigurationException: Channel configuration has no channels defined. at org.hyperledger.fabric.sdk.NetworkConfig.loadChannel(NetworkConfig.java:519) ~[fabric-sdk-java-1.4.5-20190620.151745-1.jar:na] at org.hyperledger.fabric.sdk.HFClient.loadChannelFromConfig(HFClient.java:161) ~[fabric-sdk-java-1.4.5-20190620.151745-1.jar:na] at org.hyperledger.fabric.gateway.impl.GatewayImpl.getNetwork(GatewayImpl.java:258) ~[fabric-gateway-java-1.4.0-20191002.055106-31.jar:na] ... ``` ...the app recovers somehow itself, but I suspect this error to slow down the whole interaction with the ledger. Also I'd love to keep my logs clean from exceptions if possible ;) Anyone encountered and resolved the same error?

ikar (Wed, 30 Oct 2019 09:12:18 GMT):
SO question: https://stackoverflow.com/questions/58621526/hyperledger-fabric-channel-configuration-has-no-channels-defined

bestbeforetoday (Wed, 30 Oct 2019 09:47:35 GMT):
I've replied on Stack Overflow but to save people linking off there... > That is normal behaviour. If the connection profile does not contain a channel definition then the client uses peer definitions (current for your client identities organisation only) and assumes the channel exists for those peers. It should not impact performance at all. > > You have the option of adding a channel definition to the connection profile, which will avoid this log message occurring, but we wanted to avoid this being necessary. > > I agree that the exception appearing in the log gives the false impression that a real error has occurred and I have removed that in the current development code.

Bolzo 1 (Wed, 30 Oct 2019 10:01:08 GMT):
Hi, i want to connect my application, which use the java SDK with a connection profile and discovery service, to a remote fabric blockchain. I was wondering if i need a DNS or mapping the logical address (peer.org1.example.com) to the ip of the machine hosting the peer.. My application needs to run outside a docker container, and with this restriction also the discovery service is affected, right? This because i have no map every new address of peers and orderers which may be added to a channel

bestbeforetoday (Wed, 30 Oct 2019 10:12:10 GMT):
The peer URLs are the physical addresses so they need to be resolvable in DNS by the client. You are correct that when using discovery, the address configured in the peer will be supplied to client during network discovery and so also needs to be resolvable in DNS at the client

bestbeforetoday (Wed, 30 Oct 2019 10:13:12 GMT):
For testing purposes you could add entries to the client's local hosts file

ikar (Wed, 30 Oct 2019 10:46:42 GMT):
thanks @bestbeforetoday ! > You have the option of adding a channel definition to the connection profile I believe I do =) But I have no idea where. Is this the (java-sdk) app part or the fabric network part?

ikar (Wed, 30 Oct 2019 10:55:12 GMT):
currently trying to modify `cpp-template.yaml` inside `first-network` dir of the fabric network. is this the correct path at least?

Bolzo 1 (Wed, 30 Oct 2019 11:03:01 GMT):
I understand, thanks for the reply

ikar (Wed, 30 Oct 2019 12:20:43 GMT):
Okay, this was it! The error is gone and the performance is the same. Thanks again!

aatkddny (Wed, 30 Oct 2019 12:51:47 GMT):
Anyone use service discovery with the latest connection profile setup and know how to turn it on off the top of their head? I thought it was as simple as setting `"serviceDiscovery":true` in the set of json values in `channels>channel>peers>peer` but it seems to not be accepting that any more. Of the two different profile examples I have, one doesn't use the channels json at all and the other doesn't use SD so I'm not sure what changed. The peer role isn't getting set on any of the peers and it's throwing this `throw new ServiceDiscoveryException("The channel is not configured with any peers with the 'discover' role");` The peer *is* set to turn on SD (`discovery.enabled:true`). If anyone remembers off the top of their head it'll save me a bundle of time with the debugger.

aatkddny (Wed, 30 Oct 2019 12:51:47 GMT):
Anyone use service discovery with the latest connection profile setup and know how to turn it on off the top of their head? I thought it was as simple as setting `"serviceDiscovery":true` in the set of json values in a NetworkConfig in `channels>channel>peers>peer` but it seems to not be accepting that any more. Of the two different profile examples I have, one doesn't use the channels json at all and the other doesn't use SD so I'm not sure what changed. The peer role isn't getting set on any of the peers and it's throwing this `throw new ServiceDiscoveryException("The channel is not configured with any peers with the 'discover' role");` The peer *is* set to turn on SD (`discovery.enabled:true`). If anyone remembers off the top of their head it'll save me a bundle of time with the debugger.

aatkddny (Wed, 30 Oct 2019 13:04:02 GMT):
Responding to my own post - poor form, but hopefully it'll save someone else the same. The role name has been remapped from `serviceDiscovery` to `discover` inside the `NetworkConfig` class at `roleNameRemapHash`. Not sure why.

bestbeforetoday (Wed, 30 Oct 2019 15:15:07 GMT):
I'm not sure why that remapping was done either, but it does seem to be consistent with the Node SDK behaviour at least. If you have a `channels` section in your connection profile then to use discovery you will need to have at least one peer in there with the `discover` role. If you omit the `channels` section (using the Gateway API) then it will be assumed that all peers have all roles so discovery should work if enabled when connecting the Gateway

aatkddny (Wed, 30 Oct 2019 15:17:38 GMT):
we have channels in the network config. it's converting from a fully expressed network. i do have peers set for discovery - rememberer you need the core.yaml switches set too or it isn't happy. problem now is the external orderer address thing i posted about in the orderer chat group. i'll look at reconfiguring that and rebuilding my network after lunch.

aatkddny (Wed, 30 Oct 2019 15:17:38 GMT):
we have channels in the network config. it's converting from a fully expressed network. i do have peers set for discovery - rememberer you need the core.yaml switches set too or it isn't happy. problem now is the external orderer address thing i posted about in the fabric-orderer chat group. i'll look at reconfiguring that and rebuilding my network after lunch.

bestbeforetoday (Wed, 30 Oct 2019 15:19:47 GMT):
We were thinking of removing the notion of roles for peers in 2.0 since this is really just a client-side concept and any peers obtained through discovery just get all the roles so is less useful in the discovery scenario. It seems to cause more problems that it solves

aatkddny (Wed, 30 Oct 2019 15:24:10 GMT):
well i can't say that i ever ran into a problem where i needed more non-endorsing peers to try to get throughput...

aatkddny (Wed, 30 Oct 2019 17:59:58 GMT):
This one's new. Never saw it panic before... ``` 2019-10-30 13:53:20.971 ERROR 59582 --- [ault-executor-4] io.grpc.internal.ManagedChannelImpl : [Channel<161>: (peer0-mediaocean:30020)] Uncaught exception in the SynchronizationContext. Panic! java.lang.IllegalStateException: The transport factory is closed. at com.google.common.base.Preconditions.checkState(Preconditions.java:510) ~[guava-26.0-android.jar:na] at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(NettyChannelBuilder.java:567) ~[grpc-netty-1.23.0.jar:1.23.0] at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:49) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:246) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:196) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95) [grpc-api-1.23.0.jar:1.23.0] at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127) [grpc-api-1.23.0.jar:1.23.0] at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1365) [grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:311) [grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:213) [grpc-core-1.23.0.jar:1.23.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_162] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162] ```

aatkddny (Wed, 30 Oct 2019 17:59:58 GMT):
This one's new. Never saw it panic before... ``` 2019-10-30 13:53:20.971 ERROR 59582 --- [ault-executor-4] io.grpc.internal.ManagedChannelImpl : [Channel<161>: (peer0-someorg:30020)] Uncaught exception in the SynchronizationContext. Panic! java.lang.IllegalStateException: The transport factory is closed. at com.google.common.base.Preconditions.checkState(Preconditions.java:510) ~[guava-26.0-android.jar:na] at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.newClientTransport(NettyChannelBuilder.java:567) ~[grpc-netty-1.23.0.jar:1.23.0] at io.grpc.internal.CallCredentialsApplyingTransportFactory.newClientTransport(CallCredentialsApplyingTransportFactory.java:49) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:246) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:196) ~[grpc-core-1.23.0.jar:1.23.0] at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95) [grpc-api-1.23.0.jar:1.23.0] at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127) [grpc-api-1.23.0.jar:1.23.0] at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1365) [grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.DnsNameResolver$Resolve.resolveInternal(DnsNameResolver.java:311) [grpc-core-1.23.0.jar:1.23.0] at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:213) [grpc-core-1.23.0.jar:1.23.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_162] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_162] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_162] ```

aatkddny (Wed, 30 Oct 2019 19:31:55 GMT):
was it intentional that if you put a non-discovery enabled peer in the list it adds it to the channel twice when doing sd?

aatkddny (Wed, 30 Oct 2019 19:31:55 GMT):
was it intentional that if you put a non-discovery enabled peer in the configuration list it adds it to the channel twice when doing sd?

bestbeforetoday (Wed, 30 Oct 2019 19:42:29 GMT):
No, that sounds like a bug, although it _might_ be down to the client not being able to reliably distinguish between a discovered peer and one defined in the connection profile. It would be worth raising a Jira with an example of the peer entry from the connection profile and the duplicate added with discovery

aatkddny (Wed, 30 Oct 2019 19:59:57 GMT):
I'll do it tomorrow. Need to figure out what else is missing first. It's also interesting that the names also are required to exactly match the ones generated by SD - including the port - rather than it working off something a little less ephemeral (url I'm looking at you here).

aatkddny (Wed, 30 Oct 2019 19:59:57 GMT):
I'll do it tomorrow. Need to figure out what else is missing first. It's also interesting that the names are required to exactly match the ones generated by SD - including the port - rather than it working off something a little less ephemeral (url I'm looking at you here

aatkddny (Wed, 30 Oct 2019 19:59:57 GMT):
I'll do it tomorrow. Need to figure out what else is missing first. It's also interesting that the names are required to exactly match the ones generated by SD - including the port - rather than it working off something a little less ephemeral (url I'm looking at you here)

aatkddny (Wed, 30 Oct 2019 19:59:57 GMT):
I'll do it tomorrow. Need to figure out what else is missing first. It's also interesting that the names one constructs appear to be required to exactly match the ones generated by SD - they include the exposed port - rather than it working off something a little less ephemeral (url I'm looking at you here).

yacovm (Wed, 30 Oct 2019 20:18:33 GMT):
> i do have peers set for discovery - rememberer you need the core.yaml switches set too or it isn't happy. what switches? discovery is turned on by default in the peers...

aatkddny (Wed, 30 Oct 2019 22:12:15 GMT):
it is, but when it doesn't work for you you turn it off until you have time to go back to it, and then have to remember to turn it back on again.

yacovm (Wed, 30 Oct 2019 22:20:31 GMT):
why do you turn it off in the peer @aatkddny ?

yacovm (Wed, 30 Oct 2019 22:20:37 GMT):
it doesn't consume resources...

aatkddny (Wed, 30 Oct 2019 22:30:56 GMT):
because when i was trying to build myself a raft in kubernetes setup that works with the java sdk i was having terrible terrible trouble with certificates. i got past that and then service discovery was failing - and still is when i go to submit a transaction using the gateway. my network was built from my configuration and i have some code that dynamically builds it. so i didn't need it. still really don't for my setup. my problem came to a head when trying to connect to another vendor's network, one that has now changed all their configuration so it only uses service discovery. i need to be able to switch between our setup (non production) and the self same vendor setup (production) and don't want to support two code bases. so now i' m back looking at what i overlooked while i was shoehorning raft in, so i can go natively with the gateway and sd for everything. i'm working through figuring out what's different between sd and a self-built config (using the 1.0 style configuration) and trying to see where everything gets set.

aatkddny (Wed, 30 Oct 2019 22:30:56 GMT):
because when i was trying to build myself a raft in kubernetes setup that works with the java sdk i was having terrible terrible trouble with certificates. i got past that and then service discovery was failing - and still is when i go to submit a transaction using the gateway. my network was built from my configuration and i have some code that dynamically builds it. so i didn't need it. still really don't for my setup. my problem came to a head when trying to connect to another vendor's network, one that has now changed all their configuration so it only uses service discovery. i need to be able to switch between our setup (non production) and the self same vendor setup (production) and don't want to support two code bases. so now i' m back looking at what i overlooked while i was shoehorning raft in, so i can go natively with the gateway and sd for everything. i'm working through figuring out what's different between sd and a self-built config (using the 1.0 style configuration) and trying to see where everything gets set. i'm nearly there - it looks like there are two places where the orderer endpoints are set and they must be coming from two different sources because they have different names (corresponding to my internal service for one and the external endpoint for the other). Hence my question about the config yaml and the orderers.

aatkddny (Thu, 31 Oct 2019 01:12:11 GMT):
has the encoding for the genesis channel changed between 1.4.1 and 1.4.3? joining a peer - which has worked hithertofore - now throws this `org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to channel everything-channel failed. Status FAILURE, details: initializing channelconfig failed: could not create channel Orderer sub-group config: failed to deserialize values: Unexpected key Endpoints`

aatkddny (Thu, 31 Oct 2019 01:12:11 GMT):
has the encoding for the genesis block changed between 1.4.1 and 1.4.3? joining a peer - which has worked hithertofore - now throws this `org.hyperledger.fabric.sdk.exception.ProposalException: Join peer to channel everything-channel failed. Status FAILURE, details: initializing channelconfig failed: could not create channel Orderer sub-group config: failed to deserialize values: Unexpected key Endpoints`

nitishbhardwaj19 (Thu, 31 Oct 2019 05:49:38 GMT):
Hi @rickr @bestbeforetoday Thanks for sharing thoughts on HSM integration. I am just curious to know to know more about it. I assume that things would work as expected with HSM if we create a custom cryptoSuite which can connect to HSM. But, I found that we are referring to User's enrollment down the stream when we have to sign a transaction. ``` IdentityFactory.getSigningIdentity(cryptoPrimitives, user); ``` If that's the case, I am still not clear how we can plugin HSM support. Is there a way to play around with it? I know that's it's not supported fully, but it would be great if you can point to some pointers for just an idea of the concept.

yacovm (Thu, 31 Oct 2019 07:26:07 GMT):
you need to enable capabilities of 1.4.2

aatkddny (Thu, 31 Oct 2019 11:24:41 GMT):
In addition to V_1_4_2/3? I pulled that section from the fabric-samples.

yacovm (Thu, 31 Oct 2019 11:25:05 GMT):
i think it's 1.4.2 capability

aatkddny (Thu, 31 Oct 2019 11:25:47 GMT):
So 1_4_2 doesn't add to 1_3? Then why would someone leave them off in the only sample we have for this.

yacovm (Thu, 31 Oct 2019 11:26:01 GMT):
what do you mean doesn't add to?

yacovm (Thu, 31 Oct 2019 11:26:07 GMT):
if you want to use the new per org endpoints

aatkddny (Thu, 31 Oct 2019 11:26:11 GMT):
Inherit from.

yacovm (Thu, 31 Oct 2019 11:26:12 GMT):
you need to have 1.4.2 capability

yacovm (Thu, 31 Oct 2019 11:26:30 GMT):
how can it inherit from 1.3 ?

yacovm (Thu, 31 Oct 2019 11:26:33 GMT):
it extends it

aatkddny (Thu, 31 Oct 2019 11:28:15 GMT):
Extends, Inherits, whatever. I expect if 1_4_2 is on all the stuff for 1_3 is valid too. This is the config - from fabric-sample - for 1.4.3 with the comments stripped ``` Capabilities: Channel: &ChannelCapabilities V1_4_3: true V1_3: false V1_1: false Orderer: &OrdererCapabilities V1_4_2: true V1_1: false Application: &ApplicationCapabilities V1_4_2: true V1_3: false V1_2: false V1_1: false ```

aatkddny (Thu, 31 Oct 2019 11:29:02 GMT):
If you are saying I also need to have v1_3 set true why isn't it in as a default.

yacovm (Thu, 31 Oct 2019 11:29:09 GMT):
no no

yacovm (Thu, 31 Oct 2019 11:29:12 GMT):
what you have now is good

yacovm (Thu, 31 Oct 2019 11:29:26 GMT):
version `y` has everything `x` has if `y>x`

aatkddny (Thu, 31 Oct 2019 11:29:37 GMT):
which is what i expect.

yacovm (Thu, 31 Oct 2019 11:29:48 GMT):
and it gives you that error? :/

aatkddny (Thu, 31 Oct 2019 11:29:54 GMT):
except - drifting back to the original point - i get that error

aatkddny (Thu, 31 Oct 2019 11:30:09 GMT):
and i didn't until moving to 1.4.3

yacovm (Thu, 31 Oct 2019 11:30:18 GMT):
oh so it is resolved in 1.4.3?

aatkddny (Thu, 31 Oct 2019 11:30:28 GMT):
nope. it STARTED in 1.4.3.

yacovm (Thu, 31 Oct 2019 11:30:39 GMT):
oh, this is bad

aatkddny (Thu, 31 Oct 2019 11:30:42 GMT):
1.4.1 was just fine. As was all versions 1.4.x

aatkddny (Thu, 31 Oct 2019 11:30:42 GMT):
1.4.1 was just fine. As was all versions 1.2.x - 1.4.x

yacovm (Thu, 31 Oct 2019 11:30:57 GMT):
I don't know what to say though... @jyellick what can you make of this? :O

yacovm (Thu, 31 Oct 2019 11:31:08 GMT):
Sorry Danny, config is not my area :/

aatkddny (Thu, 31 Oct 2019 13:54:57 GMT):
UGH - ignore the whole thing above. We template the install scripts so changing versions should be as simple as changing a property. And it is, for everything except fabric-tools. Going from 1.4.1 to 1.4.3 works better when it also is the correct version. Now back to my original problem that caused all this - where the orderer names aren't being discovered as i expect for some types of transaction.

aatkddny (Thu, 31 Oct 2019 13:54:57 GMT):
UGH - ignore the whole thing above. We template the install scripts so changing versions should be as simple as changing a property. And it is, for everything except fabric-tools. Going from 1.4.1 to 1.4.3 works better when it also is the correct version. Now I can get back to the original problem that caused all this - where the orderer names aren't being discovered as i expect for some types of transaction.

yacovm (Thu, 31 Oct 2019 13:55:44 GMT):
what do you mean aren't being discovered?

yacovm (Thu, 31 Oct 2019 13:55:49 GMT):
not being returned by SD ?

aatkddny (Thu, 31 Oct 2019 14:01:57 GMT):
I'm inside kubernetes - apart from my client, which isn't. So I need the external names for the orderers (localhost:nodeport). I'm getting the internal ones (raft{N}-orderer:7050). I've tried - and am trying - changing my configtx generation code to put in the external name, but it seems that every time I try to change one of the Address blocks to the external address the rafts then fail to talk to one another. I was sidetracked by the need to go to 1.4.3, so need to go try setting these more thoroughly and checking the errors better. It was late last night when I was doing this.

Raumo0 (Thu, 31 Oct 2019 17:05:55 GMT):
org.hyperledger.fabric.sdk.Channel org.hyperledger.fabric.sdk.ChaincodeID org.hyperledger.fabric.sdk.HFClient org.hyperledger.fabric.sdk.QueryByChaincodeRequest I use these libraries, but I don’t understand how can I specify the name of the contract? I can set the channel name, chaincode name, method name, but not the contract name. How should I do it? Earlier, when I had 1 contract everything worked, and when I made several contracts in 1 chaincode, I can’t start it.

AllanHansen (Fri, 01 Nov 2019 00:36:01 GMT):
Has joined the channel.

Ryan--Yang (Fri, 01 Nov 2019 07:00:01 GMT):
Has joined the channel.

bestbeforetoday (Fri, 01 Nov 2019 12:14:23 GMT):
What errors are you getting? I wonder if you are seeing the issue that the Java SDK always sends `init` as an initialization function name when instantiating chaincode and, if you have multiple smart contracts within one chaincode, you may not have an `init` function defined for a default (non-namespaced) smart contract. If so, you could try implementing a dummy `init` function in a default (non-namespaced) smart contract

bestbeforetoday (Fri, 01 Nov 2019 12:15:17 GMT):
Once you have things up and running, the easiest way to invoke smart contract transactions is to use the _fabric-gateway-java_ API: https://github.com/hyperledger/fabric-gateway-java

bestbeforetoday (Fri, 01 Nov 2019 12:15:49 GMT):
Once you have things up and running, the easiest way to invoke smart contract transactions is to use the fabric-gateway-java API: https://github.com/hyperledger/fabric-gateway-java

bestbeforetoday (Fri, 01 Nov 2019 12:19:14 GMT):
If you want to use the low-level API then you specify a transaction name scoped by the smart contract namespace, e.g.: `my-smart-contract-namespace:transactionName'

bestbeforetoday (Fri, 01 Nov 2019 12:19:14 GMT):
If you want to use the low-level API then you specify a transaction name scoped by the smart contract namespace, e.g.: `my-smart-contract-namespace:transactionName`

Raumo0 (Fri, 01 Nov 2019 13:11:24 GMT):
@bestbeforetoday This one works for me: ": "! Thank you very much!

Paradox-AT (Mon, 04 Nov 2019 13:30:48 GMT):
Has joined the channel.

Paradox-AT (Mon, 04 Nov 2019 13:30:49 GMT):
Hey Guys , I am trying to do a transaction from sdk. I am able to query the data back form the legder but while trying to do a transaction it throws an error and says: ``` 2019-11-04 18:43:57.144 WARN 13032 --- [ault-executor-9] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 1737, channel: test, peerName: peer0.tms.transplace.com:9051, url: grpcs://peer0.tms.transplace.com:9051}, attempts 451. UNAVAILABLE: Unable to resolve host peer0.tms.transplace.com 2019-11-04 18:43:57.144 WARN 13032 --- [ault-executor-8] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 1738, channel: test, peerName: peer0.carrier.transplace.com:11051, url: grpcs://peer0.carrier.transplace.com:11051}, attempts 451. UNAVAILABLE: Unable to resolve host peer0.carrier.transplace.com 2019-11-04 18:43:57.147 WARN 13032 --- [ault-executor-8] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 1739, channel: test, peerName: peer0.shipper.transplace.com:7051, url: grpcs://peer0.shipper.transplace.com:7051}, attempts 451. UNAVAILABLE: Unable to resolve host peer0.shipper.transplace.com 2019-11-04 18:44:17.351 WARN 13032 --- [ault-executor-5] o.h.fabric.sdk.PeerEventServiceClient : Received error on PeerEventServiceClient{id: 1889, channel: test, peerName: peer0.carrier.transplace.com, url: grpcs://localhost:11051}, attempts 401. UNAVAILABLE: io exception ```

Paradox-AT (Mon, 04 Nov 2019 13:31:04 GMT):
Any clues?

aatkddny (Mon, 04 Nov 2019 14:50:37 GMT):
where is your network running? on a local machine or a server in your data center? the ports don't look like nodeport mappings so i'm guessing it's not kubernetes. and are you using service discovery?

yang.xiao (Tue, 05 Nov 2019 08:18:02 GMT):
Has joined the channel.

Paradox-AT (Tue, 05 Nov 2019 08:34:28 GMT):
Local machine

Paradox-AT (Tue, 05 Nov 2019 08:37:07 GMT):
If I am trying to do a transaction from the node itself it works

Paradox-AT (Tue, 05 Nov 2019 09:53:31 GMT):
So I regenerated the certificates I am no longer getting this error

Paradox-AT (Tue, 05 Nov 2019 09:53:31 GMT):
So I regenerated the certificates I am no longer getting the above error instead of that now I am getting this error:

Paradox-AT (Tue, 05 Nov 2019 09:54:21 GMT):
``` org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: The channel is not configured with any peers with the 'discover' role at org.hyperledger.fabric.sdk.Channel.sendTransactionProposalToEndorsers(Channel.java:3955) ~[fabric-sdk-java-1.4.5.jar:na] at org.hyperledger.fabric.gateway.impl.TransactionImpl.sendTransactionProposal(TransactionImpl.java:155) ~[fabric-gateway-java-1.4.0.jar:na] at org.hyperledger.fabric.gateway.impl.TransactionImpl.submit(TransactionImpl.java:91) ~[fabric-gateway-java-1.4.0.jar:na] at org.hyperledger.fabric.gateway.impl.ContractImpl.submitTransaction(ContractImpl.java:50) ~[fabric-gateway-java-1.4.0.jar:na] ```

Bolzo 1 (Tue, 05 Nov 2019 11:30:28 GMT):
HIi, there are somewhere some examples on how send multiple transaction in parallel?

aatkddny (Tue, 05 Nov 2019 12:34:04 GMT):
Using the java client? Or the fabric-gateway? Former - Setting up multiple HFClients will do it (if you want simple but possibly marginally less efficient). Latter - I'm not 100% convinced Contract is thread safe - since the HFClient is in the Gateway - so I'd go multiple Gateways. Caveat - I didn't write it and I haven't stepped through it, so it may well be completely thread safe and I'm just being over-cautious. Or you could self-synchronize, but I'm betting you don't want to do that.

Bolzo 1 (Tue, 05 Nov 2019 13:03:26 GMT):
I'm using java-sdk not the gateway, my goal is to send multiple transaction proposal to multiple endorsers and collect their response

bestbeforetoday (Tue, 05 Nov 2019 13:03:53 GMT):
You _should_ be able to submit multiple transactions in parallel using a single Contract instance using a multi-threaded client and the _fabric-gateway-java_ API. I have certainly done this but personally only with simple scenarios, like driving client load on a specific smart contract transaction. If anything doesn't work correctly invoking multiple transactions in parallel then please do raise a bug with as much information as you can gather to help identify the issue

aatkddny (Tue, 05 Nov 2019 13:07:14 GMT):
So look at the code in the sample to submit a tx and stick it in a thread so you can do it multiple times.

Bolzo 1 (Tue, 05 Nov 2019 13:09:38 GMT):
My approach at the moment consists in a executor service which submits multiple callables. The callable calls the sdk to send a transaction proposal. I was wondering if my approach can be improved

aatkddny (Tue, 05 Nov 2019 13:10:56 GMT):
tp to each endorser separately then you collect? or multiple discrete transactions?

Bolzo 1 (Tue, 05 Nov 2019 13:11:37 GMT):
multiple discrete transaction

aatkddny (Tue, 05 Nov 2019 13:12:27 GMT):
you have an pool of cached hfclients?

aatkddny (Tue, 05 Nov 2019 13:12:49 GMT):
one per thread in the executor service?

Bolzo 1 (Tue, 05 Nov 2019 13:13:03 GMT):
No, i have a single HFclient and i set the user context at evety call

aatkddny (Tue, 05 Nov 2019 13:13:13 GMT):
then you aren't thread safe.

Bolzo 1 (Tue, 05 Nov 2019 13:13:37 GMT):
Oh, so i must have multiple HFClients?

aatkddny (Tue, 05 Nov 2019 13:13:50 GMT):
unless it's been rewritten since we did this, yes.

aatkddny (Tue, 05 Nov 2019 13:14:34 GMT):
you can swap in another user after you dispatch the tx, but there's a window when you can collide. So a pool is simpler and safer.

Bolzo 1 (Tue, 05 Nov 2019 13:15:13 GMT):
Can you point me to some example code?

aatkddny (Tue, 05 Nov 2019 13:15:22 GMT):
if you want really shitty performance you could inline them and get an hfclient and connect every time, but that'll get old fast.

Bolzo 1 (Tue, 05 Nov 2019 13:16:40 GMT):
At the moment it takes 1 minute and a half to do 250 tx

Bolzo 1 (Tue, 05 Nov 2019 13:17:04 GMT):
So yes I need to improve the performance

aatkddny (Tue, 05 Nov 2019 13:17:36 GMT):
you can also saturate netty - in our case it was at about 25tx/s on 200 or so threads - so be warned about that too.

Bolzo 1 (Tue, 05 Nov 2019 13:20:44 GMT):
So the idea is to have a separate HFClient per thread (or per call), am I right?

Purbaja (Wed, 06 Nov 2019 12:39:34 GMT):
Hi Guys, In a tls enabled hyperledger fabric network, while running a invoke command from java sdk getting below error: _streaming call completed grpc.service=protos.Deliver grpc.method=Deliver grpc.peer_address=52.168.9.112:61141 error="context finished before block retrieved: context canceled" grpc.code=Unknown_

Purbaja (Wed, 06 Nov 2019 12:39:34 GMT):
Hi Guys, In a tls enabled hyperledger fabric network, while running a invoke command from java sdk getting below error: _streaming call completed grpc.service=protos.Deliver grpc.method=Deliver grpc.peer_address=x.x.x.x:61141 error="context finished before block retrieved: context canceled" grpc.code=Unknown_

Purbaja (Fri, 08 Nov 2019 11:02:10 GMT):
While invoking transaction from java-sdk (using service discovery), getting below error: org.hyperledger.fabric.sdk.exception.ProposalException: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: *Could not meet endorsement policy for chaincode ccXX* at org.hyperledger.fabric.sdk.Channel.sendTransactionProposalToEndorsers(Channel.java:3879)

aatkddny (Fri, 08 Nov 2019 14:02:02 GMT):
@bestbeforetoday Was the swallowing of error responses from chaincode when validation fails using SD intentional? Instead of our error responses now all we get is a `ServiceDiscoveryException("Could not meet endorsement policy for chaincode XXX")` We found that in Channel.java ``` public Collection sendTransactionProposalToEndorsers(TransactionProposalRequest transactionProposalRequest, DiscoveryOptions discoveryOptions) throws ProposalException, InvalidArgumentException, ServiceDiscoveryException { …. …. final boolean inspectResults = discoveryOptions.inspectResults; //force this to true and the behaviour reverts to what we need ``` Unfortunately we seem to have no control over the discoveryOptions. It’s created inside `TransactionImpl` and immediately passed to the channel method: ``` private Collection sendTransactionProposal(TransactionProposalRequest request) throws InvalidArgumentException, ServiceDiscoveryException, ProposalException { if (this.endorsingPeers != null) { return this.channel.sendTransactionProposal(request, this.endorsingPeers); } else if (this.network.getGateway().isDiscoveryEnabled()) { DiscoveryOptions discoveryOptions = DiscoveryOptions.createDiscoveryOptions().setEndorsementSelector(EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM).setForceDiscovery(true); return this.channel.sendTransactionProposalToEndorsers(request, discoveryOptions); } else { return this.channel.sendTransactionProposal(request); } } ``` So - was this intentional? It's a change in behavior from what happens when SD isn't on, and it means we can't react to the errors and handle appropriately.

aatkddny (Fri, 08 Nov 2019 14:28:18 GMT):
Anyone using the `ContractImpl` in fabric-gateway with Private Data? How do you set the transient map to pass in non persisted information?

aatkddny (Fri, 08 Nov 2019 14:28:18 GMT):
Anyone using the `ContractImpl` in fabric-gateway with Private Data? How do you set the transient map to pass in non persisted information? Did you extend it to implement `setTransient` or did we miss something.

bestbeforetoday (Fri, 08 Nov 2019 15:47:19 GMT):
No, not intentional. Improving this behaviour is captured in https://jira.hyperledger.org/projects/FGJ/issues/FGJ-57

aatkddny (Fri, 08 Nov 2019 15:51:51 GMT):
Thx. We'll Proxy `sendTransactionProposal` until it gets adopted and hits the mainline code then.

aatkddny (Fri, 08 Nov 2019 15:51:51 GMT):
Thx. Looked but didn't see the jira. We'll Proxy `sendTransactionProposal` until it gets adopted and hits the mainline code then.

dan13 (Sun, 10 Nov 2019 02:46:32 GMT):
You want to lock an HFClient to each thread for the duration of the transaction via pool, or, if you have a limited set of users you could create instances for each, store them, and re-use the appropriate one across threads.

aatkddny (Sun, 10 Nov 2019 18:59:31 GMT):
He's already using an executor service. Unless he has a HFClient per thread in that service (or a bigger pool - which is wasteful) he's likely to bottleneck on them.

Bolzo 1 (Mon, 11 Nov 2019 15:49:06 GMT):
Yeah I have a HFClient per thread.. Each HFClient has the same information. The idea is that i want to split a series of transactions sent by a user into parallel transactions using multithreading.

Bolzo 1 (Mon, 11 Nov 2019 15:49:06 GMT):
Yeah I have a HFClient per thread.. Each HFClient has the same information. The idea is that I want to split a series of transactions sent by a user into parallel transactions using multithreading.

Bolzo 1 (Thu, 14 Nov 2019 08:01:36 GMT):
Java gateway: the only options for a wallet are in memory and file System, right? What is the best approach if I want load user certs from a DB? Should I create a memory wallet and load the information from the database? Or I Should create a FileSystem wallet?

Bolzo 1 (Thu, 14 Nov 2019 08:01:36 GMT):
Java gateway: the only options for a wallet are in memory and file system, right? What is the best approach if I want load user certs from a DB? Should I create a memory wallet and load the information from the database? Or I Should create a FileSystem wallet?

Bolzo 1 (Thu, 14 Nov 2019 08:01:36 GMT):
Java gateway: the only options for a wallet are in memory and file system, right? What is the best approach if I want to load user certs from a DB? Should I create a memory wallet and load the information from the database? Or I Should create a FileSystem wallet?

Bolzo 1 (Thu, 14 Nov 2019 08:29:12 GMT):
By any chance, do you have some example code?

bestbeforetoday (Thu, 14 Nov 2019 10:14:01 GMT):
If you are storing your credentials in a database then probably the best approach is for your client application at startup to pull the required credentials from the database and stick them in an in-memory wallet. The file system wallet is useful just if you want a simple out-of-the box storage mechanism for your credentials.

Bolzo 1 (Thu, 14 Nov 2019 10:17:43 GMT):
Perfect, thanks!

Bolzo 1 (Thu, 14 Nov 2019 15:51:31 GMT):
a

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's any example code: ``Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); Map> mapFuture = new HashMap<>(); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong? ```

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's any example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); Map> mapFuture = new HashMap<>(); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong?

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); Map> mapFuture = new HashMap<>(); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong?

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); Map> mapFuture = new HashMap<>(); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong?

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); Map> mapFuture = new HashMap<>(); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong? (Sorry for the bad formatting / indentation)

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong? (Sorry for the bad formatting / indentation)

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong? (Sorry for the bad formatting / indentation)

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong? (Sorry for the bad formatting / indentation)

Bolzo 1 (Thu, 14 Nov 2019 15:56:31 GMT):
I'm trying to send async transaction with the gateway sdk but i receive `Channel has been shutdown`. Here's an example code: ```Gateway.Builder builder = Gateway.createBuilder() .discovery(true) .identity(wallet, user.getName()) .networkConfig([OATH TO CONNECTION PROFILE]); try(Gateway gateway = builder.connect()) { Network channel = gateway.getNetwork(CHANNEL_NAME); Contract someChaincode = channel.getContract(CHAINCODE_NAME); int coresNumber = (Runtime.getRuntime().availableProcessors()); ExecutorService executor = Executors.newFixedThreadPool(coresNumber); for(String elemt : elements) { CompletableFuture future = CompletableFuture.supplyAsync(() -> { try{ byte[] res = someChaincode.submitTransaction("someFunction", elemt); return new String(res); } catch (ContractException e) { e.printStackTrace(); } }, executor); } } catch .... ``` Any idea on what I'm doing wrong? (Sorry for the bad formatting / indentation)

Bolzo 1 (Thu, 14 Nov 2019 16:22:42 GMT):
My question on stackoverflow about this more detailed: https://stackoverflow.com/questions/58861348/hyperledger-fabric-async-parallel-transaction-using-java-gateway-sdk

Bolzo 1 (Thu, 14 Nov 2019 16:22:42 GMT):
More detailed question on stackoverflow about this: https://stackoverflow.com/questions/58861348/hyperledger-fabric-async-parallel-transaction-using-java-gateway-sdk

JackMGit (Fri, 15 Nov 2019 13:00:13 GMT):
Has joined the channel.

Deepakbyrappa (Sun, 17 Nov 2019 04:38:07 GMT):
Has joined the channel.

nitishbhardwaj19 (Mon, 18 Nov 2019 05:43:57 GMT):
Hi @bestbeforetoday I am trying to improve performance of my application. I am using java-sdk apis to interact with network and not any wallets for now. I noticed that it takes 2.2 secs to get conformation for a transaction when I send it to channel.``` channel.sendTransaction(responses, getTransactionOptions(channel)) .exceptionally(this::processExceptionForTxnEvent) .whenCompleteAsync((event, throwable)-> { processTransactionEvent(deferredResult, event, throwable);}); ``` ``` I just added whenComplete Async and it reduced it to miliseconds, yet, the overall invoke operation time remains the same i.e. 2.2 secs(noticed it through postman). Is there a better way to reduce overall operation time such that clients doesn't have to wait until the block is generated? What's the recommended approach for this? Should I focus on events? If so, how do I notify clients when I get an event for block generation? ```

nitishbhardwaj19 (Mon, 18 Nov 2019 05:43:57 GMT):
Hi @bestbeforetoday I am trying to improve performance of my application. I am using java-sdk apis to interact with network and not any wallets for now. I noticed that it takes 2.2 secs to get confirmation for a transaction when I send it to channel.``` channel.sendTransaction(responses, getTransactionOptions(channel)) .exceptionally(this::processExceptionForTxnEvent) .whenCompleteAsync((event, throwable)-> { processTransactionEvent(deferredResult, event, throwable);}); ``` I just added *whenComplete *Async and it reduced it to *miliseconds*(thread is not blocked), yet, the overall invoke operation time remains the same i.e. 2.2 secs(noticed it through postman). Is there a better* way to reduce overall operation time such that clients doesn't have to wait until the block is generated?* What's the recommended approach for this? Should I focus on events? If so, how do I notify clients when I get an event for block generation?

nitishbhardwaj19 (Mon, 18 Nov 2019 05:43:57 GMT):
Hi @bestbeforetoday I am trying to improve performance of my application. I am using java-sdk apis to interact with network and not any wallets for now. I noticed that it takes 2.2 secs to get confirmation for a transaction when I send it to channel.``` channel.sendTransaction(responses, getTransactionOptions(channel)) .exceptionally(this::processExceptionForTxnEvent) .whenCompleteAsync((event, throwable)-> { processTransactionEvent(deferredResult, event, throwable);}); ``` I just added *whenComplete *Async and it reduced it to *miliseconds*(thread is not blocked), yet, the overall invoke operation time remains the same i.e. 2.2 secs(noticed it through postman, block generation time is 2 secs in orderer settings). Is there a better* way to reduce overall operation time such that clients doesn't have to wait until the block is generated?* What's the recommended approach for this? Should I focus on events? If so, how do I notify clients when I get an event for block generation?

ShrutiHK (Mon, 18 Nov 2019 09:10:50 GMT):
Has joined the channel.

ShrutiHK (Mon, 18 Nov 2019 09:14:10 GMT):
Hi, I am trying to work with fabric java sdk in a TLS enabled network. I keep getting the TLS Handshake failed error. I am using the fabric-sdk-java dependency version 1.4.3.

ShrutiHK (Mon, 18 Nov 2019 09:15:18 GMT):
In a non-tls enabled network, my code works perfectly. I would really appreciate if someone can share a working example of TLS enabled java-sdk sample.

SatheeshNehru (Tue, 19 Nov 2019 12:59:50 GMT):
when I generate enrollemnt using java fabric CAclient I get cert and key and copy to msp Is there any option to generate cert in msp Structure using fabricCAClient

bestbeforetoday (Tue, 19 Nov 2019 14:54:28 GMT):
I have replied to your question on StackOverflow

Bolzo 1 (Tue, 19 Nov 2019 14:58:43 GMT):
I've just check... I completely missed the try-with-resources! Now all makes sense, thanks!

bestbeforetoday (Tue, 19 Nov 2019 15:05:30 GMT):
I guess that your client will be waiting until successful transaction commit events are received from peers. This is often what you want so that any subsequent transactions or queries are seeing the world state after your transaction have been applied. But for you to see the commit events the transaction must have been included in a block that is committed on the peers, which can take a little time. Under light load the round-trip time may look artificially slow as the orderer waits for more transactions for a short period of time before committing the block (likely including only your one transaction). As concurrent load increases you will start to see multiple transactions included in each block and so the average round-trip time effectively decreases as blocks are either filling up before the wait time, or your transactions are being ordered part-way through the wait time triggered by preceding transactions.

bestbeforetoday (Tue, 19 Nov 2019 15:07:09 GMT):
Alternatively... if you don't need to wait for the world state to include state changes resulting from your transaction -- perhaps you are just firing in a batch of transaction invocations that don't rely on each others' state changes -- you can not wait for the transaction commit events and see higher throughput

Chem (Wed, 20 Nov 2019 06:10:43 GMT):
Has joined the channel.

Chem (Wed, 20 Nov 2019 06:10:45 GMT):
Hi, When I deal with fabric-sdk-java , when testing End2endIT.java file, the channel creation is not working. Channel newChannel = client.newChannel(name, anOrderer, channelConfiguration, client.getChannelConfigurationSignature(channelConfiguration, peerAdmin)); The above function call wait for a long time. Please help

Bolzo 1 (Wed, 20 Nov 2019 11:03:27 GMT):
With the gateway sdk How can I get the transaction id after a `submitTransaction`?

sudijovski (Wed, 20 Nov 2019 11:53:12 GMT):
Has joined the channel.

Purbaja (Wed, 20 Nov 2019 13:07:05 GMT):
Hi @bestbeforetoday , when using channel.sendTransaction(prResponses).whenCompleteAsync((event, throwable)-> {...}); I am not getting the event back and therefore not able to understand whether the transaction is getting committed or not. Please suggest how to confirm that.

Bolzo 1 (Wed, 20 Nov 2019 15:34:32 GMT):
I want to improve the performance of my module which use the java-sdk (not gateway). Currently the function `sendTransactionProposalToEndorsers` takes about 300 ms (`forceDiscovery` and `inspectResult` set to `true` and `endorsementSelector set to ENDORMENT_SELECTION_RANDOM`). What are the factors that affect this function? What are the best practices to use in order to optimize the performance?

bestbeforetoday (Wed, 20 Nov 2019 15:51:55 GMT):
From memory there is some default waiting behaviour that means the Future won't complete until commit events have been received. To tailor this behaviour you might want to use `sendTransaction(Collection proposalResponses, Channel.TransactionOptions transactionOptions)` instead: https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/Channel.html#sendTransaction-java.util.Collection-org.hyperledger.fabric.sdk.Channel.TransactionOptions-

bestbeforetoday (Wed, 20 Nov 2019 15:52:47 GMT):
Or use the higher level _fabric-gateway-java_ API where you can select from a few different default commit handling strategies or roll your own

AkilaVasanthakumar (Thu, 21 Nov 2019 05:36:15 GMT):
Hi, how to implement fabcar usecase in springboot project

Coada (Thu, 21 Nov 2019 08:28:48 GMT):
You could start by trying out this IBM example https://github.com/IBM/blockchain-application-using-fabric-java-sdk

AkilaVasanthakumar (Thu, 21 Nov 2019 09:02:41 GMT):
yes, i tried its working fine ...i want to work with tls enabled network .

Chem (Thu, 21 Nov 2019 10:00:13 GMT):

channel.png

AkilaVasanthakumar (Thu, 21 Nov 2019 10:30:41 GMT):
Can able to implement fabcar usecase with springboot project ..But its querying with this error message

AkilaVasanthakumar (Thu, 21 Nov 2019 10:30:41 GMT):
Can able to implement fabcar usecase with springboot project ..But its querying with this message..Do you have any idea about this

AkilaVasanthakumar (Thu, 21 Nov 2019 10:32:20 GMT):

Screenshot from 2019-11-21 16-01-25.png

AkilaVasanthakumar (Thu, 21 Nov 2019 10:40:21 GMT):

oie_211137213Q8y87L0.png

AkilaVasanthakumar (Thu, 21 Nov 2019 10:41:27 GMT):

oie_JMz6gA0jT8LW.png

AkilaVasanthakumar (Thu, 21 Nov 2019 10:44:33 GMT):

oie_ZlN30ECOvLGe.png

KyoungsunPark (Thu, 21 Nov 2019 13:45:01 GMT):
Has joined the channel.

KyoungsunPark (Thu, 21 Nov 2019 13:45:05 GMT):
https://chat.hyperledger.org/channel/general?msg=5rbcefYjbS6hL4QXG

bestbeforetoday (Thu, 21 Nov 2019 14:03:05 GMT):
_fabric-sdk-java_ is a low level API while _fabric-gateway-java_ is a higher level (read: more usable) API that is built on top of _fabric-sdk-java_. The 1.4.x release of _fabric-gateway-java_ is stable, and my recommendation would be to use that wherever practical, only using the low level API for specific tasks that are not available in the high level API

bestbeforetoday (Thu, 21 Nov 2019 14:03:05 GMT):
_fabric-sdk-java_ is a low level API while _fabric-gateway-java_ is a higher level (read: more usable) API that is built on top of _fabric-sdk-java_. The 1.4.x release of _fabric-gateway-java_ is stable, and my recommendation would be to use that wherever practical; only using the low level API for specific tasks that are not available in the high level API

giuzero (Thu, 21 Nov 2019 17:12:05 GMT):
Has joined the channel.

giuzero (Thu, 21 Nov 2019 17:12:06 GMT):
Hi all, I'm tryng to run a java cli on a x86 arch. I'm having problems with netty_tcnative_linux_x86_32, we rebuilt nettyx86_32bit but we still have problems running sdk functions like network discovery etc... (enroll and registration are ok). Has someone managed to run a Hyperledger Client on x86_32bit?

KyoungsunPark (Fri, 22 Nov 2019 02:49:19 GMT):
Thank you for your explanation and recommendation. :)

medikent (Fri, 22 Nov 2019 19:03:06 GMT):
Is there something like a fabric-gateway-go?

yacovm (Fri, 22 Nov 2019 19:32:38 GMT):
why do you need it @medikent ?

nitishbhardwaj19 (Fri, 22 Nov 2019 19:35:04 GMT):
@bestbeforetoday Thanks for the detail information. This really helps.

nitishbhardwaj19 (Fri, 22 Nov 2019 19:41:43 GMT):
Hi @bestbeforetoday I was just going through balance-transfer sample which is implemented using node-sdk. I noticed that for each operations, transaction invoke etc, they close the channel. I am not sure whether this is required in java-sdk for resource cleanup. Would be great if you can share your thoughts.

SatheeshNehru (Sun, 24 Nov 2019 03:53:17 GMT):
Is there any sdk to replace configtxgen configtxlator and docker operation?will be glad if sample code is shared? #fabric-sdk-java #fabric-sdk-java

bestbeforetoday (Mon, 25 Nov 2019 11:24:30 GMT):
Connecting to the channel and then closing the connection again for every transaction invocation will result in very poor performance. Ideally you want to be staying connected while you perform a series of transaction invocations and just close connections when your client application completes.

icordoba (Tue, 26 Nov 2019 16:24:41 GMT):
Hi, I have my Smart Contract working throwg peer node and through Java SDS for query transaction, but when I try to execute a write transaciton I get this exception. (I had this working but I have changed something in the code):

icordoba (Tue, 26 Nov 2019 16:24:42 GMT):
17:22:05.988 [main] DEBUG org.hyperledger.fabric.sdk.transaction.ProtoUtils - ChannelHeader: type: ENDORSER_TRANSACTION, version: 1, Txid: 78e36586768f32cc6ed1ed685e4ec45a85eec56a0eed15240cf031c53325086b, channelId: mrrc, epoch 0, clientTLSCertificate digest: 17:22:05.989 [main] ERROR org.hyperledger.fabric.sdk.Channel - java.lang.NullPointerException org.hyperledger.fabric.sdk.exception.ProposalException: java.lang.NullPointerException at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:4366) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:4244) at mt.gov.ha.rent.javasdk.client.ChannelClient.sendTransactionProposal(ChannelClient.java:119) at mt.gov.ha.rent.javasdk.invocation.InvokeChaincode.main(InvokeChaincode.java:166) Caused by: java.lang.NullPointerException: null at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.createChaincodeInvocationSpec(ProposalBuilder.java:182) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.createFabricProposal(ProposalBuilder.java:134) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.build(ProposalBuilder.java:114) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:4360) ... 3 common frames omitted org.hyperledger.fabric.sdk.exception.ProposalException: java.lang.NullPointerException at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:4366) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposal(Channel.java:4244) at mt.gov.ha.rent.javasdk.client.ChannelClient.sendTransactionProposal(ChannelClient.java:119) at mt.gov.ha.rent.javasdk.invocation.InvokeChaincode.main(InvokeChaincode.java:166) Caused by: java.lang.NullPointerException at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.createChaincodeInvocationSpec(ProposalBuilder.java:182) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.createFabricProposal(ProposalBuilder.java:134) at org.hyperledger.fabric.sdk.transaction.ProposalBuilder.build(ProposalBuilder.java:114) at org.hyperledger.fabric.sdk.Channel.sendProposal(Channel.java:4360) ... 3 more

icordoba (Tue, 26 Nov 2019 16:24:49 GMT):
Any idea what I¡m missing? thanks

sandy (Wed, 27 Nov 2019 11:52:25 GMT):
Hi.. Am getting this error while creating channel. Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: d0bf306e3efcb6243a5ad09b94dccaca19dfc7254ed63a90daa92f446daf3e79 to Peer{ id: 4, name: peer0.org2.example.com, channelName: mychannel, url: grpc://localhost:9053, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null} java.lang.Exception: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason at org.hyperledger.fabric.sdk.Channel.sendProposalToPeers(Channel.java:4525) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:952) at org.hyperledger.fabric.sdk.Channel.getConfigBlock(Channel.java:918) at org.hyperledger.fabric.sdk.Channel.parseConfigBlock(Channel.java:2045) at org.hyperledger.fabric.sdk.Channel.loadCACertificates(Channel.java:1882) at org.hyperledger.fabric.sdk.Channel.initialize(Channel.java:1267) at org.hyperledger.fabric.gateway.impl.NetworkImpl.initializeChannel(NetworkImpl.java:59) at org.hyperledger.fabric.gateway.impl.NetworkImpl.(NetworkImpl.java:50) at org.hyperledger.fabric.gateway.impl.GatewayImpl.getNetwork(GatewayImpl.java:281) at com.zoho.baas.GatewayTest.main(GatewayTest.java:39) Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason

sandy (Wed, 27 Nov 2019 11:52:37 GMT):
can anyone help on this?

sandy (Wed, 27 Nov 2019 11:53:24 GMT):
Its working for me when i use fabric sdk directly but not working with fabric gateway...

sandy (Wed, 27 Nov 2019 20:17:07 GMT):
got it fixed.. Thank you

Purbaja (Mon, 02 Dec 2019 05:40:42 GMT):
Hi guys, using fabric-sdk-java I want to continuously listen to a chaincode event. How that can be achieved ?

Randyshu2018 (Tue, 03 Dec 2019 08:09:49 GMT):

Clipboard - December 3, 2019 4:09 PM

Randyshu2018 (Tue, 03 Dec 2019 08:11:58 GMT):
Anyone know why my proposalResponses's payload are different ? (I send proposal to two peers and the response payload are different)

knagware9 (Tue, 03 Dec 2019 08:15:16 GMT):
may be one of the peer's state database is compromised

Randyshu2018 (Tue, 03 Dec 2019 08:16:21 GMT):
so I should check couchdb first?

knagware9 (Tue, 03 Dec 2019 08:16:52 GMT):
you can check if something is modified there

Randyshu2018 (Tue, 03 Dec 2019 08:17:27 GMT):
they are same

knagware9 (Tue, 03 Dec 2019 08:18:25 GMT):
ok...then can you please share actual error you getting

Randyshu2018 (Tue, 03 Dec 2019 08:20:48 GMT):
16:19:13.842 [main] DEBUG org.hyperledger.fabric.sdk.SDKUtils - Consistency set: 0 bytes size: 765 bytes: 0a20360a2409892d0011198f4ff1a4ddc889da9655a6ef363306757d1c4f3428eba612d8050afe0412e3040a0665737461746512d8041a390a34007569647e69640072616e6479310032313939393163372d653334342d343235342d623835632d643138333463333436663438001a01001a9a040a2432313939393163372d653334342d343235342d623835632d6431383334633334366634381af1037b22656e637279707465644b6579223a2242454d306649674f597a6b704c334a51713670346a7156723343794d5a514c365377733056434b473056447971552b4a64527339797339724867686776666a772b4c6b306453794c437941385c6e42705a6e54625a6b627162784d514473446e396146384d41493042626378566573446e3458454c4a4b754f554f49683257412b597735536a314c493d5c6e222c2263727970746f4669656c6473223a5b2270686f6e65225d2c2264617461223a227b5c227569645c223a5c2272616e6479315c222c5c2270686f6e655c223a5c226f5146764748526b745a79364839516a6d466f3469413d3d5c5c6e5c222c5c226e616d655c223a5c2272616e6479315c222c5c2269645c223a5c2232313939393163372d653334342d343235342d623835632d6431383334633334366634385c227d222c22646967657374223a22787156576c694638623832445346362b336e68314a7842396d76707853464376485137615775553764306f3d5c6e222c227369676e6174757265223a224d4559434951436963756f51584d704b414843535038762b582b68444e3667383037502f5576366b51674330314476543377496841503578526953524e4d4c77595447586f684441444c67415c6e4d6b4a41466d584845746f5a567a2b4f465043645c6e227d12160a046c736363120e0a0c0a06657374617465120208051a4508c8011a4032336234313164313139633462383161666530366636353336356337636330666631373130333834646238626465396161373833303331616535653539373135220e12066573746174651a0476312e33 [Peer{ id: 3, name: peer0.master.ejubc.com, channelName: qiushichannel, url: grpcs://localhost:7051, mspid: MasterMSP}], Consistency set: 1 bytes size: 402 bytes: 0a20360a2409892d0011198f4ff1a4ddc889da9655a6ef363306757d1c4f3428eba612ed020a930212f8010a0665737461746512ed011a0f0a0a007569647e69640000001a01001ad9010a2432313939393163372d653334342d343235342d623835632d6431383334633334366634381ab0017b226964223a22222c22756964223a22222c22656e637279707465644b6579223a2242454d306649674f597a6b704c334a51713670346a7156723343794d5a514c365377733056434b473056447971552b4a64527339797339724867686776666a772b4c6b306453794c437941385c6e42705a6e54625a6b627162784d514473446e396146384d41493042626378566573446e3458454c4a4b754f554f49683257412b597735536a314c493d5c6e227d12160a046c736363120e0a0c0a06657374617465120208051a4508c8011a4032336234313164313139633462383161666530366636353336356337636330666631373130333834646238626465396161373833303331616535653539373135220e12066573746174651a0476312e33 [Peer{ id: 4, name: peer0.merchant.ejubc.com, channelName: qiushichannel, url: grpcs://localhost:9051, mspid: MerchantMSP}]

knagware9 (Tue, 03 Dec 2019 08:23:30 GMT):
here how you saying the proposal responses are different ? Did you getting error during chaincode invoke

knagware9 (Tue, 03 Dec 2019 08:24:01 GMT):
Please ask this in #fabric & #fabric-questions

Randyshu2018 (Tue, 03 Dec 2019 08:25:15 GMT):
both responsecode are valid : 16:19:13.827 [main] DEBUG org.hyperledger.fabric.gateway.impl.TransactionImpl - validatePeerResponses: valid response from peer grpcs://localhost:7051 16:19:13.828 [main] DEBUG org.hyperledger.fabric.gateway.impl.TransactionImpl - validatePeerResponses: valid response from peer grpcs://localhost:9051

Randyshu2018 (Tue, 03 Dec 2019 08:26:52 GMT):
the endorse process is success but failed with Consistency check

knagware9 (Tue, 03 Dec 2019 08:28:46 GMT):
If a transaction has been endorsed correctly, the peer will attempt to apply it to the ledger. To do this, a peer must perform a ledger consistency check to verify that the current state of the ledger is compatible with the state of the ledger when the proposed update was generated.

Randyshu2018 (Tue, 03 Dec 2019 08:37:08 GMT):
upgrade chaincode and everything goes well ...

Randyshu2018 (Tue, 03 Dec 2019 08:37:55 GMT):
maybe the local chaincode image is mismatch from new chaincode version ?

Randyshu2018 (Tue, 03 Dec 2019 08:38:34 GMT):
or chaincode did some undetermined operation

knagware9 (Tue, 03 Dec 2019 09:32:45 GMT):
ok great

bestbeforetoday (Tue, 03 Dec 2019 10:12:25 GMT):
Are you looking for this: - https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/Channel.html#registerChaincodeEventListener-java.util.regex.Pattern-java.util.regex.Pattern-org.hyperledger.fabric.sdk.ChaincodeEventListener-

bestbeforetoday (Tue, 03 Dec 2019 10:12:25 GMT):
Are you looking for this: https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/Channel.html#registerChaincodeEventListener-java.util.regex.Pattern-java.util.regex.Pattern-org.hyperledger.fabric.sdk.ChaincodeEventListener- Or with the higher-level API there are lots of flavours of `Contract.addContractListener()` which are similar but avoid duplication and provide events in order: https://fabric-gateway-java.github.io/org/hyperledger/fabric/gateway/Contract.html

icordoba (Tue, 03 Dec 2019 22:54:40 GMT):
Hello, did you solve this? I also need to get all entries but passing "","" returns empty Iterator.

sandy (Wed, 04 Dec 2019 03:43:11 GMT):
Am getting this error while creating channel.. error authorizing update: error validating ReadSet: existing config does not contain element for [Group] /Channel/Application/Org1MSP but was in the read set Can anyone help me on this?

Purbaja (Wed, 04 Dec 2019 08:13:01 GMT):
@bestbeforetoday thanks for sharing this. But as u said, with the fabric-sdk option I am receiving every event twice. Any way to avoid this?

bestbeforetoday (Wed, 04 Dec 2019 09:39:16 GMT):
Two obvious options spring to mind: 1. Write your own code to ignore duplicate events. 2. Use the high level _fabric-gateway-java_ API, which includes this deduplication logic so you don't have to write it yourself.

bestbeforetoday (Wed, 04 Dec 2019 09:43:16 GMT):
The reason you get duplicate (and out of order) events is because the event listener listens to all eventing peers on the channel. A different approach -- although I'm not sure I would recommend it -- could be to create a new Channel object based on the "real" Channel object, and populate it with only a single eventing peer object. Listeners attached to this new Channel object will only be receiving one copy of each event because it only has one eventing peer. The downside is that, if that one peer disconnects for any reason, you aren't getting any events.

ranjan008 (Wed, 04 Dec 2019 10:49:11 GMT):
how did you solve it ?

ranjan008 (Wed, 04 Dec 2019 10:54:51 GMT):
Hi I am getting below error when I am trying to join a new peer onto the existing channel.

ranjan008 (Wed, 04 Dec 2019 10:54:54 GMT):
Join peer to channel comchannel failed. Status FAILURE, details: Channel Channel{id: 6, name: comchannel} Sending proposal with transaction: 6c4b0ee01be64e211134cc789771c783dd338aa56fc12f4e99fba31880f7f194 to Peer{ id: 39, name: peer2.dmcc.com, channelName: comchannel, url: grpc://localhost:5051} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Network closed for unknown reason, cause=null

sandy (Wed, 04 Dec 2019 11:23:09 GMT):
Hi Ranjan.. The port number 5051 could be wrong. For my case i have misconfigured the port number.. Can you check once?

sandy (Wed, 04 Dec 2019 11:28:58 GMT):
If the configured port number is right then just check the peer logs.

sandy (Wed, 04 Dec 2019 11:34:49 GMT):
@ranjan008

ranjan008 (Wed, 04 Dec 2019 11:39:30 GMT):
have checked the peer logs there are no calls going to the peer for joining the channel.

ranjan008 (Wed, 04 Dec 2019 12:45:21 GMT):
also do I need to update channel capabilities to join peer onto the channel?

icordoba (Wed, 04 Dec 2019 13:56:19 GMT):
Hi... I am trying to get all entries in the ledger (Fabric 1.4.4, using Java Chaincode): QueryResultsIterator iterator = ctx.getStub().getStateByRange("",""); But I always get an empty iterator. Is this the correct way to get all entries?

Qeven (Thu, 05 Dec 2019 07:09:09 GMT):
Has joined the channel.

icordoba (Thu, 05 Dec 2019 14:24:58 GMT):
Hi, anybody has an example of code to subscribe to events for the transaction that the client has just submitted? I mean... I want my client to do a putState() and be able to wait until that transaction is finished and distributed, but only to that transaction (not other transactions that may occur in at the same time).

bestbeforetoday (Thu, 05 Dec 2019 15:06:40 GMT):
Using the _fabric-gateway-java_ API, you get this behaviour (by default for your organization peers) out-of-the-box. You can select from several alternative commit handling strategies, or write your own implementation if the defaults do not suit you: - https://fabric-gateway-java.github.io/org/hyperledger/fabric/gateway/Gateway.Builder.html#commitHandler-org.hyperledger.fabric.gateway.spi.CommitHandlerFactory- If you do need custom behaviour, there is a sample implementation in the "See Also" links on this page: - https://fabric-gateway-java.github.io/org/hyperledger/fabric/gateway/spi/CommitHandler.html As mentioned on that page, you can easily listen for transaction commit events from specific peers using `Network.addCommitListener()`: - https://fabric-gateway-java.github.io/org/hyperledger/fabric/gateway/Network.html#addCommitListener-org.hyperledger.fabric.gateway.spi.CommitListener-java.util.Collection-java.lang.String-

icordoba (Thu, 05 Dec 2019 15:24:44 GMT):
Thanks @bestbeforetoday Do I need to add any SetEvent() method in chaincode right after the putState() or it is not needed? (Just putState will do?)

bestbeforetoday (Thu, 05 Dec 2019 15:29:44 GMT):
SetEvent() is just for emitting chaincode (which the client API calls Contract) events, which you might use to send out additional information related to a transaction only when it is committed. The transaction commit events happen automatically when each peers commits the transaction. You don't have to write any code for this to happen

icordoba (Thu, 05 Dec 2019 15:39:56 GMT):
Great. Thanks @bestbeforetoday . If you can link here to some example of using addCommitListener() method in the client code that will help a lot. (I don't know how to get the Network or Gateway objects. I just have FabricClient and ChannelClient objects in my code, no Network or Gateway)

bestbeforetoday (Thu, 05 Dec 2019 15:43:45 GMT):
Are you sure you're using the Java SDK? Those object types don't look familiar to me. There is a usage example of the _fabric-gateway-java_ API in the overview page for the API documentation: - https://fabric-gateway-java.github.io/

bestbeforetoday (Thu, 05 Dec 2019 15:44:16 GMT):
You probably won't need to add your own commit listeners as there are several default commit handling options available

icordoba (Thu, 05 Dec 2019 15:45:43 GMT):
I'm sorry, I pasted my own library classes (coded months ago). I'll check them to figure out. Again, thanks a lot.

bestbeforetoday (Thu, 05 Dec 2019 15:45:57 GMT):
If you do then there is an example of usage mentioned in my first reply in this thread, but for reference: - https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/java/org/hyperledger/fabric/gateway/sample/SampleCommitHandler.java

icordoba (Thu, 05 Dec 2019 15:56:35 GMT):
@bestbeforetoday Sorry again. I use org.hyperledger.fabric.sdk.HFClient class to create a transaction proposal which then I use org.hyperledger.fabric.sdk.Channel to send the transaction to the channel. sorry I don't find Network or Gateway objects from there. Any directions? Thanks

bestbeforetoday (Thu, 05 Dec 2019 16:01:56 GMT):
When calling `sendTransaction` to send the proposal responses to the orderer, you can pass options, which include configuring nOfEvents: - https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/Channel.html#sendTransaction-java.util.Collection-org.hyperledger.fabric.sdk.Channel.TransactionOptions- This can make it wait for a certain number of commit events before the Future completes

icordoba (Thu, 05 Dec 2019 16:03:11 GMT):
OK, this means I don't need to use listener approach right? Just wait for that Completable future?

bestbeforetoday (Thu, 05 Dec 2019 16:03:53 GMT):
Alternatively you can roll your own by specifying `nofNoEvents` to have the send unblock immediately and then attach a block listener to listen for commit events that you care about using `Channel.registerBlockListener()`: - https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/Channel.html#registerBlockListener-org.hyperledger.fabric.sdk.BlockListener-

icordoba (Thu, 05 Dec 2019 16:04:26 GMT):
The "certain number of commit events" works for me I guess. I'll try that.

bestbeforetoday (Thu, 05 Dec 2019 16:05:31 GMT):
Yes, if all you care about is receiving commit events from certain peers (or a certain number of events), you can use the nOfEvents mechanism. Just take care that it doesn't deal with peers not being available or disconnecting. The high level API does deal with these cases

icordoba (Thu, 05 Dec 2019 16:05:48 GMT):
ok cool. thanks

Purbaja (Fri, 06 Dec 2019 08:01:12 GMT):
Hi @bestbeforetoday thanks for ur suggestion. i switched to fabric-gateway. I tried to build dynamic gateway object . so set discover true as: builder.identity(wallet, userName).networkConfig(connectionProfile).discovery(true); But getting below error while submitting transaction org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: The channel is not configured with any peers with the 'discover' role at org.hyperledger.fabric.gateway.impl.TransactionImpl.submit(TransactionImpl.java:118) at org.hyperledger.fabric.gateway.impl.ContractImpl.submitTransaction(ContractImpl.java:50)

Purbaja (Fri, 06 Dec 2019 09:26:40 GMT):
Hi @bestbeforetoday , thanks for ur suggestion. I have switched to fabric-gateway. Is there any example of contractListener?

Purbaja (Fri, 06 Dec 2019 10:22:48 GMT):
@bestbeforetoday , I checked ur previous post and tried below: Consumer cb = event -> { byte[] x = event.getPayload().get(); System.out.println(new String(x, StandardCharsets.UTF_8)); }; Consumer y = contract.addContractListener(0,cb, "MyEvent"); Now, the event is coming but the listener is getting stopped immidiately. How the listener can run continuously?

Purbaja (Fri, 06 Dec 2019 10:22:48 GMT):
@bestbeforetoday , I checked ur previous post and tried below: Consumer cb = event -> { byte[] x = event.getPayload().get(); System.out.println(new String(x, StandardCharsets.UTF_8)); }; Consumer y = contract.addContractListener(0,cb, "MyEvent"); but is there any observable present for contract listener in fabric-gateway , so that my listener can continuously listen events?

roberto.cangiamila (Fri, 06 Dec 2019 10:43:46 GMT):
Has joined the channel.

roberto.cangiamila (Fri, 06 Dec 2019 10:43:47 GMT):
Hi all .. i needs to ask you a question about chaincode event lister registration .. is there a way to pass an offset in registerChaincodeEventListener Channel class call?

roberto.cangiamila (Fri, 06 Dec 2019 10:46:15 GMT):
i have to initialize chaincode event retrieve from a specific point ..

Purbaja (Mon, 09 Dec 2019 09:19:39 GMT):
Is there any observable present in fabric-gateway-java for contractEventListener?

Purbaja (Mon, 09 Dec 2019 09:19:39 GMT):
Is there any observable present in fabric-gateway-java for contractEventListener? otherwise only the first event is coming to the listener. Then onward no event is coming.

Purbaja (Mon, 09 Dec 2019 09:33:04 GMT):
listener

Purbaja (Tue, 10 Dec 2019 11:15:06 GMT):
Hi @bestbeforetoday , there was some issue in my code. Now the gateway contractListener is running and events are coming. But the listener is getting stopped after some time. Is there any default timeout set in the gateway?

shrivastava.amit (Wed, 11 Dec 2019 09:54:35 GMT):
Has joined the channel.

bestbeforetoday (Wed, 11 Dec 2019 09:57:58 GMT):
@Purbaja There should not be any timeout and your listener should continue receiving events either until it is disconnected or your client application is shut down. One thing you could try is... when you listener appears to stop receiving events, grab the result of calling `toString()` on the associated Network object, and post that in a Jira mentioning that your listener is not receiving events: https://jira.hyperledger.org/projects/FGJ

billd100 (Wed, 11 Dec 2019 14:55:29 GMT):
Has joined the channel.

Purbaja (Thu, 12 Dec 2019 12:58:14 GMT):
Hi @bestbeforetoday , i tried capturing the associated object, but i am not getting the actual point when the listener is getting stopped

Purbaja (Thu, 12 Dec 2019 13:20:24 GMT):
I have a question.. for a chaincodeEvent if the associated chaincode is deployed/installed in two peers, then will both the peers get the event through contractListener? Or only one peer will get the event at a time?

bestbeforetoday (Thu, 12 Dec 2019 13:54:28 GMT):
The contract listener will only get the chaincode event once

AkilaVasanthakumar (Fri, 13 Dec 2019 08:48:32 GMT):
Fabric-ca using java-gateway-sdk Requirement: My requirement is to do the register, enroll operations in fabric-ca using java-gateway-sdk. What I have tried: Started the fabric-ca server in a vm(say vm1). Tried to access the fabric-ca server from another vm(say vm2). I can able to enroll the admin, register and enroll the user using api. I also got the result in server after register and enroll processes as: POST /api/v1/enroll 201 0 "OK" (admin enrollment) POST /api/v1/cainfo 200 0 "OK" POST /api/v1/register 201 0 "OK" (user registration) signed certificate with serial number 75758730054339427289657557776062433601010825862 POST /api/v1/enroll 201 0 "OK" (user enrollment) So We can assume that, vm1 can receive the enroll and register request from vm2. Now the problem is, the generated certificates after the enrollment of the user has got stored in the wallet in the vm2 itself(that is, from where I done the api request for register and enrollment). Actually, I need that certificates to get stored in vm1(where the fabric-ca server is running). Can anyone guide me on this? Please reply asap.

Paradox-AT (Mon, 16 Dec 2019 11:20:14 GMT):
You will get the certificate where the client is running. In your case the client is running on VM2 so it got stored there

Paradox-AT (Mon, 16 Dec 2019 11:20:50 GMT):
If you need it in VM1 run your client and server on the same machine

Paradox-AT (Mon, 16 Dec 2019 11:23:07 GMT):
Hey Guys, How do I add attributes to the certificates? I am doing something like this: ``` registrationRequest.addAttribute(new Attribute("permission", "P1,P2")); ``` But while looking at the certificate there is no attribute

Paradox-AT (Mon, 16 Dec 2019 11:23:07 GMT):
Hey Guys, How do I add attributes to the certificates? I am doing something like this: ``` registrationRequest.addAttribute(new Attribute("permission", "P1,P2")); ``` But while looking at the certificate there is no attribute Can anyone help?

Paradox-AT (Mon, 16 Dec 2019 11:23:07 GMT):
Hey Guys, How do I add attributes to the certificates? I am doing something like this: ``` registrationRequest.addAttribute(new Attribute("permission", "P1,P2")); ``` But while looking at the certificate there is no attribute Please help

Paradox-AT (Mon, 16 Dec 2019 11:58:59 GMT):
You will get the certificate where the client is running. In your case the client is running on VM2 so it got stored there If you need it in VM1 run your client and server on the same machine

AkilaVasanthakumar (Mon, 16 Dec 2019 12:27:04 GMT):
We have tried to set up a native fabric-ca server in a TLS enabled environment. After the successful setup of ca, we have enrolled/registed users in CA, brought up the network with 1-Org,1-Orderer,2-Peer(All setup natively and TLS enabled). We have developed a java based webapplication using Java SDK to connect to the above mentioned setup. However while trying to invoke/query the chaincodes, SDK throws the below error: . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.2.1.RELEASE) 2019-12-16 17:21:42.850 INFO 32154 --- [ main] o.e.demoFabcar.DemoFabcarApplication : Starting DemoFabcarApplication with PID 32154 (/home/akila/Documents/Fabric-java-sdk-webApp/demo-Fabcar/src/main/resources/demo-Fabcar-0.0.1-SNAPSHOT.jar started by akila in /home/akila/Documents/Fabric-java-sdk-webApp/demo-Fabcar/src/main/resources) 2019-12-16 17:21:42.853 INFO 32154 --- [ main] o.e.demoFabcar.DemoFabcarApplication : No active profile set, falling back to default profiles: default 2019-12-16 17:21:43.903 INFO 32154 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2019-12-16 17:21:43.914 INFO 32154 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-12-16 17:21:43.915 INFO 32154 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.27] 2019-12-16 17:21:43.972 INFO 32154 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2019-12-16 17:21:43.972 INFO 32154 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1073 ms 2019-12-16 17:21:44.128 INFO 32154 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2019-12-16 17:21:44.332 INFO 32154 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2019-12-16 17:21:44.335 INFO 32154 --- [ main] o.e.demoFabcar.DemoFabcarApplication : Started DemoFabcarApplication in 1.854 seconds (JVM running for 2.284) 2019-12-16 17:21:48.707 INFO 32154 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' 2019-12-16 17:21:48.707 INFO 32154 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' 2019-12-16 17:21:48.711 INFO 32154 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 4 ms 2019-12-16 17:21:49.033 WARN 32154 --- [nio-8080-exec-1] o.hyperledger.fabric.sdk.helper.Config : Failed to load any configuration from: config.properties. Using toolkit defaults gateway log msg :::org.hyperledger.fabric.gateway.impl.GatewayImpl@37faf39b 2019-12-16 17:21:50.934 ERROR 32154 --- [nio-8080-exec-1] org.hyperledger.fabric.sdk.Channel : Channel Channel{id: 1, name: composerchannelrest} Sending proposal with transaction: 42b80b210bddd8219ea095bd8894572435f9d9f32354651b54b045c12f75ef1a to Peer{ id: 3, name: peer0.org0, channelName: composerchannelrest, url: grpcs://104.215.67.23:7051, mspid: Org0MSP} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [composerchannelrest] creator org [Org0MSP], cause=null} Any help regarding this is greatly appreciated.

sandy (Mon, 16 Dec 2019 14:53:37 GMT):
Hi.. If I tend to use DefaultCommitHandlers in fabric gateway, how do I listen and do my own handling during commitEvents ?

sandy (Mon, 16 Dec 2019 14:55:48 GMT):
@bestbeforetoday

bestbeforetoday (Tue, 17 Dec 2019 09:51:54 GMT):
What kind of handling are you looking to do? - If you want to take some action after the transaction has been committed on peers then just do it after the transaction submit returns. - If you want to implement your own rules for when a transaction is considered committed from the default handlers, you can implement your own commit handler. See https://hyperledger.github.io/fabric-gateway-java/release-1.4/org/hyperledger/fabric/gateway/spi/CommitHandlerFactory.html - Another option is to have your transactions explicitly emit events to let you know that certain things have happened. These events can include additional information. For example, a _createCar_ transaction function could emit a _carCreated_ event including the unique identifier of the newly created car. Your client can listen for these events using `Contract.addContractListener()`: https://hyperledger.github.io/fabric-gateway-java/release-1.4/org/hyperledger/fabric/gateway/Contract.html#addContractListener-java.util.function.Consumer-

ranjan008 (Tue, 17 Dec 2019 10:38:13 GMT):
I am using below policy, I want an endorsement from 1 peer from both the organization, however in this case it is taking the endorsement from 2 peers of the same organization and the transaction goes through, Is this format right for an AND situation or need any change?

ranjan008 (Tue, 17 Dec 2019 10:38:17 GMT):
identities: user1: {"role": {"name": "member", "mspId": "ABCMSP"}} user2: {"role": {"name": "member", "mspId": "XYZMSP"}} policy: 2-of: - 1-of: - signed-by: "user1" - 1-of: - signed-by: "user2"

SatheeshNehru (Tue, 17 Dec 2019 12:38:56 GMT):
how to get instance of Systemchannel?? is it possible add org to consortium(i.e updating system channel configuration) via fabric java sdk?

SatheeshNehru (Tue, 17 Dec 2019 12:40:26 GMT):
#fabric-questions #fabric-java-chaincode #fabric-orderer #fabric-orderer-dev #fabric-sdk-java

Purbaja (Wed, 18 Dec 2019 05:39:46 GMT):
While using fabric-gateway services with service discovery on , I am getting below exception.What could be possible root cause for this ? org.hyperledger.fabric.gateway.GatewayRuntimeException: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: java.util.concurrent.TimeoutException at org.hyperledger.fabric.gateway.impl.TransactionImpl.submit(TransactionImpl.java:118) ~[fabric-gateway-java-1.4.0.jar!/:na] at org.hyperledger.fabric.gateway.impl.ContractImpl.submitTransaction(ContractImpl.java:50) ~[fabric-gateway-java-1.4.0.jar!/:na]

Purbaja (Wed, 18 Dec 2019 09:34:34 GMT):
In fabric-gateway-java the contract.submitTransaction() is returning only the contract response. SO, if we need the transaction hash, how to get that?

bestbeforetoday (Wed, 18 Dec 2019 09:40:45 GMT):
I would guess it timed out waiting for a service discovery response

bestbeforetoday (Wed, 18 Dec 2019 09:48:36 GMT):
Do you mean the block hash? One or more transactions get committed together in a block once they have been pushed out to committing peers by the orderer. You can add a block listener to the Network object and examine the data hash and previous block hash for each block event that arrives

Purbaja (Wed, 18 Dec 2019 09:55:58 GMT):
I need the individual transaction id

Purbaja (Wed, 18 Dec 2019 09:59:14 GMT):
like we used to get in the fabric-sdk through ProposalResponse.getTransactionID()

bestbeforetoday (Wed, 18 Dec 2019 10:46:41 GMT):
Unfortunately, as you point out, the transaction ID is not surfaced by the low level SDK until after proposal responses are received, so the high level SDK does not know in advance of the `Transaction.submit()` call what the transaction ID will be. In the Node SDK we expose this with `Transaction.getTransactionID()` because this can be generated in advance of sending the transaction proposals. In practice, this typically only gets used I to wait for commit events from that transaction, which isn't necessary because the high level SDK takes care of that for you. And if you want more control of how commit events are handled you can write your own commit handler, which gets given the transaction ID

bestbeforetoday (Wed, 18 Dec 2019 10:46:41 GMT):
Unfortunately, as you point out, the transaction ID is not surfaced by the low level SDK until after proposal responses are received, so the high level SDK does not know in advance of the `Transaction.submit()` call what the transaction ID will be. In the Node SDK we expose this with `Transaction.getTransactionID()` because this can be generated in advance of sending the transaction proposals. In practice, this typically only gets used to wait for commit events from that transaction, which isn't necessary because the high level SDK takes care of that for you. And if you want more control of how commit events are handled you can write your own commit handler, which gets given the transaction ID

bestbeforetoday (Wed, 18 Dec 2019 10:49:42 GMT):
Have you got a different use case from listening to commit events that means you need the transaction ID? If so, please could you raise a Jira describing this requirement: - https://jira.hyperledger.org/projects/FGJ We might be able to change the implementation so that you can get the transaction ID similar to how this is done in the Node SDK.

ShobhitSrivastava (Thu, 19 Dec 2019 07:06:44 GMT):
Hey!! did you figure this out. I am stuck in it.

ShrutiHK (Thu, 19 Dec 2019 08:27:07 GMT):
Hi All,

ShrutiHK (Thu, 19 Dec 2019 08:27:13 GMT):
I am setting up a TLS enabled network on separate VMs, and testing a fabric-java-sdk based client application with this network The network has 1 Orderer, 1 Org with 2 peers, and a Fabric - CA I am able to register and enroll users from my client application on Fabric CA But invoke and query fail with the error - access denied for the creator Org I am using fabric-gateway-sdk for java Can you please advice, how can I fix the issue?

ShrutiHK (Thu, 19 Dec 2019 08:45:12 GMT):
We are stuck in resolving the issue since a long time. The setup works in dockerized setup on a single VM, but not on separate VMs

ShrutiHK (Thu, 19 Dec 2019 08:46:31 GMT):
Any help is appreciated.

ShrutiHK (Thu, 19 Dec 2019 08:47:23 GMT):
Has anyone worked on a similar setup?

bestbeforetoday (Fri, 20 Dec 2019 11:06:42 GMT):
Some of the test code works with certificate attributes and might help as an example: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric_ca/sdkintegration/HFCAClientIT.java#L161

bestbeforetoday (Fri, 20 Dec 2019 11:11:08 GMT):
It's not obvious to me what the issue is but, particularly if it does work with local docker containers, I would check all the certificates are correctly generated and configured. TLS certificates will need to correctly reflect the external host names of the nodes in the network

ShobhitSrivastava (Fri, 20 Dec 2019 12:05:31 GMT):
please check the certificate content which we received after registering via fabric-ca. We need to have signedpem. Debug the fabric sdk and check the certificate content when you are enrolling the user. I can help post christmas if you need any code snippet. Thanks

Purbaja (Fri, 20 Dec 2019 12:34:26 GMT):
Does fabric-gateway supports key externalization? i mean without using fabric-ca if we use our own CA where keys are externalized can we create wallet in fabric-gateway?

bestbeforetoday (Fri, 20 Dec 2019 14:14:16 GMT):
Wallets just hold X.509 certificates and private keys. The wallet doesn't care how the credentials are obtained. To allow connection to the network they will need to be recognised as valid network credentials, which probably means signed by whatever CA is configured for your network.

manivannant (Sat, 21 Dec 2019 08:11:55 GMT):
Has joined the channel.

ShrutiHK (Mon, 23 Dec 2019 08:34:41 GMT):
Thanks for your reply, will connect with you again post Christmas. It would be great if you can share some code snippet for the same. Till then, I will check what you have suggested.

ShrutiHK (Mon, 23 Dec 2019 08:36:02 GMT):
I have checked this, everything seems correctly configured. May be will share some logs with you.

ShrutiHK (Tue, 24 Dec 2019 07:08:32 GMT):
I am unable to query the chaincodes on my Org0 peers using the Fabric-CA generated certificates

ShrutiHK (Tue, 24 Dec 2019 07:09:19 GMT):
But if I replace the certificate content with the content from Admin@org0-cert.pem, it works

ShrutiHK (Tue, 24 Dec 2019 07:09:42 GMT):
I have added the Fabric CA VM to my network later

ShrutiHK (Tue, 24 Dec 2019 07:10:01 GMT):
What can be the issue with the certificates generated by Fabric CA?

rahulsingh79 (Wed, 25 Dec 2019 06:37:41 GMT):
Has joined the channel.

konda.kalyan (Thu, 26 Dec 2019 06:01:47 GMT):
Has joined the channel.

Paradox-AT (Sun, 29 Dec 2019 08:59:10 GMT):
Hey I was able to figure things out

Paradox-AT (Sun, 29 Dec 2019 09:00:09 GMT):
I had to pass default policies as true while issuing the certificate

Paradox-AT (Sun, 29 Dec 2019 09:00:28 GMT):
What is your problem @ShobhitSrivastava ?

HectorRen (Tue, 31 Dec 2019 16:17:24 GMT):
Has joined the channel.

ShobhitSrivastava (Thu, 02 Jan 2020 07:09:23 GMT):
Hi @Paradox-AT . I was doing as below " RegistrationRequest rr = new RegistrationRequest(user.getName(), "org1.department1"); rr.addAttribute(new Attribute("email", "shobhit@test"));"

ShobhitSrivastava (Thu, 02 Jan 2020 07:10:05 GMT):
and in chaincode I was fetching the "email", but could not get this

kelvinzhong (Thu, 02 Jan 2020 07:46:20 GMT):
@bestbeforetoday hi I wonder if I can override the grpcs properties while doing the service discovery. since I use a nignx to proxy the network, the service discovery could not work properly and I need to override the grpc properties, but seems the java sdk did not provide a interface to do that

dwusiq (Mon, 06 Jan 2020 07:18:19 GMT):
Has joined the channel.

dwusiq (Mon, 06 Jan 2020 07:18:20 GMT):
WARN PeerEventServiceClient(:) - Received error on PeerEventServiceClient{id: 21, channel: mychannel, peerName: peer1.org2.example.com:10051, url: grpcs://peer1.org2.example.com:10051}, attempts 1. UNAVAILABLE: Unable to resolve host peer1.org2.example.com

dwusiq (Mon, 06 Jan 2020 07:20:41 GMT):
i use fabric-gateway-java, but throw exception: WARN PeerEventServiceClient(:) - Received error on PeerEventServiceClient{id: 21, channel: mychannel, peerName: peer1.org2.example.com:10051, url: grpcs://peer1.org2.example.com:10051}, attempts 1. UNAVAILABLE: Unable to resolve host peer1.org2.example.com how can I fix the issue?

bestbeforetoday (Tue, 07 Jan 2020 11:58:51 GMT):
I am guessing that your peer is running in a Docker container on your local machine. If so, you have two options: 1. Add entries for your containers to your hosts file so they resolve to localhost, for example: ```127.0.0.1 peer1.org2.example.com ``` 2. Set the environment variable `org.hyperledger.fabric.sdk.service_discovery.as_localhost` to `true` to indicate that discovered nodes should resolve as localhost

Flyyellow (Thu, 09 Jan 2020 01:05:16 GMT):
Has joined the channel.

ShobhitSrivastava (Fri, 10 Jan 2020 09:52:46 GMT):
*asdasd_asdsadasd_*

yeousunn (Mon, 13 Jan 2020 05:45:46 GMT):
Hi Guys, I have a QueryAll function in which I need to pass range of keys and it should returns all the state within the range. It is working fine. But I find it weird in some cases. I have key values as : 101, 102, 103.... When I pass ["101","103"] It returns 101, 102 as expected. and when I pass ["1","2"] It returns all the values 101,102,103 is it expected behavior?

yeousunn (Mon, 13 Jan 2020 05:45:46 GMT):
Hi Guys, I have a QueryAll function in which I need to pass range of keys and it should returns all the state within the range. It is working fine. But I find it weird in some cases. I have key values as : 101, 102, 103.... When I pass ["101","103"] It returns 101, 102 as expected. and when I pass ["1","2"] It returns all the values 101,102,103 is it expected behavior? I am calling `ctx.getStub().getStateByRange(key1, key2);`

yeousunn (Mon, 13 Jan 2020 05:45:46 GMT):
Hi Guys, I have a queryAll function in which I need to pass range of keys and it should returns all the state within the range. It is working fine. But I find it weird in some cases. I have key values as : 101, 102, 103.... When I pass ["101","103"] It returns 101, 102 as expected. and when I pass ["1","2"] It returns all the values 101,102,103 is it expected behavior? I am calling `ctx.getStub().getStateByRange(key1, key2);`

medikent (Mon, 13 Jan 2020 18:42:19 GMT):
@ShrutiHK You may have a mismatch between your CA identities and your generated crypto material on the network. If you created CA Identities and then wiped and recreated your crypto-config directory without clearing out your CA Identities then using your existing CA identities would give you access denied errors.

bestbeforetoday (Tue, 14 Jan 2020 10:13:58 GMT):
I would suggest asking this question on #fabric-chaincode-dev

PauloQuerido (Fri, 17 Jan 2020 16:01:58 GMT):
Has joined the channel.

PauloQuerido (Fri, 17 Jan 2020 16:01:59 GMT):
Hi, I'm new to Hyperledger Fabric and in my first time trying to run the Fabcar example in Java i get the following error: "Error: could not assemble transaction, err proposal response was not successful, error code 500, msg chaincode registration failed: container exited with 1" Anyone knows how to fix this issue? I can run the code in javascript but not in java

bestbeforetoday (Fri, 17 Jan 2020 16:48:34 GMT):
Sounds like something went wrong with the install/instantiate/start of the chaincode. Perhaps the logs on the peer will give you some clues. If the peer is in a Docker container then you should be able to use `docker logs` to view them. Also look at stopped chaincode Docker containers, which might be left over if the chaincode container failed to start cleanly

Paradox-AT (Mon, 20 Jan 2020 10:58:56 GMT):
rr.addAttribute(new Attribute("email", "shobhit@test",true));"

Paradox-AT (Mon, 20 Jan 2020 10:58:56 GMT):
Try this: rr.addAttribute(new Attribute("email", "shobhit@test",true));"

Paradox-AT (Mon, 20 Jan 2020 10:58:56 GMT):
Try this:``` rr.addAttribute(new Attribute("email", "shobhit@test",true));"```

JanKosecki (Mon, 20 Jan 2020 11:37:35 GMT):
Hi guys, I'm running java service that uses Fabric SDK ServiceDiscovery and I'm seeing quite often an errors `Failed to discover peer endpoint information XXX for chaincode YYY` - the discovery runs every 120 seconds, but this errors doesn't always happen, however it definitely causes lots of noise in the logs. I don't want to change log level to ERROR as it could hide other more useful warn messages

JanKosecki (Mon, 20 Jan 2020 11:37:35 GMT):
Hi guys, I'm running java service that uses Fabric SDK ServiceDiscovery and I'm seeing quite often errors like `Failed to discover peer endpoint information XXX for chaincode YYY` - the discovery runs every 120 seconds, but this errors doesn't always happen, however it definitely causes lots of noise in the logs. I don't want to change log level to ERROR as it could hide other more useful warn messages

JanKosecki (Mon, 20 Jan 2020 11:37:35 GMT):
Hi guys, I'm running java service that uses Fabric SDK ServiceDiscovery and I'm seeing quite often errors like `Failed to discover peer endpoint information XXX for chaincode YYY` - the discovery runs every 120 seconds and this error doesn't happen all the time, however it definitely causes lots of noise in the logs of my service. I don't want to change log level to ERROR as it could hide other more useful warn messages

Purbaja (Mon, 20 Jan 2020 11:40:28 GMT):
From my fabric-java-sdk i want to register a new user using fabric-ca-client. Is there any example present?

bestbeforetoday (Tue, 21 Jan 2020 09:43:53 GMT):
By coincidence, somebody recently reported an issue using the Node SDK that sounded like it might have been caused by failure to obtain service discovery information: https://chat.hyperledger.org/channel/fabric-sdk-node?msg=7ekkDPb4Ccnq6Ttce I am not aware of a bug in service discovery that might be causing this but that doesn't mean there isn't one. I'll try to find somebody from the server end to take a look

Purbaja (Tue, 21 Jan 2020 13:21:08 GMT):
While registering a new user through fabric-ca I am getting Affiliation validation exception. org.hyperledger.fabric_ca.sdk.exception.HTTPException: POST request to https://XXX:7054 failed request body {"id":"User3","type":"client","affiliation":"org1","attrs":[]}. Response: {"result":"","errors":[{"code":0,"message":"Registration of 'User3' failed in affiliation validation: Failed getting affiliation 'org1': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set"} ],"messages":[],"success":false} at org.hyperledger.fabric_ca.sdk.HFCAClient.getResult(HFCAClient.java:1456) at org.hyperledger.fabric_ca.sdk.HFCAClient.post(HFCAClient.java:1374) at org.hyperledger.fabric_ca.sdk.HFCAClient.httpPost(HFCAClient.java:1348) at org.hyperledger.fabric_ca.sdk.HFCAClient.register(HFCAClient.java:395)

medikent (Wed, 22 Jan 2020 00:41:45 GMT):
After connecting to a Fabric network with `Gateway` is there a need to also add a contract listener with ` addContractListener(Consumer)` to know for sure when the transaction is complete?

dineshthemacho1 (Wed, 22 Jan 2020 06:05:06 GMT):
Has joined the channel.

bestbeforetoday (Wed, 22 Jan 2020 09:46:33 GMT):
Absolutely not! `Contract.submitTransaction()` (and `Contract.createTransaction().submit()`) but use whatever commit handling strategy you have configured at the Gateway to wait for the transaction to be committed on peers before returning. The implementation uses `Network.addCommitHandler()` to listen for commit events (and disconnections) from relevant peers. `Contract.addContractListener()` is for listening to contract (chaincode) events emitted by transaction implementation code, so might be used to coordinate business processes or logic. For example, a transaction function that creates an order might emit an event that is received by some client code, which in turn kicks off some business process to fulfil the order

bestbeforetoday (Wed, 22 Jan 2020 09:47:24 GMT):
Do have a look at the different commit handling strategies to make sure you're using one appropriate to your situation. If none of them do exactly what you want then you can write your own custom implementation

medikent (Wed, 22 Jan 2020 18:15:46 GMT):
I suspected as much when I saw the `DefaultCommitHandlers` enum. Thank you for clarifying the behavior and purpose of `Contract.addContractListener()`.

bestbeforetoday (Thu, 23 Jan 2020 09:39:57 GMT):
You're welcome. I realise the Javadoc doesn't give any description of the context in which you might want to use each of the listener types. I figured the main Fabric docs are the place to cover these concepts since they are common to all client (and smart contract) SDKs. Now I'm wondering if the Javadoc should at least contain some context on usage. Or at the very least, the doc for `submit()` should make it clear that it will use the commit handler to determine how it will wait for commit events before returning. What do you think?

bestbeforetoday (Thu, 23 Jan 2020 09:47:17 GMT):
I've raised this Jira for the submit Javadoc anyway: https://jira.hyperledger.org/browse/FGJ-73

Tatse (Thu, 23 Jan 2020 14:49:08 GMT):
Has joined the channel.

icordoba (Fri, 24 Jan 2020 19:12:54 GMT):
My chaincode running on Kubernetes has some problem and the docker instances seem to be dying frequently. After this, a new instance is started but it takes some time so first request is always lost. I am getting this error (I use Fabric Java SDK):

icordoba (Fri, 24 Jan 2020 19:12:58 GMT):
2020-01-24 16:00:58.705 ERROR 1 --- [nio-8080-exec-6] org.hyperledger.fabric.sdk.Channel : Channel Channel{id: 1, name: mrrc} sending proposal with transaction 23df885c323a56a2fab469de59f4744305690cad1151d202227b4b0ad416be51 to Peer{ id: 2, name: blockchain-hapeer1, channelName: mrrc, url: grpcs://blockchain-hapeer1:7051} failed because of timeout(1000 milliseconds) expiration

icordoba (Fri, 24 Jan 2020 19:13:07 GMT):
Until I figure out why Java chaincode Pods are respawning, how can I increase that proposal wait timeout? I have read online that value is org.hyperledger.fabric.sdk.proposal.wait.time but how and where should I pass it to the Fabric Java SDK classes?

icordoba (Fri, 24 Jan 2020 19:16:52 GMT):
Let me ask another quesiton: I have a simple Hyperledger Fabric network with just 2 peers using Kubernetes. Peer 1 is having load issues and it periodically is respawning, which is a problem as it won't be restarted until a request is received. This first request returns timeout as it needs some time to start (I am using java chaincode) I have seen that peer2 gets no request or transaction from the orderer. How should I configure the orderer to balance transactions between both peers?

icordoba (Fri, 24 Jan 2020 19:16:56 GMT):
I also want to balance the queries to the chaincode. I am using fabric Java SDK. What is the recommended approach to distribute the queries to both peers and not just to the first one? Currently, peer 2 is completely unused by Orderer or Java SDK client.

nitishbhardwaj19 (Sun, 26 Jan 2020 08:34:15 GMT):
Have you tried enabling service discovery? It will automatically choose any available peer based on the load and availability .

nitishbhardwaj19 (Sun, 26 Jan 2020 08:37:26 GMT):
What kind of operation you are trying to perform? Is it any administration task or a simple chaincode invoke? You need to use **Admin Cert** for performing the administrative tasks like installing, instantiating chaincode

nitishbhardwaj19 (Sun, 26 Jan 2020 08:42:50 GMT):
@bestbeforetoday Thanks for your active support. Your inputs are always helpful. I am just trying to switch from fabric-sdk-java to gateway-java. I went through the API docs, looks pretty interesting and simple to use. What I couldn't find is that do we have support to perform administrative activities using Gateway? I.e. creation of channel, installation/instantiation of chaincode, join or add peers with Gateways? Or Gateways are just for invoke and query? Would be great if you can share some details about it. Thanks.

davidkel (Sun, 26 Jan 2020 09:14:11 GMT):
The gateway implemention doesn't include any operational/administrative capabilities.

nitishbhardwaj19 (Sun, 26 Jan 2020 09:14:52 GMT):
Thanks for the confirmation @davidkel

nitishbhardwaj19 (Tue, 28 Jan 2020 08:13:11 GMT):
Does anyone knows if we have capability to sign transactions offline with fabric-sdk-java? We do this feature with fabric-sdk-node, I hope we must have it for java too. Has anyone tried it with java? Where can I get some references? FYI - @bestbeforetoday

nitishbhardwaj19 (Tue, 28 Jan 2020 08:13:11 GMT):
Does anyone knows if we have capability to sign transactions offline with fabric-sdk-java? We do this feature with fabric-sdk-node, I hope we must have it for java too. Has anyone tried it with java? Where can I get some references? Nodesdk's reference to sign transactions offline: https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-sign-transaction-offline.html FYI - @bestbeforetoday

lzaouche (Tue, 28 Jan 2020 09:18:06 GMT):
Has joined the channel.

bestbeforetoday (Tue, 28 Jan 2020 09:35:32 GMT):
If using the _fabric-gateway_ API, you can simply select the round robin query handler when connecting your Gateway. If using the low level _fabric-sdk-java_ API then you can specify the peers a proposal should be sent to in the call to `Channel.queryByChaincode()`

medikent (Tue, 28 Jan 2020 14:28:07 GMT):
I agree. I'll send you a PR.

medikent (Tue, 28 Jan 2020 14:29:59 GMT):
@nitishbhardwaj19 what is your use case for performing administrative activities through the SDK?

medikent (Tue, 28 Jan 2020 14:30:18 GMT):
Haven't heard of that. It would be cool to implement though. If it doesn't exist we should add it.

bestbeforetoday (Tue, 28 Jan 2020 16:59:47 GMT):
I don't have a very authoritative answer for you but this may help. I think the signing of proposals is all handled by the `byte[] sign(PrivateKey key, byte[] plainText)` method on the CryptoSuite set on the HFClient. Perhaps you could configure your client with your own CryptoSuite implementation with your own signing implementation. That would hook you into the `Channel.sendTransactionProposal()` flow, but it doesn't give you a mechanism to sign transaction proposals completely independently and then submit the previously signed proposals directly

nitishbhardwaj19 (Tue, 28 Jan 2020 17:02:52 GMT):
Thanks @bestbeforetoday I guess this is good enough :)

nitishbhardwaj19 (Tue, 28 Jan 2020 17:13:56 GMT):
I wanted this because I wanted to use Azure-key vault to store user's certificates and use it to sign the transaction. It provides it's own implementation to sign a message. Just wanted to know if we can leverage that and plugin with the overall flow.

nitishbhardwaj19 (Wed, 29 Jan 2020 04:53:16 GMT):
@medikent to create channel, join peers to channel, install and instantiate chaicode

bestbeforetoday (Wed, 29 Jan 2020 09:42:10 GMT):
The (current) direction for Fabric as a whole seems to focus on command-line tools for administrative tasks rather than having these capabilities implemented in all of the different language SDKs. I don't know whether that may change in the future but for now there isn't a plan to extend the Gateway API with admin capabilities

nitishbhardwaj19 (Wed, 29 Jan 2020 09:44:31 GMT):
Good to know, thanks for information.

nitishbhardwaj19 (Wed, 29 Jan 2020 09:44:31 GMT):
Good to know, thanks for the information.

medikent (Wed, 29 Jan 2020 15:51:11 GMT):
we should do this

medikent (Wed, 29 Jan 2020 15:52:33 GMT):
For automation purposes it would be cool to be able to use the SDKs to perform these capabilities.

icordoba (Wed, 29 Jan 2020 20:16:05 GMT):
Thanks @nitishbhardwaj19 I have checked the documentation at https://hyperledger-fabric.readthedocs.io/en/release-1.4/discovery-overview.html but I don't get to understand how to get it to work. I have added CORE_PEER_GOSSIP_EXTERNALENDPOINT to the peer configuration yaml but I can't figure out how to continue... Anybody can send a tutorial on using Fabric SDK Java with discovery service?

nitishbhardwaj19 (Thu, 30 Jan 2020 03:50:10 GMT):
There are few simple steps that is needed in order to use service discovery. 1) Enable _peerRoles.add(SERVICE_DISCOVERY)_ on peers while you join a peer on to the channel using sdk 2) Use service discovery while you send transaction to channel: channel .sendTransactionProposalToEndorsers( request, createDiscoveryOptions() .setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true) );

nitishbhardwaj19 (Thu, 30 Jan 2020 03:50:10 GMT):
There are few simple steps that is needed in order to use service discovery. 1) Enable _peerRoles.add(SERVICE_DISCOVERY)_ on peers while you join a peer on to the channel using sdk 2) Use service discovery while you send transaction to channel: `channel .sendTransactionProposalToEndorsers( request, createDiscoveryOptions() .setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true) );`

nitishbhardwaj19 (Thu, 30 Jan 2020 03:50:10 GMT):
There are few simple steps that is needed in order to use service discovery. 1) Enable _peerRoles.add(SERVICE_DISCOVERY)_ on peers while you join a peer on to the channel using sdk 2) Use service discovery while you send transaction to channel: ` channel .sendTransactionProposalToEndorsers( request, createDiscoveryOptions() .setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true) ); `

nitishbhardwaj19 (Thu, 30 Jan 2020 03:52:20 GMT):
Or if you are using connection.json ffor boot up the sdk, please specify serviceDiscovery role in peers section. Let me know if you still have doubts, would be happy to help

nitishbhardwaj19 (Thu, 30 Jan 2020 03:58:57 GMT):
@medikent Yes, SDK already has capability to support these operations. It works flawless. :)

nitishbhardwaj19 (Thu, 30 Jan 2020 04:02:52 GMT):
@medikent I think we can still do this but we have to override default _CryptoSuite_ implementation to deal with certificates and sign/verify. By overriding sign and verify we can connect to key-vault and get the transaction signed from there. Just need to make sure that we use our custom _CryptoSuite_ in transaction context other than the default one.

icordoba (Thu, 30 Jan 2020 09:58:46 GMT):
Thanks @nitishbhardwaj19 . Regarding point 1, I had joined the peers to the channel using CLI. Do I need to execute any peer channel commandto enable that service discovery in the channel? So far I have added CORE_PEER_GOSSIP_EXTERNALENDPOINT and restarted the peer.

icordoba (Thu, 30 Jan 2020 10:03:44 GMT):
About point do, I don't see the sendTransactionProposalToENdorsers in() my code. I use Fabric Java SDK. For example, to perform a query I create a QueryByChaincodeRequest object and pass it to the Channel object using channel.queryByChaincode(request);

Antimttr (Thu, 30 Jan 2020 16:00:53 GMT):
Are their any migration guides yet for java sdk from v1.4 to v2.0?

bestbeforetoday (Fri, 31 Jan 2020 09:22:58 GMT):
Not that I am aware of, but the transition should be pretty seamless. The only significant changes in the low-level API are the addition of lifecycle support for administrative tasks. For the high-level API, there is a change to the Wallet API but the pattern of usage is very similar to the previous iteration. This is a good starting point for the wallet API: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Wallets.html

Antimttr (Fri, 31 Jan 2020 14:16:26 GMT):
i dont use the wallet

nitishbhardwaj19 (Mon, 03 Feb 2020 04:47:44 GMT):
Query always needs to be execute on a specific peer. If we aren't not specifying a peer then that information would be taken up from the channel object and query would be performed on all the peers of that channel. (that's what I have observed till now through java-sdk code)

nitishbhardwaj19 (Mon, 03 Feb 2020 04:48:17 GMT):
_sendTransactionProposalToENdorsers _ would be used when you try to invoke anything on the chaincode

Antimttr (Thu, 06 Feb 2020 04:10:31 GMT):
does the java sdk have the same support for event listening that the node.js sdk does?

bestbeforetoday (Thu, 06 Feb 2020 09:32:58 GMT):
Functionally similar but the APIs are (currently) slightly different. You can add block listeners to the `Network` and contract (chaincode) event listeners to the `Contract`. All of these can be real-time, event replay or checkpointed: - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Network.html - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Contract.html

dan13 (Thu, 06 Feb 2020 19:07:35 GMT):
Use of a custom CheckPointer to avoid duplicate chaincode-emitted event processing (multiple peers receiving same event "concurrently") would be the HLF-architecture-consistent approach?

ownspies (Thu, 06 Feb 2020 19:30:37 GMT):
Has joined the channel.

ownspies (Thu, 06 Feb 2020 19:30:37 GMT):
I just did a search here but didn't find any answers. I have a Java service that talks to HLF (with Mutual TLS auth enabled). I pre-create the user in the Org CA and when the app starts it enrolls the user and receives the certificates just fine. The service can also talk to the peers just fine. When talking to the orderers, however, I receive an SSL error. I've tracked down that the service is using the TLS cert from the Org CA to do mutual TLS auth, however the orderer is expecting the certs for mutual TLS auth to be signed by the TLS CA, not the org CA. Is there a way to specify a custom key / cert pair to the Java Gateway Builder SDK for mutual TLS auth?

bestbeforetoday (Fri, 07 Feb 2020 09:18:17 GMT):
Event listening with the Gateway API you will only get each event once and in order. Checkpointing is useful if you want to resume event processing across client application invocations, so use cases might include things like: - Resume event processing after client application crash - Batch processing of events only at certain times of day

dan13 (Fri, 07 Feb 2020 14:13:58 GMT):
Thanks -- that approach assume there is only one listener instance for each event, right? I inadverently said "peer" instead of "client" above -- sorry for the confusion.

bestbeforetoday (Fri, 07 Feb 2020 18:05:22 GMT):
Checkpointing wasn't really designed to coordinate across multiple client application instances. Certainly the supplied file checkpointer won't work for this because it gets an exclusive lock on the file and then uses in-memory state to avoid constantly re-reading the file

bestbeforetoday (Fri, 07 Feb 2020 18:08:34 GMT):
You might be able to implement your own checkpointer to achieve the result you want. It might be worth looking at some kind of external coordination like a shared message queue or database

Bolzo 1 (Mon, 10 Feb 2020 11:21:11 GMT):
Hi, Im my chaincode I throw a ChaincodeException which wrap another exception. I'm working with the low level SDK and i was wondering if it is possible to get the wrapped exeception when I'm inspecting the ProposalResponse. Example: in my chaincode i have `throw new ChaincodeException("error message", new IOException("specific error")` is there a way in the SDK to access the message of the `IOException`?

bestbeforetoday (Tue, 11 Feb 2020 09:58:28 GMT):
The error from the peer is sent back in a message field as part of the proposal response. This is just a string. So at the client end the ChaincodeException and wrapped exception don't exist. You are just getting the exception message text.

Javi (Tue, 11 Feb 2020 15:12:48 GMT):
Hi all! I'm using the Java SDK for my application, but I'm getting service discovery errors.... Any one know what happens? `Failed to discover peer endpoint information peer0.org1.example.com:7051 for chaincode`XXXXX`

Javi (Tue, 11 Feb 2020 15:13:31 GMT):
in the app, that is deployed inside a k8s cluster I'm using the `org.hyperledger.fabric.sdk.service_discovery.as_localhost``envvar as `false`

Javi (Tue, 11 Feb 2020 15:14:28 GMT):
any help would be appreciated...

aatkddny (Tue, 11 Feb 2020 22:32:26 GMT):
Having a problem with load testing (or more accurately a bootstrap process). Getting intermittent errors that look like this: ``` org.hyperledger.fabric.sdk.ServiceDiscovery (ServiceDiscovery.java:604) - Service discovery error on peer Peer{ id: 767, name: .us-south.containers.appdomain.cloud:7051, channelName: , url: grpcs://.us-south.containers.appdomain.cloud:7051, mspid: }. Error: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0] ERROR org.hyperledger.fabric.sdk.Channel (Channel.java:4972) - Channel Channel{id: 2345, name: } Sending proposal with transaction: c4def617b38f0a4de693c356a83e13bf522ef148fd280055815ee97c9f366528 to Peer{ id: 2347, name: -cb908d9cd53f9d85938fa72b78385cae-0000.us-south.containers.appdomain.cloud:7051, channelName: managed-eightbaragency, url: grpcs://.us-south.containers.appdomain.cloud:7051, mspid: } failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0], cause=javax.net.ssl.SSLException: handshake timed out at io.netty.handler.ssl.SslHandler.handshake(...)(Unknown Source) } ``` The cluster is showing everything is fine. The app itself is ok. It was running fine before this one Tx caused a malfunction. Anyone see anything like this before?

aatkddny (Tue, 11 Feb 2020 22:32:26 GMT):
Having a problem with load testing (or more accurately a bootstrap process). Getting intermittent errors that look like this: ``` org.hyperledger.fabric.sdk.ServiceDiscovery (ServiceDiscovery.java:604) - Service discovery error on peer Peer{ id: 767, name: .us-south.containers.appdomain.cloud:7051, channelName: , url: grpcs://.us-south.containers.appdomain.cloud:7051, mspid: }. Error: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0] ERROR org.hyperledger.fabric.sdk.Channel (Channel.java:4972) - Channel Channel{id: 2345, name: } Sending proposal with transaction: c4def617b38f0a4de693c356a83e13bf522ef148fd280055815ee97c9f366528 to Peer{ id: 2347, name: -cb908d9cd53f9d85938fa72b78385cae-0000.us-south.containers.appdomain.cloud:7051, channelName: , url: grpcs://.us-south.containers.appdomain.cloud:7051, mspid: } failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0], cause=javax.net.ssl.SSLException: handshake timed out at io.netty.handler.ssl.SslHandler.handshake(...)(Unknown Source) } ``` The cluster is showing everything is fine. The app itself is ok. It was running fine before this one Tx caused a malfunction. Anyone see anything like this before?

aatkddny (Tue, 11 Feb 2020 22:32:26 GMT):
Having a problem with load testing (or more accurately a bootstrap process). Getting intermittent errors that look like this: ``` org.hyperledger.fabric.sdk.ServiceDiscovery (ServiceDiscovery.java:604) - Service discovery error on peer Peer{ id: 767, name: .us-south.containers.appdomain.cloud:7051, channelName: , url: grpcs://.us-south.containers.appdomain.cloud:7051, mspid: }. Error: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0] ERROR org.hyperledger.fabric.sdk.Channel (Channel.java:4972) - Channel Channel{id: 2345, name: } Sending proposal with transaction: c4def617b38f0a4de693c356a83e13bf522ef148fd280055815ee97c9f366528 to Peer{ id: 2347, name: -cb908d9cd53f9d85938fa72b78385cae-0000.us-south.containers.appdomain.cloud:7051, channelName: , url: grpcs://.us-south.containers.appdomain.cloud:7051, mspid: } failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0], cause=javax.net.ssl.SSLException: handshake timed out at io.netty.handler.ssl.SslHandler.handshake(...)(Unknown Source) } ``` The cluster is showing everything is fine. The app itself is ok. It was running fine before this one Tx caused a malfunction. Anyone see anything like this before? Transient networking issue or something deeper?

Bolzo 1 (Wed, 12 Feb 2020 07:38:38 GMT):
I understand, thanks!

icordoba (Wed, 12 Feb 2020 11:53:36 GMT):
Hello again @nitishbhardwaj19 I am still trying to have Discovery working. I have added CORE_PEER_GOSSIP_EXTERNALENDPOINT env in my peer node and restart it but I get this when I try to execute a transaction from Java SDK client: "The channel is not configured with any peers with the 'discover' role" any idea what I am missing in the node configuration? Thanks a lot

icordoba (Wed, 12 Feb 2020 12:04:18 GMT):
It seems that I need to enable the discover flat when I join a channel from a peer, how can I do this? I used the "peer join" shell command to do that, so it is already joined.

dwusiq (Thu, 13 Feb 2020 08:45:59 GMT):
i use HFClient to install chaincode, but return is fail: Channel Channel{id: 23, name: } Sending proposal with transaction: 4132669342bc366506b89495c248dbd418c73a0692c40a507f36273b616396f9 to Peer{ id: 13, name: peer1.org2.example.com:10051, channelName: mychannel, url: grpcs://peer1.org2.example.com:10051, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [] creator org [Org1MSP], cause=null};error installing chaincode code mychannel_di_c:c(chaincode /var/hyperledger/production/chaincodes/mychannel_di_c.c exists);failed to execute transaction 4132669342bc366506b89495c248dbd418c73a0692c40a507f36273b616396f9: error sending: txid: 4132669342bc366506b89495c248dbd418c73a0692c40a507f36273b616396f9() exists;error installing chaincode code mychannel_di_c:c(chaincode /var/hyperledger/production/chaincodes/mychannel_di_c.c exists);Channel Channel{id: 23, name: } Sending proposal with transaction: 4132669342bc366506b89495c248dbd418c73a0692c40a507f36273b616396f9 to Peer{ id: 9, name: peer0.org2.example.com:9051, channelName: mychannel, url: grpcs://peer0.org2.example.com:9051, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNKNOWN, description=access denied: channel [] creator org [Org1MSP], cause=null};failed to execute transaction 4132669342bc366506b89495c248dbd418c73a0692c40a507f36273b616396f9: error sending: txid: 4132669342bc366506b89495c248dbd418c73a0692c40a507f36273b616396f9() exists;

dwusiq (Thu, 13 Feb 2020 08:52:43 GMT):
I tried it your way, it worked.

dwusiq (Thu, 13 Feb 2020 08:53:18 GMT):
thanks,I tried it your way, it worked.

kmadala (Thu, 13 Feb 2020 16:09:44 GMT):
Hi, can someone please direct me a documentation link for Mutual TLS on Fabric JAVA SDK?

kmadala (Thu, 13 Feb 2020 16:10:18 GMT):
link provided in this Jira is not working. Jira URL : https://jira.hyperledger.org/browse/FABJ-513

dan13 (Fri, 14 Feb 2020 01:28:53 GMT):
also looking for same -- that link pointed to a node SDK doc anyway, which wouldn't answer the question for java

bestbeforetoday (Fri, 14 Feb 2020 14:00:11 GMT):
There is just about nothing in the way of docs for the low-level Java SDK, so this is not a great answer, but this code frmo the integration tests might help: https://github.com/hyperledger/fabric-sdk-java/blob/f97741e2bd76c7733f7f81078b4de5d42a37cf9a/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java#L99

bestbeforetoday (Fri, 14 Feb 2020 14:01:48 GMT):
So it is setting properties on the channel that look like they define the client TLS certificate and key used by discovery for mutual auth

Antimttr (Fri, 14 Feb 2020 21:51:11 GMT):
Does the java sdk at any point directly read the network-config.yaml file?

Antimttr (Fri, 14 Feb 2020 21:51:45 GMT):
I thought not but this comment gives me a reason to question that assumption: ``` # Any properties with an "x-" prefix will be treated as application-specific, exactly like how naming # in HTTP headers or swagger properties work. The SDK will simply ignore these fields and leave # them for the applications to process. This is a mechanism for different components of an application # to exchange information that are not part of the standard schema described below. In particular, # the "x-type" property with the "hlfv1" value example below is used by Hyperledger Composer to # determine the type of Fabric networks (v0.6 vs. v1.0) it needs to work with. ```

davidkel (Fri, 14 Feb 2020 22:20:25 GMT):
network-config.yaml is an example of a connection profile. The java-sdk will only parse a connection profile if you choose to use the apis that parse a connection profile to create your channel and peer objects. You can create the channel and peer objects yourself in your code.

Antimttr (Fri, 14 Feb 2020 22:21:33 GMT):
hmm i dont think i chose those apis? but im not really sure which api's you're referring to so I cant be sure

Antimttr (Fri, 14 Feb 2020 22:22:21 GMT):
are you talking about like that gateway thingy?

Antimttr (Fri, 14 Feb 2020 22:22:25 GMT):
i know i dont use that

davidkel (Fri, 14 Feb 2020 22:24:48 GMT):
The fabric-gateway-java probably mandates the use of a connection profile (don't know if it supports what you can do in the node sdk). However the fabric-sdk-java allows you to either use a connection profile or to create channel/peer/orderer objects programatically

Antimttr (Fri, 14 Feb 2020 22:25:30 GMT):
yes, and thats what i do

Antimttr (Fri, 14 Feb 2020 22:25:55 GMT):
the channels and chaincode are all installed using sdk calls

Antimttr (Fri, 14 Feb 2020 22:26:06 GMT):
ok thanks for clarifying!

dan13 (Sat, 15 Feb 2020 21:57:18 GMT):
@bestbeforetoday thanks for the response. So, we can do something like ```Network network = gateway.getNetwork(channelName); Properties sdprops = new Properties(); //set mutual TLS props per https://github.com/hyperledger/fabric-sdk-java/blob/f97741e2bd76c7733f7f81078b4de5d42a37cf9a/src/test/java/org/hyperledger/fabric/sdkintegration/ServiceDiscoveryIT.java#L99 network.getChannel().setServiceDiscoveryProperties(sdprops``` ?

ShobhitSrivastava (Mon, 17 Feb 2020 10:39:43 GMT):
Hi All, I am facing issue in working with 2.0 version of fabirc-sdk-java. I am making use of basic-network from fabric-sample. I am able to initialize the channel, install the chaincode, approve the chaincode, but once I execute any smart contract, it is saying my chaincode is not defined on channel. Let me know. I am using 2.0 enabled channel capabilities.

ShobhitSrivastava (Mon, 17 Feb 2020 10:41:42 GMT):
@bestbeforetoday ..adding

ArvsIndrarys (Mon, 17 Feb 2020 14:49:39 GMT):
Has left the channel.

Purbaja (Tue, 18 Feb 2020 13:52:15 GMT):
Hi All, while trying to create channel from fabric-sdk client we are getting below exception : config update for existing channel did not pass initial checks: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied Any suggestion?

dan13 (Tue, 18 Feb 2020 21:57:05 GMT):
Anyone seen this: the same peer is being added the the Java Gateway SDK ServiceDiscovery list multiple times because a duplicate entry (proof below) is added under a new ID every time a new event is received from the peer (this is simple local network, single peer, HF 1.4). I have a vague recollection that it was reported before but I cannot find (if it was) ```2020-02-16 15:30:43.106 INFO 36285 --- [ool-11-thread-1] o.h.fabric.sdk.ServiceDiscovery : Channel myChannel doing discovery with peer: Peer{ id: 3, name: peer0.myorg.com:7051, channelName: myChannel, url: grpcs://peer0.myorg.com:7051, mspid: myorgmsp} 2020-02-16 15:32:11.436 INFO 36285 --- [ool-13-thread-1] o.h.fabric.sdk.ServiceDiscovery : Channel myChannel doing discovery with peer: Peer{ id: 9, name: peer0.myorg.com:7051, channelName: myChannel, url: grpcs://peer0.myorg.com:7051, mspid: myorgmsp}```

janipartanen (Thu, 20 Feb 2020 11:50:32 GMT):
Has joined the channel.

lzaouche (Thu, 20 Feb 2020 16:22:59 GMT):
Hello, does somebody know if transactionActionInfo.getChaincodeInputArgs(0) returns the name of the function called in the chaincode?

Antimttr (Thu, 20 Feb 2020 19:24:10 GMT):
anyone know what happened to @rickr ? he was the best!

Antimttr (Thu, 20 Feb 2020 22:09:12 GMT):
When you setup an orderer object in the sdk you need to specify a few properties and pass them into the orderer constructor. I was wondering for the properties `clientCertFile` and `clientKeyFile` why in the end2endit test does it use a user's (Admin@example.com) tls cert and key instead of the orderers tls and key?

Antimttr (Thu, 20 Feb 2020 22:12:05 GMT):
there's also the `pemFile` property which is set to the orderer's tls-msp server.crt file. when i attempt to create the channel and send the envelope to the orderer i get `Caused by: java.security.cert.CertificateException: No name matching orderer1.example.com found` Now i checked the certificate specified by the pemFile ``` Certificate: Data: Version: 3 (0x2) Serial Number: 7b:50:4f:7b:54:65:dd:31:65:65:d6:bd:01:5e:ab:75:13:a0:92:cd Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, O=example.com, CN=ica.example.com Validity Not Before: Feb 10 19:24:00 2020 GMT Not After : Feb 9 19:29:00 2021 GMT Subject: C=US, ST=North Carolina, O=Hyperledger, OU=orderer, CN=orderer1 Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:00:f0:52:19:1b:49:b0:0d:8f:ee:7a:45:54:de: 4b:8d:b7:21:55:00:4d:f4:11:87:94:fb:26:d3:16: 14:58:06:ae:ac:72:65:1f:16:41:c1:82:27:96:61: 38:44:22:a9:51:f4:99:7e:3c:66:27:37:48:4b:d5: d7:6f:5f:91:ba ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment, Key Agreement X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: FC:E8:DB:FD:90:14:68:7F:2D:FE:33:3C:BF:50:32:3B:DA:72:C8:51 X509v3 Authority Key Identifier: keyid:34:DF:CB:67:C3:E3:55:6A:3E:36:C7:8B:F9:8C:AB:B8:3D:DA:0E:E8 X509v3 Subject Alternative Name: IP Address:3.X.72.X 1.2.3.4.5.6.7.8.1: {"attrs":{"hf.Affiliation":"","hf.EnrollmentID":"orderer1","hf.Type":"orderer"}} Signature Algorithm: ecdsa-with-SHA256 30:44:02:20:72:3c:3b:d5:89:ba:36:76:3b:ab:17:0b:62:c8: 76:cc:45:5c:da:47:5c:fc:23:e6:de:d5:04:de:23:4d:db:fd: 02:20:4a:58:1e:d0:96:1c:bf:6a:a5:c8:f0:41:dd:78:f9:42: f8:48:65:3b:3f:65:5d:5e:ef:d1:92:56:b1:30:ae:ce ```

Antimttr (Thu, 20 Feb 2020 22:12:24 GMT):
and as you can see, the CN is orderer1 O is example.com

Antimttr (Thu, 20 Feb 2020 22:12:28 GMT):
so everything looks in order

Antimttr (Thu, 20 Feb 2020 22:13:00 GMT):
surely the clientCertFile and clientKeyFile don't need to have orderer1.example.com in them?

Antimttr (Thu, 20 Feb 2020 22:22:18 GMT):
in the orderer logs i get this: `2020-02-20 21:38:18.383 UTC [core.comm] ServerHandshake -> ERRO 034 TLS handshake failed with error remote error: tls: internal error server=Orderer remoteaddress=`

Antimttr (Thu, 20 Feb 2020 22:27:22 GMT):
ls

bestbeforetoday (Fri, 21 Feb 2020 15:00:26 GMT):
I changed a bit of _fabric-gateway-java_ behaviour quite a while back in response to some reports raised here about not being able to get at the proposal responses if submit of a transaction failed. I think these changes have only recently been published but are not available in both 1.4 and 2.0 releases. Any ContractException thrown from Transaction.submit() should now have all the proposal responses attached. You can get at them with ContractException.getProposalResponses()

bestbeforetoday (Fri, 21 Feb 2020 15:00:26 GMT):
I changed a bit of _fabric-gateway-java_ behaviour quite a while back in response to some reports raised here about not being able to get at the proposal responses if submit of a transaction failed. I think these changes have only recently been published but are now available in both 1.4 and 2.0 releases. Any ContractException thrown from Transaction.submit() should now have all the proposal responses attached. You can get at them with ContractException.getProposalResponses()

ownspies (Fri, 21 Feb 2020 21:03:57 GMT):
@Antimttr the CN needs to be `orderer1.example.com`, or you need `DNS:orderer1.example.com` in the `X509v3 Subject Alternative Name:` attributes

ownspies (Fri, 21 Feb 2020 21:04:52 GMT):
Also, the only `O=example.com` I see is for the issuer, not for the subject, those are two totally different things

ownspies (Fri, 21 Feb 2020 21:05:20 GMT):
one last note, the `"hf.EnrollmentID":"orderer1"` typically needs to contain the full hostname for HLF nodes, so `"hf.EnrollmentID":"orderer1.example.com"`

ownspies (Fri, 21 Feb 2020 21:08:35 GMT):
Here is my key:

ownspies (Fri, 21 Feb 2020 21:08:35 GMT):
Here is my certificate:

ownspies (Fri, 21 Feb 2020 21:08:38 GMT):
```[ justin.spies@ownum.io / example ] 16:06 $ openssl x509 -noout -text -in ordererOrganizations/sit.example.net/orderers/orderer-01.sit.example.net/msp/signcerts/cert.pem Certificate: Data: Version: 3 (0x2) Serial Number: 41:78:ed:8e:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:5a:24:82:4b:21 Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=Ohio, L=Cleveland, O=MyOrg, OU=HLF Signer, CN=ca.sit.example.net Validity Not Before: Feb 20 18:01:00 2020 GMT Not After : Feb 19 18:06:00 2021 GMT Subject: C=US, ST=Ohio, L=Cleveland, O=MyOrg, OU=orderer, CN=orderer-01.sit.example.net Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:3a:67: 04:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:9e:27: 6a:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:5c:d6: c1:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:74:7e: d4:da:ef:73:35 ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Key Usage: critical Digital Signature X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: A8:D8:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:F7:F4:63:AC X509v3 Authority Key Identifier: keyid:2A:D0:09:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:C2:37:AC:43 X509v3 Subject Alternative Name: DNS:localhost, DNS:orderer-01.sit.example.net, DNS:orderer-01, DNS:orderer-01.sit 1.2.3.4.5.6.7.8.1: {"attrs":{"hf.Affiliation":"","hf.EnrollmentID":"orderer-01.sit.example.net","hf.Type":"orderer"}} Signature Algorithm: ecdsa-with-SHA256 30:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:78:b7:30:af: 99:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:20:a9:91:e6: 02:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:59:fb:22:7b: b4:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:40:b9```

Antimttr (Fri, 21 Feb 2020 21:09:58 GMT):
thanks! i suspected that it had to do with the CN, but i got pulled off the project today so I havent had a chance to go back and regenerate all the crypto material

Antimttr (Fri, 21 Feb 2020 21:10:21 GMT):
I generated the material using the Fabric-ca operations guide

Antimttr (Fri, 21 Feb 2020 21:10:57 GMT):
and they dont put the full orderer name in the register/enroll fabric-ca-client commands

Antimttr (Fri, 21 Feb 2020 21:11:00 GMT):
just the first part

Antimttr (Fri, 21 Feb 2020 21:11:19 GMT):
but then i compared my cert with the ones in balance-transfer sample and saw that it was the full hostname with domain

ownspies (Fri, 21 Feb 2020 21:12:03 GMT):
I've spent about four months getting it all working, have bounced between standalone CAs, AWS Private CA + HLF Hierarchy, Vault CA for TLS, and straight openSSL... Have a crazy menagerie of scripts now as a result... My way of saying "I feel you're pain"

ShrutiHK (Mon, 24 Feb 2020 04:57:00 GMT):
Hi, We are working with java-sdk but while invoking chaincodes, sometimes we get the error - GatewayException: 'Failed to discover peer endpoint '. What can be done to avoid this error?

ShrutiHK (Mon, 24 Feb 2020 04:57:22 GMT):
Any pointers on this are appreciated. Thanks in advance.

ShrutiHK (Mon, 24 Feb 2020 05:28:45 GMT):
Kindly let me know in case someone has encountered this error

nitishbhardwaj19 (Tue, 25 Feb 2020 07:59:03 GMT):
Hi, Could anyone share few details about the default CryptoSuite which is being used in Java-sdk. `public byte[] sign(PrivateKey key, byte[] data) ` This method is being override in CryptoPrimitives which is being used to sign the transaction. I am not sure about: 1) If the *byte data is actually the transaction data byte or if it's the bytes of the hash of the tx data*. 2) *What's the default hash algorithm being used to compute tx hash.* Would be great if someone can share their thoughts on this.

nitishbhardwaj19 (Tue, 25 Feb 2020 07:59:03 GMT):
Hi, Could anyone share few details about the default CryptoSuite which is being used in Java-sdk. _public byte[] sign(PrivateKey key, byte[] data) _ This method is being override in CryptoPrimitives which is being used to sign the transaction. I am not sure about: 1) If the *byte data is actually the transaction data byte or if it's the bytes of the hash of the tx data*. 2) *What's the default hash algorithm being used to compute tx hash.* Would be great if someone can share their thoughts on this. FYI - @bestbeforetoday

nitishbhardwaj19 (Wed, 26 Feb 2020 07:14:17 GMT):
The default Algo to compute the hash is SHA2

ascatox (Wed, 26 Feb 2020 13:16:32 GMT):
Hi All! I'm trying to use the Fabric Gateway

ascatox (Wed, 26 Feb 2020 13:16:42 GMT):
using the documentation

ascatox (Wed, 26 Feb 2020 13:17:04 GMT):
but I need an example of `connection.json`

ascatox (Wed, 26 Feb 2020 13:17:28 GMT):
Someone has an example to share with me! Thanks in advance!

dan13 (Wed, 26 Feb 2020 13:48:37 GMT):
https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/java/org/hyperledger/fabric/gateway/connection.json

ascatox (Wed, 26 Feb 2020 13:48:51 GMT):
Thanks

Antimttr (Wed, 26 Feb 2020 18:55:24 GMT):
hey @ownspies , so finally had a chance to revist this issue today.

Antimttr (Wed, 26 Feb 2020 18:55:52 GMT):
I went ahead and deleted all the erroneous crypto material and the fabric-ca-server databases for the servers

ownspies (Wed, 26 Feb 2020 18:55:54 GMT):
how did it work out?

Antimttr (Wed, 26 Feb 2020 18:56:01 GMT):
well i got the CN corrected

Antimttr (Wed, 26 Feb 2020 18:56:15 GMT):
but the certificates the fa-ca-server is issueing still has the O=Hyperledger

Antimttr (Wed, 26 Feb 2020 18:56:21 GMT):
instead of org1.example.com

ownspies (Wed, 26 Feb 2020 18:56:28 GMT):
ugh, my wife would kill me... should have said "I feel YOUR pain" .... not "you're pain"

Antimttr (Wed, 26 Feb 2020 18:56:41 GMT):
also the locales im setting aren't taking when i enroll

Antimttr (Wed, 26 Feb 2020 18:56:54 GMT):
i checked the root ca certificate

Antimttr (Wed, 26 Feb 2020 18:56:59 GMT):
and its all correct their

Antimttr (Wed, 26 Feb 2020 18:57:15 GMT):
i changed the CSR config section in the fabric-ca-server.yaml file

Antimttr (Wed, 26 Feb 2020 18:57:25 GMT):
to match what i want the O and locales to be

Antimttr (Wed, 26 Feb 2020 18:57:31 GMT):
but it doesnt seem to be pulling it from their

Antimttr (Wed, 26 Feb 2020 18:57:31 GMT):
but it doesnt seem to be pulling it from there

ownspies (Wed, 26 Feb 2020 18:58:12 GMT):
so are you changing the fabric-ca-server-config.yaml file ?

ownspies (Wed, 26 Feb 2020 18:58:15 GMT):
this section:

ownspies (Wed, 26 Feb 2020 18:58:18 GMT):
```########################################################################### csr: cn: fabric-ca-server keyrequest: algo: ecdsa size: 256 names: - C: US ST: "North Carolina" L: O: Hyperledger OU: Fabric hosts: - 3346f9929deb - localhost ca: expiry: 131400h pathlength: 1 ###########################################################################```

Antimttr (Wed, 26 Feb 2020 18:58:25 GMT):
yeah let me paste mine

Antimttr (Wed, 26 Feb 2020 18:58:42 GMT):
```csr: cn: fabric-ca-server keyrequest: algo: ecdsa size: 256 names: - C: US ST: California L: "San Diego" O: org1.example.com OU: Fabric hosts: - c7597f94f1bd - localhost ca: expiry: 131400h pathlength: 1```

ownspies (Wed, 26 Feb 2020 18:58:48 GMT):
how are you launching the CA? Are those values getting overridden with ENV VARS ?

Antimttr (Wed, 26 Feb 2020 18:59:16 GMT):
docker-compose.yaml section: ``` ica.org1.example.com: container_name: ica.org1.example.com image: hyperledger/fabric-ca command: sh -c 'fabric-ca-server start -d -b ca-org1-admin:ca-org1-adminpw --port 7153 --cfg.identities.allowremove' environment: - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_CA_NAME=ica.org1.example.com - FABRIC_CA_SERVER_CSR_CN=ica.org1.example.com - FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0,3.14.72.136 - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca/ca/ica.org1.example.com.key.pem - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca/ca/ica.org1.example.com.crt.pem - FABRIC_CA_SERVER_DEBUG=true volumes: - ./ca/:/etc/hyperledger/fabric-ca - ./channel/crypto-config/peerOrganizations/org1.example.com/ca:/etc/hyperledger/fabric-ca/ca ports: - 7153:7153```

Antimttr (Wed, 26 Feb 2020 18:59:16 GMT):
docker-compose.yaml section: ``` ica.org1.example.com: container_name: ica.org1.example.com image: hyperledger/fabric-ca command: sh -c 'fabric-ca-server start -d -b ca-org1-admin:ca-org1-adminpw --port 7153 --cfg.identities.allowremove' environment: - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca - FABRIC_CA_SERVER_TLS_ENABLED=true - FABRIC_CA_SERVER_CA_NAME=ica.org1.example.com - FABRIC_CA_SERVER_CSR_CN=ica.org1.example.com - FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0,3.1x.7x.136 - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca/ca/ica.org1.example.com.key.pem - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca/ca/ica.org1.example.com.crt.pem - FABRIC_CA_SERVER_DEBUG=true volumes: - ./ca/:/etc/hyperledger/fabric-ca - ./channel/crypto-config/peerOrganizations/org1.example.com/ca:/etc/hyperledger/fabric-ca/ca ports: - 7153:7153```

ownspies (Wed, 26 Feb 2020 18:59:19 GMT):
not sure that is a valid O value

ownspies (Wed, 26 Feb 2020 19:00:03 GMT):
and your custom file ... is located at `FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca/fabric-ca-server-config.yaml`?

Antimttr (Wed, 26 Feb 2020 19:00:19 GMT):
right that's the volume im assigning for it

ownspies (Wed, 26 Feb 2020 19:02:08 GMT):
what command do you use to register a new entity ?

Antimttr (Wed, 26 Feb 2020 19:10:01 GMT):
sec i got my boss here

Antimttr (Wed, 26 Feb 2020 19:57:08 GMT):
ok trying to reconstruct the registration command, i have it scripted

Antimttr (Wed, 26 Feb 2020 19:57:15 GMT):
but its pretty straight forward

Antimttr (Wed, 26 Feb 2020 19:57:26 GMT):
right out of the fabric-ca-server ops guide

Antimttr (Wed, 26 Feb 2020 19:59:03 GMT):
so heres an example of the registration command for my org1's first peer: fabric-ca-client register -d --id.name peer1.org1.example.com --id.secret peer1PW --id.type peer -u https://0.0.0.0:7054

Antimttr (Wed, 26 Feb 2020 19:59:03 GMT):
so heres an example of the registration command for my org1's first peer: `fabric-ca-client register -d --id.name peer1.org1.example.com --id.secret peer1PW --id.type peer -u https://0.0.0.0:7054`

ownspies (Wed, 26 Feb 2020 19:59:32 GMT):
and you run that from inside the fabric CA container ?

Antimttr (Wed, 26 Feb 2020 19:59:54 GMT):
no i run that from host command line using fabric-ca-client

Antimttr (Wed, 26 Feb 2020 20:00:11 GMT):
but it connects to my fabric-ca-server container

ownspies (Wed, 26 Feb 2020 20:00:13 GMT):
ok

Antimttr (Wed, 26 Feb 2020 20:00:23 GMT):
the 0.0.0.0 is replaced with the proper socket

Antimttr (Wed, 26 Feb 2020 20:00:48 GMT):
could it be the fabric-ca-client config?

Antimttr (Wed, 26 Feb 2020 20:01:05 GMT):
i noticed it creates a new yaml file for the client each time i run it

ownspies (Wed, 26 Feb 2020 20:01:15 GMT):
well, the first two things I would check are a) fabric-ca-server isn't loading the config file you thought it was loading and so is missing the options you set or b) there are other ENV variables overriding the config file

Antimttr (Wed, 26 Feb 2020 20:01:37 GMT):
its actually created the server.yaml file

ownspies (Wed, 26 Feb 2020 20:02:00 GMT):
it should load the config file from the FABRIC_CA_SERVER_HOME

Antimttr (Wed, 26 Feb 2020 20:02:02 GMT):
if i remove it from the fabric-ca-server working directory it will create it from new, then i just edit the existing one and restart the container

Antimttr (Wed, 26 Feb 2020 20:02:13 GMT):
right, exactly,

Antimttr (Wed, 26 Feb 2020 20:02:33 GMT):
i have it mapped to a volume: ./ca/:/etc/hyperledger/fabric-ca

ownspies (Wed, 26 Feb 2020 20:02:51 GMT):
I would enable `FABRIC_LOGGING_SPEC=debug` and restart the CA to confirm it is loading the correct config file

ownspies (Wed, 26 Feb 2020 20:03:00 GMT):
do that env var inside the docker container

Antimttr (Wed, 26 Feb 2020 20:03:02 GMT):
already have that set

Antimttr (Wed, 26 Feb 2020 20:03:14 GMT):
i have the full log in my buffer

Antimttr (Wed, 26 Feb 2020 20:03:21 GMT):
lets see if i can find where it loads the config

ownspies (Wed, 26 Feb 2020 20:03:34 GMT):
you have both the one I sent and `FABRIC_CA_SERVER_DEBUG` from your docker-compose ?

Antimttr (Wed, 26 Feb 2020 20:03:41 GMT):
```2020/02/26 17:33:44 [DEBUG] Home directory: /etc/hyperledger/fabric-ca 2020/02/26 17:33:44 [INFO] Configuration file location: /etc/hyperledger/fabric-ca/fabric-ca-server-config.yaml 2020/02/26 17:33:44 [INFO] Starting server in home directory: /etc/hyperledger/fabric-ca ```

Antimttr (Wed, 26 Feb 2020 20:04:02 GMT):
oh i see

Antimttr (Wed, 26 Feb 2020 20:04:08 GMT):
ok they're different

Antimttr (Wed, 26 Feb 2020 20:04:10 GMT):
let me try that

ownspies (Wed, 26 Feb 2020 20:05:09 GMT):
They may do the same thing; IIRC FABRIC_LOGGING_SPEC is the go forward and all others are deprecated

ownspies (Wed, 26 Feb 2020 20:05:54 GMT):
so after you start the CA if you `cat /etc/hyperledger/fabric-ca/fabric-ca-server-config.yaml` does it include your changes? Also, I thought the CA output all the options it used, but I may be thinking of something else ....

ownspies (Wed, 26 Feb 2020 20:06:06 GMT):
if it does output the options then I would compare those against what I set

Antimttr (Wed, 26 Feb 2020 20:06:30 GMT):
it does print some stuff, but let me try it with the new flag, i didnt see like OU, O, CN stuff previously

ownspies (Wed, 26 Feb 2020 20:06:43 GMT):
I admit to having a hard time here (chat) troubleshooting - there are very often hints to the real problem scattered in the log output, and just grabbing the last few lines is misleading

Antimttr (Wed, 26 Feb 2020 20:08:36 GMT):
ok heres the whole log since restarting

Antimttr (Wed, 26 Feb 2020 20:09:02 GMT):

Antimttr - Wed Feb 26 2020 12:08:50 GMT-0800 (Pacific Standard Time).txt

Antimttr (Wed, 26 Feb 2020 20:11:41 GMT):
i dont see anything in their about loading csr section

ownspies (Wed, 26 Feb 2020 20:11:46 GMT):
question for you

ownspies (Wed, 26 Feb 2020 20:11:55 GMT):
earlier in the chat you said `i changed the CSR config section in the fabric-ca-server.yaml file`

Antimttr (Wed, 26 Feb 2020 20:11:57 GMT):
also the comments above the csr section say they're only used in generated the rootca cert

ownspies (Wed, 26 Feb 2020 20:12:04 GMT):
was that just short hand ?

ownspies (Wed, 26 Feb 2020 20:12:21 GMT):
because the config file should be called `fabric-ca-server-config.yaml` and not `fabric-ca-server.yaml`

Antimttr (Wed, 26 Feb 2020 20:12:40 GMT):
oh you're right, that is what its called

Antimttr (Wed, 26 Feb 2020 20:13:32 GMT):
```# Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate.```

Antimttr (Wed, 26 Feb 2020 20:13:42 GMT):
see but im supplying the root certificate not creating it

Antimttr (Wed, 26 Feb 2020 20:13:55 GMT):
and the ca cert im supplying has all the correct data

ownspies (Wed, 26 Feb 2020 20:14:17 GMT):
is this a root CA or an intermediate CA ?

Antimttr (Wed, 26 Feb 2020 20:14:52 GMT):
well i mean its an openssl root but it is the highest fabric-ca-server in the chain

Antimttr (Wed, 26 Feb 2020 20:15:28 GMT):
there is no fabric-ca-server above it but theirs an openssl certificate that i call the root which is what signed the ica's cert

Antimttr (Wed, 26 Feb 2020 20:15:48 GMT):
following this guide: https://medium.com/ibm-garage/using-3rd-party-root-cas-in-hyperledger-fabric-3cafa91d1260

ownspies (Wed, 26 Feb 2020 20:15:52 GMT):
ok, so you have openssl root cert and use that to sign the cert for the HFL CA ?

Antimttr (Wed, 26 Feb 2020 20:16:01 GMT):
yes

ownspies (Wed, 26 Feb 2020 20:16:54 GMT):
and the HLF CA has the wrong O / OU ?

Antimttr (Wed, 26 Feb 2020 20:17:13 GMT):
the cert im using for it looks correct to me, ill paste it here

ownspies (Wed, 26 Feb 2020 20:18:04 GMT):
so the cert issued _by_ the HLF CA has the wrong O / OU, right?

ownspies (Wed, 26 Feb 2020 20:18:18 GMT):
meaning like the orderer cert or the peer cert, or the admin cert?

Antimttr (Wed, 26 Feb 2020 20:18:27 GMT):
right

Antimttr (Wed, 26 Feb 2020 20:18:33 GMT):
so heres my ica's cert:

Antimttr (Wed, 26 Feb 2020 20:18:42 GMT):
```Certificate: Data: Version: 3 (0x2) Serial Number: 4096 (0x1000) Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, L=San Diego, O=org1.example.com, CN=rca.org1.example.com Validity Not Before: Feb 3 18:31:26 2020 GMT Not After : Feb 1 18:31:26 2025 GMT Subject: C=US, ST=California, O=org1.example.com, CN=ica.org1.example.com Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:91:e8:89:a5:01:42:d7:67:0b:79:a1:06:7b:b7: aa:d2:27:cd:a7:51:51:ec:a7:94:4e:97:92:f8:41: e6:dc:3e:aa:0c:8d:4e:30:99:4b:cf:c9:12:f4:2a: 11:7c:84:27:ba:29:08:26:be:69:c3:fe:d8:a8:b0: 11:ee:b0:a3:30 ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Subject Key Identifier: D1:88:51:B1:C4:CA:33:5F:77:2D:85:E7:09:87:60:05:B4:11:B3:5C X509v3 Authority Key Identifier: keyid:1E:29:BC:69:70:B8:A8:E8:CB:2F:95:E2:78:21:2C:5B:78:92:33:45 X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 X509v3 Key Usage: critical Digital Signature, Certificate Sign, CRL Sign Signature Algorithm: ecdsa-with-SHA256 30:44:02:20:29:49:5d:12:9a:0e:b3:b8:47:c9:78:dc:e5:26: 00:0b:7d:a2:95:ef:70:2d:56:89:a4:3e:ab:c1:4c:1e:a8:bd: 02:20:19:d7:dc:56:c6:f9:48:05:f6:0b:93:17:28:46:96:e1: af:78:0b:ac:c5:48:4c:86:dd:51:d6:e3:a0:77:a5:3d ```

ownspies (Wed, 26 Feb 2020 20:19:24 GMT):
yeah, ok, that cert looks fine and yes, it's the peer cert that has the wrong O

Antimttr (Wed, 26 Feb 2020 20:19:31 GMT):
right

Antimttr (Wed, 26 Feb 2020 20:19:45 GMT):
so the cert that ca generates has O=Hyperledger

Antimttr (Wed, 26 Feb 2020 20:19:53 GMT):
which is like the default from the config.yaml

ownspies (Wed, 26 Feb 2020 20:19:58 GMT):
yeah, ok

ownspies (Wed, 26 Feb 2020 20:20:42 GMT):
so I use this command, which is effectively the same you're using

ownspies (Wed, 26 Feb 2020 20:20:47 GMT):
``````

ownspies (Wed, 26 Feb 2020 20:20:47 GMT):
```fabric-ca-client register -d \ -u ${PROTO}://$CA_ADMIN:$CA_PASSWORD@$SERVICE_DNS \ -M "${ORG_PATH}/msp" \ --id.name peer-0${PEERID}.${ORGID}.${DOMAIN_SUFFIX} \ --id.secret ${ORGID}-peer-0${PEERID}_pw \ --id.type peer ```

ownspies (Wed, 26 Feb 2020 20:21:34 GMT):
let me check my CA

Antimttr (Wed, 26 Feb 2020 20:21:58 GMT):
yeah that looks the same as what im doing

ownspies (Wed, 26 Feb 2020 20:23:15 GMT):
yes, and I have this in my config, which does work: ```########################################################################### csr: cn: names: - C: "US" ST: "MyState" L: "MyCity" O: "MyOrg" OU: "HLF Org Signer - SIT Environment" hosts: - localhost # K8S Service - ca-core-sit-hlf-ca.hlf-sit.svc.cluster.local ca: expiry: 131400h pathlength: 2 ############################################################################# ```

Antimttr (Wed, 26 Feb 2020 20:23:22 GMT):
so i mentioned that fabric-ca-client makes a fabric-ca-client-config.yaml each time i do an enroll in the enrolling entities working dir

Antimttr (Wed, 26 Feb 2020 20:23:35 GMT):
and it seems to have all the same options as the server version

Antimttr (Wed, 26 Feb 2020 20:23:39 GMT):
but of course its all set to default

ownspies (Wed, 26 Feb 2020 20:23:44 GMT):
yeah, it's similar

ownspies (Wed, 26 Feb 2020 20:23:57 GMT):
you can override the CA and stuff on the CLI

Antimttr (Wed, 26 Feb 2020 20:24:17 GMT):
im wondering if i should configure that and specify the configured yaml when i issue a fabric-ca-client command

Antimttr (Wed, 26 Feb 2020 20:24:34 GMT):
because its just using the defaults everytime somehow overriding what ive setup on my server-config.yaml

ownspies (Wed, 26 Feb 2020 20:24:40 GMT):
I've never configured the CA client file but you can try

ownspies (Wed, 26 Feb 2020 20:24:48 GMT):
for some reason the server just isn't reading your config file properly

ownspies (Wed, 26 Feb 2020 20:24:59 GMT):
is your host OS linux or Windows ?

Antimttr (Wed, 26 Feb 2020 20:25:02 GMT):
hmm but you issue these commands in the fabric-ca-server container?

Antimttr (Wed, 26 Feb 2020 20:25:08 GMT):
that seems to be a difference

Antimttr (Wed, 26 Feb 2020 20:25:18 GMT):
my host os is centos

Antimttr (Wed, 26 Feb 2020 20:26:30 GMT):
im going to give that a shot, generate a fabric-ca-client-config.yaml and use that when issue the register and enroll commands

Antimttr (Wed, 26 Feb 2020 20:29:52 GMT):
i guess what i'd like to do is just specify this stuff in environment

Antimttr (Wed, 26 Feb 2020 20:30:24 GMT):
let me see if the docs has the env variables for the CSR config settings

ownspies (Wed, 26 Feb 2020 20:34:43 GMT):
the CSR stuff as ENV is a small PITA because it's an array, not a straight string

Antimttr (Wed, 26 Feb 2020 20:34:50 GMT):
yeah

Antimttr (Wed, 26 Feb 2020 20:35:05 GMT):
im only seeing 2: FABRIC_CA_SERVER_CSR_CN and FABRIC_CA_SERVER_CSR_HOSTS

ownspies (Wed, 26 Feb 2020 20:35:11 GMT):
I found mixed docs on how to do the array, some said comma separated some said space

ownspies (Wed, 26 Feb 2020 20:35:17 GMT):
well, try that then

Antimttr (Wed, 26 Feb 2020 20:35:50 GMT):
ok so ill try setting: FABRIC_CA_SERVER_CSR_O

Antimttr (Wed, 26 Feb 2020 20:40:06 GMT):
actually i think ill do

Antimttr (Wed, 26 Feb 2020 20:40:16 GMT):
FABRIC_CA_SERVER_CSR_NAMES_O

Antimttr (Wed, 26 Feb 2020 20:40:31 GMT):
to have it match the structure

ownspies (Wed, 26 Feb 2020 20:40:48 GMT):
that makes sense

Antimttr (Wed, 26 Feb 2020 20:52:03 GMT):
ok regenerated everything time to look at my cert

ownspies (Wed, 26 Feb 2020 20:52:41 GMT):
:fingers_crossed:

Antimttr (Wed, 26 Feb 2020 20:53:46 GMT):
no change

Antimttr (Wed, 26 Feb 2020 20:54:00 GMT):
O=Hyperledger

Antimttr (Wed, 26 Feb 2020 20:55:27 GMT):
let me look at my server logs now

Antimttr (Wed, 26 Feb 2020 20:57:05 GMT):
```2020/02/26 20:51:50 [DEBUG] Received request for /enroll 2020/02/26 20:51:50 [DEBUG] ca.Config: &{Version:1.4.4-latest Cfg:{Identities:{PasswordAttempts:10 AllowRemove:true} Affiliations:{AllowRemove:false}} CA:{Name:ica.org1.example.com Keyfile:/etc/hyperledger/fabric-ca/ca/ica.org1.example.com.key.pem Certfile:/etc/hyperledger/fabric-ca/ca/ica.org1.example.com.crt.pem Chainfile:/etc/hyperledger/fabric-ca/ca/chain.org1.example.com.crt.pem} Signing:0xc0001f73e0 CSR:{CN:ica.org1.example.com Names:[{C:US ST:California L:San Diego O:org1.example.com OU:Fabric SerialNumber:}] Hosts:[0.0.0.0 3.x.7x.136] KeyRequest:0xc0001fc260 CA:0xc0001fc2e0 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://****:****@:/ UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member] [{ }] map[groups:[{ }]]} TLS:{false [] { }} } DB:{ Type:sqlite3 Datasource:/etc/hyperledger/fabric-ca/fabric-ca-server.db TLS:{false [] { }} } CSP:0xc00000fd20 Client: Intermediate:{ParentServer:{ URL: CAName: } TLS:{Enabled:false CertFiles:[] Client:{KeyFile: CertFile:}} Enrollment:{ Name: Secret:**** CAName: AttrReqs:[] Profile: Label: CSR: Type:x509 }} CRL:{Expiry:24h0m0s} Idemix:{IssuerPublicKeyfile:/etc/hyperledger/fabric-ca/IssuerPublicKey IssuerSecretKeyfile:/etc/hyperledger/fabric-ca/msp/keystore/IssuerSecretKey RevocationPublicKeyfile:/etc/hyperledger/fabric-ca/IssuerRevocationPublicKey RevocationPrivateKeyfile:/etc/hyperledger/fabric-ca/msp/keystore/IssuerRevocationPrivateKey RHPoolSize:1000 NonceExpiration:15s NonceSweepInterval:15m}} ```

Antimttr (Wed, 26 Feb 2020 20:57:13 GMT):
thats from the server log

Antimttr (Wed, 26 Feb 2020 20:57:23 GMT):
and you can see its got the correct stuff in csr

Antimttr (Wed, 26 Feb 2020 20:57:45 GMT):
`Signing:0xc0001f73e0 CSR:{CN:ica.org1.example.com Names:[{C:US ST:California L:San Diego O:org1.example.com OU:Fabric SerialNumber:}] Hosts:[0.0.0.0 3.x.7x.136] `

Antimttr (Wed, 26 Feb 2020 20:58:05 GMT):
and thats reflected in the generated cert, the issuer O is correct

Antimttr (Wed, 26 Feb 2020 20:58:09 GMT):
just not the subject O

ownspies (Wed, 26 Feb 2020 20:59:59 GMT):
so ... that is the cert for your ICA

Antimttr (Wed, 26 Feb 2020 21:00:10 GMT):
yeah

ownspies (Wed, 26 Feb 2020 21:00:18 GMT):
that has no bearing on the cert for the peer when you run the register command

Antimttr (Wed, 26 Feb 2020 21:00:28 GMT):
apparently not

Antimttr (Wed, 26 Feb 2020 21:01:44 GMT):
but it does show that the ca-server is atleast using the correct values

Antimttr (Wed, 26 Feb 2020 21:01:59 GMT):
how to get the correct values into the enrolled certificate is the question

ownspies (Wed, 26 Feb 2020 21:02:32 GMT):
uggh, sorry, let me test something locally

ownspies (Wed, 26 Feb 2020 21:05:17 GMT):
Mine say that too .... when I enroll

Antimttr (Wed, 26 Feb 2020 21:05:34 GMT):
says what? O=Hyperledger ?

ownspies (Wed, 26 Feb 2020 21:05:42 GMT):
`Subject: C = US, ST = North Carolina, O = Hyperledger, OU = client, CN = admin`

Antimttr (Wed, 26 Feb 2020 21:05:50 GMT):
ahh

ownspies (Wed, 26 Feb 2020 21:06:08 GMT):
testing something else ...

Antimttr (Wed, 26 Feb 2020 21:06:35 GMT):
well i havent tested out anything since i changed the CN

Antimttr (Wed, 26 Feb 2020 21:06:42 GMT):
maybe that's all it needs

ownspies (Wed, 26 Feb 2020 21:08:02 GMT):
`Subject: C = US, ST = California, L = San Diego, O = Testing, OU = client, CN = Justin`

ownspies (Wed, 26 Feb 2020 21:08:43 GMT):
yes in the fabric-ca-client-config.yaml (or using the corresponding env vars) set

ownspies (Wed, 26 Feb 2020 21:09:50 GMT):
so

ownspies (Wed, 26 Feb 2020 21:10:02 GMT):
`FABRIC_CA_CLIENT_CSR_NAMES_O=...`

ownspies (Wed, 26 Feb 2020 21:10:17 GMT):
and so on

Antimttr (Wed, 26 Feb 2020 21:11:01 GMT):
oh shoot i was using FABRIC_CA_SERVER not _CLIENT :disappointed_relieved:

Antimttr (Wed, 26 Feb 2020 21:13:09 GMT):
ok got to reset all this again and ill give it another go!

ownspies (Wed, 26 Feb 2020 21:15:10 GMT):
shouldn't have to reset

ownspies (Wed, 26 Feb 2020 21:15:22 GMT):
just set the env vars and register a new user

Antimttr (Wed, 26 Feb 2020 21:20:16 GMT):
still no

Antimttr (Wed, 26 Feb 2020 21:20:27 GMT):
-.-

Antimttr (Wed, 26 Feb 2020 21:20:43 GMT):
im going to review some settings, this is so strange, you're able to get it working

Antimttr (Wed, 26 Feb 2020 21:21:26 GMT):
ah shite i had a space after the NAMES_O

Antimttr (Wed, 26 Feb 2020 21:21:31 GMT):
might make a idfference

Antimttr (Wed, 26 Feb 2020 21:25:24 GMT):
bah nope still the same

Antimttr (Wed, 26 Feb 2020 21:30:29 GMT):
ok im going to try it with a custom fabric-ca-client-config.yaml

Antimttr (Wed, 26 Feb 2020 21:34:22 GMT):
@ownspies did you set that env just when you enrolled or when you registered too?

Antimttr (Wed, 26 Feb 2020 22:08:18 GMT):
aha!

Antimttr (Wed, 26 Feb 2020 22:08:38 GMT):
i got it, used --csr.names in the arguments to fabric-ca-client

Antimttr (Wed, 26 Feb 2020 22:19:28 GMT):
thanks ownspies!

ownspies (Thu, 27 Feb 2020 13:12:11 GMT):
awesome! Sorry, I got off the bus and went straight to church

ownspies (Thu, 27 Feb 2020 13:12:11 GMT):
awesome! Sorry or not responding sooner, I got off the bus and went straight to church, yada yada yada

lzaouche (Thu, 27 Feb 2020 14:44:00 GMT):
Hello, is it possible to get the name of the peer who executed a transaction? envelopeInfo.getCreator().getName() for example?

yacovm (Thu, 27 Feb 2020 15:10:08 GMT):
it's in the endorsement

yacovm (Thu, 27 Feb 2020 15:10:13 GMT):
the certificate of the peer is there

lzaouche (Thu, 27 Feb 2020 15:29:07 GMT):
I can't see anything about the transaction creator here https://javadoc.io/doc/org.hyperledger.fabric-sdk-java/fabric-sdk-java/latest/org/hyperledger/fabric/sdk/BlockInfo.EndorserInfo.html

Antimttr (Thu, 27 Feb 2020 19:59:06 GMT):
@ownspies quick update. got everything back up and running with the corrected certs now but now im running into some sort of chaining issue: `Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target` going to try the tlsca's chain certificate instead of its main cert

ownspies (Thu, 27 Feb 2020 20:24:09 GMT):
where do you get that ?

ownspies (Thu, 27 Feb 2020 20:24:27 GMT):
should have replied here - what is returning that error?

Antimttr (Thu, 27 Feb 2020 20:34:29 GMT):
the java sdk

Antimttr (Thu, 27 Feb 2020 20:34:40 GMT):
when im attempting to send a transaction to the orderer

ownspies (Thu, 27 Feb 2020 20:34:59 GMT):
Ohhh we just went through that....

Antimttr (Thu, 27 Feb 2020 20:35:01 GMT):
org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:236)

Antimttr (Thu, 27 Feb 2020 20:35:07 GMT):
right but different error message

ownspies (Thu, 27 Feb 2020 20:35:12 GMT):
Ahh yes, the TLS CA files have to be included in the network config JSON file

Antimttr (Thu, 27 Feb 2020 20:35:14 GMT):
still a tls error though

Antimttr (Thu, 27 Feb 2020 20:35:25 GMT):
yes they are

ownspies (Thu, 27 Feb 2020 20:35:27 GMT):
yeah, sorry, I mean my team just went through that same problem

Antimttr (Thu, 27 Feb 2020 20:35:47 GMT):
but my tlsca is chained

ownspies (Thu, 27 Feb 2020 20:35:49 GMT):
is your TLS CA comprised of more than one parent, meaning is it Root -> Intermediate -> Peer Cert

Antimttr (Thu, 27 Feb 2020 20:35:56 GMT):
im wodnering if i need to supply the chain cert

ownspies (Thu, 27 Feb 2020 20:36:04 GMT):
yes you need to include the chain cert in the JSON

Antimttr (Thu, 27 Feb 2020 20:36:04 GMT):
yes

ownspies (Thu, 27 Feb 2020 20:36:17 GMT):
not the TLS cert for the server, just the chain

Antimttr (Thu, 27 Feb 2020 20:36:24 GMT):
does it use a different key name or still

Antimttr (Thu, 27 Feb 2020 20:36:26 GMT):
tlsCACerts

ownspies (Thu, 27 Feb 2020 20:37:07 GMT):
``` "orderers": { "orderer-01.dev.example.net:7050": { "url": "grpcs://orderer-01.dev.example.net:7050", "tlsCACerts": { "pem": "-----BEGIN CERTIFICATE-----\nMIICmzCCxxxxxxxxxxxxxxxxUrk=\n-----END CERTIFICATE-----\n" } }, ```

ownspies (Thu, 27 Feb 2020 20:37:29 GMT):
you have to do that for each orderer and each peer

Antimttr (Thu, 27 Feb 2020 20:38:16 GMT):
i diff'd the cert thats in `crypto-config/ordererOrganizations/example.com/tlsca/tls.example.com.crt.pem` and the one in the orderer directory : `crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/tls-msp/tlscacerts/cert.pem`

Antimttr (Thu, 27 Feb 2020 20:38:21 GMT):
and they are completely different certs

Antimttr (Thu, 27 Feb 2020 20:38:29 GMT):
which i was confused by because i thought they would be the same

Antimttr (Thu, 27 Feb 2020 20:38:31 GMT):
but i guess not

ownspies (Thu, 27 Feb 2020 20:38:51 GMT):
tls-msp - is that standard?

ownspies (Thu, 27 Feb 2020 20:38:56 GMT):
I've never seen that dir

Antimttr (Thu, 27 Feb 2020 20:39:07 GMT):
thats what they used in the fabric-ca-server ops guide

Antimttr (Thu, 27 Feb 2020 20:39:16 GMT):
which is what i used to build the msp

ownspies (Thu, 27 Feb 2020 20:39:20 GMT):
hmm, didn't RTFM that one

ownspies (Thu, 27 Feb 2020 20:39:39 GMT):
I use the cert from tlsca

Antimttr (Thu, 27 Feb 2020 20:39:42 GMT):
are they different in your setup to?

ownspies (Thu, 27 Feb 2020 20:39:56 GMT):
no, I have a simplified TLS setup

ownspies (Thu, 27 Feb 2020 20:39:57 GMT):
just

ownspies (Thu, 27 Feb 2020 20:40:10 GMT):
root -> intermediate -> tls parent ->

ownspies (Thu, 27 Feb 2020 20:40:10 GMT):
root -> intermediate -> tls parent ->

ownspies (Thu, 27 Feb 2020 20:41:13 GMT):
the certs have to be in a specific order too...

ownspies (Thu, 27 Feb 2020 20:41:18 GMT):
when they are chained

Antimttr (Thu, 27 Feb 2020 20:41:24 GMT):
yes according to the ops guide

Antimttr (Thu, 27 Feb 2020 20:41:36 GMT):
actually according to the medium article i used

Antimttr (Thu, 27 Feb 2020 20:41:57 GMT):
i first cat the intermediate signing cert, then the rca cert

Antimttr (Thu, 27 Feb 2020 20:42:06 GMT):
so child, parent

ownspies (Thu, 27 Feb 2020 20:42:18 GMT):
do you just have two certs above the server TLS cert ?

Antimttr (Thu, 27 Feb 2020 20:42:33 GMT):
well just one cert

Antimttr (Thu, 27 Feb 2020 20:42:37 GMT):
the root cert

ownspies (Thu, 27 Feb 2020 20:42:43 GMT):
and it signs all the TLS certs ?

ownspies (Thu, 27 Feb 2020 20:42:45 GMT):
so its

Antimttr (Thu, 27 Feb 2020 20:42:48 GMT):
then the tls fabric-server's cert

ownspies (Thu, 27 Feb 2020 20:43:06 GMT):
root -> ... or root -> ?

ownspies (Thu, 27 Feb 2020 20:43:06 GMT):
root -> ... and root -> ?

Antimttr (Thu, 27 Feb 2020 20:43:33 GMT):
rca.example.com -> tls.example.com -> orderer1.example.com

ownspies (Thu, 27 Feb 2020 20:44:05 GMT):
ok, so your TLS chain file should include (in this order) tls.example.com+rca.example.com

Antimttr (Thu, 27 Feb 2020 20:44:16 GMT):
ok

Antimttr (Thu, 27 Feb 2020 20:45:06 GMT):
i have that certificate already in my example.com/tlsca dir

Antimttr (Thu, 27 Feb 2020 20:45:29 GMT):
ill set that as the tlscacert in the network-config.yaml

Antimttr (Thu, 27 Feb 2020 20:45:31 GMT):
and try again

Antimttr (Thu, 27 Feb 2020 20:48:21 GMT):
hmm now i got `javax.net.ssl.SSLHandshakeException: error:0b000074:X.509 certificate routines:OPENSSL_internal:KEY_VALUES_MISMATCH`

Antimttr (Thu, 27 Feb 2020 20:49:30 GMT):
im wondering if in the docker environment if ORDERER_GENERAL_TLS_ROOTCAS needs to also contain this chain cert

Antimttr (Thu, 27 Feb 2020 20:49:48 GMT):
right now its pointing to the tlscacert in the orderer directory

Antimttr (Thu, 27 Feb 2020 21:43:06 GMT):
ok so set the orderers docker yaml config to point ORDERER_GENERAL_TLS_ROOTCAS to the chain cert as well, but didnt make any difference

ownspies (Fri, 28 Feb 2020 14:22:59 GMT):
So it's hard to help without combing through all the config files, but what I had to do with issues like this is I would retrieve the cert from the orderer using `openssl s_client -connect google.com:443` (obviously use the correct host/port) and I would save the cert locally

ownspies (Fri, 28 Feb 2020 14:23:21 GMT):
Then I would use the local TLS certs to verify the certificate

ownspies (Fri, 28 Feb 2020 14:23:49 GMT):
since you have chained certs, create a new directory and put each certificate into a separate file in that directory

ownspies (Fri, 28 Feb 2020 14:24:01 GMT):
and put the downloaded orderer cert into the directory above that

ownspies (Fri, 28 Feb 2020 14:24:52 GMT):
and run `openssl verify -CAfile chain/root.pem o.pem`

ownspies (Fri, 28 Feb 2020 14:24:52 GMT):
run `openssl verify -CAfile chain.pem orderer.pem`

ownspies (Fri, 28 Feb 2020 14:27:26 GMT):
e.g. I ran this locally:"

ownspies (Fri, 28 Feb 2020 14:27:26 GMT):
e.g. I ran this locally:

ownspies (Fri, 28 Feb 2020 14:28:10 GMT):
```openssl verify -CAfile tlsca/tls.sit.example.net-chain.pem orderers/orderer-01.sit.example.net/tls/orderer-01.sit.example.net-cert.pem orderers/orderer-01.sit.champgrid.net/tls/orderer-01.sit.champgrid.net-cert.pem: OK ```

ownspies (Fri, 28 Feb 2020 14:28:10 GMT):
```openssl verify -CAfile tlsca/tls.sit.example.net-chain.pem orderers/orderer-01.sit.example.net/tls/orderer-01.sit.example.net-cert.pem orderers/orderer-01.sit.example.net/tls/orderer-01.sit.example.net-cert.pem: OK ```

ownspies (Fri, 28 Feb 2020 14:28:59 GMT):
doing this tells you exactly which cert chain to use with your orderers

Antimttr (Fri, 28 Feb 2020 15:36:47 GMT):
oh

Antimttr (Fri, 28 Feb 2020 15:36:49 GMT):
very nice!

Antimttr (Fri, 28 Feb 2020 15:36:54 GMT):
ok im going to try that, thanks

Antimttr (Fri, 28 Feb 2020 15:42:06 GMT):
```CONNECTED(00000003) depth=0 C = US, ST = California, L = San Diego, O = example.com, OU = orderer, CN = orderer1.example.com verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 C = US, ST = California, L = San Diego, O = example.com, OU = orderer, CN = orderer1.example.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/C=US/ST=California/L=San Diego/O=example.com/OU=orderer/CN=orderer1.example.com i:/C=US/ST=California/O=example.com/CN=ica.example.com --- Server certificate -----BEGIN CERTIFICATE----- MIICzTCCAnOgAwIBAgIUXm8IUylYLWRsSW6Y3SCSOZPrdBIwCgYIKoZIzj0EAwIw UjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFDASBgNVBAoMC2V4 YW1wbGUuY29tMRgwFgYDVQQDDA9pY2EuZXhhbXBsZS5jb20wHhcNMjAwMjI2MjI0 NjAwWhcNMjEwMjI1MjI1MTAwWjB9MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2Fs aWZvcm5pYTESMBAGA1UEBxMJU2FuIERpZWdvMRQwEgYDVQQKEwtleGFtcGxlLmNv bTEQMA4GA1UECxMHb3JkZXJlcjEdMBsGA1UEAxMUb3JkZXJlcjEuZXhhbXBsZS5j b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQtoKENXIVwb5+6KKQ2sr2Ql48T 8qfpa4uEX2ZDrR5gF4c5LkRMssGTyjU8kjuv6A3xiO3t2amkH/UQgZ9qbOiWo4H7 MIH4MA4GA1UdDwEB/wQEAwIDqDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH AwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUHPqrAVWiSmJ/NAaaHrSlHp6ElXsw HwYDVR0jBBgwFoAUNN/LZ8PjVWo+NseL+YyruD3aDugwDwYDVR0RBAgwBocEAw5I iDBoBggqAwQFBgcIAQRceyJhdHRycyI6eyJoZi5BZmZpbGlhdGlvbiI6IiIsImhm LkVucm9sbG1lbnRJRCI6Im9yZGVyZXIxLmV4YW1wbGUuY29tIiwiaGYuVHlwZSI6 Im9yZGVyZXIifX0wCgYIKoZIzj0EAwIDSAAwRQIhAKHm1YpffdrUUGku8FXYDjgL v8NYzttIdIqrRcjY/kDhAiBgW/H/trfaZ35dAzfh66ZfqEn6Gs1Y6GAF2f9WtOdk aA== -----END CERTIFICATE----- subject=/C=US/ST=California/L=San Diego/O=example.com/OU=orderer/CN=orderer1.example.com issuer=/C=US/ST=California/O=example.com/CN=ica.example.com --- No client certificate CA names sent Client Certificate Types: RSA sign, ECDSA sign Requested Signature Algorithms: RSA+SHA256:ECDSA+SHA256:RSA+SHA384:ECDSA+SHA384:RSA+SHA512:ECDSA+SHA512:RSA+SHA1:ECDSA+SHA1 Shared Requested Signature Algorithms: RSA+SHA256:ECDSA+SHA256:RSA+SHA384:ECDSA+SHA384:RSA+SHA512:ECDSA+SHA512:RSA+SHA1:ECDSA+SHA1 Peer signing digest: SHA512 Server Temp Key: ECDH, P-256, 256 bits --- SSL handshake has read 1036 bytes and written 427 bytes --- New, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES256-GCM-SHA384 Server public key is 256 bit Secure Renegotiation IS supported Compression: NONE Expansion: NONE No ALPN negotiated SSL-Session: Protocol : TLSv1.2 Cipher : ECDHE-ECDSA-AES256-GCM-SHA384 Session-ID: Session-ID-ctx: Master-Key: 9AE1E724773D020D43D8CD7CF9CE67EB3D570E0FAE322462BD65BFFE6B6A927992BDCD5DB9DDC7F57BABB059CA3233F7 Key-Arg : None Krb5 Principal: None PSK identity: None PSK identity hint: None Start Time: 1582904463 Timeout : 300 (sec) Verify return code: 21 (unable to verify the first certificate) --- ```

ownspies (Fri, 28 Feb 2020 15:42:45 GMT):
yup, save that `---BEGIN CERTIFI...` to the `---END CERT...`

Antimttr (Fri, 28 Feb 2020 15:43:22 GMT):
ok saved that

Antimttr (Fri, 28 Feb 2020 15:43:43 GMT):
now ill verify

ownspies (Fri, 28 Feb 2020 15:43:47 GMT):
yup

Antimttr (Fri, 28 Feb 2020 15:44:51 GMT):
```$ openssl verify -CAfile chain.example.com.crt.pem ~/tmp/orderer.pem /home/m____/tmp/orderer.pem: OK ```

Antimttr (Fri, 28 Feb 2020 15:44:58 GMT):
so that works

Antimttr (Fri, 28 Feb 2020 15:45:14 GMT):
i think they're the same cert if im not mistaken

Antimttr (Fri, 28 Feb 2020 15:45:17 GMT):
let me diff them

ownspies (Fri, 28 Feb 2020 15:45:29 GMT):
yeah, you don't want to verify the cert with itself

ownspies (Fri, 28 Feb 2020 15:45:33 GMT):
you want to verify the cert chain

Antimttr (Fri, 28 Feb 2020 15:45:35 GMT):
oh no they're not

Antimttr (Fri, 28 Feb 2020 15:46:26 GMT):
hmm ok well

Antimttr (Fri, 28 Feb 2020 15:46:46 GMT):
those warnings at the begining of the first openssl command were interesting

Antimttr (Fri, 28 Feb 2020 15:47:00 GMT):
but maybe they occur just because they're not signed by a real root authority

Antimttr (Fri, 28 Feb 2020 15:47:05 GMT):
so it cant verify them that way

Antimttr (Fri, 28 Feb 2020 15:48:30 GMT):
ok so i found what cert its giving me, its the orderer.example.com/tls-msp/signcerts/cert.pem

Antimttr (Fri, 28 Feb 2020 15:48:39 GMT):
which i beleive is correct

ownspies (Fri, 28 Feb 2020 15:49:34 GMT):
ohhh so you're using the CA to register then enroll a user

ownspies (Fri, 28 Feb 2020 15:49:43 GMT):
and using that users certs for TLS

ownspies (Fri, 28 Feb 2020 15:49:46 GMT):
got it

Antimttr (Fri, 28 Feb 2020 15:49:53 GMT):
i have two fabric-ca-server's per org

Antimttr (Fri, 28 Feb 2020 15:49:58 GMT):
one is the regular one, and one is the tls

Antimttr (Fri, 28 Feb 2020 15:50:07 GMT):
they both come from independent rootcas

Antimttr (Fri, 28 Feb 2020 15:51:14 GMT):
that openssl command is handy though, i love stuff like that

ownspies (Fri, 28 Feb 2020 15:51:19 GMT):
yeah, ok, so you should have the chain files inside `tls-msp/cacerts` and `tls-msp/intermediatecerts`

Antimttr (Fri, 28 Feb 2020 15:51:24 GMT):
i had no idea you could extract the cert like that

ownspies (Fri, 28 Feb 2020 15:51:39 GMT):
yeah, I've learned a LOT about openssl commands

Antimttr (Fri, 28 Feb 2020 15:51:44 GMT):
oh and intermediatecerts?

Antimttr (Fri, 28 Feb 2020 15:51:51 GMT):
i think my intermediatecerts is empty

ownspies (Fri, 28 Feb 2020 15:51:56 GMT):
you'll join all the files from those two directories

ownspies (Fri, 28 Feb 2020 15:52:34 GMT):
and that will be your chain file

Antimttr (Fri, 28 Feb 2020 15:52:37 GMT):
nm its not empty

Antimttr (Fri, 28 Feb 2020 15:52:42 GMT):
let me see if its my chain file though

Antimttr (Fri, 28 Feb 2020 15:53:06 GMT):
it is not a chain file

Antimttr (Fri, 28 Feb 2020 15:53:15 GMT):
but neither is it the same as whats in tlscacerts

ownspies (Fri, 28 Feb 2020 15:53:44 GMT):
well the file in signercerts is signed by the file in cacerts + intermediatecerts

Antimttr (Fri, 28 Feb 2020 15:54:04 GMT):
i see

ownspies (Fri, 28 Feb 2020 15:54:11 GMT):
you could validate that statement using the openssl verify command to verify the file in signercerts

Antimttr (Fri, 28 Feb 2020 15:54:14 GMT):
let me examine the cert in intermediate

ownspies (Fri, 28 Feb 2020 15:54:19 GMT):
it works a little different when you have multiple files

ownspies (Fri, 28 Feb 2020 15:54:34 GMT):
but ... basically all your TLS material you need is in that tls-msp path

Antimttr (Fri, 28 Feb 2020 15:55:12 GMT):
```$ openssl verify -CAfile tlscacerts/tls-3-14-72-136-7151.pem signcerts/cert.pem signcerts/cert.pem: C = US, ST = California, L = San Diego, O = example.com, OU = orderer, CN = orderer1.example.com error 20 at 0 depth lookup:unable to get local issuer certificate ```

Antimttr (Fri, 28 Feb 2020 15:55:12 GMT):
```$ openssl verify -CAfile tlscacerts/tls-3-x-72-x6-7151.pem signcerts/cert.pem signcerts/cert.pem: C = US, ST = California, L = San Diego, O = example.com, OU = orderer, CN = orderer1.example.com error 20 at 0 depth lookup:unable to get local issuer certificate ```

ownspies (Fri, 28 Feb 2020 15:55:56 GMT):
right - the tlsca didn't sign the signcert file

Antimttr (Fri, 28 Feb 2020 15:56:35 GMT):
should it have?

ownspies (Fri, 28 Feb 2020 15:56:46 GMT):
no

ownspies (Fri, 28 Feb 2020 15:57:01 GMT):
the files in cacerts/ and intermediatecerts/ signed that file

Antimttr (Fri, 28 Feb 2020 15:57:11 GMT):
same response if i verify the signcert with the tlscaintermediate cert

Antimttr (Fri, 28 Feb 2020 15:57:35 GMT):
i dont have any files in cacerts

Antimttr (Fri, 28 Feb 2020 15:57:38 GMT):
in the tls-msp anyways

Antimttr (Fri, 28 Feb 2020 15:57:41 GMT):
only tlscacerts

ownspies (Fri, 28 Feb 2020 15:57:49 GMT):
oh

Antimttr (Fri, 28 Feb 2020 15:58:09 GMT):
i noticed that when i enrolled tls server

ownspies (Fri, 28 Feb 2020 15:58:17 GMT):
what I output from `openssl x509 -noout -text -in signcerts/cert.pem` then ?

Antimttr (Fri, 28 Feb 2020 15:58:24 GMT):
only the tls directories in the msp it produced had anythign in them

Antimttr (Fri, 28 Feb 2020 15:58:57 GMT):
```Certificate: Data: Version: 3 (0x2) Serial Number: 5e:6f:08:53:29:58:2d:64:6c:49:6e:98:dd:20:92:39:93:eb:74:12 Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, O=example.com, CN=ica.example.com Validity Not Before: Feb 26 22:46:00 2020 GMT Not After : Feb 25 22:51:00 2021 GMT Subject: C=US, ST=California, L=San Diego, O=example.com, OU=orderer, CN=orderer1.example.com Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:2d:a0:a1:0d:5c:85:70:6f:9f:ba:28:a4:36:b2: bd:90:97:8f:13:f2:a7:e9:6b:8b:84:5f:66:43:ad: 1e:60:17:87:39:2e:44:4c:b2:c1:93:ca:35:3c:92: 3b:af:e8:0d:f1:88:ed:ed:d9:a9:a4:1f:f5:10:81: 9f:6a:6c:e8:96 ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Key Usage: critical Digital Signature, Key Encipherment, Key Agreement X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: 1C:FA:AB:01:55:A2:4A:62:7F:34:06:9A:1E:B4:A5:1E:9E:84:95:7B X509v3 Authority Key Identifier: keyid:34:DF:CB:67:C3:E3:55:6A:3E:36:C7:8B:F9:8C:AB:B8:3D:DA:0E:E8 X509v3 Subject Alternative Name: IP Address:3.x.72.x 1.2.3.4.5.6.7.8.1: {"attrs":{"hf.Affiliation":"","hf.EnrollmentID":"orderer1.example.com","hf.Type":"orderer"}} Signature Algorithm: ecdsa-with-SHA256 30:45:02:21:00:a1:e6:d5:8a:5f:7d:da:d4:50:69:2e:f0:55: d8:0e:38:0b:bf:c3:58:ce:db:48:74:8a:ab:45:c8:d8:fe:40: e1:02:20:60:5b:f1:ff:b6:b7:da:67:7e:5d:03:37:e1:eb:a6: 5f:a8:49:fa:1a:cd:58:e8:60:05:d9:ff:56:b4:e7:64:68 ```

Antimttr (Fri, 28 Feb 2020 15:59:43 GMT):
and thats the same cert that i got when i downloaded the cert via openssl

ownspies (Fri, 28 Feb 2020 15:59:48 GMT):
if you do the same for the file in tlsintermediatecerts/ what do you get ?

Antimttr (Fri, 28 Feb 2020 16:00:42 GMT):
```Certificate: Data: Version: 3 (0x2) Serial Number: 4096 (0x1000) Signature Algorithm: ecdsa-with-SHA256 Issuer: C=US, ST=California, L=San Diego, O=example.com, CN=rca.example.com Validity Not Before: Feb 3 18:32:13 2020 GMT Not After : Feb 1 18:32:13 2025 GMT Subject: C=US, ST=California, O=example.com, CN=ica.example.com Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (256 bit) pub: 04:2f:ea:c0:33:d9:44:64:9c:7f:70:0e:55:24:b2: 03:3c:d3:ea:51:1a:0d:53:42:8a:ec:e2:1c:00:e1: e0:7a:ad:05:b7:0f:74:bb:f0:72:b6:08:76:c7:eb: 8d:69:a0:d5:c4:ba:fa:5b:8d:7f:fe:2a:46:44:50: 6e:83:2b:2b:05 ASN1 OID: prime256v1 NIST CURVE: P-256 X509v3 extensions: X509v3 Subject Key Identifier: 34:DF:CB:67:C3:E3:55:6A:3E:36:C7:8B:F9:8C:AB:B8:3D:DA:0E:E8 X509v3 Authority Key Identifier: keyid:93:A8:FC:F3:51:C7:A1:5D:16:88:DB:D5:FF:B9:ED:57:D9:34:8E:4F X509v3 Basic Constraints: critical CA:TRUE, pathlen:0 X509v3 Key Usage: critical Digital Signature, Certificate Sign, CRL Sign Signature Algorithm: ecdsa-with-SHA256 30:45:02:20:7a:b2:08:38:24:00:85:67:d2:94:a1:ff:48:1d: 5c:24:88:5c:e8:de:82:7a:e3:9f:12:6c:0a:54:82:76:e9:84: 02:21:00:cc:2f:12:08:9b:0c:9d:98:ba:69:bd:25:e6:57:64: b2:36:03:2e:f3:1a:a8:70:a8:66:91:52:2b:ab:62:02:39 ```

ownspies (Fri, 28 Feb 2020 16:00:56 GMT):
ok, wasn't expecting that

Antimttr (Fri, 28 Feb 2020 16:01:29 GMT):
does that look off to you?

ownspies (Fri, 28 Feb 2020 16:06:14 GMT):
you could try

ownspies (Fri, 28 Feb 2020 16:06:48 GMT):
```openssl verify -CAfile tlscacerts/ -untrusted tlsintermediatecerts signcerts/cert.pem```

ownspies (Fri, 28 Feb 2020 16:06:48 GMT):
```openssl verify -CAfile tlscacerts/ -untrusted tlsintermediatecerts/ signcerts/cert.pem```

ownspies (Fri, 28 Feb 2020 16:07:36 GMT):
basically though the files in tlscacerts and tlsintermediatecerts are your chain - assemble those into a single file in the correct sequence and use that for your Java app

Antimttr (Fri, 28 Feb 2020 16:07:44 GMT):
`signcerts/cert.pem: OK`

ownspies (Fri, 28 Feb 2020 16:08:12 GMT):
have to jump off for a bit, but that is your chain

Antimttr (Fri, 28 Feb 2020 16:08:22 GMT):
so i just need to make it into a chain file

Antimttr (Fri, 28 Feb 2020 16:08:29 GMT):
and use that in the tlsCACerts in my network-config

Antimttr (Fri, 28 Feb 2020 16:08:34 GMT):
if i understasnd correctly

Antimttr (Fri, 28 Feb 2020 16:17:18 GMT):
ok so here's the issue, the two of those files chained together is equal to the chainfile i already have, and that file does verify the signcerts/cert.pem

Antimttr (Fri, 28 Feb 2020 16:20:24 GMT):
the error message seems to imply some sort of mismatch with the cert key file

Antimttr (Fri, 28 Feb 2020 16:20:36 GMT):
`OPENSSL_internal:KEY_VALUES_MISMATCH`

Antimttr (Fri, 28 Feb 2020 16:20:59 GMT):
https://knowledge.digicert.com/solution/SO7302.html

ownspies (Fri, 28 Feb 2020 16:24:42 GMT):
so do this

ownspies (Fri, 28 Feb 2020 16:24:48 GMT):
?

Antimttr (Fri, 28 Feb 2020 16:25:05 GMT):
you know theres two other files that the sdk requires to do this transaction

Antimttr (Fri, 28 Feb 2020 16:25:13 GMT):
the clientcertfile and the clientkey file

Antimttr (Fri, 28 Feb 2020 16:25:25 GMT):
im wondering if those are off

ownspies (Fri, 28 Feb 2020 16:25:32 GMT):
https://www.ssl247.com/kb/ssl-certificates/troubleshooting/certificate-matches-private-key

Antimttr (Fri, 28 Feb 2020 16:25:38 GMT):
right now i have the clientcertfile pointing to its tlscacert

Antimttr (Fri, 28 Feb 2020 16:25:44 GMT):
which wouldnt correspond to the key file

Antimttr (Fri, 28 Feb 2020 16:25:57 GMT):
so ii tried changing it to the signcert in the Admin@example.com/tsl-msp

Antimttr (Fri, 28 Feb 2020 16:26:02 GMT):
testing now

ownspies (Fri, 28 Feb 2020 16:26:24 GMT):
compare the signcert/cert.pem with your private key in keyfiles/

Antimttr (Fri, 28 Feb 2020 16:26:37 GMT):
oh

Antimttr (Fri, 28 Feb 2020 16:26:41 GMT):
i think that did it

Antimttr (Fri, 28 Feb 2020 16:26:45 GMT):
im getting past tls handshaking now

ownspies (Fri, 28 Feb 2020 16:27:03 GMT):
nice

Antimttr (Fri, 28 Feb 2020 16:27:37 GMT):
``` [channel: mychannel] Rejecting broadcast of config message from 184.X.179.X:34092 because of error: config update for existing channel did not pass initial checks: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied 2020-02-28 16:26:19.548 UTC [comm.grpc.server] 1 -> INFO 02e streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=184.X.179.X:34092 grpc.peer_subject="CN=admin-orderer,OU=admin,O=example.com,L=San Diego,ST=California,C=US" grpc.code=OK grpc.call_duration=940.511µs ```

Antimttr (Fri, 28 Feb 2020 16:28:51 GMT):
hmm wondering why my admin isnt a writer

Antimttr (Fri, 28 Feb 2020 16:29:05 GMT):
maybe i should be using the msp cert not the tls-msp cert..

Antimttr (Fri, 28 Feb 2020 16:32:29 GMT):
hmm nope didnt make a difference

Antimttr (Fri, 28 Feb 2020 16:33:06 GMT):
let me double check my genesis block config

Antimttr (Fri, 28 Feb 2020 16:35:40 GMT):
hmm nothing in their about identities

Antimttr (Fri, 28 Feb 2020 16:38:21 GMT):
hmm maybe im attempting something stupid

Antimttr (Fri, 28 Feb 2020 16:39:24 GMT):
im trying to create a new channel

Antimttr (Fri, 28 Feb 2020 16:39:44 GMT):
but i've already created a genesis block by hand outside of the sdk

Antimttr (Fri, 28 Feb 2020 16:41:44 GMT):
but thats exactly how they do it in balance-transfer

Antimttr (Fri, 28 Feb 2020 16:41:50 GMT):
and this same process works their no probllem

Antimttr (Fri, 28 Feb 2020 16:43:30 GMT):
oh shoot, they have the admin keys encoded into their first block

Antimttr (Fri, 28 Feb 2020 16:43:34 GMT):
i dont have that

Antimttr (Fri, 28 Feb 2020 16:44:21 GMT):
no nm thats their network-config not their configtx.yaml

Antimttr (Fri, 28 Feb 2020 20:45:44 GMT):
yay i finally got it!

Antimttr (Fri, 28 Feb 2020 20:45:57 GMT):
had to copy updated admin certs into my org msp's

Antimttr (Fri, 28 Feb 2020 20:46:40 GMT):
and then regenerate the channel.tx and genesis.block

ownspies (Mon, 02 Mar 2020 13:38:23 GMT):
nice!

lionelronaldo (Tue, 03 Mar 2020 09:26:48 GMT):
Has joined the channel.

Antimttr (Tue, 03 Mar 2020 19:31:57 GMT):
@ownspies any chance you're about today?

ownspies (Tue, 03 Mar 2020 20:10:18 GMT):
Hey @Antimttr what's up?

Antimttr (Tue, 03 Mar 2020 20:12:23 GMT):
hey ownspies, so I'm attempting to resolve some of the crypto issues im having. When you generate your crypto do you specify the peers internal ip addresses via the SAN or via the CSR values?

Antimttr (Tue, 03 Mar 2020 20:12:55 GMT):
my peers are trying to gossip to one another but they cant resolve the hostnames: ` UTC [gossip.discovery] func1 -> WARN 37f Could not connect to Endpoint: peer1.org2.example.com:7021, InternalEndpoint: peer1.org2.example.com:7021, PKI-ID: , Metadata: : context deadline exceeded `

Antimttr (Tue, 03 Mar 2020 20:12:55 GMT):
my peers are trying to gossip to one another but they cant resolve the hostnames: `UTC [gossip.discovery] func1 -> WARN 37f Could not connect to Endpoint: peer1.org2.example.com:7021, InternalEndpoint: peer1.org2.example.com:7021, PKI-ID: , Metadata: : context deadline exceeded`

ownspies (Tue, 03 Mar 2020 20:13:00 GMT):
both I believe

ownspies (Tue, 03 Mar 2020 20:13:02 GMT):
let me check

ownspies (Tue, 03 Mar 2020 20:13:12 GMT):
this is the TLS for a peer, or the signer cert for a peer?

Antimttr (Tue, 03 Mar 2020 20:13:23 GMT):
both i suppose

Antimttr (Tue, 03 Mar 2020 20:13:57 GMT):
i mean i specified the public ip address of the peer in the CSR

Antimttr (Tue, 03 Mar 2020 20:14:07 GMT):
but it seems like its not using that data to try and gossip with the peer

Antimttr (Tue, 03 Mar 2020 20:14:52 GMT):
theres so much going on in the peer logs, hard to know whats normal and what needs to be addressed

Antimttr (Tue, 03 Mar 2020 20:15:53 GMT):
also seems like the peers are grabbing these ips that the host box is bound to but they're for internal use only, like in the 172.x.x.x network and it makes it so i have no idea which peer is on which ip address

ownspies (Tue, 03 Mar 2020 20:16:03 GMT):
I use the defaults for signer

ownspies (Tue, 03 Mar 2020 20:16:09 GMT):
```fabric-ca-client register -d \ -u ${PROTO}://$CA_ADMIN:$CA_PASSWORD@$SERVICE_DNS \ -M "${ORG_PATH}/msp" \ --id.name peer-0${PEERID}.${ORGID}.${DOMAIN_SUFFIX} \ --id.secret ${ORGID}-peer-0${PEERID}_pw \ --id.type peer```

ownspies (Tue, 03 Mar 2020 20:16:09 GMT):
```fabric-ca-client register -d \ -u ${PROTO}://$CA_ADMIN:$CA_PASSWORD@$SERVICE_DNS \ -M "${ORG_PATH}/msp" \ --id.name peer-0${PEERID}.${ORGID}.${DOMAIN_SUFFIX} \ --id.secret XXXXX \ --id.type peer```

Antimttr (Tue, 03 Mar 2020 20:16:15 GMT):
im thinking about just specifying a binding ip address

Antimttr (Tue, 03 Mar 2020 20:16:38 GMT):
so you dont use the -m flag at all

Antimttr (Tue, 03 Mar 2020 20:16:54 GMT):
in your SAN in the certificate do you have the hostname of the box used to run fabric-ca-client?

Antimttr (Tue, 03 Mar 2020 20:17:07 GMT):
i checked and thats what's in my SAN for all my generated certificates

ownspies (Tue, 03 Mar 2020 20:17:18 GMT):
for the TLS cert, I'm setting the SAN and the CN to the same

Antimttr (Tue, 03 Mar 2020 20:17:48 GMT):
and you're dealing with dns hostnames that actually resolve i take it?

Antimttr (Tue, 03 Mar 2020 20:17:52 GMT):
im still dealing with example.com

ownspies (Tue, 03 Mar 2020 20:17:57 GMT):
``` X509v3 extensions: X509v3 Extended Key Usage: TLS Web Server Authentication, TLS Web Client Authentication X509v3 Subject Key Identifier: 9F:95:50:7C:20:DB:DD:67:97:E8:CD:5C:FD:71:54:69:29:15:A3:EC X509v3 Authority Key Identifier: keyid:4D:1C:22:6C:33:83:3E:92:D3:D2:C1:F3:93:65:C6:CC:C2:68:E7:33 Authority Information Access: CA Issuers - URI:https://vault.sit.example.net/v1/tls/ca X509v3 Subject Alternative Name: DNS:peer-01.core.sit.example.net X509v3 CRL Distribution Points: Full Name: URI:https://vault.sit.example.net/v1/tls/crl ```

ownspies (Tue, 03 Mar 2020 20:18:16 GMT):
``` Subject: C=US, ST=Ohio, L=Cleveland, O=CHAMPtitles, OU=IT Operations, CN=peer-01.core.sit.example.net ```

ownspies (Tue, 03 Mar 2020 20:18:16 GMT):
``` Subject: C=US, ST=Ohio, L=Cleveland, O=MyOrg, OU=IT Operations, CN=peer-01.core.sit.example.net ```

Antimttr (Tue, 03 Mar 2020 20:18:48 GMT):
and so what address does your gossip try and go through?

Antimttr (Tue, 03 Mar 2020 20:18:55 GMT):
does it resolve that hostname?

ownspies (Tue, 03 Mar 2020 20:18:59 GMT):
peer-01.core.sit.example.net

ownspies (Tue, 03 Mar 2020 20:19:02 GMT):
which is a load balancer

ownspies (Tue, 03 Mar 2020 20:19:14 GMT):
using TCP not HTTP/HTTPS/GPC load balancing

ownspies (Tue, 03 Mar 2020 20:19:41 GMT):
So it is LB -> K8S Service (KubeProxy) -> K8S POD

Antimttr (Tue, 03 Mar 2020 20:19:43 GMT):
so you have that hostname mapped to an ip address in the box hosting the docker containers?

Antimttr (Tue, 03 Mar 2020 20:19:46 GMT):
oh you're doing k8

ownspies (Tue, 03 Mar 2020 20:19:52 GMT):
yeah and use DNS to resolve

ownspies (Tue, 03 Mar 2020 20:20:05 GMT):
so DNS points to LB, it is updated automatically using external-dns for K8S

ownspies (Tue, 03 Mar 2020 20:20:27 GMT):
the advertised gossip address is that hostname, peer-01.sit.example.net

ownspies (Tue, 03 Mar 2020 20:20:27 GMT):
the advertised gossip address is that hostname, peer-01.sit.example.net:7051

ownspies (Tue, 03 Mar 2020 20:20:43 GMT):
Port Number may be wrong, going from mem

Antimttr (Tue, 03 Mar 2020 20:20:52 GMT):
interesting

Antimttr (Tue, 03 Mar 2020 20:21:01 GMT):
i wonder if theres some way to specify hostnames in the docker container

Antimttr (Tue, 03 Mar 2020 20:21:06 GMT):
i guess a hosts file

ownspies (Tue, 03 Mar 2020 20:21:12 GMT):
K8S automatically registers the nodes / target ports with the LB

ownspies (Tue, 03 Mar 2020 20:21:24 GMT):
you can use something, just a sec

ownspies (Tue, 03 Mar 2020 20:22:00 GMT):
https://docs.docker.com/compose/compose-file/#extra_hosts

ownspies (Tue, 03 Mar 2020 20:22:14 GMT):
you also can use the `link` option to specify a host alias

ownspies (Tue, 03 Mar 2020 20:22:31 GMT):
https://docs.docker.com/compose/compose-file/#links

ownspies (Tue, 03 Mar 2020 20:22:34 GMT):
use something like

ownspies (Tue, 03 Mar 2020 20:22:40 GMT):
``` peer: ```

ownspies (Tue, 03 Mar 2020 20:22:40 GMT):
``` peer: links: - orderer:orderer-01.dev.example.net - peer-01:peer-01.dev.example.net ```

ownspies (Tue, 03 Mar 2020 20:23:24 GMT):
the left side of the colon is the service name as defined in the docker-compose, the right side is the new alias

ownspies (Tue, 03 Mar 2020 20:23:48 GMT):
this is what you use to reference other services in Docker because typically addresses are assigned dynamically, not statically

Antimttr (Tue, 03 Mar 2020 20:23:51 GMT):
ahh

Antimttr (Tue, 03 Mar 2020 20:23:52 GMT):
interesting

ownspies (Tue, 03 Mar 2020 20:24:02 GMT):
if you use static addresses in Docker, then you can use the extra_hosts option

Antimttr (Tue, 03 Mar 2020 20:24:16 GMT):
i might just do that

Antimttr (Tue, 03 Mar 2020 20:24:23 GMT):
i just want them all using the same ip address

Antimttr (Tue, 03 Mar 2020 20:24:39 GMT):
but then map that to different external hostnames

ownspies (Tue, 03 Mar 2020 20:25:29 GMT):
same IP inside docker or on the host OS ?

Antimttr (Tue, 03 Mar 2020 20:25:40 GMT):
well its the hostOS's main ip adress

ownspies (Tue, 03 Mar 2020 20:26:04 GMT):
also, for the signer certs

Antimttr (Tue, 03 Mar 2020 20:26:05 GMT):
and they all listen on it, but they seem to be trying to use their CN's to connect to eachother

Antimttr (Tue, 03 Mar 2020 20:26:34 GMT):
yeah i could add it as CSR/SAN to the signer certs

ownspies (Tue, 03 Mar 2020 20:26:49 GMT):
``` Subject: C=US, ST=Ohio, L=Cleveland, O=MyOrg, OU=peer, CN=peer-01.core.sit.example.net ... X509v3 extensions: X509v3 Key Usage: critical Digital Signature X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: 9A:81:74:2D:2F:9C:55:33:F5:38:51:CF:7E:BC:D1:61:35:E2:B7:B6 X509v3 Authority Key Identifier: keyid:09:35:72:FC:A6:5F:E0:2D:BD:7F:B2:70:4D:EB:D5:F0:6F:0C:7B:49 X509v3 Subject Alternative Name: DNS:localhost, DNS:peer-01.core.sit.exampl.net, DNS:peer-01, DNS:peer-01.core, DNS:peer-01.core.dev 1.2.3.4.5.6.7.8.1: {"attrs":{"hf.Affiliation":"","hf.EnrollmentID":"peer-01.core.sit.example.net","hf.Type":"peer"}} ```

Antimttr (Tue, 03 Mar 2020 20:26:49 GMT):
not sure which one it needs so ill do both

Antimttr (Tue, 03 Mar 2020 20:27:38 GMT):
its like the CSR stuff doesnt even show up in the cert

Antimttr (Tue, 03 Mar 2020 20:27:47 GMT):
is that something that just lives on fabric-ca-server db?

ownspies (Tue, 03 Mar 2020 20:28:40 GMT):
I specify custom ones

ownspies (Tue, 03 Mar 2020 20:28:45 GMT):
values for the SAN I mean

Antimttr (Tue, 03 Mar 2020 20:29:04 GMT):
yeah, im going to need to start doing that

Antimttr (Tue, 03 Mar 2020 20:29:23 GMT):
i mistakenly thought putting in ip into the CSR would put it into the SAN

ownspies (Tue, 03 Mar 2020 20:31:00 GMT):
I do set a custom CA config file

ownspies (Tue, 03 Mar 2020 20:31:08 GMT):
``` hosts: - localhost # K8S Service - {{ include "hlf-ca.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local {{- if .Values.ingress.hosts }} # Ingresses {{- range .Values.ingress.hosts }} - {{ . }} {{- end }} {{- end }} ```

ownspies (Tue, 03 Mar 2020 20:31:57 GMT):
actually, that's the CA, I need to get the peer config

ownspies (Tue, 03 Mar 2020 20:33:22 GMT):
I do set it somewhere when I register the peer, but I can't remember where I set it

ownspies (Tue, 03 Mar 2020 20:34:38 GMT):
if you need me to find that, let me know

Antimttr (Tue, 03 Mar 2020 20:34:53 GMT):
im not really sure what thats doing

Antimttr (Tue, 03 Mar 2020 20:35:05 GMT):
i mean i see it includes a new property

Antimttr (Tue, 03 Mar 2020 20:35:07 GMT):
to the certificate

Antimttr (Tue, 03 Mar 2020 20:35:26 GMT):
i havent read about those properties much yet

ownspies (Tue, 03 Mar 2020 20:35:30 GMT):
it's just Go template

ownspies (Tue, 03 Mar 2020 20:35:37 GMT):
it's just specifying the host names to use when creating a CSR

ownspies (Tue, 03 Mar 2020 20:35:37 GMT):
it's just specifying the host names to use for the SAN component when creating a CSR

ownspies (Tue, 03 Mar 2020 20:36:13 GMT):
so it includes 'localhost', the Kubernetes DNS name (that is the .svc.cluster.local part), and any hostnames assigned to the ingress

Antimttr (Tue, 03 Mar 2020 20:36:20 GMT):
so that makes it so you dont have to use the -m flag when you call fabric-ca-client ?

ownspies (Tue, 03 Mar 2020 20:36:30 GMT):
I *think* that is what I was doing

Antimttr (Tue, 03 Mar 2020 20:38:46 GMT):
did you already know k8 before you started your hlf project?

Antimttr (Tue, 03 Mar 2020 20:39:05 GMT):
im wondering if i should just bite the bullet and use k8 instead of docker-compose

ownspies (Tue, 03 Mar 2020 20:40:16 GMT):
no, learned it as I went

ownspies (Tue, 03 Mar 2020 20:40:22 GMT):
K8S and Helm charts

ownspies (Tue, 03 Mar 2020 20:40:34 GMT):
I didn't learn the install part, I'm using AWS EKS

ownspies (Tue, 03 Mar 2020 20:40:39 GMT):
but could easily be GCE

ownspies (Tue, 03 Mar 2020 20:40:57 GMT):
nice thing about K8S is portability (as much as anything can be portable)

theDweeb (Wed, 04 Mar 2020 02:40:04 GMT):
Has joined the channel.

theDweeb (Wed, 04 Mar 2020 02:40:04 GMT):
Hey so I cloned the fabric-gateway-java and ran mvn install but I keep running into this error within the orderer.exampled.com container: [channel testchainid] config requires unsupported channel capabilities: Channel capability V2_0 is required but not supported: Channel capability V2_0 is required but not supported

theDweeb (Wed, 04 Mar 2020 02:40:54 GMT):
I cleared all docker images prior and tried changing the capability version in confitx.yaml but still error, the orderer container closes immediately

theDweeb (Wed, 04 Mar 2020 15:24:52 GMT):
nvm I fixed it. The the script that pulls the images must be incorrect, I used the latest curl command from readingthedocs and it worked.

mauricio (Wed, 04 Mar 2020 16:58:35 GMT):
Hi, I'm getting an error trying to send a transaction (fabcar) with fabric-java-gateway, I don't know what this error means, if I run the fabcar sample for Node.js it works but with Java/Scala doesn't `ContractException: No valid proposal responses received. 4 peer error responses: Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: ae2e7946864382bee521d0c3eff2e347bf9e3fb2c586c6c87032633298392ee3 to Peer{ id: 13, name: peer0.org2.example.com:9051, channelName: mychannel, url: grpcs://peer0.org2.example.com:9051, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org2.example.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: peer0.org2.example.com: nodename nor servname provided, or not known`

mauricio (Wed, 04 Mar 2020 16:58:35 GMT):
Hi, I'm getting an error trying to send a transaction (fabcar) with fabric-java-gateway, I don't know what this error means, if I run the fabcar sample for Node.js it works but with Java/Scala doesn't ```ContractException: No valid proposal responses received. 4 peer error responses: Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: ae2e7946864382bee521d0c3eff2e347bf9e3fb2c586c6c87032633298392ee3 to Peer{ id: 13, name: peer0.org2.example.com:9051, channelName: mychannel, url: grpcs://peer0.org2.example.com:9051, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=Unable to resolve host peer0.org2.example.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: peer0.org2.example.com: nodename nor servname provided, or not known```

braduf (Wed, 04 Mar 2020 18:00:07 GMT):
Has joined the channel.

aatkddny (Wed, 04 Mar 2020 18:44:58 GMT):
fabric-gateway - is this still the only way to override the max message size? ``` p.put("grpc.NettyChannelBuilderOption.maxInboundMessageSize", grpcMaxInboundMessageSize); p.put("grpc.NettyChannelBuilderOption_maxInboundMessageSize", grpcMaxInboundMessageSize); ```

Antimttr (Wed, 04 Mar 2020 19:06:16 GMT):
there is one option about max message size in the orderer section of the configtx.yaml

Antimttr (Wed, 04 Mar 2020 19:06:22 GMT):
so it would be a per channel option

Antimttr (Wed, 04 Mar 2020 19:06:46 GMT):
``` # Batch Size: Controls the number of messages batched into a block BatchSize: # Max Message Count: The maximum number of messages to permit in a batch MaxMessageCount: 10 # Absolute Max Bytes: The absolute maximum number of bytes allowed for # the serialized messages in a batch. AbsoluteMaxBytes: 98 MB # Preferred Max Bytes: The preferred maximum number of bytes allowed for # the serialized messages in a batch. A message larger than the preferred # max bytes will result in a batch larger than preferred max bytes. PreferredMaxBytes: 512 KB ```

aatkddny (Thu, 05 Mar 2020 00:27:30 GMT):
sigh.

aatkddny (Thu, 05 Mar 2020 00:27:30 GMT):
sigh. the netty max for grpc communications. this has nothing to do with configtx.

aatkddny (Thu, 05 Mar 2020 00:27:30 GMT):
sigh. the netty max for grpc communications. this has nothing to do with configtx. it's an override property passed in through a network config Property for each of the peers and orderers.

Antimttr (Thu, 05 Mar 2020 01:58:14 GMT):
ahh so its an sdk level setting

Antimttr (Thu, 05 Mar 2020 01:58:16 GMT):
gotcha

bestbeforetoday (Thu, 05 Mar 2020 09:58:04 GMT):
I guess your peers are running in local Docker containers so your client will need to resolve them as _localhost_ rather than _peer1.org2.example.com_. If you set an environment variable `org.hyperledger.fabric.sdk.service_discovery.as_localhost` to `true`, this should coerce the SDK to resolve discovered nodes to localhost instead of using their advertised host name

mauricio (Thu, 05 Mar 2020 11:41:23 GMT):
Hi, @bestbeforetoday I already tried that but I'm getting the same error :/ I'm setting `ORG_HYPERLEDGER_FABRIC_SDK_SERVICE_DISCOVERY_AS_LOCALHOST=true` in my ~/.zshrc

mauricio (Thu, 05 Mar 2020 12:48:48 GMT):
I set the `peer1.org2.example.com` to 127.0.0.1 in the `/etc/hosts` and it works, thanks @bestbeforetoday

mauricio (Thu, 05 Mar 2020 12:50:12 GMT):
Do you know why my querys are taking so long in executing, around 11seconds, and the querys are caching and aren't retrieving the last information.

mauricio (Thu, 05 Mar 2020 12:50:12 GMT):
Do you know why my querys are taking so long to execute, around 11seconds, and the querys are caching and aren't retrieving the last information.

bestbeforetoday (Thu, 05 Mar 2020 13:08:49 GMT):
Glad you got that sorted. The environment variable dictates how it SDK handles nodes obtained through service discovery. I guess you had your peers listed in your connection profile, in which case you just need to make sure they resolve, and adding those entries to /etc/hosts is the way I do it

bestbeforetoday (Thu, 05 Mar 2020 13:09:19 GMT):
I don't know what would be causing your queries to be so slow, or why they would be cached. The SDK doesn't cache any results

dan13 (Thu, 05 Mar 2020 13:59:52 GMT):
Have you confirmed that the block has committed to the peer you are querying?

aatkddny (Thu, 05 Mar 2020 18:07:09 GMT):
ok so after a detour through fabric-orderer i'm back to the sdk. or more accurately fabric-gateway. it used to be that you could set an override in the properties for each of the peers and orderers to allow a message larger than the default max for netty (which the sdk delegates to for grpc) to be used. we used it successfully for quite some time. then we switched to fabric-gateway. we create a network config with the same parameters (and can see it changes the netty default) but we still can't do anything with a message that *grows* bigger than the default max as a result of the chaincode execution. so my question is simple - has anyone managed to put a message larger than the 4M (or so) default limit? if so, how?

Antimttr (Thu, 05 Mar 2020 21:32:57 GMT):
I'm trying to instantiate chaincode on mychannel using the Java sdk, and im calling channel.sendInstantiationProposal(), to my set of peers, I get all proposal responses back failed, however they dont have anything in their message so im kind of at a loss as to how to trouble shoot this, has anyone ever gotten back failed proposal responses with no message?

Antimttr (Thu, 05 Mar 2020 21:54:10 GMT):
so i just enumerated all the messages not just the first one

Antimttr (Thu, 05 Mar 2020 21:54:33 GMT):
now the message for sending the transaction to my first peer on org 1 is still empty, but all the other peers (i sent out 3 proposals) failed due to timeout

Antimttr (Fri, 06 Mar 2020 04:02:09 GMT):
lscc

Jelle.Diet (Fri, 06 Mar 2020 08:26:26 GMT):
can you not look in the logs of the peers themselves?

Antimttr (Fri, 06 Mar 2020 16:29:10 GMT):
hey jelle, i was able to find something in the logs but im not really sure what it means

Antimttr (Fri, 06 Mar 2020 16:29:24 GMT):
`HandleGetState -\u003e DEBU 801cb\u001b[0m [9159c9aa] No state associated with key: mcttrade. Sending RESPONSE with an empty payload\n","stream":"stderr","time":"2020-03-05T22:48:43.709296106Z"}`

obelix (Sun, 08 Mar 2020 14:51:42 GMT):
Has joined the channel.

jital (Mon, 09 Mar 2020 18:31:09 GMT):
Has joined the channel.

jital (Fri, 13 Mar 2020 09:03:01 GMT):
has anyone worked on using the java sdk for android. seems like there are few changes we need to do in sdk itself

jital (Fri, 13 Mar 2020 09:03:01 GMT):
has anyone worked on using the java sdk for android? seems like there are few changes we need to do in sdk itself

mauricio (Mon, 16 Mar 2020 14:38:48 GMT):
Hi, I'm trying to connect fabric-sdk-gateway with my chaincode but I'm getting an error. ``` Execution exception[[GatewayRuntimeException: org.hyperledger.fabric.sdk.exception.ProposalException: org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel qr failed with peer peer0.myorg.com.co. Status FAILURE, details: Channel Channel{id: 1, name: qr} Sending proposal with transaction: cfec84412ab29e66e60f7a12b3652c37ea9b4cbc6fa931ae9510f0ed126aa8ba to Peer{ id: 3, name: peer0.myorg.com.co, channelName: qr, url: grpcs://peer0.myorg.com.co:10051, mspid: MyOrg} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0], cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem ... Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors ```

bestbeforetoday (Tue, 17 Mar 2020 09:58:28 GMT):
Kinda looks like the peer ceritificate isn't signed by a CA that is trusted by your client

mahoney1 (Thu, 19 Mar 2020 11:00:25 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 12noon ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Meeting+Agendas:+Fabric+Application+Developer+Community+Call

mahoney1 (Thu, 19 Mar 2020 11:00:25 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 12noon ET, 9am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas%3A+Fabric+Application+Developer+Community+Call+Meetings

skoret (Thu, 19 Mar 2020 12:57:43 GMT):
Has joined the channel.

Hana_Ch (Thu, 19 Mar 2020 14:40:17 GMT):
Has joined the channel.

Hana_Ch (Thu, 19 Mar 2020 14:40:18 GMT):
Hello Hyperledger Community .... i am running a problem those days on how to do the discovery of peers and orderers existant in the network with sdk with the same way done with the discovere command of the CLI .... does someone have an idea on howa to do so ... i want to list all existant peers available to sign and validate a transaction , in addition , i want to select a random peer ... i saw that we should configure a discovere peer on sdk in order to initalise the channel with the we use the channel command " sendTransactionProposalToEndorsers" . but this method returns always a nullpointer exception ... I need that answer as soon as possible please ... and thanks

Hana_Ch (Mon, 23 Mar 2020 09:25:31 GMT):
does anyone have a response to this issue please

Hana_Ch (Mon, 23 Mar 2020 11:04:52 GMT):
Hello , when i want to do a network discovery with this channel method : Collection transactionPropResp = this.channel.sendTransactionProposalToEndorsers(tpr, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true));

Hana_Ch (Mon, 23 Mar 2020 11:04:52 GMT):
Hello , when i want to do a network discovery with this channel method : Collection transactionPropResp = this.channel.sendTransactionProposalToEndorsers(tpr, createDiscoveryOptions().setEndorsementSelector(ServiceDiscovery.EndorsementSelector.ENDORSEMENT_SELECTION_RANDOM) .setForceDiscovery(true)); But i get a nullpointerexception who can explain the main cause of that please

Hana_Ch (Mon, 23 Mar 2020 13:52:32 GMT):
Hello ... how can we replace this cli command in sdk please : discover --peerTLSCA tls/ca.crt --userKey msp/keystore/fa65ea6028ce47de4163fb37b5f21529f657d978cd669337248dbfe00a7f74ee_sk --userCert msp/signcerts/Admin@org1.example.com-cert.pem --MSP Org1MSP --tlsCert tls/client.crt --tlsKey tls/client.key peers --server peer0.org1.example.com:7051

aberwag (Tue, 24 Mar 2020 08:08:28 GMT):
Has joined the channel.

Francesco_P (Wed, 25 Mar 2020 11:44:24 GMT):
Has joined the channel.

Francesco_P (Wed, 25 Mar 2020 11:44:25 GMT):
Hi, I'm using the java org.hyperledger.fabric_ca.sdk package to enroll the admin user but when i try to connect the connection goes times out. Below some snippets - HFCAClient caClient = HFCAClient.createNewInstance("http://{IP}:{port}", props); and then final EnrollmentRequest enrollmentRequestTLS = new EnrollmentRequest();-and then- enrollmentRequestTLS.addHost("{IP}"); - and then - Enrollment enrollment = caClient.enroll("admin", "adminpw", enrollmentRequestTLS)

Francesco_P (Wed, 25 Mar 2020 11:44:50 GMT):
how can I fix?

Hana_Ch (Tue, 31 Mar 2020 07:58:50 GMT):
Hello, I have a question please, I want to select a random ordered to send a normal e transaction, I configured a service discovery with one peer with a discovery rule. I had one ordered in my config file and I add it to the channel.... but after adding the discovery, I tried to delete the order and I saw that it doesn't cause problems and the transaction passed normally, and while checking logs, the order of my hyperledger is known.. so I want to know is this a normal behaviour and when I add many orderers, did it know them all and the transaction is sent normally?

qubing (Wed, 01 Apr 2020 05:54:49 GMT):
Any fabric-gateway guys here? I am trying version 2.0 of gateway, found a bit different with 1.4. There is no method to get cert and key in the Identity got from wallet. There was Identity.getCertificates() and Identity.getPrivateKey() in the old version. How can I do now? Thanks.

bestbeforetoday (Wed, 01 Apr 2020 08:03:35 GMT):
Although the Wallet returns an Identity object, it will actually be an X509Identity, which has methods to get the Certificate and PrivateKey objects for the identity: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/X509Identity.html

bestbeforetoday (Wed, 01 Apr 2020 08:05:53 GMT):
Also look at the Identities class for utility methods for translating Certificate and PrivateKey objects to/from PEM strings: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Identities.html

bestbeforetoday (Wed, 01 Apr 2020 08:09:10 GMT):
The reason the Wallet returns the base Identity type is we hope to get other identity types supported (for example HSM-managed identities) that do not necessarily have a Certificate and PrivateKey

bestbeforetoday (Wed, 01 Apr 2020 08:12:24 GMT):
Would it be helpful to avoid your client code having to cast the Identity if the wallet had an overload of the get method something like:

bestbeforetoday (Wed, 01 Apr 2020 08:12:24 GMT):
Would it be helpful to avoid your client code having to cast the Identity if the wallet had an overload of the get method something like: ``` T get(String label, Class type) ```

bestbeforetoday (Wed, 01 Apr 2020 08:17:20 GMT):
Then you would call: ``` X509Identity identity = wallet.get(“username”, X509Identity.class); ```

qubing (Wed, 01 Apr 2020 09:51:32 GMT):
I got it. Under your strong support, I successfully upgraded my application program to new version. Thank you so much. Because the main difference between 1.4 and 2.0 in SDK is wallet management, I suggest to provive more samples or test case around it. It will be helpful for developers.:beers:

mahoney1 (Thu, 02 Apr 2020 11:11:12 GMT):
reminder that the Fabric Application Developer Community call today is at 4pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

mahoney1 (Thu, 02 Apr 2020 11:11:12 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

theDweeb (Thu, 02 Apr 2020 12:44:23 GMT):
I just started using fabric-gateway-java coming from using the nodejs sdk. First thing I noticed is that the CLI container is generating everything instead of having the binaries downloaded on local machine (i.e. like test-network). Which approach is best practices? Is the CLI just for testing?

braduf (Thu, 02 Apr 2020 20:28:06 GMT):
Hi, does anybody know how to set mutual TLS for the Java SDK / Gateway, please? I can't find anything about it. Thanks in advance!

Bolzo 1 (Fri, 03 Apr 2020 14:31:13 GMT):
Hi, I'm trying to understand if it possible to get certificate of an already enrolled user from Fabric CA through the SDK. The idea is to avoid storing all certificates on the server which is running the sdk and get the user certificate from the CA when the user needs to call a chaincode. It is possible?

Bolzo 1 (Fri, 03 Apr 2020 14:31:13 GMT):
Hi, I'm trying to understand if it's possible to get certificate of an already enrolled user from Fabric CA through the SDK. The idea is to avoid storing all certificates on the server which is running the sdk and get the user certificate from the CA when the user needs to call a chaincode. It is possible?

theDweeb (Sat, 04 Apr 2020 19:20:56 GMT):
Can anyone help, I am trying to install the fabric-gateway-java maven dependencies for 2.0.0 but they are not being installed / I cannot import the org.hyperledger.fabric.gateway packages. The fabcar example uses 1.4.1 and that works, but for some reason the 2.0.0 are not.

francoisch (Mon, 06 Apr 2020 14:59:29 GMT):
Has joined the channel.

nitishbhardwaj19 (Mon, 06 Apr 2020 16:58:49 GMT):
Hi, I noticed that known limitation of not supporting HSM is removed from the latest README section. Is it resolved in the latest version 2.0 of sdk ?

Bolzo 1 (Tue, 07 Apr 2020 08:32:22 GMT):
I'm trying to connect to my remote fabric CA using this code: ``` Properties properties = new Properties(); properties.setProperty("pemFile", prop.getProperty("caCert")); HFCAClient hfcaClient = HFCAClient.createNewInstance("org2-ca", "https://myca.org.com:7152", properties); hfcaClient.setCryptoSuite(CryptoSuite.Factory.getCryptoSuite()); ``` The address is mapped in my hosts file, and the certificate of the CA has `Subject Alternative Name` set to `myca.org.com` but i get the following error: ``` javax.net.ssl.SSLPeerUnverifiedException: Certificate for doesn't match any of the subject alternative names: [0.0.0.0] ```

Bolzo 1 (Tue, 07 Apr 2020 08:38:43 GMT):
I've run ` echo -n | openssl s_client -connect localhost:7152 -servername myca.org.com 2>/dev/null` and I can see that the cert returned is not the ca-cert.pem which I use to create the CA...

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ``` ```` gateway.getNetwork("mychannel");` ``` ``` The error I have is ``` ``` _`Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key`'_``` Could you give me some help? thank you ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ``` ```` gateway.getNetwork("mychannel");` ``` The error I have is ``` _`Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key`'_``` Could you give me some help? thank you ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ``` gateway.getNetwork("mychannel"); The error I have is ``` _`Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key`'_``` Could you give me some help? thank you ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ``` gateway.getNetwork("mychannel"); ``` _`Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key`'_``` Could you give me some help? thank you ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ``` gateway.getNetwork("mychannel"); Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key Could you give me some help? thank you

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: gateway.getNetwork("mychannel");

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");````

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");`

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key Could you give me some help? thank you ``` ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` ``` ``` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key Could you give me some help? thank you ``` ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` ``` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key Could you give me some help? thank you ``` ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` ``` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key``` ``` Could you give me some help? thank you ``` ```

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` ``` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key``` ``` Could you give me some help? thank you

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` ``` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key``` Could you give me some help? thank you

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");```` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key``` Could you give me some help? thank you

Francesco_P (Wed, 08 Apr 2020 11:08:31 GMT):
Hi, I have an error when I get the network: ` gateway.getNetwork("mychannel");` the error is``` Endpoint grpcs://x.x.x.x:7051, exception 'javax.net.ssl.SSLException: failed to set certificate and key``` Could you give me some help? thank you

bestbeforetoday (Wed, 08 Apr 2020 13:49:25 GMT):
I believe some people have successfully used HSM with the fabric-gateway-java SDK (which is built on the Java SDK), but there is not yet explicit support for an HSM identity in the wallets. See this Jira for details: https://jira.hyperledger.org/browse/FGJ-79

nitishbhardwaj19 (Wed, 08 Apr 2020 13:53:40 GMT):
wow that's a great news. Thanks for sharing this.

Francesco_P (Fri, 10 Apr 2020 10:02:55 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=WZHLyt65Ywgu9HuFs) So is there anyone who helps me?

nitishbhardwaj19 (Fri, 10 Apr 2020 10:57:28 GMT):
Please ensure that you are using host name in URL. If the host is not public, add host entries to your host file.

jorgedr (Fri, 10 Apr 2020 18:25:51 GMT):
Has joined the channel.

jorgedr (Fri, 10 Apr 2020 18:25:52 GMT):
Hey guys, quick question is the Java SDK thread safe? Can I reuse the same Gateway instance to serve concurrent REST API requests for the same user?

jorgedr (Fri, 10 Apr 2020 18:27:56 GMT):
I found this link that says it is https://awesomeopensource.com/project/hyperledger/fabric-sdk-java but since it is not straight from the HLF documentation I wanted to double check.

jital (Mon, 13 Apr 2020 05:24:57 GMT):
I see that endorsing peers if set is only used while submitting transaction, if i want to evaluate a transaction on a specific peer (not from my organisation) is there a way to do it? ``` org.hyperledger.fabric.gateway.impl.TransactionImpl#submit public byte[] submit(final String... args) throws ContractException, TimeoutException, InterruptedException { Collection proposalResponses = endorseTransaction(args); Collection validResponses = validatePeerResponses(proposalResponses); .... @Override public byte[] evaluate(final String... args) throws ContractException { QueryByChaincodeRequest request = newQueryRequest(args); Query query = new QueryImpl(network.getChannel(), request); ```

jital (Mon, 13 Apr 2020 05:24:57 GMT):
I see that endorsing peers if set is only used while submitting transaction, if i want to evaluate a transaction on a specific peer (not from my organisation) is there a way to do it? ``` org.hyperledger.fabric.gateway.impl.TransactionImpl#submit public byte[] submit(final String... args) throws ContractException, TimeoutException, InterruptedException { Collection proposalResponses = endorseTransaction(args); Collection validResponses = validatePeerResponses(proposalResponses); .... org.hyperledger.fabric.gateway.impl.TransactionImpl#evaluate @Override public byte[] evaluate(final String... args) throws ContractException { QueryByChaincodeRequest request = newQueryRequest(args); Query query = new QueryImpl(network.getChannel(), request); .... ``` ```

Paradox-AT (Mon, 13 Apr 2020 10:24:39 GMT):
you can use `createTransaction' instead of 'submitTransaction'. After creating a transaction set the endorsing peers and then do transaction.submit(..args)

jaraujo (Wed, 15 Apr 2020 16:54:24 GMT):
Has joined the channel.

jaraujo (Wed, 15 Apr 2020 18:26:50 GMT):
Hi guys! I've tried several times deploying a Java Contract using Fabric 2.0.1 but every time I commit the chaincode, Fabric can't instantiate a dev-peer. It's just a simple chaincode that implements ContractInterface. Does anyone know what could it be? I'm using Maven as a dependency tool

rthatcher (Thu, 16 Apr 2020 14:52:53 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) today - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

Purbaja (Thu, 16 Apr 2020 21:28:46 GMT):
Hi Guys, while using fabric-sdk-java I am getting below exception in submit transaction Caused by: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: Failed to find any endorsers for chaincode nccep. See logs for details at org.hyperledger.fabric.sdk.ServiceDiscovery.discoverEndorserEndpoint(ServiceDiscovery.java:95) at org.hyperledger.fabric.sdk.Channel.sendTransactionProposalToEndorsers(Channel.java:3995) at org.hyperledger.fabric.gateway.impl.TransactionImpl.sendTransactionProposal(TransactionImpl.java:155) at org.hyperledger.fabric.gateway.impl.TransactionImpl.submit(TransactionImpl.java:91)

nvxtien (Fri, 17 Apr 2020 07:24:56 GMT):
Has joined the channel.

nvxtien (Fri, 17 Apr 2020 07:25:42 GMT):
Hi there,

nvxtien (Fri, 17 Apr 2020 07:26:06 GMT):
Is there any sample for using sdk 2.0?

nvxtien (Fri, 17 Apr 2020 07:26:16 GMT):
Thanks.

heatherp (Fri, 17 Apr 2020 15:01:51 GMT):
Yep, here: https://github.com/hyperledger/fabric-samples/tree/master/fabcar/java

karburator (Sat, 18 Apr 2020 00:18:10 GMT):
Has joined the channel.

braduf (Sat, 18 Apr 2020 03:57:51 GMT):
Hi all, is the feature to set endorsing orgs instead of endorsing peers being implemented in the Java SDK too? It allready exists in the Node.js SDK and it is very handy when working with private data collections.

braduf (Sat, 18 Apr 2020 03:57:51 GMT):
Hi all, is the feature to set endorsing orgs instead of endorsing peers being implemented in the Java SDK too? It allready exists in the Node.js SDK and it is very handy when working with private data collections. https://jira.hyperledger.org/browse/FABN-1425 Does anyone has a status on it for the Java SDK, please?

braduf (Sat, 18 Apr 2020 04:15:36 GMT):
I didn't see it in the backlog, so I added it to Jira.

braduf (Sat, 18 Apr 2020 04:15:36 GMT):
I didn't see it in the backlog, so I added it to Jira: https://jira.hyperledger.org/browse/FGJ-83. Does anyone wants to work on it together?

nvxtien (Sat, 18 Apr 2020 15:48:17 GMT):
Thanks @heatherp. But this is an example for java-gateway. I need one for java-sdk.

bestbeforetoday (Tue, 21 Apr 2020 08:20:02 GMT):
Yes, you can (and absolutely should!) use the same Gateway, Network or Contract instances for multiple requests from the same client identity

bestbeforetoday (Tue, 21 Apr 2020 08:29:27 GMT):
The peers used to evaluate (rather than submit) transactions is dictated by the query handler. The default will continue to use the first responsive peer it finds in the same organisation as the client identity. There is another default query handler implementation that will round-robin requests across all peers in the same organization as the client identity. You can also write your own query handler implementation if you want specific behaviour or to use specific peers. See here for details: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Gateway.Builder.html#queryHandler-org.hyperledger.fabric.gateway.spi.QueryHandlerFactory-

bestbeforetoday (Tue, 21 Apr 2020 08:32:24 GMT):
I would check the logs on the peer to see if there any clues there on what has gone wrong. Also try the #fabric-java-chaincode channel

knagware9 (Tue, 21 Apr 2020 10:38:06 GMT):
I think java-gateway is the new sdk2.0 for java

jorgedr (Tue, 21 Apr 2020 12:59:57 GMT):
Thank you @bestbeforetoday !

jaraujo (Tue, 21 Apr 2020 22:23:28 GMT):
I also think it is

Francesco_P (Wed, 22 Apr 2020 17:32:44 GMT):
Hi I'm trying to query ledger data with org.hyperledger.fabric.shim.ChaincodeStub getStateByPartialCompositeKey. But it gives me no results...always as there is no data but I know there is. How can i solve? Thank you

jital (Wed, 22 Apr 2020 17:43:11 GMT):
Thanks a lot !!! @bestbeforetoday This helps me out

jital (Wed, 22 Apr 2020 17:46:33 GMT):
java-gateway is the sdk and it includes java-sdk as a dependency in maven

jital (Wed, 22 Apr 2020 17:46:33 GMT):
java-gateway is the sdk and it includes java-sdk as a dependency in maven. You can check E2E tests. those helped me a lot hen i started

jital (Wed, 22 Apr 2020 17:51:08 GMT):
Can you share the params you are using while inserting and querying. may that might help us better. Other way is to try passing only the type and no args. to see if there actually is data. If you want you can query your backing statedb for keys

bestbeforetoday (Thu, 23 Apr 2020 08:25:49 GMT):
You might also want to ask on the #fabric-java-chaincode channel for smart contract implementation questions

Francesco_P (Thu, 23 Apr 2020 08:55:43 GMT):
I apologize. I didn't know. I will move the question on the right channel

bestbeforetoday (Thu, 23 Apr 2020 09:00:52 GMT):
Absolutely fine! You're just more likely to get a useful answer there :)

githubcpc (Mon, 27 Apr 2020 08:09:02 GMT):
@rickr Hi...Why fabric-sdk-java 2.0 TransactionRequest.java remove setChaincodePath method?

Paradox-AT (Mon, 27 Apr 2020 08:10:04 GMT):
Hey Guys, I am facing issues with API connecting with multiple orderers for queries and transactions. I have three orderers for our network. All the three orderers are on the same machine so we're using port forwarding for orderer1(8050:7050) and orderer2(9050:7050) These are the orderer defaults in configtx.yml: - Host: orderer0.example.com Port: 7050 ... - Host: orderer1.example.com Port: 7050 ... - Host: orderer2.example.com Port: 7050 ... These are the orderer details in connection-profile.jon: "orderers": { "orderer0.example.com": { "url": "grpcs://localhost:7050", ... "grpcOptions": { "hostnameOverride": "orderer0.example.com" } }, "orderer1.example.com": { "url": "grpcs://localhost:8050", ... "grpcOptions": { "hostnameOverride": "orderer1.example.com" } }, "orderer2.example.com": { "url": "grpcs://localhost:9050", ... "grpcOptions": { "hostnameOverride": "orderer2.example.com" } }, }, I am using NodeJS fabric gateway to create and do transactions on channels. When the gateway configuration parameter "asLocalhost" is set to true all the queries and transactions are happening through orderer0. This becomes an issue if orderer0 goes down as the gateway doesn't automatically connect to the remaining orderers. When the gateway configuration parameter "asLocalhost" is set to false the gateway has the information for all the three orderers unlike when asLocalhost is set to true, but all the channel orderers point to 7050 port instead of their respective ports. It looks like the orderers are being retrieved from consortium. Since we need to connect to orderer1 and orderer2 at 8050 and 9050 ports respectively the API is unable to connect to them at 7050 port.

Paradox-AT (Mon, 27 Apr 2020 08:10:04 GMT):
Hey Guys, I am facing issues with API connecting with multiple orderers for queries and transactions. I have three orderers for our network. All the three orderers are on the same machine so we're using port forwarding for orderer1(8050:7050) and orderer2(9050:7050) These are the orderer defaults in configtx.yml: ``` - Host: orderer0.example.com Port: 7050 ... - Host: orderer1.example.com Port: 7050 ... - Host: orderer2.example.com Port: 7050 ... These are the orderer details in connection-profile.jon: "orderers": { "orderer0.example.com": { "url": "grpcs://localhost:7050", ... "grpcOptions": { "hostnameOverride": "orderer0.example.com" } }, "orderer1.example.com": { "url": "grpcs://localhost:8050", ... "grpcOptions": { "hostnameOverride": "orderer1.example.com" } }, "orderer2.example.com": { "url": "grpcs://localhost:9050", ... "grpcOptions": { "hostnameOverride": "orderer2.example.com" } }, }, I am using NodeJS fabric gateway to create and do transactions on channels. When the gateway configuration parameter "asLocalhost" is set to true all the queries and transactions are happening through orderer0. This becomes an issue if orderer0 goes down as the gateway doesn't automatically connect to the remaining orderers. When the gateway configuration parameter "asLocalhost" is set to false the gateway has the information for all the three orderers unlike when asLocalhost is set to true, but all the channel orderers point to 7050 port instead of their respective ports. It looks like the orderers are being retrieved from consortium. Since we need to connect to orderer1 and orderer2 at 8050 and 9050 ports respectively the API is unable to connect to them at 7050 port.

Paradox-AT (Mon, 27 Apr 2020 08:10:04 GMT):
Hey Guys, I am facing issues with API connecting with multiple orderers for queries and transactions. I have three orderers for our network. All the three orderers are on the same machine so we're using port forwarding for orderer1(8050:7050) and orderer2(9050:7050) These are the orderer defaults in configtx.yml: ``` - Host: orderer0.example.com Port: 7050 ... - Host: orderer1.example.com Port: 7050 ... - Host: orderer2.example.com Port: 7050 ... ``` These are the orderer details in connection-profile.jon: ``` "orderers": { "orderer0.example.com": { "url": "grpcs://localhost:7050", ... "grpcOptions": { "hostnameOverride": "orderer0.example.com" } }, "orderer1.example.com": { "url": "grpcs://localhost:8050", ... "grpcOptions": { "hostnameOverride": "orderer1.example.com" } }, "orderer2.example.com": { "url": "grpcs://localhost:9050", ... "grpcOptions": { "hostnameOverride": "orderer2.example.com" } }, }, ``` I am using NodeJS fabric gateway to create and do transactions on channels. When the gateway configuration parameter "asLocalhost" is set to true all the queries and transactions are happening through orderer0. This becomes an issue if orderer0 goes down as the gateway doesn't automatically connect to the remaining orderers. When the gateway configuration parameter "asLocalhost" is set to false the gateway has the information for all the three orderers unlike when asLocalhost is set to true, but all the channel orderers point to 7050 port instead of their respective ports. It looks like the orderers are being retrieved from consortium. Since we need to connect to orderer1 and orderer2 at 8050 and 9050 ports respectively the API is unable to connect to them at 7050 port.

aatkddny (Mon, 27 Apr 2020 15:05:03 GMT):
`NodeJS fabric gateway` You might get a more cogent answer in the js sdk channel. #fabric-sdk-node iirc.

nitishbhardwaj19 (Mon, 27 Apr 2020 16:34:58 GMT):
@bestbeforetoday Hope you are doing good. I just got to know that administrative capabilities would be discontinued from 2.1 version for Node SDK. Is there a plan to deprecate for JAVA sdk as well? I am sure there would be a big reason for this. If you don't mind, could you please share the thought process for this decision.

githubcpc (Tue, 28 Apr 2020 08:17:27 GMT):
@sykesm Hi,Can I install chaincode in fabric-sdk-java v2.0.0 without go modules?

sykesm (Tue, 28 Apr 2020 08:17:28 GMT):
Has joined the channel.

ShobhitSrivastava (Tue, 28 Apr 2020 09:52:24 GMT):
Hi All , I have one peer and orderer running on one server and my java-sdk is in my local system. I am not able to connect my peer from java-sdk when TLS is enabled, can anyone help me what all certificates is needed at sdk end. I generated the certificates via cryptogen tool.

ShobhitSrivastava (Tue, 28 Apr 2020 09:52:24 GMT):
Hi All , I have one peer and orderer running on one server and my java-sdk is in my local system. I am not able to connect my peer from java-sdk when TLS is enabled, can anyone help me what all certificates is needed at sdk end. I generated the certificates via cryptogen tool. Any link to further read on this.

ShobhitSrivastava (Tue, 28 Apr 2020 09:52:24 GMT):
Hi All , I have one peer and orderer running on one server and my java-sdk is in my local system. I am not able to connect my peer from java-sdk when TLS is enabled, can anyone help me what all certificates is needed at sdk end. I generated the certificates via cryptogen tool. Any link to further read on this. Adding @bestbeforetoday , may you please provide details on it?

bestbeforetoday (Tue, 28 Apr 2020 10:50:46 GMT):
The thinking across Fabric in general seems to be that administrative tasks should be performed using the admin command-line tools. Perhaps to ensure consistency with a single admin client implementation and to save re-implementing the same admin capability in all the language SDKs every time anything changes, which is quite a bit of work. When the internals of the Node SDK were re-written for v2.0 we didn't re-implement all the admin capability using the new internal structure. I don't know of any plan right now to remove the admin capability that is there in the Java SDK but I also don't currently expect it to get extended with any new admin features. I did hear some talk of chaincode lifecycle operations possibly being reimplemented in the Node SDK, either as an npm package (within the SDK repository) or as a sample (based on the _fabric-network_ API). I don't have any firm details or timescale for that work though

nitishbhardwaj19 (Tue, 28 Apr 2020 11:20:29 GMT):
Thanks for the details insight @bestbeforetoday this really helps. :)

ShobhitSrivastava (Wed, 29 Apr 2020 07:08:09 GMT):
@bestbeforetoday ..hi, can you provide a working java-sdk sample which has working sample code for connecting to a TLS network?

mahoney1 (Thu, 30 Apr 2020 12:23:25 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

lviggiano (Thu, 30 Apr 2020 14:44:54 GMT):
Has joined the channel.

nitishbhardwaj19 (Sat, 02 May 2020 06:41:24 GMT):
Hi, has anyone ever faced this error? `java.lang.NoSuchMethodError: 'boolean org.bouncycastle.asn1.ASN1ObjectIdentifier.equals(org.bouncycastle.asn1.ASN1Primitive)'` I am getting this while I am trying to enroll CA admin. HFCAClient has caURL, and name with empty properties. Am I missing some dependency?

nitishbhardwaj19 (Sat, 02 May 2020 06:43:18 GMT):
I get this exception in CryptoPrimitives at `ContentSigner signer = csBuilder.build(pair.getPrivate());` I am using 2.1 sdk

nitishbhardwaj19 (Sat, 02 May 2020 06:43:43 GMT):
pair has a key pair

nitishbhardwaj19 (Sat, 02 May 2020 06:53:36 GMT):
Not faced this in 1.4.x

nitishbhardwaj19 (Sat, 02 May 2020 09:58:59 GMT):
Fixed it. It was an issue with dependency conflict. I am using SpringBoot and it had some conflict with bouncycastle. Checked the exact version which is being used by java-sdk for bouncycastle i.e 1.63 and explicitly added it in my dependency `compile 'org.bouncycastle:bcpkix-jdk15on:1.63' compile 'org.bouncycastle:bcprov-jdk15on:1.63'`

nitishbhardwaj19 (Sat, 02 May 2020 09:58:59 GMT):
Fixed it. It was an issue with dependency conflict. I am using SpringBoot and it had some conflict with bouncycastle. Checked the exact version which is being used by java-sdk for bouncycastle i.e 1.63 and explicitly added it in my dependency `compile 'org.bouncycastle:bcpkix-jdk15on:1.63` compile 'org.bouncycastle:bcprov-jdk15on:1.63'`

nitishbhardwaj19 (Sat, 02 May 2020 09:58:59 GMT):
Fixed it. It was an issue with dependency conflict. I am using SpringBoot and it had some conflict with bouncycastle. Checked the exact version which is being used by java-sdk for bouncycastle i.e 1.63 and explicitly added it in my dependency `compile 'org.bouncycastle:bcpkix-jdk15on:1.63` `compile 'org.bouncycastle:bcprov-jdk15on:1.63`

Mms 11 (Tue, 05 May 2020 20:21:56 GMT):
Has joined the channel.

Mms 11 (Tue, 05 May 2020 20:29:54 GMT):
Can someone help me with a chaincode querying couchDb ? When calling the CouchDB from a java chaincode for a rather not large data collection (150), the process of the result takes 50 seconds. I can see that the ChaincodeInvocationTask.invoke got the response rather quick but when it is passed as a response that is taking a long time to process. This class is created from the response, QueryResultsIteratorImpl in the InvocationStubImpl. Anyone had this when calling InvocationStubImplgetQueryResult

Mms 11 (Tue, 05 May 2020 20:30:27 GMT):
Is there some trick to handle the QueryResultsIteratorImpl to get access to the data without waiting so long ?

aatkddny (Wed, 06 May 2020 03:59:51 GMT):
So will there be any way to automate this or to script a more complex scenario? Adding (say) a half dozen orgs and 20 channels when you stand up a new environment is not a trivial task. And we stand up and tear down environments more than you'd think. It's fairly easy to automate using the SDK - we've been doing it for quite some time. I shudder to think of the time sink to do the same actions manually through a CLI.

bestbeforetoday (Wed, 06 May 2020 10:08:27 GMT):
I would try also posting this question on the #fabric-java-chaincode channel

bestbeforetoday (Wed, 06 May 2020 10:19:30 GMT):
Set up, configuration and chaincode deployment can all be automated using the CLI commands, either using scripting or launching the CLI commands from code. The SDK integration tests do this. I appreciate that it's a change if you already have the automation in place using the SDK though. The relevant parts of the Java SDK build are: - https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/fixtures/generate.sh - https://github.com/hyperledger/fabric-gateway-java/blob/67864d8316201ac96286ae8e7afb696ef6483c3e/src/test/java/scenario/ScenarioSteps.java#L113 - https://github.com/hyperledger/fabric-gateway-java/blob/67864d8316201ac96286ae8e7afb696ef6483c3e/src/test/java/scenario/ScenarioSteps.java#L203

bestbeforetoday (Wed, 06 May 2020 10:20:00 GMT):
I expect what's there today in the SDK is likely to remain at least for the 2.x release though

vramaiitkgp (Thu, 07 May 2020 16:31:33 GMT):
Has joined the channel.

vramaiitkgp (Thu, 07 May 2020 16:31:35 GMT):
Hi, I'm running a multi-channel multi-contract application, where the contracts make cross-contract as well as cross-channel invocations. I'm getting a weird error in one of my intermediate transactions where the proposal fails with the error `The proposal responses have 2 inconsistent groups with 0 that are invalid.`. Clearly, this indicates that though each proposal response (from an endorsing peer each) is valid, the two responses are not identical. The problem is: when I look at the contract container logs, both containers that simulated the transaction show a successful run, exactly what I would have expected them to. Then where could the inconsistency have risen from? How would I go about debugging this? An even weirder thing: when I add another endorsing peer to the above contract while keeping the rest of the network exactly the same, I get a similar failure but in an earlier stage of my workflow for a different transaction on a different contract (one that succeeded in the earlier run.)

bestbeforetoday (Thu, 07 May 2020 19:00:26 GMT):
Best guess is either: - The transaction function is non-deterministic so different peers may produce different read/write sets or return values - The ledger state is not consistent between peers You would need to dig into the proposal responses to see exactly what is different

Mms 11 (Thu, 07 May 2020 19:34:07 GMT):
Exactly what @bestbeforetoday mentioned. Usually I'm getting this when passing a collection and two or more peers return elements in different order or when your serialization mechanizm return elements in unordered manner.

Mms 11 (Thu, 07 May 2020 19:35:23 GMT):
For example, I created a Jackson based SerializationInferface that is used by the contract I need to specify the order of each property or make it return props in a given order (like alphabetic).

vramaiitkgp (Thu, 07 May 2020 20:46:45 GMT):
You both were exactly right, thanks! I'm calling `putState` on a JSON serialized to a string, and the serialization turns out to be non-deterministic. I found out only when I turned on debug-level logging for the sdk package.

ShobhitSrivastava (Fri, 08 May 2020 04:34:17 GMT):
Hi, I'm trying to add chaincode event listener in fabric-gateway-java. Is there any way to achieve.

bestbeforetoday (Fri, 08 May 2020 09:31:30 GMT):
Look at the `addContractListener` methods on the Contract class: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Contract.html

ShobhitSrivastava (Fri, 08 May 2020 10:51:16 GMT):
okay, thanks

richzhao (Mon, 11 May 2020 09:27:31 GMT):
Has joined the channel.

c0deh0use (Mon, 11 May 2020 15:46:51 GMT):
Has joined the channel.

Bolzo 1 (Tue, 12 May 2020 08:36:20 GMT):
Hi there is some kind of documentation or example on how i can listest to transaction commit event on the low level fabric SDK?

Bolzo 1 (Tue, 12 May 2020 08:36:20 GMT):
Hi there is some kind of documentation or example on how to listen to transaction commit events using the low level fabric SDK?

Bolzo 1 (Tue, 12 May 2020 08:36:20 GMT):
Hi, is there some kind of documentation or example on how to listen to transaction commit events using the low level fabric SDK?

ongchinkai (Wed, 13 May 2020 18:52:57 GMT):
Has joined the channel.

ongchinkai (Wed, 13 May 2020 18:52:58 GMT):
[object Object]

ongchinkai (Wed, 13 May 2020 18:54:30 GMT):
I check my debug logs to see why my EventHub isn't connecting, this is what I see: 2020-05-14 02:37:37 DEBUG EventHub:212 - EventHub{id: 3, name: peer1.org1.isprint.com, channelName: isprintchannel, url: grpcs://127.0.0.1:7053} is connecting. 2020-05-14 02:37:37 DEBUG EventHub:341 - EventHub{id: 3, name: peer1.org1.isprint.com, channelName: isprintchannel, url: grpcs://127.0.0.1:7053} connect is done with connect status: false 2020-05-14 02:37:37 WARN EventHub:280 - EventHub{id: 3, name: peer1.org1.isprint.com, channelName: isprintchannel, url: grpcs://127.0.0.1:7053} terminated is false shutdown is false, retry count 1 has error UNAVAILABLE: io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]. 2020-05-14 02:37:37 WARN EventHub:294 - EventHub{id: 3, name: peer1.org1.isprint.com, channelName: isprintchannel, url: grpcs://127.0.0.1:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0], cause=java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Unknown Source) }. Description io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0] Are there any relevant settings that I should be setting in my peer/orderer/eventhub?

mahoney1 (Thu, 14 May 2020 08:31:09 GMT):
reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

bestbeforetoday (Thu, 14 May 2020 14:11:49 GMT):
Unless you are on an extremely old version of Fabric, I suspect you don't want to be using EventHub at all. These were superseded in the low-level SDK by the peer eventing service. Ideally use the event listening capabilities of the _fabric-gateway-java_ API, which are much easier to use for both realtime listening and event replay. Simply pass in a listener / callback function and events get delivered to you: - Attach block (or transaction commit) listeners to a Network (analogous to a Channel): https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Network.html - Attach contract listeners to a Contract to receive chaincode events: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Contract.html

ongchinkai (Thu, 14 May 2020 14:22:04 GMT):
I'm usiing release 1.4 of HLF for now, because the project I inherited was done in that version

bestbeforetoday (Thu, 14 May 2020 14:25:00 GMT):
The fabric-gateway-java API (and low level peer eventing service) are the things to use with Fabric 1.4; not EventHub

bestbeforetoday (Thu, 14 May 2020 14:25:27 GMT):
EventHub is deprecated in v1.4 and removed in 2.x

ongchinkai (Thu, 14 May 2020 14:28:42 GMT):
The thing is, I'm getting a weird timeout error when I use the fabric-gateway

ongchinkai (Thu, 14 May 2020 14:29:14 GMT):
contract.submitTransaction(...) throws me: Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel isprintchannel, send transactions failed on orderer OrdererClient{id: 13, channel: isprintchannel, name: orderer1.isprint.com:7050, url: grpcs://orderer1.isprint.com:7050}. Reason: timeout after 10000 ms.

ongchinkai (Thu, 14 May 2020 14:31:55 GMT):
And down the stacktrace the root cause seems to be Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: peer1.org1.isprint.com/35.186.238.101:7051 But I'm not sure where to continue looking

jital (Thu, 14 May 2020 16:59:19 GMT):
If i do approvedefinitionformyorg using Java SDK i get 200 as statusin response but the definition is not approved, but i do the same from command line it gets approve, is there a known bug in approvedefinitionformyorg? necessary logs from my peer Peer Logs when using java SDK ``` 2020-05-14 16:26:29.693 UTC [lifecycle] ApproveChaincodeDefinitionForOrg -> INFO 29e Successfully endorsed chaincode approval with name 'rental', package ID 'rental_1:b6cfd5fbbd542458bdf6e16cfaa726e4e287954a733578fed6ee0b47724e5411', on channel 'rentaleconomy' with definition {sequence: 1, endorsement info: (version: '1', plugin: 'escc', init required: true), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()} 2020-05-14 16:26:29.694 UTC [endorser] callChaincode -> INFO 29f finished chaincode: _lifecycle duration: 1ms channel=rentaleconomy txID=141e6c30 2020-05-14 16:26:29.697 UTC [comm.grpc.server] 1 -> INFO 2a0 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.23.0.1:56682 grpc.code=OK grpc.call_duration=6.5883ms 2020-05-14 16:26:29.749 UTC [lifecycle] CheckCommitReadiness -> INFO 2a1 Successfully checked commit readiness of chaincode name 'rental' on channel 'rentaleconomy' with definition {sequence: 1, endorsement info: (version: '1', plugin: 'escc', init required: true), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()} 2020-05-14 16:26:29.750 UTC [endorser] callChaincode -> INFO 2a2 finished chaincode: _lifecycle duration: 2ms channel=rentaleconomy txID=887e78a5 2020-05-14 16:26:29.752 UTC [comm.grpc.server] 1 -> INFO 2a3 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.23.0.1:56682 grpc.code=OK grpc.call_duration=5.446ms 2020-05-14 16:26:30.162 UTC [comm.grpc.server] 1 -> INFO 2a4 streaming call completed grpc.service=protos.Deliver grpc.method=Deliver grpc.peer_address=172.23.0.1:56686 error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=666.2672ms ``` Logs when using the shell ``` 2020-05-14 16:28:01.256 UTC [endorser] callChaincode -> INFO 2a5 finished chaincode: _lifecycle duration: 0ms channel= txID=5dce4960 2020-05-14 16:28:01.256 UTC [comm.grpc.server] 1 -> INFO 2a6 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.23.0.1:56694 grpc.code=OK grpc.call_duration=1.2999ms 2020-05-14 16:28:01.366 UTC [lifecycle] ApproveChaincodeDefinitionForOrg -> INFO 2a7 Successfully endorsed chaincode approval with name 'rental', package ID 'rental_1:b6cfd5fbbd542458bdf6e16cfaa726e4e287954a733578fed6ee0b47724e5411', on channel 'rentaleconomy' with definition {sequence: 1, endorsement info: (version: '1', plugin: 'escc', init required: true), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()} 2020-05-14 16:28:01.366 UTC [endorser] callChaincode -> INFO 2a8 finished chaincode: _lifecycle duration: 3ms channel=rentaleconomy txID=668f105b 2020-05-14 16:28:01.371 UTC [comm.grpc.server] 1 -> INFO 2a9 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.23.0.1:56702 grpc.code=OK grpc.call_duration=9.9755ms 2020-05-14 16:28:03.409 UTC [gossip.privdata] StoreBlock -> INFO 2aa [rentaleconomy] Received block [5] from buffer 2020-05-14 16:28:03.411 UTC [committer.txvalidator] Validate -> INFO 2ab [rentaleconomy] Validated block [5] in 1ms 2020-05-14 16:28:03.412 UTC [gossip.privdata] prepareBlockPvtdata -> INFO 2ac Successfully fetched all eligible collection private write sets for block [5] channel=rentaleconomy 2020-05-14 16:28:03.437 UTC [kvledger] CommitLegacy -> INFO 2ad [rentaleconomy] Committed block [5] with 1 transaction(s) in 24ms (state_validation=1ms block_and_pvtdata_commit=12ms state_commit=8ms) commitHash=[d45eacfbfcaaf9b5ac0dc559c12274f8b8db464c3adc08a37cdf2059502a8789] 2020-05-14 16:28:03.449 UTC [comm.grpc.server] 1 -> INFO 2ae streaming call completed grpc.service=protos.Deliver grpc.method=DeliverFiltered grpc.request_deadline=2020-05-14T16:28:31.378Z grpc.peer_address=172.23.0.1:56706 error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=2.069538s 2020-05-14 16:28:06.539 UTC [lifecycle] CheckCommitReadiness -> INFO 2af Successfully checked commit readiness of chaincode name 'rental' on channel 'rentaleconomy' with definition {sequence: 1, endorsement info: (version: '1', plugin: 'escc', init required: true), validation info: (plugin: 'vscc', policy: '12202f4368616e6e656c2f4170706c69636174696f6e2f456e646f7273656d656e74'), collections: ()} ```

ShobhitSrivastava (Fri, 15 May 2020 14:32:30 GMT):
Hi @bestbeforetoday ..I was trying to test the 2.1 version of fabric, using one endorser and orderer. I am getting around 10 Transaction per second. Is there I can do to increase the performance?

bestbeforetoday (Fri, 15 May 2020 16:37:17 GMT):
It's worth understanding the flow. On submit the client is: 1. Gathering endorsements from peers and sending the endorsed proposals to the orderer 2. Orderer gathers transactions until it is ready to cut a block and send it to the peers 3. Peers commit the transactions in the block and emit a block event 4. Client receives block events containing successful transaction events from some number of peers, then returns from the submit call

bestbeforetoday (Fri, 15 May 2020 16:39:53 GMT):
There are several points in the flow that can impact performance: - Orderer typically waits for a sufficient number of transactions or a time period before cutting a block - The number of commit events the submit waits for, and from which peers - Whether the client waits at all for events - The number of concurrent client invocations

bestbeforetoday (Fri, 15 May 2020 16:43:06 GMT):
If subsequent transactions don't rely on the ledger updates of previous transactions, you can probably gain a big chunk of performance by disabling the commit waiting. Set the commit handler on the gateway to be `NONE`: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Gateway.Builder.html#commitHandler-org.hyperledger.fabric.gateway.spi.CommitHandlerFactory-

bestbeforetoday (Fri, 15 May 2020 16:44:28 GMT):
A scenario where this might be appropriate is a batch process just adding new assets to the ledger. It doesn't affect any of the existing ledger content

bestbeforetoday (Fri, 15 May 2020 16:45:23 GMT):
Another approach might be running more client load in parallel. So multiple threads all submitting transactions

bestbeforetoday (Fri, 15 May 2020 16:47:25 GMT):
Since you only have a single peer, the commit handler type you pick (other than `NONE`) shouldn't affect your performance, but in a larger network then it might. It's a trade-off between performance and the consistency of ledger state you need for subsequent application work

bestbeforetoday (Fri, 15 May 2020 16:48:36 GMT):
If you're really maxing those things out then you might also want to look at the core Fabric configuration. So the wait time before the orderer cuts a block, and also the maximum number of transactions to include in a block

bestbeforetoday (Fri, 15 May 2020 16:50:24 GMT):
You probably want to get quite a lot of transactions in a single block for maximum throughput, but there's a balance to be had between block size and latency before transactions are included in a block and committed on peers

ShobhitSrivastava (Mon, 18 May 2020 06:38:09 GMT):
Thanks @bestbeforetoday for your detailed answer, I optimized java sdk a bit and reached around 125 TPS. I also updated the orderer configuration to decrease the latency of commitTime to be 1 second and number of messages to be 5.

ShobhitSrivastava (Mon, 18 May 2020 06:39:00 GMT):
Also can you confirm if I increase the number of ordering node, will the TPS increase?

ShobhitSrivastava (Mon, 18 May 2020 06:40:04 GMT):
I also set logs to FATAL in peer and orderer config file,

bestbeforetoday (Mon, 18 May 2020 10:15:07 GMT):
I would expect you to be able to get a higher throughput (TPS) with a larger number of messages per block. The optimum numbers are going to be dependent on your workload and performance requirements though

ShobhitSrivastava (Mon, 18 May 2020 10:16:53 GMT):
sure. I will change the configuration.

ShobhitSrivastava (Mon, 18 May 2020 10:16:57 GMT):
thanks

ShobhitSrivastava (Mon, 18 May 2020 10:17:07 GMT):
:slight_smile:

ongchinkai (Mon, 18 May 2020 10:26:47 GMT):
Whenever I try to set up an event listener using the Gateway API in my Java code, it always crashes prematurely. However, my debug log doesn't reflect any errors. Can anyone provide some advice on this?

ShobhitSrivastava (Mon, 18 May 2020 11:13:57 GMT):
changed the orderer config..getting about 200tps now

ShobhitSrivastava (Tue, 19 May 2020 04:43:05 GMT):
Hi @bestbeforetoday ..is there a way in fabric to get the exact time when a transaction reaches Orderer and comes out of the orderer ?

bestbeforetoday (Wed, 20 May 2020 08:16:22 GMT):
Just a heads up since a couple of people requested the changes included... v2.1.2 of _fabric-gateway-java_ has been released: - https://github.com/hyperledger/fabric-gateway-java/releases/tag/v2.1.2

bestbeforetoday (Wed, 20 May 2020 08:27:48 GMT):
If the top of my head I can't think of anything (except perhaps inspecting logs on the orderer). Transaction events emitted after transactions are committed include a timestamp but I think this is the client timestamp when the transaction was created rather than anything to do with the orderer. Somebody else might have better information

HLFPOC (Wed, 20 May 2020 11:36:51 GMT):
Has joined the channel.

HunterJW (Thu, 21 May 2020 08:27:42 GMT):
Has joined the channel.

HunterJW (Thu, 21 May 2020 08:27:43 GMT):
I want to know whether I can create new channel dynamically using fabric-sdk-java ?:grinning:

aatkddny (Thu, 21 May 2020 14:22:58 GMT):
yes

aatkddny (Thu, 21 May 2020 14:22:58 GMT):
yes - for now. but as with many of the truly useful features it's being deprecated.

ongchinkai (Fri, 22 May 2020 03:35:34 GMT):
I read in the Fabric SDK tutorial (https://github.com/hyperledger/fabric-sdk-java), under ServiceDiscoveryIT.java, that it requires "adding entries in host file to remap docker fabric Peer and Orderers address to localhost" - what does this mean?

ShobhitSrivastava (Fri, 22 May 2020 11:57:40 GMT):
okay, no issue thanks..getting about 296TPS now

bestbeforetoday (Fri, 22 May 2020 12:59:47 GMT):
If you are doing development and running a Fabric network in Docker containers on your local machine, the nodes in the network will likely have addresses such as _peer1.org1.example.org_, which won't resolve in DNS for a client application running on your local machine (outside of the Docker network). One solution is to add those node addresses to your machine's local _hosts_ file so that they are treated as the loopback (locoalhost) address for your machine, e.g. `127.0.0.1`. Another approach if using service discovery to set the environment variable `ORG_HYPERLEDGER_FABRIC_SDK_SERVICE_DISCOVERY_AS_LOCALHOST=true`, which tells the client to treat all the addresses received through service discovery as localhost

bestbeforetoday (Fri, 22 May 2020 12:59:47 GMT):
If you are doing development and running a Fabric network in Docker containers on your local machine, the nodes in the network will likely have addresses such as _peer1.org1.example.org_, which won't resolve in DNS for a client application running on your local machine (outside of the Docker network). One solution is to add those node addresses to your machine's local _hosts_ file so that they are treated as the loopback (locoalhost) address for your machine, e.g. `127.0.0.1`. Another approach if using service discovery is to set the environment variable `ORG_HYPERLEDGER_FABRIC_SDK_SERVICE_DISCOVERY_AS_LOCALHOST=true`, which tells the client to treat all the addresses received through service discovery as localhost

fanjianhang (Tue, 26 May 2020 03:43:03 GMT):
Hi everyone, based on fabric-gateway-java intention that make connect network easier, but i found there are no about fabric-ca interface.My question is, how can i use fabric-gateway-java register and enroll a user identity, then use this identity send tx? Thanks.

fanjianhang (Tue, 26 May 2020 03:43:33 GMT):
Hi everyone, based on fabric-gateway-java intention that make connect network easier, but i found there are no about fabric-ca interface. My question is, how can i use fabric-gateway-java register and enroll a user identity, then use this identity send tx? Thanks.

bestbeforetoday (Tue, 26 May 2020 15:25:53 GMT):
_fabric-gateway-java_ doesn't provide administrative capabilities. You would need to use the fabric-ca CLI, _fabric-sdk-java_ or something else to enroll with the CA. Once you get credentials back from enrollment then you can use _fabric-gateway-java_ to create an Identity object and either store that identity in a wallet or use it directly to connect the Gateway: - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Identities.html - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Wallet.html - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Gateway.Builder.html#identity-org.hyperledger.fabric.gateway.Identity-

fanjianhang (Thu, 28 May 2020 01:13:02 GMT):
Thanks a lot.

fanjianhang (Thu, 28 May 2020 01:14:21 GMT):
Thanks a lot.

nitishbhardwaj19 (Thu, 28 May 2020 03:18:39 GMT):
Hi @fanjianhang You can try this https://hub.docker.com/r/hlfgovernance/fabric-ca-client

nitishbhardwaj19 (Thu, 28 May 2020 05:52:56 GMT):
@bestbeforetoday Hope you are doing good, I just have a query i.e is there a way to generate enrollment using HFCAClient which would have *TLS Web Server Authentication, TLS Web Client Authentication* enabled. Something similar to a behavior like this command: _fabric-ca-client enroll -u https://nitish2:password@localhost:7054 --tls.certfiles tls-cert.pem -M $FABRIC_CA_CLIENT_HOME/msp --enrollment.profile tls --csr.hosts peer1-org1_

nitishbhardwaj19 (Thu, 28 May 2020 05:53:59 GMT):
I know there is a way to specify hostNames at the time of enrollment but couldn't any parameter for --enrollment.profile tls

nitishbhardwaj19 (Thu, 28 May 2020 05:56:06 GMT):
Do I need to specify EnrollmentRequest.profile as "tls"?

nitishbhardwaj19 (Thu, 28 May 2020 06:42:56 GMT):
Yup adding enrollment.profile as tls added TLS Web Server/Client to certificate. Thanks

aguel (Fri, 29 May 2020 08:55:07 GMT):
Has left the channel.

kmadala (Tue, 02 Jun 2020 20:44:08 GMT):
Hi everyone: Have question on Fabric SDK - If fabric SDK receives multiple blocks same time for a given channel, does Fabric SDK code guarantees block Order to client application?

kmadala (Tue, 02 Jun 2020 20:46:37 GMT):
or it's client application responsibility to process the blocks in sequence?

bestbeforetoday (Tue, 02 Jun 2020 21:34:42 GMT):
_fabric-gateway-java_ delivers block events to listeners in order and without duplication: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Network.html#addBlockListener-java.util.function.Consumer-

kmadala (Tue, 02 Jun 2020 22:07:38 GMT):
thanks for your reply. we have a scenario, where we observe client application has not received blocks in order. Ex : Received Block 101 first then Block 100. Based on client application logs, we see same timestamp but different threads delivered blocks to client application. Wondering whether Fabric SDK processes the blocks in parallel threads and delivers blocks to Client.

kmadala (Tue, 02 Jun 2020 22:09:35 GMT):
From Channel.java (FabricSDK 1.4.4 version)

kmadala (Tue, 02 Jun 2020 22:09:36 GMT):
try { final String blockchainID = blockEvent.getChannelId(); final String from = format("Channel %s eventqueue got block event with block number: %d for channel: %s, from %s", name, blockEvent.getBlockNumber(), blockchainID, blockEvent.getPeer() != null ? ("" + blockEvent.getPeer()) : ("" + blockEvent.getEventHub())); logger.trace(from); if (!Objects.equals(name, blockchainID)) { logger.warn(format("Channel %s eventqueue got block event NOT FOR ME channelId %s from %s", name, blockchainID, from)); continue; // not targeted for this channel } final ArrayList blcopy = new ArrayList<>(blockListeners.size() + 3); synchronized (blockListeners) { blcopy.addAll(blockListeners.values()); } for (BL l : blcopy) { try { logger.trace(format("Sending block event '%s' to block listener %s", from, l.handle)); client.getExecutorService().execute(() -> l.listener.received(blockEvent)); } catch (Throwable e) { //Don't let one register stop rest. logger.error(format("Error calling block listener %s on channel: %s event: %s ", l.handle, name, from), e); } } } catch (Exception e) { logger.error("Unable to parse event", e); logger.debug("event:\n)"); logger.debug(blockEvent.toString()); }

kmadala (Tue, 02 Jun 2020 22:10:19 GMT):
seems this piece of code processing the blocks in parallel threads.

bestbeforetoday (Wed, 03 Jun 2020 09:44:40 GMT):
If you are using _fabric-sdk-java_ directly then you may receive duplicate and out of order blocks. If you use the _fabric-gateway-java_ API you will receive blocks in order and without duplication. If you are using _fabric-gateway-java_ and still receive blocks out of order, please raise a bug in Jira: https://jira.hyperledger.org/projects/FGJ

kmadala (Wed, 03 Jun 2020 18:44:43 GMT):
thanks for the response

KyoungsunPark (Thu, 04 Jun 2020 03:36:03 GMT):
Hi, I'm interested in the feature for signing a transaction offline. I found this feature in node sdk but not in sdk java. Someone already created the jira issue(https://jira.hyperledger.org/browse/FABJ-445) regarding this. Is there any update for this or any plan in the future?

bestbeforetoday (Thu, 04 Jun 2020 08:36:18 GMT):
The signing is done by calling `CryptoSuite.sign(PrivateKey, byte[])`. Instead of setting the default CryptoSuite implementation on the HFClient, perhaps you could set your own CryptoSuite implementation that does signing by other means when `sign(PrivateKey, byte[])` is called on it. I think the User object will still need to have a dummy private key assigned to it to prevent some of the SDK code complaining it was missing, but this would be ignored as you are supplying your own signing implementation. Would that satisfy your requirement?

KyoungsunPark (Thu, 04 Jun 2020 10:21:36 GMT):
Thank you for your reply. :) Actually end users don't want to share their private key. They want to sign the transaction in user's device without sharing the private key. I need to pass unsigned proposal and unsigned transaction to end user then get signed proposal and transaction from the user. But as I know, signing is done by private key on user object when sendTransaction is executed so I cannot split the transaction process. How can I create the unsigned proposal(transaction) and send signed proposal to peers(orderers) step by step?

ArigelaSatyanarayana (Thu, 04 Jun 2020 13:04:07 GMT):
Has joined the channel.

bestbeforetoday (Thu, 04 Jun 2020 14:18:00 GMT):
Would it be workable for your CryptoSuite implementation to pass the data to be signed to the client when CryptoSuite.sign() is invoked on it, and then wait for them to return the signed data to you before returning that from the call to CryptoSuite.sign() ?

sanjeevkkn (Thu, 04 Jun 2020 14:30:19 GMT):
Has joined the channel.

sanjeevkkn (Thu, 04 Jun 2020 14:30:20 GMT):
Error: Error handling success response. Value did not match schema: 1. return: Invalid type. Expected: array, given: string I am facing while getting success response from chaincode using fabric gateway

bestbeforetoday (Thu, 04 Jun 2020 14:40:28 GMT):
Where are you seeing that error and is there any additional information, like a stack trace of logs? That doesn't look like a client-side message that I am familiar with. Could there be an error generated at the peer / chaincode end that you are observing returned to the client?

bestbeforetoday (Thu, 04 Jun 2020 14:40:28 GMT):
Where are you seeing that error and is there any additional information, like a stack trace or logs? That doesn't look like a client-side message that I am familiar with. Could there be an error generated at the peer / chaincode end that you are observing returned to the client?

KyoungsunPark (Fri, 05 Jun 2020 02:07:51 GMT):
Yes, you're right. It is possible to pass the data to sign by CryptoSuite.sign(PrivateKey, byte[]). I'm using Channel.queryByChaincode(QueryByChaincodeRequest queryByChaincodeRequest) when querying the chaincode. Instead of queryByChaincode, I sent the date to the client and return back signed data then tried to send signed proposal to peers. But sendProposalToPeers() is private so I could not send the data to peers. Is there any accessible function for sending proposal to peers? Similarly the function for sending transaction to orderers is not accessible. Signing by CryptoSuite.sign() is workable but it failed to send it peers and orderers using Channel class. Thanks.

bestbeforetoday (Fri, 05 Jun 2020 07:57:35 GMT):
Do you know why and at what point the signed proposal was rejected? Getting the signing correct is not trivial. I would suggest looking at the default CryptoSuite signing implementation: https://github.com/hyperledger/fabric-sdk-java/blob/a66d7080f99846a230a69eeedf115c68167bef86/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L756

KyoungsunPark (Mon, 08 Jun 2020 02:20:18 GMT):
Hmm.. signing is no problem as CryptoSuite.sign that you suggested. My problem is that signed proposal cannot be sent to peer by channel.sendProposalToPeers because this is the private function. In node sdk, Channel.sendSignedProposal() is supported and you can find it on https://github.com/hyperledger/fabric-sdk-node/blob/0d24cec10f7a3e0153fcf3f0158a89c5eaa0cfab/docs/tutorials/sign-transaction-offline.md. I need the function to send signed proposal to peers. Thanks.

bestbeforetoday (Mon, 08 Jun 2020 07:58:08 GMT):
I don't think you're understanding what I am suggesting, which is that you: 1. Set your own CryptoSuite implementation on HFClient, with a CryptoSuite.sign() implementation that does your offline signing. 2. Call Channel.sendTransactionProposal() as normal to send the transaction proposal, which will invoke your CryptoSuite.sign() implementation at the appropriate point. So you use continue to use Channel.sendTransactionProposal() but it uses your signing implementation.

bestbeforetoday (Mon, 08 Jun 2020 07:58:08 GMT):
I don't think you're understanding what I am suggesting, which is that you: 1. Set your own CryptoSuite implementation on HFClient, with a CryptoSuite.sign() implementation that does your offline signing. 2. Call Channel.sendTransactionProposal() as normal to send the transaction proposal, which will invoke your CryptoSuite.sign() implementation at the appropriate point. So you continue to use Channel.sendTransactionProposal() but it uses your signing implementation. You don't need to use any private methods.

SamYuan1990 (Tue, 09 Jun 2020 10:22:49 GMT):
hi may I ask fabric-gateway-java question here?

SamYuan1990 (Tue, 09 Jun 2020 10:23:11 GMT):
Recently I am coding fabric client application via java. I am noticed that there seems no connection pool feature provided by either fabric-gateway-java or fabric-sdk-java. As application developer point of view, I suppose there should be a connection pool, as a sub-system responsible for connecting to fabric. 1) Performance. As it's well known that connection pool is good for performance. 2) Maintainability. Code will be easier to maintain than if each component connected to the fabric itself. 3) Diagnostics. It becomes easier to diagnose and analyze fabric connection usage. Is there any plan to have a connection pool feature for fabric-gateway-java?

bestbeforetoday (Tue, 09 Jun 2020 10:47:23 GMT):
You should definitely use a Gateway for multiple requests by the same client identity. There is significant overhead associated with connecting to the network so you don't want to be connecting and closing on every request. On the other hand, if you are not going to make any further requests with that client identity, either for the lifetime of the client application or for some significant period of time, it is beneficial to close the connection rather than leave them hanging open. It's difficult for any caching scheme implemented in the SDK to know what your application is going to do in the future and so it's difficult for any caching scheme in the SDK to behave appropriately for your application. It's not very difficult for your application to keep hold of a Gateway instance and reuse it for subsequent requests if it knows that will be required.

bestbeforetoday (Tue, 09 Jun 2020 10:48:04 GMT):
So right now, I don't have any plans to try to implement a caching scheme within the SDK

bestbeforetoday (Tue, 09 Jun 2020 10:53:50 GMT):
It might be possible to optimise the number of gRPC connections created by client applications using the Gateway, by doing some sharing of the underlying connections between Gateway instances. I don't know of any near-term plan to implement those optimisations in the current SDK versions

SamYuan1990 (Tue, 09 Jun 2020 11:10:22 GMT):
Well, I tested and understand that currently to use gateway for multiple requests as your said above. To have a high thoughput for client application in multiple request scenario. I received output for gateway query via stringbuffer. with query A or query B, but some error happens as query A with result 210 and query B with result 90. What I expected, or questioned is that is there any way for safety multiple thread? I hope by a "pooled feature" can implments that kind of safety multiple thread.

SamYuan1990 (Tue, 09 Jun 2020 11:12:13 GMT):
either reused underlying conenctions or a connection pool export to appplication for inovke as JDBC pool is fine.

SamYuan1990 (Tue, 09 Jun 2020 11:13:26 GMT):
by you say optimise the number of gprc connections underlying, do we have that already? any jira ticket or design document for reference?

bestbeforetoday (Tue, 09 Jun 2020 14:35:15 GMT):
The API should be thread safe. If you find any cases where fabric-gateway-java doesn't behave in a thread safe manner, please raise a bug in Jira. However, the Fabric blockchain network is a distributed ledger and so you should get eventual consistency but not the same kind of consistency you might expect from a centralised system such as a sing instance database. Different peers in the network may be at different block heights and so their world state may be different at any given point in time. The result you get from a query depends on the state of whichever peer the query executes on. The commit and query strategies provided by the Gateway are intended to mitigate this by allowing you to wait for submitted transactions to be committed on peers before subsequently going on to evaluate transactions (query) those peers

bestbeforetoday (Tue, 09 Jun 2020 14:35:15 GMT):
The API should be thread safe. If you find any cases where fabric-gateway-java doesn't behave in a thread safe manner, please raise a bug in Jira. However, the Fabric blockchain network is a distributed ledger and so you should get eventual consistency but not the same kind of consistency you might expect from a centralised system such as a single instance database. Different peers in the network may be at different block heights and so their world state may be different at any given point in time. The result you get from a query depends on the state of whichever peer the query executes on. The commit and query strategies provided by the Gateway are intended to mitigate this by allowing you to wait for submitted transactions to be committed on peers before subsequently going on to evaluate transactions (query) those peers

SamYuan1990 (Tue, 09 Jun 2020 14:40:20 GMT):
got ...

rmnattas (Wed, 10 Jun 2020 17:15:57 GMT):
Has joined the channel.

darapich92 (Thu, 11 Jun 2020 04:56:22 GMT):

Screenshot from 2020-06-11 13-54-03.png

govindvb (Fri, 12 Jun 2020 18:42:17 GMT):
Has joined the channel.

ongchinkai (Mon, 15 Jun 2020 03:38:29 GMT):
Is there any sample code in the Fabric Gateway that demonstrates a simple block listener that stays alive and listens for block events? org.hyperledger.fabric.gateway.impl.BlockListenerTest doesn't contain seem to mention anything beyond adding listeners to the network

nitishbhardwaj19 (Mon, 15 Jun 2020 13:11:45 GMT):
Hi @bestbeforetoday I have just upgraded to java sdk 2.1. I am getting a strange error while I am trying to create a new channel on network. *expected config block type CONFIG_UPDATE, but got: MESSAGE* Could you please let me know if I am missing something?

bestbeforetoday (Tue, 16 Jun 2020 08:02:56 GMT):
What further information are you looking for? Once you attach a block listener, it carries on listening for block events until you remove it or your client application terminates

Bolzo 1 (Wed, 24 Jun 2020 08:48:31 GMT):
I'm using fabric java sdk 1.4.7 (not Gateway) when i call sendTransaction and it return a CompletableFuture. If i do a .get() on this future it returns null, any idea why?

Bolzo 1 (Wed, 24 Jun 2020 08:48:31 GMT):
I'm using fabric java sdk 1.4.7 (not Gateway) when i call sendTransaction it returns a CompletableFuture. If i do a .get() on this future it returns null, any idea why?

Bolzo 1 (Wed, 24 Jun 2020 08:48:31 GMT):
I'm using fabric java sdk 1.4.7 (not Gateway) when I call sendTransaction it returns a CompletableFuture. If i do a .get() on this future it returns null, any idea why?

bestbeforetoday (Wed, 24 Jun 2020 18:13:15 GMT):
I think the value returned should be a transaction event if you have chosen to wait for commit the transaction to commit on peers and it completes successfully. If you have set NOfEvents.nofNoEvents (so not waiting for commit on peers) then it will just return null after a successful send to the orderer

bestbeforetoday (Wed, 24 Jun 2020 18:13:15 GMT):
I think the value returned should be a transaction event if you have chosen to wait for the transaction to commit on peers and it completes successfully. If you have set NOfEvents.nofNoEvents (so not waiting for commit on peers) then it will just return null after a successful send to the orderer

c0deh0use (Thu, 25 Jun 2020 07:35:41 GMT):
Hi guys, could anyone help with batch uploads? I'm trying to upload around 200-400 records to the blockchain via a java chaincode.
This process takes about 3 -4 minutes which is taking a bit. While uploading around 40-50 records, that takes 5-8 seconds. I identified that such a long time is because of the proposal time response. 
Is this a normal speed or is there a way using configuration to speed it up? Is there any „Bulk import features” that I could use ? 
HLF - 2.2.1 version

Bolzo 1 (Thu, 25 Jun 2020 13:16:51 GMT):
I understand, I've not set NOfEvents.nofNoEvents so this is not the case. What I've observed is that I have a connection profile which specify all the endorsing peers of any organization. In this scenario the future.get() returns null, but if I remove all the peers not in the org specified in the connection profile the .get() call returns correctly. To be more clear: ``` ```

Bolzo 1 (Thu, 25 Jun 2020 13:16:51 GMT):
I understand, I've not set NOfEvents.nofNoEvents so this is not the case. What I've observed is that I have a connection profile which specify all the endorsing peers of any organization. In this scenario the future.get() returns null, but if I remove all the peers not in the org specified in the connection profile the .get() call returns correctly. To be more clear: ``` name: fabric-net x-type: "hlfv1" version: 1.0.0 license: Apache-2.0 client: tlsEnable: true adminUser: xxxxx adminPassword: xxxxx enableAuthentication: false organization: Org2 <--- here ``` If I leave only the peers of Org2 the proccess of sending transaction works correctly. If I specify other peers of other organizations the result is opposite

Bolzo 1 (Thu, 25 Jun 2020 13:16:51 GMT):
I understand, I've not set NOfEvents.nofNoEvents so this is not the case. What I've observed is that I have a connection profile which specifies all the endorsing peers of each organization. In this scenario the future.get() returns null, but if I remove all the peers not in the org specified in the connection profile the .get() call returns correctly. To be more clear: ``` name: fabric-net x-type: "hlfv1" version: 1.0.0 license: Apache-2.0 client: tlsEnable: true adminUser: xxxxx adminPassword: xxxxx enableAuthentication: false organization: Org2 <--- here ``` If I leave only the peers of Org2 the proccess of sending transaction works correctly. If I specify other peers of other organizations the result is the opposite.

bestbeforetoday (Thu, 25 Jun 2020 14:49:29 GMT):
Just so I understand what you are doing... do you mean 200 - 400 records in a single transaction, or do you submit a separate transaction for each record? I think in general (and within message size limits) it's more performant to batch multiple records up into a single transaction and do all the putState operations for those records in a single transaction. Another thing to seriously consider is whether these records (or transactions) are independent of each other. If they are independent (so don't touch the same ledger entries) then you can probably get much better performance by executing them in parallel using a multi-threaded client application. Submitting transactions sequentially likely means you'll get one per block and all the latency involved in the block cutting whereas in parallel you will likely get many transactions per block. Another factor (usually determined by whether your transactions and independent or not) is whether you need to wait for transactions to be committed by peers for submitting subsequent transactions. You will get the highest throughput if you don't need to wait for the commits (or possibly optimise by waiting for the commits asynchronously)

bestbeforetoday (Thu, 25 Jun 2020 14:50:51 GMT):
The comparative performance numbers between these two pages might help. They are using a Node.js client but I would expect the performance trends to be consistent. - https://hyperledger.github.io/caliper-benchmarks/fabric/performance/2.1.0/nodeJS/nodeSDK/submit/create-asset/ - https://hyperledger.github.io/caliper-benchmarks/fabric/performance/2.1.0/nodeJS/nodeSDK/submit/batch-create-asset/

c0deh0use (Fri, 26 Jun 2020 06:36:37 GMT):
Thanks @bestbeforetoday, I'm pushing these messages all in one transaction. The db response time is quick but for some reason the time the client waits for the proposal transaction confirmation to be returned accepted or not takes long minutes (I'm not sure what is the reason as I didn't check detailed debug logs yet). I will have a look at the examples you have send - thx!

Bolzo 1 (Fri, 26 Jun 2020 07:08:02 GMT):
Hi, yesterday I finally moved to fabric gateway 2.1.3 and I have some question about the transaction process. @bestbeforetoday So, as I understood, when I call `submitTransaction()` the returned byte array is the payload returned by the chaincode.. But, is the transaction successfully committed to the ledger or the call return as the transaction is submitted to the orderer? Second question: how can I get the transaction Id of a submitted transaction? I need to attach a listener right? But what type? And there is a code example of this?

Bolzo 1 (Fri, 26 Jun 2020 07:08:02 GMT):
Hi, yesterday I finally moved to fabric gateway 2.1.3 and I have some question about the transaction process. @bestbeforetoday So, as I understood, when I call `submitTransaction()` the returned byte array is the payload returned by the chaincode.. But, is the transaction successfully committed to the ledger or the call return as the transaction is submitted to the orderer? Second question: how can I get the transaction Id of a submitted transaction? I need to attach a listener right? But what type? And there is a code example of this? Third question: Is there any function to query an asset using the transaction Id?

bestbeforetoday (Fri, 26 Jun 2020 08:10:09 GMT):
By default `submitTransaction()` will return only after seeing successful commit events from all your organisation peers. You can select alternative default behaviour by setting a different commit handler when connecting the Gateway, or provide your own custom implementation if none of the default options suit you: - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Gateway.Builder.html#commitHandler-org.hyperledger.fabric.gateway.spi.CommitHandlerFactory- If you want different behaviour for different transactions then you can override the default commit handling behaviour on a per-transaction bases: - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Transaction.html#setCommitHandler-org.hyperledger.fabric.gateway.spi.CommitHandlerFactory- In some cases you might want to get the transaction result immediately after the transaction is successfully sent to the orderer but still listen asynchronously (or in another process) for that transaction to commit on peers. You can achieve this by: 1. Use the `NONE` commit handler: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/DefaultCommitHandlers.html#NONE 2. Get the transaction ID prior to submitting the transactions: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Transaction.html#getTransactionId-- 3. Also before submitting the transaction (so you don't miss the commit), add a commit listener to the Network to observe commit events for that transaction: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Network.html#addCommitListener-org.hyperledger.fabric.gateway.spi.CommitListener-java.util.Collection-java.lang.String- There is an example of a commit listener being used in a custom commit handler implementation here: https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/java/org/hyperledger/fabric/gateway/sample/SampleCommitHandler.java

bestbeforetoday (Fri, 26 Jun 2020 08:32:47 GMT):
Unless you are really pushing the boundaries of transaction throughput or have very strict responsiveness requirements, probably keeping your application code simple and just letting `submit()` deal with any commit event handling you need is a good option

Bolzo 1 (Fri, 26 Jun 2020 08:43:48 GMT):
Thanks for the reply! I understand more clearly now, I'll do my tests based on the use cases that I have

ViokingTung (Mon, 29 Jun 2020 08:39:22 GMT):
Has joined the channel.

ShobhitSrivastava (Mon, 29 Jun 2020 13:49:40 GMT):
Hi @bestbeforetoday ...i needed to query block info and what all transaction it has? Can we do it via java sdk? Please help with this.

nitishbhardwaj19 (Tue, 30 Jun 2020 05:03:09 GMT):
Hi @bestbeforetoday Is there any way to retrieve all transactions/blocks for a channel? I know that we can get recent block for a channel but just curious to know if we have an option to retrieve all blocks/transactions from orderer or peers

bestbeforetoday (Tue, 30 Jun 2020 12:42:30 GMT):
You can add a block listener with replay starting at the first block: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Network.html#addBlockListener-long-java.util.function.Consumer-

bestbeforetoday (Tue, 30 Jun 2020 12:43:01 GMT):
You can access all the transaction events within the block event pretty easily

bestbeforetoday (Tue, 30 Jun 2020 13:20:15 GMT):
If you are replaying a large number of blocks then you might consider using a checkpointer to maintain the current block number the replay has reached in case the client fails and needs to resume from the last processed block: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Network.html#addBlockListener-org.hyperledger.fabric.gateway.spi.Checkpointer-java.util.function.Consumer-

c0deh0use (Wed, 01 Jul 2020 18:26:44 GMT):
So I had a few minutes to look into this. 
I’m definitely not exceeding the volumes that the report is saying (going with around 150-300 records) which is a very small value in contrast to what it was presented in the report. 
Is there some configurations that would be causing such long executions ? With around 220 records I’m reaching blockchain timeout connection limits
(2020-07-01 17:45:04.380 UTC [endorser] SimulateProposal -> ERRO 195 failed to invoke chaincode poc-services, error: timeout expired while executing transaction github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute)

c0deh0use (Wed, 01 Jul 2020 18:29:41 GMT):
@bestbeforetoday is there some specific way of handling batch uploads ?

c0deh0use (Thu, 02 Jul 2020 09:44:17 GMT):
Can anyone help with tweaking the performance of the process of uploading a number of records to the blockchain? I have around 300 records to upload, nothing complex. The TransactionProposal takes so long it is getting timeout by the blockchain I have been trying to change both the BatchTimeout - set to 10s and BatchSize.MaxMessageCount to 500, but nothing helped with the proposal times. It takes so long that there always is a timeout on the blockchain side. 
I’m doing one putState per record, as I couldn’t find a putStates method, can this be the problem ?
 I'm running on HLF 2.1.1, with two orgs, one raft orderer.

bestbeforetoday (Thu, 02 Jul 2020 19:25:23 GMT):
It sounds to me like you need some instrumentation (or at least analysis of timestamps in existing logs) to identify exactly where the time is being spent. It's difficult to know what the problem might be without knowing which part of the flow is taking all the time

bestbeforetoday (Thu, 02 Jul 2020 19:30:28 GMT):
One thing to experiment with might be to run a single batch transaction invocation to see what the latency is like. If a single transaction invocation performs well and you are running many transaction invocations in parallel then it might be that something is bottlenecking under load and you start to see failures. If so, it might be you can identify and work to remove that bottleneck, or it might be a case of tuning the rate of transactions to get optimum performance

nitishbhardwaj19 (Mon, 06 Jul 2020 11:04:45 GMT):
Sounds good, thanks @bestbeforetoday :)

baohua (Wed, 08 Jul 2020 01:02:19 GMT):
Has joined the channel.

baohua (Wed, 08 Jul 2020 01:02:19 GMT):
Hi, anyone know which version of sdk-node works best with fabric v1.4.7? I saw there's sdk-node 1.4.11 now.

Bolzo 1 (Mon, 13 Jul 2020 13:00:15 GMT):
Hi @bestbeforetoday, I have a question about the `CommitListener. I've attached a `CommitListener` to a network and I was wondering if it is enough to override the defaul behaviour of the `submit` function. In other words, once I 've attached a listener to a network the submit call is still blocking?

Bolzo 1 (Mon, 13 Jul 2020 13:00:15 GMT):
Hi @bestbeforetoday, I have a question about the `CommitListener`. I've attached a `CommitListener` to a network and I was wondering if it is enough to override the defaul behaviour of the `submit` function. In other words, once I 've attached a listener to a network the submit call is still blocking?

davidkhala (Tue, 14 Jul 2020 02:40:37 GMT):
Has joined the channel.

davidkhala (Tue, 14 Jul 2020 02:40:38 GMT):
These days I am playing with fabric-sdk-java, meanwhile I see a comment saying: `IdeMixTest disabled in Azure Pipelines - it takes too long to run (>2 hours!)` Could any one talk more about the details of why it take so long? Is time consumed in entropy collecting?

davidkhala (Tue, 14 Jul 2020 07:38:15 GMT):
Along with my deeper trial, it is recorded in my machine that running a single IdemixTask consume about 50 minutes.

bestbeforetoday (Tue, 14 Jul 2020 09:07:15 GMT):
I would recommend using the latest 1.4.x release of the Node SDK for 1.4.x releases of Fabric. The patch versions of the SDK and Fabric are not aligned; just the major/minor numbers. Also... the #fabric-sdk-node channel is a better place for Node SDK questions :)

bestbeforetoday (Tue, 14 Jul 2020 09:13:03 GMT):
The submit will use whatever commit handling behaviour is configured; by default the one specified when connecting the gateway (which itself defaults to MSPID_SCOPE_ALLFORTX). If you don't want the submit to block waiting for commits because you are doing your own listening for commits then use the NONE commit handler. If you want all transaction submits to behave this way by default, set this on the GatewayBuilder when connecting the Gateway. If you just want specific transaction submits to not wait for commits, set the NONE commit handler explicitly on those Transaction objects before calling submit: - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Transaction.html#setCommitHandler-org.hyperledger.fabric.gateway.spi.CommitHandlerFactory- - https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/DefaultCommitHandlers.html#NONE

bestbeforetoday (Tue, 14 Jul 2020 09:55:32 GMT):
From very vague memory... there is some unit and integration testing of Idemix done in the Azure pipelines build; just not that one very long unit test piece since it takes so long to run in the Azure pipelines environment that the builds fail with timeouts. The test drives something like 2500 Idemix operations with many operations running in parallel, I presume to try to flush out any concurrency issues. If you're changing the Idemix code then it would be a good idea to set the appropriate environment variable to enable that test when running tests locally but it's way too long running to be a regularly run unit test

Rahul98 (Wed, 15 Jul 2020 04:28:33 GMT):
Has joined the channel.

Rahul98 (Wed, 15 Jul 2020 04:33:31 GMT):
Hey,I have been trying to run a java code that enrolls the user of the java client on VSCode IDE and am facing errors relating to : error: package javax.json does not exist import javax.json.Json;

Rahul98 (Wed, 15 Jul 2020 04:33:31 GMT):
Hey,I have been trying to run a java code that enrolls the user of the java client on VSCode IDE and am facing errors relating to : error: package javax.json does not exist import javax.json.Json; error: package org.hyperledger.fabric.sdk does not exist import org.hyperledger.fabric.sdk.QueryByChaincodeRequest; Even though I have included the dependencies in the pom file ,I face this error,what could possibily be wrong?

bestbeforetoday (Wed, 15 Jul 2020 08:32:31 GMT):
I very rarely use VS Code for Java development and can't say for sure what's causing this for you. One thing you might is running `mvn compile` in your project directory to get Maven to pull down dependencies if you don't already have them

AshutoshKumar7 (Thu, 16 Jul 2020 12:16:08 GMT):
Has joined the channel.

bestbeforetoday (Thu, 16 Jul 2020 19:00:39 GMT):
A v2.2.0 release of _fabric-gateway-java_ has been published to accompany the Fabric 2.2 LTS release: https://github.com/hyperledger/fabric-gateway-java/releases/tag/v2.2.0

Djoust (Mon, 20 Jul 2020 10:01:48 GMT):
Has joined the channel.

Djoust (Mon, 20 Jul 2020 10:01:49 GMT):
Hi, Q: We have a fabric setup where we deploy Go chaincode from source, now i notice that in the SDK the folder "src" is a hardcoded prefix for chaincodeSource location I give of the Go code. The go code I work with doesn't conform to this structure. So i was wondering why the decision was made to put the prefix in it? (Yes, I know the method is called fromSource :wink: ) This is where the prefix, or to be perfectly correct insertion is added: https://github.com/hyperledger/fabric-sdk-java/blob/032aa59356575f2d6d2210983c755b5acd0fca38/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java#L255

bestbeforetoday (Tue, 21 Jul 2020 18:03:16 GMT):
I don't know why it was conceived this way. At first glance, this doesn't look ideal to me. Possibly it was due to limitations of the structure expected on the server side prior to Go modules. I've raised this Jira to capture the request for more flexibility: https://jira.hyperledger.org/browse/FABJ-529

bestbeforetoday (Tue, 21 Jul 2020 18:05:58 GMT):
Generally the recommendation today seems to be to use the command-line to package and deploy chaincode rather than the SDKs

Djoust (Wed, 22 Jul 2020 08:30:56 GMT):
Thanks for the quick answer, will watch the story and probably fix it myself

NickName (Wed, 22 Jul 2020 12:43:42 GMT):
Has joined the channel.

NickName (Wed, 22 Jul 2020 12:43:42 GMT):
Hello, I'm trying to measure the throughput of a network that I created using the fabcar chaincode. I have started from the example java application in the fabric-samples repository (https://github.com/hyperledger/fabric-samples/blob/master/fabcar/java/src/main/java/org/example/ClientApp.java) and tried to generate transactions and add commit event listeners to check if the transactions are commited or not. However, all the examples that are present in the documentation require a transaction ID which I cannot obtain. What is the proper way to listen to a commit event using the java gateway?

bestbeforetoday (Wed, 22 Jul 2020 13:02:56 GMT):
Transaction.submit() already waits for commit events before returning (assuming you haven't set the commit handler to `NONE`)

NickName (Thu, 23 Jul 2020 06:35:44 GMT):
Does the java gateway allow flooding the network with transactions? I'm trying to use contract.submitTransaction() but the measured TPS is around 3. Is there a better way to do this?

mahoney1 (Thu, 23 Jul 2020 08:21:37 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community - agenda is here: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings

bestbeforetoday (Thu, 23 Jul 2020 08:48:29 GMT):
By default, contract.submitTransaction() will wait for until a submitted transaction is committed on peers before returning. So with one single-threaded client you will get one transaction per block and you can expect transaction rate to be slow. One approach to driving higher load is to run multiple concurrent clients (or client threads). Another approach is to not wait for transactions to be committed on the submit, which you can achieve by setting the `NONE` commit handler (either as the default when connecting the Gateway or on a per-transaction basis). Just be aware that any subsequent queries or transactions will not see ledger changes resulting from earlier transactions until those earlier transactions are committed

bestbeforetoday (Thu, 23 Jul 2020 08:48:29 GMT):
By default, contract.submitTransaction() will wait until a submitted transaction is committed on peers before returning. So with one single-threaded client you will get one transaction per block and you can expect transaction rate to be slow. One approach to driving higher load is to run multiple concurrent clients (or client threads). Another approach is to not wait for transactions to be committed on the submit, which you can achieve by setting the `NONE` commit handler (either as the default when connecting the Gateway or on a per-transaction basis). Just be aware that any subsequent queries or transactions will not see ledger changes resulting from earlier transactions until those earlier transactions are committed

Funbric (Fri, 31 Jul 2020 07:49:23 GMT):
Has joined the channel.

Funbric (Mon, 03 Aug 2020 02:20:54 GMT):
When I using sdk-java to add an new Org to existing channel (not the peer join a chanenl) by updating channel's configuration. But I got this warn which seems make the add-org-action failed. ``` Rejecting broadcast of config message from 124.160.109.242:62948 because of error: error applying config update to existing channel 'channel109': error authorizing update: proto: field "common.ConfigUpdate.channel_id" contains invalid UTF-8 ``` The Java code is like: `channel.updateChannelConfiguration(updateChannelConfiguration, peerClient.getUpdateChannelConfigurationSignature(updateChannelConfiguration, peerAdmin));` The byte[] in updateChannelConfiguration which I'm pretty sure is correct. Because when I save the byte[] 'to xxx.pb', and using that pb file to update by using `peer channel update` command, the result is good。 Anyone familiar with this probleam? I'm so confused with this problem and would be so grateful if anyone could provide me some advice.

Funbric (Mon, 03 Aug 2020 11:35:09 GMT):
Problem solved! I don't need package the “envelope” like what did in docker container. It already implemented by sdk.

ks.cho (Tue, 04 Aug 2020 11:49:23 GMT):
Has joined the channel.

ks.cho (Tue, 04 Aug 2020 11:49:23 GMT):
I'd like to see the fabric consensus process. After builds a fabric network of seven peers, I'd like to check if blocks are created by blocking 2 peers and agreeing only 5 peers. Tell me how to do it. How can I check it?

ks.cho (Tue, 04 Aug 2020 11:50:49 GMT):
In fabcar examples, how can I execute query and invoke?

ks.cho (Tue, 04 Aug 2020 11:50:49 GMT):
In fabcar examples, how can I execute 'query' and 'invoke'? I success build up a java fabcar network ( ./startFabric.sh java) but I don't know how execute 'query' and 'invoke' command java query? Is it right? In javascript fabcar network I typed command as 'node query', 'node invoke'. It was successful

ks.cho (Tue, 04 Aug 2020 11:50:49 GMT):
In fabcar examples, how can I execute 'query' and 'invoke'? I success build up a java fabcar network ( ./startFabric.sh java) but I don't know how execute 'query' and 'invoke' command java query? Is it right? In javascript fabcar network(./startFabric.sh javascript), I typed command as 'node query', 'node invoke'. It was successful

bestbeforetoday (Wed, 05 Aug 2020 09:26:20 GMT):
There is a sample Java client application, which I guess you can run with something like `mvn exec:java -Dexec.mainClass="org.example.ClientApp"`. It runs several queries and transactions. If you want it to do something, you could change that code or write your own client application. The samples are just there to provide working usage examples

bestbeforetoday (Wed, 05 Aug 2020 09:26:20 GMT):
There is a sample Java client application, which I guess you can run with something like `mvn exec:java -Dexec.mainClass="org.example.ClientApp"`. It runs several queries and transactions. If you want it to do something else, you could change that code or write your own client application. The samples are just there to provide working usage examples

AshutoshKumar7 (Wed, 05 Aug 2020 10:35:52 GMT):
I am getting this exception while invoking chaincode using java sdk

AshutoshKumar7 (Wed, 05 Aug 2020 10:35:53 GMT):
org.hyperledger.fabric.gateway.GatewayRuntimeException: org.hyperledger.fabric.sdk.exception.ServiceDiscoveryException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception Caused by: javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

AshutoshKumar7 (Wed, 05 Aug 2020 10:36:03 GMT):
Any pointers?

bestbeforetoday (Wed, 05 Aug 2020 16:32:33 GMT):
That's not an error I recall seeing before so I really don't know what the problem is. My guess would be that either the client certificate used to establish connection to a peer is not issued by a CA recognised by the peer, or (perhaps more likely) that the peer certificate is not issued by a CA recognised by the client

bestbeforetoday (Wed, 05 Aug 2020 16:50:54 GMT):
If it is the second issue then you might need to import the CA certificate into your client's trust store, either programmatically or using the keytool utility. I'm not an expert in this area though

ongchinkai (Thu, 06 Aug 2020 09:59:14 GMT):
org.hyperledger.fabric.shim.ledger.KeyModification.getTimestamp() - what timestamp does this represent?

bestbeforetoday (Thu, 06 Aug 2020 10:35:05 GMT):
The documentation is published here but I don't think there is a complete implementation of this capability yet, and it is not included in a current release version: https://hyperledger.github.io/fabric-chaincode-java/master/api/index.html?org/hyperledger/fabric/shim/ledger/KeyModification.html

bestbeforetoday (Thu, 06 Aug 2020 10:35:05 GMT):
The documentation is published here ~but I don't think there is a complete implementation of this capability yet, and it is not included in a current release version~ (edit: I was confusing this with some ledger API changes in the current code snapshots): https://hyperledger.github.io/fabric-chaincode-java/master/api/index.html?org/hyperledger/fabric/shim/ledger/KeyModification.html

bestbeforetoday (Thu, 06 Aug 2020 10:35:05 GMT):
The documentation is published here ~but I don't think there is a complete implementation of this capability yet, and it is not included in a current release version~ (edit: I was confusing this with some ledger API changes in the current code snapshots): https://hyperledger.github.io/fabric-chaincode-java/release-2.2/api/index.html?org/hyperledger/fabric/shim/ledger/KeyModification.html

bestbeforetoday (Thu, 06 Aug 2020 10:35:26 GMT):
This question would be better in the #fabric-java-chaincode channel

ongchinkai (Thu, 06 Aug 2020 10:36:25 GMT):
I read the documentation and it seemed quite vague, that's why I came here to ask. I'll go check out that channel, thanks!

bestbeforetoday (Thu, 06 Aug 2020 10:38:50 GMT):
My interpretation of the documentation would be that it returns the point in time at which the key was modified to have the value specified in that KeyModification instance. But somebody on the #fabric-java-chaincode channel should be able to provide a more authoritative answer since that's where the chaincode devs hang out

ongchinkai (Thu, 06 Aug 2020 10:40:50 GMT):
That's my interpretation too, but yes I'll see if I can get a more concise answer on this over there. Cheers

bestbeforetoday (Thu, 06 Aug 2020 10:42:25 GMT):
I'd guess that modification time is actually the timestamp of the transaction that updated the key, since different peers will commit to their local copies of the ledger at different times

ongchinkai (Thu, 06 Aug 2020 10:44:49 GMT):
So in the context of getting the history of the key via stub.getHistoryForKey(...), the last action would be committing the block, and the timestamp would be for that action, I suppose?

aatkddny (Fri, 07 Aug 2020 15:52:04 GMT):
Wow it's been a while since I needed to come on here... HLF 1.4.5 network using raft. K8S using DinD. This particular one has been stable for a year. Now all of a sudden it's failing to instantiate chaincode. It's an automated process using the SDK - and has worked for ever. It runs just fine right up to the point where it has to instantiate. The errors are "failed constructing descriptor for chaincodes" and "failed to find all layouts for chaincodes" It's still processing Tx, i just can't install new chaincode. Anyone ever run across this? Logs are inconclusive in the peers, the orderers and dind in the peers. I'm guessing it's a resource starvation issue, but I'm grasping at straws.

aatkddny (Fri, 07 Aug 2020 15:52:04 GMT):
Wow it's been a while since I needed to come on here... HLF 1.4.5 network using raft. K8S using DinD. This particular one has been stable for a year. Now all of a sudden it's failing to instantiate chaincode. It's an automated process using the SDK - and has worked for ever. It runs just fine right up to the point where it has to instantiate. The errors are "failed constructing descriptor for chaincodes" and "failed to find all layouts for chaincodes" It's still processing Tx, i just can't install new chaincode. Anyone ever run across this? Logs are inconclusive in the peers, the orderers and dind in the peers. I'm guessing it's a resource starvation issue, but I'm grasping at straws. Anyone ever see this?

yacovm (Fri, 07 Aug 2020 17:06:24 GMT):
> Wow it's been a while since I needed to come on here... You make it sound like you hate being here

yacovm (Fri, 07 Aug 2020 17:06:24 GMT):
> Wow it's been a while since I needed to come on here... You make it sound like you hate being here, @aatkddny

yacovm (Fri, 07 Aug 2020 17:07:18 GMT):
> The errors are "failed constructing descriptor for chaincodes" and "failed to find all layouts for chaincodes" This is a discovery error....

yacovm (Fri, 07 Aug 2020 17:07:28 GMT):
How are the logs of the peers doing?

yacovm (Fri, 07 Aug 2020 17:07:41 GMT):
> Logs are inconclusive in the peers, the orderers and dind in the peers. What do you mean inconclusive?

yacovm (Fri, 07 Aug 2020 17:08:08 GMT):
> I'm guessing it's a resource starvation issue, but I'm grasping at straws. Anyone ever see this? Give me some logs to look at...

aatkddny (Fri, 07 Aug 2020 19:37:50 GMT):
@yacovm - not really. more because the thing has just been working. so i haven't had anything to ask about, and have been working on something different.

aatkddny (Fri, 07 Aug 2020 19:37:50 GMT):
@yacovm - not really. more because the thing has just been working. so i haven't had anything to ask about, and have been working on something different. inconclusive because they don't say anything that points to an issue anywhere. the peers still run transactions on other channels just fine - it's only when we try to upgrade chaincode that it's an issue. (and the chaincode is at something like V2.63 in increments of 0.01 so it's nothing new here).

aatkddny (Fri, 07 Aug 2020 19:37:50 GMT):
@yacovm - not really. more because the thing has just been working. so i haven't had anything to ask about, and have been working on something different. inconclusive because they don't say anything that points to an issue anywhere. the peers still run transactions on other channels just fine - it's only when we try to upgrade chaincode that it's an issue. (and the chaincode is at something like V2.63 in increments of 0.01 so it's nothing new here). discovery isn't throwing any errors - this channel has 6 peers for 3 orgs and 3 anchors. all the messages look good for the comms back and forth.

aatkddny (Fri, 07 Aug 2020 19:37:50 GMT):
@yacovm - not really. more because the thing has just been working. so i haven't had anything to ask about, and have been working on something different. i'm saying that the logs are inconclusive because they don't say anything that points to an issue anywhere. tried restarting the peer with debug logging on and that too doesn't really say much. the peers still run transactions on other channels just fine - it's only when we try to upgrade chaincode that it's an issue. (and the chaincode is at something like V2.63 in increments of 0.01 so it's nothing new here). discovery isn't throwing any errors - this channel has 6 peers for 3 orgs and 3 anchors. all the messages look good for the comms back and forth.

yacovm (Fri, 07 Aug 2020 20:32:51 GMT):
@aatkddny maybe you want to open a JIRA?

aatkddny (Sat, 08 Aug 2020 02:44:57 GMT):
I'm waiting on better logs.

bestbeforetoday (Sun, 09 Aug 2020 13:59:01 GMT):
If the logs don't point to an obvious issue, it might also be useful to know whether the same chaincode upgrade works using the CLI commands, to try to isolate whether the issue is client (SDK) side or server-side

aatkddny (Mon, 10 Aug 2020 00:12:06 GMT):
As an fyi: We don't use the CLI. There's too many channels to look after so it's all been automated through the SDK. I am in no hurry at all to move to the version where that support has been dropped...

jtonline (Mon, 10 Aug 2020 14:22:04 GMT):
Has joined the channel.

aatkddny (Mon, 10 Aug 2020 20:02:34 GMT):
And the logs made it pretty clear what the problem was when I finally got my grubby fingers on them. One of the nodes had drifted in time so it was out of synch with the others. Fix that and hey presto - it is all back working.

aatkddny (Mon, 10 Aug 2020 20:02:34 GMT):
And the logs made it pretty clear what the problem was when I finally got my grubby fingers on them. One of the nodes had drifted in time so it was out of synch with the others. Fix that and hey presto - it is all back working. Getting a ca37c error but that's not preventing us deploying.

bestbeforetoday (Tue, 11 Aug 2020 14:07:48 GMT):
:thumbsup:

bestbeforetoday (Tue, 11 Aug 2020 14:15:18 GMT):
Whisper it but the API to deploy chaincode is still there in fabric-sdk-java v2.2. It was only the v2 Node SDK where this got lost when all the internals were reworked for v2. There is a community proposal to contribute a Node admin package for v2 (raised on last week's contributor meeting)

aatkddny (Tue, 11 Aug 2020 18:54:17 GMT):
What about all the other stuff? We stand up a network soup to nuts using the APIs. Creating channels, adding anchors, installing and instantiating chaincodes, the lot. With an egg on top.

bestbeforetoday (Tue, 11 Aug 2020 18:55:58 GMT):
I think everything that was there in fabric-sdk-java v1.4 is still there in v2.2. I certainly don't recall anything being actively removed

aatkddny (Tue, 11 Aug 2020 19:50:11 GMT):
:thumbsup:

ks.cho (Wed, 12 Aug 2020 10:03:00 GMT):
can u explain more detail? I don't understand what you mean

bestbeforetoday (Wed, 12 Aug 2020 15:42:58 GMT):
In the Node.js sample, when you run `node query` you are running a client application contained in the `query.js` file. From memory, that client application just runs a query and prints the results

bestbeforetoday (Wed, 12 Aug 2020 15:43:53 GMT):
There isn't an exactly equivalent sample Java application. Instead there is a sample application that does several pieces of work: queries and transactions

bestbeforetoday (Wed, 12 Aug 2020 15:44:55 GMT):
The Java/Maven equivalent to the `node fileName` command to launch the sample client application is the Maven command-line above

bestbeforetoday (Wed, 12 Aug 2020 15:46:12 GMT):
The samples are just examples of how to code a client application

bestbeforetoday (Wed, 12 Aug 2020 15:56:25 GMT):
If you want a command-line utility that can be used to submit or evaluate (i.e. query) arbitrary transactions then there are the `peer chaincode invoke` and `peer chaincode query` commands: https://hyperledger-fabric.readthedocs.io/en/latest/commands/peerchaincode.html

zhiqiang 1 (Sat, 15 Aug 2020 04:40:33 GMT):
I am a newbie to fabric. I recently received a request that I need to use fabric-sdk-go to query block information, but when initializing the SDK, I found that too much configuration is required. How do I quickly configure the SDK? Just call QueryBlock This function

danilofaria (Mon, 17 Aug 2020 13:33:58 GMT):
Has joined the channel.

pkirkinezis (Mon, 17 Aug 2020 18:50:18 GMT):
Has joined the channel.

pkirkinezis (Mon, 17 Aug 2020 18:52:55 GMT):
the easiest way it throuth fabric gateway .

danilofaria (Tue, 18 Aug 2020 00:57:47 GMT):
Hello folks, I am having an issue with Chaincode installation using `hfClient.sendLifecycleInstallChaincodeRequest` (using 2.1.0). Most of the times it works fine, but it flakes sometimes and fails with at least one failed response such that: • status: FAILURE • message: Channel Channel{id: 20, name: } sending proposal with transaction 48b874f0f818e5e0df55a574cce59e052a8e8e7f3382711b83b5bdb5089c7633 to Peer{ id: 2, name: peer0, channelName: mainchannel, url: grpcs://peer0.org1.example.com:7051} failed because of timeout(60000 milliseconds) expiration • response.getPackageId() throws org.hyperledger.fabric.sdk.exception.ProposalException: Status of install proposal did not ret ok for Peer{ id: 2, name: peer0, channelName: mainchannel, url: grpcs://peer0.org1.example.com:7051}, FAILURE

danilofaria (Tue, 18 Aug 2020 00:58:22 GMT):
i have searched tirelessly across the web for a solution but have not been able to find it. i was wondering if this is a known issue and how to fix it

pkirkinezis (Tue, 18 Aug 2020 07:00:05 GMT):
Mornings to the community . Which is the best way to store identity secret so i can use it afterwords ?

pkirkinezis (Tue, 18 Aug 2020 07:01:13 GMT):
For example would it be a best practice to create table on the database and save userId , certificate, private key (string) , hashed identity secret ?

pkirkinezis (Tue, 18 Aug 2020 07:02:04 GMT):
i mean the enrollment secret ..

bestbeforetoday (Tue, 18 Aug 2020 09:50:16 GMT):
If you have the certificate and private key you don't need the enrolment secret. It is just used to obtain the certificate from the CA. Best practice is probably for the CA to be configured to only allow enrollment to happen only once. That way, if you try to retrieve your certificate using enrollment and it fails, you know somebody else has obtained your enrollment secret and retrieved your certificate before you, so the identity has been compromised. It also prevents somebody from discovering your secret after you have retrieved your certificate and grabbing it from the CA after you, also compromising the identity.

pkirkinezis (Tue, 18 Aug 2020 10:02:59 GMT):
Thanks for you reply . How i can store private key on a database ? Because i dont want to store a wallet neather haveing keyfile to a filesystem path and retrieve them .

bestbeforetoday (Tue, 18 Aug 2020 10:04:51 GMT):
There is a CouchDB wallet store implementation if you want to use a Wallet to store to CouchDB: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Wallets.html#newCouchDBWallet-java.net.URL-java.lang.String-

pkirkinezis (Tue, 18 Aug 2020 10:05:32 GMT):
My concept is to use a Maria DB database(already exists on main app) in which every API will query to get the certs or credentials needed to enroll a user and execute query

bestbeforetoday (Tue, 18 Aug 2020 10:07:38 GMT):
Other alternatives are to: 1. Write your own WalletStore implementation to store at a location of your choosing; or 2. (If you don't want to use the wallet data format) you can just store the certificate and private key PEM from your Identity however you want, the create an Identity object using those credentials when you need to connect. You can connect the Gateway using just an Identity and no Wallet: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#identity-org.hyperledger.fabric.gateway.Identity- There are some helper function for converting certificates and private keys in the Identities class: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html

bestbeforetoday (Tue, 18 Aug 2020 10:07:38 GMT):
Other alternatives are to: 1. Write your own WalletStore implementation to store at a location of your choosing; or 2. (If you don't want to use the wallet data format) you can just store the certificate and private key from your Identity however you want, thne create an Identity object using those credentials when you need to connect. You can connect the Gateway using just an Identity and no Wallet: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#identity-org.hyperledger.fabric.gateway.Identity- There are some helper function for converting certificates and private keys in the Identities class: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html

pkirkinezis (Tue, 18 Aug 2020 10:10:21 GMT):
How can i convert private key from Enrollment object to private key pem ?

pkirkinezis (Tue, 18 Aug 2020 10:12:07 GMT):
My registration process is the bellow : RegistrationRequest registrationRequest = new RegistrationRequest(username); registrationRequest.setAffiliation(env.getProperty("affiliation")); registrationRequest.setEnrollmentID(username); registrationRequest.setSecret(secret); String eSecret = caClient.register(registrationRequest, adminUserContext); enrollment = caClient.enroll(username, eSecret); final PrivateKey privateKey = enrollment.getKey();

pkirkinezis (Tue, 18 Aug 2020 10:13:09 GMT):
After the registration I enroll a user and call gateway builder to execute queries

pkirkinezis (Tue, 18 Aug 2020 10:13:09 GMT):
After the registration is success for every api call I enroll a user and call gateway builder to execute queries

pkirkinezis (Tue, 18 Aug 2020 10:20:02 GMT):
After enrollment with secret and userid i create a Enrolement object that then used to create a identity like bellow

pkirkinezis (Tue, 18 Aug 2020 10:20:03 GMT):
X509Identity userIdentity = newX509Identity(env.getProperty("mspid"), Identities.readX509Certificate(enrollment.getCert()), enrollment.getKey());

pkirkinezis (Tue, 18 Aug 2020 10:21:45 GMT):
So i can save Cert as string to database , but how I can save privatekey as string to database because toString() creates the string with curves X,Y.

bestbeforetoday (Tue, 18 Aug 2020 10:22:48 GMT):
It might be simpler to call the method to create directly from an enrollment: `X509Identity userIdentity = Identities.newX509Identity("mspId", enrollment);`

bestbeforetoday (Tue, 18 Aug 2020 10:23:55 GMT):
There are also `Identities.toPemString()` methods that will convert both Certificate and PrivateKey objects to PEM strings

bestbeforetoday (Tue, 18 Aug 2020 10:25:25 GMT):
And you can read those PEM strings back in using the `readX509Certificate()` and `readPrivateKey()` methods on Identities

bestbeforetoday (Tue, 18 Aug 2020 10:25:30 GMT):
Look at the Javadoc: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html

pkirkinezis (Tue, 18 Aug 2020 10:26:39 GMT):
I can't thank you enough I was stragling more than 2 days. I will try your recomentation by creating pem string .

bestbeforetoday (Tue, 18 Aug 2020 10:28:52 GMT):
:thumbsup:

bestbeforetoday (Tue, 18 Aug 2020 10:40:52 GMT):
First, I would suggest using v2.2.x, although I don't think that will change any behaviour

bestbeforetoday (Tue, 18 Aug 2020 10:51:14 GMT):
Do you know how long the chaincode install operation is typically taking? I am wondering if the operation is sometimes taking longer than the default proposal wait timeout. In which case you could set a larger number on your request object

danilofaria (Tue, 18 Aug 2020 10:51:14 GMT):
i cant upgrade at the moment. would you have any other pointers?

danilofaria (Tue, 18 Aug 2020 10:51:52 GMT):
it usually takes around 20 seconds. but sometimes it just takes forever and times out

bestbeforetoday (Tue, 18 Aug 2020 10:51:53 GMT):
I actually thought the default timeout was 120 seconds rather than the 60 seconds that you are seeing. Maybe that changed at some point though

danilofaria (Tue, 18 Aug 2020 10:54:27 GMT):
i older versions this step was a lot faster and never timed out

danilofaria (Tue, 18 Aug 2020 10:54:27 GMT):
in older versions this step was a lot faster and never timed out

bestbeforetoday (Tue, 18 Aug 2020 10:55:04 GMT):
It might also be worth checking the peer logs so see if the chaincode install is running successfully there

danilofaria (Tue, 18 Aug 2020 10:55:40 GMT):
sometimes this bit shows up: ``` peer0.org1.example.com_1 | 2020-08-12 17:08:18.657 UTC [endorser] SimulateProposal -> ERRO 03d failed to invoke chaincode _lifecycle, error: timeout expired while executing transaction peer0.org1.example.com_1 | github.com/hyperledger/fabric/core/chaincode.(*Handler).Execute peer0.org1.example.com_1 | /go/src/github.com/hyperledger/fabric/core/chaincode/handler.go:1215 peer0.org1.example.com_1 | github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).execute ```

danilofaria (Tue, 18 Aug 2020 10:57:09 GMT):
i also noticed that when this happens, retry attempts also fail

bestbeforetoday (Tue, 18 Aug 2020 11:08:12 GMT):
I think there is a configurable peer timeout you can set too. It might be `CORE_CHAINCODE_EXECUTETIMEOUT`, which you set as an environment variable on the peer Docker container. Something like: `CORE_CHAINCODE_EXECUTETIMEOUT=300s`

danilofaria (Tue, 18 Aug 2020 11:57:30 GMT):
is it common for that step to take that long?

bestbeforetoday (Tue, 18 Aug 2020 12:06:43 GMT):
From memory, the install step does a fair bit of work, like building a chaincode docker container, so it might take some time to download and assemble dependencies. I guess it is also possible there is an issue so it might be worth looking into more logs of what is going on in the `_lifecycle` chaincode

pkirkinezis (Wed, 19 Aug 2020 08:59:35 GMT):
I fast querstion . Is there any way to enroll a user without a sectet . Only with private key and certification?

deployer21 (Wed, 19 Aug 2020 13:27:07 GMT):
Has joined the channel.

deployer21 (Wed, 19 Aug 2020 13:29:22 GMT):
Hello guys, can someone explain the difference between fabric-sdk-java and fabric-gateway-java? Which Jar file should I use in my Java Application to interact with the network? Thx

bestbeforetoday (Wed, 19 Aug 2020 13:40:12 GMT):
See the opening section of the fabric-sdk-java README: https://github.com/hyperledger/fabric-sdk-java/blob/master/README.md

pkirkinezis (Wed, 19 Aug 2020 17:21:43 GMT):
Let me refraze. I would like to know if you dont save identity secret anywhere and for some reason you loose keyfiles how we can retrieve this identity

pkirkinezis (Wed, 19 Aug 2020 17:23:39 GMT):
Or maybe create keyfiles with expiration date

pkirkinezis (Wed, 19 Aug 2020 17:24:23 GMT):
If you dont have the secret you cannot create new cert files for the specific user

rthatcher (Thu, 20 Aug 2020 14:19:19 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community

bestbeforetoday (Thu, 20 Aug 2020 14:48:14 GMT):
I suspect the answer might be for the CA to issue a new certificate and revoke the previous one (if it hasn't expired). You could ask on the #fabric-ca channel as somebody there might have better information

pkirkinezis (Thu, 20 Aug 2020 15:16:35 GMT):
thanks

Nick (Sat, 22 Aug 2020 04:33:25 GMT):
Has joined the channel.

Nick (Mon, 24 Aug 2020 01:06:30 GMT):
Hello guys, can you help suggest what the best practice is to query a specific peer with java sdk.

Nick (Mon, 24 Aug 2020 01:08:37 GMT):
With service discovery, it seems we lost the capability to limit the peer that sdk can see, which was done in connection profile in previous release.

bestbeforetoday (Tue, 25 Aug 2020 08:43:42 GMT):
You can provide your own plugin logic for picking the peer(s) used to evaluate queries by setting a query handler when connecting the Gateway: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#queryHandler-org.hyperledger.fabric.gateway.spi.QueryHandlerFactory- I don't think there is a sample query handler with the Java SDK but the implementation should be pretty straightforward. The QueryHandlerFactory function you supply as part of the Gateway connect gets called with the Network when it is first required. It should pick the required peer(s) and then return a QueryHandler instance, which again is just a functional interface that will be invoked (with a Query object parameter) each time a transaction is evaluated. All you have to do in your code is tell the Query object which peer to use and return the results.

bestbeforetoday (Tue, 25 Aug 2020 08:45:14 GMT):
Some other doc pages that might help: - https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/spi/QueryHandlerFactory.html - https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/spi/QueryHandler.html - https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/spi/Query.html

Nick (Tue, 25 Aug 2020 08:46:57 GMT):
Thank you Mark. Will take a deeper look at the queryhandler.

bestbeforetoday (Tue, 25 Aug 2020 08:48:27 GMT):
Your code can probably be simpler than the default implementations, but it might help to look at that code. QueryHandlerFactory: https://github.com/hyperledger/fabric-gateway-java/blob/7133cf423dc07092d2ad0b0e418b88191e4e385a/src/main/java/org/hyperledger/fabric/gateway/DefaultQueryHandlers.java#L28 QueryHandler: https://github.com/hyperledger/fabric-gateway-java/blob/7133cf423dc07092d2ad0b0e418b88191e4e385a/src/main/java/org/hyperledger/fabric/gateway/impl/query/SingleQueryHandler.java#L36

Nick (Tue, 25 Aug 2020 08:52:47 GMT):
It's nice to know SDK has provided an interface to customize the behavior of query.

Nick (Wed, 26 Aug 2020 04:47:57 GMT):
Hi team, how can I enable debug/trace log for fabric-gateway-java.

Nick (Wed, 26 Aug 2020 04:48:40 GMT):
For fabric-sdk-java is stated to set env variable ORG_HYPERLEDGER_FABRIC_SDK_LOGLEVEL=TRACE

akshay.sood (Wed, 26 Aug 2020 07:05:32 GMT):
Has joined the channel.

akshay.sood (Wed, 26 Aug 2020 07:06:02 GMT):
Hi guys, I am new to Java SDK. Can anyone refer me to any sample sdk implementation for ZKP?

bestbeforetoday (Wed, 26 Aug 2020 14:44:08 GMT):
I think setting the environment variable as for _fabric-sdk-java_ will also toggle trace for _fabric-gateway-java_. Alternatively, since the SDKs use Log4J by default, you can include a `log4j.properties` configuration file in your classpath, similar to this: https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/resources/log4j.properties

bestbeforetoday (Wed, 26 Aug 2020 14:56:38 GMT):
There is some general information on Idemix (the zero-knowledge proof implementation) and Fabric here: https://hyperledger-fabric.readthedocs.io/en/release-2.2/idemix.html

bestbeforetoday (Wed, 26 Aug 2020 14:57:31 GMT):
I don't know of any good worked examples of Idemix usage but this integration test uses and enrolls Idemix identities so may be of some help: https://github.com/hyperledger/fabric-sdk-java/blob/master/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIdemixIT.java

Nick (Wed, 26 Aug 2020 23:58:19 GMT):
Thank you Mark.

pkirkinezis (Thu, 27 Aug 2020 05:33:54 GMT):
Hi to the community . Does enyone faced a problem i have . My fabric netowork is up and running 1.5 months now . Today without chaning anything , my JAVA SDK program returns to "{"result":"","errors":[{"code":0,"message":"The CSR subject common name must equal the enrollment ID"} ],"messages":[],"success":false}" whenever i try interact woth the blockchain .

akshay.sood (Thu, 27 Aug 2020 07:19:33 GMT):
@bestbeforetoday Thanks for the suggestion. Do you know where can I store this idemix identity so that I can reuse it again

bestbeforetoday (Thu, 27 Aug 2020 09:07:22 GMT):
That looks like an error message from the CA related to enrolment. It might be worth exploring why your application is re/enrolling identities to obtain certificates if it's been running for 1.5 months. You could also try the #fabric-ca channel to see if anyone has better information on why the CA might be generating that error

pkirkinezis (Thu, 27 Aug 2020 09:18:22 GMT):
I been testing a new user registration . So i enroll admin so then to be able to register a new user. Is this flow correct ?

akshay.sood (Thu, 27 Aug 2020 09:52:26 GMT):

Clipboard - August 27, 2020 3:22 PM

akshay.sood (Thu, 27 Aug 2020 09:53:27 GMT):
@bestbeforetoday I have actually successfully enrolled idemix user. I am not sure how to use the instance of idemix user. Can you navigate me to the documentation of java sdk and tell me how do I invoke a transaction using this idemix user?

bestbeforetoday (Thu, 27 Aug 2020 10:35:39 GMT):
You just set the Idemix user as the user context on your HFClient, the same as you would for a regular X509 identity

bestbeforetoday (Thu, 27 Aug 2020 10:43:30 GMT):
When it comes to storing the Idemix credentials, that's not something I've played with. Possibly you can just store your certificate and private key from the first step of enrollment with the CA and then use those credentials to make the call to `ca.idemixEnroll()` each time you restart your application

bestbeforetoday (Thu, 27 Aug 2020 10:52:31 GMT):
Yes, in as much as you likely need some admin credentials to register a new user identity. Once you've enrolled an identity and obtained their credentials (certificate and private key) you should probably keep those credentials and not re-enroll with the CA each time you want to get them

pkirkinezis (Thu, 27 Aug 2020 12:52:30 GMT):
How i can get Enroment for adminUserContext

pkirkinezis (Thu, 27 Aug 2020 12:52:32 GMT):
?

pkirkinezis (Thu, 27 Aug 2020 12:53:10 GMT):
My registration suquence looks like this UserContext adminUserContext = new UserContext(); adminUserContext.setName(registerar.getName()); adminUserContext.setAffiliation(env.getProperty("mspid")); adminUserContext.setMspId(env.getProperty("mspid")); adminUserContext.setEnrollment(caClient.enroll(registerar.getName(), registerar.getEnrollSecret())); RegistrationRequest registrationRequest = new RegistrationRequest(username); registrationRequest.setAffiliation(env.getProperty("affiliation")); registrationRequest.setEnrollmentID(username); registrationRequest.setSecret(secret); String eSecret = caClient.register(registrationRequest, adminUserContext);

pkirkinezis (Thu, 27 Aug 2020 12:53:10 GMT):
My registration suquence looks like this UserContext adminUserContext = new UserContext(); adminUserContext.setName(registerar.getName()); adminUserContext.setAffiliation(env.getProperty("mspid")); adminUserContext.setMspId(env.getProperty("mspid")); adminUserContext.setEnrollment(caClient.enroll(registerar.getName(), registerar.getEnrollSecret())); RegistrationRequest registrationRequest = new RegistrationRequest(username); registrationRequest.setAffiliation(env.getProperty("affiliation")); registrationRequest.setEnrollmentID(username); registrationRequest.setSecret(secret); String eSecret = caClient.register(registrationRequest, adminUserContext);

bestbeforetoday (Thu, 27 Aug 2020 14:50:42 GMT):
Within your code you have `caClient.enroll(registerar.getName(), registerar.getEnrollSecret())`, which gives you an `Enrollment` object. You are then attaching this to your admin `User` object with `adminUserContext.setEnrollment()`. You can get the `Enrollment` object back from your admin `User` object with `adminUserContext.getEnrollment()`. The `Enrollment` has the methods `getKey()` and `getCert()`, which are the credentials you should probaby be storing rather than re-enrolling with the CA every time you need to use them

bestbeforetoday (Thu, 27 Aug 2020 14:54:11 GMT):
`getCert()` gives you a String with is the X.509 certificate in PEM encoding. `getKey()` gives you a Java `PrivateKey` object. The _fabric-gateway-java_ API has some utility functions for translating between PrivateKey and X509Certificate objects to/from PEM encoded data: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html

bestbeforetoday (Thu, 27 Aug 2020 14:54:27 GMT):
Or you can use other libraries for this directly

akshay.sood (Thu, 27 Aug 2020 15:05:00 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=5vSnTBWhqFTAyNcoh) @bestbeforetoday I was trying to use java gateway. Do you know if we can use it with gateway?

bestbeforetoday (Thu, 27 Aug 2020 16:21:27 GMT):
The Gateway doesn't have explicit support for Idemix identities. _However_, I think you can probably get it to work by: 1. Build/connect a Gateway instance using an X509Identity (so containing the MSP ID, real certificate and private key) 2. Before using the Gateway for *anything* else, set your Idemix User context on the underlying HFClient using `gateway.getClient().setUserContext(yourIdemixUser)`

bestbeforetoday (Thu, 27 Aug 2020 16:29:59 GMT):
Ah, just remembered that `getClient()` isn't exposed on the Gateway interface to protect users from the implementation details that might change. It's a bit of a hack (and so isn't guaranteed to continue to work in the future) but you can cast the `Gateway` instance to a `GatewayImpl` instance to get access to the `getClient()` method. I'd be interested to hear if it works. If so, maybe proper Idemix support could be added to _fabric-gateway-java_ in the future relatively easily

pkirkinezis (Fri, 28 Aug 2020 05:47:24 GMT):
Yeah to create adminUserContext is easy and then get enrolment . But this is not persistant i have to run caClient.enroll(registerar.getName(), registerar.getEnrollSecret()) in every register http request . I am not using sessions so i can't persist between request the adminUserContext . The best way is to user private key and pemcert to create enrollment

pkirkinezis (Fri, 28 Aug 2020 06:06:04 GMT):
Is it possible to read pri

pkirkinezis (Fri, 28 Aug 2020 06:06:38 GMT):
priv_key cert pem from a file ? I have a keyfile folder that i have the keys

Funbric (Fri, 28 Aug 2020 08:29:33 GMT):

Clipboard - 2020年8月28日下午4点29分

Funbric (Fri, 28 Aug 2020 08:43:11 GMT):

Clipboard - 2020年8月28日下午4点42分

Funbric (Fri, 28 Aug 2020 08:45:44 GMT):

Clipboard - 2020年8月28日下午4点45分

bestbeforetoday (Fri, 28 Aug 2020 08:54:23 GMT):
Yes, I already mentioned how... The fabric-gateway-java API has some utility functions for translating between PrivateKey and X509Certificate objects to/from PEM encoded data: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html

bestbeforetoday (Fri, 28 Aug 2020 08:55:13 GMT):
You probably want: - https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html#readX509Certificate-java.io.Reader- - https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html#readPrivateKey-java.io.Reader-

bestbeforetoday (Fri, 28 Aug 2020 09:02:43 GMT):
And from a Java perspective, and easy way to get a Reader for your certificate/key file is: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#newBufferedReader-java.nio.file.Path-

bestbeforetoday (Fri, 28 Aug 2020 09:02:43 GMT):
And from a Java perspective, an easy way to get a Reader for your certificate/key file that you can pass to those method is: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#newBufferedReader-java.nio.file.Path-

bestbeforetoday (Fri, 28 Aug 2020 09:02:43 GMT):
And from a Java perspective, an easy way to get a Reader for your certificate/key file that you can pass to those methods is: https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#newBufferedReader-java.nio.file.Path-

pkirkinezis (Fri, 28 Aug 2020 09:42:17 GMT):
I,ve tried to create enrollement staticly having cert pem and priv_sk declared in the code as strings. Enrollment enrollment; if(usertype.matches(CLIENT_ORG) ) { enrollment = new X509Enrollment(Identities.readPrivateKey(PRIV_SK_CLIENT),CERT_CLIENT); } else if(usertype.matches(DEBTOR_ORG) ) { enrollment = new X509Enrollment(Identities.readPrivateKey(PRIV_SK_DEBTOR),CERT_DEBTOR); } else { throw new Exception("No valid usertype"); } return enrollment;

pkirkinezis (Fri, 28 Aug 2020 09:43:51 GMT):
The above code enrolls admin . By i get Authentication failure in hyperledger fabric while registering the new User, using the admin enrollment i created

pkirkinezis (Fri, 28 Aug 2020 10:22:18 GMT):
Something else . Enroll creates new keys everytime or it gives you the same keys ?

bestbeforetoday (Fri, 28 Aug 2020 10:24:55 GMT):
I think argument 2 is a serialized ChaincodeDeploymentSpec protobuf, and argument 3 is a serialized SignaturePolicyEnvelope protobuf: https://github.com/hyperledger/fabric/blob/ddffd901a677c0b284a9e0e0608f00290ebf4430/core/scc/lscc/lscc.go#L983

bestbeforetoday (Fri, 28 Aug 2020 10:25:02 GMT):
I would probably look to use the compiled protobuf Java implementation classes to work with them, e.g. `org.hyperledger.fabric.protos.peer.Chaincode.ChaincodeDeploymentSpec.parseFrom()`

bestbeforetoday (Fri, 28 Aug 2020 10:38:15 GMT):
Enrollment is about getting the CA to issue a signed certificate for your identity. You can supply an existing public/private key pair to the enrollment request. If you don't supply a public/private key pair then enrollment will generate a new key for you client-side every time, and then request a signed certificate for this key pair from the CA

pkirkinezis (Fri, 28 Aug 2020 10:39:30 GMT):
Thank for you reply i mean when i enroll with "username" and "secret" new keys are being generated ?

bestbeforetoday (Fri, 28 Aug 2020 10:40:37 GMT):
Yes

pkirkinezis (Fri, 28 Aug 2020 10:41:45 GMT):
So to get the same cert and private key and not generate new ones i have to "reenroll " and not "enroll" ?

bestbeforetoday (Fri, 28 Aug 2020 10:47:35 GMT):
You should just keep hold of your certificate and private key. Once you have them you don't need to talk to the CA anymore. The CA doesn't have your private key

pkirkinezis (Fri, 28 Aug 2020 10:50:10 GMT):
Ok yeah that how i did it now i just used all keys so that why authendication failure . I got new keys with enrolling admin user (with secret) and saved them and now i use this as admin keys and everything works

bestbeforetoday (Fri, 28 Aug 2020 10:51:41 GMT):
:thumbsup:

pkirkinezis (Fri, 28 Aug 2020 10:52:04 GMT):
I mean old keys *

pkirkinezis (Fri, 28 Aug 2020 10:58:20 GMT):
The keys produced by fabric ca have a expiration date or they exist until i invoke them manually ?

pkirkinezis (Fri, 28 Aug 2020 10:59:19 GMT):
I know that you can configure them . I mean is there a default config for certs and keys ?

pkirkinezis (Fri, 28 Aug 2020 11:00:25 GMT):
I found this one https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/serverconfig.html

Funbric (Sat, 29 Aug 2020 13:34:09 GMT):
Thanks 啊咯

Funbric (Sat, 29 Aug 2020 13:37:07 GMT):
Thanks a lot! It confused me and my team for long time. Thanks again!

NizomjonKhajiev (Sat, 29 Aug 2020 14:46:13 GMT):
Has joined the channel.

NizomjonKhajiev (Sat, 29 Aug 2020 14:46:13 GMT):
org.hyperledger.fabric_ca.sdk.HFCAClient$AllHostsSSLSocketFactory cannot be cast to org.apache.http.conn.socket.ConnectionSocketFactory

NizomjonKhajiev (Sat, 29 Aug 2020 14:46:27 GMT):
How Can I resolve this issue ?

SubhodI (Sat, 29 Aug 2020 15:28:52 GMT):
Has joined the channel.

SubhodI (Sat, 29 Aug 2020 15:28:52 GMT):
Hi

SubhodI (Sat, 29 Aug 2020 15:29:36 GMT):
Duplicate question: Copied from #fabric-questions I understand how fabric-gateway-sdk can pickup a wallet to submit transactions. As in the gateway documentation, ``` Path walletDirectory = Paths.get("wallet"); Wallet wallet = Wallets.newFileSystemWallet(walletDirectory); // Path to a common connection profile describing the network. Path networkConfigFile = Paths.get("connection.json"); // Configure the gateway connection used to access the network. Gateway.Builder builder = Gateway.createBuilder() .identity(wallet, "user1") .networkConfig(networkConfigFile); ``` How to create this wallet file? This wallet has to be registered with the CA too. I am wondering how to register a user with the certificate authority and create a wallet file out of those?

SubhodI (Sat, 29 Aug 2020 15:29:36 GMT):
Duplicate question: Pasting here from #fabric-questions I understand how fabric-gateway-sdk can pickup a wallet to submit transactions. As in the gateway documentation, ``` Path walletDirectory = Paths.get("wallet"); Wallet wallet = Wallets.newFileSystemWallet(walletDirectory); // Path to a common connection profile describing the network. Path networkConfigFile = Paths.get("connection.json"); // Configure the gateway connection used to access the network. Gateway.Builder builder = Gateway.createBuilder() .identity(wallet, "user1") .networkConfig(networkConfigFile); ``` How to create this wallet file? This wallet has to be registered with the CA too. I am wondering how to register a user with the certificate authority and create a wallet file out of those?

YangMiranda (Mon, 31 Aug 2020 17:17:37 GMT):
Has joined the channel.

YangMiranda (Mon, 31 Aug 2020 17:17:37 GMT):
Hi, is it possible to change the Identity Enrollment Secret with HFCAClient object? It seems possible with CLI tool, but it's not clear with fabric-sdk-java

bestbeforetoday (Tue, 01 Sep 2020 09:53:30 GMT):
If you enroll using the HFCAClient in _fabric-sdk-java_ you will get back an Enrollment object, which contains an X.509 certificate and a private key. This can be turned into a Gateway Identity that can be stored in a wallet using `Identities.newX509Identity()`: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html#newX509Identity-java.lang.String-org.hyperledger.fabric.sdk.Enrollment-

bestbeforetoday (Tue, 01 Sep 2020 09:57:03 GMT):
If you already have an X.509 certificate and private key, perhaps from some other method of (or previous) enrollment, there are other methods on the `Identities` class to help you build a Gateway identity from `X509Certificate` and `PrivateKey` objects, and to convert to/from PEM-encoded forms on these objects: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Identities.html

bestbeforetoday (Tue, 01 Sep 2020 09:58:24 GMT):
There are methods on the `Wallets` class to allow you to create new or reference existing wallets backed by various types of storage: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Wallets.html

bestbeforetoday (Tue, 01 Sep 2020 09:59:38 GMT):
So after enrollment, you create an Identity and Wallet object and then just `put()` the Identity into the Wallet: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Wallet.html#put-java.lang.String-org.hyperledger.fabric.gateway.Identity-

bestbeforetoday (Tue, 01 Sep 2020 10:01:08 GMT):
If you have some other mechanism for storing and retrieving identity information, you have the option to connect a Gateway with a specific identity and not use a wallet at all: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#identity-org.hyperledger.fabric.gateway.Identity-

bestbeforetoday (Tue, 01 Sep 2020 10:03:34 GMT):
That's not an error I recall seeing before. Is there any more context, like a stacktrace to help pin down what's going on?

bestbeforetoday (Tue, 01 Sep 2020 10:13:00 GMT):
Not sure I 100% understand what you're trying to do but... you can specify the desired enrollment secret on the RegistrationRequest passed to `HFCAClient.register()`

YangMiranda (Tue, 01 Sep 2020 17:27:48 GMT):
Thanks fo answer the question. Today i can register a user using some admin credentials and the method you told. I'm thinking in a case that user want to change his password used to enroll certs in a procedure implemented with SDK. It seems possible with CLI command, but it's not clear with SDK. (https://hyperledger-fabric-ca.readthedocs.io/en/release-1.4/users-guide.html?highlight=modify#modifying-an-identity)

bestbeforetoday (Wed, 02 Sep 2020 08:36:37 GMT):
I'm not sure what that CLI command is doing under the covers (might be worth asking on #fabric-ca, since I guess it might just be calling _register_ again) but I don't know of a modify operation provided by HFCAClient

bestbeforetoday (Wed, 02 Sep 2020 08:38:27 GMT):
Be wary of viewing this as changing the user's password though. The enrollment secret is just some arbitrary secret used to allow the user to be securely issued a certificate by the CA. Once they have the certificate (and corresponding private key), they should be storing and using that certificate and private key, not enrolling again. So the secret should generally be a one time thing

cri 323 (Wed, 02 Sep 2020 13:34:25 GMT):
Has joined the channel.

cri 323 (Wed, 02 Sep 2020 13:34:26 GMT):
Hello, is it possible to add a new organisation only using HF Gateway and dockers? I have tried to follow https://hyperledger-fabric-ca.readthedocs.io/en/latest/operations_guide.html#setup-cas to build my own CA and perform the admin enroling, but enroling from Gateway did not create the same directory hierachy like the one from fabric-ca-client, is there any example how to add a new organisation using the java HF Gateway / SDK? Are there any example for this? Thank you.

mahoney1 (Thu, 03 Sep 2020 13:53:59 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.community

lherskind (Fri, 04 Sep 2020 08:29:54 GMT):
Has joined the channel.

lherskind (Fri, 04 Sep 2020 08:29:54 GMT):
Hi, when we are using RAFT as the consensus, our transactions created with the gateway are reject because they fail the TLS handshake. When we are using kafka which does not require TLS the sample works just as intended. Does anyone know how to include a TLS certificate in the wallet? Or have a sample that works with RAFT as consensus? Thank you very much.

nkl199 (Fri, 04 Sep 2020 09:08:05 GMT):
which client side library are you using?

nkl199 (Fri, 04 Sep 2020 09:08:05 GMT):
which client side library are you using? (and at what versino?)

nkl199 (Fri, 04 Sep 2020 09:08:05 GMT):
which client side library are you using? (and at what version?)

nkl199 (Fri, 04 Sep 2020 09:08:05 GMT):
which client side library version?

akshay.sood (Fri, 04 Sep 2020 09:44:00 GMT):

Clipboard - September 4, 2020 3:13 PM

akshay.sood (Fri, 04 Sep 2020 09:44:01 GMT):
@bestbeforetoday I actually tried it with java sdk and set the user context as Idemix enrolled user. The problem is that the peer is throwing error `zero-knowledge proof is invalid`. I have attached the screenshot also

akshay.sood (Fri, 04 Sep 2020 09:45:42 GMT):

Clipboard - September 4, 2020 3:15 PM

akshay.sood (Fri, 04 Sep 2020 09:45:43 GMT):
This is how I am assigning the idemix user to userContext

akshay.sood (Fri, 04 Sep 2020 09:46:06 GMT):
```fun generateIdemixUser(username: String, enrolment: Enrollment): AppUser{ val idemixEnrollment= getCAClient().idemixEnroll(enrolment, "Org1IDEMixMSP") return AppUser(username, "org1", "Org1MSP", idemixEnrollment) }```

akshay.sood (Fri, 04 Sep 2020 09:47:02 GMT):
I am not sure what I did wrong

nkl199 (Fri, 04 Sep 2020 09:47:21 GMT):
worth checking that the connection profile is specifying grpcs connections and that you are supplying the correct tlsca root cert

nkl199 (Fri, 04 Sep 2020 09:48:08 GMT):
an example ccp for tls is here: https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/java/org/hyperledger/fabric/gateway/connection-tls.json

akshay.sood (Fri, 04 Sep 2020 10:49:38 GMT):
This is my configtx.yaml file https://hastebin.com/oyomupagaz.makefile

akshay.sood (Fri, 04 Sep 2020 10:49:44 GMT):
https://hastebin.com/oyomupagaz.makefile

bestbeforetoday (Fri, 04 Sep 2020 10:59:35 GMT):
Nothing is jumping out at me as a problem with that config or code. I'm not an Idemix expert though, and I'm not sure if any of the people who developed the Idemix support are still active in the community

akshay.sood (Fri, 04 Sep 2020 11:00:36 GMT):
No problem @bestbeforetoday. Thanks anyway for your help :)

bestbeforetoday (Fri, 04 Sep 2020 11:01:08 GMT):
@adc Any ideas on the Identity Mixer issues above? ^^^

akshay.sood (Fri, 04 Sep 2020 11:09:47 GMT):
@bestbeforetoday I am using ca of org1 to register & enroll the idenity. Is that a problem?

bestbeforetoday (Fri, 04 Sep 2020 13:01:43 GMT):
The tests look like they use a admin identity to register the user with the CA, then the user enrolls using their secret, then there is an idemixEnroll with the user's enrollment and Idemix MSP ID. That Idemix enrollment replaces the user's enrollment, but it still keeps the user's actual MSP ID. The Idemix MSP ID looks to only be used for idemixEnroll(): https://github.com/hyperledger/fabric-sdk-java/blob/655639204cefa9515cd27b8c4a9a4109da574b29/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIdemixIT.java#L121

bestbeforetoday (Fri, 04 Sep 2020 13:01:43 GMT):
The tests look like they use an admin identity to register the user with the CA, then the user enrolls using their secret, then there is an idemixEnroll with the user's enrollment and Idemix MSP ID. That Idemix enrollment replaces the user's enrollment, but it still keeps the user's actual MSP ID. The Idemix MSP ID looks to only be used for idemixEnroll(): https://github.com/hyperledger/fabric-sdk-java/blob/655639204cefa9515cd27b8c4a9a4109da574b29/src/test/java/org/hyperledger/fabric/sdkintegration/End2endIdemixIT.java#L121

bestbeforetoday (Fri, 04 Sep 2020 13:02:43 GMT):
I'm not spotting how that is different to what you have done

ckong (Mon, 07 Sep 2020 03:54:54 GMT):
Has joined the channel.

ckong (Mon, 07 Sep 2020 03:56:32 GMT):
Does the Fabric Java SDK allow creation of a channel starting from creating a genesis block?

ckong (Mon, 07 Sep 2020 04:00:34 GMT):
Context is I want to create a channel programmatically using the SDK as much as possible, and I would like to know what I can/not do using the SDK.

Jakeeyturner (Mon, 07 Sep 2020 10:13:08 GMT):
Has joined the channel.

ckong (Wed, 09 Sep 2020 02:39:16 GMT):
In order to create a channel I need to create a .tx file. Can I use the Java SDK to generate this .tx file?

akshay.sood (Wed, 09 Sep 2020 05:22:17 GMT):
@bestbeforetoday it is working fine now. I was using wrong ca server and thats why it was rejecting my zkp identity

bestbeforetoday (Wed, 09 Sep 2020 07:19:17 GMT):
:thumbsup:

akshay.sood (Thu, 10 Sep 2020 07:26:51 GMT):
Thanks @bestbeforetoday :)

ckong (Thu, 10 Sep 2020 08:45:56 GMT):
Can anyone explain the difference between channel.addPeer() and channel.joinPeer()?

bestbeforetoday (Thu, 10 Sep 2020 10:37:08 GMT):
I believe `addPeer()` is just adding it your client channel configuration, similar to including it in the connection profile. So just making your client aware of a peer that is already a member of the channel. `joinPeer()` is actually trying to make a new peer a member of a channel

ckong (Fri, 11 Sep 2020 02:40:41 GMT):
Since there seems to be a functional difference between the two, after I create a new Channel object and before I do channel.initialize(), which is the correct way to add peers - addPeer() or joinPeer()?

bestbeforetoday (Fri, 11 Sep 2020 07:39:56 GMT):
If the peer is already a member of the network and you just want to make your client aware of it then `addPeer()`. If the peer is not a member of a network and you want to join it as an additional node, `joinPeer()`

amolpednekar (Fri, 11 Sep 2020 08:00:43 GMT):
Does the java sdk gateway abstraction not allow to create/join channels or have any apis for chaincode lifecyle ops? (install/approve/commit..) ?

amolpednekar (Fri, 11 Sep 2020 08:01:12 GMT):
and if not, are there samples on how to use the SDK for these ops(for v2.2)

bestbeforetoday (Fri, 11 Sep 2020 12:00:58 GMT):
_fabric-gateway-java_ is focused enabling client applications to interact with the ledger through transactions and events. It doesn't provide administrative functions. Where practical, I would recommend using the `peer` CLI for administrative tasks

bestbeforetoday (Fri, 11 Sep 2020 12:04:37 GMT):
The lower level _fabric-sdk-java_ has administrative capability, and you are fine to use that, but how well it stays in step with future admin capabilities is likely to be determined by how much development effort the community is able to put into updating it

amolpednekar (Fri, 11 Sep 2020 15:08:12 GMT):
@bestbeforetoday Thanks for the reply. Your comment on fabric-sdk-java is a suprising indeed and I did notice that. Only 1 integration test is up-to-date with 2.x code. Is this the case with other SDK's too (node)? That admin capabilities might not be available quickly? Because I feel this would be important for any software vendor wanting to build APIs around such operations for serious projects

amolpednekar (Fri, 11 Sep 2020 15:08:12 GMT):
@bestbeforetoday Thanks for the reply. Your comment on fabric-sdk-java is a suprising indeed and I did notice that. Only 1 integration test is up-to-date with 2.x code. Is this the case with other SDK's too (node)? That admin capabilities might not be available quickly or supported at all? Because I feel this would be important for any software vendor wanting to build APIs around such operations for serious projects

amolpednekar (Fri, 11 Sep 2020 15:08:12 GMT):
@bestbeforetoday Thanks for the reply. Your comment on fabric-sdk-java is a suprising indeed and I did notice that. Only 1 integration test is up-to-date with 2.x code. Is this the case with other SDK's too (NodeJS)? That admin capabilities might not be available quickly or supported at all? Because I feel this would be important for any software vendor wanting to build APIs around such operations for serious projects

lquintai (Mon, 14 Sep 2020 08:22:55 GMT):
Has joined the channel.

vineeta (Mon, 14 Sep 2020 10:13:46 GMT):
Has joined the channel.

vineeta (Mon, 14 Sep 2020 10:49:38 GMT):
``` Hi,Is there any API to add private data collections to service discovery using java fabric gateway like contract.addDiscoveryInterest API used in Node.js gateway? ```

vineeta (Mon, 14 Sep 2020 10:50:26 GMT):
Hi, Is there any API to add private data collections to service discovery using java fabric gateway like contract.addDiscoveryInterest API used in Node.js gateway?

bestbeforetoday (Tue, 15 Sep 2020 12:13:27 GMT):
Not today, no. You would probably need to use `setEndorsingPeers()` on the Transaction to achieve a similar thing: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Transaction.html#setEndorsingPeers-java.util.Collection-

bestbeforetoday (Tue, 15 Sep 2020 12:15:32 GMT):
That does rely on you to identify the peers that need to be used for endorsement. If a collection is available to all peers in given organization(s) then you could use `network.getChannel().getPeersForOrganization()` to get candidate peers

schinivision (Thu, 17 Sep 2020 10:51:40 GMT):
Can someone please point me at the grpc connection timout setting. I am querying a large batch and the connection times out after 35 seconds.. The Chaincode will return but can not hand over the data to the Applikation due to the closed connection.

schinivision (Thu, 17 Sep 2020 10:51:40 GMT):
Can someone please point me at the grpc connection timout setting. I am querying a large batch and the connection times out after 35 seconds.. The Chaincode will return but can not hand over the data to the Applikation due to the closed connection. Error Msg: `sending proposal with transaction 4ac1dc4ee1dd7e98636ed50e24b3f7169b06000eb01faea514d2103cb298cd48 to Peer{ id: 2, name: peer0, channelName: testChannel, url: grpc://} failed because of timeout(35000 milliseconds) expiration`

schinivision (Thu, 17 Sep 2020 10:51:40 GMT):
Can someone please point me at the grpc connection timout setting. I am querying a large batch and the connection times out after 35 seconds.. The Chaincode will return but can not hand over the data to the Applikation due to the closed connection. Error Msg: `sending proposal with transaction 4ac1dc4ee1dd7e98636ed50e24b3f7169b06000eb01faea514d2103cb298cd48 to Peer{ id: 2, name: peer0, channelName: testChannel, url: grpc://} failed because of timeout(35000 milliseconds) expiration` HL 1.3 using fabric-sdk-java 1.3.0

schinivision (Thu, 17 Sep 2020 10:51:40 GMT):
Can someone please point me at the grpc connection timout setting. I am querying a large batch and the connection times out after 35 seconds.. The Chaincode will return but can not hand over the data to the Applikation due to the closed connection. Error Msg: `sending proposal with transaction 4ac1dc4ee1dd7e98636ed50e24b3f7169b06000eb01faea514d2103cb298cd48 to Peer{ id: 2, name: peer0, channelName: testChannel, url: grpc://} failed because of timeout(35000 milliseconds) expiration` HL 1.3 using fabric-sdk-java 1.3.0 Thanks for you help

mahoney1 (Thu, 17 Sep 2020 14:42:59 GMT):
Reminder that the Fabric Application Developer Community call today is at 3pm UTC (4pm UK, 11am ET, 8am PT) Agenda: https://wiki.hyperledger.org/display/fabric/Agendas:+Fabric+Application+Developer+Community+Call+Meetings - Join via Zoom from PC, Mac, Linux, iOS or Android: https://zoom.us/my/hyperledger.communit

mahoney1 (Thu, 17 Sep 2020 15:26:45 GMT):
ok all - so the meeting ^^ is open now - password is THVoQXVHYUVWbHIwOFdvME0xN0lCZz09 when prompted - apologies - this was prompted by changes that Zoom (the host) have made, apparently

lupass93 (Thu, 17 Sep 2020 23:34:25 GMT):
Hi!

lupass93 (Thu, 17 Sep 2020 23:37:24 GMT):
I'm studying connection profile in hyperledger fabric. I would learn to define and make a connection profile for Java sdk for production network. But In the docs there is only guidelines for a test/development mode. I ask if you have a guidelines for define and make it for production mode. Thank you very much! 😊

bestbeforetoday (Fri, 18 Sep 2020 10:24:51 GMT):
There is no fundamental difference between a connection profile used to connect to a production or test/development network. The connection profile simply describes nodes (peers and orderers) to which the client can connect. My advice would be to configure your network to use discovery and minimise the nodes in the connection profile to peers the client should use to for initial connection and the discover the rest of the network nodes. That way you don't need to push new connection profiles out to all of your clients if the network topology changes

bestbeforetoday (Fri, 18 Sep 2020 10:26:55 GMT):
The only thing that springs to mind that is sometimes an issue in a production environment is idle gRPC connections getting more aggressively closed by ingress controllers or firewalls in the cloud deployment. You might want to specify gRPC connection properties like keep-alives, and the connection profile is a place this can be done

lupass93 (Fri, 18 Sep 2020 11:38:13 GMT):
Thank you very much for the answer. About information like tlsCAcerts pem file, Is it safe to expose this information in connection profile file?

amolpednekar (Fri, 18 Sep 2020 12:44:31 GMT):
@bestbeforetoday I am trying to test the gateway wrapper with private data, using this chaincode - https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-private-data/chaincode-go I have modified the assetCollection's Endorsement Policy from "OR('Org1MSP.member', 'Org2MSP.member')" to "AND('Org1MSP.member', 'Org2MSP.member')" { "name": "assetCollection", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive":1000000, "memberOnlyRead": false, "memberOnlyWrite": false, "endorsementPolicy": { "signaturePolicy": "AND('Org1MSP.member', 'Org2MSP.member')" } But I get an endorsement failure on the peer `2020-09-18 12:39:24.522 UTC [vscc] Validate -> ERRO 1f2 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy 2020-09-18 12:39:24.522 UTC [committer.txvalidator] validateTx -> ERRO 1f3 Dispatch for transaction txId = 5c72d5ec8e38f8172e3ba41ccd4e2915011c6ce6f9d289d495109b816e84f9d4 returned error: validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy` It works fine when the policy is OR(Org1, Org2). i tried to set the endorsing peers manually as well, but no difference I see this issue only with private data chaincodes. Am I missing something here?

amolpednekar (Fri, 18 Sep 2020 12:44:31 GMT):
@bestbeforetoday I am trying to test the gateway wrapper with private data, using this chaincode - https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-private-data/chaincode-go I have modified the assetCollection's Endorsement Policy from "OR('Org1MSP.member', 'Org2MSP.member')" to "AND('Org1MSP.member', 'Org2MSP.member')" { "name": "assetCollection", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive":1000000, "memberOnlyRead": false, "memberOnlyWrite": false, "endorsementPolicy": { "signaturePolicy": "AND('Org1MSP.member', 'Org2MSP.member')" } But I get an endorsement failure on the peer ` 2020-09-18 12:39:24.522 UTC [vscc] Validate -> ERRO 1f2 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy 2020-09-18 12:39:24.522 UTC [committer.txvalidator] validateTx -> ERRO 1f3 Dispatch for transaction txId = 5c72d5ec8e38f8172e3ba41ccd4e2915011c6ce6f9d289d495109b816e84f9d4 returned error: validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy` It works fine when the policy is OR(Org1, Org2). i tried to set the endorsing peers manually as well, but no difference I see this issue only with private data chaincodes. Am I missing something here?

amolpednekar (Fri, 18 Sep 2020 12:44:31 GMT):
@bestbeforetoday I am trying to test the gateway wrapper with private data, using this chaincode - https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-private-data/chaincode-go I have modified the assetCollection's Endorsement Policy from "*OR*('Org1MSP.member', 'Org2MSP.member')" to "*AND*('Org1MSP.member', 'Org2MSP.member')" { "name": "assetCollection", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive":1000000, "memberOnlyRead": false, "memberOnlyWrite": false, "endorsementPolicy": { "signaturePolicy": "AND('Org1MSP.member', 'Org2MSP.member')" } But I get an endorsement failure on the peer `2020-09-18 12:39:24.522 UTC [vscc] Validate -> ERRO 1f2 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy 2020-09-18 12:39:24.522 UTC [committer.txvalidator] validateTx -> ERRO 1f3 Dispatch for transaction txId = 5c72d5ec8e38f8172e3ba41ccd4e2915011c6ce6f9d289d495109b816e84f9d4 returned error: validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy` It works fine when the policy is OR(Org1, Org2). i tried to set the endorsing peers manually as well, but no difference I see this issue only with private data chaincodes. Am I missing something here?

amolpednekar (Fri, 18 Sep 2020 12:44:31 GMT):
@bestbeforetoday I am trying to test the gateway with private data, using this chaincode - https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-private-data/chaincode-go I have modified the assetCollection's Endorsement Policy from "*OR*('Org1MSP.member', 'Org2MSP.member')" to "*AND*('Org1MSP.member', 'Org2MSP.member')" { "name": "assetCollection", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive":1000000, "memberOnlyRead": false, "memberOnlyWrite": false, "endorsementPolicy": { "signaturePolicy": "AND('Org1MSP.member', 'Org2MSP.member')" } But I get an endorsement failure on the peer `2020-09-18 12:39:24.522 UTC [vscc] Validate -> ERRO 1f2 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy 2020-09-18 12:39:24.522 UTC [committer.txvalidator] validateTx -> ERRO 1f3 Dispatch for transaction txId = 5c72d5ec8e38f8172e3ba41ccd4e2915011c6ce6f9d289d495109b816e84f9d4 returned error: validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy` It works fine when the policy is OR(Org1, Org2). i tried to set the endorsing peers manually as well, but no difference I see this issue only with private data chaincodes. Am I missing something here?

amolpednekar (Fri, 18 Sep 2020 12:44:31 GMT):
@bestbeforetoday I am trying to test the gateway with private data, using this chaincode - https://github.com/hyperledger/fabric-samples/tree/master/asset-transfer-private-data/chaincode-go I have modified the assetCollection's Endorsement Policy from "*OR*('Org1MSP.member', 'Org2MSP.member')" to "*AND*('Org1MSP.member', 'Org2MSP.member')" I am calling the "CreateAsset" function - https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L50 { "name": "assetCollection", "policy": "OR('Org1MSP.member', 'Org2MSP.member')", "requiredPeerCount": 0, "maxPeerCount": 1, "blockToLive":1000000, "memberOnlyRead": false, "memberOnlyWrite": false, "endorsementPolicy": { "signaturePolicy": "AND('Org1MSP.member', 'Org2MSP.member')" } But I get an endorsement failure on the peer `2020-09-18 12:39:24.522 UTC [vscc] Validate -> ERRO 1f2 VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy 2020-09-18 12:39:24.522 UTC [committer.txvalidator] validateTx -> ERRO 1f3 Dispatch for transaction txId = 5c72d5ec8e38f8172e3ba41ccd4e2915011c6ce6f9d289d495109b816e84f9d4 returned error: validation of endorsement policy for collection assetCollection chaincode private in tx 25:0 failed: signature set did not satisfy policy` It works fine when the policy is OR(Org1, Org2). i tried to set the endorsing peers manually as well, but no difference I see this issue only with private data chaincodes. Am I missing something here?

bestbeforetoday (Fri, 18 Sep 2020 12:55:15 GMT):
An X.509 certificate is essentially a public key and digital signature to prove the validity of that public key, so it should be safe to distribute

bestbeforetoday (Fri, 18 Sep 2020 15:45:51 GMT):
I haven't looked closely at that scenario but it would be worth looking at the logs for the chaincode Docker containers to see what happened in each organization, and perhaps also looking at the proposal responses attached to the ContractException thrown at the client end. From the error I'm guessing that the proposal was not endorsed by one of the organizations

vioking (Fri, 18 Sep 2020 16:51:28 GMT):
Has joined the channel.

ckong (Mon, 21 Sep 2020 03:30:48 GMT):
Regarding channel.sendTransactionProposal() vs channel.sendTransaction(), correct me if my understanding is wrong but the former only simulates the transaction in the peers with the chaincode, while the latter is where the actual transaction is processed. In that case, how necessary is it for a client calling channel.sendTransaction() to handle the results returned?

amolpednekar (Mon, 21 Sep 2020 06:04:48 GMT):
@bestbeforetoday Thanks for the pointers. So I noticed that chaincode logs on org2 are not getting updated, so its not executing. Then I checked the proposal response on the client as you mentioned, and I see this "CreateAsset cannot be performed: Error client from org Org1MSP is not authorized to read or write private data from an org Org2MSP peer" But as per the collection details, both "memberOnlyRead": false, "memberOnlyWrite": false, So it should work, no?

amolpednekar (Mon, 21 Sep 2020 06:29:22 GMT):
Update: Issue fixed There was a function on the chaincode which checks whether clientMSP matches peerMSP, and this was returning and error response. Disabling this fixed it. https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L561 @bestbeforetoday Can you tell how this function is different from what memberOnlyRead/memberOnlyWrite property in collections config does?

amolpednekar (Mon, 21 Sep 2020 06:29:22 GMT):
Update: Issue fixed There was a function on the chaincode which checks whether clientMSP matches peerMSP, and this was returning and error response. Disabling this fixed it. https://github.com/hyperledger/fabric-samples/blob/master/asset-transfer-private-data/chaincode-go/chaincode/asset_transfer.go#L561

erin-hughes (Mon, 21 Sep 2020 07:58:23 GMT):
Has joined the channel.

andrew-coleman (Mon, 21 Sep 2020 09:22:05 GMT):
I strongly recommend you use the high-level 'gateway' API to submit transactions (https://github.com/hyperledger/fabric-gateway-java), much less code to write. It handles the gathering of endorsements, sending to ordering service, awaiting commit events, etc for you

ckong (Mon, 21 Sep 2020 10:50:51 GMT):
This is one of the things which I will have to look at soon, but for now I'm bound by constraints. How should the result from channel.sendTransaction() be handled, if at all?

bestbeforetoday (Tue, 22 Sep 2020 09:46:58 GMT):
If the CompletableFuture it returns completes exceptionally then something went wrong: either the send to the orderer failed or (if your transaction options say it should wait for commit events) then the required number of commits were not observed within a timeout period.

bestbeforetoday (Tue, 22 Sep 2020 09:49:05 GMT):
If it completes successfully then it successfully sent the transaction to the orderer and, if your transaction options say you wanted to wait for commit events, it also received the required number of events. If it waited for events then an event is returned

bestbeforetoday (Tue, 22 Sep 2020 09:50:25 GMT):
But as mentioned above, using the higher level Gateway API (which layers on top of the low-level API, so you can use them in combination) is preferred

letch2010 (Tue, 22 Sep 2020 15:21:27 GMT):
Has joined the channel.

bh4rtp (Thu, 24 Sep 2020 01:44:58 GMT):
hi, does java sdk have addDiscoveryInterest function as node sdk?

amolpednekar (Thu, 24 Sep 2020 09:53:35 GMT):
@bh4rtp Nope; check above ^^ I was able to send transaction and get endorsement for a CC function containing a PDC write without having to set EP's explicitly in any case.

bestbeforetoday (Thu, 24 Sep 2020 10:49:26 GMT):
Not right now, no. Probably the best you can do right now is, if you know the organizations needed for endorsement, get the peers for those organizations (from `network.getChannel()`) and set them as the endorsing peers on the Transaction: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Transaction.html#setEndorsingPeers-java.util.Collection-

ashutosh_kumar (Fri, 25 Sep 2020 15:34:20 GMT):
Folks , we are on Fabric 1.4.x and planning on moving to Fabric 2.x. We are using JAVA SDK. Any_ suggestion for migrating JAVA SDK from 1.4.x to 2.0 ?

danilofaria (Fri, 25 Sep 2020 18:38:15 GMT):
I would like to have people try my java fabric app without disclosing the source code. for the java code, this is fine. however for the chaincode written in go, this is a bit tricker as the uncompiled source code is needed for installing the chaincode. any tips on how to make the app available for local usage in a way that the chaincode source code is not visible?

xxds (Tue, 29 Sep 2020 08:38:16 GMT):
Has joined the channel.

xxds (Tue, 29 Sep 2020 08:38:17 GMT):
`Exception in thread "main" org.hyperledger.fabric.gateway.GatewayRuntimeException: org.hyperledger.fabric.sdk.exception.ProposalException: org.hyperledger.fabric.sdk.exception.TransactionException: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel defaultchannel failed with peer bookspeer0. Status FAILURE, details: Channel Channel{id: 1, name: defaultchannel} Sending proposal with transaction: f0dc7d73d530f31e532a7ee16ac03562c030cbebee218ba618f343d43a5c20d4 to Peer{ id: 5, name: bookspeer0, channelName: defaultchannel, url: grpcs://172.20.41.228:7006, mspid: books-MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=javax.net.ssl.SSLHandshakeException: error:10000412:SSL routines:OPENSSL_internal:SSLV3_ALERT_BAD_CERTIFICATE at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.shutdownWithError(ReferenceCountedOpenSslEngine.java:897) at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.sslReadErrorResult(ReferenceCountedOpenSslEngine.java:1147) at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1101) at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1169) at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1212) at io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:216) at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297) at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199) at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) } at org.hyperledger.fabric.gateway.impl.TransactionImpl.submit(TransactionImpl.java:121) at test2.test.main(test.java:179)`

xxds (Tue, 29 Sep 2020 08:39:19 GMT):
Hi Iam getting the above error while invoking transaction.How to resolve using mutual tls.

xxds (Tue, 29 Sep 2020 08:39:19 GMT):
Hi Iam getting the above error while invoking transaction.How to resolve?Iam using mutual tls.

xxds (Tue, 29 Sep 2020 08:39:51 GMT):
#fabric #fabric-ca

xxds (Tue, 29 Sep 2020 08:58:04 GMT):
@rickr

bestbeforetoday (Tue, 29 Sep 2020 10:30:02 GMT):
My guess from the `SSLV3_ALERT_BAD_CERTIFICATE` is that your client didn't like the peer TLS certificate. Possibly because the signing CA certificate is not in the client JDKs trust store

xxds (Tue, 29 Sep 2020 10:31:18 GMT):
is there proper connection.yaml for mutual tls???

bestbeforetoday (Tue, 29 Sep 2020 10:35:48 GMT):
There looks to be an option that can be added to a peer definition in a connection profile to tell it the CA certificate: https://github.com/hyperledger/fabric-gateway-java/blob/7133cf423dc07092d2ad0b0e418b88191e4e385a/src/test/java/org/hyperledger/fabric/gateway/connection-tls.json#L106

xxds (Tue, 29 Sep 2020 10:37:06 GMT):
why ther is no option to provide clientcertfile clientkey ?

bestbeforetoday (Tue, 29 Sep 2020 10:38:47 GMT):
I wonder if a more realistic solution is to add the CA certificate to the Java trust store using `keytool`, although this isn't something I've played with much personally

bh4rtp (Wed, 30 Sep 2020 03:26:59 GMT):
hi, does java sdk filter the status code from the chaincode response? how can i get the status code from sdk?

vineeta (Thu, 01 Oct 2020 06:45:35 GMT):
@bestbeforetoday Do we have to set up endorsing peers explicitly using setEndorsingPeers() for a transaction?I tried running private data asset-transfer sample on 3 organisation network(with 2 peer each per org) In createAsset transaction with EndorsementPolicy(Org1,Org3) proposal was not sent to Org3.peer0 (as there was no chaincode logs for Org3) and transaction commit failed due to endorsement policy failure, If I setEndorsingPeers for Org1 &Org3 transaction gets committed.

vineeta (Thu, 01 Oct 2020 06:45:35 GMT):
@bestbeforetoday Do we have to set up endorsing peers explicitly using setEndorsingPeers() for a transaction? I tried running private data asset-transfer sample on 3 organisation network(with 2 peer each per org) In createAsset transaction with EndorsementPolicy(Org1,Org3) proposal was not sent to Org3.peer0 (as there was no chaincode logs for Org3) and transaction commit failed due to endorsement policy failure, If I setEndorsingPeers for Org1 &Org3 transaction gets committed. Same network works with fabric sample nodejs application where I had not setup endorsing peers/orgs explicitly

vineeta (Thu, 01 Oct 2020 06:45:35 GMT):
@bestbeforetoday Do we have to set up endorsing peers explicitly using setEndorsingPeers() for a transaction? I tried running private data asset-transfer sample on 3 organisation network(with 2 peer each per org) In createAsset transaction with EndorsementPolicy(Org1,Org3) proposal was not sent to Org3.peer0 (as there was no chaincode logs for Org3) and transaction commit failed due to endorsement policy failure, If I setEndorsingPeers for Org1 &Org3 transaction gets committed. Same network works with fabric sample nodejs application where I do not need to setup endorsing peers explicitly ```

vineeta (Thu, 01 Oct 2020 06:45:35 GMT):
@bestbeforetoday Do we have to set up endorsing peers explicitly using setEndorsingPeers() for a transaction? I tried running private data asset-transfer sample on 3 organisation network(with 2 peer each per org) In createAsset transaction with EndorsementPolicy(Org1,Org3) proposal was not sent to Org3.peer0 (as there was no chaincode logs for Org3) and transaction commit failed due to endorsement policy failure, If I setEndorsingPeers for Org1 &Org3 transaction gets committed. Same network works with fabric sample nodejs application where I do not need to setup endorsing peers explicitly

bestbeforetoday (Thu, 01 Oct 2020 09:07:44 GMT):
The Node.js sample _asset-transfer-private-data_ application sets the collections required for endorsement using the contract.addDiscoveryInterest() call available in the Node SDK: https://hyperledger.github.io/fabric-sdk-node/release-2.2/tutorial-discovery-fabric-network.html

bestbeforetoday (Thu, 01 Oct 2020 09:09:10 GMT):
There is not (yet) an equivalent in the Java SDK so the discovery-based endorsement is only considering the chaincode endorsement policy and not considering the required data collections

bestbeforetoday (Thu, 01 Oct 2020 09:10:16 GMT):
The workaround is to set the peers of the organizations that have access to the required data collections as the endorsing peers for the transaction

bestbeforetoday (Thu, 01 Oct 2020 09:32:57 GMT):
The status code just indicates to the SDK whether the proposal was successfully processed by the peer. It isn't an HTTP status code and isn't used to send application level information. What you get back is the payload or error message associated with a successful or unsuccessful transaction invocation

xxds (Mon, 05 Oct 2020 08:57:20 GMT):
No subject alternative names present is therer a way to skip this verification???

pkirkinezis (Tue, 06 Oct 2020 12:44:31 GMT):
Hi to all is there a way to change password for user that are not registar? I am currently using the above logic for password uupdate HFCAIdentity ide = caClient.newHFCAIdentity(user); // In newHFCAIdentity an EnrollmentID is passed ide.setSecret(newPassword); // Here is the new password set ide.update(userctx); // Here the user is updated.

arpitsoman (Wed, 07 Oct 2020 14:51:08 GMT):
Has joined the channel.

arpitsoman (Wed, 07 Oct 2020 14:51:09 GMT):
Hi All, I am trying to set up my client in Java using fabric gateway for a TLS enabled network where CLIENTAUTHREQUIRED=true, I observed that we need to pass the client.key and client.crt also in the connection profile, but I am not sure how to do it, can someone please help me with the connection.yaml for tls enabled network?

deployer21 (Wed, 07 Oct 2020 15:31:33 GMT):
Hello, can anyone tell if there is a way of skipping these steps each time you want to access the blockchain? 'Cause every HTTP Request I do, always takes around 16 mad seconds! It's inconceivable for any application performance Path walletPath = Paths.get("wallet"); Wallet wallet = Wallets.newFileSystemWallet(walletPath); // load a CCP Path networkConfigPath = Paths.get("src", "crypto-material", "peerOrganizations", "org1.example.com", "connection-org1.json"); Gateway.Builder builder = Gateway.createBuilder(); builder.identity(wallet, "appUser").networkConfig(networkConfigPath).discovery(true); try (Gateway gateway = builder.connect()) { gateway.getNetwork("mychannel").getContract("basic", "AssetTransfer").submitTransaction("DeleteAsset", assetID); return 1; } catch (Exception e) { }

bestbeforetoday (Wed, 07 Oct 2020 15:48:17 GMT):
If you are submitting subsequent requests with the same client identity, keep hold of the Gateway instance for that identity and use it for multiple requests instead of closing after every request

deployer21 (Thu, 08 Oct 2020 09:20:53 GMT):
Do you think that a queue + a thread implementation would do it or you have a better suggestion?

deployer21 (Thu, 08 Oct 2020 09:20:53 GMT):
Do you think that a queue + a thread implementation would do it or you have a better suggestion? And thanks :+1:

pkirkinezis (Thu, 08 Oct 2020 12:53:50 GMT):
Hi is anyone familiar with this error PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors while trying to enroll a user

bh4rtp (Thu, 08 Oct 2020 23:34:59 GMT):
@bestbeforetoday can i only check the status of transaction by catching exceptions?

bestbeforetoday (Fri, 09 Oct 2020 08:22:15 GMT):
Typically we expect submitted transactions to work (end return the transaction response). If they fail endorsement, fail to send to the orderer, or (if you haven't turned off commit waiting) fail to see successful commit events within a timeout period, you will get an exception. The ContractException will have the proposal responses attached so you can look at any information contained within them, including the error response payload

pkirkinezis (Mon, 12 Oct 2020 06:14:59 GMT):
Hi to anyone . I have a question about speed perfomance and invoke query . Is a good practice to open a gateway everytime i want to run a query or a invoke ? Or is there any other way?

mbwhite (Mon, 12 Oct 2020 07:53:02 GMT):
Hello as @bestbeforetoday suggested in the previous thread - hold on to the gateway (and other objects if at all possible) Recreating the objects each time is inefficient. For queries make sure it's a evaluate not a submit.

pkirkinezis (Mon, 12 Oct 2020 08:59:17 GMT):
Yeah i am trying to find a way to keep specific gateway (with chaincode and channel) persistent in every request

pkirkinezis (Mon, 12 Oct 2020 08:59:28 GMT):
is that a good aproach ?

mbwhite (Mon, 12 Oct 2020 09:39:21 GMT):
yes if you can do that..

pkirkinezis (Mon, 12 Oct 2020 13:27:56 GMT):
It is hard to persist an object in java with specific user input . Bean is not working in my case

bestbeforetoday (Tue, 13 Oct 2020 08:32:41 GMT):
Persisting sounds to me like serializing it, either to some persistent storage or perhaps to something like an HTTP session. You definitely *don't* want to do this with a Gateway or Network object

bestbeforetoday (Tue, 13 Oct 2020 08:35:52 GMT):
A simple example of where you would want to keep hold of a Gateway is a client application that is going to submit (or evaluate) multiple transactions. Create the Gateway, Network and Contract once, use them for all of your transactions, then close the Gateway at the end

pkirkinezis (Tue, 13 Oct 2020 08:37:12 GMT):
How can i persist of the Gateway/ contact ?

bestbeforetoday (Tue, 13 Oct 2020 08:37:36 GMT):
If you are running an intermediary, like a REST server, which is submitting transactions driven by client requests, you're probably either: 1. Using a single Fabric client identity for the REST server; or 2. Using different Fabric client identities for each "user" driving REST requests into the system

pkirkinezis (Tue, 13 Oct 2020 08:37:51 GMT):
Simply how can i create a gateway/contract once and use it in every HTTP api request

bestbeforetoday (Tue, 13 Oct 2020 08:38:27 GMT):
If your intermediary using a single "system" Fabric identity, just have it create a Gateway instance with that identity, and keep hold of that Gateway for use by all the requests that arrive at your intermediary

pkirkinezis (Tue, 13 Oct 2020 08:39:07 GMT):
After login success I use the the specific user who logged in to interact

pkirkinezis (Tue, 13 Oct 2020 08:39:25 GMT):
So i have one hyperledger fabric user for every application user .

pkirkinezis (Tue, 13 Oct 2020 08:40:08 GMT):
I don't use one identity to create only a sigle instance of gateway .

bestbeforetoday (Tue, 13 Oct 2020 08:40:30 GMT):
If you have different Fabric identities for each user then you've got to find the right balance. For a very low transaction rate it might be OK to just create and close a Gateway around every request

pkirkinezis (Tue, 13 Oct 2020 08:41:12 GMT):
Yes I do it this way but its a little slow that way .

bestbeforetoday (Tue, 13 Oct 2020 08:41:27 GMT):
For any kind of transaction load you probably want to save those Gateway instances and reuse them. So you might need to have some kind of cache of Gateway instances keyed by client identity

pkirkinezis (Tue, 13 Oct 2020 08:41:40 GMT):
it takes around 2s for gateway to connect for every user.

bestbeforetoday (Tue, 13 Oct 2020 08:42:53 GMT):
Something as simple as a Map of identity name to Gateway instance might be sufficient

pkirkinezis (Tue, 13 Oct 2020 08:44:21 GMT):
xm yeah good idea i will try to create a global mapper of id/conctact and retrive when needed

bestbeforetoday (Tue, 13 Oct 2020 08:44:30 GMT):
As usual with caches, getting things in there is the easy part. Depending on your system and workload, you might need to put some work into taking out of the cache things that don't need to be there anymore

bestbeforetoday (Tue, 13 Oct 2020 08:44:54 GMT):
I expect there are some pre-written caching libraries out there that might be useful but I don't have any recommendations

pkirkinezis (Tue, 13 Oct 2020 08:45:39 GMT):
Yeah i tried it with @bean springboot . Maybe i will try @autowire a map

pkirkinezis (Tue, 13 Oct 2020 08:46:18 GMT):
I use a network resolver and tried to autowire it but it doesn't work as we described

bestbeforetoday (Tue, 13 Oct 2020 08:47:00 GMT):
Just remember that it is the Gateway that needs to eventually have `close()` called on it, so don't lose your Gateway objects

pkirkinezis (Tue, 13 Oct 2020 08:47:45 GMT):
Yeah so gateway is not closing by it self?

pkirkinezis (Tue, 13 Oct 2020 08:47:55 GMT):
after maybe somtime of inactivity?

pkirkinezis (Tue, 13 Oct 2020 08:48:28 GMT):
Maybe i will have to craete /logout api call to run .close()

bestbeforetoday (Tue, 13 Oct 2020 09:28:22 GMT):
The underlying gRPC connection may get closed after some idle period, but the Gateway objects themselves don't have any kind of timeout where they clean up resources

dyhack (Wed, 14 Oct 2020 01:09:56 GMT):
Has joined the channel.

dyhack (Wed, 14 Oct 2020 01:09:56 GMT):
The sample in https://github.com/hyperledger/fabric-gateway-java,How to use tls in the java-gateway-sdk?

pkirkinezis (Wed, 14 Oct 2020 06:01:50 GMT):
So best way possible is to have a logout api call on the application . So when a user logs out i will call gateway /logout to run .close()

pkirkinezis (Wed, 14 Oct 2020 06:02:08 GMT):
Thats the best way i can thing of for now

bestbeforetoday (Wed, 14 Oct 2020 08:06:34 GMT):
For a TLS connecton to nodes, you just need a `grpcs` rather than `grpc` endpoint URL, and for the CA certificates for your network to be trusted by your client. One option for making the CA certificates available is to include them in your connection profile, as in this connection profile: https://github.com/hyperledger/fabric-gateway-java/blob/master/src/test/java/org/hyperledger/fabric/gateway/connection-tls.json

bestbeforetoday (Wed, 14 Oct 2020 08:14:54 GMT):
I don't know what's best for your application design. If you have the concept of them being logged in or out then a logout seems reasonable, and the cleanup of the Gateway instance could be done when their login session is ended, either by explicit logout or a session timeout. Im sure there are plenty of other approaches that would be viable too, such as a timeout on cached Gateway entries based on when they were last accessed. Or you could wrap the Gateway instance in your own Gateway implementation where a call to `close()` doesn't actually close the wrapped Gateway but is used to track when it is no longer in use by client code. Whatever works for you

dyhack (Wed, 14 Oct 2020 08:15:16 GMT):
I have solve the tls connection

dyhack (Wed, 14 Oct 2020 08:15:29 GMT):

Clipboard - October 14, 2020 4:15 PM

dyhack (Wed, 14 Oct 2020 08:16:01 GMT):
How to solve this problem ?

dyhack (Wed, 14 Oct 2020 08:16:03 GMT):
Caused by: org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel mychannel failed with peer peer0.org1.example.com. Status FAILURE, details: Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: 0bacf4e15cd703db21f0d4b9e33f12221ea3c06ccfbca56368aa9049f936a4fc to Peer{ id: 3, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://10.10.9.110:7051, mspid: Org1MSP} failed because of: gRPC failure=Status{code=UNKNOWN, description=error validating proposal: access denied: channel [mychannel] creator org [Org1MSP], cause=null}

dyhack (Wed, 14 Oct 2020 08:16:05 GMT):
please

mbwhite (Wed, 14 Oct 2020 08:31:24 GMT):
Access Denied - I'd double check all the users and wallets.. it's very easy to end using a old identity.

dyhack (Wed, 14 Oct 2020 08:36:15 GMT):
you mens the wallet?

dyhack (Wed, 14 Oct 2020 08:36:27 GMT):
How 同

xxds (Wed, 14 Oct 2020 08:36:39 GMT):
allowAllHostNames will setting this property true help resolve this exception :No subject alternative names present PS:i dont want to set hostnameoverride

mbwhite (Wed, 14 Oct 2020 08:36:56 GMT):
yes - that would be the first place I'd check.. that you've correctly imported the correct identity

dyhack (Wed, 14 Oct 2020 08:37:16 GMT):

Clipboard - October 14, 2020 4:37 PM

dyhack (Wed, 14 Oct 2020 08:37:30 GMT):
How to generate a new wallet ?

mbwhite (Wed, 14 Oct 2020 08:38:07 GMT):
how are you creating your fabric -network?

dyhack (Wed, 14 Oct 2020 08:38:26 GMT):
I use the test-network base on babric 2.2.1

xxds (Wed, 14 Oct 2020 08:39:05 GMT):
i faced similar problem earlier problem was my old docker volumes were not removed. i pruned old volumes and started from the begining it worked fine

mbwhite (Wed, 14 Oct 2020 08:39:14 GMT):
so check the sample applications in the simple asset transfer.. they are th e apps there show you how to do this.

mbwhite (Wed, 14 Oct 2020 08:39:26 GMT):
and yes it could be something is out of date...

xxds (Wed, 14 Oct 2020 08:40:10 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=vSXXRCTA87kphbNQh) @mbwhite can ou assist me in this

mbwhite (Wed, 14 Oct 2020 08:40:32 GMT):
^ sorry not sure I follow

dyhack (Wed, 14 Oct 2020 08:41:22 GMT):
I just use the fabric gete-way-java

dyhack (Wed, 14 Oct 2020 08:41:52 GMT):
When I first run the demo .It show me the tls problem

dyhack (Wed, 14 Oct 2020 08:42:28 GMT):
I solve this by copy the peers and order certificate into my floder

dyhack (Wed, 14 Oct 2020 08:42:44 GMT):

Clipboard - October 14, 2020 4:42 PM

xxds (Wed, 14 Oct 2020 08:42:53 GMT):
#fabric-ca

mbwhite (Wed, 14 Oct 2020 08:43:55 GMT):
sorry can you explain a bit more context

mbwhite (Wed, 14 Oct 2020 08:47:10 GMT):
mm not sure exactly what the configuration issue is here...

mbwhite (Wed, 14 Oct 2020 08:47:26 GMT):
You shouldn't really need to be copying those files around.

dyhack (Wed, 14 Oct 2020 08:48:19 GMT):
If I do not copy it ,the tls problem?

dyhack (Wed, 14 Oct 2020 08:48:33 GMT):

Clipboard - October 14, 2020 4:48 PM

dyhack (Wed, 14 Oct 2020 08:48:36 GMT):

Clipboard - October 14, 2020 4:48 PM

mbwhite (Wed, 14 Oct 2020 08:49:12 GMT):
this the test-network from fabric -samples

mbwhite (Wed, 14 Oct 2020 08:49:20 GMT):
master branch

dyhack (Wed, 14 Oct 2020 08:49:31 GMT):
yes:woo:

dyhack (Wed, 14 Oct 2020 08:50:27 GMT):
I just want use sdk,connect with the blockchain and run chaincode on it

dyhack (Wed, 14 Oct 2020 08:52:12 GMT):
the java-sdk not detail usage,not like the node sdk

dyhack (Wed, 14 Oct 2020 09:14:31 GMT):
@mbwhite how i do?please..

dyhack (Thu, 15 Oct 2020 07:31:37 GMT):
thanks,I have solve this problem,And can call the chainchode

pkirkinezis (Thu, 15 Oct 2020 13:11:05 GMT):
Hi to the community . Is there a way to change the secret (used in registration ) of a registered user in hyperledger fabric via SDK?

pkirkinezis (Thu, 15 Oct 2020 13:11:39 GMT):
A similar functionality like change password on a regular application

pkirkinezis (Fri, 16 Oct 2020 09:03:52 GMT):
I can guess there is no way to change password then ? I 've searched to the java sdk code to find something without a luck

bestbeforetoday (Fri, 16 Oct 2020 09:34:03 GMT):
It's important to understand that this is not a password in the conventional sense -- as in a user ID / password used as your credentials. The enrollment secret is a (one-time) secret that grants you the ability to enroll an identity with the certificate authority. So it allows you to get the CA to issue a signed certificate corresponding to your private key. Your private key is your "password" in the user ID / password sense

pkirkinezis (Mon, 19 Oct 2020 08:18:32 GMT):
So is there a good practice to change secret? For my application secret is the same as user password .

pkirkinezis (Mon, 19 Oct 2020 08:19:59 GMT):
I understood what you are describing . But I don't save anywhere the secret phrase only the user password so i if a user change his password i will have to change the secret also ./

pkirkinezis (Mon, 19 Oct 2020 08:21:01 GMT):
I found a solution in the weekend with HFCAIdentity has a function update . So i set HFCAIdentity and then set a new secret and run update function.

dyhack (Tue, 20 Oct 2020 00:55:05 GMT):
How to solve this problem

dyhack (Tue, 20 Oct 2020 00:55:08 GMT):

Clipboard - October 20, 2020 8:55 AM

bestbeforetoday (Tue, 20 Oct 2020 09:01:32 GMT):
It sounds like what you are doing is, every time a user connects, generate a new private key for that user and get a new signed certificate for that key from the CA. This sounds kinda wasteful, and means that if somebody steals that enrollment secret they can generate their own private keys and have them signed by the CA as being valid credentials for the user

pkirkinezis (Tue, 20 Oct 2020 09:03:06 GMT):
Νο . Not at all . I am generating once keys priv and pem adn save them in database . Also o keep the secret on database to .

pkirkinezis (Tue, 20 Oct 2020 09:03:51 GMT):
Then when the user changes password on the app I call my blockchain api and change only the secret from blockchain and database

bestbeforetoday (Tue, 20 Oct 2020 09:04:14 GMT):
Ah, OK. So you are not calling enroll() again. In which case, why do you need to change the enrollment secret?

pkirkinezis (Tue, 20 Oct 2020 09:04:45 GMT):
because i want for convinient the enrollment secret to be the same as the password the user has in the application

bestbeforetoday (Tue, 20 Oct 2020 09:05:10 GMT):
If you are never going to use the enrollment secret, why does it matter if they are the same?

pkirkinezis (Tue, 20 Oct 2020 09:07:40 GMT):
Yeah I was very so and so for this solution . Because everything is encrypted and then decrepted I can keep the secret once the first time user is registered/enrolled and kleep it the same as long as possible

pkirkinezis (Tue, 20 Oct 2020 09:08:38 GMT):
And use it only when the priv_sk and pem are invalidated or something to enroll the user again.

pkirkinezis (Tue, 20 Oct 2020 09:08:38 GMT):
And use it when the priv_sk and pem are invalidated or something to enroll the user again.

jtonline (Tue, 20 Oct 2020 15:54:46 GMT):
What instructions are you following? As far as I know the test-network default chaincode has changed in the latest fabric-samples and the init ledger transaction looks slightly different in the docs... https://hyperledger-fabric.readthedocs.io/en/release-2.2/test_network.html

dcof (Wed, 21 Oct 2020 09:16:01 GMT):
Has joined the channel.

dyhack (Thu, 22 Oct 2020 01:41:07 GMT):
通用领域 生物医药 我解决了这个问题,应该是gradle打包的时候设置的maincalss 的问题,导致链码容器里面的程序没有正常运行起来。实际上docker container已经创建了,但是启动失败 I have solved this problem. It should be the maincalss problem set when gradle was packaged, which caused the program in the chain code container not to run normally. Actually, the docker container has been created, but the startup failed

dyhack (Thu, 22 Oct 2020 01:41:18 GMT):
I have solved this problem. It should be the maincalss problem set when gradle was packaged, which caused the program in the chain code container not to run normally. Actually, the docker container has been created, but the startup failed

dcof (Fri, 23 Oct 2020 12:28:31 GMT):
hi, I'm trying to use the java sdk to update the channel configuration and introduce the initial anchor peer configuration. I tried this in a way to load the generated anchros.tx and create a UpdateChannelConfiguration object and then call `channel.updateChannelConfiguration()` method and pass the respective parameters. However, I get a 400 bad request error. On the orderer log I found this error: "error authorizing update: proto: field "common.ConfigUpdate.channel_id" contains invalid UTF-8". When I use the file via the cli like in most tutorials, everything works fine. Is this, in general, an okay-way to do it or how would I introduce the anchor peers via the SDK? Did anyone encounter a similar error before?

rrishmawi (Sat, 24 Oct 2020 07:03:03 GMT):
Hey Experts, I am conducting a research about Chaincode vulnerabilities, and I am in need for a real world open source Chaincodes written in GoLang? Do you know of any, I looked up Github and most of the repositories so far only examples or tutorials. I appreciate your help.

andrew-coleman (Mon, 26 Oct 2020 11:12:55 GMT):
Is there a particular reason you want to do this via the SDK? For admin tasks such as this, you can script it using the command line

dcof (Mon, 26 Oct 2020 12:34:54 GMT):
we're evaluating a more flexible approach in channel creation coupled with our actual application and therefore we're trying the SDK functionality. In the meantime i found a workaround which let's me register peers per organisaztion as anchor peers via the sdk. however, the usage of the created anchors.tx file does not work yet

ericmvaughn (Mon, 26 Oct 2020 16:28:49 GMT):
Has left the channel.

tn_220 (Tue, 27 Oct 2020 01:54:18 GMT):
Has joined the channel.

troyronda (Wed, 28 Oct 2020 17:44:41 GMT):
Has left the channel.

jashi 4 (Sun, 01 Nov 2020 11:26:22 GMT):
Has joined the channel.

jashi 4 (Sun, 01 Nov 2020 11:26:23 GMT):
How can I resolve following error when creating channel using fabric-java-sdk using mychannel.tx file org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel, send transaction failed on orderer OrdererClient{id: 8, channel: mychannel, name: orderer, url: grpcs://localhost:7050}. Reason: Channel mychannel orderer orderer status returned failure code 400 (BAD_REQUEST) during orderer next at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:240) ~[fabric-sdk-java-2.2.2.jar:na] at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:164) ~[fabric-sdk-java-2.2.2.jar:na] at org.hyperledger.fabric.sdk.Channel.sendUpdateChannel(Channel.java:538) ~[fabric-sdk-java-2.2.2.jar:na] at org.hyperledger.fabric.sdk.Channel.(Channel.java:249) ~[fabric-sdk-java-2.2.2.jar:na] at org.hyperledger.fabric.sdk.Channel.createNewInstance(Channel.java:342) ~[fabric-sdk-java-2.2.2.jar:na] at org.hyperledger.fabric.sdk.HFClient.newChannel(HFClient.java:297) ~[fabric-sdk-java-2.2.2.jar:na] And in orderer container following logs: Orderer.common.broadcast] ProcessMessage -> WARN 035 [channel: mychannel] Rejecting broadcast of config message from 172.18.0.1:59372 because of error: error validating channel creation transaction for new channel 'mychannel', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied

Nick (Mon, 02 Nov 2020 02:01:52 GMT):
Hi Team, after discovery of orderer nodes, which node will Java SDK connect to submit transaction?The options I could imagine is 1. Leader orderer node 2. The first one returned in orderer nodes list returned by discovery 3. randomly select one.

husnain (Tue, 03 Nov 2020 11:45:16 GMT):
Has joined the channel.

bestbeforetoday (Tue, 03 Nov 2020 14:08:10 GMT):
It sounds like the config update is not being sent using an ID with the required privileges, i.e. an admin identity

bestbeforetoday (Tue, 03 Nov 2020 14:12:25 GMT):
There SDK doesn't guarantee any particular behaviour but the current implementation will pick a random orderer for each transaction invocation, and then will fail-over to other (randomly selected) orderers if one is unavailable

conanoc (Tue, 10 Nov 2020 09:43:28 GMT):
Has joined the channel.

conanoc (Tue, 10 Nov 2020 11:03:57 GMT):
Is it possible to install chaincode in CDS format using fabric-java-sdk v1.4 ? I'm not sure which API should I use to set cds file in InstallProposalRequest: https://javadoc.io/static/org.hyperledger.fabric-sdk-java/fabric-sdk-java/1.4.13/org/hyperledger/fabric/sdk/InstallProposalRequest.html

nkl199 (Tue, 10 Nov 2020 11:44:24 GMT):
You can send a `ChaincodePackageInstallRequest` ``` const pkgBuffer: Buffer = await fs.readFile(pathToPackage); const installRequest: Client.ChaincodePackageInstallRequest = { targets: [peer], chaincodePackage: pkgBuffer, txId: this.client.newTransactionID() }; ```

gravity (Tue, 10 Nov 2020 11:49:44 GMT):
Hello everyone. Is it still ok to use just Java SDK for application development or is it better to move to Gateway ASAP? We have an application that run on the top Fabric 1.4.8 with Java SDK (1.4.8 )

nkl199 (Tue, 10 Nov 2020 13:22:32 GMT):
the recommendation is to move to the gateway

conanoc (Wed, 11 Nov 2020 02:05:21 GMT):
You seem to use fabric-node-sdk. I'm looking for a solution with java-sdk.

heschaun (Thu, 12 Nov 2020 10:00:51 GMT):
Has joined the channel.

pkirkinezis (Thu, 12 Nov 2020 15:30:12 GMT):
Hey to the communit when gateway reply "Transaction commit was rejected by peer" what that means ? Where I have to start debugging on chaincode level or network level?

bestbeforetoday (Thu, 12 Nov 2020 16:12:19 GMT):
Just as background, what has happened is that: 1. The transaction proposal has obtained endorsement(s) 2. The endorsed transaction submitted to the orderer 3. Orderer has committed the transaction to a block and distributed to peers 4. Peer has failed to validate the transaction so it has not updated the ledger 5. Client has received the block event containing the transaction, noticed that it is marked invalid, and thrown an exception back to your application

bestbeforetoday (Thu, 12 Nov 2020 16:14:45 GMT):
The reason for the commit failure might be an MVCC failure, where the ledger state touched by the transaction is different to the state when endorsement occurred. So two or more concurrent transactions accessed and/or modified the same ledger keys

bestbeforetoday (Thu, 12 Nov 2020 16:15:23 GMT):
It might be that it didn't meet the endorsement requirements for the operation performed

bestbeforetoday (Thu, 12 Nov 2020 16:15:47 GMT):
The place to look is the peer logs to get more details on the cause

bestbeforetoday (Thu, 12 Nov 2020 16:17:11 GMT):
At the client end, the ContractException thrown should have all the proposal responses attached to the exception, which might help in diagnosing the problem, particularly once the cause is clear from the peer logs

pkirkinezis (Thu, 12 Nov 2020 16:18:25 GMT):
my peers are on multiple different serversbut on my network config i have only the peers of the node i enrolled

bestbeforetoday (Thu, 12 Nov 2020 16:21:08 GMT):
If you are using discovery, the client will discover (at runtime) all of the network nodes, even if they are not in your connection profile

pkirkinezis (Thu, 12 Nov 2020 16:22:31 GMT):
how i can check that?

bestbeforetoday (Thu, 12 Nov 2020 16:23:11 GMT):
If you are not using discovery and your configuration profile doesn't contain enough peers (or peers from enough different organizations) to meet endorsement requirements, that might result in submitted transactions failing to successfully commit

bestbeforetoday (Thu, 12 Nov 2020 16:24:12 GMT):
You need to find the reason for the failure in the peer logs to know how to resolve the issue. All the network peers receive the same committed blocks so you should be able to look in the logs of any network peer

pkirkinezis (Thu, 12 Nov 2020 16:24:27 GMT):
is discovery mode set to channel config ?

xingyuan426 (Fri, 13 Nov 2020 01:54:31 GMT):
Has joined the channel.

lupass93 (Wed, 18 Nov 2020 17:00:37 GMT):
Hi All! How Java sdk Client can get the payload of an Exception that is generated from Chaincode via ChaincodeException? The Chaincode throw a ChaincodeException with a String Message and String payload. I can get Message of the ChaincodeException from Client sdk java but I miss how I can get the payload Exception for do operations relied upon the payload Thanks very much

bestbeforetoday (Thu, 19 Nov 2020 12:06:41 GMT):
Using _fabric-gateway-java_ the `ContractException` thrown should have all the proposal response objects attached: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/ContractException.html#getProposalResponses()

bestbeforetoday (Thu, 19 Nov 2020 12:11:37 GMT):
You should be able to pick the payload bytes from them, something along the lines of: ``` byte[] payload = e..getProposalResponses().stream() .map(ProposalResponse::getProposalResponse) .map(FabricProposalResponse.ProposalResponse::getPayload) .filter(Objects::nonNull) .findFirst() .map(ByteString::toByteArray) .orElse(null); ```

bestbeforetoday (Thu, 19 Nov 2020 12:11:37 GMT):
You should be able to pick the payload bytes from them, something along the lines of: ``` byte[] payload = e.getProposalResponses().stream() .map(ProposalResponse::getProposalResponse) .map(FabricProposalResponse.ProposalResponse::getPayload) .filter(Objects::nonNull) .findFirst() .map(ByteString::toByteArray) .orElse(null); ```

lupass93 (Thu, 19 Nov 2020 12:41:34 GMT):
I tried this way, but unfortunately the payload is empty, although in the Chaincode it actually passes to the Constructor of ChaincodeException both the String Message and the String payload.

lupass93 (Thu, 19 Nov 2020 12:42:54 GMT):
As if the payload did not reach Contractexception

bestbeforetoday (Fri, 20 Nov 2020 10:38:09 GMT):
I could easily be missing something but, having a quick look at the Java chaincode implementation, I don't think the payload from the ChaincodeException is being included in the proposal response. It might be worth raising a bug report in Jira: https://jira.hyperledger.org/projects/FABCJ

zilich (Sun, 22 Nov 2020 10:46:30 GMT):
Has joined the channel.

sidoussou (Mon, 23 Nov 2020 23:27:00 GMT):
Has joined the channel.

Darren-Matthews (Wed, 25 Nov 2020 20:51:19 GMT):
Has joined the channel.

sj1 4 (Thu, 26 Nov 2020 00:45:22 GMT):
Has joined the channel.

ps.agboola.ayodeji (Thu, 26 Nov 2020 18:42:55 GMT):
Has joined the channel.

vijay5378 (Mon, 30 Nov 2020 13:10:47 GMT):
HI all, Is fabric-java-sdk compatible with the new features available in 2.3.0?(Specifically removing the need for a system channel)?

yacovm (Mon, 30 Nov 2020 15:16:02 GMT):
It's a REST API... you don't need SDK to support it

vijay5378 (Mon, 30 Nov 2020 15:41:10 GMT):
When you try HFClient.newChannel(), you get an error : "channel001 expected config block type CONFIG_UPDATE, but got: MESSAGE". The same code executes normally when there was a system channel and a channel configtx was created using -outputCreateChannelTx.

pkirkinezis (Tue, 01 Dec 2020 06:50:10 GMT):
Hi to the community i would like to ask a question . On my API implementation i have a /logout that also runs gateway.close() . The function gateway.close() takes around 3-5 seconds to run and makes my logout functionality slow.

pkirkinezis (Tue, 01 Dec 2020 06:50:24 GMT):
Any suugestions?

bestbeforetoday (Tue, 01 Dec 2020 09:23:19 GMT):
I suspect the time is being spent closing down the lower-level SDK Channel(s) underpinning the Gateway implementation: https://github.com/hyperledger/fabric-sdk-java/blob/ee596ea3786958a30852eda1987511080d49b2b8/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L6257

bestbeforetoday (Tue, 01 Dec 2020 09:24:28 GMT):
The Gateway calls this shutdown with the `force` argument as `false`. It might be we could speed things up by changing it to a force shutdown but I'm not sure if this is preferable to letting things shutdown gracefully

bestbeforetoday (Tue, 01 Dec 2020 09:26:08 GMT):
I guess ideally it would be good to pin exactly what piece within that channel shutdown is causing the delay and see if that can be changed to make it faster

bestbeforetoday (Tue, 01 Dec 2020 09:27:58 GMT):
Perhaps as a workaround from your application level you could use an `ExecutorService` to run the `gateway.close()` on a separate thread and complete your shutdown as soon as the close has been scheduled to run rather than waiting for it to complete

bestbeforetoday (Tue, 01 Dec 2020 09:29:55 GMT):
Feel free to raise an issue in Jira to record this issue though: https://jira.hyperledger.org/projects/FGJ

sijo.c (Thu, 03 Dec 2020 22:11:29 GMT):
Has joined the channel.

sijo.c (Thu, 03 Dec 2020 22:11:30 GMT):
In fabric2.2 network with 1 org with 3 peers, default endorsement policy, seeing this intermittently in java sdk. After a while new client calls succeeds. ```message = 400 BAD_REQUEST "Commit strategy failed"; nested exception is org.hyperledger.fabric.gateway.ContractException: Commit strategy failed, context = Commit strategy failed, cause = {} org.hyperledger.fabric.gateway.ContractException: Commit strategy failed at org.hyperledger.fabric.gateway.impl.CommitHandlerImpl.processStrategyResult(CommitHandlerImpl.java:121) at org.hyperledger.fabric.gateway.impl.CommitHandlerImpl.onDisconnectEvent(CommitHandlerImpl.java:114)```

sijo.c (Thu, 03 Dec 2020 22:13:11 GMT):
Pointers appreciated.No error seen in Peer logs. just no commit logs seen in this case.

sijo.c (Thu, 03 Dec 2020 22:13:27 GMT):
Can this happen due to unstable network etc, or can this be an app issue resulting in write conflict?

bestbeforetoday (Fri, 04 Dec 2020 10:25:19 GMT):
If the transaction fails to commit (i.e. the client receives a block event containing the transaction and it is marked as unsuccessful) then I would expect to get an exception reading something like: > Transaction commit was rejected by peer peer1.example.org

bestbeforetoday (Fri, 04 Dec 2020 10:27:17 GMT):
I suspect that the gRPC event stream to all of the peers has failed and so the client has given up trying to observe the commit

bestbeforetoday (Fri, 04 Dec 2020 10:27:38 GMT):
So definitely this could be caused by an unstable network

bestbeforetoday (Fri, 04 Dec 2020 10:28:21 GMT):
The transaction may have in fact committed fine. The client just doesn't know because it failed to observe either a commit success or failure

danilofaria7 (Fri, 04 Dec 2020 12:36:28 GMT):
Has joined the channel.

danilofaria7 (Fri, 04 Dec 2020 12:36:28 GMT):
hello folks. simple question: when using a BlockListener, how can I check that a transaction is an init transaction (invoked with --isInit)? I cant seem to find anything like that in BlockInfo.TransactionEnvelopeInfo.TransactionActionInfo

sijo.c (Fri, 04 Dec 2020 15:41:07 GMT):
thanks!

danilofaria7 (Fri, 04 Dec 2020 19:46:43 GMT):
As I could not find such feature, I made a PR. Please do consider it: https://github.com/hyperledger/fabric-sdk-java/pull/106

fanjianhang (Mon, 07 Dec 2020 03:35:33 GMT):
hi all, i use fabric-gateway-java in my project to send transactions to fabric2.2.0 network, but i sometimes got the error especiailly when i invoke chaincode in the first time, the errors are `org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel, send transaction failed on orderer OrdererClient{id: 139, channel: mychannel, name: orderer1.org1.example.com, url: grpcs://localhost:8050}. Reason: Channel mychanne l orderer orderer1.org1.example.com status returned failure code 503 (SERVICE_UNAVAILABLE) during orderer next` or `java.util.concurrent.TimeoutException: Timeout waiting for commit of transaction`, in addition, it invoke successfully when i try next time, could somebody help me, thanks a lot.

james-wallis (Mon, 07 Dec 2020 10:44:37 GMT):
Has joined the channel.

andrew-coleman (Mon, 07 Dec 2020 11:33:54 GMT):
It might be that the chaincode is still instantiating and is not ready for use the first time you try and invoke it. In the scenario tests, we put a sleep in between the chaincode deploy and the first invocation

fanjianhang (Wed, 09 Dec 2020 03:43:15 GMT):
[ ](https://chat.hyperledger.org/channel/fabric-sdk-java?msg=Cv6wRzWkQzauBn8Qc) Thanks, my chaincode has ran for a while, it usually made the error when use gateway to connect to the network in the first time, i am so confused.

SamYuan1990 (Wed, 09 Dec 2020 13:14:08 GMT):
hi for fabric-java-sdk, I noticed that there is a property called org.hyperledger.fabric.sdk.security.HLSDKJCryptoSuiteFactory, which means if I want to switch this Factory to my own impl, I just make a jar package with my impl and change this org.hyperledger.fabric.sdk.security.HLSDKJCryptoSuiteFactory to my own class name?

SamYuan1990 (Wed, 09 Dec 2020 13:28:29 GMT):
and also, I am able to use org.hyperledger.fabric.sdk.security_curve_mapping to switch the curve used?

SamYuan1990 (Wed, 09 Dec 2020 14:00:07 GMT):
but it is confusing me as in config.java it says ... * Crypto configuration settings -- settings should not be changed. ??

SamYuan1990 (Wed, 09 Dec 2020 15:22:01 GMT):
can any one help with my questions above? As may I modify security related config items in config.properties file to change settings such as using other curve for encrypt and decrypt works?

bestbeforetoday (Wed, 09 Dec 2020 18:22:03 GMT):
@SamYuan1990 all the signing should be done by the `CryptoSuite` implementation set on the `HFClient` using `setCryptoSuite()`. So I guess you should be able to just construct your own implementation of the `CryptoSuite` interface that does signing by whatever method you choose when its `sign()` method is called with the user context's private key and message bytes to sign

bestbeforetoday (Wed, 09 Dec 2020 18:30:41 GMT):
As we're developing the multi-language _fabric-gateway_ API, I'm trying to make this easier by just having the client application explicitly pass in a signing implementation function, with default signing implementations provided for standard methods such as P-256 with EC private key: https://github.com/hyperledger/fabric-gateway/blob/c4f708d09c7525ca689fc7116119de134c60cca8/java/src/main/java/org/hyperledger/fabric/client/Gateway.java#L103

SamYuan1990 (Thu, 10 Dec 2020 12:11:07 GMT):
ok, thanks.

AnandBanik (Sun, 20 Dec 2020 14:58:41 GMT):
Has joined the channel.

alacambra (Wed, 23 Dec 2020 22:09:38 GMT):
Has joined the channel.

dyhack (Sun, 03 Jan 2021 11:11:09 GMT):
How to solve this problem ?

dyhack (Sun, 03 Jan 2021 11:11:11 GMT):

Clipboard - January 3, 2021 7:11 PM

pkirkinezis (Mon, 04 Jan 2021 09:15:29 GMT):
Hi to the community

pkirkinezis (Mon, 04 Jan 2021 09:19:52 GMT):
I am having touble with java gateway . I am running my java project as a docker container . I am geeting a very high memeory /swap usage if a gateway connection is opened for a long time (aprox 1 week) without closing the connection. Is it realted to gateway connection my problem ?

pkirkinezis (Mon, 04 Jan 2021 09:20:19 GMT):
I normal situations where i press logout and i close the gateway connection i not having this issue?

pkirkinezis (Mon, 04 Jan 2021 09:20:19 GMT):
I normal situations where i press logout and i close the gateway connection i not having this issue

bestbeforetoday (Tue, 05 Jan 2021 11:33:18 GMT):
It might be worth asking in the #fabric-java-chaincode channel as this looks to be an error in the chaincode / smart contract

bestbeforetoday (Tue, 05 Jan 2021 11:42:21 GMT):
If you have any profiling information that shows which objects are consuming the increased heap space, it would be helpful to raise a bug report with that information in Jira: https://jira.hyperledger.org/projects/FGJ

pkirkinezis (Thu, 07 Jan 2021 14:42:59 GMT):
Yeah i am not 100% confidend that this is not caused by me not hadling the java sdk the right way .

bestbeforetoday (Thu, 07 Jan 2021 20:32:46 GMT):
You could try triggering some JVM heap dumps as the heap size is growing and use a heap analyzer on the output. These long-running issues are not so easy to investigate though :(

pkirkinezis (Fri, 08 Jan 2021 06:40:17 GMT):
Yeah I will try your suggestion . I am aware of the problem . I am not very familiar with heap analyzers .

pkirkinezis (Fri, 08 Jan 2021 06:40:28 GMT):
Thanks for your valauble help .

bdierberger (Fri, 08 Jan 2021 12:15:57 GMT):
Has joined the channel.

Sandyzhanghs (Sun, 10 Jan 2021 04:58:34 GMT):
Has joined the channel.

Kestutis_Gudynas (Tue, 12 Jan 2021 10:25:27 GMT):
Has joined the channel.

WilsonHUANGWS (Wed, 13 Jan 2021 09:51:30 GMT):
Has joined the channel.

deployer21 (Sat, 16 Jan 2021 21:02:51 GMT):
Hello, I am a little bit confused on how to store data in the ledger. Basically, I read the fabric-sdk-java documentation, and the sample they were using was something like this: ... try (Gateway gateway = builder.connect()) { Network network = gateway.getNetwork("mychannel"); Contract contract = network.getContract("fabcar"); ... However, the theory says that, first, a proposal must be validated by the committing peers, and then, it should be submitted to the orderer node. Something like this: ... Collection transactionPropResp = channel.sendTransactionProposalToEndorsers(transactionProposalRequest); Collection transactionPropResp = channel.sendTransactionProposal(transactionProposalRequest, channel.getPeers()); ... I would like someone to tell what's the difference, because I am trying to figure it out why I am getting a consistency responses problem. Sorry If this is a newbie question, thanks in advance

gravity (Sun, 17 Jan 2021 17:36:19 GMT):
Hello everyone I quite do not understand the concept behind Wallet. Is it very convenient to store a Wallet with identities on a filesystem and issue file reads every time a user issues a transaction? First of all, it can be slow. Second, it requires additional efforts where and how to store Wallet file. Or am I getting it wrong? Thanks in advance.

cmhacker (Mon, 18 Jan 2021 10:08:25 GMT):
Has joined the channel.

cmhacker (Mon, 18 Jan 2021 10:09:20 GMT):
Hello everyone, How I can use fabric2.x chaincode life cycle API in JAVA ??

mayktu (Mon, 18 Jan 2021 22:14:52 GMT):
Has joined the channel.

action-sj (Tue, 19 Jan 2021 06:09:29 GMT):
Has joined the channel.

bestbeforetoday (Tue, 19 Jan 2021 11:21:32 GMT):
The filesystem is not read every time you submit a transaction. The identity is read from the wallet at the point you connect the Gateway. You should not be throwing away your Gateway and re-connecting on every transaction. This will be a much bigger performance impact that reading a small (likely cached) file from the filesystem as it will discard and re-establish gRPC network connections on every transaction

bestbeforetoday (Tue, 19 Jan 2021 11:23:27 GMT):
You've also got the option of reading the wallet identity into memory as an Identity object and connecting Gateway using only that in-memory object: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#identity(org.hyperledger.fabric.gateway.Identity)

bestbeforetoday (Tue, 19 Jan 2021 11:24:59 GMT):
Or if it's easier to manage a collection of in-memory Identity objects then you can stick them into an in-memory wallet for the lifetime of your application: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Wallets.html#newInMemoryWallet()

bestbeforetoday (Tue, 19 Jan 2021 11:28:15 GMT):
A singe call to `contract.submitTransaction("txName", "arg1", "arg2")` will do the following: 1. Send a proposal to peers for endorsement 2. Submit a transaction (including endorsments) to the orderer 3. Wait for transaction events from peers to confirm the transaction committed successfully

bestbeforetoday (Tue, 19 Jan 2021 11:37:19 GMT):
The _fabric-sdk-java_ API has some Lifecycle-related functions on `HFClient` and `Channel`: - https://javadoc.io/doc/org.hyperledger.fabric-sdk-java/fabric-sdk-java/latest/org/hyperledger/fabric/sdk/HFClient.html - https://javadoc.io/doc/org.hyperledger.fabric-sdk-java/fabric-sdk-java/latest/org/hyperledger/fabric/sdk/Channel.html

bestbeforetoday (Tue, 19 Jan 2021 11:38:05 GMT):
However, I'm not certain they are really up-to-date with the current Lifecycle deployment implementation so I'm not sure I would recommend relying on them

bestbeforetoday (Tue, 19 Jan 2021 11:39:12 GMT):
The `peer chaincode lifecycle` CLI commands are better maintained and supported so, if you can make use of them, I would recommend that instead: https://hyperledger-fabric.readthedocs.io/en/release-2.2/commands/peerlifecycle.html

skulos (Tue, 26 Jan 2021 11:56:11 GMT):
Has joined the channel.

sj1 4 (Wed, 27 Jan 2021 16:51:56 GMT):
Hi. Do you know how to apply CouchDB to your Spring Data structure?

dyhack (Fri, 29 Jan 2021 13:48:24 GMT):
Hello,Does Java chain code not support operations like new date()?

deployer21 (Fri, 29 Jan 2021 15:20:00 GMT):
So that seems to be a complete proposal interaction process that does everything by itself.. but is it recommended? Where can I learn more about these? Thank you for your help

bestbeforetoday (Fri, 29 Jan 2021 16:12:00 GMT):
https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/application.html

bestbeforetoday (Fri, 29 Jan 2021 16:12:29 GMT):
https://hyperledger.github.io/fabric-gateway-java/

nike (Mon, 01 Feb 2021 07:16:53 GMT):
Has joined the channel.

nike (Mon, 01 Feb 2021 07:16:54 GMT):
hello.does anyone know how to set DISCOVERY_AS_LOCALHOST in Fabric -Gateway -Java?Gateway always resolvers the peer/orderer address to localhost. I set the environment variable, but it doesn't work. Fabric and Gateway versions are 2.2.0.

cmhacker (Mon, 01 Feb 2021 09:00:35 GMT):
static { System.setProperty("org.hyperledger.fabric.sdk.service_discovery.as_localhost", "false"); }

nike (Mon, 01 Feb 2021 09:03:53 GMT):
Thank you so much. It worked!:woo:

nike (Mon, 01 Feb 2021 10:01:55 GMT):
Hi, bigwig!Have you ever encountered this kind of problem?The CLI call is normal. The gateway call to chaincode prompts not install.My Fabric network has 3 organizations, and each organization has 2 peers, one of which has ChainCode installed.

danilofaria7 (Mon, 01 Feb 2021 17:22:28 GMT):
probably because your chaincode should be deterministic

fanjianhang (Tue, 02 Feb 2021 03:19:25 GMT):
hi all, i use fabric-gateway-java 2.2.0 to connect 2.2.0 fabric network, but i got the error `Caused by: io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug! at io.grpc.Status.asRuntimeException(Status.java:534) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533) at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:464) at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:428) at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:461) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:553) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:68) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:739) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:718) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.(ZIIIIIIZ)V at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:172) at io.grpc.netty.Utils.access$000(Utils.java:71) at io.grpc.netty.Utils$ByteBufAllocatorPreferDirectHolder.(Utils.java:93) at io.grpc.netty.Utils.getByteBufAllocator(Utils.java:140) at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:245) at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33) at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33) at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:258) at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65) at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:200) at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95) at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127) at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1790) at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:333) ... 3 common frames omitted`, i am so confused, could somebody helps me? Thanks a lot.

fanjianhang (Tue, 02 Feb 2021 03:20:58 GMT):
hi all, i use fabric-gateway-java 2.2.0 to connect 2.2.0 fabric network, but i got the error: ``` Caused by: io.grpc.StatusRuntimeException: INTERNAL: Panic! This is a bug! at io.grpc.Status.asRuntimeException(Status.java:534) at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533) at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:464) at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:428) at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:461) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:553) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:68) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:739) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:718) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.(ZIIIIIIZ)V at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:172) at io.grpc.netty.Utils.access$000(Utils.java:71) at io.grpc.netty.Utils$ByteBufAllocatorPreferDirectHolder.(Utils.java:93) at io.grpc.netty.Utils.getByteBufAllocator(Utils.java:140) at io.grpc.netty.NettyClientTransport.start(NettyClientTransport.java:245) at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33) at io.grpc.internal.ForwardingConnectionClientTransport.start(ForwardingConnectionClientTransport.java:33) at io.grpc.internal.InternalSubchannel.startNewTransport(InternalSubchannel.java:258) at io.grpc.internal.InternalSubchannel.access$400(InternalSubchannel.java:65) at io.grpc.internal.InternalSubchannel$2.run(InternalSubchannel.java:200) at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:95) at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:127) at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(ManagedChannelImpl.java:1790) at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:333) ... 3 common frames omitted ``` i am so confused, could somebody helps me? Thanks a lot.

bestbeforetoday (Tue, 02 Feb 2021 18:42:23 GMT):
Does the problem still occur with _fabric-gateway-java_ version 2.2.1?

gravity (Tue, 02 Feb 2021 18:53:59 GMT):
does anybody know how to configure java sdk (not gateway) to work via mutual TLS?

Javi (Wed, 03 Feb 2021 08:51:55 GMT):
hi all! I see in my client logs a lot of lines with a WARN that says: `Failed to discover peer endpoint information xxxxx for chaincode xxxxx`. But if I send transactions it works without problems, any idea?

Javi (Wed, 03 Feb 2021 08:56:21 GMT):
i'm using version 1.4.4

sijo.c (Wed, 03 Feb 2021 23:06:27 GMT):
question on CCP: does specifying orderer list in ConnectionProfile improve the writes? ( Our write operation call, after long period of inactivity fails with error `org.hyperledger.fabric.gateway.ContractException: Commit strategy failed`)

sijo.c (Wed, 03 Feb 2021 23:08:38 GMT):
Confused from readthe docs: Orderer is documented but default connectionProfile downloaded from IBP does not contain orderer list

sijo.c (Wed, 03 Feb 2021 23:08:43 GMT):
https://hyperledger-fabric.readthedocs.io/en/latest/developapps/connectionprofile.html#sample

sijo.c (Wed, 03 Feb 2021 23:09:20 GMT):
wonder if order is discovered by the client, using service discovery, could that be causing above error

sijo.c (Wed, 03 Feb 2021 23:11:50 GMT):
Full stack ``` ```

sijo.c (Wed, 03 Feb 2021 23:11:50 GMT):
Full stack ``` 109 org.hyperledger.fabric.gateway.ContractException: Commit strategy failed 110 at org.hyperledger.fabric.gateway.impl.commit.CommitHandlerImpl.processStrategyResult(CommitHandlerImpl.java:122) 111 at org.hyperledger.fabric.gateway.impl.commit.CommitHandlerImpl.onDisconnectEvent(CommitHandlerImpl.java:115) 112 at org.hyperledger.fabric.gateway.impl.commit.CommitHandlerImpl.access$100(CommitHandlerImpl.java:26) 113 at org.hyperledger.fabric.gateway.impl.commit.CommitHandlerImpl$1.acceptDisconnect(CommitHandlerImpl.java:38) 114 at org.hyperledger.fabric.gateway.impl.event.CommitListenerSession$$Lambda$1170/0x000000007097aad0.accept(Unknown Source) 115 at org.hyperledger.fabric.gateway.impl.event.PeerDisconnectInterceptor.lambda$notifyListeners$0(PeerDisconnectInterceptor.java:65) 116 at org.hyperledger.fabric.gateway.impl.event.PeerDisconnectInterceptor$$Lambda$1177/0x000000001000bb10.accept(Unknown Source) 117 at org.hyperledger.fabric.gateway.impl.event.ListenerSet.lambda$forEach$0(ListenerSet.java:63) 118 at org.hyperledger.fabric.gateway.impl.event.ListenerSet$$Lambda$1160/0x000000001c0066a0.accept(Unknown Source) 119 at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4698) 120 at java.base/java.util.Collections$SetFromMap.forEach(Collections.java:5581) 121 at org.hyperledger.fabric.gateway.impl.event.ListenerSet.forEach(ListenerSet.java:61) 122 at org.hyperledger.fabric.gateway.impl.event.PeerDisconnectInterceptor.notifyListeners(PeerDisconnectInterceptor.java:65) 123 at org.hyperledger.fabric.gateway.impl.event.PeerDisconnectInterceptor.handleDisconnect(PeerDisconnectInterceptor.java:36) 124 at org.hyperledger.fabric.gateway.impl.event.PeerDisconnectInterceptor$$Lambda$1173/0x00000000709832e0.disconnected(Unknown Source) 125 at org.hyperledger.fabric.sdk.Peer.lambda$reconnectPeerEventServiceClient$2(Peer.java:387) 126 at org.hyperledger.fabric.sdk.Peer$$Lambda$1176/0x00000000340154a0.run(Unknown Source) 127 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)```

bestbeforetoday (Thu, 04 Feb 2021 14:15:01 GMT):
This error suggests that the transaction was successfully sent to the orderer for commit but all the peers the client expected to receive events from disconnected before the client received block events including the committed transaction

bestbeforetoday (Thu, 04 Feb 2021 14:16:36 GMT):
One possible cause is that idle connections are being closed very aggressively between the client and peers. If this is the case then changing the default gRPC keep-alive times may help to prevent the event listening connections from being closed

sijo.c (Thu, 04 Feb 2021 14:50:30 GMT):
thanks. Looking the logs more closely

sijo.c (Thu, 04 Feb 2021 14:54:29 GMT):
I see after write, the peer finish cc execute, then orderer logs "Writing block [dd] .." within same time period. But peer don't commit until 15min later. Could it also be caused by peer<>orderer connection. In peer log, every few hours I see this WARN ``` 2021-02-04 12:55:23.229 UTC [peer.blocksprovider] DeliverBlocks -> WARN 15880 Could not connect to ordering service: could not dial endpoint 'ibpsw-dev-hpassorderingservicenode1-orderer.hpdev02alb1801-1-191d58cd794cfca115b4da1d4e99e52b-0000.us-south.containers.appdomain.cloud:443': failed to create new connection: context deadline exceeded channel=hpass-ch 2021-02-04 13:55:26.230 UTC [peer.blocksprovider] DeliverBlocks -> WARN 15a6e Could not connect to ordering service: could not dial endpoint 'ibpsw-dev-hpassorderingservicenode1-orderer.hpdev02alb1801-1-191d58cd794cfca115b4da1d4e99e52b-0000.us-south.containers.appdomain.cloud:443': failed to create new connection: context deadline exceeded channel=hpass-ch ```

sijo.c (Thu, 04 Feb 2021 14:54:29 GMT):
I see after write, the peer finish cc execute, then orderer logs "Writing block [dd] .." within same time period. But peer don't commit until 15min later. Could it also be caused by peer<>orderer connection. In peer log, every few hours I see this WARN ``` 2021-02-04 12:55:23.229 UTC [peer.blocksprovider] DeliverBlocks -> WARN 15880 Could not connect to ordering service: could not dial endpoint 'orderingservicenode1-orderer...:443': failed to create new connection: context deadline exceeded channel=ch 2021-02-04 13:55:26.230 UTC [peer.blocksprovider] DeliverBlocks -> WARN 15a6e Could not connect to ordering service:```

sijo.c (Thu, 04 Feb 2021 15:00:43 GMT):
thank you ! for looking into this @bestbeforetoday . here is the peer log timestamps ``` ESC[34m2021-02-04 14:10:22.113 UTC [comm.grpc.server] 1 -> INFO 15ae6ESC[0m streaming call completed grpc.service=protos.Deliver grpc.method=Deliver grpc.peer_address=172.17.22.67:17049 error="context finished before block retrieved: context canceled" grpc.code=Unknown grpc.call_duration=50.136955329s ESC[34m2021-02-04 14:10:41.685 UTC [endorser] callChaincode -> INFO 15aebESC[0m finished chaincode: cscc duration: 0ms channel= txID=cc7ef9a2 ... ... 2021-02-04 14:27:22.072 UTC [gossip.privdata] StoreBlock -> INFO 15bd8 [ch] Received block [60] from buffer 2021-02-04 14:27:22.074 UTC [committer.txvalidator] Validate -> INFO 15bd9^[[0m [ch] Validated block [60] in 1ms ```

sijo.c (Thu, 04 Feb 2021 15:01:13 GMT):
does this confirm gRPC keep-alive as cause?

sijo.c (Thu, 04 Feb 2021 15:01:13 GMT):
does this confirm gRPC keep-alive may help?

ndr_brt (Mon, 22 Feb 2021 12:50:32 GMT):
Has joined the channel.

bh4rtp (Wed, 24 Feb 2021 07:18:54 GMT):
hi, does java sdk support discovery with collection configuration now?

bestbeforetoday (Wed, 24 Feb 2021 10:02:05 GMT):
Unfortunately not but you can work around this by explicitly specifying the set of peers to use for endorsement using `Transaction.setEndorsingPeers()`: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Transaction.html#setEndorsingPeers(java.util.Collection)

bh4rtp (Wed, 24 Feb 2021 12:23:46 GMT):
Ok, thank you. I am waiting for the implementation:)

deployer21 (Wed, 24 Feb 2021 15:33:53 GMT):
If submitTransaction automatically listens for transaction events how is it possible to receive a "Future Completed Exceptionally" error?

deployer21 (Wed, 24 Feb 2021 18:45:27 GMT):
I've more logs in https://stackoverflow.com/questions/66350698/hyperledger-fabric-java-sdk-future-completed-exceptionally-sendtransaction

pkirkinezis (Thu, 25 Feb 2021 14:11:42 GMT):
I posting also here because i am not sure where this error bellongs 2021-02-25 13:28:45.006 UTC [common.ledger.blockledger.file] Next -> ERRO 94b3f error opening block file /var/hyperledger/production/ledgersData/chains/chains/devchannel/blockfile_000000: open /var/hyperledger/production/ledgersData/chains/chains/devchannel/blockfile_000000: too many open files 2021-02-25 13:28:45.006 UTC [common.deliver] deliverBlocks -> ERRO 94b40 [channel: devchannel] Error reading from channel, cause was: SERVICE_UNAVAILABLE does anyone experienced such an issue?

ndr_brt (Fri, 26 Feb 2021 08:06:28 GMT):
hi to everyone, I can't find a channel for fabric-gateway so I will ask here. there's a way, in fabric gateway, to catch concurrent modification exceptions? the `contract.submitTransaction` method exits with a `ContractException` that does not contains references to the kind of error. I know that this is possible in fabric-sdk-java (catching CompletionException and extracting its cause TransactionEventException that contains the `11` validation code), but would be nice if this could be possible also in fabric-gateway.

bestbeforetoday (Fri, 26 Feb 2021 10:50:43 GMT):
Right now that transaction validation code is getting swallowed by the fabric-gateway code. I agree that would be useful information to pass back to the caller. I guess you've just raised the feature request in Jira? https://jira.hyperledger.org/browse/FGJ-103

bestbeforetoday (Fri, 26 Feb 2021 10:51:00 GMT):
If so, thank you for raising that :thumbsup:

bestbeforetoday (Fri, 26 Feb 2021 11:05:13 GMT):
There is actually a work-around you could employ, which is to implement your own commit handler so you deal with the committed transactions directly and can pull out whatever information you need: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/spi/CommitHandlerFactory.html

bestbeforetoday (Fri, 26 Feb 2021 11:05:25 GMT):
There is sample code linked there that you can just cut & paste

bestbeforetoday (Fri, 26 Feb 2021 11:06:27 GMT):
You register the default handler on the Gateway connect: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#commitHandler(org.hyperledger.fabric.gateway.spi.CommitHandlerFactory)

bestbeforetoday (Fri, 26 Feb 2021 11:06:58 GMT):
Or you can register a specific handler to use per transaction invocation: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Transaction.html#setCommitHandler(org.hyperledger.fabric.gateway.spi.CommitHandlerFactory)

bestbeforetoday (Fri, 26 Feb 2021 11:07:52 GMT):
But again I think having the exception thrown from the submit include this information for you would be nicer

ndr_brt (Fri, 26 Feb 2021 11:10:15 GMT):
Thanks for the reply, I'm creating a pull request for the case. In the meantime I will try with the CommitHandler approach.

bestbeforetoday (Fri, 26 Feb 2021 11:23:19 GMT):
If you want to make the code change, that's great. It might be worth defining a `CommitException` as a subclass of the `ContractException`, and which includes the `BlockEvent.TransactionEvent`. Calling code can pull the transaction status and any other information they might want from that event object

bestbeforetoday (Fri, 26 Feb 2021 11:23:55 GMT):
I think the only code you'll need to change is in `CommitHandlerImpl.onTxEvent()`

bestbeforetoday (Fri, 26 Feb 2021 11:27:51 GMT):
I would also declare the exception explicitly on `Contract.submitTransaction()` and `Transaction.submit()` along with accompanying Javadoc

bestbeforetoday (Fri, 26 Feb 2021 11:28:39 GMT):
If you're working on it, assign the Jira to yourself and move it into working state

deployer21 (Fri, 26 Feb 2021 18:47:39 GMT):
just updated it*

pkirkinezis (Mon, 08 Mar 2021 15:47:42 GMT):
getConfigBlock failure panic error . Did anyone have ever seen this error before ?

pkirkinezis (Mon, 08 Mar 2021 17:51:24 GMT):
the error alos says "uncaught synchronization gateway"

bestbeforetoday (Tue, 09 Mar 2021 11:55:34 GMT):
Is there any context to stack trace around that? It doesn't ring any bells as a client-side error, so is that something you're seeing from the peer end? If so, one of the other channels might get more visibility from core Fabric contributors and maintainers

pkirkinezis (Tue, 09 Mar 2021 11:59:19 GMT):

Clipboard - March 9, 2021 1:59 PM

pkirkinezis (Tue, 09 Mar 2021 11:59:52 GMT):
I get an infinity loop when ` Network network = gateway.getNetwork(channelName);` is about to run

pkirkinezis (Tue, 09 Mar 2021 12:00:23 GMT):
The error can be seen in the above screen shot . GRPC gets in panic mode

bestbeforetoday (Tue, 09 Mar 2021 12:07:08 GMT):
That NoClassDefFoundError looks bad. I wonder if some versions of gRPC / Netty packages are out of step. It might be worth clearing out your local Maven repository cache and trying again. Also check if any of your code has direct (or indirect) dependencies on those Netty packages. `mvn dependency:list` and `mvn dependency:tree` might help. If you can't get to the bottom of it and it's easily reproducible then you could raise a bug report in Jira with all the dependency and version information (including the SDK version): https://jira.hyperledger.org/browse/FGJ

pkirkinezis (Tue, 09 Mar 2021 12:35:11 GMT):
Would , by any chance , be a network-config.yaml problem ?

pkirkinezis (Tue, 09 Mar 2021 12:36:58 GMT):
Because i have servers . One server has the 3 oerderer / 1 node . The other 5 has 1 node each .

pkirkinezis (Tue, 09 Mar 2021 13:52:47 GMT):
yeah it was a dependency error between java-sdk hyperledger java-gateway . The version i have imported to my gradle.build were incompatable

pkirkinezis (Tue, 09 Mar 2021 13:52:47 GMT):
yeah it was a dependency error between java-sdk hyperledger and java-gateway hyperledger . The version i have imported to my gradle.build were incompatable

pkirkinezis (Tue, 09 Mar 2021 14:00:06 GMT):
Thank again for your help

bestbeforetoday (Wed, 10 Mar 2021 10:37:16 GMT):
Glad you got it working :thumbsup:

roberto.cangiamila (Thu, 11 Mar 2021 12:09:14 GMT):
Hello everybody .. i have to execute an evaluate transaction .. to got private data .. but i also need to execute it by discovery enabled .. there is a way? Thanks a lot ..

roberto.cangiamila (Thu, 11 Mar 2021 12:11:32 GMT):
i'm using release 1.4 ..

roberto.cangiamila (Thu, 11 Mar 2021 14:26:25 GMT):
reload .. Hello everybody .. i have to execute a query on ledger .. but i also need to execute it by discovery enabled .. there is a way? Thanks a lot .. i'm using release 1.4 ..

roberto.cangiamila (Thu, 11 Mar 2021 14:26:35 GMT):
:sweat_smile:

roberto.cangiamila (Thu, 11 Mar 2021 16:43:39 GMT):
.. i solved by myself ..

ymo 7 (Fri, 12 Mar 2021 08:13:03 GMT):
Has joined the channel.

ymo 7 (Thu, 18 Mar 2021 03:47:50 GMT):
Does anyone know of a sample sdk java project that is interacting with fabric running inside kubernetes ? please let me know. i am having troubles getting the sdk tested on kubernetes cluster

Unicow (Fri, 26 Mar 2021 14:07:35 GMT):
Has joined the channel.

Unicow (Fri, 26 Mar 2021 14:07:35 GMT):
Hello, do you recommend away or any tutorials on how to start creating a HLF Network using the java sdk?

bestbeforetoday (Fri, 26 Mar 2021 14:30:42 GMT):
I would recommend not using the SDK to create the network. Instead, look at the example of creating and configuring a network in the Fabric samples: https://hyperledger-fabric.readthedocs.io/en/latest/test_network.html

bestbeforetoday (Fri, 26 Mar 2021 14:32:11 GMT):
When it comes to developing a client application using the SDK, there is a section in the main Fabric docs on developing applications that describes all the concepts, although I think the code examples are all JavaScript. The asset-transfer-basic sample might be a good place to start for Java: https://github.com/hyperledger/fabric-samples/blob/main/asset-transfer-basic/application-java/src/main/java/application/java/App.java

bestbeforetoday (Fri, 26 Mar 2021 14:32:53 GMT):
Along with the Java SDK documentation: https://hyperledger.github.io/fabric-gateway-java/

Unicow (Fri, 26 Mar 2021 16:20:51 GMT):
Thanks! But why not using the SDK to create a network? What if I want to create and manage a network programmatically? I am aware of the client application using SDK. That's about invoking a transaction, right?

Unicow (Fri, 26 Mar 2021 16:20:51 GMT):
Thanks! But why not using the SDK to create a network? What if I want to create and manage a network programmatically? I am aware a bit of the client application using SDK. That's about invoking a transaction, right?

tac911 (Fri, 26 Mar 2021 23:07:46 GMT):
Has joined the channel.

tac911 (Fri, 26 Mar 2021 23:07:47 GMT):
Hello. Sorry if this has been asked before. I tried to search for it first. I'm running HLF 2.2.2 (from fabric-samples) and am using the Java SDK 2.2 (as in the GitHub example). I have replaced the channel and chaincode as well as the pem files of course. I have issues to submit a transaction with `byte[] mintTokensResult = contract.createTransaction("Mint").submit("1000");` It fails while trying to connect to orderer: ``` Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel erc20channel, send transaction failed on orderer OrdererClient{id: 12, channel: erc20channel, name: orderer.example.com:7050, url: grpcs://orderer.example.com:7050}. Reason: UNAVAILABLE: Unable to resolve host orderer.example.com ... Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Unable to resolve host orderer.example.com ... Caused by: java.lang.RuntimeException: java.net.UnknownHostException: orderer.example.com: nodename nor servname provided, or not known ``` My connection.json looks like this: ``` { "name": "test-network-org1", "version": "1.0.0", "client": { "organization": "Org1", "connection": { "timeout": { "peer": { "endorser": "300" } } } }, "organizations": { "Org1": { "mspid": "Org1MSP", "peers": [ "peer0.org1.example.com" ], "certificateAuthorities": [ "ca.org1.example.com" ] } }, "orderers": { "orderer.example.com": { "url": "grpcs://localhost:7050", "grpcOptions": { "ssl-target-name-override": "orderer.example.com" } } }, "peers": { "peer0.org1.example.com": { "url": "grpcs://localhost:7051", "tlsCACerts": { "pem": "-----BEGIN CERTIFICATE-----\nMII...hI5Iy1T1hxE=\n-----END CERTIFICATE-----\n" }, "grpcOptions": { "ssl-target-name-override": "peer0.org1.example.com", "hostnameOverride": "peer0.org1.example.com" } } }, "certificateAuthorities": { "ca.org1.example.com": { "url": "https://localhost:7054", "caName": "ca-org1", "tlsCACerts": { "pem": ["-----BEGIN CERTIFICATE-----\nMII...5Iy1T1hxE=\n-----END CERTIFICATE-----\n"] }, "httpOptions": { "verify": false } } } } ``` It also fails with connection.yaml ``` --- name: mint-network-org1 version: 1.0.0 client: organization: Org1 connection: timeout: peer: endorser: '300' organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca.org1.example.com peers: peer0.org1.example.com: url: grpcs://localhost:7051 tlsCACerts: path: fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com certificateAuthorities: ca.org1.example.com: url: https://localhost:7054 caName: ca-org1 tlsCACerts: path: fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem httpOptions: verify: false orderers: orderer.example.com: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: path: fabric-samples/test-network/organizations/ordererOrganizations/example.com/msp/cacerts/tlsca.example.com-cert.pem # crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem ``` Does anyone experienced this before and can help me to solve this? Many thanks in advance!

tac911 (Fri, 26 Mar 2021 23:07:47 GMT):
Hello. Sorry if this has been asked before. I tried to search for it first. I'm running HLF 2.2.2 (from fabric-samples) and am using the Java SDK 2.2 (as in the GitHub example). I have replaced the channel and chaincode as well as the pem files of course. I have issues to submit a transaction with `byte[] mintTokensResult = contract.createTransaction("Mint").submit("1000");` Evaluating works fine ``` byte[] queryBalanceResult = contract.evaluateTransaction("ClientAccountBalance"); ``` It fails while trying to connect to the orderer that it can't find in URL `grpcs://orderer.example.com:7050` - it seems like it's ignoring the config? ``` Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel erc20channel, send transaction failed on orderer OrdererClient{id: 12, channel: erc20channel, name: orderer.example.com:7050, url: grpcs://orderer.example.com:7050}. Reason: UNAVAILABLE: Unable to resolve host orderer.example.com ... Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Unable to resolve host orderer.example.com ... Caused by: java.lang.RuntimeException: java.net.UnknownHostException: orderer.example.com: nodename nor servname provided, or not known ``` My connection.json looks like this: ``` { "name": "test-network-org1", "version": "1.0.0", "client": { "organization": "Org1", "connection": { "timeout": { "peer": { "endorser": "300" } } } }, "organizations": { "Org1": { "mspid": "Org1MSP", "peers": [ "peer0.org1.example.com" ], "certificateAuthorities": [ "ca.org1.example.com" ] } }, "orderers": { "orderer.example.com": { "url": "grpcs://localhost:7050", "grpcOptions": { "ssl-target-name-override": "orderer.example.com" } } }, "peers": { "peer0.org1.example.com": { "url": "grpcs://localhost:7051", "tlsCACerts": { "pem": "-----BEGIN CERTIFICATE-----\nMII...hI5Iy1T1hxE=\n-----END CERTIFICATE-----\n" }, "grpcOptions": { "ssl-target-name-override": "peer0.org1.example.com", "hostnameOverride": "peer0.org1.example.com" } } }, "certificateAuthorities": { "ca.org1.example.com": { "url": "https://localhost:7054", "caName": "ca-org1", "tlsCACerts": { "pem": ["-----BEGIN CERTIFICATE-----\nMII...5Iy1T1hxE=\n-----END CERTIFICATE-----\n"] }, "httpOptions": { "verify": false } } } } ``` It also fails with connection.yaml ``` --- name: mint-network-org1 version: 1.0.0 client: organization: Org1 connection: timeout: peer: endorser: '300' organizations: Org1: mspid: Org1MSP peers: - peer0.org1.example.com certificateAuthorities: - ca.org1.example.com peers: peer0.org1.example.com: url: grpcs://localhost:7051 tlsCACerts: path: fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem grpcOptions: ssl-target-name-override: peer0.org1.example.com certificateAuthorities: ca.org1.example.com: url: https://localhost:7054 caName: ca-org1 tlsCACerts: path: fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem httpOptions: verify: false orderers: orderer.example.com: url: grpcs://localhost:7050 grpcOptions: ssl-target-name-override: orderer.example.com tlsCACerts: path: fabric-samples/test-network/organizations/ordererOrganizations/example.com/msp/cacerts/tlsca.example.com-cert.pem # crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem ``` Does anyone experienced this before and can help me to solve this? Many thanks in advance!

cmhacker (Mon, 29 Mar 2021 17:39:50 GMT):
You should add extra host in you docker-compose file. where you can bridge the your IP address and your domain name for example. extra_hosts: - "peer0.example.com:172.x.x.x" -"peer1.example.com:172.x.x.x"

cmhacker (Mon, 29 Mar 2021 17:40:17 GMT):
Similarly you can do this for orderer

KyoungsunPark (Wed, 31 Mar 2021 02:14:07 GMT):
Hello, I was wondering if you plan to release the sdk for fabric 2.3. When you are planning to release sdk java and gateway java for fabric 2.3.x? Thank you.

KyoungsunPark (Wed, 31 Mar 2021 02:14:07 GMT):
Hello, I was wondering if you plan to release the sdk for fabric 2.3. When are you planning to release sdk java and gateway java for fabric 2.3.x? Thank you.

bestbeforetoday (Thu, 01 Apr 2021 08:00:08 GMT):
We are not currently planning on release a v2.3 of the SDKs since all the v2.2 SDK capability still works fine with Fabric v2.3

bestbeforetoday (Thu, 01 Apr 2021 08:00:08 GMT):
We are not currently planning to release a v2.3 of the SDKs since all the v2.2 SDK capability still works fine with Fabric v2.3

knagware9 (Mon, 05 Apr 2021 15:55:37 GMT):
@Unicow Latest fabric release not supporting sdk for managing network and admin related operations. CLI is prefered way managing fabric network.

ganesh_nic (Wed, 07 Apr 2021 06:18:43 GMT):
Has joined the channel.

ganesh_nic (Wed, 07 Apr 2021 06:19:16 GMT):
WE are getting error cannot run peer because error when setting up MSP of type bccsp from directory /home/fabric-samples/test-network/organizations/peerOrganizations/Org1.example.com/users/Admin@org1.example.com/msp:keyMaterial not found in SigningIdentityInfo PL update with some solution to it

guoger (Wed, 07 Apr 2021 08:48:12 GMT):
Has joined the channel.

guoger (Wed, 07 Apr 2021 08:49:49 GMT):
@mbwhite would it be possible to include [pr 63](https://github.com/hyperledger/fabric-chaincode-java/pull/63) into a patch release on 2.2? per comment [here](https://github.com/hyperledger/fabric-chaincode-java/pull/63#issuecomment-796445592)

guoger (Wed, 07 Apr 2021 08:49:49 GMT):
@mbwhite would it be possible to include [pr 63](https://github.com/hyperledger/fabric-chaincode-java/pull/63) into a patch release on 2.2? per comment [here](https://github.com/hyperledger/fabric-chaincode-java/pull/63#issuecomment-796445592), thx!

roberto.cangiamila (Thu, 08 Apr 2021 13:23:06 GMT):
Hello everyone .. i need to specify custom peeroptions to enabled registerEventsForFilteredBlocks.. how can i do that? can anyone suggest me? i'm using fabric-gateway-java and networkConfig..thank's!!!

roberto.cangiamila (Thu, 08 Apr 2021 14:34:21 GMT):
here

roberto.cangiamila (Thu, 08 Apr 2021 15:24:04 GMT):
a little help?

nkl199 (Thu, 08 Apr 2021 16:18:01 GMT):
Has left the channel.

Unicow (Wed, 14 Apr 2021 07:20:16 GMT):
@knagware9 Thanks, but are you sure about that? In the github repo I read that these operations are supported in release-notes 2.0. https://github.com/hyperledger/fabric-sdk-java/blob/main/docs/release_v2.0.0_notes.md

knagware9 (Wed, 14 Apr 2021 12:10:41 GMT):
Yes, I am sure. if it was available in java sdk and supported then it wont be maintain like node.js sdk not support admin operations

roberto.cangiamila (Mon, 19 Apr 2021 09:11:49 GMT):
Good morning, i would like to fork release-1.4 repo to implement new feature: to Enable/disable filterBlock. How can i do that? Thanks

priya1234 (Tue, 20 Apr 2021 09:58:04 GMT):
Has joined the channel.

priya1234 (Tue, 20 Apr 2021 09:58:05 GMT):
Hi Everyone, Using contract.submitTransaction() is taking more time by waiting for commit events. So, Is there is a way to improve the performance using fabric sdk java?

cmhacker (Tue, 20 Apr 2021 10:27:21 GMT):
check your configtx.yaml file and changed if BatchTimeout: 2s then changed it to BatchTimeout: 0.1s

cmhacker (Tue, 20 Apr 2021 10:27:21 GMT):
check your configtx.yaml file and changed BatchTimeout: 2s to BatchTimeout: 0.1s

bestbeforetoday (Tue, 20 Apr 2021 10:37:55 GMT):
You'll find that as you push more concurrent load into the system the blocks get cut faster as you hit the setting for maximum transactions in a block quicker than the the batch timeout

bestbeforetoday (Tue, 20 Apr 2021 10:39:15 GMT):
I'd be wary of setting the batch timeout very low as this may mean that under load you don't have time to get so many transactions batched into each block. Although some benchmarking would help find the best trade-off for your case

bestbeforetoday (Tue, 20 Apr 2021 10:41:21 GMT):
If your transactions don't touch the same ledger keys so it's safe to submit subsequent transactions before previous ones commit, you can use multiple threads at the client end to submit multiple transactions concurrently

bestbeforetoday (Tue, 20 Apr 2021 10:42:44 GMT):
Or if you don't want to wait for the commits to be confirmed, you can use the `DefaultCommitHandlers.NONE` commit handler: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/DefaultCommitHandlers.html#NONE

bestbeforetoday (Tue, 20 Apr 2021 10:43:31 GMT):
You can specify either a default commit handler for all transactions when connecting the Gateway: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Gateway.Builder.html#commitHandler(org.hyperledger.fabric.gateway.spi.CommitHandlerFactory)

bestbeforetoday (Tue, 20 Apr 2021 10:44:07 GMT):
Or specify the commit handler to use for each transaction: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Transaction.html#setCommitHandler(org.hyperledger.fabric.gateway.spi.CommitHandlerFactory)

cmhacker (Tue, 20 Apr 2021 10:57:16 GMT):
Thank you so much this is really helpful.

priya1234 (Wed, 21 Apr 2021 06:05:53 GMT):
Thank you

Sachith.Liyanagama (Thu, 22 Apr 2021 21:11:32 GMT):
Has joined the channel.

Sachith.Liyanagama (Thu, 22 Apr 2021 21:11:38 GMT):
Hello everyone i am new to Hyperledger. I've created a basic blockchain using the Vscode ibm plugin and successfully created a chaincode as well. Now i am working on a java based rest api using the vscode liberty plugin. Apparently i can only use evaluate transaction command in the JAVA SDK. Submit transaction seems to be not working. Anyone knows a solution for this?

cmhacker (Fri, 23 Apr 2021 04:39:32 GMT):
Could you please share your logs or the errors that your facing??

Sachith.Liyanagama (Fri, 23 Apr 2021 05:55:54 GMT):
Hi thanks for your support.error: static interface method invocations are not supported in -source 7 Gateway.Builder builder = Gateway.createBuilder(); ^ (use -source 8 or higher to enable static interface method invocations)

Sachith.Liyanagama (Fri, 23 Apr 2021 06:18:59 GMT):

Sachith.Liyanagama - Fri Apr 23 2021 08:18:53 GMT+0200 (Central European Summer Time).txt

Sachith.Liyanagama (Fri, 23 Apr 2021 06:19:09 GMT):
Hi here I recreate the error.

bestbeforetoday (Fri, 23 Apr 2021 10:22:03 GMT):
fabric-gateway-java requires Java 8 or later: https://github.com/hyperledger/fabric-gateway-java#compatibility

Sachith.Liyanagama (Fri, 23 Apr 2021 19:32:54 GMT):
Actually i am using java 11.

Sachith.Liyanagama (Fri, 23 Apr 2021 19:33:56 GMT):
It is working for evaluate transaction in order to query.

Bolzo 1 (Mon, 26 Apr 2021 15:05:34 GMT):
Hi all! Is there a way to determine if the network (endorsing peer) is down?

Bolzo 1 (Mon, 26 Apr 2021 15:05:34 GMT):
Hi all! Is there a way to determine if the network (endorsing peer) is down? I create a Gateway connection the usal way then with my Gateway object I do this `Network channel = gateway.getNetwork(channelName);` This logs this error `ERROR org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 1, name: mychannel1} Sending proposal with transaction: 0a65bd570e0dcc1e78199d5540c05339072f0eaa95e1a5e4cb6ade6a0e6508b7 to Peer{ id: 2, name: peer0.org2.mydomain.com, channelName: mychannel1, url: grpcs://peer0.org2.mydomain.com:YYYY1, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: peer0.org2.mydomain.com/x.x.x.x:YYYY Caused by: java.net.ConnectException: Connection refused: no further information` But it seems that is not rethrown to my call so I cannot catch it in my try catch block. My problem is that after that call to get the channel i start doing parallel work using `commitListener` and my calls go on timeout as expected. I wonder if there is a way to understand when the gateway can't connect to the network and avoid useless instructions. My understanding of this behaviour (logging and not throwning) is that maybe the connection it's restablished after the error log, dunno if I'm wrong on this

Bolzo 1 (Mon, 26 Apr 2021 15:05:34 GMT):
Hi all! Is there a way to determine if the network (endorsing peer) is down? I create a Gateway connection the usal way then with my Gateway object I do this `Network channel = gateway.getNetwork(channelName);` This logs this error ```ERROR org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 1, name: mychannel1} Sending proposal with transaction: 0a65bd570e0dcc1e78199d5540c05339072f0eaa95e1a5e4cb6ade6a0e6508b7 to Peer{ id: 2, name: peer0.org2.mydomain.com, channelName: mychannel1, url: grpcs://peer0.org2.mydomain.com:YYYY1, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: peer0.org2.mydomain.com/x.x.x.x:YYYY Caused by: java.net.ConnectException: Connection refused: no further information``` But it seems that is not rethrown to my call so I cannot catch it in my try catch block. My problem is that after that call to get the channel i start doing parallel work using `commitListener` and my calls go on timeout as expected. I wonder if there is a way to understand when the gateway can't connect to the network and avoid useless instructions. My understanding of this behaviour (logging and not throwning) is that maybe the connection it's restablished after the error log, dunno if I'm wrong on this

Bolzo 1 (Mon, 26 Apr 2021 15:05:34 GMT):
Hi all! Is there a way to determine if the network (endorsing peer) is down? I create a Gateway connection the usal way then with my Gateway object I do this `Network channel = gateway.getNetwork(channelName);` Then, after some second the application logs this error ```ERROR org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 1, name: mychannel1} Sending proposal with transaction: 0a65bd570e0dcc1e78199d5540c05339072f0eaa95e1a5e4cb6ade6a0e6508b7 to Peer{ id: 2, name: peer0.org2.mydomain.com, channelName: mychannel1, url: grpcs://peer0.org2.mydomain.com:YYYY1, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: peer0.org2.mydomain.com/x.x.x.x:YYYY Caused by: java.net.ConnectException: Connection refused: no further information``` But it seems that is not rethrown to my call so I cannot catch it in my try catch block. My problem is that after that call to get the channel i start doing parallel work using `commitListener` and my calls go on timeout as expected. I wonder if there is a way to understand when the gateway can't connect to the network and avoid useless instructions. My understanding of this behaviour (logging and not throwning) is that maybe the connection it's restablished after the error log, dunno if I'm wrong on this

Bolzo 1 (Mon, 26 Apr 2021 15:05:34 GMT):
Hi all! Is there a way to determine if the network (endorsing peer) is down? I create a Gateway connection the usal way then with my Gateway object I do this `Network channel = gateway.getNetwork(channelName);` Then, after some seconds the application logs this error ```ERROR org.hyperledger.fabric.sdk.Channel - Channel Channel{id: 1, name: mychannel1} Sending proposal with transaction: 0a65bd570e0dcc1e78199d5540c05339072f0eaa95e1a5e4cb6ade6a0e6508b7 to Peer{ id: 2, name: peer0.org2.mydomain.com, channelName: mychannel1, url: grpcs://peer0.org2.mydomain.com:YYYY1, mspid: Org2MSP} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: peer0.org2.mydomain.com/x.x.x.x:YYYY Caused by: java.net.ConnectException: Connection refused: no further information``` But it seems that is not rethrown to my call so I cannot catch it in my try catch block. My problem is that after that call to get the channel i start doing parallel work using `commitListener` and my calls go on timeout as expected. I wonder if there is a way to understand when the gateway can't connect to the network and avoid useless instructions. My understanding of this behaviour (logging and not throwning) is that maybe the connection it's restablished after the error log, dunno if I'm wrong on this

baohua (Wed, 28 Apr 2021 18:04:19 GMT):
When build the `javaenv` docker image from, met such error of ``` > [dependencies 5/18] ADD build/distributions/ /root/:ADD; failed to compute cache key: "/build/distributions" not found: not found``` Any idea how to fix it? Thanks!

bestbeforetoday (Thu, 29 Apr 2021 08:31:50 GMT):
It might be worth asking in #fabric-java-chaincode

Jaswanth1994 (Mon, 10 May 2021 02:36:35 GMT):
Has joined the channel.

Francesco_P (Wed, 19 May 2021 06:49:46 GMT):
hi. I jhave an example network with 2 org and 1 orderer. I renewed certificates with f*abric-ca-client enroll* and then *reenroll*. I copied on the host client the certs: *ca.org1.example.com-cert.pem*, *cert.pem* and the last generated private key. I'm having an exception when i call *gateway.getNetwork("mychannel")* . Someone can help me?

Francesco_P (Wed, 19 May 2021 06:49:46 GMT):
hi. I have an example network with 2 org and 1 orderer. I renewed certificates with f*abric-ca-client enroll* and then *reenroll*. I copied on the host client the certs: *ca.org1.example.com-cert.pem*, *cert.pem* and the last generated private key. I'm having an exception when i call *gateway.getNetwork("mychannel")* . Someone can help me?

Sachith.Liyanagama (Sun, 30 May 2021 16:07:52 GMT):
Dear all, I am new to Hyperledger and I keep receiving Error `1_8:02:47.336 [Default Executor-thread-1360] ERROR org.hyperledger.fabric.gateway.impl.TransactionImpl - No valid proposal responses received. 1 peer error responses: Channel Channel{id: 10, name: mychannel} Sending proposal with transaction: e5e6552232bae72ad3cbded52e34e0efcbeb3ea8c7e739f8338840dee4d874d2 to Peer{ id: 14, name: org1peer-api.127-0-0-1.nip.io:8083, channelName: mychannel, url: grpc://localhost:8083, mspid: Org1MSP} failed because of: gRPC failure=Status{code=UNKNOWN, description=null, cause=java.lang.UnsupportedOperationException` when I invoke Submittransaction in an Rest API created based on Open Liberty. Can I please know why this is happening?.

Sachith.Liyanagama (Sun, 30 May 2021 16:08:33 GMT):
If I use evaluateTransaction it works without any error.

konda.kalyan (Mon, 31 May 2021 06:22:46 GMT):
My guess is that, Submittransaction is not run succssfully on required number of peers (as per the endorsement policy). Check if the transaction/chaincode has run all required number of peers or not. On the other hand, it is sufficient that evaluateTransaction is required to run any one endorsing peer and don't need to satisfy the endorsement policy.

bestbeforetoday (Tue, 01 Jun 2021 09:42:34 GMT):
Strange that evaluate is working but submit is failing during endorsement, as the evaluate is effectively just an endorsement. Is there a stacktrace to help pinpoint where the error is coming from?

banikanand (Wed, 02 Jun 2021 18:39:28 GMT):
Has joined the channel.

banikanand (Wed, 02 Jun 2021 19:32:58 GMT):
hello....I am looking for some help with parsing data from BlockEvent or Block object. Essentially, I have a blockListener from where i would like to get the channel-name, chaincode name, function name and the data. When i SysOut `block.getData()` , i can see all of them, i don't know how to parse and get the values in String. I think it's in Protobuf format which need to be converted to UTF format. Would appreciate any help with this. Thanks!

banikanand (Wed, 02 Jun 2021 19:34:28 GMT):
@bestbeforetoday

bestbeforetoday (Thu, 03 Jun 2021 17:22:42 GMT):
They are actually wrapper objects around the actual protobuf classes, and are defined by the low-level (fabric-sdk-java) SDK. They loosely mirror the protobuf structure (which is fairly convoluted) but should provide methods for you to navigate down to all the information you need: https://javadoc.io/doc/org.hyperledger.fabric-sdk-java/fabric-sdk-java/latest/org/hyperledger/fabric/sdk/BlockEvent.html

jimthematrix (Mon, 07 Jun 2021 15:58:58 GMT):
Has left the channel.

indranil32 (Tue, 08 Jun 2021 08:18:07 GMT):
Has joined the channel.

indranil32 (Tue, 08 Jun 2021 08:18:15 GMT):
Under https://github.com/hyperledger there are many Java Client SDK projects like fabric-gateway / fabric-gateway-java / fabric-sdk-java... why are there so many Java clients ? how do I choose which one to use ?

bestbeforetoday (Tue, 08 Jun 2021 09:08:11 GMT):
I appreciate it could be more obvious. The README for each repo does give some guidance though. From *fabric-sdk-java* > This project provides a low-level API for interacting with Hyperledger Fabric blockchain networks, and is used by the high-level Hyperledger Fabric Gateway SDK for Java

bestbeforetoday (Tue, 08 Jun 2021 09:08:36 GMT):
So that points to *fabric-gateway-java* as the API to use

bestbeforetoday (Tue, 08 Jun 2021 09:12:08 GMT):
The *fabric-gateway* API (https://github.com/hyperledger/fabric-gateway) is still under development. It provides a consistent client API in Java, Go and Node, with much of the heavy-lifting moved to a server-side Fabric Gateway component, implemented in the peer. This capability does not exist in any released version of Fabric, only in development builds. So this will likely become the preferred API in the future but is not the one to pick for applications you want to deploy right now. Feedback and suggestions on the Fabric Gateway API are very welcome

indranil32 (Tue, 08 Jun 2021 09:13:35 GMT):
awesome... thanks

indranil32 (Wed, 09 Jun 2021 11:02:28 GMT):
If using implementation 'org.hyperledger.fabric:fabric-gateway-java:2.2.X' with fabric test-network 2.3.2 I am getting a netty method not found exception

indranil32 (Wed, 09 Jun 2021 11:02:50 GMT):
org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel mychannel failed with peer peer0.org1.example.com. Status FAILURE, details: Channel Channel{id: 1, name: mychannel } Sending proposal with transaction: 227ac21c1d271ebcd252c3f7e261c998f0fab426ed6ea0a80e4c4aa96675dba3 to Peer{ id: 2, name: peer0.org1.example.com, channelName: navis, url: grpcs ://localhost:7051, mspid: Org1MSP} failed because of: gRPC failure=Status{code=INTERNAL, description=Panic! This is a bug!, cause=java.lang.NoSuchMethodError: io.netty.buffer.PooledByt eBufAllocator.(ZIIIIIIZ)V at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:172)

indranil32 (Wed, 09 Jun 2021 11:02:50 GMT):
org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel mychannel failed with peer peer0.org1.example.com. Status FAILURE, details: Channel Channel{id: 1, name: mychannel } Sending proposal with transaction: 227ac21c1d271ebcd252c3f7e261c998f0fab426ed6ea0a80e4c4aa96675dba3 to Peer{ id: 2, name: peer0.org1.example.com, channelName: mychannel , url: grpcs ://localhost:7051, mspid: Org1MSP} failed because of: gRPC failure=Status{code=INTERNAL, description=Panic! This is a bug!, cause=java.lang.NoSuchMethodError: io.netty.buffer.PooledByt eBufAllocator.(ZIIIIIIZ)V at io.grpc.netty.Utils.createByteBufAllocator(Utils.java:172)

indranil32 (Wed, 09 Jun 2021 11:03:20 GMT):
works with 2.1.1

indranil32 (Wed, 09 Jun 2021 11:05:12 GMT):
https://github.com/hyperledger/fabric-gateway-java#compatibility --> according to this it should not be

bestbeforetoday (Wed, 09 Jun 2021 15:52:23 GMT):
@indranil32 This is a bit worrying. The builds for both _fabric-gateway-java_ and the low-level _fabric-sdk-java_ on which it is built are both showing their tests passing. I see that the _fabric-gateway-java_ v2.2.x tests are running with _fabric-sdk-java_ v2.2.6 against Fabric v2.2 nodes. Since this looks at first glance to be a purely client-side error, I'm not sure why the Fabric version should be a factor. My suspicion would be some kind of conflict in versions of SDK and/or gRPC/protobuf library versions in your environment compared to what are running in the automated builds. Could you raise a bug report in Jira including as much information as you can on the problem (full stack trace of the errors, `mvn dependency:tree` output, and _ideally_ an extremely simple client project, perhaps using one of the sample networks, that can be used to reproduce the error): https://jira.hyperledger.org/projects/FGJ

indranil32 (Wed, 09 Jun 2021 16:31:57 GMT):
https://jira.hyperledger.org/browse/FGJ-111

bestbeforetoday (Wed, 09 Jun 2021 17:15:46 GMT):
Thank you! :thumbsup:

tac911 (Fri, 11 Jun 2021 14:03:54 GMT):
Why does this limitation exist in Fabric? It limits the development of smart contracts that can be called by other contracts. Listening to events defined in the called-contract is not possible and it requires to listen to the outer-most contract, which could be complicated if there are multiple ones. Anyone has an idea how to overcome this? https://hlf.readthedocs.io/en/latest/developapps/transactioncontext.html#stub setEvent(): Smart contracts use this API to add an event to a transaction response. *Note that only a single event can be created in a transaction, and must originate from the outer-most contract when contracts invoke each other via invokeChaincode. * ...

tac911 (Fri, 11 Jun 2021 14:31:49 GMT):
Is it normal that closing the Gateway takes a couple of seconds? We have run a simple test with logging the steps in our methods, and you can see in the bold part, it takes 6 seconds to close the Gateway. We are using the standard method of creating the Gateway as shown in the examples for Java SDK. 2021-06-11 16:22:12.942*** PERF *** Called TokenHLF.MintTo. Building Gateway...
 2021-06-11 16:22:12.947*** PERF *** Connected to Gateway. Getting Network...
 2021-06-11 16:22:14.172*** PERF *** Got Network. Getting Chaincode...
 2021-06-11 16:22:14.176*** PERF *** Invoking MintTo...
 2021-06-11 16:22:17.103*** PERF *** Completed MintTo...
 2021-06-11 16:22:17.11*** PERF *** Invoking updated BalanceOf... *
2021-06-11 16:22:17.353*** PERF *** Completed updated BalanceOf. Closing gateway...
* *2021-06-11 16:22:26.395*** PERF *** Closed gateway. Parsing response...
* 2021-06-11 16:22:26.396*** PERF *** Returning TokenHLF.MintTo...

tac911 (Fri, 11 Jun 2021 14:31:49 GMT):
Is it normal that closing the Gateway takes a like 9 seconds? We are running a simple test with logging the steps in our methods, and you can see in the bold part, it takes 6 seconds to close the Gateway. We are using the standard method of creating the Gateway as shown in the examples for Java SDK. 2021-06-11 16:22:12.942*** PERF *** Called TokenHLF.MintTo. Building Gateway...
 2021-06-11 16:22:12.947*** PERF *** Connected to Gateway. Getting Network...
 2021-06-11 16:22:14.172*** PERF *** Got Network. Getting Chaincode...
 2021-06-11 16:22:14.176*** PERF *** Invoking MintTo...
 2021-06-11 16:22:17.103*** PERF *** Completed MintTo...
 2021-06-11 16:22:17.11*** PERF *** Invoking updated BalanceOf... *
2021-06-11 16:22:17.353*** PERF *** Completed updated BalanceOf. Closing gateway...
* *2021-06-11 16:22:26.395*** PERF *** Closed gateway. Parsing response...
* 2021-06-11 16:22:26.396*** PERF *** Returning TokenHLF.MintTo...

jital (Sat, 12 Jun 2021 07:14:15 GMT):
Currently, PeerEventServiceClient connects to all the peers on the network (even the one not from my organisations). If a peer is down due to some reason, it leads to increase in CPU usage due to connection retries. 1. Can we have a mechanism to restrict PeerEventServiceClient to only connect to peers from my organization or something? 2. Also do we have some docs around Event service features. We are banking on it, I want to read on recommeded practices for delivery guarantees and everything

bestbeforetoday (Mon, 14 Jun 2021 08:37:14 GMT):
You're right that the Java SDK maintains eventing connections to all network peers. It would be possible to change this behaviour but I suspect it would be quite a lot of work, and it's not something I am likely to have time to do, but anyone can contribute changes. It looks like the config property `org.hyperledger.fabric.sdk.peer.retry_wait_time` (or as the environment variable `ORG_HYPERLEDGER_FABRIC_SDK_PEER_RETRY_WAIT_TIME`) should set the wait time between connection attempts, so setting that higher than the default 500ms might help

bestbeforetoday (Mon, 14 Jun 2021 08:41:54 GMT):
The fabric-gateway-java API should ensure that you receive events in order and without duplication, regardless of whether peers being used for eventing go down or come back online: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Network.html#addBlockListener(java.util.function.Consumer)

bestbeforetoday (Mon, 14 Jun 2021 08:44:38 GMT):
You an use a Checkpointer for either block or contract/chaincode event listening. This makes it easier to track the last processed event and allow your client application to resume listening from where it left off after a restart: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Contract.html#addContractListener(org.hyperledger.fabric.gateway.spi.Checkpointer,java.util.function.Consumer)

bestbeforetoday (Mon, 14 Jun 2021 08:46:15 GMT):
There is a Checkpointer implementation provided that writes its state to a local file, or you can provide your own Checkpointer implementation: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/DefaultCheckpointers.html#file(java.nio.file.Path)

longdoan7421 (Mon, 14 Jun 2021 13:58:36 GMT):
Has joined the channel.

jital (Thu, 17 Jun 2021 04:22:06 GMT):
@bestbeforetoday I can pick up the changes for connecting to eventing on same org peers. Can we have a quick discussion before i start? Yep we have implemented our checkpointer too :D

indranil32 (Sun, 20 Jun 2021 11:24:25 GMT):
Do we have a Java-eventHub sample in fabric - samples ?

indranil32 (Sun, 20 Jun 2021 11:26:18 GMT):
https://oss.sonatype.org/content/repositories/orghyperledgerfabric-sdk-java-1059/ --> this link is broken

bestbeforetoday (Tue, 22 Jun 2021 10:43:22 GMT):
Off the top of my head, I can't think of a specific Java sample, although the pattern is essentially the same as this JavaScript sample: https://github.com/hyperledger/fabric-samples/blob/1cd71fd26a867efcb0577e02fa42a48a3203ec51/asset-transfer-events/application-javascript/app.js#L235-L255

bestbeforetoday (Tue, 22 Jun 2021 10:44:23 GMT):
You attach a listener function that will get invoked when your chaincode emits events using the Contract's `addContractListener()` methods: https://hyperledger.github.io/fabric-gateway-java/release-2.2/org/hyperledger/fabric/gateway/Contract.html

bestbeforetoday (Tue, 22 Jun 2021 10:45:53 GMT):
That was a staging package that has now been published as v2.2.7: https://search.maven.org/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java/2.2.7/jar

bestbeforetoday (Tue, 22 Jun 2021 10:56:07 GMT):
Sorry for not getting back to you more quickly. I'm just getting to this now. Perhaps you could start by creating a story in Jira with a description of the behaviour you want to implement and we can refine from there? https://jira.hyperledger.org/projects/FGJ/

bestbeforetoday (Tue, 22 Jun 2021 11:09:48 GMT):
The Node SDK is implemented differently and only tries to pull events from a single peer at a time. It may be a bit ambitious to try to make such a big change to the Java SDK

bestbeforetoday (Tue, 22 Jun 2021 11:11:20 GMT):
The pool of peers selected for eventing by the Node SDK is limited to the peers in the client's org (unless there are no peers in their org, in which case all network peers are considered). An approach similar to this might be more practical for the Java SDK

bestbeforetoday (Tue, 22 Jun 2021 11:12:49 GMT):
So only peers in the client's org are marked as having the `PeerRole.EVENT_SOURCE` role, and that role is not included for peers in other orgs

bestbeforetoday (Tue, 22 Jun 2021 11:13:49 GMT):
So the SDK would still be actively receiving events from multiple peers, but only peers in the client's org

bestbeforetoday (Tue, 22 Jun 2021 11:15:30 GMT):
Just need to consider the case where the client's org does not have any peers, and how to deal with that. A simple option might be to have a configuration flag, but this makes it much easier for clients to get it wrong and be confused why eventing isn't working. Better would be to be able to detect that condition automatically and react appropriately

SatheeshNehru (Wed, 23 Jun 2021 15:48:32 GMT):
HI using connection.json to submit transaction getting exception couldnt submit transaction to orderer unable to resolve hostname orderer_continer_name

SatheeshNehru (Wed, 23 Jun 2021 15:51:58 GMT):
@tac911 did you resolved this

jital (Thu, 24 Jun 2021 05:21:07 GMT):
Created JIRA https://jira.hyperledger.org/projects/FGJ/issues/FGJ-112

bestbeforetoday (Thu, 24 Jun 2021 08:27:16 GMT):
:thumbsup:

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the SDK will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use case scenario not considered as a possible one, during the design of the fabric-sdk-java? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the SDK will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use case scenario not considered as a possible one, during the design of the fabric-sdk-java? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the SDK will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use case scenario not considered as a possible one, during the design of the fabric-sdk-java? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use case scenario not considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning for the decision, not to implement any functionality that will support this use case? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use case scenario not considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning/possible workaround for the decision, not to implement any functionality that will support this use case? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use case scenario not considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning (or possible workaround) for the decision, not to implement any functionality that will support this use case? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use-case scenario not considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning (or possible workaround) for the decision, not to implement any functionality that will support this use-case? Thanks.

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use-case scenario not considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning (or possible workaround) for the decision, not to implement any functionality that will support this use-case? Thanks. PS. The question could be extended with the scenario of a mobile user signing a payload received as QR code on another device. ```

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate (the latency of) a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use-case scenario not considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning (or possible workaround) for the decision, not to implement any functionality that will support this use-case? Thanks. PS. The question could be extended with the scenario of a mobile user signing a payload received as QR code on another device. ```

ivanovv (Mon, 28 Jun 2021 13:13:07 GMT):
Hi guys, I am looking at the old questions about the functionality to sign transactions (payload) offline and the proposed solutions to use a custom CryptoSuite class that implements the sign() method. Reading this recommendation I'm asking myself if the fabric-sdk-java will tolerate (the latency of) a couple of remote calls (for example a request to a remote Wallet/HSM device to sign the payload in a secure environment). Is this use-case scenario (not) considered as a possible one, during the design of the fabric-sdk-java? I'm curious, in case it was considered, what was the reasoning (or possible workaround) for the decision, not to implement any functionality that will support this use-case? Thanks. PS. The question could be extended with the scenario of a mobile user signing a payload received as QR code on another device. ```

ivanovv (Mon, 28 Jun 2021 13:59:08 GMT):
PS.

bestbeforetoday (Tue, 29 Jun 2021 09:10:54 GMT):
I don't know the intent of the people who designed and developed the low-level fabric-sdk-java but, from the presence of the CryptoSuite as a pluggable element, I think there was an intention to allow alternative signing implementations to be provided. I don't see why using an HSM for signing shouldn't be included in that, and it is supported in a similar manner in the Node SDK

bestbeforetoday (Tue, 29 Jun 2021 09:11:22 GMT):
I don't see any reason why HSM signing can't be made to work with the Java SDK. It's just a question of time and effort to implement it

bestbeforetoday (Tue, 29 Jun 2021 09:14:13 GMT):
The CryptoSuite itself is quite a large interface to implement so just support signing, so it's not necessarily the easiest job, but perhaps some elements of it not used purely for signing can be either delegated to the existing CryptoSuite implementation or just not supported (throw `UnsupportedOperationException`) to make it easier to implement if you only need signing and not the CA operations like enrollment

bestbeforetoday (Tue, 29 Jun 2021 09:17:44 GMT):
The _fabric-gateway_ API being developed right now was designed to better decouple the signing implementation from the SDK itself and make it very easy to build and use new signing implementations

bestbeforetoday (Tue, 29 Jun 2021 09:18:48 GMT):
The signing implementation is a simple function that you can implement however you want: https://hyperledger.github.io/fabric-gateway/main/api/java/org/hyperledger/fabric/client/identity/package-summary.html

bestbeforetoday (Tue, 29 Jun 2021 09:19:14 GMT):
And this is then just passed in when connecting the Gateway client (see code example here): https://hyperledger.github.io/fabric-gateway/main/api/java/index.html

bestbeforetoday (Tue, 29 Jun 2021 09:35:39 GMT):
For "off-line signing", where the client application doesn't have the client signing credentials and needs to go back to a remote client (e.g. that mobile user) who holds the signing keys, the future Fabric Gateway API has a specific asynchronous flow designed to support that. See Off-line signing examples here: https://hyperledger.github.io/fabric-gateway/main/api/java/org/hyperledger/fabric/client/Contract.html

ivanovv (Tue, 29 Jun 2021 11:01:02 GMT):
Hi bestbeforetoday,

ivanovv (Tue, 29 Jun 2021 11:01:02 GMT):
Hi bestbeforetoday, thanks for the extended explanation. When could we expect the documented feature/APi from your latest link to be implemented?``` ```

ivanovv (Tue, 29 Jun 2021 11:01:02 GMT):
Hi bestbeforetoday, thanks for the extended explanation. When could we expect the documented feature/APi from your latest link to be implemented (in months/quarters)?

ivanovv (Tue, 29 Jun 2021 11:01:02 GMT):
Hi bestbeforetoday, thanks for the extended explanation. When could we expect the documented feature/APi from your latest link to be implemented (in months/quarters)?``` Thanks, Venko PS. Regarding the other options, personally I'd be afraid to implement 2 (or more) remote hops in a sync method, because of the latency (thread blocking) problems, that could hurt the scalability.

ivanovv (Tue, 29 Jun 2021 11:01:02 GMT):
Hi bestbeforetoday, thanks for the extended explanation. When could we expect the documented feature/APi from your latest link to be implemented (in months/quarters)? Thanks, Venko PS. Regarding the other options, personally I'd be afraid to implement 2 (or more) remote hops in a sync method, because of the latency (thread blocking) problems, that could hurt the scalability.

ivanovv (Tue, 29 Jun 2021 13:39:02 GMT):
Hi bestbeforetoday, thanks for the extended explanation. When could we expect the documented feature/API from your latest link to be officially released (in months/quarters)? Thanks, Venko

bestbeforetoday (Tue, 29 Jun 2021 16:45:03 GMT):
I couldn't commit to any exact timescale but the current intention is to have a Fabric release supporting a first stable version of that client API late this year. I would guess end of 3Q or later. But that really is purely a statement of intent, not any kind of firm date. It depends on how quickly development progresses, feedback / requirements and any issues we might run into a long the way

mkumarceg444 (Thu, 01 Jul 2021 13:09:47 GMT):
Has joined the channel.

mkumarceg444 (Thu, 01 Jul 2021 13:09:48 GMT):
Hi, Can anyone provide samples/steps to bring up fabric-java-sdk to interact with fabric network.

mkumarceg444 (Thu, 01 Jul 2021 13:10:48 GMT):
i checked https://github.com/hyperledger/fabric-samples/blob/main/asset-transfer-ledger-queries and basic examples but, i could not find steps to bring it up. Can you please help on this

mkumarceg444 (Thu, 01 Jul 2021 13:11:54 GMT):
Even if there is any other sample is there fine

mkumarceg444 (Thu, 01 Jul 2021 13:11:54 GMT):
Even if there is any other sample also fine

Djoust (Fri, 02 Jul 2021 07:23:24 GMT):
You can check the java sdk e2e tests in the source, but if you wanna just do the basic interactions with the network and chaincode its recommended to use the gateway

chakri07 (Sun, 04 Jul 2021 12:04:43 GMT):
Has joined the channel.

mkumarceg444 (Tue, 06 Jul 2021 14:38:36 GMT):
Hi, i am trying to interact fabric network using fabric-sdk-java, but facing error like https://jira.hyperledger.org/browse/FGJ-111 or javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem i am tried with fabric images 2.2.2 and fabric-sdk-java 2.2.7/2.2.2/2.1.1 but ending up with error while trying to initialize channel if possible can you please tell me some working version combination, i will try with that

mkumarceg444 (Wed, 07 Jul 2021 07:43:38 GMT):
Hi, i am facing the error when i try to invoke the chaincode, org.hyperledger.fabric.sdk.exception.ProposalException: getConfigBlock for channel mychannel failed with peer peer0.org1.example.com. Status FAILURE, details: Channel Channel{id: 1, name: mychannel} Sending proposal with transaction: 918b1a2dd8f0b1b7aa29158a3b28d5dfd94de8fae36c422d8d4d9ded68160ab8 to Peer{ id: 2, name: peer0.org1.example.com, channelName: mychannel, url: grpcs://MYHOSTNAME:7051} failed because of: gRPC failure=Status{code=UNAVAILABLE, description=io exception Channel Pipeline: [SslHandler#0, ProtocolNegotiators$ClientTlsHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0], cause=javax.net.ssl.SSLHandshakeException: General OpenSslEngine problem

mkumarceg444 (Wed, 07 Jul 2021 07:44:37 GMT):
i am running fabric network in one host and running SDK in another host, facing this problem

mkumarceg444 (Wed, 07 Jul 2021 07:48:00 GMT):
can anyone please suggest me should i need to mention or include my fabric-sdk-java deployed host name anywhere during fabric register.

indranil32 (Wed, 07 Jul 2021 09:46:13 GMT):
Did you update your hosts file to resolve peer0.org1.example.com to a proper IP/DNS ?

mkumarceg444 (Wed, 07 Jul 2021 14:01:58 GMT):
now it is working by passing values to --csr-host and setting SANS

mkumarceg444 (Wed, 07 Jul 2021 15:29:06 GMT):
Hi, I am facing some strange error, i tried persisting state value in the fabric network using the putstate through the fabric-gateway-java. i am getting success response. But, the same while trying to query i am getting "*unexpected end of JSON input*" and the for the getstate getting [] in the network. Can you please suggest on this

baohua (Thu, 29 Jul 2021 18:28:42 GMT):
Hi, for the sample code of `Path walletDirectory = Paths.get("wallet");` given at https://github.com/hyperledger/fabric-gateway-java, where can we find the `wallet` file? Thanks!

dan13 (Fri, 30 Jul 2021 22:02:14 GMT):
At that directory, however the Paths.get() will resolve for where the code is executing. The wallet file must be created by some code, see: https://hyperledger.github.io/fabric-gateway-java/master/org/hyperledger/fabric/gateway/Wallets.html

Bolzo 1 (Mon, 02 Aug 2021 08:31:19 GMT):
Hi, I have a question about peer connection using Fabric Gateway. I have a connection profile in which i specify 2 peer of my organization (these peer are also endoring peer, only they have the chaincode installed). Time to time happens that the Gateway automattically tries to send transaction to a peer of another organization in the channel, and that peer is not an endorsing peer. The problem that I face is the fact that the gateway when tries to connect to the other org peer, it uses the logic address (i.e. peer0.otherOrg.com) which cannot be resolved by the dns, so this results in a unknow host exception. Any thoughts on this? The desired outcome is that my gateway connects only to my org endorsing peers for the submit transaction part.

conanoc (Thu, 05 Aug 2021 01:43:11 GMT):
The behavior seems normal. Clients should connect to peers of other organizations. What's the endorsement policy of your channel?

deployer21 (Mon, 16 Aug 2021 14:20:16 GMT):
Hello, I've a question concerning data loss after rolling back blocks after a transaction error occurs. I'm using a high-throughput ledger, and from time to time the submitted transaction can throw a ContractException due to a IllegalArgumentException. This happens nearly 1 time in 500 submitted ones, but It causes the ledger to rollback the last 5/6 blocks to a certain security point, causing the loss of data contained in those blocks. I mean, after I catch the exception, surrounding the submitTransaction with a try/catch, I'm able to resend the failed payload and it is processed successfully. However, the data from the previous transactions is lost. What can I do to prevent this?

bestbeforetoday (Tue, 17 Aug 2021 17:30:20 GMT):
If the peer is discarding previously committed blocks, that sounds to me like it could be a more serious issue with the peer itself. You might want to raise an issue

bestbeforetoday (Tue, 17 Aug 2021 17:33:15 GMT):
If it's a client-side SDK failure that shouldn't be happening then it would help to raise an issue against the SDK with as much diagnostic information as you can get, including at the very least the stack trace of the exception being generated, a snippet of the failing client code, and any information on particular inputs/parameters supplied by your client application that trigger the error

deployer21 (Wed, 18 Aug 2021 11:18:58 GMT):
Hello @bestbeforetoday , and thank you for your answer. The problem causing these errors is related to when a peer has generated a block in pos X and receives from gossip a different block in same position X. Which causes him to discard the received block, losing that information. Warning Message from peer logs (docker): 2021-08-18 11:12:53.630 UTC [gossip.state] func1 -> WARN c38 Block [681] received from gossip wasn't added to payload buffer: Ledger height is at 682, cannot enqueue block with sequence of 681

deployer21 (Wed, 18 Aug 2021 11:59:38 GMT):
Another question I got is why does blocks are constantly generated with only one transaction in it? I've configured a batch timeout of 1s and a BatchSize.MaxMessageCount of 100. I was expectng that, to generate a new block, I'd have to send 100 messages or something, however, in my network, If I send like 10 new transactions in a second, it generates 10 new blocks in the ledger, with the message: "Committed block [1698] with 1 transaction(s) in 24ms";

ckong (Thu, 19 Aug 2021 03:41:53 GMT):
I have a question about using Fabric Gateway. How can I obtain the transaction ID from contract.submitTransaction()? I tried the longform Transaction t = contract.createTransaction(name), but Transaction doesn't have any ways to return me the transaction ID either.

ckong (Thu, 19 Aug 2021 03:45:02 GMT):
I see Transaction#getTransactionId() in release-2.2, but I'm using release-1.4 because I'm working on Fabric v1.4.x. Is there any other way for me to get the transaction ID?

ckong (Thu, 19 Aug 2021 04:47:41 GMT):
Can I use Gateway release-2.2 to connect to a Fabric network running Fabric v1.4.x? @bestbeforetoday

bestbeforetoday (Thu, 19 Aug 2021 09:22:29 GMT):
That sounds like maybe peer ledgers have somehow diverged. I'm not sure exactly how this might have happened or the best way to fix it, but it doesn't sound good

bestbeforetoday (Thu, 19 Aug 2021 09:29:10 GMT):
If you just want to capture all the transaction IDs submitted then one hack might be to implement your own CommitHandlerFactory, which is set on Gateway connect: https://hyperledger.github.io/fabric-gateway-java/release-1.4/org/hyperledger/fabric/gateway/Gateway.Builder.html#commitHandler-org.hyperledger.fabric.gateway.spi.CommitHandlerFactory-

bestbeforetoday (Thu, 19 Aug 2021 09:31:05 GMT):
Your CommitHandlerFactory implementation could capture the transaction ID and then just defer to one of the default handlers so you don't actually need to implement a complete handler: https://hyperledger.github.io/fabric-gateway-java/release-1.4/org/hyperledger/fabric/gateway/DefaultCommitHandlers.html

bestbeforetoday (Thu, 19 Aug 2021 09:31:34 GMT):
If you can possibly move to v2.2 then your life will be much easier though

ckong (Thu, 19 Aug 2021 09:31:58 GMT):
But would v2.2 be compatible with Fabric v1.4.x?

bestbeforetoday (Thu, 19 Aug 2021 09:34:04 GMT):
Good question. I have seen the v2.2 Node SDK used successfully with v1.4 Fabric (provided you don't use an v2.2-specific features). It's not something I've tried with the Java SDK but you could give it a try. The protobuf and gRPC definitions used for communication between client and peer typically have pretty good compatibility

bestbeforetoday (Thu, 19 Aug 2021 09:34:04 GMT):
Good question. I have seen the v2.2 Node SDK used successfully with v1.4 Fabric (provided you don't use any v2.2-specific features). It's not something I've tried with the Java SDK but you could give it a try. The protobuf and gRPC definitions used for communication between client and peer typically have pretty good compatibility

yacovm (Thu, 19 Aug 2021 09:34:40 GMT):
> [gossip.state] func1 -> WARN c38 Block [681] received from gossip wasn't added to payload buffer: Ledger height is at 682, cannot enqueue block with sequence of 681

yacovm (Thu, 19 Aug 2021 09:34:45 GMT):
this doesn't mean it's a different block

yacovm (Thu, 19 Aug 2021 09:35:08 GMT):
it just means that we pulled block 681 but we somehow got block 682 via a different manner so no need for it

yacovm (Thu, 19 Aug 2021 09:35:14 GMT):
it's benign, ignore this warning

bestbeforetoday (Thu, 19 Aug 2021 09:37:58 GMT):
@yacovm Thanks for weighing in! In earlier post @deployer21 says that the peer is actually rolling back / discarding previously committed blocks. This sounds to me like something that shouldn't be possible. I can't say whether it's really happening on the log messages above are just giving a false impression that it is.

bestbeforetoday (Thu, 19 Aug 2021 09:37:58 GMT):
@yacovm Thanks for weighing in! In earlier post @deployer21 says that the peer is actually rolling back / discarding previously committed blocks. This sounds to me like something that shouldn't be possible. I can't say whether it's really happening or the log messages above are just giving a false impression that it is.

yacovm (Thu, 19 Aug 2021 09:38:21 GMT):
what kind of storage is the peer using ?

yacovm (Thu, 19 Aug 2021 09:38:30 GMT):
Is it using an NFS mount?

deployer21 (Thu, 19 Aug 2021 11:03:58 GMT):
@yacovm @bestbeforetoday thank you for your help.

deployer21 (Thu, 19 Aug 2021 11:05:24 GMT):
@yacovm peers are docker containers with volumes being mapped at docker network .yamls.

deployer21 (Thu, 19 Aug 2021 11:13:38 GMT):

Results_Comparison.jpg

deployer21 (Thu, 19 Aug 2021 11:13:41 GMT):
@yacovm I don't know why then, some updates that I send to the ledger are being ignored or lost somehow.. I'm saving negotiation results both in application memory and to the ledger, and some assets at the ledger are 100% equal to the ones in memory, while others are like 95% or something..

deployer21 (Thu, 19 Aug 2021 11:15:27 GMT):
I don't see any other error/warning in peer logs that could justify it

deployer21 (Thu, 19 Aug 2021 11:17:28 GMT):
To contextualise you, the values after B(blockchain) should match the values after C(application)

Param-S (Thu, 19 Aug 2021 13:01:38 GMT):
Has joined the channel.

yacovm (Thu, 19 Aug 2021 16:54:57 GMT):
maybe some updates are ignored because they are invalid transactions due to MVCC conflicts?

yacovm (Thu, 19 Aug 2021 16:55:25 GMT):
if this is a high throughput network it makes sense no?

bestbeforetoday (Tue, 24 Aug 2021 16:56:04 GMT):
I suspect your client application isn't driving enough concurrent transaction load for your block cutting configuration. I certainly can observe large numbers of transactions in a single block with a multi-threaded client driving load

vlaca (Mon, 13 Sep 2021 09:01:08 GMT):
Has joined the channel.

Ashish (Wed, 15 Sep 2021 13:43:55 GMT):
If all I want to do is install and instantiate, with the java SDK. Then I don't have to supply the event hub url right?

Ashish (Wed, 15 Sep 2021 13:43:55 GMT):
If all I want to do is install and instantiate, with the java SDK. Then I don't have to supply the event hub url right? The reason is, somehow my eventhub is not connecting at all. `2021-09-15 11:19:12,333 DEBUG EventHub:212 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} is connecting. 2021-09-15 11:19:12,335 DEBUG Endpoint:298 - Endpoint grpcs://172.19.112.107:7053 with no ssl context 2021-09-15 11:19:12,335 DEBUG Endpoint:271 - Endpoint grpcs://172.19.112.107:7053, using CN overrideAuthority: 'peer0.OrgA' 2021-09-15 11:19:12,336 DEBUG EventHub:341 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} connect is done with connect status: false 2021-09-15 11:19:12,337 WARN EventHub:280 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} terminated is false shutdown is false, retry count 301651 has error UNAVAILABLE: io exception. 2021-09-15 11:19:12,337 WARN EventHub:294 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /172.19.112.107:7053 at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:634) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.ConnectException: Connection refused ... 11 more`

Ashish (Wed, 15 Sep 2021 13:43:55 GMT):
If all I want to do is install and instantiate, with the java SDK. Then I don't have to supply the event hub url right? The reason is, somehow my eventhub is not connecting at all. `2021-09-15 11:19:12,333 DEBUG EventHub:212 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} is connecting. 2021-09-15 11:19:12,335 DEBUG Endpoint:298 - Endpoint grpcs://172.19.112.107:7053 with no ssl context 2021-09-15 11:19:12,335 DEBUG Endpoint:271 - Endpoint grpcs://172.19.112.107:7053, using CN overrideAuthority: 'peer0.OrgA' 2021-09-15 11:19:12,336 DEBUG EventHub:341 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} connect is done with connect status: false 2021-09-15 11:19:12,337 WARN EventHub:280 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} terminated is false shutdown is false, retry count 301651 has error UNAVAILABLE: io exception. 2021-09-15 11:19:12,337 WARN EventHub:294 - EventHub{id: 16, name: peer0.OrgA, channelName: fabricchannel, url: grpcs://172.19.112.107:7053} :StatusRuntimeException Status Status{code=UNAVAILABLE, description=io exception, cause=io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /172.19.112.107:7053 at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:634) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.ConnectException: Connection refused ... 11 more` And after some 31000 retry's the Txn timeout causes it to stop the flow. But Instantiation happens just fine.

ckong (Fri, 17 Sep 2021 08:08:20 GMT):
I invoke Gateway#getNetwork(String) with the name of a non-existent channel. Despite printing a long stack trace, the resulting Network object I get is non-null. How do I prove that I am calling a non-existent channel?

ckong (Fri, 17 Sep 2021 08:10:04 GMT):
Is there a simple way to check if a channel exists or not?

ckong (Fri, 17 Sep 2021 08:15:47 GMT):
Another question is, what is the rationale behind creating a Network object for a channel regardless of whether it exists or not?

vlaca (Fri, 17 Sep 2021 14:28:02 GMT):
which version of fabric are you using?

ckong (Mon, 20 Sep 2021 01:37:18 GMT):
I'm using 1.4.9

jkneubuhl (Mon, 18 Oct 2021 16:43:32 GMT):
Has joined the channel.

ravinayag (Thu, 28 Oct 2021 09:34:25 GMT):
Has joined the channel.

ravinayag (Thu, 28 Oct 2021 09:35:00 GMT):
How to reproduce : 1, Clone the fabrice samples, 2, goto fabricsamples\fabcar and start the network. 3, Copy the relevant files and the connection files, fabcar\java- src, pom.xml 4, Run the java client for fabcar from a different machine. ( in may case windows ) Response : Able to add the Wallets, but getting below grpc comm error. Steps tried : Added the org2 peer in connection.yaml file still not resolving.. Added DNS entries, no improvement expecting: Grpcs should take the hostname/fqdn peer name from the configured variable from the docker-compose file. Any alternate options to override the setting ? How can i override the hostname setting from the grpcs://localhost:9051 ? For Error , refer the attachment error file.txt

ravinayag (Thu, 28 Oct 2021 09:38:14 GMT):

errrorfile.txt

nkaramolegos (Mon, 08 Nov 2021 14:36:58 GMT):
Has joined the channel.

nkaramolegos (Mon, 08 Nov 2021 14:36:59 GMT):
Hello, is there any example for share (i.e github) using the java sdk to deploy and update the chainode, to join the orgs (peers) to channel, and to create new channels?

LakshmiMurali (Tue, 09 Nov 2021 08:06:09 GMT):
Has joined the channel.

LakshmiMurali (Tue, 09 Nov 2021 08:06:10 GMT):
Hi Team, I have setup fabric 2.2.4 network with 4 organizations, each having 1 peer. Fabric SDK version :2.2.4 We used cryptogen to create certificate materials. Application V2 capability :false Channel V2 capability : true Orderer V2 capability : true TLS is enabled. Install is working fine and 4 containers are getting generated. But while triggering instantiation, getting below error. `Channel fabricchannel, transaction: e59e974de2641efe70a312575f4aaeb7726a7b80bf189a2ef03af7457a7e48aa got back from peer Peer{ id: 83, name: peer0.Org2, channelName: fabricchannel, url: grpcs://172.19.99.56:9051} status: 500, message: error in simulation: failed to execute transaction e59e974de2641efe70a312575f4aaeb7726a7b80bf189a2ef03af7457a7e48aa: error sending: chaincode stream terminated`

LakshmiMurali (Tue, 09 Nov 2021 08:06:10 GMT):
Hi Team, I have setup fabric 2.2.4 network with 4 organizations, each having 1 peer. Fabric SDK version :2.2.4 We used cryptogen to create certificate materials. Application V2 capability :false Channel V2 capability : true Orderer V2 capability : true TLS is enabled. Install is working fine and 4 containers are getting generated. But while triggering instantiation, getting below error. `Channel fabricchannel, transaction: e59e974de2641efe70a312575f4aaeb7726a7b80bf189a2ef03af7457a7e48aa got back from peer Peer{ id: 83, name: peer0.Org2, channelName: fabricchannel, url: grpcs://172.19.99.56:9051} status: 500, message: error in simulation: failed to execute transaction e59e974de2641efe70a312575f4aaeb7726a7b80bf189a2ef03af7457a7e48aa: error sending: chaincode stream terminated` Please help

bestbeforetoday (Thu, 25 Nov 2021 16:46:57 GMT):
A v0.2.0 pre-release version of the new *fabric-gateway* client API for use with Fabric v2.4 has been published/tagged. This makes use of the new Fabric Gateway service in v2.4 peers, and provides completely consistent functionality to applications written in Go, Node and Java. Provided no stop-ship issues are identified, this is what we are planning to release alongside Fabric v2.4 as a supplement to the existing SDKs so please feel free to try it out and provide feedback. - https://github.com/hyperledger/fabric-gateway - https://search.maven.org/artifact/org.hyperledger.fabric/fabric-gateway (As I type it's not showing up in the Maven Central search but is published to the Maven Central repository)

bestbeforetoday (Thu, 25 Nov 2021 17:38:13 GMT):
Just a note that a current (development) build of the Fabric peer is required. This will not work with the v2.4 beta release. There is a `make pull-latest-peer` Makefile target in the fabric-gateway repository that will pull down and tag the latest peer images

bestbeforetoday (Tue, 04 Jan 2022 14:55:37 GMT):
fabric-sdk-java v2.2.11 is released, pulling in the latest round of Log4j vulnerability fixes (Log4j v2.17.1): - https://github.com/hyperledger/fabric-sdk-java/releases/tag/v2.2.11 - https://search.maven.org/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java/2.2.11/jar

ShobhitSrivastava (Thu, 13 Jan 2022 04:45:37 GMT):
Hi All..just had one question. I have two peers network with majority endorsement policy. I logged into couchDB UI and changed one key value. However when I am reading this key from chaincode, I am still getting old value. Any information on this? I tried this with fabric 2.4 release.

ShobhitSrivastava (Thu, 13 Jan 2022 04:45:37 GMT):
Hi All..just had one question. I have two peers network with majority endorsement policy. I logged into couchDB UI and changed one key's value. However when I am reading this key from chaincode, I am still getting old value. Any information on this? I tried this with fabric 2.4 release.

ShobhitSrivastava (Thu, 13 Jan 2022 04:45:37 GMT):
Hi All..just had one question. I have two peers network with majority endorsement policy. I logged into couchDB UI and changed one key's value. However when I am reading this key from chaincode, I am still getting old value. Any information on this? I tried this with fabric 2.4 release. @rickr ..adding please take a look.

bestbeforetoday (Tue, 08 Feb 2022 10:19:30 GMT):
v1.0.1 of the Fabric Gateway client API (Go, Node and Java) for use with Fabric v2.4+ is released: https://github.com/hyperledger/fabric-gateway/releases/tag/v1.0.1

bestbeforetoday (Tue, 15 Feb 2022 10:33:30 GMT):
Hyperledger chat is migrating from Rocket.Chat to Discord. There is a *fabric-client-apis* channel in Discord that can be used in place of this one: https://discord.com/channels/905194001349627914/943089887589048350 To sign up for the Hyperledger Discord server, use this link: https://discord.gg/hyperledger

Shweta1 (Wed, 16 Mar 2022 16:08:06 GMT):
Has joined the channel.

Shweta1 (Wed, 16 Mar 2022 16:08:59 GMT):
i am using the fabric-sdk-java 2.0 and trying to invoke the system chaincode `qscc` GetBlockByNumber.But the response is not in readable format. How i can decode block in sdk java. byte[] result= contract.evaluateTransaction("getBlockByNumber","channel",6);

rjones (Tue, 22 Mar 2022 19:53:08 GMT):

rjones (Tue, 22 Mar 2022 19:53:09 GMT):

rjones (Wed, 23 Mar 2022 17:25:13 GMT):