Skip to content

bookkeeper shell cookie_get command fails in pulsar v2.7.0 #2522

@anvinjain

Description

@anvinjain

BUG REPORT

Describe the bug
When executing bin/bookkeeper shell cookie_get, the command fails with no such method error.

root@pulsar-mini-bookie-0:/pulsar# bin/bookkeeper shell cookie_get
JMX enabled by default
Exception in thread "main" java.lang.NoSuchMethodError: com.beust.jcommander.JCommander.usage(Ljava/lang/StringBuilder;)V
	at org.apache.bookkeeper.tools.framework.Cli.setupCli(Cli.java:142)
	at org.apache.bookkeeper.tools.framework.Cli.<init>(Cli.java:53)
	at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:243)
	at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:64)
	at org.apache.bookkeeper.tools.cli.helpers.BookieShellCommand.runCmd(BookieShellCommand.java:46)
	at org.apache.bookkeeper.bookie.BookieShell.run(BookieShell.java:2235)
	at org.apache.bookkeeper.bookie.BookieShell.main(BookieShell.java:2326)

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Install pulsar locally in minikube
  2. kubectl exec -n pulsar -it "pulsar-mini-bookie-0" -- /bin/bash
  3. In the container, execute: bin/bookkeeper shell cookie_get
  4. See error

Expected behavior
Should be able to get cookie for the bookie

Screenshots
NA

Additional context
Looks like a packaging issue when bundling jars from bookkeeper and pulsar together. Pulsar depends on jcommander:1.78 and bookkeeper depends on jcommander:1.48. The higher version(1.78) gets bundled in pulsar/lib which does not have usage(StringBuilder) signature.

Easiest way out could be to upgrade jcommander in bookkeeper as well to 1.78

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions