aleonsan / ansible-kafka Goto Github PK
View Code? Open in Web Editor NEWInstall, configure and setup Apache Kafka and its dependencies
Install, configure and setup Apache Kafka and its dependencies
I have configured the same playbooks with kafka , zookeper and java packages variables ,
ansible is ruuning kafka playbook successfully , but both services of kafka and zookeeper are failed to start
`[centos@kafka03 ~]$ systemctl status zookeeper.service
โ zookeeper.service - Zookeeper
Loaded: loaded (/etc/systemd/system/zookeeper.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2021-10-14 07:41:22 UTC; 15min ago
Process: 970 ExecStart=/etc/apache-zookeeper-3.7.0/bin/zkServer.sh start (code=exited, status=1/FAILURE)
Main PID: 970 (code=exited, status=1/FAILURE)
-- The start-up result is done.
Oct 14 07:41:21 kafka03.novalocal sudo[962]: pam_unix(sudo:session): session closed for user root
Oct 14 07:41:21 kafka03.novalocal polkitd[491]: Unregistered Authentication Agent for unix-process:964:6297174 (system bus name :1.191,
Oct 14 07:41:21 kafka03.novalocal zkServer.sh[970]: ZooKeeper JMX enabled by default
Oct 14 07:41:21 kafka03.novalocal zkServer.sh[970]: Using config: /etc/apache-zookeeper-3.7.0/bin/../conf/zoo.cfg
Oct 14 07:41:22 kafka03.novalocal zkServer.sh[970]: Starting zookeeper ... FAILED TO START
Oct 14 07:41:22 kafka03.novalocal systemd[1]: zookeeper.service: main process exited, code=exited, status=1/FAILURE
Oct 14 07:41:22 kafka03.novalocal systemd[1]: Unit zookeeper.service entered failed state.
Oct 14 07:41:22 kafka03.novalocal systemd[1]: zookeeper.service failed.
Oct 14 07:41:23 kafka03.novalocal sudo[1009]: centos : TTY=pts/1 ; PWD=/home/centos ; USER=root ; COMMAND=/bin/systemctl status zooke
Oct 14 07:41:23 kafka03.novalocal sudo[1009]: pam_unix(sudo:session): session opened for user root by centos(uid=0)
Oct 14 07:41:23 kafka03.novalocal sudo[1009]: pam_unix(sudo:session): session closed for user root
Oct 14 07:49:21 kafka03.novalocal sudo[1428]: centos : TTY=pts/1 ; PWD=/home/centos ; USER=root ; COMMAND=/bin/systemctl status kafka
Oct 14 07:49:21 kafka03.novalocal sudo[1428]: pam_unix(sudo:session): session opened for user root by centos(uid=0)
Oct 14 07:49:21 kafka03.novalocal sudo[1428]: pam_unix(sudo:session): session closed for user root`
bin/kafka-topics.sh --create --zookeeper 192.168.131.168:2181 --replication-factor 1 --partitions 1 --topic clicks_topic1
WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both.
Error while executing topic command : replication factor: 1 larger than available brokers: 0
[2017-03-11 10:11:39,649] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: replication factor: 1 larger than available brokers: 0
(kafka.admin.TopicCommand$)
[root@li819-138 kafka_2.12-0.10.2.0]# bin/kafka-topics.sh --create --zookeeper 192.168.131.168:2181 --replication-factor 1 --partitions 1 --topic clicks_topic1
Exception in thread "main" org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server '192.168.131.168:2181' with timeout of 30000 ms
at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1233)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:157)
at org.I0Itec.zkclient.ZkClient.(ZkClient.java:131)
at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:79)
at kafka.utils.ZkUtils$.apply(ZkUtils.scala:61)
at kafka.admin.TopicCommand$.main(TopicCommand.scala:56)
at kafka.admin.TopicCommand.main(TopicCommand.scala)
Kafaka and zookeeper is running but when we try to create topic from below command and getting error.
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 2 --partitions 30 --topic clicks_topic1
Error
/etc/kafka_2.11-0.10.0.0/bin/kafka-run-class.sh: line 243: exec: java: not found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.