1:01 AM
rgrinberg joined the channel
4:06 AM
jasonkuhrt joined the channel
4:45 AM
Tica2 joined the channel
7:18 AM
favadi joined the channel
8:06 AM
hub1 joined the channel
8:16 AM
hub1 has quit
10:06 AM
zeks_
is there a channel to ask about google test on freenode?
10:39 AM
favadi joined the channel
10:57 AM
aut_ has quit
11:13 AM
favadi joined the channel
12:31 PM
a_teammate has quit
12:36 PM
a_teammate joined the channel
13:00 PM
rgrinberg joined the channel
13:21 PM
mflow joined the channel
14:44 PM
rgrinberg joined the channel
15:02 PM
rgrinberg joined the channel
15:04 PM
rgrinberg has quit
15:04 PM
rgrinberg joined the channel
15:32 PM
rgrinberg joined the channel
15:34 PM
ejona
zeks_: Not that I know of. Probably not. Are you having some problem with it?
16:01 PM
ppires joined the channel
16:01 PM
ppires
hi everyone.
16:01 PM
ejona
Heyo
16:02 PM
ppires
hey ejona! how do you do? amazing job on the java side, looking sharp.
16:02 PM
ejona
Thanks!
16:02 PM
It's going alright. Trying to push forward to GA!
16:02 PM
ppires wishes Go version to be in same state :(
16:03 PM
ppires
yes, i heard there were a few hard thigns to tackle as of recent months.
16:03 PM
ejona wishes Java could be more opinionated like is natural in Go
16:04 PM
anyway, i'm using latest release 0.14.0 within a Spring Boot app and i finally got the _time_ to secure everything with tLS.
16:04 PM
however, i'm having issues with a Go client.
16:04 PM
2016/06/08 16:00:52 transport: http2Client.notifyError got notified that the client transport was broken EOF.
16:04 PM
2016/06/08 16:00:53 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: write tcp 10.0.1.3:37334->10.3.247.89:8090: write: broken pipe"; Reconnecting to "dm:8090"
16:05 PM
this is basically it. i just can't figure out if it's due to some weird TLS cert issue or incompatible Go client/Java server versions.
16:05 PM
ejona
I'd expect that to happen if both sides weren't trying to use TLs
16:05 PM
ppires
the server is running TLS for sure.
16:06 PM
i just reconfirmed with openssl s_client -connect
16:06 PM
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA
16:06 PM
Server public key is 2048 bit
16:06 PM
Secure Renegotiation IS supported
16:06 PM
Compression: NONE
16:06 PM
Expansion: NONE
16:06 PM
No ALPN negotiated
16:06 PM
SSL-Session:
16:06 PM
Protocol : TLSv1.2
16:06 PM
Cipher : ECDHE-RSA-AES256-SHA
16:06 PM
sorry if i'm spamming.
16:08 PM
Go code looks like:
16:09 PM
creds, err := credentials.NewClientTLSFromFile(caFile, "")
16:09 PM
opts = append(opts, grpc.WithTransportCredentials(creds))
16:09 PM
either i'm doing something wrong here or i'm lost.
16:10 PM
ejona
Oh, so you are using your own CA. That can lead to more problems, but I'd expect you're still doing it right.
16:10 PM
You could try to confirm that ALPN can choose 'h2'. I don't remember the s_client argument to do that off the top of my head.
16:12 PM
(It looks like it is "-alpn h2")
16:14 PM
ppires
checking
16:15 PM
openssl s_client -CAfile /etc/tls/ca.pem -tls1_2 -alpn h2 -connect localhost
16:15 PM
:8090
16:15 PM
it did return OK success
16:15 PM
ejona
Did "No ALPN negotiated" change?
16:15 PM
ppires
ejona: nop
16:16 PM
ejona
Hmm... That could break stuff.
16:16 PM
Are you using netty_tcnative or jetty_alpn on the Java side?
16:17 PM
ppires
ejona: good question. i think netty but confirming.
16:19 PM
ejona: i'm building the server with NettyServerBuilder so i assume the first option.
16:19 PM
ejona
Hmm... you might be using the non-boringssl tcnative, which would use the installed openssl, and which commonly only supports NPN. But Go supports NPN so that should be fine.
16:19 PM
It is a runtime dependency. It isn't in the code.
16:19 PM
ppires
checking
16:20 PM
ejona: what's the default? mvn dependency:tree only reveals netty deps
16:21 PM
ejona
Have you taken a look at SECURITY.md?
16:21 PM
16:22 PM
ppires
btw, i'm running my apps in Alpine 3.4 so OpenSSL 1.0.2h 3 May 2016
16:22 PM
reading
16:24 PM
ejona
Okay. That's a very new OpenSSL, so it supports ALPN (doh, that makes sense, since s_client supported alpn)
16:24 PM
ppires
:)
16:24 PM
my client is built with Go 1.6.2 and is running with same OS.
16:24 PM
ejona
Using jetty_alpn requires specifying a bootclasspath or a javaagent, so you would typically know if you're using it.
16:25 PM
ppires
i'm not explicitly using Jetty anywhere.
16:25 PM
ejona
So my theory is you need to use tcnative and then it all "just works"
16:25 PM
icholy joined the channel
16:26 PM
But if that turns out to be the case, that raise two questions/bugs:
16:26 PM
ppires
but openssl s_client can connect to the Java server successfully.
16:26 PM
so what am i missing?
16:26 PM
ejona
But s_client isn't negotiating HTTP/2 (h2) successfully. That is required for gRPC.
16:27 PM
1) Why doesn't Java notice ALPN is missing. Maybe you're manually depending on jetty_alpn_api?
16:27 PM
2) Why Go doesn't provide a helpful error message.
16:28 PM
ppires
1 - i'm not explicitly using Jetty or anything related. not a dependency and surely not the appserver.
16:28 PM
2 - no idea.
16:29 PM
i'm going to try with tcnative
16:30 PM
ejona
Maybe Jetty ALPN is getting included as a dependency to Spring Boot? (If so, that would probably be a bug)
16:31 PM
ppires
checking.
16:31 PM
ejona
What appserver are you using?
16:31 PM
ppires
Tomcat
16:31 PM
ejona
If it supports HTTP/2, it may be using Jetty ALPN (you don't have to be using Jetty)
16:31 PM
Hmm...
16:32 PM
ppires
but confirmed with mvn dependency:tree that no deps are imported for jetty.
16:32 PM
ejona
Oh...
16:32 PM
Actually, I just remembered we improved our code, so a stray dependency on jetty_alpn_api won't confuse grpc.
16:33 PM
So that means if you look at the 'java' command used to start the server, you should be able to notice if jetty ALPN is being used.
16:33 PM
ppires
again the question, should i upgrade gRPC on my Go code? since there are no releases, i can only tell you which commit i'm using.
16:33 PM
ejona
If you see 'alpn' at all, it would be suspicious.
16:34 PM
ppires
i don't specify any explicit jetty flags
16:34 PM
$JAVA $JVM_OPTS -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true -Dspring.profiles.active=$ENVIRONMENT -jar /my-app.jar
16:34 PM
ejona
You can certainly try. But not negotiating h2 _would_ break things.
16:34 PM
ppires
i'm trying with tcnative
16:34 PM
ejona
It could be in JVM_OPTS
16:34 PM
ppires
no, JVM_OPTS are just GC stuff. i set them explicitly as well. no jetty
16:34 PM
ejona looking to see which gRPC prefers if both jetty_alpn and tcnative are available
16:34 PM
ejona
Great.
16:35 PM
I just confirmed that gRPC will prefer tcnative when it is available.
16:36 PM
(tehehe, /dev/./urandom I know that trick. Silly Java)
16:37 PM
ppires
yep, nailed me hard that one.
16:37 PM
and DNS caching :gun:
16:37 PM
(damn emoji!)
16:43 PM
ejona: still no alpn negotiated.
16:43 PM
ejona
:-/ Okay... Let me try here real quick.
16:44 PM
ejona digs around to find some certs
16:45 PM
ppires
ejona: with tcnative do i need openssl installed?
16:46 PM
does Go app needs it too?
16:46 PM
ejona
If using "netty-tcnative", yes. If using "netty-tcnative-boringssl-static", then no.
16:46 PM
ppires
it seems i don't have openssl installed when apps boot.
16:46 PM
i'm using boringssl-static
16:46 PM
ejona
Go has its own native (and good!) TLS implementation, so there is no need for OpenSssl
16:46 PM
Are you using a 64 bit JVM?
16:47 PM
louiscryan has quit
16:48 PM
ppires
16:48 PM
OpenJDK Runtime Environment (build 1.8.0_92-internal-alpine-r0-b14)
16:48 PM
OpenJDK 64-Bit Server VM (build 25.92-b14, mixed mode)
16:50 PM
ejona
ppires: And you did use osdetector (or are using Fork16 or greater of tcnative)?
16:50 PM
ppires
interestingly enough, my Go app no longer tries to reconnect now.
16:50 PM
ejona: i'm using fork17 for linux.
16:50 PM
ejona
(I'm still setting up the experiment. Yay for TLS... :( )
16:50 PM
ppires
since i'm using MacOS for dev
16:51 PM
but all of this is running on a Kubernetes cluster, Alpine 3.4 containers.
16:52 PM
ejona
16:53 PM
(You still did the right thing, but it is slowly getting easier)
16:54 PM
ppires
subscribed issue, thanks.
16:55 PM
ejona: i tried setting a different flag -nextprotoneg h2
16:55 PM
ejona
It's basically just a doc change now that newer versions of tcnative have come out, it works today with 0.14.
16:55 PM
ppires
16:55 PM
it should show a different output but no
16:55 PM
ejona
Are you proxying through nginx?
16:55 PM
ppires
no
16:56 PM
there are some firewall rules for NAT but that's it (kube-proxy)
16:56 PM
ejona
The Java server is terminating the TLS connection, right?
16:56 PM
ppires
that's correct.
16:56 PM
there's nothing between tcp 8090 and my java app.
16:58 PM
ejona
I just got "ALPN protocol: h2"
16:59 PM
(when specifying -alpn h2)
16:59 PM
ppires: So I do think that s_client -alpn h2 is an acurate test.
17:00 PM
ppires
ejona: ok thank you. let me try a few other things.