Getting unauthorized access error in metricbeat

hi team,

i am getting below error in metricbeat:

2019-06-19T11:39:50.528+0100    INFO    [monitoring]    log/log.go:144  Non-zero metrics in the last 30s        {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":2610,"time":{"ms":516}},"total":{"ticks":4580,"time":{"ms":872},"value":4580},"user":{"ticks":1970,"time":{"ms":356}}},"handles":{"limit":{"hard":65535,"soft":65535},"open":9},"info":{"ephemeral_id":"de93a784-a72b-4673-b28c-3b469e36cb00","uptime":{"ms":150058}},"memstats":{"gc_next":11164096,"memory_alloc":11333752,"memory_total":561043072,"rss":495616}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":86,"batches":6,"total":86},"read":{"bytes":36},"write":{"bytes":22338}},"pipeline":{"clients":14,"events":{"active":0,"published":86,"total":86},"queue":{"acked":86}}},"metricbeat":{"apache":{"status":{"events":3,"failures":3}},"elasticsearch":{"node":{"events":3,"failures":3},"node_stats":{"events":3,"failures":3},"pending_tasks":{"events":3,"failures":3},"shard":{"events":3,"failures":3}},"kibana":{"status":{"events":3,"failures":3}},"logstash":{"node":{"events":3,"success":3},"node_stats":{"events":3,"success":3}},"system":{"cpu":{"events":3,"success":3},"filesystem":{"events":17,"success":17},"fsstat":{"events":1,"success":1},"load":{"events":3,"success":3},"memory":{"events":3,"success":3},"network":{"events":6,"success":6},"process":{"events":23,"success":23},"process_summary":{"events":3,"success":3},"socket_summary":{"events":3,"success":3}}},"system":{"load":{"1":0.26,"15":1.13,"5":0.47,"norm":{"1":0.0325,"15":0.1412,"5":0.0588}}}}}}
2019-06-19T11:39:50.533+0100    ERROR   [elasticsearch] elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:39:50.533+0100    ERROR   [elasticsearch] elastic/elastic.go:107  error determining if connected Elasticsearch node is master: HTTP error 401 in : 401 Unauthorized
2019-06-19T11:39:50.605+0100    ERROR   [kibana]        elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:39:53.523+0100    ERROR   [elasticsearch] elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:39:53.523+0100    ERROR   [elasticsearch] elastic/elastic.go:107  error determining if connected Elasticsearch node is master: HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:00.534+0100    ERROR   [elasticsearch] elastic/elastic.go:107  error determining if connected Elasticsearch node is master: HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:00.534+0100    ERROR   [elasticsearch] elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:00.601+0100    ERROR   [kibana]        elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:03.523+0100    ERROR   [elasticsearch] elastic/elastic.go:107  error determining if connected Elasticsearch node is master: HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:03.523+0100    ERROR   [elasticsearch] elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:10.534+0100    ERROR   [elasticsearch] elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:10.534+0100    ERROR   [elasticsearch] elastic/elastic.go:107  error determining if connected Elasticsearch node is master: HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:10.604+0100    ERROR   [kibana]        elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:13.524+0100    ERROR   [elasticsearch] elastic/elastic.go:107  error determining if connected Elasticsearch node is master: HTTP error 401 in : 401 Unauthorized
2019-06-19T11:40:13.525+0100    ERROR   [elasticsearch] elastic/elastic.go:107  HTTP error 401 in : 401 Unauthorized

Dont know why it's throwing this error but metric beat data is successfully be able to view in kibana ui.

as this error is not impacting currently but worth to know abt error. below is the config:
Note: user test has all the roles available in kibana ui like superadmin,kibana_user,kibana_system etc.

setup.kibana:

  # Kibana Host
  # Scheme and port can be left out and will be set to the default (http and 5601)
  # In case you specify and additional path, the scheme is required: http://localhost:5601/path
  # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
  host: "10.85.620.51:5601"
  username: "test"
  password: "test"


#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["10.85.620.51:9201"]

regrds,
Manish

Hi @emnioj :slight_smile:

I'm not sure about the root of the issue but can you share the entire config file, please? I don't see the Elasticsearch config.

Thanks in advance

Thanks for looking into it.
i sorted it just now.
issue was like i have enabled some modules and have not provided the username and password in modules config (seems to be ).

When i disable the modules and restarted the metricbeat , its not throwing the error.

regards,
Manish

You can see which modules you have enabled and disabled with metricbeat modules list and you can disable those that you are not using with metricbeat modules disable [module] :slight_smile:

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