{"id":357017,"date":"2024-05-20T23:41:44","date_gmt":"2024-05-20T23:41:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=357017"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-20T23:41:44","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=357017","title":{"rendered":"<span>Keycloak \u2015 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/871\/3a6\/f2b\/8713a6f2bc7464b7d411493b6e01519f.png\" width=\"1344\" height=\"896\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/871\/3a6\/f2b\/8713a6f2bc7464b7d411493b6e01519f.png\"\/><\/figure>\n<p>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044f \u0443 \u043d\u0430\u0441 \u0432 tutu Keycloak, \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0418 \u0435\u0441\u043b\u0438 \u0441 \u0411\u0414 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0442\u043e \u0432\u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u043a\u0435\u0448\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 Keycloak \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0435\u0439.<\/p>\n<p>\u041c\u044b \u0443\u043f\u0451\u0440\u043b\u0438\u0441\u044c \u0432 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Keycloak \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f UDP-\u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442. \u0418 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435 \u043d\u043e\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u0441\u0435\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0426\u041e\u0414\u0430). \u0415\u0441\u043b\u0438 \u0441 \u044d\u0442\u0438\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u043c \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u043e \u043c\u044b \u043b\u0438\u0448\u0438\u043c\u0441\u044f Keycloak. \u041d\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e.<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0434\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u0426\u041e\u0414\u0430\u043c\u0438, \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0445 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Keycloak \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 JGroups \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u0441\u0442\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u0411\u043e\u043d\u0443\u0441\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0443 shell-\u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f Consul, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0441\u043d\u044f\u0442\u0438\u044f \u0430\u043d\u043e\u043d\u0441\u043e\u0432 \u043f\u0443\u0442\u0451\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f bird \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041d\u0430\u043c\u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u0432 systemd-\u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<p>Keycloak \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>CLI: kc.sh\u00a0&#8212;key=value.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f: KC_KEY=value.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438: key=value.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b Java KeyStore: kc.key=value.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0447\u044c \u043f\u0440\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0441\u0430\u043c\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.\u00a0<br \/>\u0412 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u044f \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h4>\u0414\u0430\u043d\u043e<\/h4>\n<ul>\n<li>\n<p>\u041d\u043e\u0434\u0430 keycloak1.<\/p>\n<\/li>\n<li>\n<p>Keycloak \u0432\u0435\u0440\u0441\u0438\u0438 20, \u0437\u0430\u0432\u0451\u0440\u043d\u0443\u0442\u0430\u044f \u0432 systemd-\u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438. \u041a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth1, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0447\u0435\u0440\u0435\u0437 bgp \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f anycast IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 Keycloak, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430<\/h4>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c Keycloak \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u043c \u0438 \u0433\u0435\u043e\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0436\u0451\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0431\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u043e\u0434 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<br \/>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c custom transport stack.<\/p>\n<h4>TCPPING<\/h4>\n<p>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Keycloak.<\/p>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u00a0<strong>conf\/cache-ispn.xml<\/strong>\u00a0\u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b\u00a0<strong>conf\/custom-cache-ispn.xml.<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u044e infinispan \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"xml\">  &lt;jgroups>         &lt;stack name=\"add_tcpping\" extends=\"tcp\">             &lt;TCPPING initial_hosts=\"&lt;eth0_ip_keycloak1>[7800],&lt;eth0_ip_keyclaok2>[7800],&lt;eth0_ip_keycloak3>[7800]\"                      port_range=\"0\"                      stack.combine=\"REPLACE\"                      stack.position=\"MPING\"             \/>         &lt;\/stack>     &lt;\/jgroups>     &lt;cache-container name=\"keycloak\">         &lt;transport lock-timeout=\"60000\" stack=\"add_tcpping\"\/><\/code><\/pre>\n<p>stack name \u2015 \u0438\u043c\u044f \u0441\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 transport. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0418\u043c\u044f \u0441\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u043e\u0433\u0430\u0445.<\/p>\n<p>initial_hosts \u2015 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 Keycloak-\u043d\u043e\u0434.<\/p>\n<p>port_range \u2015 TCPPING \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 + port_range. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0440\u0442 7800.<\/p>\n<p>stack.combine \u2015 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. REPLACE \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>stack.position \u2015 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<strong>cache-config-file<\/strong>\u00a0\u043d\u0430\u0448 .xml-\u0444\u0430\u0439\u043b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<strong>http-host<\/strong>\u00a0\u0443\u043a\u0430\u0437\u0430\u0442\u044c anycast-\u0430\u0434\u0440\u0435\u0441 (cache=ispn \u2015 \u044d\u0442\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435):<\/p>\n<pre><code>cache=ispn cache-config-file=cache-ispn-tcpping.xml   http-host=&lt;anycast_eth1_ip><\/code><\/pre>\n<p>\u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c anycast-\u0430\u0434\u0440\u0435\u0441, \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441 \u0445\u043e\u0441\u0442\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 infinispan \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u043e\u0440\u0442 7800. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u043d\u043e\u0434\u044b:<\/p>\n<pre><code>bin\/kc.sh start -Djgroups.bind.address=&lt;eth0_ip><\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043b\u043e\u0433\u0430\u0445, \u0447\u0442\u043e JGroups \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c add_tcpping:<\/p>\n<pre><code>2023-04-21 10:40:54,586 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN` with stack `add_tcpping`<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0434 \u0441 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u043e\u0432\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0435\u0433\u043e:<\/p>\n<pre><code>2023-04-21 10:41:02,197 INFO  [org.infinispan.CLUSTER] (jgroups-12,keycloak1-57393) ISPN100000: Node keycloak2-60977 joined the cluster 2023-04-21 10:41:02,643 INFO  [org.infinispan.CLUSTER] (jgroups-5,keycloak1-57393) [Context=authenticationSessions] ISPN100002: Starting rebalance with members [keycloak1-57393, keycloak2-60977], phase READ_OLD_WRITE_ALL, topology id 7 2023-04-21 10:41:06,963 INFO  [org.infinispan.CLUSTER] (jgroups-12,keycloak1-57393) ISPN100000: Node keycloak3-7710 joined the cluster 2023-04-21 10:41:07,242 INFO  [org.infinispan.CLUSTER] (jgroups-12,keycloak1-57393) [Context=authenticationSessions] ISPN100002: Starting rebalance with members [keycloak1-57393, keycloak2-60977, keycloak3-7710], phase READ_OLD_WRITE_ALL, topology id 11<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<h4>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432 .xml-\u0444\u0430\u0439\u043b\u0435, \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0442\u0435\u043a\u0430 TCP, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438:<\/p>\n<pre><code>lib\/lib\/main\/org.infinispan.infinispan-core-&lt;version>.jar\/default-configs\/default-jgroups-tcp.xml<\/code><\/pre>\n<p>\u0422\u0430\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f MPING. \u0412\u00a0<strong>conf\/custom-cache-ispn.xml\u00a0<\/strong>c \u043f\u043e\u043c\u043e\u0449\u044c\u044e stack.position \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c MPING, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e stack.combine \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 TCPPING.<\/p>\n<h4>HashiCorp Consul<\/h4>\n<p>\u0412\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 anycast (\u0443 \u043d\u0430\u0441 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bird), \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u043d\u043e \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u043a\u0430\u043a-\u0442\u043e \u0441\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u043d\u043e\u043d\u0441\u044b, \u0435\u0441\u043b\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043d\u0430\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0443\u043b, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u0438\u0448\u044c shell-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0437 \u0432 15 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>Keycloak \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 healthcheck, \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<br \/> \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e, \u043d\u0430\u0434\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e:<\/p>\n<pre><code>health-enabled=true<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b:<\/p>\n<pre><code>\/health \/health\/live \/health\/ready<\/code><\/pre>\n<p>\u0411\u0443\u0434\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0451 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"bash\">function keycloak_healthcheck {   app_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['status'])\" 2>\/dev\/null)   db_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['checks'][0]['status'])\" 2>\/dev\/null)     if [ \"$app_status\" != \"UP\" ] || [ \"$db_status\" != \"UP\" ]     then       healthcheck=1     else       healthcheck=0   fi }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 Keycloak \u0440\u0435\u0431\u0438\u043b\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:   <\/p>\n<pre><code class=\"bash\">function keycloak_recover {   echo $(date +%s) > $tmp_recover   cmd=\"systemctl stop keycloak &amp;&amp; &lt;keycloak_dir>\/bin\/kc.sh build >\/dev\/null &amp;&amp; systemctl start keycloak\"   timeout 50s bash -c \"$cmd\" &amp; disown }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0440\u0435\u0431\u0438\u043b\u0434\u0430 \u0432 \u0444\u043e\u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0447\u0430\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0443\u043f\u0430\u0432\u0448\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c bird.service.<\/p>\n<p>\u041d\u0443 \u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u043c tmp-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">tmp_recover=\"\/tmp\/keycloak_recover_try\" touch $tmp_recover recover_try=$(cat $tmp_recover)<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0441\u0443\u043b\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u043b\u0430.<br \/>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>\u0426\u0435\u043b\u0438\u043a\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">#!\/bin\/bash   keyclaok_dir=\"&lt;keycloak_dir>\" tmp_recover=\"\/tmp\/keycloak_recover_try\" touch $tmp_recover   function disable_bird {   pgrep bird > \/dev\/null 2>&amp;1   bird_status=$?   if [[ \"$bird_status\"  == \"1\" ]]     then       echo \"Bird disabled\"     else       \/bin\/systemctl stop bird       echo \"Bird disabled\"   fi }   function enable_bird {   pgrep bird > \/dev\/null 2>&amp;1   bird_status=$?   if [[ \"$bird_status\"  == \"1\" ]]     then       echo \"Bird enabled\"     then       \/bin\/systemctl start bird       echo \"Bird enabled\"   fi }   function keycloak_healthcheck {   app_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['status'])\" 2>\/dev\/null)   db_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['checks'][0]['status'])\" 2>\/dev\/null)     if [ \"$app_status\" != \"UP\" ] || [ \"$db_status\" != \"UP\" ]     then       healthcheck=1     else       healthcheck=0   fi }   # \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0432 background \u0441 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c function keycloak_recover {   echo $(date +%s) > $tmp_recover   cmd=\"systemctl stop keycloak &amp;&amp; &lt;keycloak_dir>\/bin\/kc.sh build >\/dev\/null &amp;&amp; systemctl start keycloak\"   timeout 50s bash -c \"$cmd\" &amp; disown }   keycloak_healthcheck # \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 recover_try=$(cat $tmp_recover) # \u0415\u0441\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u0440\u043e\u0448\u043b\u043e if [[ ! -z \"$recover_try\" ]]   then     let \"try_s = $(date +%s) - $recover_try\" fi   if [[ \"$healthcheck\" == 0 ]]   then     enable_bird     echo \"Keycloak is ok\"     echo \"\" > $tmp_recover     exit 0     elif [[ \"$healthcheck\" != 0 ]]   then     disable_bird       if [[ -z \"$recover_try\" ]]       then         keycloak_recover         exit 2       elif [[ ! -z \"$recover_try\" &amp;&amp; \"$try_s\" -ge 60 ]]       then           if [[ \"$app_status\" != \"UP\" ]]           then             echo \"Keycloak service is down, bird disabled\"         elif [[ \"$db_status\" != \"UP\" ]]           then             echo \"Keycloak database problem, bird disabled\"         fi         exit 2     fi fi<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043a\u043e\u043d\u0441\u0443\u043b\u0430:  <\/p>\n<pre><code class=\"bash\">{   \"check\": {   \"id\": \"Keycloak\",   \"name\": \"Keycloak healthcheck\",   \"args\": [\"\/opt\/consul\/check\/script-check-keycloak.sh\"],   \"interval\": \"15s\",   \"timeout\": \"15s\"   } }<\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0433\u0435\u043e\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438, \u043d\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c.\u00a0<\/p>\n<p>\u041c\u044b \u0436\u0438\u0432\u0451\u043c \u0432 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u0430, \u0438 \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u043d\u0430 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u0430 \u0441\u0431\u043e\u0439. \u0417\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0445 \u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439.<\/p>\n<h4>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/h4>\n<p><a href=\"https:\/\/dantheengineer.com\/keycloak-on-distributed-sql-cockroach-part-2-2\/\"><u>Keycloak on Distributed SQL (CockroachDB) &#8212; Part 2\/2<\/u><\/a><\/p>\n<p><a href=\"https:\/\/infinispan.org\/docs\/stable\/titles\/server\/server.html\"><u>Guide to Infinispan Server<\/u><\/a><\/p>\n<p><a href=\"https:\/\/www.keycloak.org\/server\/caching\"><u>Configuring distributed caches<\/u><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/766284\/\"> https:\/\/habr.com\/ru\/articles\/766284\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044f \u0443 \u043d\u0430\u0441 \u0432 tutu Keycloak, \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0418 \u0435\u0441\u043b\u0438 \u0441 \u0411\u0414 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0442\u043e \u0432\u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043e\u0431\u043c\u0435\u043d \u043a\u0435\u0448\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 Keycloak \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u0434\u0430\u0447\u0435\u0439.<\/p>\n<p>\u041c\u044b \u0443\u043f\u0451\u0440\u043b\u0438\u0441\u044c \u0432 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Keycloak \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f UDP-\u043c\u0443\u043b\u044c\u0442\u0438\u043a\u0430\u0441\u0442. \u0418 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435 \u043d\u043e\u0434\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u0441\u0435\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0426\u041e\u0414\u0430). \u0415\u0441\u043b\u0438 \u0441 \u044d\u0442\u0438\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u043c \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u043e \u043c\u044b \u043b\u0438\u0448\u0438\u043c\u0441\u044f Keycloak. \u041d\u0430\u0441 \u044d\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u043e.<\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0434\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u0426\u041e\u0414\u0430\u043c\u0438, \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0445 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Keycloak \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 JGroups \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u0441\u0442\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>\u0411\u043e\u043d\u0443\u0441\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0443 shell-\u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f Consul, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0441\u043d\u044f\u0442\u0438\u044f \u0430\u043d\u043e\u043d\u0441\u043e\u0432 \u043f\u0443\u0442\u0451\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f bird \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u041d\u0430\u043c\u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044f \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0451\u0440\u043d\u0443\u0442\u043e \u0432 systemd-\u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<p>Keycloak \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>CLI: kc.sh\u00a0&#8212;key=value.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f: KC_KEY=value.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438: key=value.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0430\u0439\u043b Java KeyStore: kc.key=value.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0447\u044c \u043f\u0440\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e, \u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0441\u0430\u043c\u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.\u00a0<br \/>\u0412 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u044f \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<h4>\u0414\u0430\u043d\u043e<\/h4>\n<ul>\n<li>\n<p>\u041d\u043e\u0434\u0430 keycloak1.<\/p>\n<\/li>\n<li>\n<p>Keycloak \u0432\u0435\u0440\u0441\u0438\u0438 20, \u0437\u0430\u0432\u0451\u0440\u043d\u0443\u0442\u0430\u044f \u0432 systemd-\u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c IP-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438. \u041a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0434\u0435 \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth1, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0447\u0435\u0440\u0435\u0437 bgp \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f anycast IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 Keycloak, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430<\/h4>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c Keycloak \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u043c \u0438 \u0433\u0435\u043e\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0436\u0451\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0431\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u043e\u0434 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<br \/>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c custom transport stack.<\/p>\n<h4>TCPPING<\/h4>\n<p>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Keycloak.<\/p>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u00a0<strong>conf\/cache-ispn.xml<\/strong>\u00a0\u0432 \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b\u00a0<strong>conf\/custom-cache-ispn.xml.<\/strong><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u044e infinispan \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"xml\">  &lt;jgroups>         &lt;stack name=\"add_tcpping\" extends=\"tcp\">             &lt;TCPPING initial_hosts=\"&lt;eth0_ip_keycloak1>[7800],&lt;eth0_ip_keyclaok2>[7800],&lt;eth0_ip_keycloak3>[7800]\"                      port_range=\"0\"                      stack.combine=\"REPLACE\"                      stack.position=\"MPING\"             \/>         &lt;\/stack>     &lt;\/jgroups>     &lt;cache-container name=\"keycloak\">         &lt;transport lock-timeout=\"60000\" stack=\"add_tcpping\"\/><\/code><\/pre>\n<p>stack name \u2015 \u0438\u043c\u044f \u0441\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 transport. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u0418\u043c\u044f \u0441\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u043e\u0433\u0430\u0445.<\/p>\n<p>initial_hosts \u2015 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0441 \u043f\u043e\u0440\u0442\u0430\u043c\u0438 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 Keycloak-\u043d\u043e\u0434.<\/p>\n<p>port_range \u2015 TCPPING \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u043e\u0434 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0442\u0430 + port_range. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0440\u0442 7800.<\/p>\n<p>stack.combine \u2015 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. REPLACE \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b.<\/p>\n<p>stack.position \u2015 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u0435\u043d\u044f\u0435\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<strong>cache-config-file<\/strong>\u00a0\u043d\u0430\u0448 .xml-\u0444\u0430\u0439\u043b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u00a0<strong>http-host<\/strong>\u00a0\u0443\u043a\u0430\u0437\u0430\u0442\u044c anycast-\u0430\u0434\u0440\u0435\u0441 (cache=ispn \u2015 \u044d\u0442\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435):<\/p>\n<pre><code>cache=ispn cache-config-file=cache-ispn-tcpping.xml   http-host=&lt;anycast_eth1_ip><\/code><\/pre>\n<p>\u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c anycast-\u0430\u0434\u0440\u0435\u0441, \u043d\u0430\u0434\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c IP-\u0430\u0434\u0440\u0435\u0441 \u0445\u043e\u0441\u0442\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 infinispan \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u043f\u043e\u0440\u0442 7800. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 IP-\u0430\u0434\u0440\u0435\u0441 \u043d\u043e\u0434\u044b:<\/p>\n<pre><code>bin\/kc.sh start -Djgroups.bind.address=&lt;eth0_ip><\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043b\u043e\u0433\u0430\u0445, \u0447\u0442\u043e JGroups \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c add_tcpping:<\/p>\n<pre><code>2023-04-21 10:40:54,586 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN` with stack `add_tcpping`<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u0434 \u0441 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043d\u043e\u0432\u044b\u0439 \u0445\u043e\u0441\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0435\u0433\u043e:<\/p>\n<pre><code>2023-04-21 10:41:02,197 INFO  [org.infinispan.CLUSTER] (jgroups-12,keycloak1-57393) ISPN100000: Node keycloak2-60977 joined the cluster 2023-04-21 10:41:02,643 INFO  [org.infinispan.CLUSTER] (jgroups-5,keycloak1-57393) [Context=authenticationSessions] ISPN100002: Starting rebalance with members [keycloak1-57393, keycloak2-60977], phase READ_OLD_WRITE_ALL, topology id 7 2023-04-21 10:41:06,963 INFO  [org.infinispan.CLUSTER] (jgroups-12,keycloak1-57393) ISPN100000: Node keycloak3-7710 joined the cluster 2023-04-21 10:41:07,242 INFO  [org.infinispan.CLUSTER] (jgroups-12,keycloak1-57393) [Context=authenticationSessions] ISPN100002: Starting rebalance with members [keycloak1-57393, keycloak2-60977, keycloak3-7710], phase READ_OLD_WRITE_ALL, topology id 11<\/code><\/pre>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n<h4>\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435<\/h4>\n<p>\u041f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432 .xml-\u0444\u0430\u0439\u043b\u0435, \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0442\u0435\u043a\u0430 TCP, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438:<\/p>\n<pre><code>lib\/lib\/main\/org.infinispan.infinispan-core-&lt;version>.jar\/default-configs\/default-jgroups-tcp.xml<\/code><\/pre>\n<p>\u0422\u0430\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f MPING. \u0412\u00a0<strong>conf\/custom-cache-ispn.xml\u00a0<\/strong>c \u043f\u043e\u043c\u043e\u0449\u044c\u044e stack.position \u043c\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c MPING, \u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e stack.combine \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 TCPPING.<\/p>\n<h4>HashiCorp Consul<\/h4>\n<p>\u0412\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 anycast (\u0443 \u043d\u0430\u0441 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e bird), \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u043d\u043e \u0432\u0430\u043c \u043d\u0430\u0434\u043e \u043a\u0430\u043a-\u0442\u043e \u0441\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u043d\u043e\u043d\u0441\u044b, \u0435\u0441\u043b\u0438 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e, \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043d\u0430\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0443\u043b, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u0438\u0448\u044c shell-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0437 \u0432 15 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>Keycloak \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 healthcheck, \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<br \/> \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e, \u043d\u0430\u0434\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e:<\/p>\n<pre><code>health-enabled=true<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u044b:<\/p>\n<pre><code>\/health \/health\/live \/health\/ready<\/code><\/pre>\n<p>\u0411\u0443\u0434\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0451 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"bash\">function keycloak_healthcheck {   app_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['status'])\" 2>\/dev\/null)   db_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['checks'][0]['status'])\" 2>\/dev\/null)     if [ \"$app_status\" != \"UP\" ] || [ \"$db_status\" != \"UP\" ]     then       healthcheck=1     else       healthcheck=0   fi }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 Keycloak \u0440\u0435\u0431\u0438\u043b\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:   <\/p>\n<pre><code class=\"bash\">function keycloak_recover {   echo $(date +%s) > $tmp_recover   cmd=\"systemctl stop keycloak &amp;&amp; &lt;keycloak_dir>\/bin\/kc.sh build >\/dev\/null &amp;&amp; systemctl start keycloak\"   timeout 50s bash -c \"$cmd\" &amp; disown }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0440\u0435\u0431\u0438\u043b\u0434\u0430 \u0432 \u0444\u043e\u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0447\u0430\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0443\u043f\u0430\u0432\u0448\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c bird.service.<\/p>\n<p>\u041d\u0443 \u0438 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0451\u043c tmp-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">tmp_recover=\"\/tmp\/keycloak_recover_try\" touch $tmp_recover recover_try=$(cat $tmp_recover)<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043e\u043d\u0441\u0443\u043b\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0443\u0442\u043e\u0440\u0438\u043b\u0430.<br \/>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>\u0426\u0435\u043b\u0438\u043a\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"bash\">#!\/bin\/bash   keyclaok_dir=\"&lt;keycloak_dir>\" tmp_recover=\"\/tmp\/keycloak_recover_try\" touch $tmp_recover   function disable_bird {   pgrep bird > \/dev\/null 2>&amp;1   bird_status=$?   if [[ \"$bird_status\"  == \"1\" ]]     then       echo \"Bird disabled\"     else       \/bin\/systemctl stop bird       echo \"Bird disabled\"   fi }   function enable_bird {   pgrep bird > \/dev\/null 2>&amp;1   bird_status=$?   if [[ \"$bird_status\"  == \"1\" ]]     then       echo \"Bird enabled\"     then       \/bin\/systemctl start bird       echo \"Bird enabled\"   fi }   function keycloak_healthcheck {   app_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['status'])\" 2>\/dev\/null)   db_status=$(curl -sk https:\/\/127.0.0.1\/health\/ready | python -c \"import sys, json; print(json.load(sys.stdin)['checks'][0]['status'])\" 2>\/dev\/null)     if [ \"$app_status\" != \"UP\" ] || [ \"$db_status\" != \"UP\" ]     then       healthcheck=1     else       healthcheck=0   fi }   # \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u0432 background \u0441 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u043e\u043c function keycloak_recover {   echo $(date +%s) > $tmp_recover   cmd=\"systemctl stop keycloak &amp;&amp; &lt;keycloak_dir>\/bin\/kc.sh build >\/dev\/null &amp;&amp; systemctl start keycloak\"   timeout 50s bash -c \"$cmd\" &amp; disown }   keycloak_healthcheck # \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 recover_try=$(cat $tmp_recover) # \u0415\u0441\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u0440\u043e\u0448\u043b\u043e if [[ ! -z \"$recover_try\" ]]   then     let \"try_s = $(date +%s) - $recover_try\" fi   if [[ \"$healthcheck\" == 0 ]]   then     enable_bird     echo \"Keycloak is ok\"     echo \"\" > $tmp_recover     exit 0     elif [[ \"$healthcheck\" != 0 ]]   then     disable_bird       if [[ -z \"$recover_try\" ]]       then         keycloak_recover         exit 2       elif [[ ! -z \"$recover_try\" &amp;&amp; \"$try_s\" -ge 60 ]]       then           if [[ \"$app_status\" != \"UP\" ]]           then             echo \"Keycloak service is down, bird disabled\"         elif [[ \"$db_status\" != \"UP\" ]]           then             echo \"Keycloak database problem, bird disabled\"         fi         exit 2     fi fi<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043a\u043e\u043d\u0441\u0443\u043b\u0430:  <\/p>\n<pre><code class=\"bash\">{   \"check\": {   \"id\": \"Keycloak\",   \"name\": \"Keycloak healthcheck\",   \"args\": [\"\/opt\/consul\/check\/script-check-keycloak.sh\"],   \"interval\": \"15s\",   \"timeout\": \"15s\"   } }<\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0433\u0435\u043e\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0451, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u0438, \u043d\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c.\u00a0<\/p>\n<p>\u041c\u044b \u0436\u0438\u0432\u0451\u043c \u0432 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u0430, \u0438 \u0437\u0430 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u043d\u0430 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u0430 \u0441\u0431\u043e\u0439. \u0417\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0445 \u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439.<\/p>\n<h4>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438<\/h4>\n<p><a href=\"https:\/\/dantheengineer.com\/keycloak-on-distributed-sql-cockroach-part-2-2\/\"><u>Keycloak on Distributed SQL (CockroachDB) &#8212; Part 2\/2<\/u><\/a><\/p>\n<p><a href=\"https:\/\/infinispan.org\/docs\/stable\/titles\/server\/server.html\"><u>Guide to Infinispan Server<\/u><\/a><\/p>\n<p><a href=\"https:\/\/www.keycloak.org\/server\/caching\"><u>Configuring distributed caches<\/u><\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/766284\/\"> https:\/\/habr.com\/ru\/articles\/766284\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-357017","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=357017"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/357017\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=357017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=357017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=357017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}