cobbler安装及启动错误提示解决

今天安装完cobbler启动是遇到了一些错误,记录下来以备不时之需

1.cobbler启动报错

[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 ctypes

解决办法: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 这是网上搜到的

2.httpd启动报错

[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 configuration

而此时的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.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')

解决: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:

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.

把LoadModule wsgi_module modules/mod_wsgi.so 前面的注释去掉,问题解决了。

现在cobbler启动也正常了。

 

你可能感兴趣的:(Module,cobbler,ctypes)