从远程主机连接超时重新索引

时间:2018-06-03 16:41:08

标签: elasticsearch kibana

我使用了像reindex api这样的

POST _reindex?wait_for_completion=false
{
  "source": {
    "remote": {
      "host": "http://*externalIp*:9200",
      "socket_timeout": "10m",
      "connect_timeout": "10m"
    },
    "index": "new_widget",
    "type": "daddy_dj",
    "query": {
      "match_all": {}
    }
  },
  "dest": {
    "index": "something"
  }
}

现在,当我看到任务本身时,我得到了

{
  "nodes" : {
    "-eScfcDxS7qs7AFvEcCPRw" : {
      "name" : "-eScfcD",
      "transport_address" : "10.0.0.97:9300",
      "host" : "10.0.0.97",
      "ip" : "10.0.0.97:9300",
      "roles" : [ ],
      "attributes" : {
        "ml.machine_memory" : "33567498240",
        "ml.max_open_jobs" : "20",
        "ml.enabled" : "true"
      },
      "tasks" : {
        "-eScfcDxS7qs7AFvEcCPRw:6724" : {
          "node" : "-eScfcDxS7qs7AFvEcCPRw",
          "id" : 6724,
          "type" : "transport",
          "action" : "indices:data/write/reindex",
          "status" : {
            "total" : 0,
            "updated" : 0,
            "created" : 0,
            "deleted" : 0,
            "batches" : 0,
            "version_conflicts" : 0,
            "noops" : 0,
            "retries" : {
              "bulk" : 0,
              "search" : 0
            },
            "throttled_millis" : 0,
            "requests_per_second" : -1.0,
            "throttled_until_millis" : 0
          },
          "description" : "reindex from [host=**ExternalIp** port=9200 query={\n  \"match_all\" : { }\n}][new_widget][daddy_dj] to [something]",
          "start_time_in_millis" : 1528043930843,
          "running_time_in_nanos" : 2750300078,
          "cancellable" : true
        }
      }
    }
  }
}

我注意到传输地址被写为内部节点ip,而不是我在请求中传递的内容(外部ip)

远程和目的地不在同一个网络中,所以我最终会在任务本身上出现连接超时

{
"took": 4,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": ".tasks",
"_type": "task",
"_id": "-eScfcDxS7qs7AFvEcCPRw:2832",
"_score": 1,
"_source": {
"completed": true,
"task": {
"node": "-eScfcDxS7qs7AFvEcCPRw",
"id": 2832,
"type": "transport",
"action": "indices:data/write/reindex",
"status": {
"total": 0,
"updated": 0,
"created": 0,
"deleted": 0,
"batches": 0,
"version_conflicts": 0,
"noops": 0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"requests_per_second": -1,
"throttled_until_millis": 0
},
"description": """
reindex from [host=externalIp port=9200 query={
"match_all" : { }
}][new_widget][daddy_dj] to [something]
""",
"start_time_in_millis": 1528042617142,
"running_time_in_nanos": 127243825505,
"cancellable": true
},
"error": {
"type": "connect_exception",
"reason": "Connection timed out"
}
}
}
]
}
}

0 个答案:

没有答案