keycloak - MultiNOde 中的 KeyCloak 不与 infinispan 共享用户会话和令牌
问题描述
InfiniSpan 不会在 keycloak 中的节点之间复制用户会话和 JWT 令牌。使用 jgroup 的发现正在工作,因为我可以看到两个节点发现的日志。请帮助解决问题。
<jgroups>
<stack-file name="jgroups" path="${jgroups.configfile:jgroups.xml}"/>
</jgroups>
<cache-container name="keycloak" jndi-name="infinispan/Keycloak" start="EAGER">
<transport stack="jgroups" lock-timeout="60000"/>
<local-cache name="realms">
<memory>
<object size="10000"/>
</memory>
</local-cache>
<local-cache name="users">
<memory>
<object size="10000"/>
</memory>
</local-cache>
<distributed-cache name="sessions" mode="SYNC" owners="${infinispan.dist_cache.owners:2}"/>
<distributed-cache name="authenticationSessions" mode="SYNC" owners="${infinispan.dist_cache.owners:2}"/>
<distributed-cache name="offlineSessions" mode="SYNC" owners="${infinispan.dist_cache.owners:2}"/>
<distributed-cache name="clientSessions" mode="SYNC" owners="${infinispan.dist_cache.owners:2}"/>
<distributed-cache name="offlineClientSessions" mode="SYNC" owners="${infinispan.dist_cache.owners:2}"/>
<distributed-cache name="loginFailures" mode="SYNC" owners="${infinispan.dist_cache.owners:2}"/>
<!--replicated-cache name="sessions" statistics-enabled="true"/>
<replicated-cache name="clientSessions" statistics-enabled="true"/-->
<local-cache name="authorization">
<memory>
<object size="10000"/>
</memory>
</local-cache>
<replicated-cache name="work" mode="SYNC"/>
<local-cache name="keys">
<expiration max-idle="3600000"/>
<memory>
<object size="1000"/>
</memory>
</local-cache>
<distributed-cache name="actionTokens" mode="SYNC" owners="2">
<expiration max-idle="-1" interval="300000"/>
<memory>
<object size="-1"/>
</memory>
</distributed-cache>
</cache-container>
解决方案
推荐阅读
- javascript - 拖动全景bg图像并对指南针箭头产生影响
- html - Apache vhost:我的文件夹结构的正确设置?
- haskell - 1:1 类型/类型-类-实例关系是否存在可行且类型安全的替代方案?
- webpack - NextJS 大块动态导入
- javascript - 如何用html元素包装选定的文本而不丢失换行符?
- r - 在 .Rprofile 中使用 default() 的问题
- java - spring.cloud.stream.kafka.bindings。
.producer.configuration 未应用 - jenkins - jenkins 管道 - 如何设置 ChoiceType 条件选项
- angular - 错误错误:未捕获(承诺):ProgressEvent:{“isTrusted”:true}
- powershell - VS Code集成终端尝试激活python虚拟环境时自动适配shell类型