当前位置: 首页 > 面试题库 >

CORBA通讯问题

咸弘雅
2023-03-14
问题内容

这可能太局限了,但我希望有人可以帮助我正确阐明我的问题。

因此,我们有一个前端Web服务器,该服务器使用CORBA与后端应用程序服务器进行通信。我曾被要求将后端应用程序移植到LINUX盒中。但是,为了测试它,我试图将前端Web服务器指向LINUX后端。

我们正在使用omniORB-4.1.4,这是获取后端系统实例的方法:

        String args[] = new String[0];
        System.out.println(getDateTime()+"Instance: Connecting to: "+initialHost+"  "+initialPort+"  "+enviornment+"  "+version);
        java.util.Properties props = new java.util.Properties();
        props.put("org.omg.CORBA.ORBInitialPort", initialPort);
        props.put("org.omg.CORBA.ORBInitialHost", initialHost);
        props.put("com.sun.CORBA.giop.ORBGIOPVersion", "1.0");
        orb=org.omg.CORBA.ORB.init(args,props);

当前端和后端都在SUN / Solaris机器上运行时,似乎可以很好地实例化。但是,当后端在LINUX机器上运行时,它将给出Connection
Refused异常,并且主机名为127.0.0.1。

  2012/10/22 13:53:22.033   EvaluateInstance: Connecting to: cmrheldv  23026  DEV87  0871
   Oct 22, 2012 1:53:22 PM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
  WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: cmrheldv; port: 23026"
 org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201  completed: No
    at      com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:205)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:218)
    at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:101)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:171)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:118)
    at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:74)
    at com.sun.corba.se.impl.resolver.BootstrapResolverImpl.resolve(BootstrapResolverImpl.java:107)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
    at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(CompositeResolverImpl.java:22)
    at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(ORBImpl.java:1151)
    at EvaluateInstance.InitializeModules(EvaluateInstance.java:152)
    at EvaluateInstance.initializeVariables(EvaluateInstance.java:326)
    at EvaluateCF.initializeInstances(EvaluateCF.java:1792)
    at EvaluateCF.processRequest(EvaluateCF.java:112)
    at coldfusion.tagext.CfxTag.doStartTag(CfxTag.java:102)
    at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
    at cfconfglobalconstants2ecfm330318830._factor9(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/confglobalconstants.cfm:372)
    at cfconfglobalconstants2ecfm330318830._factor10(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/confglobalconstants.cfm:13)
    at cfconfglobalconstants2ecfm330318830._factor11(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/confglobalconstants.cfm:6)
    at cfconfglobalconstants2ecfm330318830.runPage(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/confglobalconstants.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
    at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
    at cfapp_globals2ecfm1890385339.runPage(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/app_globals.cfm:61)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
    at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
    at cfapp_locals2ecfm610494134.runPage(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/securitycontrol/app_locals.cfm:49)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
    at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
    at cfdefault2ecfm129406838._factor9(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/securitycontrol/default.cfm:107)
    at cfdefault2ecfm129406838.runPage(/opt/jrun4/servers/or_dev87/cfusion-ear/cfusion-war/origenate/securitycontrol/default.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
    at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:381)
    at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
    at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
    at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
    at coldfusion.CfmServlet.service(CfmServlet.java:200)
    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
 Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
    at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:60)
    at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:188)
    ... 64 more

与属性有关吗?因为这两个盒子在定义的端口上可以很好地相互听到。

另外,当我在Linux机器上执行netstat时,它会显示从Solaris机器到端口的LISTENING连接。是什么使响应返回为127.0.0.1?

Solaris框称为yyyy,而Linux框称为xxxx。初始端口和主机通过ini文件获取。


问题答案:

问题与代码无关。这与连接性有关。

在LINUX框cmrheldv上,我必须编辑/ etc / hosts文件,并将127.0.0.1更改为本地主机的真实IP。

http://jeewesley.blogspot.com/2008/12/glassfish-ejb3-remote-interface-
on.html



 类似资料:
  • UCS (Ultra Corba Simulator) 是一个功能强大的CORBA客户端和服务器端的模拟器。

  • 问题内容: 我正在使用CORBA开发一个简单的远程管理工具。这是我的服务器代码。 但是,当我尝试运行程序时,出现以下错误。 我尝试改变 至 但是错误仍然存​​在。谁能建议我一个开始orbd的解决方案。 问题答案: 在控制台中运行orb,然后系统启动orbd -ORBInitialPort 1050 运行YourServer.java -ORBInitialPort 1050 -ORBInitial

  • 我知道这个IOR可能包含多个组件,典型的IOR通常包含远程主机的IP地址、CORBA服务器正在监听的远程端口的编号、定义将在其上调用方法的远程对象的类的字符串,以及服务器ORB用来标识对象的对象键。 有没有可能当我解码IOR时,它给我的是主机名,而不是IP地址。? 也就是说,它像machine-abc.co.in一样解析,而不是像192.168.64.56这样的IP地址

  • GatewayWorker支持websocket协议、text协议、frame协议。如果以上协议不满足你的业务需求,需要定制自己的协议,请参考Workerman手册 协议定制章节 。

  • 一个网页使用iframe引入一个地址,两者之间有postmessage通讯,再把这个网页使用iframe引入到另一个网页。第一个引入的地址之间的相互通讯就没有生效。 这种这么解决呢,不再次嵌套iframe是生效的

  • $config = [ 'corp_id' => 'xxxxxxxxxxxxxxxxx', 'secret' => 'xxxxxxxxxx', // 通讯录的 secret //... ]; $contacts = Factory::work($config); 成员管理 创建成员 $data = [ "userid" => "overtrue",