Closed imavo closed 2 years ago
I am also facing the same issue. I am running it in the local Docker App in Windows. Is there any workaround or solution available?
We are able to fix this by taking dependencies version (from docker hub image) using "pip freeze" and incorporating it in custom docker file @albertodonato
Confirmed this behavior on debian stretch using python 3.7.
With the latest SQLAlchemy==1.4.27
the query exporter is not serving any http at all. I had to downgrade it to SQLAlchemy==1.3.24
. However, using only that version the metric endpoint only shows the metric descriptions but not any data. I also had to downgrade another package to aiohttp==3.7.4.post0
. After that everything was working fine again. So please consider updating the query exporter code to run with the latest pip packages.
2nd confirmation, the issue is with recent releases of aiohttp and async-timeout. Downgrading aiohttp to 3.7.4.post0 as suggested above works.
Same for me, I downgraded the package aiohttp
to aiohttp==3.7.4.post0
as suggested above and it works : pip install aiohttp==3.7.4.post0
. the database is sometimes accessible only with ssh
, please, think of using the ssh forwarding
so you can test on your local environment.
This should be now fixed in master
@albertodonato Still broken with SQLAlchemy-1.4.27. Exporter runs but http endpoint is down. Runs fine with 1.3.24.
@jzielke84 that is expected, SQLAlchemy 1.4 is not backwards compatible with 1.3. How did you get it installed? From https://github.com/albertodonato/query-exporter/blob/master/setup.cfg#L35 it should not get installed by default.
@albertodonato It is provided when I upgrade all installed pip packages in python3.7 to the latest version. I always keep my packages updated. Perhaps this exporter should be patched to run without outdated packages.
If you pip install query-exporter
in a clean virtualenv you should get 2.7.1 installed with sqlalchemy 1.3
Right, but that's not my point here. I could do a virtualenv for everything but sooner or later a new SQL-DB Version might break the compatibility with the older sqlalchemy version and then I'm stuck. Hence I suggested you try to update to the latest version of that library.
The reason of the currently pin to SQLAlchemy < 1.4
is that sqlalchemy_aio (which is used by query-exporter) doesn't support 1.4 (and also doesn't work on python3.10).
I have a branch (sqlalchemy-async-wrapper
) on this repo which reimplements some parts of that library and supports SQLAlchemy 1.4.
It's work in progress, but feel free to try it and report issues.
Once I get test passing and a bit more testing I'll merge it to main
I am trying out query-exporter (first time user) on ubuntu 20.04 x64 , with python 3.8.10 in a virtualenv.
I installed query-exporter with pip 21.3.1 (pip install query-exporter).
python ibm_db (3.1.0) works fine in this environment to connect to the database and run queries.
SQLAlchemy with ibm_db_sa (0.3.7) works on this environment to connect to the database and run queries.
The database is local.
I configured a config.yaml (see below) to connect to Db2-LUW , using the same working dsn string that works for plain SQLAlchemy connections in python scripts.
But when I run
query-exporter -L DEBUG config.yaml
, it shows two lines of output and then appears to hang indefinitely without further messages. And I see no queries running in my database. So my configuration is invalid somehow, I'm missing some config/setup detail. I was expecting to see a lot more output on the console to help me see what is happening under the covers.Output:
If I press Control-C , it shows (before stopping):
The
pip freeze
shows the following:My
config.yaml
(redacted) is:Additional information: if I use the docker adonato/query-exporter:latest (on a different hostname, with the same config.yaml file), and supply the "-LDEBUG" as an argument to the
docuer run ...
line then I successfully get the query running. So it appears that on my first environment, there is something missing or misconfigured. Advice needed.