I have been setting up a new server, our first, and have run into an issue using systemd to start keycloak. I started on 26.0.0 a while back and was able to make use of this info on Github to allow systemd to start keycloak. Other things then got in the way and I wasn’t able to look at keycloak again till now. With upgrades available I figured I should install the latest, 26.0.5. After downloading it, unzipping it, copying the needed files, and finally changing the symbolic link(keycloak → keycloak-26.0.5) I attempted to start keycloak and was met with this in the journal:
Nov 21 13:02:42 keysso systemd[1]: Started Keycloak Service.
Nov 21 13:02:42 keysso systemd[18786]: keycloak.service: Failed to locate executable /opt/keycloak/bin/kc.sh: Permission denied
Nov 21 13:02:42 keysso systemd[18786]: keycloak.service: Failed at step EXEC spawning /opt/keycloak/bin/kc.sh: Permission denied
Nov 21 13:02:42 keysso systemd[1]: keycloak.service: Main process exited, code=exited, status=203/EXEC
Nov 21 13:02:42 keysso systemd[1]: keycloak.service: Failed with result 'exit-code'.
I then tried all other upgrades starting at 26.0.1 and found that they all had the same issue. I have verified that the keycloak user has access to all the directories and files, even if many are read-only such as the SSL cert and key, and that keycloak will start if I run kc.sh directly on the console as the keycloak user.