{"id":956,"date":"2021-03-02T15:26:31","date_gmt":"2021-03-02T07:26:31","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=956"},"modified":"2021-03-02T15:26:31","modified_gmt":"2021-03-02T07:26:31","slug":"%e5%a6%82%e4%bd%95%e5%88%a0%e9%99%a48180%e6%b2%a1%e6%9c%89%e5%88%a0%e9%99%a4%e6%8c%89%e9%92%ae%e7%9a%84%e8%a7%92%e8%89%b2","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=956","title":{"rendered":"\u5982\u4f55\u5220\u9664 Manager \u9875\u9762\u6ca1\u6709\u5220\u9664\u6309\u94ae\u7684\u89d2\u8272"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<p>\u4ecb\u7ecd\u4e00\u79cd\u65b9\u6cd5\uff1a\u5982\u4f55\u5220\u9664 8180 \u9875\u9762\u6ca1\u6709\u5220\u9664\u6309\u94ae\uff08<img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd9.png\" alt=\"\" \/>\uff09\u4e14\u4e0d\u9700\u8981\u7684\u89d2\u8272\u3002<\/p>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<p>\u672c\u6587\u4ee5\u5220\u9664 guardian \u670d\u52a1\u4e2d\u7684 CAS Server \u548c CAS Admin Server \u89d2\u8272\u4e3a\u4f8b\uff0c\u5206\u4e24\u79cd\u60c5\u51b5\uff1a<\/p>\n<ol>\n<li>manager \u6ca1\u6709\u5f00\u542f HA<\/li>\n<li>manager \u5f00\u542f\u4e86 HA<\/li>\n<\/ol>\n<hr \/>\n<h4>\u64cd\u4f5c\u6b65\u9aa4<\/h4>\n<h5>\u5728 guardian \u9875\u9762\u5148\u505c\u6389\u8981\u5220\u9664\u7684\u8be5\u89d2\u8272<\/h5>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd1.png\" alt=\"\" \/><\/p>\n<h5>\u540e\u53f0\u767b\u5f55 manager \u7684\u6570\u636e\u5e93<\/h5>\n<ol>\n<li>\n<p>Manager \u6ca1\u6709\u5f00\u542f HA<br \/>\n\u767b\u5f55manager\u7ba1\u7406\u8282\u70b9\u7684\u540e\u53f0\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u8fdb\u5165manager\u7684\u6570\u636e\u5e93<\/p>\n<pre><code class=\"language-shell\">mysql -h localhost -u transwarp -p$(cat \/etc\/transwarp-manager\/master\/db.properties | grep io.transwarp.manager.db.password | awk -F = '{print $2}') -S \/var\/run\/mariadb\/transwarp-manager-db.sock -D transwarp_manager<\/code><\/pre>\n<\/li>\n<li>\n<p>Manager \u5f00\u542f\u4e86 HA<br \/>\n\u767b\u5f55 manager \u7ba1\u7406\u8282\u70b9\u7684\u540e\u53f0\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u8fdb\u5165manager\u7684\u6570\u636e\u5e93<br \/>\n1) \u67e5\u770b\u5bb9\u5668ID<\/p>\n<pre><code class=\"language-shell\">docker ps | grep txsql<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd3.png\" alt=\"\" \/><br \/>\n2) \u8fdb\u5165\u6700\u540e\u4e00\u5217\u662f Manager-Txsql \u7684\u8be5\u5bb9\u5668<\/p>\n<pre><code class=\"language-shell\">docker exec -it 490ee0939fd5 bash<\/code><\/pre>\n<p>3) \u8fdb\u5165\u6570\u636e\u5e93<\/p>\n<pre><code class=\"language-shell\">\/usr\/bin\/txsql\/tools\/txsql.sh shell<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd4.png\" alt=\"\" \/><\/p>\n<\/li>\n<\/ol>\n<h5>\u5728\u6570\u636e\u5e93\u4e2d\u67e5\u8be2guardian\u89d2\u8272<\/h5>\n<pre><code class=\"language-sql\">use transwarp_manager;\nselect * from role where type='CAS_SERVER';\nselect * from role where type='CAS_ADMIN_SERVER';<\/code><\/pre>\n<p>\u9700\u8981\u5220\u9664\u7684\u89d2\u8272\u5728\u9875\u9762\u5df2\u7ecf\u505c\u6b62\u6389\u4e86\uff0c\u6240\u4ee5 toStart \u8be5\u5217\u7684\u503c\u4e3a 0 \uff0c\u6b63\u5e38\u89d2\u8272\u7684\u503c\u662f 1 \uff0c\u53e6\u5916\u4e5f\u53ef\u4ee5\u6839\u636e nodeId \u6765\u786e\u8ba4\u9700\u8981\u5220\u9664\u7684\u89d2\u8272<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd6.png\" alt=\"\" \/><\/p>\n<h5>\u5728\u6570\u636e\u5e93\u5220\u9664\u89d2\u8272<\/h5>\n<p>\u6b64\u5904\u6839\u636e\u89d2\u8272\u540d\u79f0\u548c\u8282\u70b9id\u6765\u5220\u9664\u89d2\u8272<\/p>\n<pre><code class=\"language-sql\">delete from role where type='CAS_ADMIN_SERVER' and nodeId=5;\ndelete from role where type='CAS_SERVER' and nodeId=5;<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd7.png\" alt=\"\" \/><\/p>\n<h5>\u5728guardian\u9875\u9762\u5237\u65b0\u6d4f\u89c8\u5668\uff0c\u9a8c\u8bc1\u8be5\u89d2\u8272\u662f\u5426\u5220\u9664\u6210\u529f<\/h5>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/09\/gd8.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u4ecb\u7ecd\u4e00\u79cd\u65b9\u6cd5\uff1a\u5982\u4f55\u5220\u9664 8180 \u9875\u9762\u6ca1\u6709\u5220\u9664\u6309\u94ae\uff08\uff09\u4e14\u4e0d\u9700\u8981\u7684\u89d2\u8272\u3002 \u8be6\u7ec6\u8bf4\u660e \u672c\u6587\u4ee5\u5220\u9664 gua ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=956\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-956","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=956"}],"version-history":[{"count":2,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/956\/revisions"}],"predecessor-version":[{"id":5387,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/956\/revisions\/5387"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}