[HTTPS] Underlying input stream returned zero bytes

Hi everyone,

I tested all the features I needed via http; works all good.
Now, using RootCA certificate, I modified keycloak.conf > kc.sh build > kc.sh start

The admin console login page seems fine.
It has the lock sign on the left of the url, and I can enter ID/PW to submit the form.
But when I submit the form, the log shows “Underlying input stream returned zero bytes”,
not allowing me to actually get in the console and modify the features I want.

This always happened in 17.0.0, 17.0.1, 18.0.0 version.
With 18.0.1 version, it sometimes allows me to access https and sometimes not.

(1) Is there any way I can completely fix this issue?

I’m also considering using http for keycloak admin/account console
(and us https for other clients)

So I tried

  • “update REALM set ssl_required = ‘NONE’ where id = ‘master’;” in DB > NOT WORKING
  • set “http-enabled=true” in conf > NOT WORKING
  • added valid redirec_uri “http:///admin/master/console/*” in Clients (Master/security-admin-console) > NOT WORKING

It always redirected me to https login page for http:///admin…

(2) How can I disable https redirection only for admin and account console?

Oh I forgot to mention this!

Keycloak is installed in a CentOS 7 server using JDK,
and I’m using Windows 10 PC to get in the keycloak admin console.

Oh I found the hidden option for accessing http!

Now I just need to know how to fix the Underlying zerobytes issue for https