gegham
gegham

Reputation: 35

Celery Flower not found js files

I just started to use Flower for Celery task monitoring. Everything is working well on locally. But when I deploy my code to server, and try to open flower page I received the following error

[pid: 6442|app: 0|req: 20/20] 46.19.100.110 () {44 vars in 935 bytes}       
[Thu Mar 10 06:38:39 2016] GET /static/js/bootstrap-collapse.js?v=e8ddac0b5dd49cfbcf7d3ca8b0098d7b => generated 1852 bytes in 22 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)

Not Found: /static/js/bootstrap-carousel.js

[pid: 6442|app: 0|req: 21/21] 46.19.100.110 () {44 vars in 935 bytes}      
[Thu Mar 10 06:38:39 2016] GET /static/js/bootstrap-carousel.js?v=fc8cbc40f39316b8b567b3b96efe9044 => generated 1852 bytes in 24 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)

Not Found: /static/js/d3.min.js
[pid: 6442|app: 0|req: 22/22] 46.19.100.110 () {44 vars in 911 bytes}    
[Thu Mar 10 06:38:39 2016] GET /static/js/d3.min.js?v=eb68d3d1035789d336b285373046b550 => generated 1816 bytes in 23 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)

Not Found: /static/js/rickshaw.min.js

[pid: 6442|app: 0|req: 23/23] 46.19.100.110 () {44 vars in 923 bytes}  
[Thu Mar 10 06:38:39 2016] GET /static/js/rickshaw.min.js?v=fc927b6dd64118caa563b711bcb2f130 => generated 1834 bytes in 21 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)

Not Found: /static/js/bootstrap-datetimepicker.min.js

[pid: 6442|app: 0|req: 24/24] 46.19.100.110 () {44 vars in 955 bytes}    
[Thu Mar 10 06:38:39 2016] GET /static/js/bootstrap-datetimepicker.min.js?v=8880b6a34ee02b5cb6a75f92b3a7ddc9 => generated 1882 bytes in 19 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0)
Not Found: /static/js/flower.js

Any ideas?

this is nginx config file

upstream admin_backend {
    server {{ backend_host }}:{{ backend_port }};
}

upstream flower_backends {
    server {{ backend_host }}:{{ flower_port }};
}

server {
    listen  80;
    server_name     admin{{ suffix }}.skycryptor.com;
    rewrite     ^ https://admin{{ suffix }}.skycryptor.com last;
}

server {
    listen 443 ssl;
    server_name admin{{ suffix }}.skycryptor.com;

client_max_body_size 100M;
location / {
    uwsgi_pass admin_backend;
    include uwsgi_params;
}

location /flower {
    proxy_pass_header Server;
    proxy_pass http://flower_backends;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_next_upstream error;
}

location /robots.txt {
    alias /opt/static/robots.txt;
}
}

I think Flower is running normallu, this is message from log file

Executing /opt/worker/runenv/bin/celery --app=skyworker flower --port=5555 in /opt/worker/runenv

Upvotes: 2

Views: 3171

Answers (1)

Muhammad Tahir
Muhammad Tahir

Reputation: 5174

In earlier versions of flower, it had a command line parameter --url-prefix=flower. It enabled users to run flower on a URL path like /flower. In recent versions this parameter deprecated and flower's pypi version (0.8.4) can only run on a sub domain like flower.example.com but not on a URL path like example.com/flower.

In the master branch of github repo of flower, its author has restored the --url-prefix parameter (12 days ago, so it is not on pypi yet, so pip install flower will pull older version), see this issue (issue was reported by me).

So what you need to do is install flower from master branch of github repo instead of pypi, and specify --url-prefix=flower in command line when running flower.

Upvotes: 8

Related Questions