為windows環境的elasticsearch更新license授權檔案
我win7電腦安裝了elasticsearch-2.3.0,一個月以前安裝了shield外掛,為了增加基本的使用者名稱和密碼認證;安裝shield外掛,首先要安裝license,有效期一個月。當時不知道是過期了,只知道elasticsearch啟動不了,然後去看日誌,報:
operation due to expired license. Cluster health, cluster stats and indices stats
operations are blocked on shield license expiration. All data operations (read and write) continue to work.If you have a new license, please update it. Otherwise, please reach out to your support contact.
然後在網上搜到了在linux上如何更新license。基本上都是用curl 命令操作的,對於windows來說不太方便。不過道理都一樣,將新的license提交到elasticsearch;那我們就用postman來提交,提交之前有個問題要注意:雖然license已過期,elasticsearch無法啟動,但是之前配置過使用者名稱密碼,所以只要訪問elasticsearch就要加上使用者名稱和密碼,要不然會報401,許可權不夠。
填入各項資訊後,會給你郵箱傳送一封license的下載地址,有兩個版本2.x和5.x,根據自己的elasticsearch版本選擇
第二步:開啟postman,請求方式為put,填入提交的url地址,在Authorization中填入使用者名稱和密碼,先別傳送
第三步:在body>raw裡面貼上上你申請的license檔案的內容:
第四步:點選send按鈕傳送就更新成功了。然後再啟動elasticsearch就ok了
參考部落格:https://www.cnblogs.com/kasumi/p/6419803.html (linux上更新方式)