操做系統: CentOS:6.5
python
cobbler 版本:2.4.0
問題說明 :cobbler reposync 同步epel 和updates 源的時候報錯centos
錯誤信息:api
received on stderr: bash
Exception occured: <class 'cobbler.cexceptions.CX'>ide
Exception value: 'cobbler reposync failed'操作系統
Exception Info:rem
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 129, in die同步
raise CX(msg)it
Exception occured: <class 'cobbler.cexceptions.CX'>io
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 169, in sync
return self.yum_sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 402, in yum_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
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'reposync failed, retry limit reached, aborting'
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: 'reposync failed, retry limit reached, aborting'
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 251, in runner
name=None, 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 147, in run
utils.die(self.logger,"reposync failed, retry limit reached, aborting")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 137, in die
raise CX(msg)
!!! TASK FAILED !!!
解決方法:
上述錯誤網上搜索多是cobbler的bug,下面的方法只是繞過這個問題
把修改epel 和updates 的協議換成rsync,源地址更換爲中科大的地址(國內源地址中,163和sohu不支持rsync協議),
cobbler repo edit --name=centos6.5-x86_64-epel --mirror=rsync://mirrors.ustc.edu.cn/epel/6/x86_64/ --arch=x86_64 --breed=rsync cobbler repo edit --name=centos6.5-x86_64-updates --mirror=rsync://mirrors.ustc.edu.cn/centos/6/updates/x86_64/ --arch=x86_64 --breed=rsync