【问题标题】:elasticsearch index deletedelasticsearch索引已删除
【发布时间】:2017-01-16 23:35:14
【问题描述】:

我的 elasticsearch 服务器出现严重问题。

我在一个带有 fosElasticaBundle 的 symfony2 项目中使用 ES 1.7。

今天ES索引被删了两次,不知道是什么原因。

这是我可以在 cluster.log 中读取的日志:

[cluster.metadata] [server] [index] 删除索引

[cluster.metadata] [server] [warning] 删除索引

[cluster.metadata] [server] [please_read] 创建索引,原因 [api],templates [],shards [5]/[1],mappings []

[cluster.metadata] [server] [please_read] update_mapping [info](动态)

问题是,我的 ES 在过去几个月里,在网站处于预生产阶段时从未遇到过此类问题。

你认为这可能来自攻击吗?还是配置错误?

【问题讨论】:

标签: symfony elasticsearch foselasticabundle


【解决方案1】:

这很可能来自攻击。如果您执行<Endpoint>/please_read/_search,您可能会看到类似

的注释
     {
            "_index": "please_read",
            "_type": "info",
            "_id": "AVmZfnjEAQ_HIp2JODbw",
            "_score": 1.0,
            "_source": {
                "Info": "Your DB is Backed up at our servers, to restore send 0.5 BTC to the Bitcoin Address then send an email with your server ip",
                "Bitcoin Address": "12JNfaS2Gzic2vqzGMvDEo38MQSX1kDQrx",
                "Email": "elasticsearch@mail2tor.com"
            }

您应该尝试使您的 elasticsearch 集群安装更加安全以避免此类故障。

也有关于对 mongo/elasticsearch 等开放互联网数据库进行攻击的报告。 http://www.zdnet.com/article/first-came-mass-mongodb-ransacking-now-copycat-ransoms-hit-elasticsearch/

【讨论】:

    【解决方案2】:

    我同意 @dejavu013,这很可能是数据库勒索软件,我建议使用免费和开源的 https://github.com/floragunncom/search-guard 或高级解决方案(如 Elastic X-Pack 或 Compose 的托管 Elasticsearch 的一部分)保护您的 elasticsearch .

    【讨论】:

      【解决方案3】:
      【解决方案4】:

      正如@dejavu013 所说,这确实是一次攻击。

      我开始通过只允许 localhost 访问我的 elasticseach 数据来保护我的数据。

      为此,我编辑了我的配置文件 elasticseach.yml 并添加了这两行:

      networt.host: 127.0.0.1
      http.port: 9200
      

      所以只有 localhost 可以访问数据并发出请求。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-05-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-04-16
        • 2012-11-29
        • 2018-07-23
        相关资源
        最近更新 更多