# Unable to retrieve data through Elasticsearch

**URL:** <https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584>\
**Category:** Elasticsearch\
**Created:** [January 2, 2019, 1:20am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584 "2019-01-02T01:20:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srikar\_Rampally](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Srikar\_Rampally](https://discuss.elastic.co/u/Srikar_Rampally)\
**Post date:** [January 2, 2019, 1:20am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584/1 "2019-01-02T01:20:24Z")

</div>

I'm able to perform all crud operations but whenever I tried to retrieve information through Elasticsearch I'm unable to do so.  
GET  
[http://localhost:8080/topics/](http://localhost:8080/topics/)

{  
"id": "1",  
"name": "Java",  
"desc": "Java Language Course"  
}

The result isnot being displayed  
POST  
[http://localhost:9200/topics/\_search](http://localhost:9200/topics/_search)

{  
"took": 35,  
"timed\_out": false,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"skipped": 0,  
"failed": 0  
},  
"hits": {  
"total": 0,  
"max\_score": null,  
"hits":   
}  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 2, 2019, 1:50am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584/2 "2019-01-02T01:50:45Z")

</div>

```
GET http://localhost:8080/topics/

```

Wrong port?

What's the result of:

```
GET http://localhost:9200/_search
GET http://localhost:9200/_cat/indices?v
```

---

<div class="post-metadata">

**Author:** ![Srikar\_Rampally](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Srikar\_Rampally](https://discuss.elastic.co/u/Srikar_Rampally)\
**Post date:** [January 2, 2019, 2:27am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584/3 "2019-01-02T02:27:14Z")

</div>

the port 8080 is working fine. I have tried changing the port as well. Produced the same results.

GET [http://localhost:9200/\_search](http://localhost:9200/_search)  
Result:  
{  
"took": 35,  
"timed\_out": false,  
"\_shards": {  
"total": 5,  
"successful": 5,  
"skipped": 0,  
"failed": 0  
},  
"hits": {  
"total": 0,  
"max\_score": null,  
"hits":  
}  
}

GET [http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v)

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size  
yellow open topics Rno1Gz78QpChFuIsc0ciUg 5 1 0 0 1.2kb 1.2kb

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 2, 2019, 7:53am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584/4 "2019-01-02T07:53:55Z")

</div>

Elasticsearch does not listen to 2 REST ports. I'm unsure what service is running under 8080.

According to your last post, you did not index any document in elasticsearch. That's why you have no result.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 2, 2019, 7:55am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584/5 "2019-01-02T07:55:09Z")

</div>

Do you by any chance have 2 different Elasticsearch nodes/clusters that listen to ports 8080 and 9200 respectively?

---

<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:** [January 30, 2019, 7:55am UTC](https://discuss.elastic.co/t/unable-to-retrieve-data-through-elasticsearch/162584/6 "2019-01-30T07:55:16Z")

</div>

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