Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help: CreateTTL got unknown error: -6 #49

Closed
catundercar opened this issue Feb 3, 2021 · 5 comments
Closed

Help: CreateTTL got unknown error: -6 #49

catundercar opened this issue Feb 3, 2021 · 5 comments

Comments

@catundercar
Copy link

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

@nemith
Copy link

nemith commented Feb 3, 2021

@nemith
Copy link

nemith commented Feb 3, 2021

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.

@catundercar
Copy link
Author

@catundercar
Copy link
Author

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.

@catundercar
Copy link
Author

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.

@nemith nemith added easy Good for newcomers enhancement New feature or request and removed easy Good for newcomers enhancement New feature or request labels Mar 26, 2021
@nemith nemith closed this as completed Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants