# Temporal UI does not show archived workflows

**URL:** <https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252>\
**Category:** Community Support\
**Tags:** java-sdk, mysql, helm, archival, web-ui\
**Created:** [November 30, 2023, 7:02am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252 "2023-11-30T07:02:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tausif\_28](https://avatars.discourse-cdn.com/v4/letter/t/cab0a1/32.png) [@tausif\_28](https://community.temporal.io/u/tausif_28)\
**Post date:** [November 30, 2023, 7:02am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252/1 "2023-11-30T07:02:36Z")

</div>

We enabled the archival for the cluster by setting this

```auto
server:
  enabled: true
  image:
    repository: temporalio/server
    tag: 1.21.5
  replicaCount: 1
  frontend:
    replicaCount: 1
  history:
    replicaCount: 1
  matching:
    replicaCount: 1
  worker:
    replicaCount: 1
  config:
    numHistoryShards: 16
    persistence:
      default:
        driver: "sql"
        sql:
          driver: "mysql8"
          host: "mysqllocal"
          port: 3306
          database: temporal
          user: root
          password: TemporalLocalMysqlTest123*
          maxConns: 20
          maxConnLifetime: "1h"
      visibility:
        driver: "sql"
        sql:
          driver: "mysql8"
          host: "mysqllocal"
          port: 3306
          database: temporal_visibility
          user: root
          password: TemporalLocalMysqlTest123*
          maxConns: 20
          maxConnLifetime: "1h"
  archival:
    history:
      state: "enabled"
      enableRead: true
      provider:
        filestore:
          fileMode: "0666"
          dirMode: "0766"
    visibility:
      state: "enabled"
      enableRead: true
      provider:
        filestore:
          fileMode: "0666"
          dirMode: "0766"
  namespaceDefaults:
    archival:
      history:
        state: "enabled"
        URI: "file:///tmp/temporal_archival/development"
      visibility:
        state: "enabled"
        URI: "file:///tmp/temporal_vis_archival/development"

```

Now in the namespace creation we have something like this

`temporal operator namespace create --retention 1h --description 'Default namespace for sample service.' --history-archival-state enabled --visibility-archival-state enabled sample`

we started few workflows and after the workflow completes we can see it in the workflow tab in the UI but not in the archive tab, and after couple of hours the workflow vanished from the workflow tab and it is not visible anywhere not even in the archive tab. Where are the workflows going ? why was it not archived ? we can see the archived files in the containers running something like this

```auto
kubectl exec -it pod/temporaldev-history-56c8d99959-8dvst bash -n temporaltest 
temporaldev-history-56c8d99959-8dvst:/etc/temporal$ cd /tmp/temporal_archival/development
temporaldev-history-56c8d99959-8dvst:/tmp/temporal_archival/development$ ls
13401993648341629848112907477214672046307440682199035548453_0.history 13401993648341629848154844513571057837306983859194921534913_0.history
13401993648341629848113118102869232220086472925130346424842_0.history 13401993648341629848177810928981828490966029814556947300621_0.history
13401993648341629848115582299840645356963922516828897260219_0.history 13401993648341629848180174586308258625192692670647861478596_0.history
13401993648341629848121355741058984871322428339163145085373_0.history 13401993648341629848941668685940622363810568900357782135342_0.history
134019936483416298481247265980575159657311668888450469171281_0.history 17344751046234800315243191562323785789715220876736843339497_0.history
134019936483416298481498330365938944825116591692805656484603_0.history 17344751046234800315649420603628501998613397172443626822597_0.history

```

The same thing if i deploy in docker locally, the archival works as soon as the workflow is completed. Strange !! as the docs specifically says this here : [Self-hosted Archival setup | Temporal Documentation](https://docs.temporal.io/self-hosted-guide/archival)

```auto
Archival is not supported when running Temporal through Docker and is disabled by default when installing the system manually and when deploying through [helm charts](https://github.com/temporalio/helm-charts/blob/master/templates/server-configmap.yaml) (but can be enabled in the [config](https://github.com/temporalio/temporal/blob/master/config/development.yaml)).

```

---

<div class="post-metadata">

**Author:** ![Shengao\_Yao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shengao_yao/32/4680_2.png) [@Shengao\_Yao](https://community.temporal.io/u/Shengao_Yao)\
**Post date:** [November 30, 2023, 7:25am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252/2 "2023-11-30T07:25:35Z")

</div>

Yep, we had the same problem. And I raise a pr to fix it. But it seems a lot of thing to do…

> <https://github.com/temporalio/temporal/pull/5117>
>
> \*\*What changed?\*\*
> Add index workflowRunId to s3 archival store and support quer…y on it.
> Alter DescribeWorkflowExecution func to support describeArchivedWorkflowExecution.
> 
> 
> \*\*Why?\*\*
> Support for display archived workflow on web ui. Up to now, for the archived workflow which has past the retention can't displayed on the web ui.
> 
> 
> \*\*How did you test it?\*\*
> Add an unit test \*\*TestDescribeWorkflowExecution\_ArchivedStatus\*\* .
> And test the feature locally by opening archived wf which has past the retention on the web ui.
> 
> 
> 
> \*\*Potential risks\*\*
> 
> 
> 
> \*\*Is hotfix candidate?\*\*

---

<div class="post-metadata">

**Author:** ![tausif\_28](https://avatars.discourse-cdn.com/v4/letter/t/cab0a1/32.png) [@tausif\_28](https://community.temporal.io/u/tausif_28)\
**Post date:** [November 30, 2023, 7:39am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252/3 "2023-11-30T07:39:20Z")

</div>

I ran this command from within the frontend container and i get this

```auto
tctl --ns sample wf show --wid SR-archival-1
Error: Failed to get history on workflow id: SR-archival-1, run id: .
Error Details: sql: no rows in result set

```

and then did this

```auto
temporal workflow list --archived=true --namespace sample

```

Any idea why it is not able to find the workflow even in the archival status ? looks like the workflow data is all gone …

---

<div class="post-metadata">

**Author:** ![Shengao\_Yao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shengao_yao/32/4680_2.png) [@Shengao\_Yao](https://community.temporal.io/u/Shengao_Yao)\
**Post date:** [November 30, 2023, 7:44am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252/4 "2023-11-30T07:44:45Z")

</div>

Because according to you config **–retention 1h** , the closed workflow will only be stored in 1h. Then will it be move in to the archived store (below you set) and deleted from the default store.

```auto
    archival:
      history:
        state: "enabled"
        URI: "file:///tmp/temporal_archival/development"

```

For this I think maybe there is another thing to fix…

```auto
temporal workflow list --archived=true --namespace sample

```

---

<div class="post-metadata">

**Author:** ![Shengao\_Yao](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/shengao_yao/32/4680_2.png) [@Shengao\_Yao](https://community.temporal.io/u/Shengao_Yao)\
**Post date:** [November 30, 2023, 7:47am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252/5 "2023-11-30T07:47:13Z")

</div>

Similar issues.

> <https://github.com/temporalio/temporal/issues/5022>
>
> I put this also on Slack : https://temporalio.slack.com/archives/CTRCR8RBP/p1697…683052222109
> \## Expected Behavior
> Display archived workflows which have past the retention from archived file store S3.
> 
> \## Actual Behavior
> Can't display it both in web-ui or tctl 
> 
> !\[image\](https://github.com/temporalio/temporal/assets/84021683/bc01d620-1964-493a-8b96-6ed13e9c70b1)
> 
> \`➜ ~ tctl wf desc -w hello\_world\_workflowID -r d07eaf4b-83d4-4bf6-b387-a3ae1caf584c                                    
> Error: Describe workflow execution failed
> Error Details: rpc error: code = NotFound desc = Workflow executionsRow not found. WorkflowId: hello\_world\_workflowID, RunId: d07eaf4b-83d4-4bf6-b387-a3ae1caf584c
> Stack trace:
> goroutine 1 \[running\]:
> runtime/debug.Stack()
> runtime/debug/stack.go:24 +0x64
> runtime/debug.PrintStack()
> runtime/debug/stack.go:16 +0x1c
> github.com/temporalio/tctl/cli\_curr.printError({0x101f76e2c, 0x22}, {0x1026cd0e0, 0x140001262c0})
> github.com/temporalio/tctl/cli\_curr/util.go:393 +0x1c0
> github.com/temporalio/tctl/cli\_curr.ErrorAndExit({0x101f76e2c?, 0x1026dd3a8?}, {0x1026cd0e0?, 0x140001262c0?})
> github.com/temporalio/tctl/cli\_curr/util.go:404 +0x28
> github.com/temporalio/tctl/cli\_curr.describeWorkflowHelper(0x140000c0c60, {0x16efa77e8, 0x16}, {0x16efa7802, 0x24})
> github.com/temporalio/tctl/cli\_curr/workflowCommands.go:905 +0x1f4
> github.com/temporalio/tctl/cli\_curr.DescribeWorkflow(0x140000c0c60)
> github.com/temporalio/tctl/cli\_curr/workflowCommands.go:870 +0x68
> github.com/temporalio/tctl/cli\_curr.newWorkflowCommands.func15(0x140000a6640?)
> github.com/temporalio/tctl/cli\_curr/workflow.go:237 +0x1c
> github.com/urfave/cli.HandleAction({0x10241d620?, 0x1026c2060?}, 0x8?)
> github.com/urfave/cli@v1.22.10/app.go:526 +0x94
> github.com/urfave/cli.Command.Run({{0x101f38abc, 0x8}, {0x0, 0x0}, {0x1400018b150, 0x1, 0x1}, {0x101f8357d, 0x26}, {0x0, ...}, ...}, ...)
> github.com/urfave/cli@v1.22.10/command.go:173 +0x504
> github.com/urfave/cli.(\*App).RunAsSubcommand(0x1400055d340, 0x140000c09a0)
> github.com/urfave/cli@v1.22.10/app.go:405 +0xa68
> github.com/urfave/cli.Command.startApp({{0x101f395cc, 0x8}, {0x0, 0x0}, {0x1400018b720, 0x1, 0x1}, {0x101f5f7be, 0x19}, {0x0, ...}, ...}, ...)
> github.com/urfave/cli@v1.22.10/command.go:378 +0x9c4
> github.com/urfave/cli.Command.Run({{0x101f395cc, 0x8}, {0x0, 0x0}, {0x1400018b720, 0x1, 0x1}, {0x101f5f7be, 0x19}, {0x0, ...}, ...}, ...)
> github.com/urfave/cli@v1.22.10/command.go:102 +0x650
> github.com/urfave/cli.(\*App).Run(0x1400055cfc0, {0x140001a6000, 0x7, 0x7})
> github.com/urfave/cli@v1.22.10/app.go:277 +0x7e4
> main.main()
> ./main.go:47 +0xc0\`
> \## Steps to Reproduce the Problem
> 
> 1. Set up a local S3-server and local temporal-server with this archival config 
>  
> 
> \> archival:
> \> history:
> \> state: "enabled"
> \> enableRead: true
> \> provider:
> \> s3store:
> \> region: "us-east-1"
> \> endpoint: "http://127.0.0.1:4566/"
> \> s3ForcePathStyle: true
> \> visibility:
> \> state: "enabled"
> \> enableRead: true
> \> provider:
> \> s3store:
> \> region: "us-east-1"
> \> endpoint: "http://127.0.0.1:4566/"
> \> s3ForcePathStyle: true
> \> 
> \> namespaceDefaults:
> \> archival:
> \> history:
> \> state: "enabled"
> \> URI: "s3://temporal-development"
> \> visibility:
> \> state: "enabled"
> \> URI: "s3://temporal-development"
> 
> 2. set a default namespace which the retention-period is 1h
> \> temporal operator namespace create --retention=1h default
> 3. run some easy sample-go workflows. When the archived workflows past the retention, you can't open it from web-ui or describe it use tclt cmd.
> \> tctl wf desc -w hello\_world\_workflowID -r d07eaf4b-83d4-4bf6-b387-a3ae1caf584c       
> 
> \## Specifications
> 
> - Version: 
> temporal-server: 1.22
> ui-server: 2.19.0
> - Platform: S3, MAC

---

<div class="post-metadata">

**Author:** ![tausif\_28](https://avatars.discourse-cdn.com/v4/letter/t/cab0a1/32.png) [@tausif\_28](https://community.temporal.io/u/tausif_28)\
**Post date:** [December 13, 2023, 5:08am UTC](https://community.temporal.io/t/temporal-ui-does-not-show-archived-workflows/10252/6 "2023-12-13T05:08:21Z")

</div>

Does the archival work for local for you ? the local archival is not working for me, i mean i see the history files in the given location but its’ not querable using tctl nor can i see it in the archived tab in UI.
