Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker 构建正常,启动并登录后跳转页面错误,并且superset_app出现错误 #31890

Open
2 of 3 tasks
ludaxiansheng opened this issue Jan 16, 2025 · 6 comments
Open
2 of 3 tasks
Labels
install:docker Installation - docker container

Comments

@ludaxiansheng
Copy link

Bug description

Bug description

docker 构建正常,启动并登录后跳转页面错误,并且superset_app出现错误,错误如下
2025-01-16 11:35:39,016:WARNING:superset.views.error_handling:HTTPException
superset_app | Traceback (most recent call last):
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
superset_app | rv = self.dispatch_request()
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
superset_app | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 502, in
superset_app | view_func=lambda **kw: self_ref().send_static_file(**kw), # type: ignore # noqa: B950
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/scaffold.py", line 317, in send_static_file
superset_app | return send_from_directory(
superset_app | ^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/helpers.py", line 557, in send_from_directory
superset_app | return werkzeug.utils.send_from_directory( # type: ignore[return-value]
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/werkzeug/utils.py", line 575, in send_from_directory
superset_app | raise NotFound()
superset_app | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
superset_app | 10.100.5.188 - - [16/Jan/2025:11:35:39 +0000] "GET /static/assets/images/loading.gif HTTP/1.1" 404 334 "http://10.100.5.77:8088/superset/welcome/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0"

Image

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@ludaxiansheng
Copy link
Author

docker构建命令如下
docker compose up --build

@dosubot dosubot bot added the install:docker Installation - docker container label Jan 16, 2025
Copy link

dosubot bot commented Jan 16, 2025

Hey @ludaxiansheng! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this docker issue together!

I found a similar closed issue related to a 404 error for static assets in Superset, but no solution was found in the comments [1]. Additionally, there are two unsolved discussions that might be relevant:

  1. Custom Logo with Docker + nginx-proxy not working [2].
  2. Docker for testing Superset Failed in local [3].

For your specific issue, the 404 error for the static asset loading.gif suggests that the static files might not be correctly built or served. Here are a few steps you can take to troubleshoot and potentially resolve the issue:

  1. Verify Static Asset Build: Ensure that the static assets are correctly built during the Docker image creation. The assets should be located in the /app/superset/static/assets directory within the Docker container [4].

  2. Check Nginx Configuration: If you are using Nginx to serve static files, verify that the Nginx configuration is correctly set up to serve files from the static assets directory. The nginx.conf file should have the correct paths and permissions to access these files [5].

  3. STATIC_ASSETS_PREFIX Configuration: Check the STATIC_ASSETS_PREFIX configuration in your Superset setup. This configuration determines the path for static assets. Ensure it is set correctly to match the location where your static files are served [6].

  4. Docker Volumes: Ensure that the Docker volumes are correctly mounted and that the paths for static files are accessible within the container. This includes verifying the docker-compose.yml file for correct volume mappings [5].

By following these steps, you should be able to identify and resolve the issue with missing static assets in your Superset Docker deployment.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@ludaxiansheng
Copy link
Author

ludaxiansheng commented Jan 17, 2025

@dosubot
super_init容器运行失败, 但是docker logs 日志并未发现异常

docker logs superset_init
Reinstalling the app in editable mode
Resolved 147 packages in 1m 22s
Prepared 1 package in 4.61s
Uninstalled 1 package in 295ms
Installed 1 package in 4ms
~ apache-superset==0.0.0.dev0 (from file:///app)
Installing postgres requirements
Audited 1 package in 63ms
Skipping local overrides
Unknown Operation!!!

######################################################################

Init Step 1/4 [Starting] -- Applying DB migrations

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:47:38,112:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
INFO [alembic.env] Starting the migration scripts.
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.env] Migration scripts completed. Duration: 00:00:00

######################################################################

Init Step 1/4 [Complete] -- Applying DB migrations

######################################################################

######################################################################

Init Step 2/4 [Starting] -- Setting up admin user ( admin / admin )

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:47:49,171:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
Recognized Database Authentications.
Error! User already exists admin

######################################################################

Init Step 2/4 [Complete] -- Setting up admin user

######################################################################

######################################################################

Init Step 3/4 [Starting] -- Setting up roles and perms

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:47:56,818:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
2025-01-17 01:48:02,475:INFO:superset.security.manager:Syncing role definition
2025-01-17 01:48:02,543:INFO:superset.security.manager:Syncing Admin perms
2025-01-17 01:48:02,551:INFO:superset.security.manager:Syncing Alpha perms
2025-01-17 01:48:02,562:INFO:superset.security.manager:Syncing Gamma perms
2025-01-17 01:48:02,572:INFO:superset.security.manager:Syncing sql_lab perms
2025-01-17 01:48:02,578:INFO:superset.security.manager:Fetching a set of all perms to lookup which ones are missing
2025-01-17 01:48:02,588:INFO:superset.security.manager:Creating missing datasource permissions.
2025-01-17 01:48:02,752:INFO:superset.security.manager:Creating missing database permissions.
2025-01-17 01:48:02,758:INFO:superset.security.manager:Cleaning faulty perms

######################################################################

Init Step 3/4 [Complete] -- Setting up roles and perms

######################################################################

######################################################################

Init Step 4/4 [Starting] -- Loading examples

######################################################################

Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
2025-01-17 01:48:08,233:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
2025-01-17 01:48:10,909:INFO:superset.cli.examples:Loading examples metadata and related data into examples
2025-01-17 01:48:10,935:INFO:superset.cli.examples:Loading [World Bank's Health Nutrition and Population Stats]
2025-01-17 01:48:14,893:INFO:superset.cli.examples:Loading [Birth names]
2025-01-17 01:48:15,889:INFO:superset.cli.examples:Loading [Random long/lat data]
2025-01-17 01:48:16,264:INFO:superset.cli.examples:Loading [Country Map data]
2025-01-17 01:48:16,644:INFO:superset.cli.examples:Loading [San Francisco population polygons]
2025-01-17 01:48:17,020:INFO:superset.cli.examples:Loading [Flights data]
2025-01-17 01:48:17,493:INFO:superset.cli.examples:Loading [BART lines]
2025-01-17 01:48:17,804:INFO:superset.cli.examples:Loading [Misc Charts] dashboard
2025-01-17 01:48:17,844:INFO:superset.cli.examples:Loading DECK.gl demo

######################################################################

Init Step 4/4 [Complete] -- Loading examples

######################################################################

root@itgemini-ubuntu:/docker-share/superset# docker ps

@imamfchrj
Copy link

I have the exact same problem as you @ludaxiansheng. Please provide me with a solution to resolve this issue.

Copy link

dosubot bot commented Jan 17, 2025

The "Unknown Operation" message you encountered during the Superset initialization process doesn't seem to be causing any critical issues, as the subsequent steps in the initialization process completed successfully. Here's a breakdown of what happened:

  1. DB Migrations: The database migrations were applied without any issues.
  2. Admin User Setup: The process attempted to create an admin user, but it found that the user already exists. This is not an error; it simply means the user setup step was skipped because the user is already present.
  3. Roles and Permissions: The roles and permissions were set up correctly, as indicated by the logs showing the syncing of role definitions and permissions.
  4. Loading Examples: The example data was loaded successfully, which includes various datasets and dashboards.

The "Unknown Operation" message might be a benign log entry that doesn't affect the overall functionality. If everything else is working as expected, you can likely ignore this message. If you encounter any specific issues related to this message, further investigation might be needed, but based on the logs, the initialization process completed successfully.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@imamfchrj
Copy link

@dosubot an then How to ignore this error and proceed to access the Superset dashboard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:docker Installation - docker container
Projects
None yet
Development

No branches or pull requests

2 participants