20c/vaping

Static assets aren't being served

Closed this issue · 9 comments

I wanted to try vaping by installing it into a virtualenv, and using the example standalone DNS config but I get 404s in my browser for static asset files:

» vaping start --home=vaping/examples/standalone_dns/ -d
2022-07-27 02:40:46,848 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
2022-07-27 02:40:47,162 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
queue emission to vodka (0)
2022-07-27 02:40:49,851 - vaping.plugins.fping - DEBUG: emit to vodka
emit to vodka
2022-07-27 02:40:49,890 - vodka - DEBUG: making sure configuration is sane ...
making sure configuration is sane ...
2022-07-27 02:40:49,893 - vodka - DEBUG: instantiating data types
instantiating data types
2022-07-27 02:40:49,893 - vodka - DEBUG: instantiating plugins
instantiating plugins
2022-07-27 02:40:49,894 - vodka - DEBUG: instantiating applications
instantiating applications
2022-07-27 02:40:49,894 - vodka - DEBUG: starting plugins
starting plugins
2022-07-27 02:40:49,895 - vodka - DEBUG: starting http ..
starting http ..
2022-07-27 02:40:49,897 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
 * Serving Flask app 'vaping' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on all addresses (0.0.0.0)
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://127.0.0.1:7021
 * Running on http://<my host IP>:7021 (Press CTRL+C to quit)
2022-07-27 02:40:50,210 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
queue emission to vodka (0)
2022-07-27 02:40:52,855 - vaping.plugins.fping - DEBUG: emit to vodka
emit to vodka
2022-07-27 02:40:52,855 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
2022-07-27 02:40:53,168 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
queue emission to vodka (0)
2022-07-27 02:40:55,251 - vodka - DEBUG: /home/andor/vaping/venv/lib/python3.10/site-packages/graphsrv/etc/layouts.yaml has changed, reloading layout config...
/home/andor/vaping/venv/lib/python3.10/site-packages/graphsrv/etc/layouts.yaml has changed, reloading layout config...
<my client IP> - - [27/Jul/2022 02:40:55] "GET /view/detail/latency.public_dns/ HTTP/1.1" 200 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/media/bootstrap.min.css?v=2.1.1 HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/media/graphsrv.css?v=2.1.1 HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/js/jquery.js?v=2.1.1 HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/js/bootstrap.min.js?v=2.1.1 HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph?targets=all&id=multitarget-1&fit=yes&type=multitarget&config=multitarget&source=latency.public_dns HTTP/1.1" 308 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph?targets=all&id=smokestack-1&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 308 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph?targets=all&id=smokestack-2&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 308 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph?targets=all&id=smokestack-3&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 308 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/media/bootstrap.min.css?v=2.1.1 HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/media/graphsrv.css?v=2.1.1 HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph/?targets=all&id=smokestack-1&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 200 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph/?targets=all&id=multitarget-1&fit=yes&type=multitarget&config=multitarget&source=latency.public_dns HTTP/1.1" 200 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph/?targets=all&id=smokestack-2&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 200 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /graph/?targets=all&id=smokestack-3&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 200 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /static/graphsrv/js/twentyc.core.js HTTP/1.1" 404 -
<my client IP> - - [27/Jul/2022 02:40:55] "GET /favicon.ico HTTP/1.1" 404 -
2022-07-27 02:40:55,859 - vaping.plugins.fping - DEBUG: emit to vodka
emit to vodka
2022-07-27 02:40:55,859 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
2022-07-27 02:40:56,173 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
queue emission to vodka (0)
2022-07-27 02:40:58,864 - vaping.plugins.fping - DEBUG: emit to vodka
emit to vodka
2022-07-27 02:40:58,864 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
^C2022-07-27 02:40:58,993 - vaping.daemon - DEBUG: stopping vodka
stopping vodka
2022-07-27 02:40:58,993 - vaping.daemon - DEBUG: stopping latency
stopping latency

image

Perhaps the example config is out of date?

vegu commented

If you run pip freeze - what versions of graphsrv and Flask is it showing?

» pip freeze
certifi==2022.6.15
charset-normalizer==2.1.0
click==8.1.3
confu==1.8.0
docutils==0.19
Flask==2.1.3
fping==0.0.1a2
graphsrv==2.1.1
idna==3.3
itsdangerous==2.1.2
Jinja2==3.1.2
lockfile==0.12.2
MarkupSafe==2.1.1
munge==1.2.1
netaddr==0.8.0
pid==3.0.4
pluginmgr==1.1.0
python-daemon==2.3.1
PyYAML==5.4.1
requests==2.28.1
tmpl==1.0.0
tomlkit==0.7.2
urllib3==1.26.11
vaping==1.5.0
vodka==3.2.0
Werkzeug==2.2.0

So 2.1.1 for graphsrv and 2.1.3 for Flask

vegu commented

We're able to reproduce this on our end - will look into this asap

vegu commented

Looks like it might be a compatibility issue with Werkzeug 2.2.0

@andor44 Can you see if installing Werkzeug==2.1.0 fixes the problem for you.

Yes, it does work with werkzeug 2.1.0

Hello, what is the best way to downgrade werkzeug to 2.1.0 as part of the poetry setup within the Dockerfile?

vegu commented

Will do a pypi release for a fix shortly

vegu commented

bug fix released in version 1.5.2

@vegu amazing thank you!