# Webhdfs Output plugin does not login with Keytab

**URL:** <https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164>\
**Category:** Logstash\
**Created:** [May 16, 2018, 3:21pm UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164 "2018-05-16T15:21:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Manzur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_manzur/32/31276_2.png) [@Felipe\_Manzur](https://discuss.elastic.co/u/Felipe_Manzur)\
**Post date:** [May 16, 2018, 3:21pm UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/1 "2018-05-16T15:21:30Z")

</div>

Hi,

I configured a pipeline using the webhdfs output plugin, but i'm having trouble to login into kerberos using a keytab.

If i login by command line using the keytab "kinit -kt \<keytab\_file\> " , i get the kerberos ticket and the pipeline works perfectly however if i destroy the kerberos ticket and i run the pipeline, the plugin is not able to login using the keytab.

Do you know if there's a bug with this plugin?.. or maybe the problem is the GSSAPI gem that is using to login into kerberos?

**Webhdfs conf**  
`
webhdfs {
host => "192.168.240.16"
port => 14000
standby_host => "192.168.240.16"
standby_port => 14000
path => "/tmp/test.log"
user => "kerberos_user"
kerberos_keytab => "/tmp/kerberos_user.keytab"
use_kerberos_auth => true
}
`

**The error**  
`
[ERROR][logstash.outputs.webhdfs] Max write retries reached. Events will be discarded. Exception: gss_init_sec_context did not return GSS_S_COMPLETE: Unspecified GSS failure. Minor code may provide more information
Credentials cache file '/tmp/krb5cc_489' not found
`

---

<div class="post-metadata">

**Author:** ![sgalinma](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@sgalinma](https://discuss.elastic.co/u/sgalinma)\
**Post date:** [May 17, 2018, 9:40am UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/2 "2018-05-17T09:40:30Z")

</div>

I have the same problem as well. I set the properties related to Kerberos authentication and it seems that Logstash is not taking into account the keytab file. The pipeline works perfectly when I perform a `kinit` before running it.

I thought that Logstash performed the `kinit` internally using the provided credentials, am I missing something here?

---

<div class="post-metadata">

**Author:** ![dcariboo](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@dcariboo](https://discuss.elastic.co/u/dcariboo)\
**Post date:** [May 17, 2018, 3:16pm UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/3 "2018-05-17T15:16:48Z")

</div>

Same issue

---

<div class="post-metadata">

**Author:** ![kerbZR](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@kerbZR](https://discuss.elastic.co/u/kerbZR)\
**Post date:** [May 17, 2018, 3:31pm UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/4 "2018-05-17T15:31:49Z")

</div>

Try to add in your webhdfs conf 'single\_file\_per\_thread =\> true', let me know if that works!

---

<div class="post-metadata">

**Author:** ![sgalinma](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@sgalinma](https://discuss.elastic.co/u/sgalinma)\
**Post date:** [May 18, 2018, 6:22am UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/5 "2018-05-18T06:22:09Z")

</div>

it does not work, same error..

---

<div class="post-metadata">

**Author:** ![Felipe\_Manzur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_manzur/32/31276_2.png) [@Felipe\_Manzur](https://discuss.elastic.co/u/Felipe_Manzur)\
**Post date:** [May 18, 2018, 7:06am UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/6 "2018-05-18T07:06:21Z")

</div>

> [@kerbZR](#):
>
> single\_file\_per\_thread

Thanks but that parameter has nothing todo with Kerberos auth. However i tried it and it didn't worked.

---

<div class="post-metadata">

**Author:** ![Felipe\_Manzur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_manzur/32/31276_2.png) [@Felipe\_Manzur](https://discuss.elastic.co/u/Felipe_Manzur)\
**Post date:** [May 24, 2018, 12:05pm UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/7 "2018-05-24T12:05:32Z")

</div>

somebody help!

---

<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:** [June 21, 2018, 12:05pm UTC](https://discuss.elastic.co/t/webhdfs-output-plugin-does-not-login-with-keytab/132164/8 "2018-06-21T12:05:36Z")

</div>

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