Help: CreateTTL got `unknown error: -6`
catundercar opened this issue · 5 comments
when I test the CreateTTL
method,I got an error: unknown error: -6
in my cluster environment.
This is my code:
func main() {
c, _, err := zk.Connect([]string{"192.168.29.81:2181", "192.168.29.82:2181", "192.168.29.83:2181"})
if err!= nil {
panic(err)
}
if _, err:= c.CreateTTL("/test", []byte{}, zk.FlagTTL|zk.FlagEphemeral, zk.WorldACL(zk.PermAll), 20*time.Second); err != nil {
panic(err)
}
}
The zookeeper conf like this:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/opt/data/zookeeper
clientPort=2181
forceSync=no
autopurge.snapRetainCount=5
admin.serverPort=8999
server.81=192.168.29.81:2888:3888
server.82=192.168.29.82:2888:3888
server.83=192.168.29.83:2888:3888
Save this child, please.QAQ
What is your ZK server version?
-6 is unimplemented: https://github.com/apache/zookeeper/blob/190a227aa9d4655ebfe6ba9f5c2da426da8c5d98/zookeeper-server/src/main/java/org/apache/zookeeper/KeeperException.java#L229
TTL nodes was added in ZK 3.5.3
Also from this guide https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html
Note: TTL Nodes must be enabled via System property as they are disabled by default. See the Administrator's Guide for details. If you attempt to create TTL Nodes without the proper System property set the server will throw KeeperException.UnimplementedException.
What is your ZK server version?
-6 is unimplemented: https://github.com/apache/zookeeper/blob/190a227aa9d4655ebfe6ba9f5c2da426da8c5d98/zookeeper-server/src/main/java/org/apache/zookeeper/KeeperException.java#L229
TTL nodes was added in ZK 3.5.3
What is your ZK server version?
-6 is unimplemented: https://github.com/apache/zookeeper/blob/190a227aa9d4655ebfe6ba9f5c2da426da8c5d98/zookeeper-server/src/main/java/org/apache/zookeeper/KeeperException.java#L229
TTL nodes was added in ZK 3.5.3
Version is 3.5.7
Also from this guide https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html
Note: TTL Nodes must be enabled via System property as they are disabled by default. See the Administrator's Guide for details. If you attempt to create TTL Nodes without the proper System property set the server will throw KeeperException.UnimplementedException.
oh, let me try.
Also from this guide https://zookeeper.apache.org/doc/r3.5.4-beta/zookeeperProgrammers.html
Note: TTL Nodes must be enabled via System property as they are disabled by default. See the Administrator's Guide for details. If you attempt to create TTL Nodes without the proper System property set the server will throw KeeperException.UnimplementedException.
oh, let me try.
Thank You! Though I set my config like zookeeper's document, create with TTL
is still throw UnimplementedException
. I think it must be my way about changing config.