# Unable to fetch mapping because Kibana requests the wrong URL to ES

**URL:** <https://discuss.elastic.co/t/unable-to-fetch-mapping-because-kibana-requests-the-wrong-url-to-es/87305>\
**Category:** Kibana\
**Created:** [May 26, 2017, 10:42pm UTC](https://discuss.elastic.co/t/unable-to-fetch-mapping-because-kibana-requests-the-wrong-url-to-es/87305 "2017-05-26T22:42:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nodejsdev](https://avatars.discourse-cdn.com/v4/letter/n/cc9497/32.png) [@nodejsdev](https://discuss.elastic.co/u/nodejsdev)\
**Post date:** [May 26, 2017, 10:42pm UTC](https://discuss.elastic.co/t/unable-to-fetch-mapping-because-kibana-requests-the-wrong-url-to-es/87305/1 "2017-05-26T22:42:47Z")

</div>

Hello.

I set up Kibana, Logstash and ES using docker-compose. Everything's working fine except that on the "Configure an index pattern" page Kibana can't find the logstash-\* indices. I looked at Kibana logs and noticed that it does this:

```
GET /elasticsearch/logstash-*/_mapping/field/*?_=1495837868624&ignore_unavailable=false&allow_no_indices=false&include_defaults=true 404 93ms - 9.0B

```

But gets a 404 because it prefixed the url path with /elasticsearch.

However, the indices do exist on this path:

```
curl -u elastic 'localhost:9200/logstash-*/_mapping/field/*'

```

I got this in response:

```
{"logstash-2017.05.26":{"mappings":{"log":{"_ttl":{"full_name":"_ttl","mapping":{}},"stream.keyword":{"full_name":"stream.keyword","mapping":{"keyword":{"type":"keyword"}}}, (...)

```

The existing indices:

```
curl -u elastic:changeme 'localhost:9200/_cat/indices?v'
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open .watcher-history-3-2017.05.26 StJvvWtJTtWouVXwRO4I2A 1 1 821 0 1.1mb 1.1mb
yellow open .monitoring-logstash-2-2017.05.26 E7xFZ8pyR3qNMBnBUQ3Lmw 1 1 858 0 352.1kb 352.1kb
yellow open .triggered_watches 6RXj7AqlR9idgF9AeCp_fw 1 1 5 48 27kb 27kb
yellow open .monitoring-es-2-2017.05.26 mpi3d0DjRPCEHmQijSQnKA 1 1 16540 116 11.5mb 11.5mb
yellow open logstash-2017.05.26 6MqtqxsJQuW1sbLqfA_bSw 5 1 5552 0 767.7kb 767.7kb
yellow open .kibana JoCJ6Q9MRL2CjTo1qaib-w 1 1 3 0 15.3kb 15.3kb
yellow open .monitoring-alerts-2 zviOqVa8SiK80KW6Ka2qlQ 1 1 1 0 13kb 13kb
yellow open .monitoring-data-2 e5cGOCC0SzyxG9YEZOdzQw 1 1 4 0 21.1kb 21.1kb
yellow open .watches QgwaAh46T6SYofG7yCM5iA 1 1 4 0 23.3kb 23.3kb
yellow open .monitoring-kibana-2-2017.05.26 1_--ugI0RFOxGoqNaNmXeg 1 1 849 0 368.8kb 368.8kb
green open .security IboxlJWMS5OO5H3Wog8hlw 1 0 6 0 21.7kb 21.7kb

```

Is there anything I can do to fix that? I'm using version 5.4.0 of Kibana, Logstash and ElasticSearch

Thanks!

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [May 30, 2017, 4:11am UTC](https://discuss.elastic.co/t/unable-to-fetch-mapping-because-kibana-requests-the-wrong-url-to-es/87305/2 "2017-05-30T04:11:53Z")

</div>

The prefix of `elasticsearch` you see is actually the Kibana proxy to Elasticsearch, so it can be omitted. To reproduce this request make sure you are preforming it against Kibana, for example: `localhost:5601/elasticsearch/logstash-*/_mapping/field/*`.

Is there anything in the elasticsearch logs when you're attempting to add the index pattern?

What do you get when making this request at Kibana? `localhost:5601/elasticsearch/_cat/indices`

---

<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:** [June 27, 2017, 4:12am UTC](https://discuss.elastic.co/t/unable-to-fetch-mapping-because-kibana-requests-the-wrong-url-to-es/87305/3 "2017-06-27T04:12:07Z")

</div>

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