API Endpoints give status 502 after Docker installation
Steps to reproduce
I installed Funkwhale on Ubuntu 18.04 according to the Docker Install guide. I didn't change anything from the default configuration. The frontend itself loads fine, but all /api/
endpoints return an error 502.
Here is the output of docker-compose up
:
Recreating funkwhale_postgres_1 ... done
Recreating funkwhale_redis_1 ... done
Recreating funkwhale_celeryworker_1 ... done
Recreating funkwhale_api_1 ... done
Recreating funkwhale_celerybeat_1 ... done
Recreating funkwhale_nginx_1 ... done
Attaching to funkwhale_postgres_1, funkwhale_redis_1, funkwhale_celeryworker_1, funkwhale_celerybeat_1, funkwhale_api_1, funkwhale_nginx_1
postgres_1 | LOG: database system was shut down at 2018-10-14 23:17:10 UTC
postgres_1 | LOG: MultiXact member wraparound protections are now enabled
postgres_1 | LOG: database system is ready to accept connections
postgres_1 | LOG: autovacuum launcher started
redis_1 | 1:C 14 Oct 23:19:46.300 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1 | _._
redis_1 | _.-``__ ''-._
redis_1 | _.-`` `. `_. ''-._ Redis 3.2.12 (00000000/0) 64 bit
redis_1 | .-`` .-```. ```\/ _.,_ ''-._
redis_1 | ( ' , .-` | `, ) Running in standalone mode
redis_1 | |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
redis_1 | | `-._ `._ / _.-' | PID: 1
redis_1 | `-._ `-._ `-./ _.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' | http://redis.io
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | |`-._`-._ `-.__.-' _.-'_.-'|
redis_1 | | `-._`-._ _.-'_.-' |
redis_1 | `-._ `-._`-.__.-'_.-' _.-'
redis_1 | `-._ `-.__.-' _.-'
redis_1 | `-._ _.-'
redis_1 | `-.__.-'
redis_1 |
redis_1 | 1:M 14 Oct 23:19:46.301 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 14 Oct 23:19:46.301 # Server started, Redis version 3.2.12
redis_1 | 1:M 14 Oct 23:19:46.301 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | 1:M 14 Oct 23:19:46.301 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To 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 14 Oct 23:19:46.301 * DB loaded from disk: 0.000 seconds
redis_1 | 1:M 14 Oct 23:19:46.301 * The server is now ready to accept connections on port 6379
celerybeat_1 | celery beat v4.1.1 (latentcall) is starting.
api_1 | + python /app/manage.py collectstatic --noinput
celeryworker_1 | /usr/local/lib/python3.6/site-packages/celery/platforms.py:796: RuntimeWarning: You're running the worker with superuser privileges: this is
celeryworker_1 | absolutely not recommended!
celeryworker_1 |
celeryworker_1 | Please specify a different user using the -u option.
celeryworker_1 |
celeryworker_1 | User information: uid=0 euid=0 gid=0 egid=0
celeryworker_1 |
celeryworker_1 | uid=uid, euid=euid, gid=gid, egid=egid,
celeryworker_1 |
celeryworker_1 | -------------- celery@903b07e16c8d v4.1.1 (latentcall)
celeryworker_1 | ---- **** -----
celeryworker_1 | --- * *** * -- Linux-4.15.0-36-generic-x86_64-with-debian-9.5 2018-10-14 23:19:50
celeryworker_1 | -- * - **** ---
celeryworker_1 | - ** ---------- [config]
celeryworker_1 | - ** ---------- .> app: funkwhale_api:0x7fd55bfbee10
celeryworker_1 | - ** ---------- .> transport: redis://redis:6379/0
celeryworker_1 | - ** ---------- .> results: disabled://
celeryworker_1 | - *** --- * --- .> concurrency: 2 (prefork)
celeryworker_1 | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
celeryworker_1 | --- ***** -----
celeryworker_1 | -------------- [queues]
celeryworker_1 | .> celery exchange=celery(direct) key=celery
celeryworker_1 |
celeryworker_1 |
celeryworker_1 | [tasks]
celeryworker_1 | . Lyrics.fetch_content
celeryworker_1 | . federation.clean_music_cache
celeryworker_1 | . federation.deliver_to_remote_inbox
celeryworker_1 | . federation.dispatch_inbox
celeryworker_1 | . federation.dispatch_outbox
celeryworker_1 | . music.process_upload
celeryworker_1 | . music.scan_library_page
celeryworker_1 | . music.start_library_scan
celeryworker_1 |
celeryworker_1 | [2018-10-14 23:19:50,684: INFO/MainProcess] Connected to redis://redis:6379/0
celeryworker_1 | [2018-10-14 23:19:50,716: INFO/MainProcess] mingle: searching for neighbors
nginx_1 | envsubst: error while reading "standard input": Is a directory
funkwhale_nginx_1 exited with code 1
celerybeat_1 | __ - ... __ - _
celerybeat_1 | LocalTime -> 2018-10-14 23:19:51
celerybeat_1 | Configuration ->
celerybeat_1 | . broker -> redis://redis:6379/0
celerybeat_1 | . loader -> celery.loaders.app.AppLoader
celerybeat_1 | . scheduler -> celery.beat.PersistentScheduler
celerybeat_1 | . db -> celerybeat-schedule
celerybeat_1 | . logfile -> [stderr]@%INFO
celerybeat_1 | . maxinterval -> 5.00 minutes (300s)
celerybeat_1 | [2018-10-14 23:19:51,361: INFO/MainProcess] beat: Starting...
celeryworker_1 | [2018-10-14 23:19:51,772: INFO/MainProcess] mingle: all alone
celeryworker_1 | [2018-10-14 23:19:51,795: INFO/MainProcess] celery@903b07e16c8d ready.
api_1 |
api_1 | 0 static files copied to '/srv/funkwhale/data/static', 169 unmodified.
api_1 | + /usr/local/bin/daphne -b 0.0.0.0 -p 5000 config.asgi:application --proxy-headers
api_1 | 2018-10-14 23:19:53,262 INFO Starting server at tcp:port=5000:interface=0.0.0.0
api_1 | 2018-10-14 23:19:53,262 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
api_1 | 2018-10-14 23:19:53,263 INFO Configuring endpoint tcp:port=5000:interface=0.0.0.0
api_1 | 2018-10-14 23:19:53,265 INFO Listening on TCP address 0.0.0.0:5000
Contrary to the output, sudo netstat -tulpna | grep 5000
tells me that nothing is listening on port 5000. Running curl localhost:5000
also fails with "connection refused". Please let me know if you need any more information
Ubuntu 18.04 Docker version 18.06.1-ce, build e68fc7a docker-compose version 1.22.0, build f46880fe