開啟遠(yuǎn)程訪問
# 1.默認(rèn)ES無法使用主機(jī)ip進(jìn)行遠(yuǎn)程連接,需要開啟遠(yuǎn)程連接權(quán)限
- 修改ES安裝包中config/elasticsearch.yml配置文件
$ vim elasticsearch.yml
# 2.重新啟動(dòng)ES服務(wù)
- ./elasticsearch
- 啟動(dòng)出現(xiàn)如下錯(cuò)誤:
`bootstrap check failure [1] of [4]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
`bootstrap check failure [2] of [4]: max number of threads [3802] for user [chenyn] is too low, increase to at least [4096]
`bootstrap check failure [3] of [4]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
`bootstrap check failure [4] of [4]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers
# 3.解決錯(cuò)誤-1
?文章來源:http://www.zghlxwxcb.cn/news/detail-510253.html
$ vim /etc/security/limits.conf
# 在最后面追加下面內(nèi)容
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096
# 退出重新登錄檢測配置是否生效:
ulimit -Hn
ulimit -Sn
ulimit -Hu
ulimit -Su
# 3.解決錯(cuò)誤-2
#進(jìn)入limits.d目錄下修改配置文件。
$ vim /etc/security/limits.d/20-nproc.conf
# 修改為
啟動(dòng)ES用戶名 soft nproc 4096
# 3.解決錯(cuò)誤-3
# 編輯sysctl.conf文件
$ vim /etc/sysctl.conf
vm.max_map_count=655360 #centos7 系統(tǒng)
vm.max_map_count=262144 #ubuntu 系統(tǒng)
# 執(zhí)行以下命令生效:
$ sysctl -p
# 3.解決錯(cuò)誤-4
# 編輯elasticsearch.yml配置文件
$ vim conf/elasticsearch.yml
cluster.initial_master_nodes: ["node-1"]
?文章來源地址http://www.zghlxwxcb.cn/news/detail-510253.html
# 4.重啟啟動(dòng)ES服務(wù),并通過瀏覽器訪問
{
"name": "localhost.localdomain",
"cluster_name": "elasticsearch",
"cluster_uuid": "OWh3xLYwR-6lZ_fQNhVY3A",
"version": {
"number": "7.14.0",
"build_flavor": "default",
"build_type": "tar",
"build_hash": "dd5a0a2acaa2045ff9624f3729fc8a6f40835aa1",
"build_date": "2021-07-29T20:49:32.864135063Z",
"build_snapshot": false,
"lucene_version": "8.9.0",
"minimum_wire_compatibility_version": "6.8.0",
"minimum_index_compatibility_version": "6.0.0-beta1"
},
"tagline": "You Know, for Search"
}
到了這里,關(guān)于ElasticSearch開啟遠(yuǎn)程連接的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!