cobbler 奇葩出错
写此随笔,只是为了记录我安装cobbler遇到的奇怪问题,虽然这个问题很让我无语,但是竟然折腾了我一天。废话不多说,入题:
一如既往的按照以前的安装方式安装cobbler,不会出错的地方我就一带而过了:
我的是centos6.3_x64位系统!
#1、安装epel源: rpm -ivh http://mirrors.opencas.cn/epel/epel-release-latest-6.noarch.rpm #2、开始安装各种必须的服务: yum install -y install dhcp tftp rsync xinetd httpd cobbler #3、设置开机启动: chkconfig httpd on chkconfig cobblerd on chkconfig xinetd on
管理dhcp这个看到很多人都说会出现错误启动不起来,这个只要注意一点还是很简单的,只要跟本机在同一个IP段即可,否则dhcp肯定启动不起来!
来个技巧,如果你在一个局域网中有多个dhcp服务器的,你怕开启cobbler上的dhcp服务会干扰目前正在运行的dhcp服务器的话,解决方法很简单,只需把cobbler上的dhcp的range网络段给注释掉即可,就是变成只能指定分配ip的意思咯:
vim /etc/cobbler/dhcp.template
现在我遇到的问题来了:
http、iptables、selinux等服务全部标准设置,都是正常的还是提示如下错误:
[root@localhost ~]# cobbler check httpd does not appear to be running and proxying cobbler, or SELinux is in the way. Original traceback: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 252, in check_setup s.ping() File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib64/python2.6/xmlrpclib.py", line 1235, in request self.send_content(h, request_body) File "/usr/lib64/python2.6/xmlrpclib.py", line 1349, in send_content connection.endheaders() File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders self._send_output() File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output self.send(msg) File "/usr/lib64/python2.6/httplib.py", line 739, in send self.connect() File "/usr/lib64/python2.6/httplib.py", line 720, in connect self.timeout) File "/usr/lib64/python2.6/socket.py", line 567, in create_connection raise error, msg error: [Errno 110] Connection timed out
根据提示,就是最直接的解决问题的方法:是http没启动?是http使用了代理?是防火墙阻拦了?是selinux不允许通过?
但是,经过我的一一再三检查,以上问题都不是!一切都是正常!!!苦啊......
在经过N多百度+谷歌的折腾下还是没能解决问题,因为很多人都是说是以上问题造成的。最后无奈重装再来一次吧!重装好cobbler,执行cobbler check没有出现上面的问题,在设置一下/etc/cobbler/settings之后又一样的提示错误。
好,算给我找到问题所在了,就是设置/etc/cobbler/settings出错了,好吧,我想到问题所在了,server和next_server这两个IP设置的跟本机的IP不同,因为我是想后面要修改为其他IP的,所以临时随便指定一个IP给它,哭.....
修改好这两个IP为本机IP后,再执行cobbler check一下,竟然超级顺畅,问题解决了,坑啊......