|
Matthew Daumen
2013-01-23, 00:45
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
|
-
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
-
Re: SASL required now?Jordan Zimmerman 2013-01-23, 00:51
FYI - I just tried your code snippet and it works fine for me:
OS: MacOS X (latest) JDK: openjdk version "1.7.0-ea" ZooKeeper: 3.4.5 -JZ On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: > 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
-
Re: SASL required now?Matthew Daumen 2013-01-23, 00:57
I'm on a mac too running mountain lion, but I'm running java 1.6. Could
that be it? -m On Tue, Jan 22, 2013 at 4:51 PM, Jordan Zimmerman < [EMAIL PROTECTED]> wrote: > FYI - I just tried your code snippet and it works fine for me: > > OS: MacOS X (latest) > JDK: openjdk version "1.7.0-ea" > ZooKeeper: 3.4.5 > > -JZ > > On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: > > > 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 |
-
Re: SASL required now?Matthew Daumen 2013-01-24, 01:32
Well according to the ZK docs, 1.6 or higher is required. I was finally
able to get it to work using Curator 1.3.0, but only with zookeeper 3.4.3. On Tue, Jan 22, 2013 at 4:57 PM, Matthew Daumen <[EMAIL PROTECTED]>wrote: > I'm on a mac too running mountain lion, but I'm running java 1.6. Could > that be it? > > -m > > > On Tue, Jan 22, 2013 at 4:51 PM, Jordan Zimmerman < > [EMAIL PROTECTED]> wrote: > >> FYI - I just tried your code snippet and it works fine for me: >> >> OS: MacOS X (latest) >> JDK: openjdk version "1.7.0-ea" >> ZooKeeper: 3.4.5 >> >> -JZ >> >> On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: >> >> > 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
-
Re: SASL required now?Jordan Zimmerman 2013-01-28, 22:06
Are you sure that you don't have SASL system properties set (such as zookeeper.server.realm)?
-JZ On Jan 23, 2013, at 5:32 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: > Well according to the ZK docs, 1.6 or higher is required. I was finally > able to get it to work using Curator 1.3.0, but only with zookeeper 3.4.3. > > On Tue, Jan 22, 2013 at 4:57 PM, Matthew Daumen <[EMAIL PROTECTED]>wrote: > >> I'm on a mac too running mountain lion, but I'm running java 1.6. Could >> that be it? >> >> -m >> >> >> On Tue, Jan 22, 2013 at 4:51 PM, Jordan Zimmerman < >> [EMAIL PROTECTED]> wrote: >> >>> FYI - I just tried your code snippet and it works fine for me: >>> >>> OS: MacOS X (latest) >>> JDK: openjdk version "1.7.0-ea" >>> ZooKeeper: 3.4.5 >>> >>> -JZ >>> >>> On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: >>> >>>> 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 |
-
Re: SASL required now?Matthew Daumen 2013-01-28, 23:25
It's a pretty vanilla config.
On Mon, Jan 28, 2013 at 4:06 PM, Jordan Zimmerman < [EMAIL PROTECTED]> wrote: > Are you sure that you don't have SASL system properties set (such as > zookeeper.server.realm)? > > -JZ > > On Jan 23, 2013, at 5:32 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: > > > Well according to the ZK docs, 1.6 or higher is required. I was finally > > able to get it to work using Curator 1.3.0, but only with zookeeper > 3.4.3. > > > > On Tue, Jan 22, 2013 at 4:57 PM, Matthew Daumen <[EMAIL PROTECTED] > >wrote: > > > >> I'm on a mac too running mountain lion, but I'm running java 1.6. Could > >> that be it? > >> > >> -m > >> > >> > >> On Tue, Jan 22, 2013 at 4:51 PM, Jordan Zimmerman < > >> [EMAIL PROTECTED]> wrote: > >> > >>> FYI - I just tried your code snippet and it works fine for me: > >>> > >>> OS: MacOS X (latest) > >>> JDK: openjdk version "1.7.0-ea" > >>> ZooKeeper: 3.4.5 > >>> > >>> -JZ > >>> > >>> On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> > wrote: > >>> > >>>> 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)
-
Re: SASL required now?Jordan Zimmerman 2013-01-28, 23:34
I haven't heard of anyone else having this problem. This is why I suspect something in your environment.
-JZ On Jan 28, 2013, at 3:25 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: > It's a pretty vanilla config. > > On Mon, Jan 28, 2013 at 4:06 PM, Jordan Zimmerman < > [EMAIL PROTECTED]> wrote: > >> Are you sure that you don't have SASL system properties set (such as >> zookeeper.server.realm)? >> >> -JZ >> >> On Jan 23, 2013, at 5:32 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: >> >>> Well according to the ZK docs, 1.6 or higher is required. I was finally >>> able to get it to work using Curator 1.3.0, but only with zookeeper >> 3.4.3. >>> >>> On Tue, Jan 22, 2013 at 4:57 PM, Matthew Daumen <[EMAIL PROTECTED] >>> wrote: >>> >>>> I'm on a mac too running mountain lion, but I'm running java 1.6. Could >>>> that be it? >>>> >>>> -m >>>> >>>> >>>> On Tue, Jan 22, 2013 at 4:51 PM, Jordan Zimmerman < >>>> [EMAIL PROTECTED]> wrote: >>>> >>>>> FYI - I just tried your code snippet and it works fine for me: >>>>> >>>>> OS: MacOS X (latest) >>>>> JDK: openjdk version "1.7.0-ea" >>>>> ZooKeeper: 3.4.5 >>>>> >>>>> -JZ >>>>> >>>>> On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> >> wrote: >>>>> >>>>>> 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)
-
Re: SASL required now?mattdaumen@... 2013-01-28, 23:55
Yeah I would not be surprised. I'll comb the desert, so to speak.
-m On Jan 28, 2013, at 5:34 PM, Jordan Zimmerman <[EMAIL PROTECTED]> wrote: > I haven't heard of anyone else having this problem. This is why I suspect something in your environment. > > -JZ > > On Jan 28, 2013, at 3:25 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: > >> It's a pretty vanilla config. >> >> On Mon, Jan 28, 2013 at 4:06 PM, Jordan Zimmerman < >> [EMAIL PROTECTED]> wrote: >> >>> Are you sure that you don't have SASL system properties set (such as >>> zookeeper.server.realm)? >>> >>> -JZ >>> >>> On Jan 23, 2013, at 5:32 PM, Matthew Daumen <[EMAIL PROTECTED]> wrote: >>> >>>> Well according to the ZK docs, 1.6 or higher is required. I was finally >>>> able to get it to work using Curator 1.3.0, but only with zookeeper >>> 3.4.3. >>>> >>>> On Tue, Jan 22, 2013 at 4:57 PM, Matthew Daumen <[EMAIL PROTECTED] >>>> wrote: >>>> >>>>> I'm on a mac too running mountain lion, but I'm running java 1.6. Could >>>>> that be it? >>>>> >>>>> -m >>>>> >>>>> >>>>> On Tue, Jan 22, 2013 at 4:51 PM, Jordan Zimmerman < >>>>> [EMAIL PROTECTED]> wrote: >>>>> >>>>>> FYI - I just tried your code snippet and it works fine for me: >>>>>> >>>>>> OS: MacOS X (latest) >>>>>> JDK: openjdk version "1.7.0-ea" >>>>>> ZooKeeper: 3.4.5 >>>>>> >>>>>> -JZ >>>>>> >>>>>> On Jan 22, 2013, at 4:45 PM, Matthew Daumen <[EMAIL PROTECTED]> >>> wrote: >>>>>> >>>>>>> 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 |