gpt4 book ai didi

docker - Apache Superset:无法第二次运行

转载 作者:行者123 更新时间:2023-12-02 19:55:35 26 4
gpt4 key购买 nike

我能够通过第一次运行docker-compose run --rm superset ./docker-init.sh来设置和运行Superset。之后,当我尝试相同的命令甚至是简单的docker-compose up时,它开始表现得很奇怪。以下是不同的输出:

Docker容器日志

➜  docker git:(master) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cdb96671175a superset_superset "/entrypoint.sh" 4 minutes ago Up 4 minutes (unhealthy) 0.0.0.0:8088->8088/tcp superset_superset_1
f1835b2641c9 redis:3.2 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes 127.0.0.1:6379->6379/tcp superset_redis_1
8dbf08dd726f postgres:10 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes 127.0.0.1:5432->5432/tcp superset_postgres_1
➜ docker git:(master) docker logs cdb96671175a

+ '[' 0 -ne 0 ']'
+ '[' development = development ']'
+ celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair
+ cd superset/assets/
+ npm ci
npm WARN prepare removing existing node_modules/ before installation
2019-10-07 11:59:49,785:INFO:root:logging was configured successfully
2019-10-07 11:59:50,307:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
2019-10-07 11:59:51,715:DEBUG:asyncio:Using selector: SelectSelector
➜ docker git:(master)
➜ docker git:(master) docker logs cdb96671175a
+ '[' 0 -ne 0 ']'
+ '[' development = development ']'
+ celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair
+ cd superset/assets/
+ npm ci
npm WARN prepare removing existing node_modules/ before installation
2019-10-07 11:59:49,785:INFO:root:logging was configured successfully
2019-10-07 11:59:50,307:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
2019-10-07 11:59:51,715:DEBUG:asyncio:Using selector: SelectSelector
npm ERR! code E504
npm ERR! 504 Gateway Timeout - GET https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz

super 集容器中的Docker Exec
docker exec -it cdb96671175adfdcfbe8d32f51c395f0fe77faab6b1f76f7266ca03eb0720a04 /bin/sh -c "[ -e /bin/bash ] && /bin/bash || /bin/sh"
➜ docker git:(master) docker exec -it cdb96671175adfdcfbe8d32f51c395f0fe77faab6b1f76f7266ca03eb0720a04 /bin/sh -c "[ -e /bin/bash ] && /bin/bash || /bin/sh"
root@cdb96671175a:/home/superset# %
➜ docker git:(master)

docker-compose up 后, 控制台输出
fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 07 Oct 11:59:42.628 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 07 Oct 11:59:42.628 * The server is now ready to accept connections on port 6379
superset_1 | + '[' 0 -ne 0 ']'
superset_1 | + '[' development = development ']'
superset_1 | + celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair
postgres_1 | 2019-10-07 11:59:42.573 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1 | 2019-10-07 11:59:42.600 UTC [23] LOG: database system was shut down at 2019-10-07 11:57:21 UTC
superset_1 | + cd superset/assets/
superset_1 | + npm ci
postgres_1 | 2019-10-07 11:59:42.606 UTC [1] LOG: database system is ready to accept connections
superset_1 | npm WARN prepare removing existing node_modules/ before installation
superset_1 | 2019-10-07 11:59:49,785:INFO:root:logging was configured successfully
superset_1 | 2019-10-07 11:59:50,307:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_1 | 2019-10-07 11:59:51,715:DEBUG:asyncio:Using selector: SelectSelector
superset_1 | npm ERR! code E504
superset_1 | npm ERR! 504 Gateway Timeout - GET https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz

最佳答案

我找到了替代RUN cd superset/assets \
&& npm ci\
&& npm run build \
&& rm -rf node_modules
的解决方法

通过

RUN cd superset/assets \
&& npm install \
&& npm run build \
&& rm -rf node_modules

在超集的dockerfile中(/ contrib / docker /)

关于docker - Apache Superset:无法第二次运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58269340/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com