|
|
-
SASL required now?Matthew Daumen 2013-01-23, 00:45
Folks,
I'm looking for a solution to creating an embedded zookeeper server for testing. I was using Curator's TestingServer, but after Curator 1.2.3 it is broken and fails to allow me to authenticate. I'm working from http://zookeeper.apache.org/doc/r3.4.5/zookeeperAdmin.html#sc_minimumConfiguration So, I tried this out: Properties startupProperties = new Properties(); startupProperties.put("clientPort", 33333); startupProperties.put("dataDir", "/www/a/data/zookeeper/data"); startupProperties.put("tickTime", 2000); QuorumPeerConfig quorumConfiguration = new QuorumPeerConfig(); try { quorumConfiguration.parseProperties(startupProperties); } catch(Exception e) { throw new RuntimeException(e); } final ZooKeeperServerMain zooKeeperServer = new ZooKeeperServerMain(); final ServerConfig configuration = new ServerConfig(); configuration.readFrom(quorumConfiguration); new Thread() { public void run() { try { zooKeeperServer.runFromConfig(configuration); } catch (IOException e) { log.error("ZooKeeper Failed", e); } } }.start(); try { framework = CuratorFrameworkFactory.builder() .connectString("localhost:33333") .connectionTimeoutMs(60000) .retryPolicy(new RetryNTimes(5, 10000)) .build(); } catch (Exception e) { log.error("Error trying to instantiate ZK TestingServer...", e); } framework.start(); For some reason, when I try to connect to the server I've created using localhost:3333, I get the following: 2013-01-22 16:19:40 | ERROR | | Thread-13 | com.macys.stella.services.async.ZookeeperTestServer | ZooKeeper Failed java.io.IOException: Could not configure server because SASL configuration did not allow the ZooKeeper server to authenticate itself properly: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required at org.apache.zookeeper.server.ServerCnxnFactory.configureSaslLogin(ServerCnxnFactory.java:205) at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:87) at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:110) at com.macys.stella.services.async.ZookeeperTestServer$1.run(ZookeeperTestServer.java:52) 2013-01-22 16:19:40 | INFO | | RMI TCP Connection(2)-127.0.0.1 | com.netflix.curator.framework.imps.CuratorFrameworkImpl | Starting 2013-01-22 16:19:40 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:40 | INFO | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.framework.state.ConnectionStateManager | State change: CONNECTED This is followed by a lot of log entries like this: 2013-01-22 16:19:43 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:44 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:45 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:46 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:47 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:48 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:49 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:50 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:51 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:52 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:54 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:55 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:56 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:57 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:58 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:19:59 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:20:00 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:20:01 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:20:02 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:20:03 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:20:05 | ERROR | | RMI TCP Connection(2)-127.0.0.1-EventThread | com.netflix.curator.ConnectionState | Authentication failed 2013-01-22 16:20:06 | ERROR | | RMI TCP +
Jordan Zimmerman 2013-01-23, 00:51
+
Matthew Daumen 2013-01-23, 00:57
+
Matthew Daumen 2013-01-24, 01:32
+
Jordan Zimmerman 2013-01-28, 22:06
+
Matthew Daumen 2013-01-28, 23:25
+
Jordan Zimmerman 2013-01-28, 23:34
+
mattdaumen@... 2013-01-28, 23:55
|