Rsync Issue Solaris8
When performing a simple rsync between servers I was getting the following error: root:#> rsync -e ssh -va /export/home/a078479/bob smmk39:/export/home/a078479/ ksh: rsync: not found rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(189) root:#> I was thorghrough in setting up rsync to be used between servers and was still getting errors , I did the following to Setup Rsync. Added each host into the /etc/hosts file. Added each users ssh keys from each node to their ./.ssh/authorized_keys so I dont have to use password files or anything of the sort. Added rsync Port Alias to /etc/services: echo "rsync 873/tcp" >> /etc/services Added rsync Daemon to /etc/inetd.conf: echo "rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon" >> /etc/inetd.conf Recycle (HUP) inetd daemon: for i in `ps -ef |grep inetd | grep -v grep | awk '{print $2}' do kill -HUP $i done And still got the error as indicated below. So I tried to do some debugging with the syntax below. root:#> rsync -e 'ssh -vv -x' -ra /export/home/a078479/bob smmk39:/export/home/a078479/ OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f debug1: Reading configuration data /fisc/openssh/etc/ssh_config debug1: Applying options for * debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: ssh_connect: needpriv 0 debug1: Connecting to smmk39 [172.25.108.30] port 22. debug1: Connection established. debug1: identity file /export/home/a078479/.ssh/identity type 0 debug2: key_type_from_name: unknown key type '-----BEGIN' debug2: key_type_from_name: unknown key type '-----END' debug1: identity file /export/home/a078479/.ssh/id_rsa type 1 debug1: identity file /export/home/a078479/.ssh/id_dsa type -1 debug1: Remote protocol version 1.99, remote software version OpenSSH_3.4p1 debug1: match: OpenSSH_3.4p1 pat OpenSSH* debug1: Local version string SSH-1.5-OpenSSH_3.4p1 debug1: Waiting for server public key. debug1: Received server public key (1152 bits) and host key (1024 bits). debug1: Host 'smmk39' is known and matches the RSA1 host key. debug1: Found key in /export/home/a078479/.ssh/known_hosts:1 debug1: Encryption type: 3des debug1: Sent encrypted session key. debug1: cipher_init: set keylen (16 -> 32) debug1: cipher_init: set keylen (16 -> 32) debug1: Installing crc compensation attack detector. debug1: Received encrypted confirmation. debug1: Trying RSA authentication with key '/export/home/a078479/.ssh/identity' debug1: Received RSA challenge from server. debug1: Sending response to host key RSA challenge. debug1: Remote: RSA authentication accepted. debug1: RSA authentication accepted by server. debug1: Sending command: rsync --server -logDtpr . /export/home/a078479/ debug1: Entering interactive session. debug1: fd 0 setting O_NONBLOCK debug2: fd 1 is O_NONBLOCK ksh: rsync: not found debug2: fd 0 is not O_NONBLOCK debug1: fd 1 clearing O_NONBLOCK debug1: Transferred: stdin 4, stdout 0, stderr 23 bytes in 0.1 seconds debug1: Bytes per second: stdin 34.4, stdout 0.0, stderr 197.7 debug1: Exit status 127 rsync: connection unexpectedly closed (0 bytes read so far) rsync error: error in rsync protocol data stream (code 12) at io.c(189) Here I found out that after secure shelling over to the remote system the rsync command was not being found!! As the user I did a which and found out that rsync was in the /usr/local/bin/rsync so I decided to link rsync to a system binary directory. sdal19:/# ln -s /usr/local/bin/rsync /usr/bin/rsync sdal19:/# which rsync /usr/bin/rsync root:#> rsync -e ssh -va /export/home/a078479/bob smmk39:/export/home/a078479/ building file list ... done bob/ bob/test wrote 129 bytes read 40 bytes 112.67 bytes/sec total size is 0 speedup is 0.00 Success!! Looks like the system or user profile was not setting set when ssh logs in and this simple change will fix it in my case. Bobby Gunn
-- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html