我正在使用这个命令向 cobbler 添加一个 repo:
cobbler repo add \
--name=Centos7-EPEL \
--mirror=http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/7/x86_64/ \
--priority=50 \
--createrepo-flags="-c cache"
这按预期工作,但是当我发出命令时:
cobbler reposync --only="Centos7-EPEL"
reposync 失败(请参阅查询底部的完整语法)。我相信这是因为镜像地址的 rpm 位于 AZ 的其他文件夹中,而不是指定地址。我得出这个结论的原因是因为当我使用 EPEL-6(即而不是 EPEL-7)采用相同的方法时,所有 rpm 都在同一页面上,所以当我在此链接中添加 repo 替换时:
http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/6/x86_64/
reposync 过程有效。
你认为我的假设是正确的,如果是,我能做些什么来解决这个问题?
完整错误:
hello, reposync
run, reposync, run!
running: rsync -rltDv --copy-unsafe-links --delete-after -e ssh --delete --exclude-from=/etc/cobbler/rsync.exclude http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/7/x86_64/ /var/www/cobbler/repo_mirror/Centos7-EPEL
received on stdout:
received on stderr: ssh: Could not resolve hostname http: Name or service not known
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 129, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 125, in run
self.sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 173, in sync
return self.rsync_sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 247, in rsync_sync
utils.die(self.logger,"cobbler reposync failed")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 137, in die
raise CX(msg)
reposync failed, tries left: 0
reposync failed, retry limit reached, skipping
running: chown -R root:apache /var/www/cobbler/repo_mirror/Centos7-EPEL
received on stdout:
received on stderr:
running: chmod -R 755 /var/www/cobbler/repo_mirror/Centos7-EPEL
received on stdout:
received on stderr:
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 129, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89, in run
rc = self._run(self)
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 248, in runner
3), name=name, nofail=nofail, logger=self.logger)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 808, in reposync
return reposync.run(name)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 154, in run
utils.die(self.logger,"overall reposync failed, at least one repo failed to synchronize")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 137, in die
raise CX(msg)
!!! TASK FAILED !!!