我是RedHawkSDR的新用户,在CentOS下编写了一个python程序,该程序控制"SigGen“组件。如果除了回送之外没有网络连接,它就能工作,但如果我连接有线网络(列为System ethO),则会失败。
我没有在python程序中指定任何IP地址,而且omniORB.cfg显式地列出了如下所示的环回地址,因为其他帖子中有警告不要使用"localhost“的注释。
traceLevel=10
InitRef = NameService=corbaname::127.0.0.1:2809
supportBootstrapAgent = 1
InitRef = EventService=corbaloc::127.0.0.1:11169/omniEvents比较两种情况下打印到屏幕上的ominORB数据:
最后一个相同的步骤==> "omniORB: AsyncInvoker: id=2已启动。
下一步:
==> "omniORB:将root<0> (激活)添加到对象表中
对于非工作(网络连接) ==> "omniORB:从对象表中移除root<0> (虚化)
网络连接case==>的全消息流
[aecom@crancentos1 Desktop]$ python pTrigger.py keyboard 5555 5050
omniORB: Version: 4.1.6
omniORB: Distribution date: Fri Jul 1 15:57:00 BST 2011 dgrisby
omniORB: Information: the omniDynamic library is not linked.
omniORB: omniORBpy distribution date: Fri Jul 1 14:52:31 BST 2011 dgrisby
omniORB: Initialising incoming endpoints.
omniORB: Attempt to set socket to listen on IPv4 and IPv6.
omniORB: Starting serving incoming endpoints.
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 1
/usr/local/redhawk/core/lib/python/ossie/utils/sb/domainless.py:863:
DeprecationWarning: Component class is deprecated. Use launch() method instead.
warnings.warn('Component class is deprecated. Use launch() method instead.', DeprecationWarning)
omniORB: Adding root<0> (activating) to object table.
omniORB: Creating ref to local: root<0>
target id : IDL:omg.org/CORBA/Object:1.0
most derived id: IDL:omg.org/CosNaming/NamingContextExt:1.0
omniORB: Creating Python ref to local: root<0>
target id : IDL:omg.org/CosNaming/NamingContextExt:1.0
most derived id: IDL:omg.org/CosNaming/NamingContextExt:1.0
omniORB: Version: 4.1.6
omniORB: Distribution date: Fri Jul 1 15:57:00 BST 2011 dgrisby
omniORB: Information: the omniDynamic library is not linked.
omniORB: omniORBpy distribution date: Fri Jul 1 14:52:31 BST 2011 dgrisby
omniORB: Initialising incoming endpoints.
omniORB: Attempt to set socket to listen on IPv4 and IPv6.
omniORB: Starting serving incoming endpoints.
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 1
omniORB: Removing root<0> (etherealising) from object table
Traceback (most recent call last):
File "pTrigger.py", line 118, in <module>
sigGen=sb.Component("SigGen")
File "/usr/local/redhawk/core/lib/python/ossie/utils/sb/domainless.py", line 872, in __new__
raise AssertionError, "Unable to launch component: '%s'" % e
AssertionError: Unable to launch component: 'resource 'SigGen_2' did not register with virtual environment'在系统进行网络连接时切换到网络IP地址的环回情况中是否存在"127.0.0.1“的系统变量/令牌/东西?
任何建设性的指导都将不胜感激.
诚挚的问候,
布拉德·迈耶
附加数据//防火墙是off=============================
//冒烟枪?===============================
omniORB: omniORBpy distribution date: Fri Jul 1 14:52:31 BST 2011 dgrisby
omniORB: Python thread state scavenger start.
omniORB: Initialising incoming endpoints.
omniORB: Instantiate endpoint 'giop:tcp:127.0.0.1:'
omniORB: Explicit bind to host 127.0.0.1.
omniORB: Bind to address 127.0.0.1 ephemeral port.
omniORB: Publish specification: 'addr'
omniORB: Try to publish 'addr' for endpoint giop:tcp:127.0.0.1:46877
omniORB: Publish endpoint 'giop:tcp:127.0.0.1:46877'
omniORB: Starting serving incoming endpoints.
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 1
omniORB: giopRendezvouser task execute for giop:tcp:127.0.0.1:46877
==>omniORB: SocketCollection idle. Sleeping.
omniORB: State root<0> (active) -> deactivating// ifconfig显示运行==================链接附件的回环:本地回圈
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:302 errors:0 dropped:0 overruns:0 frame:0 TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:26197 (25.5 KiB) TX bytes:26197 (25.5 KiB)// ping 127.0.0.1工作===========================================
// netstat -tulpn显示连接到某些PORTS=========================================活动因特网连接(仅服务器)的OMIN : Proto发送-q本地地址外部地址状态PID/程序名
tcp 0 127.0.0.1:42451 0.0.0.0:*聆听2409/全方位事件
TCP0 0修改后的0.0.0.0:*侦听2617/dnsmasq
TCP0-0.0.0.0:50517 0.0.0.0:*聆听2067/rpc.statd
tcp 00.0.0.0:22 0.0.0.0:*侦听2254/sshd
tcp 0127.0.0.1:631 0.0.0.0:*聆听2098/cupsd
tcp 0 127.0.0.1:25 0.0.0.0:*聆听2346/主
tcp 0127.0.0.1:42251 0.0.0.0:*听2022/杂名
tcp 00.0.0.0:111 0.0.0.0:* LISTEN 1902/rpcbind
tcp 0:39409::*侦听2067/rpc.statd
tcp 0 0:22::* LISTEN 2254/sshd
tcp 0 ::1:631:*侦听2098/cupsd
tcp 0 0 ::1:25:*侦听2346/master
tcp 0 0:2809:*听2022/全名
TCP0:11169::*侦听2409/全方位事件
tcp 0::111::*侦听1902/rpcbind
发布于 2015-03-24 15:00:47
当多个网络接口可用时,omniORB任意选择其中一个来发布对象引用(参见http://omniorb.sourceforge.net/omni41/omniNames.html中的第5部分)。在您的情况下,当您连接到网络时,它似乎正在抢占eth0,无论出于什么原因(可能是防火墙设置),它都不能很好地使用omniNames。
为了解决这个问题,我建议将以下行添加到/etc/OmORB.cfg文件中:
endPoint = giop:tcp:127.0.0.1:这将迫使omniNames始终使用本地回送而不是eth0。考虑到您当前的omniORB.cfg设置,我假设使用localhost对于您的应用程序是可以接受的。如果情况并非如此(也就是说,您确实需要使用eth0而不是localhost),我们将需要找到omniNames在eth0接口上出现问题的根本原因。
澄清(因为我不能在注释部分中使用换行):
尝试将日志级别提高到40,看看在这些日志行之间是否显示了有用的内容:
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 1
omniORB: Removing root<0> (etherealising) from object table我很难再现你的问题。在我的工作情况下,我得到了这样的东西:
omniORB: AsyncInvoker: thread id = 2 has started. Total threads = 1
omniORB: giopRendezvouser task execute for giop:tcp:127.0.0.1:60625
omniORB: Adding root<0> (activating) to object table.我很好奇,想看看第二行的IP对你来说是否可疑。
发布于 2015-03-27 19:13:24
我花了一周时间做这个…但是当DrewC为我指明了新的方向时,终于找到了解决方案。
在etc/host文件中,我添加了一行“127.0.0.1‘ComputerName’”,问题就消失了。
布拉德
https://stackoverflow.com/questions/29221725
复制相似问题