Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing displayed at all #164

Closed
qfina opened this issue Aug 27, 2022 · 11 comments
Closed

Nothing displayed at all #164

qfina opened this issue Aug 27, 2022 · 11 comments

Comments

@qfina
Copy link

qfina commented Aug 27, 2022

I've tried a fresh install on CentOS, Debian and Ubunutu and every time I get the same pretty much blank screen when viewing the web.

2022-08-27 14:42:38,118 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
vaping.plugins.fping queue emission to vodka (0) __init__.py:231
2022-08-27 14:42:40,713 - vaping.plugins.fping - DEBUG: emit to vodka
vaping.plugins.fping emit to vodka __init__.py:228
2022-08-27 14:42:40,722 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
vaping.plugins.fping popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222 __init__.py:128
root 8.8.8.8        : 13.3 12.8 13.1 13.0 11.4 12.8 12.6 12.5 13.0 12.9
 fping.py:104
root 4.2.2.1        : - - - - - - - - - -
 fping.py:104
root 208.67.222.222 : 12.3 13.2 11.5 12.0 13.3 12.2 13.1 13.0 13.0 13.2
 fping.py:104

However the graphs dont load and logs show:

2022-08-27 14:43:35,222 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
vaping.plugins.fping queue emission to vodka (0) __init__.py:231
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /view/detail/latency.public_dns/ HTTP/1.1" 200 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /static/graphsrv/media/bootstrap.min.css?v=2.1.1 HTTP/1.1" 404 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /static/graphsrv/media/graphsrv.css?v=2.1.1 HTTP/1.1" 404 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /static/graphsrv/js/bootstrap.min.js?v=2.1.1 HTTP/1.1" 404 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /static/graphsrv/js/jquery.js?v=2.1.1 HTTP/1.1" 404 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /graph/?targets=all&id=multitarget-1&fit=yes&type=multitarget&config=multitarget&source=latency.public_dns HTTP/1.1" 200 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /graph/?targets=all&id=smokestack-1&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 200 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /graph/?targets=all&id=smokestack-2&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 200 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /graph/?targets=all&id=smokestack-3&fit=yes&type=smokestack&config=smokestack&source=latency.public_dns HTTP/1.1" 200 - _internal.py:224
werkzeug 192.168.1.250 - - [27/Aug/2022 14:43:37] "GET /static/graphsrv/js/twentyc.core.js HTTP/1.1" 404 - _internal.py:224

Tried loading the site on Chrome on Windows and OSX and Safari.

@qfina qfina changed the title Fresh install on RPi, no graphs Fresh install on Debian, no graphs Aug 27, 2022
@qfina qfina changed the title Fresh install on Debian, no graphs Nothing displayed at all Aug 28, 2022
@vegu
Copy link
Contributor

vegu commented Aug 29, 2022

@qfina This sounds familiar to a bug we recently addressed in 1.5.2 where static files weren't loading correctly (#161) which would be inline with the 404s in the logs you posted.

Is this with vaping updated to the latest release (1.5.2) ?

@qfina
Copy link
Author

qfina commented Aug 29, 2022

Yes I'm running 1.5.2, and werkzeug is at 2.2.2

I tried downgrading wekzeug to 2.1.0 but then I get error:
2022-08-29 15:02:55,174 - vaping.daemon - ERROR: __init__() got an unexpected keyword argument 'unbound_message' vaping.daemon __init__() got an unexpected keyword argument 'unbound_message' daemon.py:215

@vegu
Copy link
Contributor

vegu commented Aug 29, 2022

Weird - vaping 1.5.2 should lock Werkzeug to 2.0.3

I have not seen the unbound_message error before - can you paste the output of running pip freeze please.

@qfina
Copy link
Author

qfina commented Aug 29, 2022

certifi==2020.6.20
chardet==4.0.0
click==8.1.3
confu==1.8.0
docutils==0.19
Flask==2.2.2
graphsrv==2.1.1
httplib2==0.18.1
idna==2.10
importlib-metadata==4.12.0
itsdangerous==2.1.2
Jinja2==3.1.2
lockfile==0.12.2
MarkupSafe==2.1.1
munge==1.2.1
pid==3.0.4
pluginmgr==1.1.0
pycurl==7.43.0.6
PySimpleSOAP==1.16.2
python-apt==2.2.1
python-daemon==2.3.1
python-debian==0.1.39
python-debianbts==3.1.0
PyYAML==5.4.1
reportbug==7.10.3+deb11u1
requests==2.25.1
six==1.16.0
tmpl==1.0.0
tomlkit==0.7.2
urllib3==1.26.5
vaping==1.5.2
vodka==3.2.0
Werkzeug==2.1.0
zipp==3.8.1

Maybe this also helps:

rb@debian:~/vaping$ pip install vaping
Requirement already satisfied: vaping in /usr/local/lib/python3.9/dist-packages (1.5.2)
Requirement already satisfied: munge[tomlkit,yaml]<2.0.0,>=1.2.0 in /usr/local/lib/python3.9/dist-packages (from vaping) (1.2.1)
Requirement already satisfied: pid<4,>=3 in /usr/local/lib/python3.9/dist-packages (from vaping) (3.0.4)
Collecting Werkzeug<2.1.0,>2
  Using cached Werkzeug-2.0.3-py3-none-any.whl (289 kB)
Requirement already satisfied: pluginmgr<2,>=1 in /usr/local/lib/python3.9/dist-packages (from vaping) (1.1.0)
Requirement already satisfied: python-daemon<3,>=2 in /usr/local/lib/python3.9/dist-packages (from vaping) (2.3.1)
Requirement already satisfied: confu<2.0.0,>=1.7.1 in /usr/local/lib/python3.9/dist-packages (from vaping) (1.8.0)
Requirement already satisfied: click>=5.1 in /usr/local/lib/python3.9/dist-packages (from munge[tomlkit,yaml]<2.0.0,>=1.2.0->vaping) (8.1.3)
Requirement already satisfied: requests<3.0,>=2.6 in /usr/lib/python3/dist-packages (from munge[tomlkit,yaml]<2.0.0,>=1.2.0->vaping) (2.25.1)
Requirement already satisfied: PyYAML<6.0,>=5.1 in /usr/local/lib/python3.9/dist-packages (from munge[tomlkit,yaml]<2.0.0,>=1.2.0->vaping) (5.4.1)
Requirement already satisfied: tomlkit<0.8.0,>=0.7.2 in /usr/local/lib/python3.9/dist-packages (from munge[tomlkit,yaml]<2.0.0,>=1.2.0->vaping) (0.7.2)
Requirement already satisfied: docutils in /usr/local/lib/python3.9/dist-packages (from python-daemon<3,>=2->vaping) (0.19)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from python-daemon<3,>=2->vaping) (52.0.0)
Requirement already satisfied: lockfile>=0.10 in /usr/local/lib/python3.9/dist-packages (from python-daemon<3,>=2->vaping) (0.12.2)
Installing collected packages: Werkzeug
  Attempting uninstall: Werkzeug
    Found existing installation: Werkzeug 2.1.0
    Uninstalling Werkzeug-2.1.0:
      Successfully uninstalled Werkzeug-2.1.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
flask 2.2.2 requires Werkzeug>=2.2.2, but you have werkzeug 2.0.3 which is incompatible.
Successfully installed Werkzeug-2.0.3

rb@debian:~/vaping$ pip install -U graphsrv
Requirement already satisfied: graphsrv in /usr/local/lib/python3.9/dist-packages (2.1.1)
Collecting graphsrv
  Using cached graphsrv-2.1.1-py2.py3-none-any.whl (256 kB)
  Using cached graphsrv-2.1.0-py2.py3-none-any.whl (256 kB)
Requirement already satisfied: vodka<4,>=3 in /usr/local/lib/python3.9/dist-packages (from graphsrv) (3.2.0)
Requirement already satisfied: Flask<3,>=2 in /usr/local/lib/python3.9/dist-packages (from graphsrv) (2.2.2)
Requirement already satisfied: Jinja2<4,>=3 in /usr/local/lib/python3.9/dist-packages (from graphsrv) (3.1.2)
Requirement already satisfied: itsdangerous>=2.0 in /usr/local/lib/python3.9/dist-packages (from Flask<3,>=2->graphsrv) (2.1.2)
Requirement already satisfied: importlib-metadata>=3.6.0 in /usr/local/lib/python3.9/dist-packages (from Flask<3,>=2->graphsrv) (4.12.0)
Requirement already satisfied: click>=8.0 in /usr/local/lib/python3.9/dist-packages (from Flask<3,>=2->graphsrv) (8.1.3)
Collecting Werkzeug>=2.2.2
  Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.9/dist-packages (from importlib-metadata>=3.6.0->Flask<3,>=2->graphsrv) (3.8.1)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.9/dist-packages (from Jinja2<4,>=3->graphsrv) (2.1.1)
Requirement already satisfied: pluginmgr<2,>=1 in /usr/local/lib/python3.9/dist-packages (from vodka<4,>=3->graphsrv) (1.1.0)
Requirement already satisfied: munge<2,>=1 in /usr/local/lib/python3.9/dist-packages (from vodka<4,>=3->graphsrv) (1.2.1)
Requirement already satisfied: tmpl<2,>=1 in /usr/local/lib/python3.9/dist-packages (from vodka<4,>=3->graphsrv) (1.0.0)
Requirement already satisfied: requests<3.0,>=2.6 in /usr/lib/python3/dist-packages (from munge<2,>=1->vodka<4,>=3->graphsrv) (2.25.1)
Installing collected packages: Werkzeug
  Attempting uninstall: Werkzeug
    Found existing installation: Werkzeug 2.0.3
    Uninstalling Werkzeug-2.0.3:
      Successfully uninstalled Werkzeug-2.0.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
vaping 1.5.2 requires Werkzeug<2.1.0,>2, but you have werkzeug 2.2.2 which is incompatible.
Successfully installed Werkzeug-2.2.2

Seems probably all related to Werkzeug

@vegu
Copy link
Contributor

vegu commented Aug 31, 2022

While other users seem to have no issues with Werkzeug 2.1.0, when reproducing i actually had to downgrade to 2.0.3 to make it work - have you tried running it with Werkzeug 2.0.3 as well?

I think graphsrv requirements arent as strict as they should be so passing -U there causes Werkzeug to get back to 2.2

One more thing to try, is to just do pip install vaping vodka graphsrv in a fresh python env.

@qfina
Copy link
Author

qfina commented Aug 31, 2022

With 2.0.3 I get the following,

pluginmgr hook.compile(vaping.plugins) __init__.py:23
PidFile <pid.posix.PidFile object at 0x7fa95c475ac0> entering setup base.py:89
PidFile <pid.posix.PidFile object at 0x7fa95c475ac0> create pidfile: /home/rb/vaping/vaping.pid base.py:194
PidFile <pid.posix.PidFile object at 0x7fa95c475ac0> check pidfile: /home/rb/vaping/vaping.pid base.py:181
2022-08-31 16:02:44,735 - vaping.plugins.fping - DEBUG: popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222
vaping.plugins.fping popen fping -u -C10 -p20 -e 8.8.8.8 4.2.2.1 208.67.222.222 __init__.py:128
root 8.8.8.8        : 15.7 13.8 14.5 15.3 17.7 15.3 16.5 14.7 14.3 14.0
 fping.py:104
root 4.2.2.1        : - - - - - - - - - -
 fping.py:104
root 208.67.222.222 : 15.4 14.7 16.5 15.6 15.5 13.9 14.5 14.2 15.0 14.2
 fping.py:104
2022-08-31 16:02:45,057 - vaping.plugins.fping - DEBUG: queue emission to vodka (0)
vaping.plugins.fping queue emission to vodka (0) __init__.py:231
2022-08-31 16:02:47,739 - vaping.plugins.fping - DEBUG: emit to vodka
vaping.plugins.fping emit to vodka __init__.py:228
2022-08-31 16:02:47,833 - vaping.daemon - ERROR: __init__() got an unexpected keyword argument 'unbound_message'
vaping.daemon __init__() got an unexpected keyword argument 'unbound_message' daemon.py:215
PidFile <pid.posix.PidFile object at 0x7fa95c475ac0> closing pidfile: /home/rb/vaping/vaping.pid base.py:220
2022-08-31 16:02:47,836 - vaping.daemon - DEBUG: stopping vodka
vaping.daemon stopping vodka daemon.py:256
2022-08-31 16:02:47,837 - vaping.daemon - DEBUG: stopping latency
vaping.daemon stopping latency daemon.py:256
Traceback (most recent call last):
  File "/usr/local/bin/vaping", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/vaping/cli.py", line 77, in start
    daemon.run()
  File "/usr/local/lib/python3.9/dist-packages/vaping/daemon.py", line 246, in run
    return self._main()
  File "/usr/local/lib/python3.9/dist-packages/vaping/daemon.py", line 212, in _main
    vaping.io.join_plugins(self.joins)
  File "/usr/local/lib/python3.9/dist-packages/vaping/io.py", line 32, in join_plugins
    asyncio_run(run_plugins())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/dist-packages/vaping/io.py", line 30, in run_plugins
    await asyncio.gather(*tasks)
  File "/usr/local/lib/python3.9/dist-packages/vaping/plugins/__init__.py", line 282, in _run
    await self.emit_all()
  File "/usr/local/lib/python3.9/dist-packages/vaping/plugins/__init__.py", line 252, in emit_all
    await self.send_emission()
  File "/usr/local/lib/python3.9/dist-packages/vaping/plugins/__init__.py", line 245, in send_emission
    await emit()
  File "/usr/local/lib/python3.9/dist-packages/vaping/plugins/__init__.py", line 229, in emit
    emitter.emit(msg)
  File "/usr/local/lib/python3.9/dist-packages/vaping/plugins/vodka.py", line 116, in emit
    self.start()
  File "/usr/local/lib/python3.9/dist-packages/vaping/plugins/vodka.py", line 104, in start
    vodka.run(vodka_config, self.vaping.config)
  File "/usr/local/lib/python3.9/dist-packages/vodka/__init__.py", line 144, in run
    start(**init(config, rawConfig))
  File "/usr/local/lib/python3.9/dist-packages/vodka/__init__.py", line 36, in init
    load_all(cfg)
  File "/usr/local/lib/python3.9/dist-packages/vodka/app.py", line 83, in load_all
    load(name, app_cfg)
  File "/usr/local/lib/python3.9/dist-packages/vodka/app.py", line 55, in load
    mod = importlib.import_module(cfg.get("module"))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/local/lib/python3.9/dist-packages/graphsrv/application.py", line 21, in <module>
    from flask import request, send_file
  File "/usr/local/lib/python3.9/dist-packages/flask/__init__.py", line 4, in <module>
    from . import json as json
  File "/usr/local/lib/python3.9/dist-packages/flask/json/__init__.py", line 8, in <module>
    from ..globals import current_app
  File "/usr/local/lib/python3.9/dist-packages/flask/globals.py", line 56, in <module>
    app_ctx: "AppContext" = LocalProxy(  # type: ignore[assignment]
TypeError: __init__() got an unexpected keyword argument 'unbound_message'
PidFile <pid.posix.PidFile object at 0x7fa95c475ac0> closing pidfile: /home/rb/vaping/vaping.pid base.py:220

I'll try the fresh python env later on and report back, thanks!

@qfina
Copy link
Author

qfina commented Sep 1, 2022

Fresh install of Debian environment, unfortunately still doesn't work by using pip install vaping vodka graphsrv

pip freeze shows:

rb@debian:~/vaping$ pip freeze
certifi==2020.6.20
chardet==4.0.0
click==8.1.3
confu==1.8.0
docutils==0.19
Flask==2.2.2
graphsrv==2.1.1
httplib2==0.18.1
idna==2.10
importlib-metadata==4.12.0
itsdangerous==2.1.2
Jinja2==3.1.2
lockfile==0.12.2
MarkupSafe==2.1.1
munge==1.2.1
pid==3.0.4
pluginmgr==1.1.0
pycurl==7.43.0.6
PySimpleSOAP==1.16.2
python-apt==2.2.1
python-daemon==2.3.1
python-debian==0.1.39
python-debianbts==3.1.0
PyYAML==5.4.1
reportbug==7.10.3+deb11u1
requests==2.25.1
six==1.16.0
tmpl==1.0.0
tomlkit==0.7.2
urllib3==1.26.5
vaping==1.5.0
vodka==3.2.0
Werkzeug==2.2.2
zipp==3.8.1

@qfina
Copy link
Author

qfina commented Sep 1, 2022

Downgrading werkzeug to 2.0.3 again gives me same error seen in comment previous

@vegu
Copy link
Contributor

vegu commented Sep 2, 2022

Able to reproduce - will update once i know more

@vegu
Copy link
Contributor

vegu commented Sep 2, 2022

Both flask and wekzeug introduce compatibility problems with their latest versions. I've now pinned both and that fixed the issue for me.

Werkzeug==2.0.3
Flask >2,<2.2

I've released a patch with vaping 1.5.3 - please try installing that and reopen the ticket if that does not address the issue for you.

@qfina
Copy link
Author

qfina commented Sep 4, 2022

Works perfectly thanks @vegu !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants