# Unconfigured table closed\_executions

**URL:** <https://community.temporal.io/t/unconfigured-table-closed-executions/2410>\
**Category:** Community Support\
**Tags:** cassandra, database\
**Created:** [June 17, 2021, 2:47am UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410 "2021-06-17T02:47:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bo\_Gao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/bo_gao/32/887_2.png) [@Bo\_Gao](https://community.temporal.io/u/Bo_Gao)\
**Post date:** [June 17, 2021, 2:47am UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/1 "2021-06-17T02:47:45Z")

</div>

Trying to setup a cassandra backed temporal in k8s dev env, have services up and running, but getting unconfigured db errors in web: unconfigured table closed\_executions or service":“frontend”,“error”:“ListClosedWorkflowExecutions operation failed. Error: unconfigured table closed\_executions”

Per helm chart instructions, I have done the following and wonder what is missing for me. Thanks!  
export CASSANDRA\_HOST=cassandra\_host  
export CASSANDRA\_PORT=9042  
export CASSANDRA\_USER=cassandra\_user  
export CASSANDRA\_PASSWORD=cassandra\_user\_password

./temporal-cassandra-tool create-Keyspace -k temporal  
CASSANDRA\_KEYSPACE=temporal ./temporal-cassandra-tool setup-schema -v 0.0  
CASSANDRA\_KEYSPACE=temporal ./temporal-cassandra-tool update -schema-dir schema/cassandra/temporal/versioned

./temporal-cassandra-tool create-Keyspace -k temporal\_visibility  
CASSANDRA\_KEYSPACE=temporal\_visibility ./temporal-cassandra-tool setup-schema -v 0.0  
CASSANDRA\_KEYSPACE=temporal\_visibility ./temporal-cassandra-tool update -schema-dir schema/cassandra/visibility/versioned

From create key space result seems those two tables are created.  
2021/06/16 22:47:42 Creating Keyspace temporal\_visibility using SimpleStrategy with RF=1  
2021/06/16 22:47:47 Starting schema setup, config=&{SchemaFilePath: InitialVersion:0.0 Overwrite:false DisableVersioning:false}  
2021/06/16 22:47:47 Setting up version tables  
2021/06/16 22:47:51 Setting initial schema version to 0.0  
2021/06/16 22:47:51 Updating schema update log  
2021/06/16 22:47:51 Schema setup complete  
2021/06/16 22:47:54 UpdateSchemeTask started, config=&{DBName: TargetVersion: SchemaDir:schema/cassandra/visibility/versioned IsDryRun:false}  
2021/06/16 22:47:55 ---- Executing updates for version 1.0 ----  
2021/06/16 22:47:55 CREATE TABLE open\_executions (namespace\_id uuid,namespace\_partition int,workflow\_id text,run\_id uuid,start\_time timestamp,execution\_time timestamp,workflow\_type\_name text,memo blob,encoding text,task\_queue text,PRIMARY KEY ((namespace\_id, namespace\_partition), start\_time, run\_id)) WITH CLUSTERING ORDER BY (start\_time DESC)AND COMPACTION = {‘class’: ‘org.apache.cassandra.db.compaction.LeveledCompactionStrategy’,‘tombstone\_threshold’: 0.4}AND GC\_GRACE\_SECONDS = 60;  
2021/06/16 22:47:56 CREATE INDEX open\_by\_workflow\_id ON open\_executions (workflow\_id);  
2021/06/16 22:47:58 CREATE INDEX open\_by\_type ON open\_executions (workflow\_type\_name);

2021/06/16 22:48:00 CREATE TABLE closed\_executions (namespace\_id uuid,namespace\_partition int,workflow\_id text,run\_id uuid,start\_time timestamp,execution\_time timestamp,close\_time timestamp,status int, workflow\_type\_name text,history\_length bigint,memo blob,encoding text,task\_queue text,PRIMARY KEY ((namespace\_id, namespace\_partition), close\_time, run\_id)) WITH CLUSTERING ORDER BY (close\_time DESC)AND COMPACTION = {‘class’: ‘org.apache.cassandra.db.compaction.LeveledCompactionStrategy’}AND GC\_GRACE\_SECONDS = 172800;  
2021/06/16 22:48:01 CREATE INDEX closed\_by\_workflow\_id ON closed\_executions (workflow\_id);  
2021/06/16 22:48:03 CREATE INDEX closed\_by\_close\_time ON closed\_executions (close\_time);  
2021/06/16 22:48:05 CREATE INDEX closed\_by\_type ON closed\_executions (workflow\_type\_name);  
2021/06/16 22:48:07 CREATE INDEX closed\_by\_status ON closed\_executions (status);  
2021/06/16 22:48:09 ---- Done ----  
2021/06/16 22:48:09 Schema updated from 0.0 to 1.0

---

<div class="post-metadata">

**Author:** ![Wenquan\_Xing](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/wenquan_xing/32/362_2.png) [@Wenquan\_Xing](https://community.temporal.io/u/Wenquan_Xing)\
**Post date:** [June 17, 2021, 5:28pm UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/2 "2021-06-17T17:28:27Z")

</div>

> [@Bo\_Gao](#):
>
> closed\_executions

can you try using cqlsh verifying `temporal_visibility ` keyspace exists and `closed_executions` table exists?  
seems like a cassandra issue, no a temporal issue

---

<div class="post-metadata">

**Author:** ![Bo\_Gao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/bo_gao/32/887_2.png) [@Bo\_Gao](https://community.temporal.io/u/Bo_Gao)\
**Post date:** [June 17, 2021, 6:08pm UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/3 "2021-06-17T18:08:53Z")

</div>

Thanks Wenquan, seems no table created in keyspace\_name = ‘temporal-visibility’, although casandra tool say so. What is the right way to create schema for visibility?

Currently I am doing this, and it only work for temporal keyspace:  
export CASSANDRA\_HOST=temporal-cassandra-dev.service.consul  
export CASSANDRA\_PORT=9042  
export CASSANDRA\_USER=cassandra  
export CASSANDRA\_PASSWORD=xxx  
./temporal-cassandra-tool create-Keyspace -k temporal\_visibility  
CASSANDRA\_KEYSPACE=temporal\_visibility ./temporal-cassandra-tool setup-schema -v 0.0  
CASSANDRA\_KEYSPACE=temporal\_visibility ./temporal-cassandra-tool update -schema-dir schema/cassandra/visibility/versioned

2021/06/17 11:04:06 Creating Keyspace temporal\_visibility using SimpleStrategy with RF=1  
2021/06/17 11:04:07 Starting schema setup, config=&{SchemaFilePath: InitialVersion:0.0 Overwrite:false DisableVersioning:false}  
2021/06/17 11:04:07 Setting up version tables  
2021/06/17 11:04:08 Current database schema version 1.0 is greater than initial schema version 0.0. Skip version upgrade  
2021/06/17 11:04:08 Schema setup complete  
2021/06/17 11:04:09 UpdateSchemeTask started, config=&{DBName: TargetVersion: SchemaDir:schema/cassandra/visibility/versioned IsDryRun:false}  
2021/06/17 11:04:09 found zero updates from current version 1.0  
2021/06/17 11:04:09 UpdateSchemeTask done

---

<div class="post-metadata">

**Author:** ![Wenquan\_Xing](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/wenquan_xing/32/362_2.png) [@Wenquan\_Xing](https://community.temporal.io/u/Wenquan_Xing)\
**Post date:** [June 17, 2021, 7:10pm UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/4 "2021-06-17T19:10:14Z")

</div>

> [@Bo\_Gao](#):
>
> 2021/06/17 11:04:06 Creating Keyspace temporal\_visibility using SimpleStrategy with RF=1  
> 2021/06/17 11:04:07 Starting schema setup, config=&{SchemaFilePath: InitialVersion:0.0 Overwrite:false DisableVersioning:false}  
> 2021/06/17 11:04:07 Setting up version tables  
> 2021/06/17 11:04:08 Current database schema version 1.0 is greater than initial schema version 0.0. Skip version upgrade  
> 2021/06/17 11:04:08 Schema setup complete  
> 2021/06/17 11:04:09 UpdateSchemeTask started, config=&{DBName: TargetVersion: SchemaDir:schema/cassandra/visibility/versioned IsDryRun:false}  
> 2021/06/17 11:04:09 found zero updates from current version 1.0  
> 2021/06/17 11:04:09 UpdateSchemeTask done

the schema tools ^ seems to suggest there is nothing to be done for temporal\_visibility keyspace since visibility is already at 1.0 version (no more schema changes)

but you also mentioned `seems no table created in keyspace_name = ‘temporal-visibility’`

can you check if you are using the same cassandra cluster?

---

<div class="post-metadata">

**Author:** ![Bo\_Gao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/bo_gao/32/887_2.png) [@Bo\_Gao](https://community.temporal.io/u/Bo_Gao)\
**Post date:** [June 17, 2021, 7:21pm UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/5 "2021-06-17T19:21:54Z")

</div>

I only have one cassandra cluster and since I have ran Creating Keyspace temporal\_visibility cmd before, so second time I run it there is nothing to update. But in both cases, no table come back from **SELECT \* FROM system\_schema.tables WHERE keyspace\_name = ‘temporal-visibility’;**

I have also see cassandra log when first time creating visibility tables.  
INFO 19:00:01 Waiting for gossip to settle before accepting client requests… │  
│ INFO 19:00:02 Initializing temporal\_visibility.closed\_executions │  
│ INFO 19:00:02 Initializing temporal\_visibility.closed\_executions.closed\_by\_close\_time │  
│ INFO 19:00:02 Initializing temporal\_visibility.closed\_executions.closed\_by\_status │  
│ INFO 19:00:02 Initializing temporal\_visibility.closed\_executions.closed\_by\_type │  
│ INFO 19:00:02 Initializing temporal\_visibility.closed\_executions.closed\_by\_workflow\_id │  
│ INFO 19:00:02 Initializing temporal\_visibility.open\_executions │  
│ INFO 19:00:02 Initializing temporal\_visibility.open\_executions.open\_by\_type │  
│ INFO 19:00:02 Initializing temporal\_visibility.open\_executions.open\_by\_workflow\_id │  
│ INFO 19:00:03 Initializing temporal\_visibility.schema\_update\_history │  
│ INFO 19:00:03 Initializing temporal\_visibility.schema\_version │  
│ INFO 19:00:09 No gossip backlog; proceeding │  
│ INFO 19:00:09 Netty using native Epoll event loop │  
│ INFO 19:00:09 Using Netty Version: [netty-buffer=netty-buffer-4.0.39.Final.38bdf86, netty-codec=netty-codec-4.0.39.Final.38bdf86, netty-codec-haproxy=netty-codec-haproxy-4.0.39.Final.38bdf86, │  
│ INFO 19:00:09 Starting listening for CQL clients on /0.0.0.0:9042 (unencrypted)… │  
│ INFO 19:00:09 Not starting RPC server as requested. Use JMX (StorageService-\>startRPCServer()) or nodetool (enablethrift) to start it │  
│ WARN 19:00:11 Trigger directory doesn’t exist, please create it and try again. │  
│ INFO 19:00:11 Created default superuser role ‘cassandra’ │  
│ INFO 19:00:28 Handshaking version with /10.32.46.22

---

<div class="post-metadata">

**Author:** ![Wenquan\_Xing](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/wenquan_xing/32/362_2.png) [@Wenquan\_Xing](https://community.temporal.io/u/Wenquan_Xing)\
**Post date:** [June 17, 2021, 7:28pm UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/6 "2021-06-17T19:28:37Z")

</div>

`temporal_visibility` vs `temporal-visibility`

---

<div class="post-metadata">

**Author:** ![Bo\_Gao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/bo_gao/32/887_2.png) [@Bo\_Gao](https://community.temporal.io/u/Bo_Gao)\
**Post date:** [June 17, 2021, 8:22pm UTC](https://community.temporal.io/t/unconfigured-table-closed-executions/2410/7 "2021-06-17T20:22:06Z")

</div>

my bad, turns out service is looking for temporal-visibility vs cassandra tool create temporal\_visibility, changing that fix it, thanks!
