Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-2532

zkCli throwing nullpointerException instead it should provide help when invalid input is entered

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.1, 3.5.2
    • Fix Version/s: 3.5.4, 3.6.0
    • Component/s: java client
    • Labels:
    • Release Note:
      submitting the patch again

      Description

      1. a) Connect to zookeeper using zkCli
      b) just input space and then hit enter

      2. a) Connect to zookeeper using zkCli and hit enter it will come as connected
      b) just input space and then hit enter

      Console log is as below:-
      [zk: localhost:2181(CONNECTING) 0] 2016-08-25 16:54:48,143 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxnSocketNetty$ZKClientPipelineFactory@363] - SSL handler added for channel: null
      2016-08-25 16:54:48,175 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@980] - Socket connection established, initiating session, client: /0:0:0:0:0:0:0:1:44592, server: localhost/0:0:0:0:0:0:0:1:2181
      2016-08-25 16:54:48,178 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxnSocketNetty$1@146] - channel is connected: [id: 0xd03f4226, /0:0:0:0:0:0:0:1:44592 => localhost/0:0:0:0:0:0:0:1:2181]
      2016-08-25 16:54:48,288 [myid:] - INFO [New I/O worker #1:ClientCnxn$SendThread@1400] - Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x101a00305cc0005, negotiated timeout = 30000

      WATCHER::

      WatchedEvent state:SyncConnected type:None path:null

      Exception in thread "main" java.lang.NullPointerException
      at org.apache.zookeeper.ZooKeeperMain$MyCommandOptions.getArgArray(ZooKeeperMain.java:171)
      at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:613)
      at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:577)
      at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:360)
      at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:320)
      at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:280)

      ----------------------------------------
      After connection is established, input space and hit enter

      [zk: localhost:2181(CONNECTING) 0] 2016-08-25 16:56:22,445 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxnSocketNetty$ZKClientPipelineFactory@363] - SSL handler added for channel: null
      2016-08-25 16:56:22,481 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@980] - Socket connection established, initiating session, client: /0:0:0:0:0:0:0:1:44594, server: localhost/0:0:0:0:0:0:0:1:2181
      2016-08-25 16:56:22,484 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxnSocketNetty$1@146] - channel is connected: [id: 0xe6d3a461, /0:0:0:0:0:0:0:1:44594 => localhost/0:0:0:0:0:0:0:1:2181]
      2016-08-25 16:56:22,597 [myid:] - INFO [New I/O worker #1:ClientCnxn$SendThread@1400] - Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x101a00305cc0007, negotiated timeout = 30000

      WATCHER::

      WatchedEvent state:SyncConnected type:None path:null

      [zk: localhost:2181(CONNECTED) 0]
      Exception in thread "main" java.lang.NullPointerException
      at org.apache.zookeeper.ZooKeeperMain$MyCommandOptions.getArgArray(ZooKeeperMain.java:171)
      at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:613)
      at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:577)
      at org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:360)
      at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:320)
      at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:280)

        Attachments

        1. ZOOKEEPER-2532.patch
          0.7 kB
          Rakesh Kumar Singh
        2. ZOOKEEPER-2532.patch
          0.7 kB
          Rakesh Kumar Singh

          Activity

            People

            • Assignee:
              rakeshsingh Rakesh Kumar Singh
              Reporter:
              rakeshsingh Rakesh Kumar Singh
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: