# Filebeat and Metricbeats setup fails with Elasticsearch and Kibana 7.0 -Failed to import dashboard: Failed to load directory

**URL:** <https://discuss.elastic.co/t/filebeat-and-metricbeats-setup-fails-with-elasticsearch-and-kibana-7-0-failed-to-import-dashboard-failed-to-load-directory/177068>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [April 16, 2019, 10:59am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeats-setup-fails-with-elasticsearch-and-kibana-7-0-failed-to-import-dashboard-failed-to-load-directory/177068 "2019-04-16T10:59:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)\
**Post date:** [April 16, 2019, 10:59am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeats-setup-fails-with-elasticsearch-and-kibana-7-0-failed-to-import-dashboard-failed-to-load-directory/177068/1 "2019-04-16T10:59:36Z")

</div>

Running sudo metricbeat setup and sudo filebeat setup and get the following error belows.

root@ubuntu-s-1vcpu-2gb-sfo2-01:/etc/metricbeat/modules.d# sudo metricbeat setup  
Index setup complete.  
Loading dashboards (Kibana must be running and reachable)

Exiting: Failed to import dashboard: Failed to load directory /usr/share/metricbeat/kibana/7/dashboard:  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-golang-overview.json: returned 400 to import file: . Response: {"statusCode":400,"error":"Bad Request","message":"[parent] Data too large, data for [\<http\_request\>] would be [1026768160/979.2mb], which is larger than the limit of [1020054732/972.7mb], real usage: [1026750736/979.1mb], new bytes reserved: [17424/17kb]: [circuit\_breaking\_exception] [parent] Data too large, data for [\<http\_request\>] would be [1026768160/979.2mb], which is larger than the limit of [1020054732/972.7mb], real usage: [1026750736/979.1mb], new bytes reserved: [17424/17kb], with { bytes\_wanted=1026768160 & bytes\_limit=1020054732 & durability="PERMANENT" }"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-backend.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-frontend.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-http-backend.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-http-frontend.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-http-server.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-haproxy-visualizations.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-host-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-kafka-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-kubernetes-apiserver.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-kubernetes-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-mongodb-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-mssql-performance.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-mssql-transaction\_log.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-mysql-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-nats-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-rabbitmq-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-redis-keys.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-redis-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-system-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-uwsgi-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/Metricbeat-zookeeper-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/metricbeat-nginx-overview.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}  
error loading /usr/share/metricbeat/kibana/7/dashboard/metricbeat-windows-service.json: returned 401 to import file: . Response: {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}

root@ubuntu-s-1vcpu-2gb-sfo2-01:/etc/metricbeat/modules.d# sudo filebeat setup  
Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [http://159.65.99.121:9200](http://159.65.99.121:9200): Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license: error from server, response code: 429]

root@ubuntu-s-1vcpu-2gb-sfo2-01:/etc/metricbeat/modules.d# sudo filebeat setup  
Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch [http://159.65.99.121:9200](http://159.65.99.121:9200): Connection marked as failed because the onConnect callback failed: cannot retrieve the elasticsearch license: error from server, response code: 429]

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 19, 2019, 8:25pm UTC](https://discuss.elastic.co/t/filebeat-and-metricbeats-setup-fails-with-elasticsearch-and-kibana-7-0-failed-to-import-dashboard-failed-to-load-directory/177068/2 "2019-04-19T20:25:20Z")

</div>

Hi @bradfordaemorton,

> [@bradfordaemorton](#):
>
> {"statusCode":401,"error":"Unauthorized","message":"Unauthorized"}

This error indicates that metricbeat is failing to authenticate, you may need to setup and user and a password in the configuration with the options `setup.kibana.username` and `setup.kibana.password`.

The error with filebeat indicates some problem to connect, could you try to make a request with curl? e.g. `curl http://159.65.99.121:9200`.

---

<div class="post-metadata">

**Author:** ![bradfordaemorton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@bradfordaemorton](https://discuss.elastic.co/u/bradfordaemorton)\
**Post date:** [April 22, 2019, 2:44am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeats-setup-fails-with-elasticsearch-and-kibana-7-0-failed-to-import-dashboard-failed-to-load-directory/177068/3 "2019-04-22T02:44:11Z")

</div>

Thanks Jaime,

I had to rebuild the server and the error doesn't happen anymore. Not sure what the issue was not.

Cheers,  
Brad

---

<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:** [May 20, 2019, 2:44am UTC](https://discuss.elastic.co/t/filebeat-and-metricbeats-setup-fails-with-elasticsearch-and-kibana-7-0-failed-to-import-dashboard-failed-to-load-directory/177068/4 "2019-05-20T02:44:13Z")

</div>

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