在 docker 容器中导入 keycloak 的领域配置时出错

2024-03-03

我通过以下命令在 docker 上部署了 keycloak:

docker run -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8080:8080 quay.io/keycloak/keycloak:17.0.1 start-dev

我使用以下方式连接到容器:

docker exec -ti <CONTAINER> bash

我创建了一个领域配置文件 /tmp/realm.json

最后,我运行了命令:

/opt/keycloak/bin/kc.sh import --file /tmp/realm.json

但我遇到了如下错误:

2022-09-26 21:40:37,142 ERROR [org.keycloak.services] (main) KC-SERVICES0010: Failed to add user 'admin' to realm 'master': user with username exists
2022-09-26 21:40:37,447 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (import_export) mode
2022-09-26 21:40:37,448 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Unable to start HTTP server
2022-09-26 21:40:37,448 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: io.quarkus.runtime.QuarkusBindException
2022-09-26 21:40:37,449 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.

希望听到任何建议和问题的解决方案,先谢谢您!


None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 docker 容器中导入 keycloak 的领域配置时出错 的相关文章

随机推荐