1

I try to query an https endpoint using JavaEE8 from application deployed on Payara5 running on a docker container (based on Alpine Linux). The code below works fine from my developer machine, but from within the docker container I get the infamous Unrecognized SSL message, plaintext connection. Also I‘m working over VPN using a Cisco agent.

Response response = ClientBuilder.newClient()
                                     .register(new Authenticator("",
                                                                 ""))
                                     .target("https://my-company-intranet.net")
                                     .path("resource/to/post")
                                     .request(MediaType.APPLICATION_JSON)
                                     .post(Entity.entity(vehicleConfiguration,
                                                         MediaType.APPLICATION_JSON_TYPE));

What I tried up to now

  • adding a custom SSLContext using .sslContext() on the ClientBuilder, where I set TLSv1.2 or a general `HostnameVerifier allHostsValid = (hostname, sslSession) -> true``
  • I set -Djavax.net.debug=ssl in the domain.xml, which just shows me that the handshake stops at http-thread-pool::http-listener-1(3), WRITE: TLSv1.2 Handshake, length = 228
  • System.setProperty("https.nonProxyHosts","*.my-company-intranet.net");

Java version

openjdk version "1.8.0_181"
OpenJDK Runtime Environment (IcedTea 3.9.0) (Alpine 8.181.13-r0)

I suppose something with certificates, wrong Payara configuration or alike, but I can't understand where this is coming from... The error message does not make any sense to me in this context...

dabuki
  • 1,011
  • 3
  • 11
  • 26

0 Answers0