You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bookkeeper.apache.org by Dennis Mercuriali <me...@gmail.com> on 2019/09/11 20:22:23 UTC

Help needed on the usage of bkctl

Hi everyone,

I'm writing to ask you for some help regarding the usage of the "bkctl
cluster init" command. I've been trying to update BookKeeper's Zookeeper
dependency from 3.4.13 to 3.5.5 (this is the PR if you are interested
https://github.com/apache/bookkeeper/pull/2112) but a single test keeps
failing with the following error:

java.lang.IllegalArgumentException: No service URI is providedat
com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)at
org.apache.bookkeeper.stream.cli.commands.cluster.InitClusterCommand.apply(InitClusterCommand.java:118)at
org.apache.bookkeeper.stream.cli.commands.cluster.InitClusterCommand.apply(InitClusterCommand.java:53)at
org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:97)at
org.apache.bookkeeper.tools.common.BKCommand.lambda$apply$0(BKCommand.java:50)at
org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:226)at
org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:248)at
org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:52)at
org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:40)at
org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:236)at
org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:248)at
org.apache.bookkeeper.tools.framework.CliCommandGroup.apply(CliCommandGroup.java:68)at
org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:236)at
org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:248)at
org.apache.bookkeeper.tools.cli.BKCtl.main(BKCtl.java:59)

The test tries to execute this command:

bkctl --service-uri zk://metadata-store:2181/ledgers cluster init

This error doesn't show up in other PRs but I couldn't find a reason why my
changes should have broken the parameter-passing of this command. I did
some local manual tests and the same error occurs when I try to run that
command against my branch, the current master and BookKeeper 4.9.2

I also tried to run

   -

   "bkctl cluster init" getting the same error and a "Usage:  bkctl cluster
   [command] [command options]"
   -

   "bkctl cluster init --service-uri zk://localhost:2181/ledgers" this is
   more interesting since it prints "Usage:  bkctl cluster init [flags]
   <service-uri>"
   -

   finally tried "bkctl cluster init zk://localhost:2181/ledgers" getting
   no console output

I'm new to the project and I am probably missing something, can anybody
tell me to the correct usage of the command?

Thank you all in advance,
Dennis

Re: Help needed on the usage of bkctl

Posted by Enrico Olivelli <eo...@gmail.com>.
It seems that we are using this syntax in the init_bookie script

/bkctl --service-uri ${BK_metadataServiceUri} cluster init

see
https://github.com/apache/bookkeeper/blob/master/docker/scripts/init_bookie.sh#L54




Enrico

Il giorno mer 11 set 2019 alle ore 22:22 Dennis Mercuriali <
mercurialiden@gmail.com> ha scritto:

> Hi everyone,
>
> I'm writing to ask you for some help regarding the usage of the "bkctl
> cluster init" command. I've been trying to update BookKeeper's Zookeeper
> dependency from 3.4.13 to 3.5.5 (this is the PR if you are interested
> https://github.com/apache/bookkeeper/pull/2112) but a single test keeps
> failing with the following error:
>
> java.lang.IllegalArgumentException: No service URI is providedat com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)at org.apache.bookkeeper.stream.cli.commands.cluster.InitClusterCommand.apply(InitClusterCommand.java:118)at org.apache.bookkeeper.stream.cli.commands.cluster.InitClusterCommand.apply(InitClusterCommand.java:53)at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:97)at org.apache.bookkeeper.tools.common.BKCommand.lambda$apply$0(BKCommand.java:50)at org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:226)at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:248)at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:52)at org.apache.bookkeeper.tools.common.BKCommand.apply(BKCommand.java:40)at org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:236)at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:248)at org.apache.bookkeeper.tools.framework.CliCommandGroup.apply(CliCommandGroup.java:68)at org.apache.bookkeeper.tools.framework.Cli.run(Cli.java:236)at org.apache.bookkeeper.tools.framework.Cli.runCli(Cli.java:248)at org.apache.bookkeeper.tools.cli.BKCtl.main(BKCtl.java:59)
>
> The test tries to execute this command:
>
> bkctl --service-uri zk://metadata-store:2181/ledgers cluster init
>
> This error doesn't show up in other PRs but I couldn't find a reason why
> my changes should have broken the parameter-passing of this command. I did
> some local manual tests and the same error occurs when I try to run that
> command against my branch, the current master and BookKeeper 4.9.2
>
> I also tried to run
>
>    -
>
>    "bkctl cluster init" getting the same error and a "Usage:  bkctl
>    cluster [command] [command options]"
>    -
>
>    "bkctl cluster init --service-uri zk://localhost:2181/ledgers" this is
>    more interesting since it prints "Usage:  bkctl cluster init [flags]
>    <service-uri>"
>    -
>
>    finally tried "bkctl cluster init zk://localhost:2181/ledgers" getting
>    no console output
>
> I'm new to the project and I am probably missing something, can anybody
> tell me to the correct usage of the command?
>
> Thank you all in advance,
> Dennis
>