title: Reindex from remote host connection timeout
body: <p>I used the reindex api like so</p>
  
  <pre><code>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"
    }
  }
  </code></pre>
  
  <p>now when i watch for the task itself i get</p>
  
  <pre><code>{
    "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
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>I noticed that the transport adress is written as the internal node ip, and not what i passed on in the request (the external ip)</p>
  
  <p>The remote and the destination are not in the same network, so i end up with connection timeout on the task itself</p>
  
  <pre><code>{
  "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"
  }
  }
  }
  ]
  }
  }
  </code></pre>