Error: Unable to get existing search attributes

Hi,

We’re trying to add new custom attributes for Elasticsearch query using the below command:
tctl admin cluster add_search_attributes --name clientID --type Keyword

This fails with the below error:
Error: Unable to get existing search attributes.
Error Details: rpc error: code = Unavailable desc = unable to get mapping from Elasticsearch: elastic: Error 400 (Bad Request)

Stack trace:
goroutine 1 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x19
github.com/temporalio/tctl/cli_curr.printError({0x213b853, 0x29}, {0x25781c0, 0xc00000eae8})
/home/builder/tctl/cli_curr/util.go:392 +0x21e
github.com/temporalio/tctl/cli_curr.ErrorAndExit({0x213b853?, 0x2598b30?}, {0x25781c0?, 0xc00000eae8?})
/home/builder/tctl/cli_curr/util.go:403 +0x28
github.com/temporalio/tctl/cli_curr.AdminAddSearchAttributes(0xc00013da20)
/home/builder/tctl/cli_curr/admin_cluster_search_attributes_commands.go:59 +0x10b
github.com/temporalio/tctl/cli_curr.newAdminClusterCommands.func1(0xc00013da20?)
/home/builder/tctl/cli_curr/admin.go:450 +0x19
github.com/urfave/cli.HandleAction({0x1ca23a0?, 0x21c0ee0?}, 0x15?)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:526 +0x50
github.com/urfave/cli.Command.Run({{0x2101740, 0x15}, {0x0, 0x0}, {0xc00024c6c0, 0x1, 0x1}, {0x2113999, 0x1c}, {0x0, …}, …}, …)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173 +0x652
github.com/urfave/cli.(*App).RunAsSubcommand(0xc00082e1c0, 0xc00013d600)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:405 +0x91b
github.com/urfave/cli.Command.startApp({{0x20e0b84, 0x7}, {0x0, 0x0}, {0xc00024c860, 0x1, 0x1}, {0x211a0fa, 0x1e}, {0x0, …}, …}, …)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:372 +0x6e7
github.com/urfave/cli.Command.Run({{0x20e0b84, 0x7}, {0x0, 0x0}, {0xc00024c860, 0x1, 0x1}, {0x211a0fa, 0x1e}, {0x0, …}, …}, …)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:102 +0x808
github.com/urfave/cli.(*App).RunAsSubcommand(0xc00082e000, 0xc00013c580)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:405 +0x91b
github.com/urfave/cli.Command.startApp({{0x20dbfbf, 0x5}, {0x0, 0x0}, {0xc00024c810, 0x1, 0x1}, {0x20fbefe, 0x13}, {0x0, …}, …}, …)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:372 +0x6e7
github.com/urfave/cli.Command.Run({{0x20dbfbf, 0x5}, {0x0, 0x0}, {0xc00024c810, 0x1, 0x1}, {0x20fbefe, 0x13}, {0x0, …}, …}, …)
/go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:102 +0x808
github.com/urfave/cli.(*App).Run(0xc00013f500, {0xc00003a090, 0x9, 0x9})
/go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277 +0x8a7
main.main()

The same response is received when fetching the attributes using the command:
tctl admin cluster get_search_attributes

We’re using V1.17.1 for all our temporal components

Appreciate any help.

Can you give more info on how you set up the cluster and ES indexes?
What version of ES are you using?