apache-zookeeper

How to access a protected znode from ZooKeeper using zkCli?

好久不见. 提交于 2019-12-08 07:50:58
问题 I have created a znode using: zookeeper-0:/opt/zookeeper/bin # ./zkCli.sh create /mynode content digest:user:pass:cdrwa How to access the znode using the zkCli.sh utility now? zookeeper-0:/opt/zookeeper/bin # ./zkCli.sh get /mynode Connecting to localhost:2181 WATCHER:: WatchedEvent state:SyncConnected type:None path:null Authentication is not valid : /mynode zookeeper-0:/opt/zookeeper/bin # The getAcl is showing the following: zookeeper-0:/opt/zookeeper/bin # ./zkCli.sh getAcl /mynode

Starting Zookeeper and Kafka servers from Java application

扶醉桌前 提交于 2019-12-07 21:43:14
问题 I am using a Java application which start a consumer reading Kafka topics. Every time I need to start the consumer application, I have to start the Zookeeper and Kafka servers with commands in cmd. Is it possible to start/stop them with small Java programs? Thank you. 回答1: Please see this topic, it's about starting Zookeeper in Java: Best way to start zookeeper server from java program directing to this: Is it possible to start a zookeeper server instance in process, say for unit tests? 回答2:

How to programmatically detect which server in ensemble client is connected to?

喜你入骨 提交于 2019-12-07 14:41:03
问题 How to programmatically detect which server in a ZooKeeper ensemble a client is connected to? I'm using the Apache Curator API and I am listening for state changes in connection by registering ConnectionStateListener. I would like to know which server in the ensemble a client is connected to when the client reconnects if the server it was connected to goes down. 回答1: You can see this in the logs produced by Curator. In the example output below, the CuratorFramework client has been given 4

Storm KafkaSpout stopped to consume messages from Kafka Topic

老子叫甜甜 提交于 2019-12-07 10:31:25
问题 My problem is that Storm KafkaSpout stopped to consume messages from Kafka topic after a period of time. When debug is enabled in storm, I get the log file like this: 2016-07-05 03:58:26.097 o.a.s.d.task [INFO] Emitting: packet_spout __metrics [#object[org.apache.storm.metric.api.IMetricsConsumer$TaskInfo 0x2c35b34f "org.apache.storm.metric.api.IMetricsConsumer$TaskInfo@2c35b34f"] [#object[org.apache.storm.metric.api.IMetricsConsumer$DataPoint 0x798f1e35 "[__ack-count = {default=0}]"] #object

What do I need to know when upgrading Zookeeper from 3.3.X to 3.4.X?

放肆的年华 提交于 2019-12-07 08:20:51
问题 I have a Zookeeper ensemble I'd like to upgrade from 3.3.X to 3.4.X branch. Can this be done on a live cluster? Requires downtime? Are there any instructions to be found on this somewhere? 回答1: From what I checked , What are the options/process for upgrading ZooKeeper? There are two primary ways of doing this; 1) full restart or 2) rolling restart. In the full restart case you can stage your updated code/configuration/etc..., stop all of the servers in the ensemble, switch code/configuration,

Solrcloud Zookeper Setup : No registered leader was found after waiting for 4000ms , collection: c1 slice: shard2

梦想与她 提交于 2019-12-07 06:45:02
问题 Am using solr 4.10.3, I start solr via embedded jetty server in java. Am trying to configure solrcloud with 2 shards(Leaders). I have an external zookeeper setup, I point to zookeeper instance while starting solr like this. System.setProperty("zkHost", "192.168.2.21:2111"); System.setProperty("numShards", "2"); System.setProperty("collection.configName", "configuration1"); System.setProperty("bootstrap_confdir","/conf/zooconf"); I have two solr instances running, one in 8983 port & other in

Issue when trying to write to a mounted volume from inside a container as a non-root user

喜欢而已 提交于 2019-12-07 04:56:09
问题 I'm working with a container that will be running ZooKeeper but I'm running into issues with permissions on the host volumes that I mount into my container. This is my setup: On the host machine (Ubuntu 14.04): Created a "zookeeper" system user (id=106) and group (id=111). Created the directory "/var/log/zookeeper" and set its ownership to zookeeper (ie. chown zookeeper:zookeeper). This is the directory that I will be mounting into my container. Inside the container (Ubuntu 14.04): Also

TimeoutException: Timeout expired while fetching topic metadata Kafka

被刻印的时光 ゝ 提交于 2019-12-07 04:38:14
问题 I have been trying to deploy Kafka with schema registry locally using Kubernetes. However, the logs of the schema registry pod show this error message: ERROR Server died unexpectedly: (io.confluent.kafka.schemaregistry.rest.SchemaRegistryMain:51) org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata What could be the reason of this behavior? ' In order to run Kubernetes locally, I user Minikube version v0.32.0 with Kubernetes version v1.13.0 My Kafka

Zookeeper data directory cleanup

核能气质少年 提交于 2019-12-07 03:32:16
问题 I am running 3 node zookeeper cluster to process storm and kafka.Zookeeper Data directory eats up all the space in my system.I am not sure how to clean it up.As, I don't want to delete the data entirely because i will lose the state of the processes.I looked into autopurge.purgeInterval in zoo.cfg , but it doesn't work as I expected. I am using zookeeper 3.4.6 How can I delete the old data without affecting the new ones? 回答1: Assuming you have zookeeper installed in /opt/zookeeper-3.4.6 , the

Roles of zookeeper in solr cloud

大兔子大兔子 提交于 2019-12-07 03:11:19
问题 I am new to SolrCloud(4.X), Can anybody explain in detail about roles and responsibility of zookeeper in SolrCloud? Also how does zookeper work in regards to search/add request to Solr? 回答1: Zookeepers are a central repository for SolrCloud configuration. You can consider it as a distributed filesystem which can be accessed by all Solr nodes in the cluster. So if you change any config file you just need to inform or upload it to Zookeeper and not on every node in the cluster. One more