yeasy/docker-compose-files

fabric-sdk-java tls: first record does not look like a TLS handshake

HugoPu opened this issue · 1 comments

When I ran fabric-sdk-java unit Test End2endIT, I got the following error.

2017-07-10 08:32:42,140 DEBUG HFClient:260 - Setting user context to MSPID: Org1MSP user: peerOrg1Admin
2017-07-10 08:33:38,830 DEBUG Channel:298 - Creating channel: SYSTEM_CHANNEL, client context peerOrg1Admin
2017-07-10 08:33:38,910 DEBUG ProtoUtils:190 - SignatureHeader: nonce: 67d01317e3585c3f7b0761180e3c8ac256b6bf458f74cf9d, User:peerOrg1Admin, MSPID: Org1MSP, idBytes: 9cf4e05a1061cd08f05e5de59f3177756d4cffbdeb1c69b0cc3139292c4eb9f7
2017-07-10 08:33:38,960 DEBUG Channel:2241 - finally done
2017-07-10 08:33:38,961 DEBUG Channel:298 - Creating channel: foo, client context peerOrg1Admin
2017-07-10 08:33:38,961 DEBUG Channel:159 - Creating new channel foo on the Fabric
2017-07-10 08:33:38,988 DEBUG ProtoUtils:190 - SignatureHeader: nonce: da6e5666050a59bc8a38043995a4c6ea68ae5c8c7eab08d3, User:peerOrg1Admin, MSPID: Org1MSP, idBytes: 9cf4e05a1061cd08f05e5de59f3177756d4cffbdeb1c69b0cc3139292c4eb9f7
2017-07-10 08:33:38,996 DEBUG ProtoUtils:63 - ChannelHeader: type: CONFIG_UPDATE, version: 1, Txid: 8b14e187dfc8f136f66588e937f89af3b02f51e025162614200057d27e34d340, channelId: foo, epoch 0
2017-07-10 08:33:39,008 DEBUG Channel:213 - Sending to orderer payloadSignature: 0x304402202396c0cc6ef0b7d5990fe588de2f16729a3c6485619442dac1cad56004d7b002022069a38cf405bf5d4fe1407a50597039a2c7cdd8ae3ddb7f7baedc8d55fe94b86d 
2017-07-10 08:33:39,011 DEBUG Orderer:122 - Order.sendTransaction name: orderer.example.com, url: grpc://192.168.53.20:7050
2017-07-10 08:33:39,840 ERROR OrdererClient:144 - Received error on channel foo, orderer orderer.example.com, url grpc://192.168.53.20:7050, INTERNAL
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)

And then I check the log on orderer.example.com:
grpc: Server.Serve failed to complete security handshake from "192.168.54.233:38214": tls: first record does not look like a TLS handshake
I only modify the url on TestConfig.Class to let the code connect to the correct address, and comment the following code on End2endIT, since I only have one CA.

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));
                }
                if (!user.isEnrolled()) {
                    user.setEnrollment(ca.enroll(user.getName(), user.getEnrollmentSecret()));
                    user.setMspId(mspid);
                }
                sampleOrg.addUser(user); //Remember user belongs to this Org

Do you have any idea?

yeasy commented

pls ask in the https://chat.hyperledger.org/channel/fabric-sdk-java channel.

Or post on to related email list.