# Kibana can't download the .geojson file from the localhost

**URL:** https://discuss.elastic.co/t/kibana-cant-download-the-geojson-file-from-the-localhost/170245
**Category:** Kibana
**Created:** [February 27, 2019, 9:21pm UTC](https://discuss.elastic.co/t/kibana-cant-download-the-geojson-file-from-the-localhost/170245 "2019-02-27T21:21:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![CronoNes](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@CronoNes](https://discuss.elastic.co/u/CronoNes)
#### Post date: [February 27, 2019, 9:21pm UTC](https://discuss.elastic.co/t/kibana-cant-download-the-geojson-file-from-the-localhost/170245/1 "2019-02-27T21:21:47Z")

</div>

Hello. I've been trying to use the regionmap feature of Kibana with a custom geojson file. The file is in the same container as Kibana. I installed http-server and started it. If I curl the localhost:port/file.geojson, I get the data printed out, however, I get the following error in the browser with the Kibana URL:

> Error downloading vector data  
> Cannot download [http://localhost:9999/Chile.geojson](http://localhost:9999/Chile.geojson) file. Please ensure the CORS configuration of the server permits requests from the Kibana application on this host.

The elk-docker was used for the installation in the server.

If anyone could help me to get this running, I would really appreciate it. Thanks!

Additional info:  
http-server parameters:

> http-server --cors='\*' -p 9999

Kibana.yml:

> server.name: kibana  
> server.host: "0.0.0.0"  
> server.cors: true  
> server.cors.origin: ['\*']  
> elasticsearch.url: [http://elasticsearch:9200](http://elasticsearch:9200)  
> regionmap:  
> layers:  
> - name: "Chile"  
> url: "[http://localhost:9999/Chile.geojson](http://localhost:9999/Chile.geojson)"  
> attribution: "[GitHub - jlhonora/geo: GeoJSON data for Chile](https://github.com/jlhonora/geo)"  
> fields:  
> - name: "CIR\_SENA"  
> description: "Cir sena"  
> - name: "COD\_COMUNA"  
> description: "Codigo de la comuna"  
> - name: "DIS\_ELEC"  
> description: "Dis elec"  
> - name: "NOM\_COM"  
> description: "Nombre de la comuna"  
> - name: "NOM\_PROV"  
> description: "Nombre de la provincia"  
> - name: "NOM\_REG"  
> description: "Nombre de la region"  
> - name: "SHAPE\_Area"  
> description: "Shape area"  
> - name: "SHAPE\_LENG"  
> description: "Shape leng"  
> - name: "SHAPE\_Le\_1"  
> description: "Shape le 1"

Elasticsearch.yml

> cluster.name: "docker-cluster"  
> network.host: "0.0.0.0"  
> http.cors.enabled: true  
> discovery.zen.minimum\_master\_nodes: 1  
> discovery.type: single-node

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [February 28, 2019, 7:28pm UTC](https://discuss.elastic.co/t/kibana-cant-download-the-geojson-file-from-the-localhost/170245/2 "2019-02-28T19:28:03Z")

</div>

Can you try `http-server --cors="kbn-version" -p 9999` and see if that helps? I think recent versions of http-server are more strict about accepting headers.

---

<div class="post-metadata">

### Author: ![CronoNes](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@CronoNes](https://discuss.elastic.co/u/CronoNes)
#### Post date: [March 1, 2019, 7:50pm UTC](https://discuss.elastic.co/t/kibana-cant-download-the-geojson-file-from-the-localhost/170245/3 "2019-03-01T19:50:16Z")

</div>

I did try that a couple of times, now it works though.

For some reason, I was just unable to read the file with Kibana from inside the container (Eventhough it actually had the file, and I could curl it without any issue), however, it could read it without problems from outside the container (In a server folder), so the only changes where on the kibana.yml file, with an updated url of the server (Instead of just localhost), and your exact http-server code for hosting it.

Once I started reading the vector map, the upcoming errors were pretty small/easy to fix (Faulty index pattern, not linking the proper files in the option tab on the visualize page, etc).

I hope this configurations and explanations help someone else. Thanks for the answer!

---

<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: [March 29, 2019, 7:51pm UTC](https://discuss.elastic.co/t/kibana-cant-download-the-geojson-file-from-the-localhost/170245/4 "2019-03-29T19:51:19Z")

</div>

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