Setting up Keycloak cache on AWS EC2 not working

Hi all,
I’m trying to setup the cache cluster on aws ec2 for keycloak and I not sure what i’m doing wrong. I’m using version of keycloak 19.0.3. When I go to start the keycloak service I get the following error message…

2022-11-02 14:08:15,133 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2022-11-02 14:08:15,134 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start caches
2022-11-02 14:08:15,134 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheConfigurationException: ISPN000365: Could not find the specified JGroups configuration file 'default-configs/default-jgroups-ec2 .xml'
2022-11-02 14:08:15,134 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: org.infinispan.commons.CacheConfigurationException: ISPN000365: Could not find the specified JGroups configuration file 'default-configs/default-jgroups-ec2 .xml'
2022-11-02 14:08:15,135 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: ISPN000365: Could not find the specified JGroups configuration file 'default-configs/default-jgroups-ec2 .xml'
2022-11-02 14:08:15,135 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

my keycloak configuration file has the following settings enabled for caching

# CACHE
cache=ispn

# Define the default stack to use for cluster communication and node discovery.
cache-stack=ec2

Any advice or example on how to setup the cache cluster for s3 would be appreciated. Also, not sure why the file its trying to look for has a space after the filename. I tried adding the file in the conf directory, but still didn’t help.

'default-configs/default-jgroups-ec2 .xml'

The is definitively something strange going on here with that extra space between ec2 and .xml.

I suppose you should check your config file for an extra (maybe invisible) space character in cache-stack=ec2?

Thank you it was an invisible space :man_facepalming: