cadence-workflowcadenceuber-cadence

Cacence CLI unable to register a new domain: BadRequestError{Message: Invalid cluster name: }


I am trying to register a new domain following the docs for cadence.

When I try domain describe command, it works as expected:

docker run --rm ubercadence/cli:master --address host.docker.internal:7933 --domain samples-domain domain describe

Error: Domain samples-domain does not exist.
Error Details: EntityNotExistsError{Message: Domain samples-domain does not exist.}
('export CADENCE_CLI_SHOW_STACKS=1' to see stack traces)

When I run domain register command, it gives this error

docker run --rm ubercadence/cli:master --address host.docker.internal:7933 --domain samples-domain domain register

Error: Register Domain operation failed.
Error Details: BadRequestError{Message: Invalid cluster name: }
('export CADENCE_CLI_SHOW_STACKS=1' to see stack traces)

I also tried the same command with --gd false option, still the same result.

Here is the stack trace output:

Stack trace:
goroutine 1 [running]:
runtime/debug.Stack(0xd, 0x0, 0x0)
    /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
runtime/debug.PrintStack()
    /usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/uber/cadence/tools/cli.printError(0x206594b, 0x21, 0x2559ce0, 0xc000496020)
    /cadence/tools/cli/util.go:536 +0x2ad
github.com/uber/cadence/tools/cli.ErrorAndExit(0x206594b, 0x21, 0x2559ce0, 0xc000496020)
    /cadence/tools/cli/util.go:547 +0x49
github.com/uber/cadence/tools/cli.(*domainCLIImpl).RegisterDomain(0xc000415600, 0xc0000dcf20)
    /cadence/tools/cli/domainCommands.go:150 +0x8cd
github.com/uber/cadence/tools/cli.newDomainCommands.func1(0xc0000dcf20)
    /cadence/tools/cli/domain.go:73 +0x48
github.com/urfave/cli.HandleAction(0x1c20dc0, 0x20ed500, 0xc0000dcf20, 0xc0000dcf20, 0x0)
    /go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:528 +0x127
github.com/urfave/cli.Command.Run(0x2030e21, 0x8, 0x0, 0x0, 0xc0002da9a0, 0x1, 0x1, 0x204f0c0, 0x18, 0x0, ...)
    /go/pkg/mod/github.com/urfave/cli@v1.22.4/command.go:174 +0x528
github.com/urfave/cli.(*App).RunAsSubcommand(0xc00034b340, 0xc0000dcc60, 0x0, 0x0)
    /go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:407 +0x882
github.com/urfave/cli.Command.startApp(0x202d311, 0x6, 0x0, 0x0, 0xc0002dae90, 0x1, 0x1, 0x204a264, 0x16, 0x0, ...)
    /go/pkg/mod/github.com/urfave/cli@v1.22.4/command.go:373 +0x845
github.com/urfave/cli.Command.Run(0x202d311, 0x6, 0x0, 0x0, 0xc0002dae90, 0x1, 0x1, 0x204a264, 0x16, 0x0, ...)
    /go/pkg/mod/github.com/urfave/cli@v1.22.4/command.go:102 +0x9d6
github.com/urfave/cli.(*App).Run(0xc00034b180, 0xc00003a070, 0x7, 0x7, 0x0, 0x0)
    /go/pkg/mod/github.com/urfave/cli@v1.22.4/app.go:279 +0x731
main.main()
    /cadence/cmd/tools/cli/main.go:36 +0x4f

I am not sure what's exactly wrong.


Solution

  • The below command worked for me:

    docker run --rm ubercadence/cli:master --address host.docker.internal:7933 --domain samples-domain domain register --active_cluster active
    

    Looks like there is a bug, hopefully it will be resolved in the future release. https://github.com/uber/cadence/issues/4054