unable to send data over the ssh channel

Hello,

after syncing a few files acrosync always stops with "unable to send data over the ssh channel"
I use the newest Version between MacOS Mojave und Ubuntu 18.04.

Any ideas ?

Best regards

Stefan

Comments

  • edited August 2019

    There are no problems with normal rsync, but Acrosync seems to be "to slow" (LIBSSH2_ERROR_SOCKET_SEND)

    Perhaps this could be the solution (?):

    https://www.cyberciti.biz/tips/open-ssh-server-connection-drops-out-after-few-or-n-minutes-of-inactivity.html

    Server sided in /etc/ssh/sshd_config:

    ClientAliveInterval 30
    ClientAliveCountMax 5

    Client sided in /etc/ssh/ssh_config:

    ServerAliveInterval 15
    ServerAliveCountMax 3  

  • The changes in SSH configuration didn't help
  • edited August 2019
    /var/log/auth.log:

    pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=....  user=...

    But the authentication is ok, a few will be synced before 'unable to send data over the ssh channel'
  • Do you see any relevant errors in /var/log/system.log?  Try restarting the server, or rate limiting the upload.
  • In /var/log/system.log are no errors, only in /var/log/auth.log. Restarting the server and rate limiting didn't help. 
  • I am new to Acrosync, using it on a Mac

    It works great - very fast. I am using it for transfer of  panorama tours created with pano2vr. It typically has thousands of very small files with a total between 100MB to larger formats with more tours like 1GB or 2 GB. Upload works with full speed of my bandwidth (which is 40 Mbit/s, the transfer is around 4MByte/s.)

    I have one problem as a beginner I can not solve:
    When I try to upload a larger collection of folders (like 30 folders with many folders inside and finally the files) to the host, I get an error message like this. Breaking it in smaller quantities, it works as planned.

    Is there a limit of number of files or folders I can upload in one action?

    Herwig

    BTW: does it work on MacOS Catalina?
  • edited January 2020
    Acrosync is not usable for me, because of the error described above. Unfortunately I have no solution for that problem.
  • Maybe it took too long to list the directory and in the meantime the server closed the connection?
  • I'm having the same problem, and only with file transfers that have a large number of small files. The behaviour is pretty inconsistent, but once it does fail for a particular file set, fails in the same way consistently.

    Here's a sample from the end of the file log:

    DEBUG 02/02/20 15:46:13 RSYNC_INFO INFO: send_files(4, /home/codewerks/project/tictactoe/package-lock.json) 

    DEBUG 02/02/20 15:46:13 RSYNC_INFO INFO: count=0 n=0 rem=0 

    DEBUG 02/02/20 15:46:13 RSYNC_INFO INFO: send_files mapped /home/codewerks/project/tictactoe/package-lock.json of size 581445 

    DEBUG 02/02/20 15:46:13 RSYNC_INFO INFO: calling match_sums /home/codewerks/project/tictactoe/package-lock.json 

    FATAL 02/02/20 15:46:13 SSH_SOCK Unable to send data over the SSH channel


    The file "package-lock.json" is never transferred. 


    I've checked the logs on the remote SSH server and I do see an error around the time this happens: "Read error from remote host <ipaddress:port>: Connection reset by peer"


    The specified host in this message is a reverse proxy server that sits between my client and the server.


    I've updated my local copy of Acrosync to use libssh2 1.9.0 -- the latest, but the problem remains. Anything else I can try?

  • Here's a followup.

    In an effort to find the cause of this problem throughout the chain of servers between my iOS app and the server I'm trying to sync to, I tried to run the same command on my Mac using the native rsync client. This was the command I got working:

    rsync -avv -e "ssh -C -p 34782 -i ../private.key" -vvvv --out-format=%n --links --recursive <user>@<domain>:/path/to/folder/. .

    I'm choosing to use Acrosync over SSH, and as you can see here I'm doing the rsync version of that. I'm wondering if I can replicate this in Acrosync? I can see in `rsync_client.cpp` where the rsync command is built up. But I don't see how to provide the options for the SSH part of the command.

    At any rate, I'll keep looking, but this exercise resolved one important question: it seems Acrosync's implementation of rsync is the culprit in this problem. Hope you can offer some advice!
  • @aaronvegh so in your case Acrosync connects to a proxy server?  Can you check the log on the proxy server to see if the connection was closed?
  • @gchen I was certain to check that, and I should've mentioned it. The proxy server logs do not show the connection closing abnormally. It's simply passing the packets through.
  • I wonder if this is a keepalive issue -- if the indexing of files takes too long the connection may be closed due to the keepalive value is too small.  Maybe increasing the keepalive timeout in the sshd_config may help?

    What kind of reverse proxy server are you running?  I can try to use the same setup to reproduce it.
  • Hey there,
    I just tried changing the keep alive settings on the server side:

    ClientAliveInterval 300
    ClientAliveCountMax 2

    It didn't make any difference.

    The proxy server is an instance of nginx that's acting as a reverse proxy to forward the stream from my client (running on an iPad) to the server in question. A typical configuration looks like this:

    upstream testy.codewerks.app { server 10.16.200.105:41848; } 
    server { listen 41848; proxy_pass testy.codewerks.app; }

    and of course, the SSH server is configured to listen on the indicated port.

    Hope this helps.

    A.
  • Changing keep alive settings doesn't work. See above.

    Stefan
  • @st6f9n do you also have a proxy server running between Acrosync and the server?
  • We have no proxy server running, but there is a firewall (pfsense) between Acrosync and the server.
    Similar to aaronvegh, native Macos rsync is running without problems.

  • We still have the same problem, now with MacOs BigSur: After syncing a few files acrosync always stops with "unable to send data over the ssh channel". Native Macos rsync is running without problems. Hmm, this problem should be solvable.
  • edited March 2021
    I've tried ~/.ssh/ssh_config:
    ServerAliveInterval 15
    ServerAliveCountMax 3

    Does Acrosync use ~/.ssh/ssh_config ?
  • edited March 2021
    I see, ssh and rsync are built-in in Acrosync. That is the biggest problem here, paired with lacking updates.
  • edited March 2021
    Ok, perhaps my criticism is not entirely justified, but again: Native Macos rsync is running without problems.

  • Are you connecting via ssh with native sync too?
  • Yes, of course
  • Can you first make sure that the disk on the server isn't full?  You can get that error if the disk is out of space.

    If it is not a full disk issue, can you debug the ssh connection by running sshd on the server this way:

    sudo /usr/sbin/sshd -ddd -p 222


    You'll need to change the port number in Acrosync to 222.
Sign In or Register to comment.