矢量大数据(Geoanalytics Server)之 解除时空数据库ES只读模式

2
分享 2019-05-24
1.问题:
 
执行大数据分析结果写入elasticsearch报错,在GA日志中找到错误如下:


es报错.png


检查ES日志发现,随着磁盘空间逐渐变小,es会报警,日志位置如下:
 

pwd.png



部分信息日志如下:

[2019-04-29T23:59:37,503][INFO ][o.e.c.r.a.DiskThresholdMonitor] [GIS3058.ESRI.LOCAL] low disk watermark [85%] exceeded on [2GaMzNbcTyq6h36aTDigMA][GIS3058.ESRI.LOCAL] [/home/arcgis/arcgis/datastore/usr/arcgisdatastore/elasticdata/nodes/0] free: 48.5gb[14.5%], replicas will not be assigned to this node

[2019-04-29T23:59:37,503][WARN ][o.e.c.r.a.DiskThresholdMonitor] [GIS3058.ESRI.LOCAL] flood stage disk watermark [95%] exceeded on [B1CvIowdQLqj4XeGI-QyOw][GIS3059.ESRI.LOCAL][/home/arcgis/arcgis/datastore/usr/arcgisdatastore/elasticdata/nodes/0] free: 14.8gb[4.4%], all indices on this node will be marked read-only

(译:随着磁盘空间变小,es变成只读模式)

[2019-04-29T23:59:37,504][WARN ][o.e.c.r.a.DiskThresholdMonitor] [GIS3058.ESRI.LOCAL] high disk watermark [90%] exceeded on [g_8zo5BnTii95GWP6TeC-A][GIS3060.ESRI.LOCAL][/home/arcgis/arcgis/datastore/usr/arcgisdatastore/elasticdata/nodes/0] free: 25gb[7.4%], shards will be relocated away from this node

[2019-04-29T23:59:37,504][INFO ][o.e.c.r.a.DiskThresholdMonitor] [GIS3058.ESRI.LOCAL] low disk watermark [85%] exceeded on [hpMCXI-fQk6fGXdx9cRlXA][GIS3064.ESRI.LOCAL][/home/arcgis/arcgis/datastore/usr/arcgisdatastore/elasticdata/nodes/0] free: 46.5gb[13.5%], replicas will not be assigned to this node

[2019-04-29T23:59:37,504][INFO ][o.e.c.r.a.DiskThresholdMonitor] [GIS3058.ESRI.LOCAL] rerouting shards: [high disk watermark exceeded on one or more nodes]
 

2. 原因:
引用参考文章--“这是由于ES新节点的数据目录data存储空间不足,导致从master主节点接收同步数据的时候失败,此时ES集群为了保护数据,会自动把索引分片index置为只读read-only”。

3. 解决方案:
 使用postman直接发送请求给elasticsearch,解除readonly模式。
  • 写入url, 其中IP是任意一台时空库的IP。
  • 验证选择“Basic Auth”,需要在时空库上确认用户名和密码。

        在时空库机器上datastore的安装目录下找到工具listmanageduser,执行获取用户名和密码
        后填入postman。
        工具路径“安装目录\DataStore\tools\listmanageduser”
  • 执行完以上两步后,postman的页面看起来跟图一是一样的。


postman.png


                                                        图一
  • 在请求体中输入以下,输入完成后与图二一致:

{ "index": { "blocks": { "read_only_allow_delete": "false" } } }


postman_es.png



                                                      图二
4 执行“send”发送确认请求处理成功,如下:




true.png




5 执行大数据分析,将结果放入时空库尝试验证。

参考信息:

ES对磁盘空间要求:

https://enterprise.arcgis.com/ ... s.htm

如何连接ES参考:http://zhihu.esrichina.com.cn/article/3235

将ES状态修改为可写: https://blog.csdn.net/newbornz ... 99706

 

2 个评论

这个方法适用于10.8.0以及以前的版本。
从10.8.1之后开始,可以运行datastore自带的工具changedatastoremode.sh,将时空库从只读恢复到读写。需要在时空库集群的master节点上运行。
补充说明:不需要一定在时空库集群的master节点上运行,任意一个时空库节点都可以。

要回复文章请先登录注册