Cobbler replicate rsync error - Unknown module

When trying to run a "cobbler sync" I get an rsync failure.

This seems to be because rsync can't find the module (in /etc/rsyncd.conf) for each section it needs to replicate. This is not a hassle to fix though, there's no need to manually create these modules.
Instead, on the cobbler master, edit /etc/cobbler/settings and set
manage_rsync: 1
(to allow cobbler to manage rsyncd on your behalf)

Then run

  • systemctl cobbler restart (to reload the config file)
  • cobbler sync (to generate the new rsync file with the cobbler modules)

Then presto - the replicate works

Some more error details below

[root@cobbler-slave ~]# cobbler replicate --master=192.168.0.1 --sync-all
task started: 2016-02-09_110804_replicate
task started (id=Replicate, time=Tue Feb  9 11:08:04 2016)
cobbler_master      = 192.168.0.1
distro_patterns     = []
profile_patterns    = []
system_patterns     = []
repo_patterns       = []
image_patterns      = []
mgmtclass_patterns  = []
package_patterns    = []
file_patterns       = []
omit_data           = False
sync_all            = True
use_ssl             = False
XMLRPC endpoint: http://192.168.0.1/cobbler_api
test ALPHA
test BETA
Querying Both Servers
remote names struct is {'profile': ['centos7.2-virtualbox-x86_64', 'centos7.1-vmware-x86_64', 'centos7.2-vmware-x86_64', 'centos7.2-dell-x86_64', 'centos7.1-x86_64', 'centos6.5-x86_64', 'centos7.1-devel-x86_64', 'virtualbox-centos7.1-x86_64', 'centos7.1-dell-x86_64', 'centos7.1-live'], 'package': [], 'mgmtclass': [], 'image': [], 'system': ['server1', 'server2', 'server3', 'default'], 'repo': ['Centos-7.1-OS'], 'file': [], 'distro': ['centos7.1-live', 'centos7.1-x86_64', 'centos6.5-x86_64', 'centos7.1-devel-x86_64', 'centos7.1-new-x86_64', 'centos7.2-x86_64']}
transfer list for distro is ['centos6.5-x86_64', 'centos7.1-x86_64', 'centos7.1-live', 'centos7.1-devel-x86_64', 'centos7.1-new-x86_64', 'centos7.2-x86_64']
transfer list for profile is ['centos7.2-virtualbox-x86_64', 'centos7.1-vmware-x86_64', 'centos7.2-vmware-x86_64', 'centos7.2-dell-x86_64', 'centos7.1-x86_64', 'centos6.5-x86_64', 'centos7.1-devel-x86_64', 'virtualbox-centos7.1-x86_64', 'centos7.1-dell-x86_64', 'centos7.1-live']
transfer list for system is ['server1', 'server2', 'server3', 'default']
transfer list for repo is ['Centos-7.1-OS']
transfer list for image is []
transfer list for mgmtclass is []
transfer list for package is []
transfer list for file is []
*NOT* Removing Objects Not Stored On Master
Rsyncing distros
Rsyncing distro centos6.5-x86_64
running: rsync -avzH 192.168.0.1::distro-centos6.5-x86_64 /var/www/cobbler/ks_mirror/centos6.5-x86_64
received on stdout:
received on stderr: @ERROR: Unknown module 'distro-centos6.5-x86_64'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing distro centos7.1-x86_64
running: rsync -avzH 192.168.0.1::distro-centos7.1-x86_64 /var/www/cobbler/ks_mirror/centos7.1-x86_64
received on stdout:
received on stderr: @ERROR: Unknown module 'distro-centos7.1-x86_64'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing distro centos7.1-live
Skipping distro centos7.1-live, as it doesn't appear to live under ks_mirror
Rsyncing distro centos7.1-devel-x86_64
running: rsync -avzH 192.168.0.1::distro-centos7.1-devel-x86_64 /var/www/cobbler/ks_mirror/centos7.1-x86_64-devel
received on stdout:
received on stderr: @ERROR: Unknown module 'distro-centos7.1-devel-x86_64'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing distro centos7.1-new-x86_64
running: rsync -avzH 192.168.0.1::distro-centos7.1-new-x86_64 /var/www/cobbler/ks_mirror/centos7.1-x86_64-new
received on stdout:
received on stderr: @ERROR: Unknown module 'distro-centos7.1-new-x86_64'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing distro centos7.2-x86_64
running: rsync -avzH 192.168.0.1::distro-centos7.2-x86_64 /var/www/cobbler/ks_mirror/centos7.2-x86_64
received on stdout:
received on stderr: @ERROR: Unknown module 'distro-centos7.2-x86_64'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing repos
running: rsync -avzH 192.168.0.1::repo-Centos-7.1-OS /var/www/cobbler/repo_mirror/Centos-7.1-OS
received on stdout:
received on stderr: @ERROR: Unknown module 'repo-Centos-7.1-OS'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing distro repo configs
running: rsync -avzH 192.168.0.1::cobbler-distros/config/ /var/www/cobbler/ks_mirror/config
received on stdout:
received on stderr: @ERROR: Unknown module 'cobbler-distros'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing kickstart templates & snippets
running: rsync -avzH 192.168.0.1::cobbler-kickstarts /var/lib/cobbler/kickstarts
received on stdout:
received on stderr: @ERROR: Unknown module 'cobbler-kickstarts'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
running: rsync -avzH 192.168.0.1::cobbler-snippets /var/lib/cobbler/snippets
received on stdout:
received on stderr: @ERROR: Unknown module 'cobbler-snippets'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing triggers
running: rsync -avzH 192.168.0.1::cobbler-triggers /var/lib/cobbler/triggers
received on stdout:
received on stderr: @ERROR: Unknown module 'cobbler-triggers'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Rsyncing scripts
running: rsync -avzH 192.168.0.1::cobbler-scripts /var/lib/cobbler/scripts
received on stdout:
received on stderr: @ERROR: Unknown module 'cobbler-scripts'
rsync error: error starting client-server protocol (code 5) at main.c(1516) [Receiver=3.0.9]

rsync failed
Removing Objects Not Stored On Local
adding distro centos6.5-x86_64
failed to add distro centos6.5-x86_64
adding distro centos7.1-x86_64
running python triggers from /var/lib/cobbler/triggers/add/distro/pre/*
running shell triggers from /var/lib/cobbler/triggers/add/distro/pre/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
running shell trigger /var/lib/cobbler/triggers/change/cobbler_backup.sh
running: ['/var/lib/cobbler/triggers/change/cobbler_backup.sh', 'centos7.1-x86_64']
Exception occured: <type 'exceptions.OSError'>
Exception value: [Errno 13] Permission denied
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 1737, in subprocess_sp
    sp = subprocess.Popen(cmd, shell=shell, stdin=stdin, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
   File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
   File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception

Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: "OS Error, command not found?  While running: ['/var/lib/cobbler/triggers/change/cobbler_backup.sh', 'centos7.1-x86_64']"
Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
    raise CX(msg)