2

I have multiple servers that receive files via rsync on different ports. I'd like to merge them into the same physical server and let the clients continue to direct their files to the same port they do now (ie different alternate ports).

Normally I'd just run /usr/bin/rsync --daemon --port=x for each one, but I'm trying to get it to work via xinetd in centos 6 since that's the 'default' rsync server now. Adding the ports in /etc/services didn't do it (it should have under inetd, but maybe not xinetd?). If I run the daemon manually and let xinetd run one it runs (so I'm not blocked to just get it done), but I'd still like them to both be run by xinetd. My question is can that even be done?

As a side thing, in man rsync:

--port=PORT
This specifies an alternate TCP port number for the daemon to listen on rather than the default of 873. See also the lqportrq global option in the rsyncd.conf manpage.

lqportrq doesn't show up in man rsync.d or a google search anywhere. what gives?

3
  • Something is funky with your manpage, mine says "See also the "port" global option in the rsyncd.conf manpage."
    – mgorven
    Jul 6, 2012 at 22:41
  • Please should your xinetd configuration.
    – mgorven
    Jul 6, 2012 at 22:52
  • mgorven- it's just the default from centos, I changed nothing Jul 6, 2012 at 22:53

1 Answer 1

1

You need to add additional xinetd configuration for each additional port you want to use. Each port needs a unique service name in /etc/services, so for example:

echo "rsync00 900/tcp" >> /etc/services

And then in /etc/xinet.d/rsync00:

service rsync00
{
        flags           = IPv6
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/bin/rsync
        server_args     = --daemon --config /etc/rsync00.conf
        log_on_failure  += USERID
}
2
  • This is it, thanks. I also needed to add --port=x to server_args in the new file. It's kind of frustrating that the default config doesn't kick out enough logs to troubleshoot, but I suppose redhat has to sell support somehow. Jul 6, 2012 at 23:06
  • 3
    It's not necessary to put the port in /etc/services, you can use type = unlisted and port = 900. Jun 11, 2014 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .