Rsync Connection Refused

here’s the error i’m getting:

rsync: failed to connect to 200.200.200.200: Connection refused (111)
rsync error: error in socket IO(code 10) at /home/lapo/packaging/rsync-3.0.7-1/src/rsync/-3.0.7/clientserver.c(122) [Receiver=3.0.7]

Now it worked yesterday (using rsync to do remote backups) but not today…

i do a “rsync rsync://200.200.200.200” and i get the same error. looks like the daemon is not running? would there be a way to find out if it was running and/or how do i make rsyncd start automatically?

when i ssh into the drobo, the command “rsync” doesn’t work but if i do “/mnt/DroboFS/Shares/DroboApps/rsync/rsync” it works. just fyi i guess.

Thanks in advance![hr]
Just wanted to add…

“# /mnt/DroboFS/Shares/DroboApps/rsync/rsync --daemon”

produces this --> “Failed to parse config file: /etc/rsyncd.conf”

rsyncd.conf:

uid = root
gid = root
pid file = /mnt/DroboFS/Shares/DroboApps/rsync/rsyncd.pid

[drobofs]
path = /mnt/DroboFS/Shares
comment = DroboFS Share
read only = false

For anyone that may come across this problem, I SSHed into drobofs made a backup of the pid file, deleted the original and ran rsync again. That fixed it!

I had this errror after a lockup, where I had to manual re-install 1.05.

I removed the rsync.pid file and ran the --daemon command. With no luck.

I uninstalled rsync, deleted rsync from droboapps directory, rebooted, installed rysnc, rebooted.

Still same issue - any thing else I could try to get rsync working???

I’ve written some documentation on this. Hope this helps.

If you are getting the “connection refused” error follow the directions below:
-type these into the terminal window on your mac: ssh root@10.10.10.10 (ssh is the protocol, root is the username, 10.10.10.10 is the ip for the drobo or the router if you’re forwarding ports)
-type in password for username root = password
-cd DroboFS/Shares/DroboApps/rsync
-rm rsync.pid
-use drobo dashboard to reboot drobo
-upon reboot, the .pid file (session file) will be recreated
-try rsync again

If you are getting the error that the software had closed the connection,
-type these into the terminal window on your mac: ssh root@10.10.10.10 (ssh is the protocol, root is the username, 10.10.10.10 is the ip for the drobo or the router if you’re forwarding ports)
-type in password for username root = password
-cd DroboFS/Shares/DroboApps/rsync
-vi rsyncd.conf
-you should get something like this. the important piece is “read only = false”
uid = root
gid = root
pid file = /mnt/DroboFS/Shares/DroboApps/rsync/rsyncd.pid

[drobofs]
path = /mnt/DroboFS/Shares
comment = DroboFS Share
read only = false

-to get out of vi, type :wq
-i’m not too familiar with vi so i “mv rsyncd.conf rsyncdconf.txt” then ftp to drobo and edited rsyncdconf.txt to add the last line. Then do another “mv rsyncdconf.txt rsyncd.conf”. If you vi rsyncd.conf, it should contain the “read only” line. I left the .txt file there just in case i get the error msg again.
-Then try rsync again and see if it works.

I usually get these two problems when i reboot drobofs through the switch on the back.

My rsync batch file looks like this (before, I had problems with the timeout and ppk):
@ECHO OFF
SET SECHAW_IDENTITY=“C:\Documents and Settings\username\priv.ppk”
SET SECHAW_TYPE=ssh
SET SECHAW_LOCALPORT=9119
SET SECHAW_SERVER=10.10.10.10
SET SECHAW_SERVERPORT=873
SET SECHAW_USER=SvcwRsync
SET SECHAW_CMD=“C:\Program Files\cwRsync\bin\rsync.exe” -avz --delete --timeout 600 /cygdrive/x/Users/ rsync://10.10.10.10/drobofs/Users/folder
SET SECHAW_TUNNEL=ssh -i “C:\Documents and Settings\username\priv.ppk” -L 9119:127.0.0.1:873 root@10.10.10.10 -T -N
“C:\Program Files\cwRsync\bin\sechaw.exe” --verbose

I found that this all happened when I rebooted with the switch in the back.

It helped when I added the line “read only = false” to rsync.conf

I did not have to reboot the drobo after I changed it if I did this in ssh.

#cd /mnt/DroboFS/Shares/DroboApps/rsync
#service.sh restart

If it indicated it was not started, then I could use:

service.sh start

NOTE: this even worked when I deleted my rsyncd.pid and upon a restart of the service, the rsyncd.pid was recreated.

Thanks for your help, famousfms!!

Yeah, I just diagnosed he same bug here… the pid file should be removed when the server shuts down. Looks like that’s not happening correctly. In my case I shut the droboFS down via shutdown button on the control panel, so it should have been a clean controlled shutdown. (unlike a pinhole reset or pulling power or using the power switch to shutdown typically is.)

I read another developer mention that his service stop script is not being called on shutdown… that would explain what I’m seeing. A quick and dirty solution that will allow rsync to come up properly on bootup is to add this line to the DroboApps/rsync/service.sh script, right above the line that starts the daemon. (There are some special characters in there, be sure to copy/paste if you’re not a unix head.)

    if test -e $pidfile && test ! -d /proc/`cat $pidfile` ; then rm $pidfile ; echo "removed stale pid file" >> $logfile ; fi

So the newly edited start function looks like this:

start()
{
    if test -e $pidfile && test ! -d /proc/`cat $pidfile` ; then rm $pidfile ; echo "removed stale pid file" >> $logfile ; fi
	${prog_dir}/rsync --daemon --config=${configfile} --log-file=${logfile}  >> ${logfile} 2>&1
}

This fix works for me and seems to handle all variations, ymmv, no warranty expressed or implied, etc…

(note, this would probably void any warranty that came with the rsync droboApp… :wink: If you’re not confident with editing unix shells, make a backup of the script first. You can likely recover from a mistake here with an uninstall and re-install of the rsync app.)

hey all,

i have a similar problem but not the same…

after installing rsync, my ssh connection is refused.

$ ssh: connect to host ip.address.com port 22: Connection refused[hr]

restart fixed…

My service.sh file is like this and it is not working.
What am I missing?
#!/bin/sh

rsyncd file server

. /etc/service.subr

prog_dir=dirname \realpath $0``

name=“rsync”
version=“3.0.9”
pidfile=${prog_dir}/var/run/rsyncd.pid
logfile=${prog_dir}/var/log/rsyncd.log
conffile=${prog_dir}/etc/rsyncd.conf

start()
{
if [ ! -f $conffile ]; then
cp ${conffile}.default ${conffile} > /dev/null 2>&1
fi

if test -e $pidfile && test ! -d /proc/cat $pidfile ; then rm $pidfile ; echo “removed stale pid file” >> $logfile ; fi
${prog_dir}/bin/rsync --daemon --config=${conffile} --log-file=${logfile} >> ${logfile} 2>&1
echo /bin/pidof -s rsync > ${pidfile}
}

case “$1” in
start)
start_service
;;
stop)
stop_service
;;
restart)
stop_service
sleep 3
start_service
;;
status)
status
;;
*)
echo “Usage: $0 [start|stop|restart|status]”
exit 1
;;
esac

This case solved