Elasticsearch6.x 升级6.y 是支持滚动升级的,目前我们测试环境只有一个节点只能停机升级了

准备工作

禁用分片分配

curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}
'

执行同步刷新,加速碎片恢复

curl -X POST "localhost:9200/_flush/synced"

关闭老版本

supervisorctl stop elasticsearch

启动新版本

下载安装包

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.4.tar.gz
tar -zvxf elasticsearch-6.2..tar.gz -C /data/app/
chown -R elasticsearch.elasticsearch elasticsearch-6.2.4

拷贝配置文件和数据目录

cp -rf elasticsearch-6.1./config/ elasticsearch-6.2./
cp -rf elasticsearch-6.1./data/ elasticsearch-6.2./

修改配置文件中数据的目录

vim elasticsearch-6.2./config/elasticsearch.yml

# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /data/app/elasticsearch/data

启动新版本

vim /etc/supervisor/conf.d/es-new.conf

[program:elasticsearch-new]
directory=/data/app/elasticsearch-6.2.4/bin/
command=su - elasticsearch -c "/data/app/elasticsearch-6.2.4/bin/elasticsearch"
autostart=true
startsecs=
autorestart=true
startretries=
user=root
priority=
redirect_stderr=true
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=
stdout_logfile=/var/log/elasticsearch/es-new_supervisor.out
stopasgroup=false
killasgroup=false
supervisorctl reload
supervisorctl start elasticsearch-new
supervisorctl status elasticsearch STOPPED May 22 12:58 PM
elasticsearch-head RUNNING pid , uptime ::
elasticsearch-new RUNNING pid , uptime ::
kibana RUNNING pid , uptime ::

等待集群状态健康状态为yellow就行了

curl -X GET "localhost:9200/_cat/health"

 :: elasticsearchbigdata yellow         - 50.0%

curl -X GET "localhost:9200/_cat/recovery"

product_brand_100301_shop_330778_current  70ms  existing_store done n/a n/a 192.168.101.55 elasticsearch n/a n/a   100.0%     100.0%       100.0%
shop_brand_100479_current 44ms existing_store done n/a n/a 192.168.101.55 elasticsearch n/a n/a 100.0% 100.0% 100.0%

#恢复分配

curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent": {
"cluster.routing.allocation.enable": null
}
}
'

Elasticsearch6.13 升级6.24 单节点停机升级的更多相关文章

  1. 集群版本升级——rolling upgrade在ES 单节点从 restart 到加入集群,大概要 100s 左右的时间。也就是说,这 100s 内,该节点上的所有分片都是 unassigned 状态

    集群版本升级 Elasticsearch 作为一个新兴项目,版本更新非常快.而且每次版本更新都或多或少带有一些重要的性能优化.稳定性提升等特性.可以说,ES 集群的版本升级,是目前 ES 运维必然要做 ...

  2. cdnbest节点如何升级

    点节点列表==>选中要升级版本的节点==>更多操作==>升级节点 点击后会显示成功,这个时候就只需要等待节点自动升级就好,升级快时几分钟,慢可能就更久点了 但也有特殊情况会升级失败, ...

  3. springboot2.1.3集成单节点elasticsearch6.4.0

    本案例写了一个关于医生医院搜索的例子,包括求和模式下的打分(分值与相关性有关)搜索,单节点时切勿配置节点名称和节点ip.github地址:https://github.com/zhzhair/spri ...

  4. Cloudera Manager安装之利用parcels方式安装单节点集群(包含最新稳定版本或指定版本的安装)(添加服务)(CentOS6.5)(四)

    不多说,直接上干货! 福利 => 每天都推送 欢迎大家,关注微信扫码并加入我的4个微信公众号:   大数据躺过的坑      Java从入门到架构师      人工智能躺过的坑          ...

  5. Hadoop介绍及最新稳定版Hadoop 2.4.1下载地址及单节点安装

     Hadoop介绍 Hadoop是一个能对大量数据进行分布式处理的软件框架.其基本的组成包括hdfs分布式文件系统和可以运行在hdfs文件系统上的MapReduce编程模型,以及基于hdfs和MapR ...

  6. 02_Kafka单节点实践

    1.实践场景 开始前的准备条件: 1) 确认各个节点的jdk版本,将jdk升级到和kafka配套的版本(解压既完成安装,修改/etc/profile下的JAVA_HOME,source /etc/pr ...

  7. hadoop-2.6.0.tar.gz + spark-1.6.1-bin-hadoop2.6.tgz的集群搭建(单节点)(CentOS系统)

    福利 => 每天都推送 欢迎大家,关注微信扫码并加入我的4个微信公众号:   大数据躺过的坑      Java从入门到架构师      人工智能躺过的坑         Java全栈大联盟   ...

  8. MongoDB 3.2复制集单节点部署(四)

    MongoDB在单节点中也可以做复制集,但是仅限于测试实验,最大的好处就是部署方便快速,可以随便添加新节点,节省资源.在这里我使用的是MongoDB 3.2版本进行复制集实验(但MongoDB配置文件 ...

  9. MongoDB 2.6复制集单节点部署(三)

    MongoDB在单节点中也可以做复制集,但是仅限于测试实验,最大的好处就是部署方便快速,可以随便添加新节点,节省资源.在这里我使用的是MongoDB 2.6版本进行复制集实验(但MongoDB配置文件 ...

随机推荐

  1. Git版本控制工具的简单使用

    1.下载gitd客户端,注册github账号. 2.本地生成公钥和私钥,并将公钥粘贴到github上,测试连接. 3.先pull,从远程服务器中下载项目文件,然后再pushi,提交至服务器. 4. g ...

  2. 10.17正式开发stark项目(二)

    2018-10-17 11:09:48 orm补充参考连接: https://www.cnblogs.com/yuanchenqi/articles/8963244.html model 进阶 参考连 ...

  3. Flask web开发之路十四

    今天开始Flask的实战,创建一个项目,实现包括用户登录.注册.注销.发表博客.评论以及检索等功能 首先给出项目结构: 1.config.py文件: 存放各种配置信息 import os # dial ...

  4. ThinkPHP框架 系统规定的方法查询数据库内容!!同时也支持原生的SQL语句!

    <?php namespace Admin\Controller; use Think\Controller; class MainController extends Controller{ ...

  5. tsm 切记

    切记不可删除节点,如果删除下面带的数据也会删除

  6. How to add the ApplicationPoolIdentity to a SQL Server Login

    The ApplicationPoolIdentity is a virtual account in Windows that is dynamically generated when the a ...

  7. 一劳永逸:域名支持通配符,ASP.NET Core中配置CORS

    ASP.NET Core 内置了对 CORS 的支持,使用很简单,只需先在 Startup 的 ConfigureServices() 中添加 CORS 策略: public void Configu ...

  8. SMB服务简介

      1.Samba简介 Samba是种自由软件,用来让UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS(Server Message Block/Common Internet F ...

  9. [No0000183]Parallel Programming with .NET-How PLINQ processes an IEnumerable<T> on multiple cores

    As Ed Essey explained in Partitioning in PLINQ, partitioning is an important step in PLINQ execution ...

  10. DHCP协议和PXE

    在学习IP地址基本概念之后,需要了解到如果需要和其他机器通讯,我们就需要一个通讯地址,我们需要给网卡配置一个地址. 如何配置 IP 地址? 可以用命令行自己配置一个地址.可以使用 ifconfig,也 ...