Issue running Filebeat for the first time

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.

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

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

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

# ======================== 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

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

Set your network host and uncomment

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

no change same error message.

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.

Thanks,
Harsh Bajaj

same issue even after a reboot.

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

add to the bottom

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

yeah its the same...

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

Hi,

is it working fine now??

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

No. its not working.

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

could you please paste your updated config file here??

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

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

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.

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

Thanks,

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