Describe the bug
I'm using the Docker hub image at mher/flower.
This is from my docker-compose.yaml
flower:
image: mher/flower:0.9.5
depends_on:
- broker
env_file:
- worker/.env
- flower/.env
I previously had Flower working in version 0.9.2 but when I upgraded to 0.9.5 I now get a "404: Not Found" whenever a load the home page (http://flower:5555). I am asked to authenticate using basic authentication, but then a 404 error is presented.
To Reproduce
$ docker-compose build --pull
$ docker-compose up -d
Then I open the page in the web browser or use the curl command.
Expected behavior
I expect to see the normal Flower home page (or API at /api/)
Screenshots
$ docker-compose exec --user my_user app curl http://flower:5555
<html><title>404: Not Found</title><body>404: Not Found</body></html>
$ docker-compose logs flower
Attaching to coguk_flower_1
flower_1 | [I 200803 16:13:46 command:138] Visit me at http://localhost:5555
flower_1 | [I 200803 16:13:46 command:145] Broker: amqp://guest:**@broker:5672/coguk
flower_1 | [I 200803 16:13:46 command:146] Registered tasks:
flower_1 | ['celery.accumulate',
flower_1 | 'celery.backend_cleanup',
flower_1 | 'celery.chain',
flower_1 | 'celery.chord',
flower_1 | 'celery.chord_unlock',
flower_1 | 'celery.chunks',
flower_1 | 'celery.group',
flower_1 | 'celery.map',
flower_1 | 'celery.starmap']
flower_1 | [I 200803 16:13:52 mixins:229] Connected to amqp://guest:**@broker:5672/coguk
flower_1 | [W 200803 16:13:56 control:49] 'stats' inspect method failed
flower_1 | [W 200803 16:13:56 control:49] 'active_queues' inspect method failed
flower_1 | [W 200803 16:13:56 control:49] 'registered' inspect method failed
flower_1 | [W 200803 16:13:56 control:49] 'scheduled' inspect method failed
md5-96fce5a89f602ce5f8dbc51b453feb35
$ docker image inspect mher/flower:0.9.5
[
{
"Id": "sha256:3d7ea6ff7b641a0d681cc5665a76cad9fa07ed2005e1b803dd20d058150427ad",
"RepoTags": [
"mher/flower:0.9.5"
],
"RepoDigests": [
"mher/flower@sha256:ca71af763c3862a1e48f387163da12b8dca8dd86ab2b64b54844aac959fa54c5"
],
"Parent": "",
"Comment": "",
"Created": "2020-07-02T22:34:04.020878914Z",
"Container": "2d69f0f81456a297e59b4f3c8cd30a7d5f2b268ed884e8c2159d9113975487d5",
"ContainerConfig": {
"Hostname": "2d69f0f81456",
"Domainname": "",
"User": "flower",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"5555/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568",
"PYTHON_VERSION=3.8.3",
"PYTHON_PIP_VERSION=20.1.1",
"PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/get-pip.py",
"PYTHON_GET_PIP_SHA256=b3153ec0cf7b7bbf9556932aa37e4981c35dc2a2c501d70d91d2795aa532be79",
"PYTHONUNBUFFERED=1",
"PYTHONHASHSEED=random",
"PYTHONDONTWRITEBYTECODE=1",
"FLOWER_DATA_DIR=/data",
"PYTHONPATH=/data"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"ENTRYPOINT [\"flower\"]"
],
"Image": "sha256:c2681be6af696dbdffa4b42101b80ac8213714c7e74da88f8ffdc3cbbb4186ae",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"flower"
],
"OnBuild": null,
"Labels": {}
},
"DockerVersion": "19.03.8",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "flower",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"5555/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568",
"PYTHON_VERSION=3.8.3",
"PYTHON_PIP_VERSION=20.1.1",
"PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/eff16c878c7fd6b688b9b4c4267695cf1a0bf01b/get-pip.py",
"PYTHON_GET_PIP_SHA256=b3153ec0cf7b7bbf9556932aa37e4981c35dc2a2c501d70d91d2795aa532be79",
"PYTHONUNBUFFERED=1",
"PYTHONHASHSEED=random",
"PYTHONDONTWRITEBYTECODE=1",
"FLOWER_DATA_DIR=/data",
"PYTHONPATH=/data"
],
"Cmd": null,
"Image": "sha256:c2681be6af696dbdffa4b42101b80ac8213714c7e74da88f8ffdc3cbbb4186ae",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"flower"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 99722317,
"VirtualSize": 99722317,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/bb82bb4196b7372fbeae3825d3f9d2eb1929cde6c24715a5ce551f3def7ddada/diff:/var/lib/docker/overlay2/195c62a49d4cc7f0cf118991f1307c54cc3e981632c5592171fbfe70c6cc6949/diff:/var/lib/docker/overlay2/e413d3e200f46184e7fa8f9b0ad68c293738e5abcbf4a4bbc03db83a08fafce8/diff:/var/lib/docker/overlay2/1f3aa67dadb98033c964074880d40eb2eb5fc406c71c4971aac440698ddf8fa2/diff:/var/lib/docker/overlay2/39959956ae51703f313d54ceed51cb4673779fa99b2477e52e583fd9555da441/diff:/var/lib/docker/overlay2/343aedc233e40f76e583a009aedf8b04d5bfeb6e19bdfc5ae0fab69a25321b5b/diff:/var/lib/docker/overlay2/0663c90a2de4009aa700e63322dda50a7a78fb6fc6abdebab110a3405cc24adb/diff:/var/lib/docker/overlay2/b806df473ea346bac3d51a59cc096b5cdf55e12f0616ccfe1d3716e531ce3afb/diff",
"MergedDir": "/var/lib/docker/overlay2/c74b3dacd682852816e6377d2ca0e90fa6996ad09458e217d717ce15b79bd950/merged",
"UpperDir": "/var/lib/docker/overlay2/c74b3dacd682852816e6377d2ca0e90fa6996ad09458e217d717ce15b79bd950/diff",
"WorkDir": "/var/lib/docker/overlay2/c74b3dacd682852816e6377d2ca0e90fa6996ad09458e217d717ce15b79bd950/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:3e207b409db364b595ba862cdc12be96dcdad8e36c59a03b7b3b61c946a5741a",
"sha256:a539b76feca4479232b3e15c29bf441c080441900384376dac2b0d7ca210fb1f",
"sha256:df897d49f46cc96875fd5670f5484d2468b4a19fbd10b209c9cc00d2c4c19eba",
"sha256:7a82840eb6822b6ad44e46166f1dc8ff9b78ebb3ddd66f5a6e3e592390673511",
"sha256:a7d85ab87af885b3483663ce57d25c1ece4fc9ff8145008d5f0f40b03b2e83b6",
"sha256:f7b6c7923d50422987833ed911c9f39a00b4d9a1fec90d7e3af668b18ac8e24c",
"sha256:b6309bc5e9b8823ddc8975510253bf40eb571ab7174d6eb323d40432f8a7ea1a",
"sha256:5f351086378d1f8fc7695ac8d78d1bb524284092a39d02b5fad710310e478e73",
"sha256:b5a1e0b3cdff0e2f75ea0e9ed040b5a6206e1a57c9a4a1904a886ceee0b846cd"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
I solved this by downgrading to version 0.9.4
This is from the new docker-compose.yaml:
# Celery task monitor
flower:
image: mher/flower:0.9.4
depends_on:
- broker
env_file:
- worker/.env
- flower/.env
And then I changed the container environement:
$ git pull && docker-compose build --pull flower && docker-compose up -d
Already up-to-date.
flower uses an image, skipping
Pulling flower (mher/flower:0.9.4)...
0.9.4: Pulling from mher/flower
cbdbe7a5bc2a: Already exists
26ebcd19a4e3: Already exists
a29d43ca1bb4: Already exists
979dbbcf63e0: Already exists
30beed04940c: Already exists
a4e4a5437fc6: Pull complete
c92d8969f014: Pull complete
6a6028b6ee7a: Pull complete
3fda171625b6: Pull complete
Digest: sha256:abf8b49c961e1d70efab78c2e42ffd928f1f1934b26fe79b46884d64cf3c559d
Status: Downloaded newer image for mher/flower:0.9.4
coguk_db_1 is up-to-date
coguk_sequencer-ssh_1 is up-to-date
coguk_sequencer_1 is up-to-date
coguk_broker_1 is up-to-date
coguk_phpmyadmin_1 is up-to-date
Recreating coguk_flower_1 ...
coguk_worker_1 is up-to-date
Recreating coguk_flower_1 ... done
Recreating coguk_app_1 ...
Recreating coguk_app_1 ... done
Recreating coguk_web_1 ...
Recreating coguk_web_1 ... done
I'm having the same 404 issue, not via docker but from a straight installation of flower 0.9.5 (no docker).
Similarly to @Joe-Heffer-Shef the problem is "solved" by downgrading flower to 0.9.4.
Also having the same issue, I'm using flower in a Docker container also running nginx to http-proxy to it.
Flower is too useful to me, I have waited to upgrade Celery because of the other bug on 5.0, wish I had time to contribute!
Might be related to https://github.com/mher/flower/issues/1001
I'm not sure how to fix it using the docker setup
https://flower.readthedocs.io/en/latest/config.html?highlight=nginx#url-prefix
Most helpful comment
Also having the same issue, I'm using flower in a Docker container also running nginx to http-proxy to it.
Flower is too useful to me, I have waited to upgrade Celery because of the other bug on 5.0, wish I had time to contribute!