![](/img/trans.png)
[英]debug ssl connection issues using GRPC Java client and NodeJS server
[英]ssl handshake issue between GRPC Java client and NodeJS server
我正在使用GRPC(Java客戶端)通過SSL連接到NodeJS服務器。 我正在使用的SSL上下文復制如下。 我嘗試在Mac El Capitan OS上運行ssldump來幫助調試。 嘗試連接並向服務器發送消息時,服務器上出現以下異常:
chttp2_server.c:123] Handshaking failed: {"created":"@1489433622.628015000","description":"Handshake read failed","file":"../src/core/lib/security/transport/security_handshaker.c","file_line":238,"referenced_errors":[{"created":"@1489433622.628009000","description":"Socket closed","fd":24,"file":"../src/core/lib/iomgr/tcp_posix.c","file_line":249,"target_address":"ipv6:[::1]:60820"}]}
SslContext sslContext = GrpcSslContexts.forClient()
.startTls(true)
.sslProvider(defaultSslProvider())
.trustManager(publicCert)
.keyManager(clientCert, clientKey)
// .ciphers(null) //testing
.build();
我只看到ssldump的以下輸出:
780 1880.8428 (0.0405) C>S TCP FIN
780 1880.8433 (0.0005) S>C TCP FIN
New TCP connection #1020: localhost(61531) <-> localhost(96758)
1.3625 (1.3625) C>S
---------------------------------------------------------------
1e 0a 16 08 b9 c6 ed bc b9 9e 84 98 e3 01 10 95 ................
b8 b5 a5 8e 8c c3 bb 91 01 10 02 22 02 08 01 ..........."...
---------------------------------------------------------------
New TCP connection #1021: localhost(61532) <-> localhost(90051)
對於如何進一步解決此問題的任何想法將不勝感激。
我刪除了似乎引起問題的“ usePlaintext(false)”語句。
channelBuilder = NettyChannelBuilder.forAddress(host, port)
.overrideAuthority("localhost")
.negotiationType(NegotiationType.TLS)
**//.usePlaintext(false)**
.sslContext(sslContext);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.