`502 Bad Gateway` + `Waiting for asset creation`
See original GitHub issue- frontend:
Starting frontend > spleeter-web-frontend@1.0.0 build /webapp/frontend > webpack --config webpack.prod.config.js Hash: 0234d98b2e6b059e2ee8 Version: webpack 4.46.0 Time: 53586ms Built at: 02/12/2022 3:02:48 PM Asset Size Chunks Chunk Names favicon.ico 32.2 KiB [emitted] favicon.svg 117 KiB [emitted] main.js 188 KiB 0 [emitted] main runtime.js 1.46 KiB 1 [emitted] runtime vendors.js 1.33 MiB 2 [emitted] [big] vendors vendors.js.LICENSE.txt 4.27 KiB [emitted] Entrypoint main [big] = runtime.js vendors.js main.js [+YzT] ./node_modules/react-bootstrap/esm/Nav.js + 3 modules 5.11 KiB {2} [built] | 4 modules [2YZa] ./src/index.tsx + 53 modules 271 KiB {0} [built] | ./src/index.tsx 843 bytes [built] | ./src/models/Separator.ts 987 bytes [built] | ./src/Constants.tsx 568 bytes [built] | ./src/Utils.tsx 1.96 KiB [built] | ./src/models/YouTubeLinkFetchStatus.ts 464 bytes [built] | ./src/models/PartId.ts 59 bytes [built] | ./src/models/MusicParts.ts 214 bytes [built] | ./src/svg/cancel.svg 483 bytes [built] | ./src/svg/remove.svg 599 bytes [built] | ./src/svg/restart.svg 463 bytes [built] | + 44 hidden modules [6ctO] ./node_modules/react-bootstrap/esm/Navbar.js + 4 modules 11.2 KiB {2} [built] | 5 modules [7Tkq] ./node_modules/@jeffreyca/react-jinke-music-player/es/index.js + 36 modules 245 KiB {2} [built] | 37 modules [91je] ./node_modules/react-bootstrap/node_modules/@restart/hooks/esm/useWillUnmount.js + 1 modules 700 bytes {2} [built] | 2 modules [DjlD] ./node_modules/awesome-debounce-promise/dist/index.es.js + 2 modules 5.74 KiB {2} [built] | 3 modules [JUMO] ./node_modules/react-bootstrap/esm/ProgressBar.js + 1 modules 5.17 KiB {2} [built] | 2 modules [LhCv] ./node_modules/history/esm/history.js + 2 modules 30.6 KiB {2} [built] | 3 modules [QojX] ./node_modules/react-bootstrap/esm/Form.js + 13 modules 23.3 KiB {2} [built] | 14 modules [XlTo] ./node_modules/tone/build/esm/index.js + 917 modules 1.19 MiB {2} [built] | 918 modules [dDCJ] ./node_modules/react-bootstrap/esm/OverlayTrigger.js + 61 modules 103 KiB {2} [built] | 62 modules [dI71] ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules 481 bytes {2} [built] | 2 modules [sjrs] ./node_modules/react-bootstrap/esm/ListGroup.js + 1 modules 3.72 KiB {2} [built] | 2 modules [yLpj] (webpack)/buildin/global.js 472 bytes {2} [built] [zM5D] ./node_modules/react-bootstrap/esm/Modal.js + 18 modules 39.5 KiB {2} [built] | 19 modules + 1750 hidden modules exited with code 0
- Shouldn’t frontend be generated before (in a Dockerfile) and included as part of an Image(s)?
- redis:
1:M 12 Feb 2022 15:01:34.804 * Ready to accept connections
- (before, both celery):
[2022-02-12 15:03:12,728: INFO/MainProcess] Connected to redis://redis:6379/0 [2022-02-12 15:03:12,750: INFO/MainProcess] mingle: searching for neighbors [2022-02-12 15:03:13,798: INFO/MainProcess] mingle: all alone
- celery-slow:
[2022-02-12 15:03:12,984: INFO/MainProcess] celery@215ae8e2168e ready.
- celery-fast:
[2022-02-12 15:03:13,832: INFO/MainProcess] celery@e0e0e3e79c76 ready.
- nginx: (returning 502)
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Configuration complete; ready for start up 2022/02/12 15:03:20 [notice] 1#1: using the "epoll" event method ... 2022/02/12 15:03:25 [notice] 1#1: start worker process 60 2022/02/12 15:03:33 [error] 23#23: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://192.168.48.6:8000/", host: "redacted_domain" 172.31.0.2 - - [12/Feb/2022:15:03:33 +0000] "GET / HTTP/1.1" 502 158 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0" "172.31.0.1" 2022/02/12 15:15:14 [error] 23#23: *6 connect() failed (113: Host is unreachable) while connecting to upstream, client: 172.31.0.2, server: , request: "GET / HTTP/1.1", upstream: "http://192.168.48.6:8000/", host: "redacted_domain" 172.31.0.2 - - [12/Feb/2022:15:15:14 +0000] "GET / HTTP/1.1" 502 158 "-" "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0" "172.31.0.1"
- api:
Waiting for asset creation
(even after restarting the api container)`
docker-compose.yml:
networks:
redacted_domain:
internal: true
services:
redacted_domain-redis:
image: redis:6.0-buster
user: "65534:65534"
expose:
- "6379"
volumes:
- /db/redacted_domain:/data
networks:
- redacted_domain
restart: "no"
redacted_domain-nginx:
build: https://github.com/JeffreyCA/spleeter-web.git#:nginx
image: spleeter-web-nginx:antihardcode
# image: jeffreyca/spleeter-web-nginx:latest
volumes:
- /data/redacted_domain/staticfiles:/webapp/staticfiles:rw
depends_on:
- redacted_domain-api
environment:
- API_HOST=redacted_domain-api
networks:
- redacted_domain
- proxy # on port 80, expose to https://redacted_domain
restart: "no"
redacted_domain-api:
image: jeffreyca/spleeter-web-backend:latest
volumes:
- /data/redacted_domain/staticfiles:/webapp/staticfiles:rw
- /data/redacted_domain/frontassets:/webapp/assets:rw
- /data/redacted_domain/sqlite:/webapp/sqlite:rw
env_file:
- redacted_domain.env
depends_on:
- redacted_domain-redis
- redacted_domain-frontend
expose:
- 8000
networks:
- redacted_domain
restart: "no"
redacted_domain-celery-fast:
image: jeffreyca/spleeter-web-backend:latest
entrypoint: ./celery-fast-entrypoint.sh
volumes:
- /data/redacted_domain/celery:/webapp/celery:rw
- /data/redacted_domain/pretrained_models:/webapp/pretrained_models:rw
- /data/redacted_domain/sqlite:/webapp/sqlite:rw
env_file:
- redacted_domain.env
depends_on:
- redacted_domain-redis
dns:
- "9.9.9.9"
networks:
- redacted_domain
restart: "no"
redacted_domain-celery-slow:
image: jeffreyca/spleeter-web-backend:latest
entrypoint: ./celery-slow-entrypoint.sh
volumes:
- /data/redacted_domain/celery:/webapp/celery:rw
- /data/redacted_domain/pretrained_models:/webapp/pretrained_models:rw
- /data/redacted_domain/sqlite:/webapp/sqlite:rw
env_file:
- redacted_domain.env
depends_on:
- redacted_domain-redis
networks:
- redacted_domain
restart: "no"
redacted_domain-frontend:
image: jeffreyca/spleeter-web-frontend:latest
volumes:
- /data/redacted_domain/frontassets:/webapp/assets:rw
networks:
- redacted_domain
restart: "no"
env:
DJANGO_SETTINGS_MODULE=django_react.settings_docker
CELERY_BROKER_URL=redis://redacted_domain-redis:6379/0
CELERY_RESULT_BACKEND=redis://redacted_domain-redis:6379/0
APP_HOST=redacted_domain
DEFAULT_FILE_STORAGE=api.storage.FileSystemStorage
YOUTUBE_API_KEY=redacted
CPU_SEPARATION=1
CELERY_FAST_QUEUE_CONCURRENCY=3
CELERY_SLOW_QUEUE_CONCURRENCY=1
So, like attempt 5 on getting this running. It’s stuck on waiting?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How To Fix a 502 Bad Gateway Error - Kinsta
One of the easiest and first things you should try when encountering a 502 bad gateway error is to simply wait a minute...
Read more >A Solution to HTTP 502 Errors with AWS ALB - Tessian
The 502 Bad Gateway error is caused when the ALB sends a request to a service at the same time that the service...
Read more >NGINX 502 Bad Gateway: Gunicorn - Datadog
NGINX will return a 502 Bad Gateway error if it can't successfully proxy a request to Gunicorn or if Gunicorn fails to respond....
Read more >Fix 502 Bad Gateway Error on Your WordPress Site With 10 ...
The 502 bad gateway error is an HTTP error. That usually means something has interrupted the normal process between the web server and...
Read more >How to Fix 502 Bad Gateway Error - Hostinger
How to Fix 502 Bad Gateway Error · 1. Refresh the Page. The first solution is a fairly simple one – wait around...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, got it running, patches incoming.
frontend generator was using
/webapp/assets
instead of/webapp/frontend/assets
Yeah nginx is now on
stable
as opposed to a pinned version so it’s possible for it to be out of date.