not syncing: no error message, missing storage rights, missing openssh key import, doesn't delete. Tutorial for end-users.
Hi, syncopoli is not syncing anything, and more importantly, there are no or no user-friendly error messages. I got it to work (steps below), and the following sub-bugs appear:
- Syncopoli doesn't ask for sdcard rights
- It doesn't warn that rsync has never synced
- It doesn't warn about sync errors (possibly except server down, didn't test that).
- It doesn't import openssh keys automatically. That is important because openssh is the default on most or all linux distributions.
- It doesn't delete deleted files, despite that is what newbies are used to from dropbox. At least, Syncopoli should point out this potential pitfall.
- Wishlist: easy way to configure lots of source directories in one go. Many Android apps want to write to their own little directories scattered all over /sdcard, and I would like to sync them all as a directory tree. See http://stackoverflow.com/questions/1813907/rsync-delete-files-from-list-dest-does-not-delete-unwanted-files.
This bug report is also a step-by-step tutorial for Ubuntu end users how to get it to work: Do steps (1), (2), (3), (6), (8), (9), (11).
What I did: (1) Install syncopoli v0.2 from Fdroid on a Leagoo M5 phone running Android 6.0 with neither root nor adb access. (2) Configure settings as follows: Server address 192.168.0.1 protocol ssh port 22 user: newdedicateduser additional options: no changes from default private key: /storage/emulated/0/path/to/key/id_rsa, copied directly from id_rsa generated by OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f 6 Jan 2014 Rsync password: (empty) frequency: 1 hour wifi only: yes (3) created local-to-remote profile: origin: /sdcard/myfolder destination: /home/newdedicateduser/ (unsynced files are there.) (4) confirmed with vxconnectbot (ssh client available from fdroid) on the same android device that the credentials are ok (and that everything works server-side). (5) pressed "run all sync tasks" on the device, monitored /var/log/syslog on the Ubuntu server.
Expected: Files sync, or at least an easy-to-understand error message. Result: No files are synced. No error messages client-side. Nothing shows up in the server auth logs, i.e. syncopoli did not attempt a connection. Client-side, tapping the connection brings up a log file with only this one line: Fri Jan 06 23:53:52 GMT+01:00 2017
(6) after reading gitlab issues, granted sdcard file rights via settings -> device -> apps -> syncopoli -> rights. Force-closed and restarted app. Ran all sync tasks again. Expected: file sync or usable error message. Result: still no sync. Server-side, nothing shows up in /var/log/auth.log. Client-side, still only that one line in the logs.
(7) rebooted phone, ran sync tasks again. Result: still no sync. Nothing in the server logs. Client-side logs: Sat Jan 07 00:04:18 GMT+01:00 2017
Error text:
/data/user/0/org.amoradi.syncopoli/files/ssh: Exited: String too long rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
/data/user/0/org.amoradi.syncopoli/files/ssh: Exited: String too long rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.2]
(8) read https://gitlab.com/fengshaun/syncopoli, googled for dropbearconvert. Ran server-side: sudo apt-get install dropbear dropbearconvert #no such file
(9) Googled even more, found https://bugs.launchpad.net/ubuntu/+source/dropbear/+bug/1009868, ran server-side, transferred result to device and configured filepath as private key: /usr/lib/dropbear/dropbearconvert openssh dropbear .ssh/id_rsa .ssh/dropbear_rsa sudo apt-get remove dropbear
syncopoli settings: private key: /storage/emulated/0/path/to/key/dropbear_rsa,
(10) ran "running all sync tasks" client-side. Finally, the test files sync properly except deleted files.
(11) configured Syncopoli settings: Additional options: -vHrlt --no-perms --delete