apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.79k stars 13.87k forks source link

[docker]When I deploy superset based on docker according to the document, the front end cannot be opened #12440

Closed TimothyDing closed 3 years ago

TimothyDing commented 3 years ago

A clear and concise description of what the bug is.

Expected results

Use docker to deploy superset according to the document, the front end cannot log in

Actual results

When I log in, after entering the user name and password, the front end displays as follows

Screenshots

image

How to reproduce the bug

  1. docker-compose up
  2. Login
  3. Happened

Environment

(please complete the following information):

citizenrich commented 3 years ago

Here's the error from the Chrome debugger for the same error. image

a5net commented 3 years ago

Can confirm, experiencing this issue as well. Could it be something mac related?

Env: docker: 20.10.0, build 7287ab3 docker-compose: 1.27.4, build 40524192 os: macOS big sur

arcosx commented 3 years ago

me too

a5net commented 3 years ago

Ok, it is a bit silly but looks like there no issue at all :D

The problem is that image for superset-frontend is building in the background and it takes quite a while (2.5 minutes for me).

So just wait longer and in fact, you should be able to see logs from the build. They are labeled under "superset_node". After the build is complete, you should be able to launch the app at localhost:8088.

arcosx commented 3 years ago

tks! @ayanginet I found it. Just docker logs superset_node can see the building ....

<s> [webpack.Progress] 69% building 8358/8400 modules 42 active /app/superset-frontend/node_modules/@superset-ui/legacy-preset-chart-deckgl/esm/layers/Arc/index.js
<s> [webpack.Progress] 69% building 8358/8401 modules 43 active /app/superset-frontend/node_modules/moment/locale/id.js
<s> [webpack.Progress] 69% building 8359/8401 modules 42 active /app/superset-frontend/node_modules/moment/locale/id.js
<s> [webpack.Progress] 69% building 8359/8402 modules 43 active /app/superset-frontend/node_modules/@superset-ui/plugin-chart-echarts/esm/defaults.js
<s> [webpack.Progress] 69% building 8360/8402 modules 42 active /app/superset-frontend/node_modules/@superset-ui/plugin-chart-echarts/esm/defaults.js
<s> [webpack.Progress] 69% building 8361/8402 modules 41 active /app/superset-frontend/node_modules/@superset-ui/plugin-chart-echarts/esm/defaults.js
<s> [webpack.Progress] 69% building 8361/8403 modules 42 active /app/superset-frontend/node_modules/react-map-gl/dist/esm/index.js

Ok, it is a bit silly but looks like there no issue at all :D

The problem is that image for superset-frontend is building in the background and it takes quite a while (2.5 minutes for me).

So just wait longer and in fact, you should be able to see logs from the build. They are labeled under "superset_node". After the build is complete, you should be able to launch the app at localhost:8088.

ktmud commented 3 years ago

Glad you guys resolved the issue yourselves!

@srinify we should probably add a note in the documentation to explain that the initial build will take a while...

portenez commented 3 years ago

For me,

superset_node starts building, but it always fails. 😢 😭

<s> [webpack.Progress] 57% building 399/439 modules 40 active /app/superset-frontend/node_modules/core-js-pure/modules/es.json.stringify.js
events.js:291
throw er; // Unhandled 'error' event

^

Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:156:25)
at writeGeneric (internal/stream_base_commons.js:147:3)
at Socket._writeGeneric (net.js:787:11)
at Socket._write (net.js:799:8)
at doWrite (_stream_writable.js:403:12)
at Socket.Writable.write (_stream_writable.js:318:11)
at PoolWorker.writeJson (/app/superset-frontend/node_modules/thread-loader/dist/WorkerPool.js:89:22)
at PoolWorker.run (/app/superset-frontend/node_modules/thread-loader/dist/WorkerPool.js:69:12)
at WorkerPool.distributeJob (/app/superset-frontend/node_modules/thread-loader/dist/WorkerPool.js:326:20)
at /app/superset-frontend/node_modules/async/queue.js:10:5
at process (/app/superset-frontend/node_modules/async/internal/queue.js:164:17)
at Immediate.<anonymous> (/app/superset-frontend/node_modules/async/internal/setImmediate.js:27:16)
Emitted 'error' event on Socket instance at:
at errorOrDestroy (internal/streams/destroy.js:108:12)
at onwriteError (_stream_writable.js:418:5)
at onwrite (_stream_writable.js:445:5)
at internal/streams/destroy.js:50:7
at Socket._destroy (net.js:680:5)
at Socket.destroy (internal/streams/destroy.js:38:8)
at afterWriteDispatched (internal/stream_base_commons.js:156:17)
at writeGeneric (internal/stream_base_commons.js:147:3)

[... lines matching original stack trace ...]

at processImmediate (internal/timers.js:461:21) {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
}

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! superset@1.0.1 dev: `webpack --mode=development --colors --debug --watch`
npm ERR! Exit status 1

npm ERR!
npm ERR! Failed at the superset@1.0.1 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-02-18T14_46_18_593Z-debug.log
portenez commented 3 years ago

See this other thread (that was auto-closed): https://github.com/apache/superset/issues/9690

This happens also when using the provided docker-compose

portenez commented 3 years ago

Oh, It's the memory. I found int he docs.. the docker memory needs to be increased to 6GB

felixsilberstein commented 3 years ago

I'm still receiving the same page, I further looked at the Dockerfile following the command that copies the static assets:

COPY --from=superset-node /app/superset/static/assets /app/superset/static/assets

from: https://github.com/apache/superset/blob/latest/Dockerfile#L96 and checked files in both the app and the node instances, and they are empty:

superset_app

docker exec -it superset_app bash
root@f21b121a53a8:/app# ls -la superset/static/
total 0
drwxr-xr-x  3 root root   96 Mar 22 20:49 .
drwxr-xr-x 51 root root 1632 Mar 22 21:50 ..
-rw-r--r--  1 root root    0 Mar 22 20:49 .gitkeep
root@f21b121a53a8:/app#

and superset_node

docker exec -it superset_node bash
root@b1bf49b939ff:/# ls -la app/superset/static/
total 0
drwxr-xr-x  3 root root   96 Mar 22 20:49 .
drwxr-xr-x 51 root root 1632 Mar 22 21:50 ..
-rw-r--r--  1 root root    0 Mar 22 20:49 .gitkeep
root@b1bf49b939ff:/#