[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14563410#comment-14563410 ] Michi Mutsuzaki commented on ZOOKEEPER-2116: [~surendrasingh] which jira fixes this issue? zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical Fix For: 3.6.0 This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) {code} PS1 I can connect to ZK at 2888 using ZK Java client from code specifying the correct port with no issues. But CLI seems just to ignore the provided host:port parameter. PS2 Tried to run it with the pre-defined ZOOCFGDIR environment variable (to point to the path with the config file where the client port is set to 2888). No luck, same results as
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14564158#comment-14564158 ] surendra singh lilhore commented on ZOOKEEPER-2116: --- Its fixed very long back ...May here we need to change the fixed version.. It fixed as part of ZOOKEEPER-437. Pls check the check-in history for revision 783162 = Revision: 783162 Author: mahadev Date: AM 4:33:38, 10 June 2009 Message: ZOOKEEPER-437. Variety of Documentation Updates (grant via mahadev) zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical Fix For: 3.6.0 This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14562587#comment-14562587 ] surendra singh lilhore commented on ZOOKEEPER-2116: --- [~csbubbles] This is fixed in new version, Please check link zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) {code} PS1 I can connect to ZK at 2888 using ZK Java client from code specifying the correct port with no issues. But CLI seems just to ignore the provided host:port parameter. PS2 Tried to run it with the pre-defined ZOOCFGDIR environment variable (to point to the path with the config file where the client port is set to 2888). No luck, same results as
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14562589#comment-14562589 ] surendra singh lilhore commented on ZOOKEEPER-2116: --- http://zookeeper.apache.org/doc/r3.4.6/zookeeperStarted.html zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) {code} PS1 I can connect to ZK at 2888 using ZK Java client from code specifying the correct port with no issues. But CLI seems just to ignore the provided host:port parameter. PS2 Tried to run it with the pre-defined ZOOCFGDIR environment variable (to point to the path with the config file where the client port is set to 2888). No luck, same results as
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14562604#comment-14562604 ] Maxim Novikov commented on ZOOKEEPER-2116: -- Is ZK 3.6.0 already released? I got lost in your schedule, to be honest, it looks like 3.5.0 has been in alpha like about a year already... zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical Fix For: 3.6.0 This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) {code} PS1 I can connect to ZK at 2888 using ZK Java client from code specifying the correct port with no issues. But CLI seems just to ignore the provided host:port parameter. PS2 Tried to run it with the pre-defined ZOOCFGDIR environment variable (to point to the path
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362708#comment-14362708 ] surendra singh lilhore commented on ZOOKEEPER-2116: --- Here no code issue, By default zkCli.sh will connect to localhost:2181. {code} connectToZK(cl.getOption(server)); {code} {code} public MyCommandOptions() { options.put(server, localhost:2181); options.put(timeout, 3); } {code} If you want to connect on some other port you need to pass it with -server option. {code} ./zkCli.sh -server IP:Port {code} zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) {code} PS1 I can connect to ZK at 2888
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14362753#comment-14362753 ] Maxim Novikov commented on ZOOKEEPER-2116: -- Thanks. We need to get this info updated in the official documentation. Because currently it says as follows (refer to the link from my initial comment: ``` Connecting to ZooKeeper Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 This lets you perform simple, file-like operations. ``` There is no info about -server argument there. And the example provided doesn't work with other server:port values. zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at
[jira] [Commented] (ZOOKEEPER-2116) zkCli.sh doesn't honor host:port parameter
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14343379#comment-14343379 ] Andrew Pennebaker commented on ZOOKEEPER-2116: -- Furthermore, zkCli.sh doesn't even document these command line options; {code}zkCli.sh -h{code} is treated as {code}zkCli.sh{code} zkCli.sh doesn't honor host:port parameter -- Key: ZOOKEEPER-2116 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2116 Project: ZooKeeper Issue Type: Bug Components: java client, scripts Affects Versions: 3.4.6 Environment: Ubuntu 12 Reporter: Maxim Novikov Assignee: surendra singh lilhore Priority: Critical This doc http://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html (Connecting to ZooKeeper section) says: Once ZooKeeper is running, you have several options for connection to it: Java: Use bin/zkCli.sh 127.0.0.1:2181 In fact, it doesn't work that way. I am running ZooKeeper with a different port to listen to client connections (2888), and this command {code} bin/zkCli.sh 127.0.0.1:2888 {code} is still trying to connect to 2181. {code:title=output|borderStyle=solid} Connecting to localhost:2181 2015-02-11 15:38:14,415 [myid:] - INFO [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:host.name=localhost 2015-02-11 15:38:14,421 [myid:] - INFO [main:Environment@100] - Client environment:java.version=1.7.0_17 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.vendor=Oracle Corporation 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.home=/usr/java/jdk1.7.0_17/jre 2015-02-11 15:38:14,424 [myid:] - INFO [main:Environment@100] - Client environment:java.class.path=/opt/zookeeper-3.4.6/bin/../build/classes:/opt/zookeeper-3.4.6/bin/../build/lib/*.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/opt/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/opt/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/opt/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/opt/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/opt/zookeeper-3.4.6/bin/../src/java/lib/*.jar:../conf::/usr/share/antlr3/lib/antlr-3.5-complete-no-st3.jar 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.io.tmpdir=/tmp 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:java.compiler=NA 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.name=Linux 2015-02-11 15:38:14,425 [myid:] - INFO [main:Environment@100] - Client environment:os.arch=amd64 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:os.version=3.8.0-41-generic 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.name=mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.home=/home/mnovikov 2015-02-11 15:38:14,426 [myid:] - INFO [main:Environment@100] - Client environment:user.dir=/opt/zookeeper-3.4.6/bin 2015-02-11 15:38:14,428 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=3 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3107eafc Welcome to ZooKeeper! 2015-02-11 15:38:14,471 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@975] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2015-02-11 15:38:14,479 [myid:] - WARN [main-SendThread(localhost:2181):ClientCnxn$SendThread@1102] - 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) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) {code} PS1 I can connect to ZK at 2888 using ZK Java client from code specifying the correct port with no issues. But CLI seems just to ignore the provided host:port parameter. PS2 Tried to run it with the pre-defined ZOOCFGDIR environment variable (to point to the path with the config file where the