# While Enabling Elastic Search Getting Error

**URL:** <https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [March 19, 2023, 11:26am UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617 "2023-03-19T11:26:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![onkar\_chavan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/onkar_chavan/32/3473_2.png) [@onkar\_chavan](https://community.temporal.io/u/onkar_chavan)\
**Post date:** [March 19, 2023, 11:26am UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617/1 "2023-03-19T11:26:30Z")

</div>

Hi Created my Own image and Then tried doing docker-compose up Getting following Error

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/6/66c92e92ac13b9c893c52b5e027e0773857d2799.png)

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [March 19, 2023, 5:18pm UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617/2 "2023-03-19T17:18:12Z")

</div>

Can you share your static config? (could bash into your server image and share /etc/temporal/config/docker.yaml)

---

<div class="post-metadata">

**Author:** ![ONKAR\_CHAVAN1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/onkar_chavan1/32/3497_2.png) [@ONKAR\_CHAVAN1](https://community.temporal.io/u/ONKAR_CHAVAN1)\
**Post date:** [March 19, 2023, 5:55pm UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617/4 "2023-03-19T17:55:42Z")

</div>

Hi @tihomir ,

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/3/3daff2bf5338db621a775bbbda579176756bb2ce.png)  
I Copied the /etc/temporal/config/docker.yaml below:-

log:  
stdout: true  
level: info

persistence:  
numHistoryShards: 4  
defaultStore: default  
visibilityStore: visibility  
datastores:  
default:  
cassandra:  
hosts: “”  
keyspace: “temporal”  
user: “”  
password: “”  
port: 9042  
maxConns: 20  
tls:  
enabled: false  
caFile:  
certFile:  
keyFile:  
caData:  
certData:  
keyData:  
enableHostVerification: false  
serverName:  
visibility:  
cassandra:

```
            hosts: ""
            keyspace: "temporal_visibility"
            user: ""
            password: ""
            port: 9042
            maxConns: 10
            tls:
                enabled: false
                caFile: 
                certFile: 
                keyFile: 
                caData: 
                certData: 
                keyData: 
                enableHostVerification: false
                serverName: 

```

global:  
membership:  
maxJoinDuration: 30s  
broadcastAddress: “”  
pprof:  
port: 0  
tls:  
refreshInterval: 0s  
expirationChecks:  
warningWindow: 0s  
errorWindow: 0s  
checkInterval: 0s  
internode:  
# This server section configures the TLS certificate that internal temporal  
# cluster nodes (history, matching, and internal-frontend) present to other  
# clients within the Temporal Cluster.  
server:  
requireClientAuth: false

```
            certFile: 
            keyFile: 

            certData: 
            keyData: 

        # This client section is used to configure the TLS clients within
        # the Temporal Cluster that connect to an Internode (history, matching, or
        # internal-frontend)
        client:
            serverName: 
            disableHostVerification: false
    frontend:
        # This server section configures the TLS certificate that the Frontend
        # server presents to external clients.
        server:
            requireClientAuth: false
            certFile: 
            keyFile: 

            certData: 
            keyData: 

        # This client section is used to configure the TLS clients within
        # the Temporal Cluster (specifically the Worker role) that connect to the Frontend service
        client:
            serverName: 
            disableHostVerification: false
authorization:
    jwtKeyProvider:
        keySourceURIs:
        refreshInterval: 1m
    permissionsClaimName: permissions
    authorizer: 
    claimMapper: 

```

services:  
frontend:  
rpc:  
grpcPort: 7233  
membershipPort: 6933  
bindOnIP: 172.17.0.2

```
matching:
    rpc:
        grpcPort: 7235
        membershipPort: 6935
        bindOnIP: 172.17.0.2

history:
    rpc:
        grpcPort: 7234
        membershipPort: 6934
        bindOnIP: 172.17.0.2

worker:
    rpc:
        grpcPort: 7239
        membershipPort: 6939
        bindOnIP: 172.17.0.2

```

clusterMetadata:  
enableGlobalNamespace: false  
failoverVersionIncrement: 10  
masterClusterName: “active”  
currentClusterName: “active”  
clusterInformation:  
active:  
enabled: true  
initialFailoverVersion: 1  
rpcName: “frontend”  
rpcAddress: 127.0.0.1:7233

dcRedirectionPolicy:  
policy: “noop”  
toDC: “”

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: “disabled”  
URI: “file:///tmp/temporal\_archival/development”  
visibility:  
state: “disabled”  
URI: “file:///tmp/temporal\_vis\_archival/development”

dynamicConfigClient:  
filepath: “/etc/temporal/config/dynamicconfig/docker.yaml”  
pollInterval: “60s”

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [March 20, 2023, 4:47am UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617/5 "2023-03-20T04:47:27Z")

</div>

Seems you dont have advanced visibility configured (you would see advancedVisibilityStore config in your static config. With this setup you are using standard visibility.

Can you share your docker compose?

---

<div class="post-metadata">

**Author:** ![ONKAR\_CHAVAN1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/onkar_chavan1/32/3497_2.png) [@ONKAR\_CHAVAN1](https://community.temporal.io/u/ONKAR_CHAVAN1)\
**Post date:** [March 20, 2023, 5:18am UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617/6 "2023-03-20T05:18:15Z")

</div>

Hi @tihomir ,  
Here is my docker-compose.yaml :-  
version: “3.5”  
services:  
elasticsearch:  
container\_name: temporal-elasticsearch  
environment:  
- cluster.routing.allocation.disk.threshold\_enabled=true  
- cluster.routing.allocation.disk.watermark.low=512mb  
- cluster.routing.allocation.disk.watermark.high=256mb  
- cluster.routing.allocation.disk.watermark.flood\_stage=128mb  
- discovery.type=single-node  
- ES\_JAVA\_OPTS=-Xms256m -Xmx256m  
- xpack.security.enabled=false  
image: elasticsearch:${ELASTICSEARCH\_VERSION}  
networks:  
- temporal-network  
expose:  
- 9200  
volumes:  
- /var/lib/elasticsearch/data  
postgresql:  
container\_name: temporal-postgresql  
environment:  
POSTGRES\_PASSWORD: temporal  
POSTGRES\_USER: temporal  
image: postgres:${POSTGRESQL\_VERSION}  
networks:  
- temporal-network  
expose:  
- 5432  
volumes:  
- /var/lib/postgresql/data  
temporal:  
container\_name: temporal  
depends\_on:  
- postgresql  
- elasticsearch  
environment:  
- DB=postgresql  
- DB\_PORT=5432  
- POSTGRES\_USER=temporal  
- POSTGRES\_PWD=temporal  
- POSTGRES\_SEEDS=postgresql  
- DYNAMIC\_CONFIG\_FILE\_PATH=config/dynamicconfig/development-sql.yaml  
- ENABLE\_ES=true  
- ES\_SEEDS=elasticsearch  
- ES\_VERSION=v7  
image: temporalio/auto-setup:onkar  
networks:  
- temporal-network  
ports:  
- 7233:7233  
labels:  
kompose.volume.type: configMap  
volumes:  
- ./dynamicconfig:/etc/temporal/config/dynamicconfig  
temporal-admin-tools:  
container\_name: temporal-admin-tools  
depends\_on:  
- temporal  
environment:  
- TEMPORAL\_CLI\_ADDRESS=temporal:7233  
image: temporalio/admin-tools:onkar  
networks:  
- temporal-network  
stdin\_open: true  
tty: true  
temporal-ui:  
container\_name: temporal-ui  
depends\_on:  
- temporal  
environment:  
- TEMPORAL\_ADDRESS=temporal:7233  
- TEMPORAL\_CORS\_ORIGINS=[http://localhost:3000](http://localhost:3000)  
image: temporalio/ui:${TEMPORAL\_UI\_VERSION}  
networks:  
- temporal-network  
ports:  
- 8080:8080  
networks:  
temporal-network:  
driver: bridge  
name: temporal-network

As you said I don’t have advanced visibility configured so can you guide me how to do that the  
The setup I followed were:-  
I cloned temporal docker-build doing that I found out that the folder cli, tctl, temporal were empty so then I Clone cli folder , tctl folder and temporal folder using git clone . After that I tried Building Images using following command step by step:-

1. cd docker/base-images
2. docker build . -f base-builder.Dockerfile -t temporalio/base-builder:onkar
3. docker build . -f base-server.Dockerfile -t temporalio/base-server:onkar
4. cd …/…  
5 .docker build . -f server.Dockerfile -t temporalio/server:onkar
5. docker build . -f admin-tools.Dockerfile -t temporalio/admin-tools:onkar --build-arg SERVER\_IMAGE=temporalio/server:onkar
6. docker build . -f auto-setup.Dockerfile -t temporalio/auto-setup:onkar2–build-arg SERVER\_IMAGE=temporalio/server:onkar --build-arg ADMIN\_TOOLS\_IMAGE=temporalio/admin-tools:onkar

After Doing that I replaced my Image in docker-compose file which I clone using git clone [GitHub - temporalio/docker-compose: Temporal docker-compose files](http://github.com/temporalio/docker-compose.git)  
So as you said While build server image which is the 3 step I have done before that I have to enable advance visibility and then build the image so where do I have do those configurations(in which all files/folder specific)?

---

<div class="post-metadata">

**Author:** ![ONKAR\_CHAVAN1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/onkar_chavan1/32/3497_2.png) [@ONKAR\_CHAVAN1](https://community.temporal.io/u/ONKAR_CHAVAN1)\
**Post date:** [March 21, 2023, 11:48am UTC](https://community.temporal.io/t/while-enabling-elastic-search-getting-error/7617/7 "2023-03-21T11:48:16Z")

</div>

Hi @tihomir, I have rebuilt the image using temporal/docker-build  
Now I am able to see the advance visibility in below file.

**Here is my /etc/temporal/config/docker.yaml:-**  
log:  
stdout: true  
level: info

persistence:  
numHistoryShards: 4  
defaultStore: default  
visibilityStore: visibility  
advancedVisibilityStore: es-visibility  
datastores:  
default:  
sql:  
pluginName: “postgres”  
databaseName: “temporal”  
connectAddr: “postgresql:5432”  
connectProtocol: “tcp”  
user: “temporal”  
password: “temporal”  
maxConns: 20  
maxIdleConns: 20  
maxConnLifetime: 1h  
authPlugin:  
plugin:  
tls:  
enabled: false  
caFile:  
certFile:  
keyFile:  
enableHostVerification: false  
serverName:  
visibility:  
sql:

```
            pluginName: "postgres"
            databaseName: "temporal_visibility"
            connectAddr: "postgresql:5432"
            connectProtocol: "tcp"
            user: "temporal"
            password: "temporal"
            maxConns: 10
            maxIdleConns: 10
            maxConnLifetime: 1h
            authPlugin: 
                plugin: 
            tls:
                enabled: false
                caFile: 
                certFile: 
                keyFile: 
                enableHostVerification: false
                serverName: 
    es-visibility:
        elasticsearch:
            version: v7
            url:
                scheme: http
                host: "elasticsearch:9200"
            username: ""
            password: ""
            indices:
                visibility: "temporal_visibility_v1_dev"

```

global:  
membership:  
maxJoinDuration: 30s  
broadcastAddress: “”  
pprof:  
port: 0  
tls:  
refreshInterval: 0s  
expirationChecks:  
warningWindow: 0s  
errorWindow: 0s  
checkInterval: 0s  
internode:  
# This server section configures the TLS certificate that internal temporal  
# cluster nodes (history or matching) present to other clients within the Temporal Cluster.  
server:  
requireClientAuth: false

```
            certFile: 
            keyFile: 

            certData: 
            keyData: 

        # This client section is used to configure the TLS clients within
        # the Temporal Cluster that connect to an Internode (history or matching)
        client:
            serverName: 
            disableHostVerification: false
    frontend:
        # This server section configures the TLS certificate that the Frontend
        # server presents to all clients (specifically the Worker role within
        # the Temporal Cluster and all External SDKs connecting to the Cluster)
        server:
            requireClientAuth: false
            certFile: 
            keyFile: 

            certData: 
            keyData: 

        # This client section is used to configure the TLS clients within
        # the Temporal Cluster (specifically the Worker role) that connect to the Frontend service
        client:
            serverName: 
            disableHostVerification: false
authorization:
    jwtKeyProvider:
        keySourceURIs:
        refreshInterval: 1m
    permissionsClaimName: permissions
    authorizer: 
    claimMapper: 

```

services:  
frontend:  
rpc:  
grpcPort: 7233  
membershipPort: 6933  
bindOnIP: 172.21.0.2

```
matching:
    rpc:
        grpcPort: 7235
        membershipPort: 6935
        bindOnIP: 172.21.0.2

history:
    rpc:
        grpcPort: 7234
        membershipPort: 6934
        bindOnIP: 172.21.0.2

worker:
    rpc:
        grpcPort: 7239
        membershipPort: 6939
        bindOnIP: 172.21.0.2

```

clusterMetadata:  
enableGlobalNamespace: false  
failoverVersionIncrement: 10  
masterClusterName: “active”  
currentClusterName: “active”  
clusterInformation:  
active:  
enabled: true  
initialFailoverVersion: 1  
rpcName: “frontend”  
rpcAddress: 127.0.0.1:7233

dcRedirectionPolicy:  
policy: “noop”  
toDC: “”

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: “disabled”  
URI: “file:///tmp/temporal\_archival/development”  
visibility:  
state: “disabled”  
URI: “file:///tmp/temporal\_vis\_archival/development”

publicClient:  
hostPort: “172.21.0.2:7233”

dynamicConfigClient:  
filepath: “config/dynamicconfig/development-sql.yaml”  
pollInterval: “60s”

Here is my docker-compose.yaml file:-  
version: “3.5”  
services:  
elasticsearch:  
container\_name: temporal-elasticsearch  
environment:  
- cluster.routing.allocation.disk.threshold\_enabled=true  
- cluster.routing.allocation.disk.watermark.low=512mb  
- cluster.routing.allocation.disk.watermark.high=256mb  
- cluster.routing.allocation.disk.watermark.flood\_stage=128mb  
- discovery.type=single-node  
- ES\_JAVA\_OPTS=-Xms256m -Xmx256m  
- xpack.security.enabled=false  
image: elasticsearch:${ELASTICSEARCH\_VERSION}  
networks:  
- temporal-network  
expose:  
- 9200  
volumes:  
- /var/lib/elasticsearch/data  
postgresql:  
container\_name: temporal-postgresql  
environment:  
POSTGRES\_PASSWORD: temporal  
POSTGRES\_USER: temporal  
image: postgres:${POSTGRESQL\_VERSION}  
networks:  
- temporal-network  
expose:  
- 5432  
volumes:  
- /var/lib/postgresql/data  
temporal:  
container\_name: temporal  
depends\_on:  
- postgresql  
- elasticsearch  
environment:  
- DB=postgresql  
- DB\_PORT=5432  
- POSTGRES\_USER=temporal  
- POSTGRES\_PWD=temporal  
- POSTGRES\_SEEDS=postgresql  
- DYNAMIC\_CONFIG\_FILE\_PATH=config/dynamicconfig/development-sql.yaml  
- ENABLE\_ES=true  
- ES\_SEEDS=elasticsearch  
- ES\_VERSION=v7  
image: temporalio/auto-setup:onkar20  
networks:  
- temporal-network  
ports:  
- 7233:7233  
labels:  
kompose.volume.type: configMap  
volumes:  
- ./dynamicconfig:/etc/temporal/config/dynamicconfig  
temporal-admin-tools:  
container\_name: temporal-admin-tools  
depends\_on:  
- temporal  
environment:  
- TEMPORAL\_CLI\_ADDRESS=temporal:7233  
image: temporalio/admin-tools:onkar20  
networks:  
- temporal-network  
stdin\_open: true  
tty: true  
temporal-ui:  
container\_name: temporal-ui  
depends\_on:  
- temporal  
environment:  
- TEMPORAL\_ADDRESS=temporal:7233  
- TEMPORAL\_CORS\_ORIGINS=[http://localhost:3000](http://localhost:3000)  
image: temporalio/ui:${TEMPORAL\_UI\_VERSION}  
networks:  
- temporal-network  
ports:  
- 8080:8080  
networks:  
temporal-network:  
driver: bridge  
name: temporal-network

Getting “no such index [temporal\_visibility\_v1\_dev] and [action.auto\_create\_index] is [false]” Error

 ![image](https://us1.discourse-cdn.com/flex016/uploads/temporal/original/2X/7/7aec1fe0a7f72b9eee39f57031c662506d367feb.jpeg)

Any Help on this @tihomir
