# Getting unauthorized access error in metricbeat

**URL:** <https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 19, 2019, 10:45am UTC](https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435 "2019-06-19T10:45:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![emnioj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emnioj/32/60790_2.png) [@emnioj](https://discuss.elastic.co/u/emnioj)\
**Post date:** [June 19, 2019, 10:45am UTC](https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435/1 "2019-06-19T10:45:44Z")

</div>

hi team,

i am getting below error in metricbeat:

```auto
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.

```auto
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

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [June 19, 2019, 11:33am UTC](https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435/2 "2019-06-19T11:33:40Z")

</div>

Hi @emnioj 🙂

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

---

<div class="post-metadata">

**Author:** ![emnioj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emnioj/32/60790_2.png) [@emnioj](https://discuss.elastic.co/u/emnioj)\
**Post date:** [June 19, 2019, 11:36am UTC](https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435/3 "2019-06-19T11:36:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [June 19, 2019, 11:43am UTC](https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435/4 "2019-06-19T11:43:06Z")

</div>

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]` 🙂

---

<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:** [July 17, 2019, 11:43am UTC](https://discuss.elastic.co/t/getting-unauthorized-access-error-in-metricbeat/186435/5 "2019-07-17T11:43:17Z")

</div>

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