sntfrc opened a new issue #2371:
URL: https://github.com/apache/bookkeeper/issues/2371


   **BUG REPORT**
   
   ***Description***
   
   "bookkeeper listbookies -a" crashes on unresolvable DNS names for a bookie, 
instead of going on to print other bookies.
   
   `java.lang.NullPointerException
           at 
org.apache.bookkeeper.tools.cli.helpers.CommandHelpers.getBookieSocketAddrStringRepresentation(CommandHelpers.java:46)
           at 
org.apache.bookkeeper.tools.cli.commands.bookies.ListBookiesCommand.printBookies(ListBookiesCommand.java:119)
           at 
org.apache.bookkeeper.tools.cli.commands.bookies.ListBookiesCommand.run(ListBookiesCommand.java:108)
           at 
org.apache.bookkeeper.tools.cli.commands.bookies.ListBookiesCommand.run(ListBookiesCommand.java:39)
           at 
org.apache.bookkeeper.tools.cli.helpers.DiscoveryCommand.apply(DiscoveryCommand.java:57)
           at 
org.apache.bookkeeper.tools.cli.helpers.ClientCommand.apply(ClientCommand.java:60)
           at 
org.apache.bookkeeper.bookie.BookieShell$ListBookiesCmd.runCmd(BookieShell.java:1142)
           at 
org.apache.bookkeeper.bookie.BookieShell$MyCommand.runCmd(BookieShell.java:223)
           at 
org.apache.bookkeeper.bookie.BookieShell.run(BookieShell.java:1976)
           at 
org.apache.bookkeeper.bookie.BookieShell.main(BookieShell.java:2067)`
   
   ***To Reproduce***
   
   Steps to reproduce the behavior:
   1. Remove one hostname-identified bookie's DNS A record
   2. Wait for DNS cache to expire, or flush
   3. Issue the command: ./bookkeeper listbookies -a
   
   ***Expected behavior***
   
   I expected to see the bookie hostname without any IP address (or a more 
meaningful warning) but anyway it should go on to printing the other bookies' 
instead of crashing.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to