今天安裝完cobbler啓動是遇到了一些錯誤,記錄下來以備不時之需python
1.cobbler啓動報錯git
[root@localhost]# /etc/init.d/cobblerd start
Starting cobbler daemon: No module named ctypes
Traceback (most recent call last):
File "/usr/bin/cobblerd", line 76, in main
api = cobbler_api.BootAPI(is_cobblerd=True)
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 127, in __init__
module_loader.load_modules()
File "/usr/lib/python2.4/site-packages/cobbler/module_loader.py", line 62, in load_modules
blip = __import__("modules.%s" % ( modname), globals(), locals(), [modname])
File "/usr/lib/python2.4/site-packages/cobbler/modules/authn_pam.py", line 53, in ?
from ctypes import CDLL, POINTER, Structure, CFUNCTYPE, cast, pointer, sizeof
ImportError: No module named ctypescentos
解決辦法:Finally we installed python-ctypes-1.0.2-2.el5.i386 on centos5.7 with
cobbler 2.3.1 package build from git source
and now cobblerd starts fine 這是網上搜到的api
2.httpd啓動報錯app
[root@localhost]# /etc/init.d/httpd start
Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/cobbler.conf:
Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configurationsocket
而此時的cobbler check報錯以下:ide
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.4/site-packages/cobbler/cli.py", line 184, in check_setup
s.ping()
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/httplib.py", line 636, in connect
raise socket.error, msg
error: (111, 'Connection refused')ui
解決:Cobbler 2.2.x has a requirement for mod_wsgi which when installed via EPEL will be disabled by default. If you try to start httpd you will see the following:this
Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration
You can enable this module by editing /etc/httpd/conf.d/wsgi.conf and un-commenting the LoadModule wsgi_module modules/mod_wsgi.so line.server
把LoadModule wsgi_module modules/mod_wsgi.so 前面的註釋去掉,問題解決了。
如今cobbler啓動也正常了。