这也适用于 OpsCenter 5.1.0 和 5.1.1。
尝试在 CentOS 5 服务器上运行 OpsCenter 5.1.2 时出现以下错误:
Unhandled Error
Traceback (most recent call last):
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/scripts/_twistd_unix.py", line 317, in startApplication
app.startApplication(application, not self.config['no_save'])
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/app.py", line 653, in startApplication
service.IService(application).startService()
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/application/service.py", line 277, in startService
service.startService()
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1141, in unwindGenerator
return _inlineCallbacks(None, f(*args, **kwargs), Deferred())
--- <exception caught here> ---
File "/usr/share/opscenter/lib/py-redhat/2.6/shared/amd64/twisted/internet/defer.py", line 1020, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python2.6/site-packages/opscenterd/OpsCenterdService.py", line 45, in startService
File "/usr/lib/python2.6/site-packages/opscenterd/OpsCenterdService.py", line 101, in setupWebServer
File "/usr/lib/python2.6/site-packages/opscenterd/WebServer.py", line 120, in makeWebServer
File "/usr/lib/python2.6/site-packages/opscenterd/SslUtils.py", line 2, in <module>
exceptions.ImportError: No module named OpenSSL
python26 是从 EPEL 安装的。这是来自 Datastax 的 OpsCenter。SSL 支持与 OpsCenter 5.0.x 配合良好。
答案1
EPEL 的 python26 中不包含 pyOpenSSL。必须手动安装。幸运的是,这可以通过 easy_install python 模块(包含在 setuptools 中)轻松完成,但需要先手动安装。
安装构建 pyOpenSSL 和 setuptools 所需的软件包:
yum install gcc gcc-c++ libffi-devel openssl-devel
下载并安装setuptools:
cd /usr/local/src/
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-16.0.tar.gz
tar zxf setuptools-16.0.tar.gz
cd setuptools-16.0
python26 setup.py install
注意:最好检查是否有较新版本的 setuptools 可用。
安装 pyOpenSSL:
python26 -m easy_install pyOpenSSL
确保您使用的python26
命令不仅仅是python
,因为 CentOS 5 已经安装了 Python 2.4。
OpsCenter 的 SSL 支持现在应该可以工作了。