12.6. cobbler常见问题总结

Date:

2018-09

12.6.1. cobbler软件包依赖问题

参考:

https://centos.pkgs.org/6/nux-misc-i386/cobbler-2.2.1-2.el6.nux.noarch.rpm.html

参考上面网址安装对应的依赖包。

12.6.2. cobbler-web如有问题参考网址

http://rpmfind.net/linux/rpm2html/search.php?query=cobbler-web

12.6.3. syslinux配置导致的问题

问题现象

 1[root@centos-cobbler ~]# cobbler get-loaders
 2task started: 2018-09-06_220531_get_loaders
 3task started (id=Download Bootloader Content, time=Thu Sep  6 22:05:31 2018)
 4path /var/lib/cobbler/loaders/README already exists, not overwriting existing content, use --force if you wish to update
 5downloading http://cobbler.github.io/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo
 6Exception occured: <class 'urlgrabber.grabber.URLGrabError'>
 7Exception value: [Errno 14] PYCURL ERROR 56 - "Failure when receiving data from the peer"
 8Exception Info:
 9  File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 87, in run
10    rc = self._run(self)
11  File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 181, in runner
12    return self.remote.api.dlcontent(self.options.get("force",False), self.logger)
13  File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 751, in dlcontent
14    return grabber.run(force)
15  File "/usr/lib/python2.6/site-packages/cobbler/action_dlcontent.py", line 73, in run
16    urlgrabber.grabber.urlgrab(src, filename=dst, proxies=proxies)
17  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 625, in urlgrab
18    return default_grabber.urlgrab(url, filename, **kwargs)
19  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 993, in urlgrab
20    return self._retry(opts, retryfunc, url, filename)
21  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 894, in _retry
22    r = apply(func, (opts,) + args, {})
23  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 979, in retryfunc
24    fo = PyCurlFileObject(url, filename, opts)
25  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 1074, in __init__
26    self._do_open()
27  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 1376, in _do_open
28    self._do_grab()
29  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 1506, in _do_grab
30    self._do_perform()
31  File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 1363, in _do_perform
32    raise err
33
34!!! TASK FAILED !!!

解决办法

 1[root@centos-cobbler ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/cobbler/loaders
 2[root@centos-cobbler ~]# cp /usr/share/syslinux/menu.c32 /var/lib/cobbler/loaders/
 3
 4[root@centos-cobbler ~]# cobbler get-loaders
 5task started: 2018-09-06_220550_get_loaders
 6task started (id=Download Bootloader Content, time=Thu Sep  6 22:05:50 2018)
 7path /var/lib/cobbler/loaders/README already exists, not overwriting existing content, use --force if you wish to update
 8path /var/lib/cobbler/loaders/COPYING.elilo already exists, not overwriting existing content, use --force if you wish to update
 9downloading http://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
10downloading http://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
11downloading http://cobbler.github.io/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi
12downloading http://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
13path /var/lib/cobbler/loaders/pxelinux.0 already exists, not overwriting existing content, use --force if you wish to update
14path /var/lib/cobbler/loaders/menu.c32 already exists, not overwriting existing content, use --force if you wish to update
15downloading http://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
16downloading http://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
17*** TASK COMPLETE ***

12.6.4. cobbler依赖包没有安装

CentOS6.6安装会提示错误:

1Package: cobbler-web-2.6.11-7.git95749a6.el6.noarch (epel)
2    Requires: Django >= 1.4
3You could try using --skip-broken to work around the problem

解决办法:

1rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-6.noarch.rpm
2
3yum -y install mod_ssl python-cheetah createrepo python-netaddr genisoimage mod_wsgi syslinux libpthread.so.0 libpython2.6.so.1.0 python-libs python-simplejson
4rpm -ivh http://mirror.centos.org/centos/6/os/x86_64/Packages/libyaml-0.1.3-4.el6_6.x86_64.rpm
5rpm -ivh http://mirror.centos.org/centos/6/os/x86_64/Packages/PyYAML-3.10-3.1.el6.x86_64.rpm
6rpm -ivh https://kojipkgs.fedoraproject.org//packages/Django14/1.4.14/1.el6/noarch/Django14-1.4.14-1.el6.noarch.rpm

12.6.5. 重启httpd和cobbler服务就正常

 1[root@centos-cobbler ~]# cobbler check
 2Traceback (most recent call last):
 3File "/usr/bin/cobbler", line 36, in <module>
 4    sys.exit(app.main())
 5File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 657, in main
 6    rc = cli.run(sys.argv)
 7File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 270, in run
 8    self.token         = self.remote.login("", self.shared_secret)
 9File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
10    return self.__send(self.__name, args)
11File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
12    verbose=self.__verbose
13File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
14    return self._parse_response(h.getfile(), sock)
15File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
16    return u.close()
17File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
18    raise Fault(**self._stack[0])
19xmlrpclib.Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'login failed'">