-
Notifications
You must be signed in to change notification settings - Fork 10
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
Error traces in Deluge 2.1.1 #22
Comments
Those errors are likely because it's probing for deluge version and unrelated to any errors. Nothing in that log says that there's a problem with the deluge-client library (although that does not mean there isn't) |
@JohnDoee Thank you for your work on deluge-client library. To me it looks like your deluge-client is using some legacy RPC calls. Somehow it works fine but I don't know how to disable those warnings in Deluge. Maybe you should consider to update your client library to make it compatible with Deluge 2.1 (latest stable release) and drop support for Python2 (if you want to). There are only 2 Prometheus exporters for deluge and both of them use your library (and have this issue). There is not Prometheus exporter using the Web/HTTP API. Other Prometheus exporter => https://github.com/LeiShi1313/downloader-exporter |
I've added Deluge 2.1.1 from PPA on Ubuntu 22.04 tests to libtc, which also uses deluge-client, and it passes everything. The tests ran successfully here https://github.com/JohnDoee/libtc/actions/runs/3076393158/jobs/4970516999
|
@JohnDoee @gazpachoking As you guess, the warnings are caused by the version probe. In concrete, the lines 122 and 123. Since Deluge 2.1.1 is the latest version and all users will update eventually, you should consider improving that code to not hit the warnings. For example: # test the latest version first 2.1
try:
self._send_call(2, 1, 'daemon.info')
# set small socket timeout here
result = self._socket.recv(1)
if ord(result[:1]) == 1:
self.deluge_version = 2
self.deluge_protocol_version = 1
# If we need the specific version of deluge 2, this is it.
daemon_version = self._receive_response(2, 1, partial_data=result)
return
catch:
pass
# test 2.0
# test 1.x |
This doesn't look like it would work as-is. The current version detection code in deluge-client appears to depend on the fact that deluge only replies to requests using the correct version, which means a reply is only guaranteed to exist after all 3 That means the suggested code would hang (block in If you (as the "set small socket timeout" comment suggests) attempt to solve that using a sleep plus a non-blocking read (by passing the If possible at all (at a reasonable cost), this would have to be addressed in deluge-client (not deluge_exporter), so I'm closing this issue. |
The only user of this fork is deluge_exporter, which has already dropped support for Deluge 1. Users that were running pre-releases of Deluge 2 will most likely have upgraded to 2.0.0 or later at this point. This fixes: JohnDoee#40 tobbez/deluge_exporter#22 There's also a ticked filed against Deluge for adding a proper way to determine a daemon's protocol version, which (if implemented) would make it easier to support multiple protocol versions in the future: https://dev.deluge-torrent.org/ticket/3609
Deluge exporter: 2.4.0
Deluge exporter is working fine and it's exposing the metrics as usual. There are no traces in Deluge exporter. The traces in Deluge only happen in version > 2.0
Traces in Deluge 2.1.1 every 30 seconds:
The text was updated successfully, but these errors were encountered: