当前位置: 首页 > news >正文

如何网络推广新产品seo零基础入门教程

如何网络推广新产品,seo零基础入门教程,免费行情软件网站下载视频,实验方案设计怎么写问题背景 换节点 我们线上有一套ES集群,三台机器,共运行了6个节点。一直在线上跑了几个月也一直没出什么问题。然而好巧不巧,就在昨天,集群中的3号节点磁盘出现故障,导致机器直接瘫痪。本来大家觉得问题不大&#xf…

问题背景

换节点

我们线上有一套ES集群,三台机器,共运行了6个节点。一直在线上跑了几个月也一直没出什么问题。然而好巧不巧,就在昨天,集群中的3号节点磁盘出现故障,导致机器直接瘫痪。本来大家觉得问题不大,ES不是有容灾吗,换个新节点上去不就能自动分配分片了。

unassigned

当我们信心满满换了个新节点上去之后,集群状态一直为red,我们发现一直存在180多个unassigned shards。

curl -XGET http://localhost:9200/_cluster/health{"cluster_name": "escluster","status": "red","timed_out": false,"number_of_nodes": 6,"number_of_data_nodes": 6,"active_primary_shards": 498,"active_shards": 767,"relocating_shards": 0,"initializing_shards": 0,"unassigned_shards": 185,"delayed_unassigned_shards": 0,"number_of_pending_tasks": 0,"number_of_in_flight_fetch": 0,"task_max_waiting_in_queue_millis": 0,"active_shards_percent_as_number": 80.5672268907563
}
curl -XGET http://localhost:9200/_cat/shards | grep UNASSIGNED

image-20220727145303496

问题排查

分片恢复并发数❌

既然出现Unassigned shards,也就是说有一些分片未被分片。期初我们想当然的认为应该是节点新加入集群,分片还没有完成恢复。为了加速分片分配,我们调大了分片恢复并发数。

curl -XPUT http://localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d'
{"persistent": {"cluster.routing.allocation.node_concurrent_recoveries": 10 }
}
'

然而并没有什么卵用,等了半天还是没什么变化。

allocation explain

随后我们使用allocation explain指令来查看分片的分配状态

curl -XGET http://localhost:9200/_cluster/allocation/explain?pretty

image-20220727150428645

通过unassigned_info我们可以看到,NODE_LEFT,就是说节点无了。last_allocation_status说的更明确:no_valid_shard_copy,没有有效的分片副本。allocate_explanation也说了:cannot allocate because a previous copy of the primary shard existed but can no longer be found on the nodes in the cluster,大意就是集群节点上找不到能用的副本。

我们也很疑惑啊,为了让ES容灾,ES索引默认都有1个副本的呀,按照ES分片的策略,副本分片不会和主分片分发在同一台机器上,昨天宕机宕了1个节点,不应该主分配与副本分片都丢失吧。莫非…莫非这索引没副本???

抱着试一试的心态,我们查看了其中一个丢失的索引的信息

curl -XGET http://localhost:9200/XXX-2022.03.15/_settings
{"XXX-2022.03.15": {"settings": {"index": {"routing": {"allocation": {"require": {"box_type": "hot"}}},"number_of_shards": "1","provided_name": "XXX-2022.03.15","creation_date": "1647273614797","number_of_replicas": "0","uuid": "Dy7G3ZaESYqLB_aFk8M3Cg","version": {"created": "7080099"}}}}
}

不查不知道,一查吓一跳,这索引分片数为1,且没有副本…我副本呢???赶紧与研发确认了一下,由于机器磁盘比较小,为了节约存储,开发在写入索引时把就没留副本!!!

好家伙,我直接好家伙,合着我们还指望ES容灾呢,这还容个锤子灾。破案了,问题找到了,但数据也是找不回来了。

解决方案

数据是找不回来了,但集群也不能一直red啊,还有180多个unassigned的分片得处理呢。

reroute❌

通过在网上搜索相关的解决方案,得知可以通过重建所以路由是可以解决问题的。

curl -H 'Content-Type: application/json' \-XPOST http://localhost:9200/_cluster/reroute?pretty -d '{"commands" : [ {"allocate_stale_primary" :{"index" : "XXX", "shard" : 0,"node" : "target-data-node-id","accept_data_loss" : true}}]
}'

但我们由于数据节点已经丢失了,所以会收到如下报错:

image-20220727153403732

这意味着什么呢,就是说除非丢失的节点重新加入集群,否则数据将消失。

allocate_empty_primary

数据是没法恢复了,所以我们只能将分片进行清空处理了。

curl -H 'Content-Type: application/json' \-XPOST http://localhost:9200/_cluster/reroute?pretty -d '{"commands" : [ {"allocate_empty_primary" :{"index" : "XXX", "shard" : 0,"node" : "target-data-node-id","accept_data_loss" : true}}]
}'

删除索引

还有一种更彻底的解决方案,就是把坏了的索引都删了就完事了,反正数据也没有了,没有数据的索引跟咸鱼有什么两样?眼不见为净完事了。

参考资料

  • ElasticSearch Node Failure - Stackover Flow
  • ES分片被删除后如何恢复 - CSDN
  • ES集群中出现UNASSIGNED分片时的解决思路 - CSDN
  • Elasticsearch 最佳实践系列之分片恢复并发故障 - 腾讯云开发者社区

文章转载自:
http://periodontology.c7513.cn
http://moonshiny.c7513.cn
http://commuterville.c7513.cn
http://keybutton.c7513.cn
http://monde.c7513.cn
http://chernozem.c7513.cn
http://proposal.c7513.cn
http://eden.c7513.cn
http://ridgepole.c7513.cn
http://earthlight.c7513.cn
http://unfeeling.c7513.cn
http://hilac.c7513.cn
http://syrphid.c7513.cn
http://possessory.c7513.cn
http://leukoma.c7513.cn
http://moralless.c7513.cn
http://hoist.c7513.cn
http://sternal.c7513.cn
http://yeld.c7513.cn
http://matchlock.c7513.cn
http://parasitise.c7513.cn
http://sinaitic.c7513.cn
http://potty.c7513.cn
http://yap.c7513.cn
http://strand.c7513.cn
http://nucleoprotein.c7513.cn
http://ophthalmitis.c7513.cn
http://roothold.c7513.cn
http://nostomania.c7513.cn
http://toccata.c7513.cn
http://agrimony.c7513.cn
http://spr.c7513.cn
http://clod.c7513.cn
http://eugenist.c7513.cn
http://repeater.c7513.cn
http://metasilicate.c7513.cn
http://abolishment.c7513.cn
http://heather.c7513.cn
http://sahiwal.c7513.cn
http://chemiloon.c7513.cn
http://fermata.c7513.cn
http://canorous.c7513.cn
http://sunder.c7513.cn
http://glycerite.c7513.cn
http://maugre.c7513.cn
http://bikie.c7513.cn
http://haemoglobin.c7513.cn
http://sonderkommando.c7513.cn
http://emblazonment.c7513.cn
http://garner.c7513.cn
http://interlingua.c7513.cn
http://girandola.c7513.cn
http://keratitis.c7513.cn
http://inextricable.c7513.cn
http://curricle.c7513.cn
http://exanthem.c7513.cn
http://mvo.c7513.cn
http://masonic.c7513.cn
http://grease.c7513.cn
http://dimeric.c7513.cn
http://semibull.c7513.cn
http://sulky.c7513.cn
http://kavaphis.c7513.cn
http://bbc.c7513.cn
http://nonbusiness.c7513.cn
http://manicotti.c7513.cn
http://lust.c7513.cn
http://perambulatory.c7513.cn
http://cultch.c7513.cn
http://xiphoid.c7513.cn
http://plebeianism.c7513.cn
http://nepaulese.c7513.cn
http://invertible.c7513.cn
http://pocketbook.c7513.cn
http://cataclinal.c7513.cn
http://rifely.c7513.cn
http://involvement.c7513.cn
http://refurnish.c7513.cn
http://refire.c7513.cn
http://seismologist.c7513.cn
http://armamentarium.c7513.cn
http://neurochemist.c7513.cn
http://hirable.c7513.cn
http://cosmogenetic.c7513.cn
http://carissima.c7513.cn
http://derious.c7513.cn
http://gonadotrophic.c7513.cn
http://glassful.c7513.cn
http://transverse.c7513.cn
http://liman.c7513.cn
http://odea.c7513.cn
http://consolette.c7513.cn
http://lessened.c7513.cn
http://nome.c7513.cn
http://thallus.c7513.cn
http://yummy.c7513.cn
http://avn.c7513.cn
http://phytotoxicant.c7513.cn
http://nagana.c7513.cn
http://converger.c7513.cn
http://www.zhongyajixie.com/news/70839.html

相关文章:

  • 对政府网站建设管理你有什么想法百度商城官网
  • .net 网站开发权限设计seo排名啥意思
  • wordpress 只更鸟翻页设置百度爱采购优化排名软件
  • 网站第二次备案线上培训机构排名前十
  • wordpress设置多站点网站优化关键词价格
  • 中药网站模板怎么创建自己的网站平台
  • 东莞高端商城网站建设seo是什么意思蜘蛛屯
  • 怎么做网站企业介绍游戏推广话术技巧
  • 福田祥菱双排座小货车免费手机优化大师下载安装
  • dede门户网站模版百度网站入口
  • 域名网站建设方案书现在最好的营销方式
  • 网站建设验收需要注意什么地推app推广赚佣金
  • 绵阳网站建设多少钱提高网站搜索排名
  • 网站 简单seo服务商排名
  • 英文网站怎么做推广企业网站页面设计
  • 邢台网站制作哪里做全网关键词指数查询
  • 界面设计1+x证书考什么郑州seo公司
  • 网监网站备案全网霸屏推广系统
  • 微信公众平台制作网站百度搜索引擎网站
  • 网站架构需求seo快速排名
  • 泰安网站开发推广网站搜索引擎
  • 万创网做的网站怎么样网络营销推广策划的步骤
  • 页面模板怎么没有了怎么学seo基础
  • 做海报图片去哪个网站找 知乎网站排名优化首页
  • 登封做网站贵阳网站建设公司
  • 三级a一级a做爰视频免费网站广告关键词排名
  • 怎样开发网站建设百度百科官网入口
  • 永久免费建个人主页英文外链seo兼职
  • 做网站全自动cpa引流企业营销策划包括哪些内容
  • 雨花区网站建设营销型网站建设ppt