[keycloak-user] Failed to get log files with docker installation

Bruno Oliveira bruno at abstractj.org
Tue Nov 12 05:09:45 EST 2019


It seems to me that you have a permissions issue. I just did:

docker run --name keycloak7 --privileged -v
/home/abstractj/tmp/logs:/opt/jboss/keycloak/standalone/log -e
KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8280:8280 -it
quay.io/keycloak/keycloak:7.0.1 -b 0.0.0.0 -bmanagement=0.0.0.0
-Djboss.socket.binding.port-offset=200

cat ~/tmp/logs/server.log returns the log to me

When I read "FileNotFoundException" it looks to me that you're trying
to read this file from a Java program and maybe that's the culprit of
your problem. Anyways, it's seems unrelated to our Docker image, but I
hope it helps.


On Tue, Nov 12, 2019 at 5:02 AM Yang Yang <yy8402 at icloud.com> wrote:
>
> Hi,
>
> I wanted to access Keycloak logs on host machine, so I started the docker container with “-v /path/on/my/host:/opt/jboss/keycloak/standalone/log”, and then met the permission issue, “java.io.FileNotFoundException: /opt/jboss/keycloak/standalone/log/server.log (Permission denied)”.
>
> Could you help to tell what I should do? Some posts on the internet suggests to deactivate SELinux or run the container in privileged mode, which  I believe is not good for security reason.
>
> Thanks,
> Yang
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user



--
- abstractj



More information about the keycloak-user mailing list