Open drwtsn32x opened 5 years ago
Instead of using the self-contained version, I installed Python3 and the other requirements. I can now run the python script.
However, like the previous version it just doesn't seem to work on Synology. I can do the login and logout fine, but if I try to do a 'status' or 'list backups' it just hangs forever.
Any suggestions on how to troubleshoot this?
After letting it sit for several minutes, I hit CTRL+C and get this:
bash-4.3# ./duplicati_client.py login
Login successful
bash-4.3# ./duplicati_client.py status
^CTraceback (most recent call last):
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 377, in _make_request
httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./duplicati_client.py", line 1262, in <module>
main(**vars(args))
File "./duplicati_client.py", line 78, in main
display_status(data)
File "./duplicati_client.py", line 1022, in display_status
server_activity, backup_id = fetch_progress_state(data)
File "./duplicati_client.py", line 487, in fetch_progress_state
r = requests.get(baseurl, headers=headers, cookies=cookies, verify=verify)
File "/volume1/_Duplicati/duplicati_client_0.4.9_general/requests_wrapper.py", line 28, in get
verify=verify)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/http/client.py", line 1174, in getresponse
response.begin()
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/http/client.py", line 282, in begin
version, status, reason = self._read_status()
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/http/client.py", line 243, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
KeyboardInterrupt
It looks like it's an issue with the underlying libc differences between my build system and Synology DSM. I think the best I can do here is compile an additional binary against a DSM-equivalent libc.
As for the hangs, I hadn't added any timeout limits... I've just pushed an update to the master to address that requests should timeout.
Of course that doesn't answer what is wrong. Is the Duplicati server behind a proxy? Are you able to reach the web interface in the browser? And perhaps reach it with curl
from the synology?
Duplicati itself is running on the same Synology, so there's definitely not anything like a proxy involved. Web interface works just fine either from the NAS itself or from another machine on my LAN. (I have enabled remote access on Duplicati running on the NAS.)
And yep curl works as expected and returns a web page.
I have a Windows machine on my LAN that also runs Duplicati and duplicati-client. It works just fine there. I decided to try testing duplicati-client on the Windows PC to talk to the NAS Duplicati and it has the exact same problem (hangs forever). It seems the Duplicati web server on the NAS is not responding in a way that duplicati-client likes. Strange.
Has anyone gotten duplicati-client working against Duplicati running on Synology?
I don't have access to one, so I haven't been able to test.
What's odd is that the timeout happens within the python requests module, which is usually very stable. I'd expect it to at least get a response against any server reachable by curl.
I created a new release with various changes including adding the timeout limit. None of the changes directly address the connection issue you get when running from source, so we'll likely still run into that issue.
However, the new Linux binary is compiled on a Debian 8 system which runs GNU libc 2.19, so it should run on Synology (addressing part 1 of the issue).
Thanks! Tried the new release and the self-contained binary works again on my Synology. As you identified the other issue still is not resolved. The new version does give a "timed out" response though:
bash-4.3# ./duplicati_client login
Connecting to http://localhost:8200...
OK
Code: 200
Login successful
bash-4.3# ./duplicati_client list backups
Fetching backups list from API...
The request timed out. Is the server running?
bash-4.3# ./duplicati_client logout
Logging out...
bash-4.3#
Ok, super. I'll keep compiling on this GNU libc. And at least the timeout makes it easier to see the issue.
Interestingly this problem has gone away since I changed how Duplicati starts on my NAS. Instead of starting it using the package manager, I now start it via the task scheduler (triggered on bootup).
I am not really sure what is different from the Duplicati-client point of view. Just thought I'd post an update ..
FYI, @drwtsn32x, the new 0.5.2 release binary might not work on Synology.
I tried building it as usual, but I've started running into issues on Debian 8:
I've built the binary on Debian 9, but IIRC that was a newer GNU libc version, so if nothing changed on Synology it's likely no bueno.
The old binary on release 0.4.25 still works and this new release is just UTF-8 compatibility, so there's no urgency to upgrade, but there might eventually be an issue where Synology users will want to upgrade but can't.
Thought I'd test the latest beta to see if it works better with my Synology NAS. The previous beta would just "hang" for most operations.
The new one doesn't run at all. I get the following error:
Looks like Synology is at version 2.20? (And this is with the most recent version of Synology DSM software):
Any suggestions?