Deluge Web client "Connection to the other side was lost in a non-clean fashion" error
Posted: Sun Oct 14, 2018 3:37 pm
When I try to download torrents from certain servers, i get a "Connection to the other side was lost in a non-clean fashion" error.
I've only noticed this for a specific private tracker (RevTT) so far.
Currently running Deluge 1.3.15.
Here's the log:
I thought it could be something related to SSL ciphers but the host supports quite few of them so that shouldn't be the issue.
Can't really figure out what could be the problem. Is there anyway of debugging this better?
I tried to simulate the download file code behaviour on a python script:
But it seems to connect just fine:
Any suggestions on this issue?
Thanks.
I've only noticed this for a specific private tracker (RevTT) so far.
Currently running Deluge 1.3.15.
Here's the log:
Code: Select all
[DEBUG ] 17:17:00 auth:199 Received a password via the 1.2 auth method
[INFO ] 17:17:00 auth:327 Login success (ClientIP XX.XX.XX.XX)
[DEBUG ] 17:17:00 auth:146 Creating session for admin
[DEBUG ] 17:17:00 json_api:270 json-request: {"method":"core.get_config","params":[],"id":1}
[DEBUG ] 17:17:00 json_api:270 json-request: {"method":"web.download_torrent_from_url","params":["https://revolutiontt.me/download.php/8aw8mSr139A/Torrent.Name.Here.torrent?passkey=xxxxxxxxx","applied=3417; uuid=xxxxxxx; u
id=xxxxxxxx"],"id":2}
[DEBUG ] 17:17:00 json_api:684 filename: /tmp/delugeweb-7jo3sc/Torrent.Name.Here.torrent?passkey=xxxxxxxxx
[DEBUG ] 17:17:00 json_api:688 cookie: applied=3417; uuid=xxxxxxx; uid=xxxxxxx
[ERROR ] 17:17:02 json_api:678 Error occurred downloading torrent from https://revolutiontt.me/download.php/8aw8mSr139A/Torrent.Name.Here.torrent?passkey=xxxxxxx
[ERROR ] 17:17:02 json_api:679 Reason: Connection to the other side was lost in a non-clean fashion: Connection lost.
Can't really figure out what could be the problem. Is there anyway of debugging this better?
I tried to simulate the download file code behaviour on a python script:
Code: Select all
from twisted.web import client, http
from twisted.internet import ssl
from twisted.internet._sslverify import ClientTLSOptions
from twisted.internet import reactor
url="https://revolutiontt.me/download.php/8aw8mSr139A/Torrent.Name.Here.torrent?passkey=xxxxxxxxx"
filename="/tmp/Torrent.Name.Here.torrent"
headers = []
agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0"
factory=client.HTTPDownloader(url, filename, headers=headers, agent=agent)
host="revolutiontt.me"
port = 443
from twisted.internet import ssl
from twisted.internet._sslverify import ClientTLSOptions
class TLSSNIContextFactory(ssl.ClientContextFactory):
"""
A custom context factory to add a server name for TLS connections.
"""
def getContext(self, hostname=None, port=None):
print "Hostname:",hostname,"Port:",port
ctx = ssl.ClientContextFactory.getContext(self)
ClientTLSOptions(hostname, ctx)
return ctx
ctx_factory = TLSSNIContextFactory()
reactor.connectSSL(host,port,factory,ssl.ClientContextFactory())
Code: Select all
>>> reactor.connectSSL(host,port,factory,ssl.ClientContextFactory())
<twisted.internet.tcp.Connector instance at 0x7f5e1d0671b8>
Thanks.