Commit 3a98fc5
committed
NettyGrpcServer -- configure ALPN
Before this change the following exception was thrown when trying to
launch the chaincode server with TLS enabled:
java.lang.IllegalArgumentException: ALPN must be enabled and list HTTP/2 as a supported protocol.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.ensureAlpnAndH2Enabled(GrpcSslContexts.java:260)
at io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder.sslContext(NettyServerBuilder.java:300)
at org.hyperledger.fabric.shim.NettyGrpcServer.<init>(NettyGrpcServer.java:60)
at org.hyperledger.fabric.shim.NettyChaincodeServer.<init>(NettyChaincodeServer.java:27)
at org.hyperledger.fabric.shim.NettyGrpcServerTest.startAndStopTlsWithoutPassword(NettyGrpcServerTest.java:321)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Signed-off-by: Fedor Tokarev <[email protected]>1 parent 63c12ff commit 3a98fc5
File tree
1 file changed
+14
-2
lines changed- fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/shim
1 file changed
+14
-2
lines changedLines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
59 | 62 | | |
60 | | - | |
| 63 | + | |
61 | 64 | | |
62 | | - | |
| 65 | + | |
63 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
64 | 76 | | |
65 | 77 | | |
66 | 78 | | |
| |||
0 commit comments