You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by 郝东 <do...@163.com> on 2015/02/13 04:26:36 UTC
No JAAS configuration section named 'Server' was found
Hi, Guys
I was configuring my zookeeper to use SASL. I added a jaas file. The context is as following:
Server {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="mypath"
storeKey=true
useTicketCache=false
principal="myprincipal";
};
I also added the following properties in my zoo.cfg
authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
kerberos.removeHostFromPrincipal=true
kerberos.removeRealmFromPrincipal=true
But when I ran "zkServer.sh start", I met the following errors:
2015-02-13 10:25:18,455 [myid:1] - ERROR [main:ServerCnxnFactory@195] - No JAAS configuration section named 'Server' was foundin '/etc/zookeeper/conf/zookeeper.jaas'.
2015-02-13 10:25:18,456 [myid:1] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.io.IOException: No JAAS configuration section named 'Server' was foundin '/etc/zookeeper/conf/zookeeper.jaas'.
at org.apache.zookeeper.server.ServerCnxnFactory.configureSaslLogin(ServerCnxnFactory.java:196)
at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:87)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:130)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Could you help me to figure out what's the problem ? Thanks!
RE: No JAAS configuration section named 'Server' was found
Posted by in...@wipro.com.
Pls try the following. I have tried in windows.
Steps for SASL Authentication in Zookeeper:-
1) Make changes in the zoo.cfg file present in conf folder in Zookeeper 3.4.5
authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
jaasLoginRenew=3600000
requireClientAuthScheme=sasl
2) Create a jaas.conf file in conf folder in Zookeeper 3.4.5 and include the following inside it:-
Server {
org.apache.zookeeper.server.auth.DigestLoginModule required
user_super="adminsecret"
user_bob="bobsecret";
};
Client {
org.apache.zookeeper.server.auth.DigestLoginModule required
username="bob"
password="bobsecret";
};
3) Add the following line in the zkEnv.cmd file present inside the bin folder in zookeeper3.4.5 (Right click->Edit to open):-
SET JVMFLAGS="-Djava.security.auth.login.config= E:/SoftwareSetups/zookeeper-3.4.5/conf/jaas.conf " // (Path where your jaas.conf file is present)
4) Create changes in the zkServer.cmd and the zkCli.cmd file by changing the java command to include the %JVMFLAGS% variable.
In zkServer.cmd:-
java "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" "%JVMFLAGS%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*
In zkCli.cmd:-
java "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" "%JVMFLAGS%" -cp "%CLASSPATH%" %ZOOMAIN% %*
-----Original Message-----
From: 郝东 [mailto:donhoff_h@163.com]
Sent: Friday, February 13, 2015 6:27 AM
To: user@zookeeper.apache.org
Subject: No JAAS configuration section named 'Server' was found
Hi, Guys
I was configuring my zookeeper to use SASL. I added a jaas file. The context is as following:
Server {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="mypath"
storeKey=true
useTicketCache=false
principal="myprincipal";
};
I also added the following properties in my zoo.cfg authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
kerberos.removeHostFromPrincipal=true
kerberos.removeRealmFromPrincipal=true
But when I ran "zkServer.sh start", I met the following errors:
2015-02-13 10:25:18,455 [myid:1] - ERROR [main:ServerCnxnFactory@195] - No JAAS configuration section named 'Server' was foundin '/etc/zookeeper/conf/zookeeper.jaas'.
2015-02-13 10:25:18,456 [myid:1] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.io.IOException: No JAAS configuration section named 'Server' was foundin '/etc/zookeeper/conf/zookeeper.jaas'.
at org.apache.zookeeper.server.ServerCnxnFactory.configureSaslLogin(ServerCnxnFactory.java:196)
at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:87)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:130)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Could you help me to figure out what's the problem ? Thanks!