bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

bin/bkctl cluster init fails with "java.lang.IllegalArgumentException: No service URI is provided"

Open eolivelli opened this issue 5 years ago • 4 comments

BUG REPORT I am trying to setup a StreamStorage Cluster, but the command to init the cluster is not working.

Describe the bug

If you run this command, there is no error and no way to understand what to do (without checking into BK code)

bin/bkctl cluster init

java.lang.IllegalArgumentException: No service URI is provided
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
	at org.apache.bookkeeper.stream.cli.commands.cluster.InitClusterCommand.apply(InitClusterCommand.java:114)
	at org.apache.bookkeeper.stream.cli.commands.cluster.InitClusterCommand.apply(InitClusterCommand.java:53)
	at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:94)
	at org.apache.bookkeeper.tools.common.BKCommand.lambda$apply$0(BKCommand.java:49)
	at org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:224)
	at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:244)
	at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:51)
	at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:39)
	at org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:232)
	at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:244)
	at org.apache.bookkeeper.tools.framework.CliCommandGroup.apply(CliCommandGroup.java:68)
	at org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:232)
	at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:244)
	at org.apache.bookkeeper.tools.cli.BKCtl.main(BKCtl.java:58)
Error : No service URI is provided

Expected behavior

The command succeedes

Suggestions We should document how to start with the BK Stream Storage Service

eolivelli avatar Dec 02 '20 09:12 eolivelli

@Jennifer88huang the stream storage service is the state storage for Pulsar Functions probably it is better to document how it works in the BookKeeper website http://bookkeeper.apache.org/docs/4.12.0/overview/overview/

eolivelli avatar Dec 02 '20 10:12 eolivelli

The right command is: bin/bkctl cluster init zk://localhost:2181/ledgers

and you must not have run: bin/bkctl bookies init otherwise the command will fail with a meaningless error message

eolivelli avatar Dec 02 '20 10:12 eolivelli

@eolivelli Thanks for your info. I'll take a look and deal with it this week.

Jennifer88huang-zz avatar Dec 02 '20 14:12 Jennifer88huang-zz

With the BK package in Pulsar there is no problem, but in that case users are not using bkctl but pulsar initialize-cluster-metadata

btw StreamStorage is part of BK, so we should have here the docs and it should work without Pulsar

eolivelli avatar Dec 03 '20 08:12 eolivelli