# Issue running Filebeat for the first time

**URL:** <https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 18, 2018, 3:08am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406 "2018-05-18T03:08:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 3:08am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/1 "2018-05-18T03:08:22Z")

</div>

During filebeat setup this error occurs:

It's correct, I'm not using xpack.

ERROR instance/beat.go:667 Exiting: 1 error: Error checking if xpack is available: 401 Unauthorized: {"Message":"Your request: '/\_xpack' is not allowed."}

How do I continue so filebeats works.

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 3:58am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/2 "2018-05-18T03:58:28Z")

</div>

Hi,

This error is related to the xpack security which you have configured. could you please paste your config file here and also share the config file of your other instance which you have configured.

config file path: /etc/filebeat/filebeat.yml

Please share this for further investigation.

Thanks,  
Harsh Bajaj

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 4:03am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/3 "2018-05-18T04:03:23Z")

</div>

I haven't configured/enabled or done anything with xpack.

> <https://gist.github.com/staticfrost/16ee26c6a87922dedd837b448ecac676>

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 4:11am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/4 "2018-05-18T04:11:37Z")

</div>

Hi,  
If i'm not wrong you have configured elastic cloud.

I've checked your config file and found below :

Change the true this parameter otherwise your log file will not be harvested.

> Change to true to enable this prospector configuration.  
> enabled: false

and for Xpack issue please share your elasticsearch cofig file.  
path : /etc/elasticsearch/elasticsearch.yml

Thanks,  
Harsh Bajaj

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 4:14am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/5 "2018-05-18T04:14:22Z")

</div>

```auto
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
#cluster.name: my-application
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
#node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
#http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#
# Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):
#
#discovery.zen.minimum_master_nodes: 3
#
# For more information, consult the zen discovery module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

```

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 4:33am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/6 "2018-05-18T04:33:53Z")

</div>

Hi,

I've checked your config file and found you have not configured anything in your elasticsearch config file.

Please configure below and uncomment the same:

Set your cluster name (if working with cluster) and uncomment

> [@](#):
>
> cluster.name: my-application

Set your network host and uncomment

> [@](#):
>
> #network.host: 192.168.0.1

And also configure the correct elasticsearch o/p in filebeat.yml file.

And didn't found any xpack configuration in this file.

could you please restart all service after this changes and paste your error here.

Thanks,  
Harsh Bajaj

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 4:53am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/7 "2018-05-18T04:53:20Z")

</div>

no change same error message.

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 5:01am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/8 "2018-05-18T05:01:16Z")

</div>

Hi @staticfrost,

Please add below two line in your both config file i.e. elasticearch.yml and filebeat.yml and restart the services.

> xpack.security.enabled: false  
> xpack.monitoring.enabled: false

and if you still getting same error then please paste you updated config files here.

And also refer below link for more understanding about Xpack.

> **[X-Pack Settings | X-Pack for the Elastic Stack \[6.2\] | Elastic](https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html)**

Thanks,  
Harsh Bajaj

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 5:06am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/9 "2018-05-18T05:06:23Z")

</div>

same issue even after a reboot.

> <https://gist.github.com/staticfrost/16ee26c6a87922dedd837b448ecac676>

- xpack.security.enabled: false  
xpack.monitoring.enabled: false

add to the bottom

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 5:09am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/10 "2018-05-18T05:09:06Z")

</div>

Hi,

Sorry but i'm not able to see any changes in your config file. i think you have given wrong config by mistake.

please check and paste your updated config file.

Thanks,  
Harsh Bajaj

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 5:20am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/11 "2018-05-18T05:20:56Z")

</div>

yeah its the same...

- the two lines you told me to add...

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 5:45am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/12 "2018-05-18T05:45:29Z")

</div>

Hi,

is it working fine now??

i didn't get you.Please let me know.

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 5:48am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/13 "2018-05-18T05:48:47Z")

</div>

No. its not working.

same issue even after a reboot + your suggested config changes.

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 5:58am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/14 "2018-05-18T05:58:32Z")

</div>

could you please paste your updated config file here??

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 18, 2018, 6:15am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/15 "2018-05-18T06:15:32Z")

</div>

- the two lines you told me to add...

xpack.security.enabled: false  
xpack.monitoring.enabled: false

> <https://gist.github.com/staticfrost/16ee26c6a87922dedd837b448ecac676>

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 18, 2018, 9:13am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/16 "2018-05-18T09:13:43Z")

</div>

Sorry but i'm not able to see where you add these two lines and still the prospector parameter is false as it should be true.

please check.

---

<div class="post-metadata">

**Author:** ![staticfrost](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@staticfrost](https://discuss.elastic.co/u/staticfrost)\
**Post date:** [May 20, 2018, 10:34pm UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/17 "2018-05-20T22:34:41Z")

</div>

> [@staticfrost](#):
>
> xpack.security.enabled: false
> 
> xpack.monitoring.enabled: false

> <https://gist.github.com/staticfrost/16ee26c6a87922dedd837b448ecac676>

---

<div class="post-metadata">

**Author:** ![harshbajaj16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harshbajaj16/32/44970_2.png) [@harshbajaj16](https://discuss.elastic.co/u/harshbajaj16)\
**Post date:** [May 21, 2018, 3:38am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/18 "2018-05-21T03:38:48Z")

</div>

Yes, now i'm able to see the changes and please add the same in elasticsearch.yml file and restart the services.

Thanks,

---

<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 18, 2018, 3:39am UTC](https://discuss.elastic.co/t/issue-running-filebeat-for-the-first-time/132406/19 "2018-06-18T03:39:13Z")

</div>

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