ShinyProxy and Keycloak - ERR_TOO_MANY_REDIRECTS


I have a production server with ShinyProxy and Keycloak and get an error: I´ve read this ( thread and don´t know why it does not work as expected.

openssl pkcs12 -export -out certificate.pfx -inkey /etc/letsencrypt/live/ -in /etc/letsencrypt/live/ -certfile /etc/letsencrypt/live/
sudo chown keycloak:keycloak certificate.pfx

keytool -importkeystore -srckeystore /opt/keycloak/standalone/configuration/certificate.pfx -srcstoretype pkcs12 -destkeystore /opt/keycloak/standalone/configuration/keycloak.jks -deststoretype JKS

keytool -importkeystore -srckeystore /opt/keycloak/standalone/configuration/certificate.pfx -srcstoretype pkcs12 -destkeystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts

This is the way I create and import my certificates. However, it still does not work.In my log files I get this error:

2019-12-24 10:51:37,073 WARN [] (default task-2) type=CODE_TO_TOKEN_ERROR, realmId=master, clientId=null, userId=null, ipAddre ss=, error=invalid_client_credentials, grant_type=authorization_code

Can someone tell me how to fix that? One last step :confused: