1) Go to this link https://kafka.apache.org/downloads
2) Click on ticked link
3) go to given link
4) Go to this link for down load zoo keeper
https://archive.apache.org/dist/zookeeper/zookeeper-3.5.7/
5) Click below link
6) Run these on terminal
maneesh@maneesh:~$ ls
Desktop Documents Downloads Music Pictures 'Pictures (copy)' Public snap Templates Videos
maneesh@maneesh:~$ cd Downloads
maneesh@maneesh:~/Downloads$ ls
apache-zookeeper-3.5.7-bin.tar.gz google-chrome-stable_current_amd64.deb jdk-15.0.2_linux-x64_bin.deb kafka_2.13-2.7.0.tgz
maneesh@maneesh:~/Downloads$ tar -xf apache-zookeeper-3.5.7-bin.tar.gz
maneesh@maneesh:~/Downloads$ ls
apache-zookeeper-3.5.7-bin apache-zookeeper-3.5.7-bin.tar.gz google-chrome-stable_current_amd64.deb jdk-15.0.2_linux-x64_bin.deb kafka_2.13-2.7.0.tgz
maneesh@maneesh:~/Downloads$
6) Go to conf folder in extracted file and make copy of zoo_sample.cfg
and rename it zoo.cfg and delete commented line and make this.
zoo.cfg
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/tmp/zookeeper
clientPort=2181
maxClientCnxns=60
4lw.commands.whitelist=*
And save file.
7) And Go to these commands
maneesh@maneesh:~/Downloads$ cd apache-zookeeper-3.5.7-bin/
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ ls
bin conf docs lib LICENSE.txt NOTICE.txt README.md README_packaging.txt
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$
8)Run these command
maneesh@maneesh:~$ cd Downloads
maneesh@maneesh:~/Downloads$ ls
apache-zookeeper-3.5.7-bin jdk-15.0.2_linux-x64_bin.deb
apache-zookeeper-3.5.7-bin.tar.gz kafka_2.13-2.7.0.tgz
google-chrome-stable_current_amd64.deb
maneesh@maneesh:~/Downloads$ cd apache-zookeeper-3.5.7-bin/
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ ls
bin conf docs lib LICENSE.txt NOTICE.txt README.md README_packaging.txt
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ bin/zkServer.sh
ZooKeeper JMX enabled by default
Using config: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
Usage: bin/zkServer.sh [--config <conf-dir>] {start|start-foreground|stop|restart|status|print-cmd}
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ bin/zkServer.sh start-foreground
ZooKeeper JMX enabled by default
Using config: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
2021-01-31 17:23:47,888 [myid:] - INFO [main:QuorumPeerConfig@135] - Reading configuration from: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
2021-01-31 17:23:48,047 [myid:] - INFO [main:QuorumPeerConfig@387] - clientPortAddress is 0.0.0.0:2181
2021-01-31 17:23:48,047 [myid:] - INFO [main:QuorumPeerConfig@391] - secureClientPort is not set
2021-01-31 17:23:48,107 [myid:] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2021-01-31 17:23:48,108 [myid:] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2021-01-31 17:23:48,108 [myid:] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2021-01-31 17:23:48,108 [myid:] - WARN [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running in standalone mode
2021-01-31 17:23:48,127 [myid:] - INFO [main:ManagedUtil@46] - Log4j found with jmx enabled.
2021-01-31 17:23:48,202 [myid:] - INFO [main:QuorumPeerConfig@135] - Reading configuration from: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
2021-01-31 17:23:48,204 [myid:] - INFO [main:QuorumPeerConfig@387] - clientPortAddress is 0.0.0.0:2181
2021-01-31 17:23:48,204 [myid:] - INFO [main:QuorumPeerConfig@391] - secureClientPort is not set
2021-01-31 17:23:48,205 [myid:] - INFO [main:ZooKeeperServerMain@117] - Starting server
2021-01-31 17:23:48,222 [myid:] - INFO [main:FileTxnSnapLog@115] - zookeeper.snapshot.trust.empty : false
2021-01-31 17:23:48,384 [myid:] - INFO [main:Environment@109] - Server environment:zookeeper.version=3.5.7-f0fdd52973d373ffd9c86b81d99842dc2c7f660e, built on 02/10/2020 11:30 GMT
2021-01-31 17:23:48,385 [myid:] - INFO [main:Environment@109] - Server environment:host.name=maneesh
2021-01-31 17:23:48,393 [myid:] - INFO [main:Environment@109] - Server environment:java.version=15.0.2
2021-01-31 17:23:48,417 [myid:] - INFO [main:Environment@109] - Server environment:java.vendor=Oracle Corporation
2021-01-31 17:23:48,428 [myid:] - INFO [main:Environment@109] - Server environment:java.home=/usr/lib/jvm/jdk-15.0.2
2021-01-31 17:23:48,429 [myid:] - INFO [main:Environment@109] - Server environment:java.class.path=/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../zookeeper-server/target/classes:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../build/classes:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../zookeeper-server/target/lib/*.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../build/lib/*.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/zookeeper-jute-3.5.7.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/zookeeper-3.5.7.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/slf4j-log4j12-1.7.25.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/slf4j-api-1.7.25.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-transport-native-unix-common-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-transport-native-epoll-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-transport-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-resolver-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-handler-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-common-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-codec-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/netty-buffer-4.1.45.Final.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/log4j-1.2.17.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/json-simple-1.1.1.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jline-2.11.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jetty-util-9.4.24.v20191120.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jetty-servlet-9.4.24.v20191120.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jetty-server-9.4.24.v20191120.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jetty-security-9.4.24.v20191120.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jetty-io-9.4.24.v20191120.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jetty-http-9.4.24.v20191120.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/javax.servlet-api-3.1.0.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jackson-databind-2.9.10.2.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jackson-core-2.9.10.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/jackson-annotations-2.9.10.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/commons-cli-1.2.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../lib/audience-annotations-0.5.0.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../zookeeper-*.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../zookeeper-server/src/main/resources/lib/*.jar:/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf:
2021-01-31 17:23:48,430 [myid:] - INFO [main:Environment@109] - Server environment:java.library.path=/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
2021-01-31 17:23:48,437 [myid:] - INFO [main:Environment@109] - Server environment:java.io.tmpdir=/tmp
2021-01-31 17:23:48,439 [myid:] - INFO [main:Environment@109] - Server environment:java.compiler=<NA>
2021-01-31 17:23:48,441 [myid:] - INFO [main:Environment@109] - Server environment:os.name=Linux
2021-01-31 17:23:48,443 [myid:] - INFO [main:Environment@109] - Server environment:os.arch=amd64
2021-01-31 17:23:48,443 [myid:] - INFO [main:Environment@109] - Server environment:os.version=5.8.0-41-generic
2021-01-31 17:23:48,448 [myid:] - INFO [main:Environment@109] - Server environment:user.name=maneesh
2021-01-31 17:23:48,448 [myid:] - INFO [main:Environment@109] - Server environment:user.home=/home/maneesh
2021-01-31 17:23:48,449 [myid:] - INFO [main:Environment@109] - Server environment:user.dir=/home/maneesh/Downloads/apache-zookeeper-3.5.7-bin
2021-01-31 17:23:48,449 [myid:] - INFO [main:Environment@109] - Server environment:os.memory.free=58MB
2021-01-31 17:23:48,449 [myid:] - INFO [main:Environment@109] - Server environment:os.memory.max=1000MB
2021-01-31 17:23:48,450 [myid:] - INFO [main:Environment@109] - Server environment:os.memory.total=64MB
2021-01-31 17:23:48,476 [myid:] - INFO [main:ZooKeeperServer@938] - minSessionTimeout set to 4000
2021-01-31 17:23:48,478 [myid:] - INFO [main:ZooKeeperServer@947] - maxSessionTimeout set to 40000
2021-01-31 17:23:48,479 [myid:] - INFO [main:ZooKeeperServer@166] - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir /tmp/zookeeper/version-2 snapdir /tmp/zookeeper/version-2
2021-01-31 17:23:48,777 [myid:] - INFO [main:Log@169] - Logging initialized @8634ms to org.eclipse.jetty.util.log.Slf4jLog
2021-01-31 17:23:49,594 [myid:] - WARN [main:ContextHandler@1520] - o.e.j.s.ServletContextHandler@5f058f00{/,null,UNAVAILABLE} contextPath ends with /*
2021-01-31 17:23:49,595 [myid:] - WARN [main:ContextHandler@1531] - Empty contextPath
2021-01-31 17:23:49,792 [myid:] - INFO [main:Server@359] - jetty-9.4.24.v20191120; built: 2019-11-20T21:37:49.771Z; git: 363d5f2df3a8a28de40604320230664b9c793c16; jvm 15.0.2+7-27
2021-01-31 17:23:50,153 [myid:] - INFO [main:DefaultSessionIdManager@333] - DefaultSessionIdManager workerName=node0
2021-01-31 17:23:50,154 [myid:] - INFO [main:DefaultSessionIdManager@338] - No SessionScavenger set, using defaults
2021-01-31 17:23:50,160 [myid:] - INFO [main:HouseKeeper@140] - node0 Scavenging every 660000ms
2021-01-31 17:23:50,287 [myid:] - INFO [main:ContextHandler@825] - Started o.e.j.s.ServletContextHandler@5f058f00{/,null,AVAILABLE}
2021-01-31 17:23:50,519 [myid:] - INFO [main:AbstractConnector@330] - Started ServerConnector@2b6faea6{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2021-01-31 17:23:50,520 [myid:] - INFO [main:Server@399] - Started @10377ms
2021-01-31 17:23:50,522 [myid:] - INFO [main:JettyAdminServer@112] - Started AdminServer on address 0.0.0.0, port 8080 and command URL /commands
2021-01-31 17:23:50,566 [myid:] - INFO [main:ServerCnxnFactory@135] - Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
2021-01-31 17:23:50,683 [myid:] - INFO [main:NIOServerCnxnFactory@673] - Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 4 worker threads, and 64 kB direct buffers.
2021-01-31 17:23:50,691 [myid:] - INFO [main:NIOServerCnxnFactory@686] - binding to port 0.0.0.0/0.0.0.0:2181
2021-01-31 17:23:50,852 [myid:] - INFO [main:ZKDatabase@117] - zookeeper.snapshotSizeFactor = 0.33
2021-01-31 17:23:50,862 [myid:] - INFO [main:FileTxnSnapLog@404] - Snapshotting: 0x0 to /tmp/zookeeper/version-2/snapshot.0
2021-01-31 17:23:50,889 [myid:] - INFO [main:FileTxnSnapLog@404] - Snapshotting: 0x0 to /tmp/zookeeper/version-2/snapshot.0
2021-01-31 17:23:51,165 [myid:] - INFO [main:ContainerManager@64] - Using checkIntervalMs=60000 maxPerMinute=10000
^Cmaneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$
9) Running zookeeper in background
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$
10) It will tell about zookeeper is running or not
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ echo stat | nc localhost 2181
Zookeeper version: 3.5.7-f0fdd52973d373ffd9c86b81d99842dc2c7f660e, built on 02/10/2020 11:30 GMT
Clients:
/127.0.0.1:43554[0](queued=0,recved=1,sent=0)
Latency min/avg/max: 0/0/0
Received: 1
Sent: 0
Connections: 1
Outstanding: 0
Zxid: 0x0
Mode: standalone
Node count: 5
11) Stop Zookeeper
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ bin/zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$
12) When now we check status of zookeeper
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ echo stat | nc localhost 2181
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$
13) Now again we start zookeeper in foreground
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ bin/zkServer.sh start-foreground
ZooKeeper JMX enabled by default
Using config: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
2021-01-31 17:55:20,022 [myid:] - INFO [main:QuorumPeerConfig@135] - Reading configuration from: /home/maneesh/Downloads/apache-zookeeper-3.5.7-bin/bin/../conf/zoo.cfg
2021-01-31 17:55:20,064 [myid:] - INFO [main:QuorumPeerConfig@387] - clientPortAddress is 0.0.0.0:2181
2021-01-31 17:55:20,065 [myid:] - INFO [main:QuorumPeerConfig@391] - secureClientPort is not set
2021-01-31 17:55:20,081 [myid:] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2021-01-31 17:55:20,084 [myid:] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2021-01-31 17:55:20,085 [myid:] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2021-01-31 17:55:20,085 [myid:] - WARN [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running in standalone mode
2021-01-31 17:55:20,096 [myid:] - INFO [main:ManagedUtil@46] - Log4j found with jmx enabled.
2021-01-31 17:55:20,142 [myid:] - INFO [main:QuorumPeerConfig@
14) Now extract kafka in 2nd terminal
maneesh@maneesh:~$ cd Downloads
maneesh@maneesh:~/Downloads$ ls
apache-zookeeper-3.5.7-bin apache-zookeeper-3.5.7-bin.tar.gz google-chrome-stable_current_amd64.deb jdk-15.0.2_linux-x64_bin.deb kafka_2.13-2.7.0.tgz
maneesh@maneesh:~/Downloads$ tar -xf kafka_2.13-2.7.0.tgz
maneesh@maneesh:~/Downloads$
15) Edit kafka config file in 2 nd terminal
maneesh@maneesh:~/Downloads$ cd kafka_2.13-2.7.0/
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ vim config/server.properties
Command 'vim' not found, but can be installed with:
sudo apt install vim # version 2:8.1.2269-1ubuntu5, or
sudo apt install vim-tiny # version 2:8.1.2269-1ubuntu5
sudo apt install neovim # version 0.4.3-3
sudo apt install vim-athena # version 2:8.1.2269-1ubuntu5
sudo apt install vim-gtk3 # version 2:8.1.2269-1ubuntu5
sudo apt install vim-nox # version 2:8.1.2269-1ubuntu5
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ sudo apt install vim
[sudo] password for maneesh:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
vim-runtime
Suggested packages:
ctags vim-doc vim-scripts
The following NEW packages will be installed:
vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 216 not upgraded.
Need to get 7,111 kB of archives.
After this operation, 34.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/main amd64 vim-runtime all 2:8.1.2269-1ubuntu5 [5,873 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/main amd64 vim amd64 2:8.1.2269-1ubuntu5 [1,238 kB]
Fetched 7,111 kB in 12s (587 kB/s)
Selecting previously unselected package vim-runtime.
(Reading database ... 187765 files and directories currently installed.)
Preparing to unpack .../vim-runtime_2%3a8.1.2269-1ubuntu5_all.deb ...
Adding 'diversion of /usr/share/vim/vim81/doc/help.txt to /usr/share/vim/vim81/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim81/doc/tags to /usr/share/vim/vim81/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:8.1.2269-1ubuntu5) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a8.1.2269-1ubuntu5_amd64.deb ...
Unpacking vim (2:8.1.2269-1ubuntu5) ...
Setting up vim-runtime (2:8.1.2269-1ubuntu5) ...
Setting up vim (2:8.1.2269-1ubuntu5) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
Processing triggers for man-db (2.9.1-1) ...
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ vim config/server.properties
16) You can also edit in config folder
server.properties file
############################# Server Basics #############################
# The id of the broker. This must be set to a unique integer for each broker.
broker.id=1
############################# Socket Server Settings #############################
# The address the socket server listens on. It will get the value returned from
# java.net.InetAddress.getCanonicalHostName() if not configured.
# FORMAT:
# listeners = listener_name://host_name:port
# EXAMPLE:
# listeners = PLAINTEXT://your.host.name:9092
listeners=PLAINTEXT://localhost:9092
17) Start kafka in foreground
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ bin/kafka-server-start.sh config/server.properties
[2021-01-31 18:30:32,578] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2021-01-31 18:30:33,264] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2021-01-31 18:30:33,483] INFO Registered signal handlers for TERM, INT, HUP (org.apache.kafka.common.utils.LoggingSignalHandler)
[2021-01-31 18:30:33,496] INFO starting (kafka.server.KafkaServer)
[2021-01-31 18:30:33,502] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2021-01-31 18:30:33,562] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient)
[2021-01-31 18:30:33,585] INFO Client environment:zookeeper.version=3.5.8-f439ca583e70862c3068a1f2a7d4d068eec33315, built on 05/04/2020 15:53 GMT (org.apache.zookeeper.ZooKeeper)
[2021-01-31 18:30:33,596] INFO Client environment:host.name=maneesh (org.apache.zookeeper.ZooKeeper)
[2021-01-31 18:30:33,597] INFO Client e
18) Now we will check how many broker is running through zookeeper in 3rd terminal
maneesh@maneesh:~/Downloads$ echo dump | nc localhost 2181 | grep brokers
/brokers/ids/1
maneesh@maneesh:~/Downloads$
19) Now we shut down the kafka in 3rd terminal
maneesh@maneesh:~$ cd Downloads
maneesh@maneesh:~/Downloads$ ls
apache-zookeeper-3.5.7-bin apache-zookeeper-3.5.7-bin.tar.gz google-chrome-stable_current_amd64.deb jdk-15.0.2_linux-x64_bin.deb kafka_2.13-2.7.0 kafka_2.13-2.7.0.tgz
maneesh@maneesh:~/Downloads$ cd kafka_2.13-2.7.0/
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ bin/kafka-server-stop.sh
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$
19) Start kafka in background 2nd terminal
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ bin/kafka-server-start.sh -daemon config/server.properties
20) Now we can check what is background through this command in 2nd terminal
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ tail -100f logs/server.log
socket.connection.setup.timeout.max.ms = 127000
socket.connection.setup.timeout.ms = 10000
socket.receive.buffer.bytes = 102400
socket.request.max.bytes = 104857600
socket.send.buffer.bytes = 102400
ssl.cipher.suites = []
ssl.client.auth = none
ssl.enabled.protocols = [TLSv1.2, TLSv1.3]
ssl.endpoint.identification
22)stop kafka
maneesh@maneesh:~/Downloads/kafka_2.13-2.7.0$ bin/kafka-server-stop.sh
21) stop zookeeper
maneesh@maneesh:~/Downloads/apache-zookeeper-3.5.7-bin$ bin/zkServer.sh stop




Comments
Post a Comment