Tctl reports connection error in the auto-setup container

I try to execute tctl command inside the auto-setup docker container:

tctl --ns default namespace describe

it always reports the flowing error:

Error: Operation DescribeNamespace failed.
Error Details: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:7233: connect: connection refused"
('export TEMPORAL_CLI_SHOW_STACKS=1' to see stack traces)

But in the auto-setup.sh, I see the same command executed.
Is there anything missed in my manual operation?

@whitecrow

you need the namespace_id to describe the namespace

tctl namespace list to list your namespaces, which will show the namespace_id as id

and

tctl namespace describe --namespace_id <id>

It reports the same error. The problem is tctl can not connect to temporal server on 127.0.0.1:7233

it always reports the flowing error:

Yes that’s expected since you don’t tell tctl where the frontend service is.

You can:

  1. In your docker compose for auto-setup container def set in environment:
  • TEMPORAL_CLI_ADDRESS=temporal:7233

(change “temporal” here to the name of your auto-setup container)
This env var is picked up by tctl and would use as the default address setting

  1. Dont do 1. and set address directly in your tctl command:

tctl --address temporal:7233 --ns default namespace describe

(again change “temporal” to name of your auto-setup container name )

Also just to add: I would not use auto-setup image for any type of prod deployment (it starts up all server roles in same container and ins same process). Also better to run tctl from the admin-tools image than bashing into your service containers and possibly screwing something up.

Hope this helps.

1 Like