pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[Bug] pulsar-admin script encountered error without providing full parameters

Open gaozhangmin opened this issue 3 years ago • 2 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Version

Master

Minimal reproduce step

just run bin/pulsar-admin

What did you expect to see?

Main parameters are required ("persistent://tenant/namespace/topic")

Get the internal stats for the topic
Usage: stats-internal [options] persistent://tenant/namespace/topic
  Options:
    -m, --metadata
      Flag to include ledger metadata
      Default: false

What did you see instead?

Main parameters are required ("persistent://tenant/namespace/topic")

Get the internal stats for the topic
Usage: stats-internal [options] persistent://tenant/namespace/topic
  Options:
    -m, --metadata
      Flag to include ledger metadata
      Default: false

2022-09-21T14:18:44,043+0800 [main] WARN  org.apache.pulsar.common.util.ShutdownUtil - Triggering immediate shutdown of current process with status 1
java.lang.Exception: Stacktrace for immediate shutdown
	at org.apache.pulsar.common.util.ShutdownUtil.triggerImmediateForcefulShutdown(ShutdownUtil.java:52) ~[org.apache.pulsar-pulsar-common-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
	at org.apache.pulsar.admin.cli.PulsarAdminTool.exit(PulsarAdminTool.java:309) ~[org.apache.pulsar-pulsar-client-tools-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
	at org.apache.pulsar.admin.cli.PulsarAdminTool.main(PulsarAdminTool.java:300) ~[org.apache.pulsar-pulsar-client-tools-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]

Anything else?

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

gaozhangmin avatar Sep 21 '22 06:09 gaozhangmin

@lhotari it's related to https://github.com/apache/pulsar/pull/17589

nicoloboschi avatar Sep 21 '22 07:09 nicoloboschi

@gaozhangmin what do you mean by "without providing full parameters"? From the issue description the only difference is the real manner contains extra logs.

tisonkun avatar Sep 21 '22 11:09 tisonkun

The issue had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Oct 22 '22 02:10 github-actions[bot]

@tisonkun the issue is that if the pulsar-admin command exit with an error code, that stacktrace is printed out to the user. Will send a pr later today

nicoloboschi avatar Nov 10 '22 09:11 nicoloboschi

The issue had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Dec 12 '22 02:12 github-actions[bot]

Should be fixed by https://github.com/apache/pulsar/pull/19884.

tisonkun avatar Jun 07 '23 04:06 tisonkun