snakebite
snakebite copied to clipboard
Kerberos - javax.security.sasl.SaslException. Client mechanism is malformed
hi I'm a beginer for using snakebite. when I exec " snakebite -D ls / ",It works.It turn out like this: [root@sjs_38_58 src]# snakebite -D ls /
DEBUG:snakebite.config:Got namenode 'hdfs://bizclustertest' from /opt/local/bizhadoop/hadoop/etc/hadoop/core-site.xml DEBUG:snakebite.config:Got hadoop.security.authentication 'kerberos' DEBUG:snakebite.config:Got namenode '//rsync.nn1.bizclustertest.zw.ted:8020' from /opt/local/bizhadoop/hadoop/etc/hadoop/hdfs-site.xml DEBUG:snakebite.config:Got namenode '//rsync.nn2.bizclustertest.sjs.ted:8020' from /opt/local/bizhadoop/hadoop/etc/hadoop/hdfs-site.xml DEBUG:snakebite.config:hdfs principal found: 'biztech/[email protected]' DEBUG:snakebite.client:Switch to namenode: rsync.nn1.bizclustertest.zw.ted:8020 DEBUG:snakebite.client:Created client for rsync.nn1.bizclustertest.zw.ted:8020 with trash=True and sasl=True ....
when I use it in ipython like this:
from snakebite.client import Client client = Client("rsync.nn1.bizclustertest.zw.ted", 8020, use_trash=True,use_sasl=True) for x in client.ls(['/']):
print x ..... RequestError: javax.security.sasl.SaslException Client mechanism is malformed
It does not work. when I look up the manual doc, I find this parameter, "hdfs_namenode_principal", what should I set it? The hdfs authentication use Kerberos.
I have same issue and install those packages:
sudo apt-get install cyrus-sasl2-mit-dbg libsasl2-modules-gssapi-mit
refer to https://launchpad.net/ubuntu/+source/cyrus-sasl2
Hope it will work.
I had the same issue and installing packages that @hungthe mentioned works for me