安装完controller所需的所有依赖软件后nox_core未启动
手动启动如下:
cd /opt/nox/bin
./nox_core
报如下错误
OX 0.4.1~beta+build2 (nox_core), compiled Feb 6 2011 07:40:04
Compiled with OpenFlow 0x01
00001|snac|ERR:Cannot change the state of 'python' to INSTALLED:
'python' ran into an error:
Unable to construct a Python component:
Traceback (most recent call last):
File "./nox/apps/pyrt/pyoxidereactor.py", line 336, in instance
File "./nox/apps/pyrt/pyoxidereactor.py", line 104, in __init__
AttributeError: 'pyoxidereactor' object has no attribute '_handleSigchld
Compiled with OpenFlow 0x01
00001|snac|ERR:Cannot change the state of 'python' to INSTALLED:
'python' ran into an error:
Unable to construct a Python component:
Traceback (most recent call last):
File "./nox/apps/pyrt/pyoxidereactor.py", line 336, in instance
File "./nox/apps/pyrt/pyoxidereactor.py", line 104, in __init__
AttributeError: 'pyoxidereactor' object has no attribute '_handleSigchld
办法如下
vim /usr/lib/python2.6/dist-packages/twisted/internet/base.py
在最后倒数第二行加入
def _handleSigchld(self, signum, frame, _threadSupport=platform.supportsThreads()):
from twisted.internet.process import reapAllProcesses
if _threadSupport:
self.callFromThread(reapAllProcesses)
else:
self.callLater(0, reapAllProcesses)
注意和文件中的格式保持对齐 python对格式要求很严格