# 401 Unauthorized: unable to parse authentication credentials

**URL:** <https://community.influxdata.com/t/401-unauthorized-unable-to-parse-authentication-credentials/12714>\
**Category:** Systems\
**Created:** [January 22, 2020, 4:32am UTC](https://community.influxdata.com/t/401-unauthorized-unable-to-parse-authentication-credentials/12714 "2020-01-22T04:32:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![monitoring.it.ak](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@monitoring.it.ak](https://community.influxdata.com/u/monitoring.it.ak)\
**Post date:** [January 22, 2020, 4:32am UTC](https://community.influxdata.com/t/401-unauthorized-unable-to-parse-authentication-credentials/12714/1 "2020-01-22T04:32:00Z")

</div>

Hello colleagues,  
please help with the issue:

exactly as in manual (sorry can’t add an URL - this web site limitation)

1. /etc/influxdb.conf  
[http]  
https-enabled = true  
https-certificate = “/etc/ssl/influxdb-selfsigned.crt”  
https-private-key = “/etc/ssl/influxdb-selfsigned.key”

auth\_enable = true  
ping-auth-enabled = true

1. /etc/telegraf/telegraf.conf  
[[outputs.influxdb]]  
urls = [“:8086”]  
username = “monitoring”  
password = “monitoring”  
tls\_cert = “/etc/ssl/telegraf-selfsigned.crt”  
tls\_key = “/etc/ssl/telegraf-selfsigned.key”  
insecure\_skip\_verify = true  
[[inputs.influxdb]]  
urls = [  
“https::8086/debug/vars”  
]  
tls\_cert = “/etc/ssl/telegraf-selfsigned.crt”  
tls\_key = “/etc/ssl/telegraf-selfsigned.key”  
insecure\_skip\_verify = true

* * *

1. Console

influx -ssl -unsafeSsl -host localhost:8086  
~$ influx -ssl -unsafeSsl  
Connected to https::8086 version 1.7.9  
InfluxDB shell version: 1.7.9

> auth  
> username: admin  
> password:  
> show users  
> user admin

* * *

monitoring true  
admin true  
mmm false

> 

> SET PASSWORD FOR “monitoring” = ‘monitoring’  
> show grants for monitoring  
> database privilege

* * *

telegraf ALL PRIVILEGES

> quit  
> monitoring@monitoring2:~$ sudo -H -u telegraf telegraf -config /etc/telegraf/telegraf.conf  
> 2020-01-22T04:26:48Z I! Starting Telegraf 1.13.0  
> 2020-01-22T04:26:48Z I! Loaded inputs: internal net cpu disk diskio kernel mem processes swap system influxdb  
> 2020-01-22T04:26:48Z I! Loaded aggregators:  
> 2020-01-22T04:26:48Z I! Loaded processors:  
> 2020-01-22T04:26:48Z I! Loaded outputs: influxdb  
> 2020-01-22T04:26:48Z I! Tags enabled: host=monitoring2  
> 2020-01-22T04:26:48Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:“monitoring2”, Flush Interval:10s  
> 2020-01-22T04:26:50Z E! [inputs.influxdb] Error in plugin: 401 **Unauthorized: unable to parse authentication credentials**  
> ^C2020-01-22T04:26:51Z I! [agent] Hang on, flushing any cached metrics before shutdown

well, the question is: how user “monitoring” with password ‘monitoring’ is unable to authorize if password was set a second before?

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [January 22, 2020, 6:35am UTC](https://community.influxdata.com/t/401-unauthorized-unable-to-parse-authentication-credentials/12714/2 "2020-01-22T06:35:23Z")

</div>

I think you just need to set `username` and `password` for the input as well as the output.

---

<div class="post-metadata">

**Author:** ![monitoring.it.ak](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@monitoring.it.ak](https://community.influxdata.com/u/monitoring.it.ak)\
**Post date:** [January 23, 2020, 3:49am UTC](https://community.influxdata.com/t/401-unauthorized-unable-to-parse-authentication-credentials/12714/3 "2020-01-23T03:49:44Z")

</div>

Hi Daniel,  
thank you. This must be “ **false** ”

/etc/influxdb/influxdb.conf  
Enables authentication on the /ping, /metrics, and deprecated /status  
Preformatted textendpoints. This setting has no effect if auth-enabled is set to false.  
**# ping-auth-enabled = false**
