我正在使用此命令向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位于a-z的其他文件夹中,而不是位于指定的地址。
我得出这个结论的原因是,当我采用与EPEL-6相同的方法(即,而不是EPEL-7)时,所有的RPM都在同一页上,所以当我在这个链接中添加回购替代时:
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 !!!

最佳答案

将breed标志添加到命令并指定yum。请参阅下面的epel工作示例

cobbler repo add \
     --mirror=https://dl.fedoraproject.org/pub/epel/7/x86_64/ \
     --name=epel \
     --arch=x86_64 \
     --breed=yum

关于linux - 补鞋匠重新同步错误-适用于Redhat Epel 6,但不适用于Epel 7,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38958927/

10-10 05:24