# Reindex from remote api

**URL:** <https://discuss.elastic.co/t/reindex-from-remote-api/134325>\
**Category:** Elasticsearch\
**Created:** [June 3, 2018, 4:31pm UTC](https://discuss.elastic.co/t/reindex-from-remote-api/134325 "2018-06-03T16:31:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharongur](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@sharongur](https://discuss.elastic.co/u/sharongur)\
**Post date:** [June 3, 2018, 4:31pm UTC](https://discuss.elastic.co/t/reindex-from-remote-api/134325/1 "2018-06-03T16:31:39Z")

</div>

I used the reindex api like so  
POST \_reindex?wait\_for\_completion=false

> {  
> "source": {  
> "remote": {  
> "host": "http://_remote_:9200",  
> "socket\_timeout": "10m",  
> "connect\_timeout": "10m"  
> },  
> "index": "new\_widget",  
> "type": "daddy\_dj",  
> "query": {  
> "match\_all": {}  
> }  
> },  
> "dest": {  
> "index": "something"  
> }  
> }

now when i watch for the task itself i get

> {  
> "node\_failures" : [  
> {  
> "type" : "failed\_node\_exception",  
> "reason" : "Failed node [4AUx4u6jSK2VEUHLF1fVrg]",  
> "caused\_by" : {  
> "type" : "node\_not\_connected\_exception",  
> "reason" : "[4AUx4u6][10.0.0.100:9300] Node not connected"  
> }  
> }  
> ],  
> "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:4059" : {  
> "node" : "-eScfcDxS7qs7AFvEcCPRw",  
> "id" : 4059,  
> "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=10.6.91.5 port=9200 query={\n "match\_all" : { }\n}][new\_widget][daddy\_dj] to [something]",  
> "start\_time\_in\_millis" : 1528043015111,  
> "running\_time\_in\_nanos" : 3667678375,  
> "cancellable" : true  
> }  
> }  
> }  
> }  
> }

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)

The remote and the destination are not in the same network, so i end up with connection timeout on the task itself

> {  
> "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"  
> }  
> }  
> }  
> ]  
> }  
> }

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 1, 2018, 4:31pm UTC](https://discuss.elastic.co/t/reindex-from-remote-api/134325/2 "2018-07-01T16:31:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
