我正在尝试在全新安装的 CentOS 6.4 32 位上安装 REDHAWK v1.8.2,但我无法启动omniNames 和omniEvents。
sudo /sbin/service omniEvents stop
Stopping CORBA event service: omniEvents
sudo /sbin/service omniNames stop
Stopping omniNames [ OK ]
sudo /sbin/service omniNames start
Starting omniNames [ OK ]
sudo /sbin/service omniEvents start
Starting CORBA event service on port 11169: omniEvents: [25848]: Warning - failed to resolve initial reference 'NameService'. Exception: TRANSIENT
omniEvents.
我尝试通过调用命名客户端来验证omniNames 是否真的在运行,但出现错误(见下文),因此omniNames 似乎没有成功启动。
nameclt list
Caught a TRANSIENT exception when trying to validate the type of the
NamingContext. Is the naming service running?
作为调试过程的一部分,我尝试终止omniNames 进程并以不同的方式启动它(见下文)。
sudo killall omniNames
omniNames -start
Wed Nov 13 21:08:08 2013:
Starting omniNames for the first time.
Error: cannot create initial log file '/var/omninames/omninames-orion.log':
No such file or directory
You can set the environment variable OMNINAMES_LOGDIR to specify the
directory where the log files are kept.
我不确定为什么omniNames 无法创建日志文件,因为我验证了/var/omninames 文件夹确实存在,甚至以root 身份启动omniNames 也会产生相同的错误。无论如何,我将日志目录设置到我的桌面以规避错误(见下文)。
export OMNINAMES_LOGDIR=/home/$USER/Desktop/logs
mkdir -p /home/$USER/Desktop/logs
omniNames -start
Wed Nov 13 21:09:17 2013:
Starting omniNames for the first time.
Wrote initial log file.
Read log file successfully.
Root context is IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e30000001000000000000005c000000010102000a00000031302e322e382e333500f90a0b0000004e616d6553657276696365000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100
Checkpointing Phase 1: Prepare.
Checkpointing Phase 2: Commit.
Checkpointing completed.
尽管看起来omniNames 已成功启动,但当我打开另一个终端窗口并调用命名客户端时,我得到与以前相同的错误(见下文)。
nameclt list
Caught a TRANSIENT exception when trying to validate the type of the
NamingContext. Is the naming service running?
我在 /etc/omniORB.cfg 文件中所做的唯一修改是为 InitRef 添加行(见下文)。
InitRef = NameService=corbaname::localhost
InitRef = EventService=corbaloc::localhost:1169/omniEvents
另外,我没有连接到互联网,所以我的 CentOS 版本没有从基本版本更新,除了手册附录 J 中推荐的 boost 库(http://sourceforge.net/projects/redhawksdr/files /redhawk-doc/1.9.0/REDHAWK_Manual_v1.9.0.pdf/download)。