cube-js / cube-js/cube

Docker Compose deploy failed with "Error: dbType, apiSecret are required option(s)"

Open
#4,613 3 comments 0 reactions 1 assignee Assigned to @hassankhan View on GitHub
docs
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
Follow the official doc ["running in production" section ](https://cube.dev/docs/caching/running-in-production) with the docker compose, just copy the docker-compose file content, then bring it up and got "Error: dbType, apiSecret are required option(s)"

**To Reproduce**
Steps to reproduce the behavior:
1. Go to 'official doc ["running in production" section ](https://cube.dev/docs/caching/running-in-production)'
2. copy the docker-compose file content
3. Run the command "docker-compose up "
4. See error: "Error: dbType, apiSecret are required option(s)"

```
$ cat cube_compose_prod.yml
version: '2.2'
services:
cubestore_router:
restart: always
image: cubejs/cubestore:latest
environment:
- CUBESTORE_SERVER_NAME=cubestore_router:9999
- CUBESTORE_META_PORT=9999
- CUBESTORE_WORKERS=cubestore_worker_1:9001,cubestore_worker_2:9001
- CUBESTORE_REMOTE_DIR=/cube/data
volumes:
- .cubestore:/cube/data
cubestore_worker_1:
restart: always
image: cubejs/cubestore:latest
environment:
- CUBESTORE_SERVER_NAME=cubestore_worker_1:9001
- CUBESTORE_WORKER_PORT=9001
- CUBESTORE_META_ADDR=cubestore_router:9999
- CUBESTORE_WORKERS=cubestore_worker_1:9001,cubestore_worker_2:9001
- CUBESTORE_REMOTE_DIR=/cube/data
depends_on:
- cubestore_router
volumes:
- .cubestore:/cube/data
cubestore_worker_2:
restart: always
image: cubejs/cubestore:latest
environment:
- CUBESTORE_SERVER_NAME=cubestore_worker_2:9001
- CUBESTORE_WORKER_PORT=9001
- CUBESTORE_META_ADDR=cubestore_router:9999
- CUBESTORE_WORKERS=cubestore_worker_1:9001,cubestore_worker_2:9001
- CUBESTORE_REMOTE_DIR=/cube/data
depends_on:
- cubestore_router
volumes:
- .cubestore:/cube/data
cube:
image: cubejs/cube:latest
ports:
- 4000:4000
environment:
- CUBEJS_CUBESTORE_HOST=cubestore_router
depends_on:
- cubestore_router
volumes:
- .:/cube/conf

$ docker-compose -f cube_compose_prod.yml up
[+] Running 4/4
⠿ cubestore_router Pulled 0.1s
⠿ cubestore_worker_2 Pulled 0.1s
⠿ cubestore_worker_1 Pulled 0.1s
⠿ cube Pulled 0.1s
[+] Running 5/5
⠿ Network cubejs_default Created 0.3s
⠿ Container cubejs-cubestore_router-1 Created 0.1s
⠿ Container cubejs-cube-1 Created 0.1s
⠿ Container cubejs-cubestore_worker_1-1 Created 0.0s
⠿ Container cubejs-cubestore_worker_2-1 Created 0.0s
Attaching to cubejs-cube-1, cubejs-cubestore_router-1, cubejs-cubestore_worker_1-1, cubejs-cubestore_worker_2-1
cubejs-cubestore_router-1 | 2022-05-29 03:44:57,871 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_router-1 | 2022-05-29 03:44:57,881 INFO [cubestore::http::status] Serving status probes at 0.0.0.0:3031
cubejs-cubestore_router-1 | 2022-05-29 03:44:57,882 INFO [cubestore::metastore] Creating metastore from scratch in /cube/.cubestore/data/metastore
cubejs-cubestore_router-1 | 2022-05-29 03:44:57,908 INFO [cubestore::cluster] Meta store port open on 0.0.0.0:9999
cubejs-cubestore_router-1 | 2022-05-29 03:44:57,908 INFO [cubestore::http] Http Server is listening on 0.0.0.0:3030
cubejs-cubestore_router-1 | 2022-05-29 03:44:57,908 INFO [cubestore::mysql] MySQL port open on 0.0.0.0:3306
cubejs-cubestore_worker_1-1 | 2022-05-29 03:44:58,387 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_1-1 | 2022-05-29 03:44:58,397 INFO [cubestore::cluster] Worker port open on 0.0.0.0:9001
cubejs-cubestore_worker_1-1 | 2022-05-29 03:44:58,408 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_1-1 | 2022-05-29 03:44:58,419 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_1-1 | 2022-05-29 03:44:58,429 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_1-1 | 2022-05-29 03:44:58,439 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_2-1 | 2022-05-29 03:44:58,493 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_2-1 | 2022-05-29 03:44:58,503 INFO [cubestore::cluster] Worker port open on 0.0.0.0:9001
cubejs-cubestore_worker_2-1 | 2022-05-29 03:44:58,514 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_2-1 | 2022-05-29 03:44:58,524 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_2-1 | 2022-05-29 03:44:58,533 INFO [cubestored] Cube Store version 0.30.7
cubejs-cubestore_worker_2-1 | 2022-05-29 03:44:58,542 INFO [cubestored] Cube Store version 0.30.7
cubejs-cube-1 | Warning. There is no cube.js file. Continue with environment variables
cubejs-cube-1 |
cubejs-cube-1 | Cube.js Error ---------------------------------------
cubejs-cube-1 |
cubejs-cube-1 | Error: dbType, apiSecret are required option(s)
cubejs-cube-1 | at CubejsServerCore.handleConfiguration (/cube/node_modules/@cubejs-backend/server-core/src/core/server.ts:483:15)
cubejs-cube-1 | at new CubejsServerCore (/cube/node_modules/@cubejs-backend/server-core/src/core/server.ts:122:25)
cubejs-cube-1 | at Function.create (/cube/node_modules/@cubejs-backend/server-core/src/core/server.ts:546:12)
cubejs-cube-1 | at new CubejsServer (/cube/node_modules/@cubejs-backend/server/src/server.ts:79:26)
cubejs-cube-1 | at ServerContainer.runServerInstance (/cube/node_modules/@cubejs-backend/server/src/server/container.ts:234:20)
cubejs-cube-1 | at makeInstance (/cube/node_modules/@cubejs-backend/server/src/server/container.ts:344:33)
cubejs-cube-1 | at ServerContainer.start (/cube/node_modules/@cubejs-backend/server/src/server/container.ts:357:20)
cubejs-cube-1 | at Server.run (/cube/node_modules/@cubejs-backend/server/src/command/server.ts:25:5)
cubejs-cube-1 | at Command. (/cube/node_modules/cubejs-cli/src/command/proxy-command.ts:51:13)
cubejs-cube-1 |
cubejs-cube-1 | Need some help? -------------------------------------
cubejs-cube-1 |
cubejs-cube-1 | Ask this question in Cube.js Slack: https://slack.cube.dev
cubejs-cube-1 | Post an issue: https://github.com/cube-js/cube.js/issues
cubejs-cube-1 |
cubejs-cube-1 exited with code 1
cubejs-cubestore_router-1 | 2022-05-29 03:45:27,911 INFO [cubestore::metastore] Persisting meta store snapshot: done (2.918515ms)
```
**Env Info**
```
$ docker version
Client: Docker Engine - Community
Version: 20.10.16
API version: 1.41
Go version: go1.17.10
Git commit: aa7e414
Built: Thu May 12 09:19:45 2022
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 20.10.16
API version: 1.41 (minimum version 1.12)
Go version: go1.17.10
Git commit: f756502
Built: Thu May 12 09:18:08 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.4
GitCommit: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
runc:
Version: 1.1.1
GitCommit: v1.1.1-0-g52de29d
docker-init:
Version: 0.19.0
GitCommit: de40ad0

$ docker-compose version
Docker Compose version v2.5.0

$ docker images | grep cube
cubejs/cube latest e1da64c1fba1 2 days ago 939MB
cubejs/cubestore latest 111b376e77e8 2 days ago 165MB
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.