# Import\_dashboards - fail to load Elasticsearch loader

**URL:** <https://discuss.elastic.co/t/import-dashboards-fail-to-load-elasticsearch-loader/101405>\
**Category:** Beats\
**Created:** [September 21, 2017, 11:32pm UTC](https://discuss.elastic.co/t/import-dashboards-fail-to-load-elasticsearch-loader/101405 "2017-09-21T23:32:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marleybobby](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marleybobby](https://discuss.elastic.co/u/marleybobby)\
**Post date:** [September 21, 2017, 11:32pm UTC](https://discuss.elastic.co/t/import-dashboards-fail-to-load-elasticsearch-loader/101405/1 "2017-09-21T23:32:17Z")

</div>

Hi,

I just installed elasticsearch and kibana, as described on this page [https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html](https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html) and it seems works fine. Now i installed packetbeat and tried to import the dashboards as described [here](https://www.elastic.co/guide/en/beats/packetbeat/5.6/packetbeat-sample-dashboards.html).

I changed to directory `/usr/share/packetbeat/scripts` and tried `./import_dashboards` but I receive this error  
fail to create the Elasticsearch loader: Error creating Elasticsearch client: Couldn't connect to any of the configured Elasticsearch hosts

but elasticsearch and kibana are running.

I use v5.6. So what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![monica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica/32/3696_2.png) [@monica](https://discuss.elastic.co/u/monica)\
**Post date:** [September 22, 2017, 9:57am UTC](https://discuss.elastic.co/t/import-dashboards-fail-to-load-elasticsearch-loader/101405/2 "2017-09-22T09:57:15Z")

</div>

Did you enable x-pack in Elasticsearch? If yes, then you need to pass an username and password to the `import_dashboards` script:

```auto
./scripts/import_dashboards -user user -pass password 

```

---

<div class="post-metadata">

**Author:** ![marleybobby](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marleybobby](https://discuss.elastic.co/u/marleybobby)\
**Post date:** [September 22, 2017, 12:25pm UTC](https://discuss.elastic.co/t/import-dashboards-fail-to-load-elasticsearch-loader/101405/3 "2017-09-22T12:25:42Z")

</div>

Feeling dumb now. Tried with other options as login but not that simple one 😓

---

<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:** [October 12, 2017, 11:32pm UTC](https://discuss.elastic.co/t/import-dashboards-fail-to-load-elasticsearch-loader/101405/4 "2017-10-12T23:32:55Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
