Not able to login into zookeeper


#1

zookeeper-client
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/zookeeper/zookeeper.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:133)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
at org.apache.log4j.LogManager.(LogManager.java:127)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)
at org.apache.zookeeper.ZooKeeperMain.(ZooKeeperMain.java:50)
Connecting to localhost:2181
2020-03-26 16:17:48,331 - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-205–1, built on 08/26/2017 09:37 GMT
2020-03-26 16:17:48,333 - INFO [main:Environment@100] - Client environment:host.name=cxln4.c.thelab-240901.internal
2020-03-26 16:17:48,333 - INFO [main:Environment@100] - Client environment:java.version=1.8.0_112
2020-03-26 16:17:48,335 - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2020-03-26 16:17:48,335 - INFO [main:Environment@100] - Client environment:java.home=/usr/jdk64/jdk1.8.0_112/jre
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:java.class.path=/usr/hdp/2.6.2.0-205//zookeeper/bin/…/build/classes:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/build/lib/.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/xercesMinimal-1.9.6.2.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/wagon-provider-api-2.4.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/wagon-http-shared4-2.4.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/wagon-http-shared-1.0-beta-6.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/wagon-http-lightweight-1.0-beta-6.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/wagon-http-2.4.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/wagon-file-1.0-beta-6.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/slf4j-log4j12-1.6.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/slf4j-api-1.6.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/plexus-utils-3.0.8.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/plexus-interpolation-1.11.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/plexus-container-default-1.0-alpha-9-stable-1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/netty-3.7.0.Final.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/nekohtml-1.9.6.2.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-settings-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-repository-metadata-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-project-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-profile-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-plugin-registry-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-model-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-error-diagnostics-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-artifact-manager-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-artifact-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/maven-ant-tasks-2.1.3.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/log4j-1.2.16.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/jsoup-1.7.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/jline-0.9.94.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/commons-logging-1.1.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/commons-io-2.2.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/commons-codec-1.6.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/classworlds-1.1-alpha-2.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/backport-util-concurrent-3.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/ant-launcher-1.8.0.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/lib/ant-1.8.0.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/zookeeper-3.4.6.2.6.2.0-205.jar:/usr/hdp/2.6.2.0-205//zookeeper/bin/…/src/java/lib/.jar:/usr/hdp/2.6.2.0-205//zookeeper/conf::/usr/hdp/2.6.2.0-205//zookeeper/conf:/usr/hdp/2.6.2.0-205//zookeeper/zookeeper-3.4.6.2.6.2.0-205.jar:/usr/hdp/2.6.2.0-205//zookeeper/zookeeper.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/ant-1.8.0.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/ant-launcher-1.8.0.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/backport-util-concurrent-3.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/classworlds-1.1-alpha-2.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/commons-codec-1.6.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/commons-io-2.2.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/commons-logging-1.1.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/jline-0.9.94.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/jsoup-1.7.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/log4j-1.2.16.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-ant-tasks-2.1.3.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-artifact-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-artifact-manager-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-error-diagnostics-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-model-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-plugin-registry-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-profile-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-project-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-repository-metadata-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/maven-settings-2.2.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/nekohtml-1.9.6.2.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/netty-3.7.0.Final.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/plexus-container-default-1.0-alpha-9-stable-1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/plexus-interpolation-1.11.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/plexus-utils-3.0.8.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/slf4j-api-1.6.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/slf4j-log4j12-1.6.1.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/wagon-file-1.0-beta-6.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/wagon-http-2.4.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/wagon-http-lightweight-1.0-beta-6.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/wagon-http-shared-1.0-beta-6.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/wagon-http-shared4-2.4.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/wagon-provider-api-2.4.jar:/usr/hdp/2.6.2.0-205//zookeeper/lib/xercesMinimal-1.9.6.2.jar:/usr/share/zookeeper/*
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:java.compiler=
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:os.name=Linux
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:os.arch=amd64
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:os.version=3.10.0-957.12.2.el7.x86_64
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:user.name=charliedurairaj1514
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:user.home=/home/charliedurairaj1514
2020-03-26 16:17:48,336 - INFO [main:Environment@100] - Client environment:user.dir=/home/charliedurairaj1514
2020-03-26 16:17:48,338 - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@e2144e4
Welcome to ZooKeeper!
2020-03-26 16:17:48,366 - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1019] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
2020-03-26 16:17:48,434 - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1146] - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)


#2

Hi, Charlie.

I have rechecked it!.
Zookeeper is working fine now.
You can proceed with your course now.

All the best!


#3

Thank You Satyajit ! It works Now.