我刚开始使用 Flower 进行 Celery 任务监控。一切都在本地运行良好。但是当我将代码部署到服务器并尝试打开花页时,我收到以下错误
[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
有任何想法吗?
这是 nginx 配置文件
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;
}
}
我认为 Flower 正在正常运行,这是来自日志文件的消息
Executing /opt/worker/runenv/bin/celery --app=skyworker flower --port=5555 in /opt/worker/runenv