国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Elasticsearch7.7設置賬號密碼時的邏輯矛盾問題

這篇具有很好參考價值的文章主要介紹了Elasticsearch7.7設置賬號密碼時的邏輯矛盾問題。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

????????2019年1月30日,外媒又報道了一起Elasticsearch數(shù)據(jù)泄露事件!2019年1月份的至少有6起Elasticsearch數(shù)據(jù)泄露事件了。原因何在,很簡單,開發(fā)者在服務啟動之后總是懶得去修改,哪怕是添加個密碼,不信?你去看看你們公司的REDIS服務器,看看有多少設置了密碼,至少我公司不相關的部門的業(yè)務,他們的REDIS我都能遠程登錄(因?qū)雨P系我知道了redis服務器IP)。
好吧,回到Elasticsearch7.7的密碼設置問題上來吧,說說我遇到的Elasticsearch設置賬號密碼時的矛盾問題,很扯蛋。不過也不要上綱上線,因為這問題肯定是可以解決的,但我在寫這篇筆記的時候還沒有找到方法,而我又想基于此留下點筆記。操作過程如下:

#1.開始給elasticsearch設置密碼

tiger@n21-045-025:/usr/share/elasticsearch$ sudo bin/elasticsearch-setup-passwords interactive

It doesn't look like the X-Pack security feature is enabled on?this?Elasticsearch node.

Please check?if?you have enabled X-Pack security in your elasticsearch.yml configuration file.

ERROR: X-Pack Security is disabled by configuration.

#提示沒有在配置文件中開啟X-Pack,OK

#2.開啟X-Pack配置

tiger@n21-045-025:/opt/elasticsearch$ sudo vim /etc/elasticsearch/elasticsearch.yml

http.cors.enabled:?true

http.cors.allow-origin:?"*"

#新增加了以下兩行配置

xpack.security.enabled:?true

xpack.security.transport.ssl.enabled:?true

#3.增加完配置之后要重啟elasticsearch不?你說不重啟能行嗎?不重啟就還是沒有配置啊。

#重啟elasticsearch之后,然后我們再來配置密碼

#修改完配置重啟es之后使用elasticsearch-setup-passwords interactive

tiger@n21-045-025:/usr/share/elasticsearch$ sudo bin/elasticsearch-setup-passwords interactive

#Initiating the setup of passwords?for?reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.

Enter password?for?[elastic]:

Reenter password?for?[elastic]:

Enter password?for?[apm_system]:

Reenter password?for?[apm_system]:

Enter password?for?[kibana]:

Reenter password?for?[kibana]:

Enter password?for?[logstash_system]:

Reenter password?for?[logstash_system]:

Enter password?for?[beats_system]:

Reenter password?for?[beats_system]:

Enter password?for?[remote_monitoring_user]:

Reenter password?for?[remote_monitoring_user]:

Unexpected response code [503] from calling PUT http://192.21.15.25:9200/_security/user/apm_system/_password?pretty

Cause: Cluster state has not been recovered yet, cannot write to the [null] index

Possible next steps:

* Try running?this?tool again.

* Try running with the --verbose parameter?for?additional messages.

* Check the elasticsearch logs?for?additional error details.

* Use the change password API manually.

ERROR: Failed to set password?for?user [apm_system]
#看設置報錯:

tiger@n21-045-025:/usr/share/elasticsearch$ sudo bin/elasticsearch-setup-passwords interactive --verbose

Running with configuration path: /etc/elasticsearch

Testing?if?bootstrap password is valid?for?http://192.21.15.25:9200/_security/_authenticate?pretty

Checking cluster health: http://192.21.15.25:9200/_cluster/health?pretty

{

??"error"?: {

????"root_cause"?: [

??????{

????????"type"?:?"master_not_discovered_exception",

????????"reason"?:?null

??????}

????],

????"type"?:?"master_not_discovered_exception",

????"reason"?:?null

??},

??"status"?:?503

}

Failed to determine the health of the cluster running at http://192.21.15.25:9200

Unexpected response code [503] from calling GET http://192.21.15.25:9200/_cluster/health?pretty

Cause: master_not_discovered_exception

It is recommended that you resolve the issues with your cluster before running elasticsearch-setup-passwords.

It is very likely that the password changes will fail when run against an unhealthy cluster.

Do you want to?continue?with the password setup process [y/N]ERROR: User cancelled operation

????????看上面的報錯,這時提示9200服務報503錯誤,什么原因呢?我設置了要要賬號密碼啊?,F(xiàn)在從瀏覽器訪問9200端口也是需要賬號密碼才能登錄的,請求http://192.21.15.25:9200/_cluster/health?pretty接口也會阻塞一直不響應,因為在等待賬號密碼呢。
這就矛盾了:我沒啟用xpack.security.enabled時,不能進入設置密碼。但我啟動了之后設置密碼時它會調(diào)用_cluster/health?pretty檢查集群狀態(tài)然后就有問題了。這不矛盾了嗎?

????????網(wǎng)上找了一些資料,包括google,但也都沒有解決:比如 https://stackoverflow.com/questions/61884976/apply-security-on-elk-cluster-authentication-issue 這里說把所有的節(jié)點都加上上面的X-pack配置重啟,然后使用auto進行密碼設置。一樣會出現(xiàn)無法檢查集群健康狀態(tài)的問題。Failed to determine the health of the cluster running at http://192.21.15.25:9200 Unexpected response code [503] from calling GET http://192.21.15.25:9200/_cluster/health?pretty

????????這個肯定不能是個問題!這個也一定能解決的,暫時挺腦火,留個筆記在這里!文章來源地址http://www.zghlxwxcb.cn/news/detail-511633.html

到了這里,關于Elasticsearch7.7設置賬號密碼時的邏輯矛盾問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • docker安裝的elasticsearch容器設置賬號密碼

    docker安裝的elasticsearch容器設置賬號密碼

    我使用的是docker安裝的es 首先進入docker 容器 編輯elasticsearch.yml文件,并向其中添加: 退出容器,重啟elasticsearch,執(zhí)行設置用戶名和密碼的命令 到這里就成功了,歡迎點贊評論提問哦。

    2024年02月15日
    瀏覽(20)
  • linux elasticsearch安裝以及設置安全權限賬號跟密碼

    linux elasticsearch安裝以及設置安全權限賬號跟密碼

    1.下載安裝 1.1 官網(wǎng)下載地址 : https://www.elastic.co/cn/downloads/elasticsearch 選擇自己需要的版本下載,然后上傳到Linux 也可以用Linux命令行,執(zhí)行wget下載: 下載需要版本 執(zhí)行解壓縮命令: tar -zxvf es安裝包 1.2 解決es強依賴jdk問題 由于es和jdk是一個強依賴的關系,所以當我們在新版

    2024年02月15日
    瀏覽(22)
  • ELK: 給Elasticsearch, Kibanan設置訪問的賬號和密碼

    ELK: 給Elasticsearch, Kibanan設置訪問的賬號和密碼

    目錄 1、設置Elasticseach的密碼: 2、設置Kibanan的賬號和密碼: 3、修改Elasticsearch的密碼: 4、補充說明: 1)kibana并沒有自己的賬號和密碼,它使用的就是elasticsearch的賬號密碼。 ?2)在windwos下嘗試命令的方式修改elasticsearch的密碼,失敗的幾種情況: 修改Elasticsearch的配置文件

    2024年02月02日
    瀏覽(35)
  • ES常見問題(2)-ElasticSearch怎么樣設置賬號密碼

    ES常見問題(2)-ElasticSearch怎么樣設置賬號密碼

    有時候我們也需要給ES設置賬號密碼,避免別人使用自己的ES操作,以保證自己的ES的數(shù)據(jù)安全 ES版本 我用的是Elasticsearch 示例版本:7. 8.0 ES自帶的X-Pack密碼驗證 在ES版本7.0之后,默認的情況下,安裝了ES,都會默認下載了 X-Pack , 不再需要自己獨自下載, X-Pack是elasticsearch的一

    2023年04月17日
    瀏覽(24)
  • elasticsearch7.7集群部署以及密碼認證

    1.1 elasticsearch 部署 1.1.1 安裝jdk 略 1.1.2 安裝準備 1、安裝用戶用elastic用戶 2、創(chuàng)建相關目錄及授權 [root@es-node1 ~]# chown -R elastic: elastic/data [root@es-node1 ~]# chmod -R 775 /data 3、root用戶編輯 /etc/security/limits.conf,追加以下內(nèi)容; soft nofile 65536 hard nofile 65536 soft nproc 2048 hard nproc 4096 4、

    2024年02月03日
    瀏覽(24)
  • ElasticSearch7.9.0安裝和開啟登錄密碼

    ElasticSearch7.9.0安裝和開啟登錄密碼

    目錄 1、下載地址 2、安裝ElasticSearch 3、創(chuàng)建用戶組 4、修改es配置文件 5、可能出現(xiàn)問題 1)服務器jdk版本低 2)文件創(chuàng)建權限過低 3)用戶的內(nèi)存太低 4)最大線程數(shù)過低 5)非root用戶出現(xiàn)killed 6、對es配置文件授權 7、使用創(chuàng)建的xg用戶啟動es 8、配置密碼 1)修改配置文件 2)生

    2024年01月18日
    瀏覽(51)
  • docker安裝ElasticSearch7.13.4、配置登錄密碼、開啟HTTPS、安裝ik分詞器

    提示: 運行容器命令 推薦 使用單機多節(jié)點的命令執(zhí)行,所需配置文件要提前準備

    2024年02月14日
    瀏覽(19)
  • elasticsearch7.x 集群的搭建和分片設置

    elasticsearch7.x 集群的搭建和分片設置

    目錄 ? 一、es集群的基本核心概念 二、es集群搭建 三、es集群索引分片管理 3.1創(chuàng)建索引,指定分片 ?3.2索引分片的分配 3.2.1 手動移動分片: ?3.2.1 修改副分片數(shù)量 Cluster 集群: 一個 Elasticsearch 集群由一個或多個節(jié)點(Node)組成,每個集群都有一個共同的集群名稱作為 標識。

    2023年04月25日
    瀏覽(21)
  • ElasticSearch:下載、啟動和賬號密碼登錄

    ElasticSearch:下載、啟動和賬號密碼登錄

    因為我的電腦是 window,以下都是以 window 環(huán)境舉例。 一、下載 Elasticsearch 是使用 java 開發(fā)的,且 7.8 版本的 ES 需要 JDK 版本 1.8 以上,安裝前注意java環(huán)境的準備。 官網(wǎng)地址:https://www.elastic.co/cn/ 下載地址:https://www.elastic.co/cn/downloads/past-releases#elasticsearch 下載后解壓即用,目

    2024年04月22日
    瀏覽(28)
  • MongoDB 設置賬號密碼_mongodb設置用戶名和密碼

    MongoDB 設置賬號密碼_mongodb設置用戶名和密碼

    1、安裝 安裝可以看我這篇文章:https://blog.csdn.net/u014641168/article/details/123937775 2、說明 由于默認安裝的MongoDB是沒有設置用戶密碼的,極其危險,所以需要設置一下用戶密碼 3、創(chuàng)建用戶 用Navicat15連接MongoDB,正常連接沒有問題。 執(zhí)行命令 使用admin數(shù)據(jù)庫 輸入創(chuàng)建用戶命令,返

    2024年02月02日
    瀏覽(19)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包