Kafka + Zookeeper: Connection to node -1 could not be established. Broker may not be available

UPD: if you are running in single-node mode: I have seen this message in spark console log while trying to deploy application. Solved by changing this parameter in server.properties: listeners=PLAINTEXT://myhostname:9092 to listeners=PLAINTEXT://localhost:9092 make sure that you have java process listening on 9092 with netstat -lptu

supervisord stopping child processes

The same problem was encountered by Rick Hanlon II here: https://coderwall.com/p/4tcw7w Option stopasgroup=true should be set in the program section for supervisord to stop not only the parent process but also the child processes. The example is given as: [program:some_django] command=python manage.py runserver directory=/dir/to/app stopasgroup=true Also, have in mind that you may have an older … Read more

Running into LeaderNotAvailableException when using Kafka 0.8.1 with Zookeeper 3.4.6

Kafka uses an external coordination framework (by default Zookeeper) to maintain configuration. It seems the configuration is now out-of-sync with the Kafka log data. In this case, I’d remove affected topic data and related Zookeeper data. For Test Environment: Stop Kafka-server and Zookeeper-server Remove the data directories of both services, by default they are /tmp/kafka-log … Read more

ZooKeeper alternatives? (cluster coordination service) [closed]

I’ve looked extensively at Zookeeper/Curator, Eureka, etcd, and consul. Zookeeper/Curator and Eureka are in many ways the most polished and easiest to integrate if you are in the Java world. Etcd is pretty cool and very flexible, but It is really just a HA key store so you would have to write a lot of … Read more

How to check if ZooKeeper is running or up from command prompt?

To check if Zookeeper is accessible. One method is to simply telnet to the proper port and execute the stats command. root@host:~# telnet localhost 2181 Trying 127.0.0.1… Connected to myhost. Escape character is ‘^]’. stats Zookeeper version: 3.4.3-cdh4.0.1–1, built on 06/28/2012 23:59 GMT Clients: Latency min/avg/max: 0/0/677 Received: 4684478 Sent: 4687034 Outstanding: 0 Zxid: 0xb00187dd0 … Read more

List all Kafka 0.10 topics using – -zookeeper flag without access to Zookeeper

Kafka uses ZooKeeper so you need to first start a ZooKeeper server if you don’t already have one. If you do not want to install and have a separate zookeeper server, you can use the convenience script packaged with kafka to get a quick-and-dirty single-node ZooKeeper instance. Starting the single-node Zookeeper instance: bin/zookeeper-server-start.sh config/zookeeper.properties Starting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)