# Kibana Authentication Exception issue after running 1 minute

**URL:** <https://discuss.elastic.co/t/kibana-authentication-exception-issue-after-running-1-minute/211649>\
**Category:** Kibana\
**Created:** [December 12, 2019, 12:54pm UTC](https://discuss.elastic.co/t/kibana-authentication-exception-issue-after-running-1-minute/211649 "2019-12-12T12:54:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpetersen](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@tpetersen](https://discuss.elastic.co/u/tpetersen)\
**Post date:** [December 12, 2019, 12:54pm UTC](https://discuss.elastic.co/t/kibana-authentication-exception-issue-after-running-1-minute/211649/1 "2019-12-12T12:54:30Z")

</div>

Hi people,

Got an annoying problem here with Kibana 6.8.0, setting up a test cluster with HTTPS and Xpack enabled. The Elastic cluster is running ok and our application can use this just fine.  
But Kibana can only run 1 minute then it crashes with

> {"type":"log","@timestamp":"2019-12-12T12:33:06Z","tags":["error","task\_manager"],"pid":2851,"message":"Failed to poll for work: [security\_exception] missing authentication token for REST request [/.kibana\_task\_manager/\_doc/\_search?ignore\_unavailable=true], with { header={ WWW-Authenticate={ 0="Bearer realm=\"security\"" & 1="ApiKey" & 2="Basic realm=\"security\" charset=\"UTF-8\"" } } } :: {"path":"/.kibana\_task\_manager/\_doc/\_search","query":{"ignore\_unavailable":true},"body":"{\"query\":{\"bool\":{\"must\":[{\"term\":{\"type\":\"task\"}},{\"bool\":{\"must\":[{\"terms\":{\"task.taskType\":[\"maps\_telemetry\",\"vis\_telemetry\"]}},{\"range\":{\"task.attempts\":{\"lte\":3}}},{\"range\":{\"task.runAt\":{\"lte\":\"now\"}}},{\"range\":{\"kibana.apiVersion\":{\"lte\":1}}}]}}]}},\"size\":10,\"sort\":{\"task.runAt\":{\"order\":\"asc\"}},\"seq\_no\_primary\_term\":true}","statusCode":401,"response":"{\"error\":{\"root\_cause\":[{\"type\":\"security\_exception\",\"reason\":\"missing authentication token for REST request [/.kibana\_task\_manager/\_doc/\_search?ignore\_unavailable=true]\",\"header\":{\"WWW-Authenticate\":[\"Bearer realm=\\\"security\\\"\",\"ApiKey\",\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"]}}],\"type\":\"security\_exception\",\"reason\":\"missing authentication token for REST request [/.kibana\_task\_manager/\_doc/\_search?ignore\_unavailable=true]\",\"header\":{\"WWW-Authenticate\":[\"Bearer realm=\\\"security\\\"\",\"ApiKey\",\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"]}},\"status\":401}","wwwAuthenticateDirective":"Bearer realm=\"security\", ApiKey, Basic realm=\"security\" charset=\"UTF-8\""}"}

If I restart Kibana, it works again for 1 minute. When it is working I can use all the functions just fine, monitoring, devtools and so on.

My Kibana.yml looks like this

> server.port: 5601  
> server.host: "[testkibana.domain.com](http://testkibana.domain.com)"  
> server.name: "[testkibana.domain.com](http://testkibana.domain.com)"  
> elasticsearch.hosts: ["[https://estestdata-0.domain.com:9200](https://estestdata-0.domain.com:9200)"]  
> elasticsearch.sniffInterval: 60000  
> elasticsearch.sniffOnConnectionFault: true  
> elasticsearch.sniffOnStart: false  
> elasticsearch.preserveHost: true  
> kibana.index: ".kibana"  
> elasticsearch.username: "kibana"  
> elasticsearch.password: "password"  
> xpack.monitoring.elasticsearch.username: "elastic"  
> xpack.monitoring.elasticsearch.password: "password"  
> server.ssl.enabled: true  
> server.ssl.certificate: /etc/kibana/domain\_com.crt  
> server.ssl.key: /etc/kibana/Private.key  
> elasticsearch.ssl.certificate: /etc/kibana/domain\_com.crt  
> elasticsearch.ssl.key: /etc/kibana/Private.key  
> elasticsearch.ssl.certificateAuthorities: ["/etc/kibana/CA.crt"]  
> elasticsearch.ssl.verificationMode: none  
> elasticsearch.requestHeadersWhitelist: [authorization]  
> logging.dest: /etc/kibana/kibana.log  
> logging.quiet: true

We use a real certificate for our servers, so it is not a generated by Elasticsearch one. Have another issue with the Elasticsearch - that is why SSL verification is "none"

Hope anyone has a hit to what to fix/try

Best regards  
Thomas

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [December 12, 2019, 2:50pm UTC](https://discuss.elastic.co/t/kibana-authentication-exception-issue-after-running-1-minute/211649/2 "2019-12-12T14:50:28Z")

</div>

Hi,  
Is there a proxy introduced in between ? Can you try in a different browser as well .

More ES logs would be helpful as well.

cc @Larry_Gregory

---

<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:** [January 9, 2020, 2:50pm UTC](https://discuss.elastic.co/t/kibana-authentication-exception-issue-after-running-1-minute/211649/3 "2020-01-09T14:50:34Z")

</div>

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