本文介绍了如何远程调试版本>中的附加Keycloak 8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将Keycloak升级到了版本9,并且在Docker中运行时,无法附加远程调试器.我怀疑这与Keycloak向Java 9+的基础升级有关.

I recently upgraded Keycloak to version 9, and when running in Docker, I'm having trouble attaching a remote debugger. I suspect this has to do with Keycloak's underlying upgrade to Java 9+.

我得到的错误是:

handshake failed - connection prematurally closed

我在Docker中正确映射了我的端口(我可以运行Keycloak版本7,并且可以很好地连接).

I have my ports mapped correctly within Docker (I can run Keycloak version 7 and it attaches just fine).

推荐答案

事实证明,Java 9引入了有关调试的安全性增强.此处的信息: https://stackoverflow.com/a/60090750/2117355

As it turns out, Java 9 introduced a security enhancement with respect to debugging. Information here: https://stackoverflow.com/a/60090750/2117355

在我的Keycloak docker-compose服务定义中,我能够在environment下添加:

In my Keycloak docker-compose service definition, I was able to add under environment:

DEBUG_PORT: "*:8787"

这解决了问题.我现在可以调试了.

And that fixed the problem. I'm now able to debug.

这篇关于如何远程调试版本>中的附加Keycloak 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 13:36