How to Troubleshoot IO.Exception: Premature Close?


for some reason I’m unable to call our keycloak server with gatling 3.1.3. Other uris/servers work.

The keycloak server uses the companies dev ca for it’s certs. I created a truststore and configured it in conf/gatling.conf:

truststore { type = "jks" file = "C:/certs/truststore.jks" password = "pswd" }

Using this trustore, the keycloak server is accessable using apache http client in a test java application. curl with -k also works.

Running a gatling scenario which only calls the keycloak server 1 time returns the following:

09:22:34.510 [DEBUG] i.g.h.e.t.HttpTxExecutor - Sending request=Request Token uri= scenario=myScenario, userId=1
09:22:34.557 [DEBUG] i.g.h.c.i.DefaultHttpClient - Installing SslHandler for
09:22:34.571 [DEBUG] i.n.u.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@1a0a6e11
09:22:35.147 [DEBUG] i.g.h.c.i.HttpAppHandler - Write request WritableRequest{request=DefaultFullHttpRequest(decodeResult: success, version: HTTP/1.1, content: UnpooledHeapByteBuf(ridx: 0, widx: 134, cap: 134/134))
POST /auth/realms/internal/protocol/openid-connect/token HTTP/1.1
User-Agent: Gatling
accept: /
content-type: application/x-www-form-urlencoded
content-length: 134, content=null}
09:22:35.209 [DEBUG] i.n.h.s.SslHandler - [id: 0x377215f9, L:/ -] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

[20 seconds of waiting …]

09:22:55.269 [DEBUG] i.n.h.s.ReferenceCountedOpenSslEngine - SSL_shutdown failed: OpenSSL error: 268435650 error:100000c2:SSL routines:OPENSSL_internal:PROTOCOL_IS_SHUTDOWN
09:22:55.272 [WARN ] i.g.h.e.GatlingHttpListener - Request ‘Request Token’ failed for user 1
io.gatling.http.client.impl.HttpAppHandler$1: Premature close
09:22:55.316 [WARN ] i.g.h.e.r.DefaultStatsProcessor - Request ‘Request Token’ failed for user 1: j.i.IOException: Premature close

Any idea how to proceed from here?