0

We are transferring files from local (Windows) to a remote system (Unix). On several setups we are getting Error Code #13. The man page says that it is Errors with program diagnostics.

On our systems, we know that one possible cause is directory permissions on the remote server and the other is that port 873 is not open.

Is there a distinct way to determine which is the cause of the error? Is it possible to check for the port, first, return an error if encountered, and then begin the transfer?

I would think that rsync would have more granular error codes, especially when it comes to the actual connection.

0

You can differentiate by asking rsync for a directory listing of the remote system.

  1. Server responding correctly within two seconds

    $ rsync --contimeout=2 remoteserver::
    SHARE1          We store stuff here
    SHARE2          we store other stuff here
    $ echo $?
    0
    
  2. Server not running an rsync daemon

    $ rsync --contimeout=2 remoteserver::
    rsync: failed to connect to remoteserver (10.10.10.10): Connection refused (111)
    rsync error: error in socket IO (code 10) at clientserver.c(125) [Receiver=3.1.2]
    $ echo $?
    10
    
  3. Server not responding within two seconds

    $ rsync --contimeout=2 remoteserver::
    rsync error: timeout waiting for daemon connection (code 35) at socket.c(281) [Receiver=3.1.2]
    $ echo $?
    35
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.