怎么用大淘客做網(wǎng)站創(chuàng)建網(wǎng)頁(yè)步驟
最近在使用elasticsearch的過程中,使用elastic-head進(jìn)行可視化展示集群的狀態(tài)和信息,從2024年5月18日突然elastic-head無法現(xiàn)在集群的狀態(tài)界面啦,elasticsearch集群狀態(tài)是正常,命令如下:
curl -X GET "localhost:9200/_cluster/health?pretty"
在google頁(yè)面上通過F12查看狀態(tài)和報(bào)錯(cuò)信息如下:
HTTP/1.1 403 Forbiddencontent-type: application/json; charset=UTF-8content-length: 384{"error" : {"root_cause" : [{"type" : "security_exception","reason" : "current license is non-compliant for [security]","license.expired.feature" : "security"}],"type" : "security_exception","reason" : "current license is non-compliant for [security]","license.expired.feature" : "security"},"status" : 403}
通過信息的提示,可以定位到你許可證過期需要重新申請(qǐng)。
正規(guī)的申請(qǐng)步驟如下:
(1)登錄注冊(cè)
Register | Elastic
注冊(cè)成功后,使用的郵件會(huì)收到下載鏈接信息。
(3)點(diǎn)擊下載與ES對(duì)應(yīng)的版本
如下命令是查看es版本的命令:
curl http://localhost:9200
(4)下載的許可證文件上傳到ES服務(wù)器任意位置,許可證文件名可修改.
(5)查看許可證過期時(shí)間命令
?curl -XGET -u?elastic:changeme 'http://localhost:9200/_xpack/license'
(6)使用新下載的許可證
curl -XPUT 'http://localhost:9200/_xpack/license?acknowledge=true' -d @license.json
curl -H "Content-Type: application/json" 'http://localhost:9200/_xpack/license?acknowledge=true' -d @license.json
(7)再次查看許可證過期時(shí)間是否增加
還有個(gè)臨時(shí)解決方案:
原因:ES的X-pack許可證是提供免費(fèi)一個(gè)月的試用,但是到期之后,就會(huì)報(bào)這個(gè)錯(cuò)誤
解決方法
可使用以下任意一種方式:
1.登錄kibana控制臺(tái)執(zhí)行命令
POST /_license/start_basic?acknowledge=true
2.直接請(qǐng)求es
curl -XPOST “http://localhost:9200/_license/start_basic?acknowledge=true”
注意:?以上方式只是?暫時(shí)?解決問題,到一定時(shí)間以后,依然會(huì)出現(xiàn)?證書過期?的錯(cuò)誤,到時(shí)候依然需要再次執(zhí)行以上命令來保證 es 正常運(yùn)行
另外一種方式使用kibana來更新證書,如下是具體更新的界面.