首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Kubernetes上部署apache:superset映像时出错

在Kubernetes上部署apache:superset映像时出错
EN

Stack Overflow用户
提问于 2021-04-29 09:53:24
回答 1查看 509关注 0票数 0

我正在尝试在Kubernetes上部署最新的docker镜像apache:superset。当我部署YAAML时,我得到以下错误:

代码语言:javascript
复制
[2021-04-29 01:34:10 +0000] [8] [INFO] Starting gunicorn 20.0.4
[2021-04-29 01:34:10 +0000] [8] [INFO] Listening at: http://0.0.0.0:8088 (8)
[2021-04-29 01:34:10 +0000] [8] [INFO] Using worker: gthread
[2021-04-29 01:34:10 +0000] [11] [INFO] Booting worker with pid: 11
logging was configured successfully
2021-04-29 01:34:12,332:INFO:superset.utils.logging_configurator:logging was configured successfully
2021-04-29 01:34:12,340:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
100.106.25.194 - - [29/Apr/2021:01:34:20 +0000] "GET / HTTP/1.1" 302 243 "-" "kube-probe/1.18"
/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
  "Flask-Caching: CACHE_TYPE is set to null, "
2021-04-29 01:34:20,145:WARNING:root:Class 'werkzeug.local.LocalProxy' is not mapped
2021-04-29 01:34:20,147:ERROR:root:DBEventLogger failed to log event(s)
2021-04-29 01:34:20,147:ERROR:root:(sqlite3.OperationalError) no such table: logs
[SQL: INSERT INTO logs (action, slice_id, json, dttm, duration_ms, referrer) VALUES (?, ?, ?, ?, ?, ?)]
[parameters: ('welcome', 0, '{"path": "/superset/welcome/", "object_ref": "Superset.welcome"}', '2021-04-29 01:34:20.147331', 0, 'http://100.106.25.213:8088/')]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: logs

它似乎正在尝试连接到默认的SQLLite。我正在尝试在config.py中提供postgres凭证,但无法修改图像中的文件。我的Docker文件中有以下命令:

代码语言:javascript
复制
USER root
COPY updated_config.py /app/superset/config.py
USER superset

该命令运行正常,但是不更新file.How,我可以更新config.py吗?我还尝试在YAML中使用Config Map,但也出现了错误:

代码语言:javascript
复制
"ModuleNotFoundError: No module named 'superset.app'" 

请提个建议。谢谢

EN

回答 1

Stack Overflow用户

发布于 2021-05-02 23:26:47

你分享的错误应该只在我们没有运行superset db upgrade.

  • You的时候发生,
  1. 不应该替换完整的默认配置文件。而是使用导出SUPERSET_CONFIG_PATH.

创建新文件并添加必要的变量

这里是Dockerfile

代码语言:javascript
复制
FROM apache/superset
USER root

USER superset
EXPOSE 8088

RUN superset fab create-admin \
               --username admin \
               --firstname Superset \
               --lastname Admin \
               --email admin@superset.com \
               --password admin

COPY updated_config.py /app/config.py
RUN export SUPERSET_CONFIG_PATH=/app/config.py
RUN superset db upgrade

RUN superset init

我建议你通过helm chart安装superset,因为你已经在使用kubernetes了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67310031

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档