這可能太本地化了,但我希望有人能夠幫助我正確表達我的問題。CORBA通訊問題
因此,我們有一個前端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機器上運行,它提供了連接被拒絕的異常,以及主機名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文件獲取的。
所以,你不顯示你在哪裏得到 'initialHost', 'initialPort',等你用填充連接屬性。那是你看到localhost地址的地方嗎?您發佈的錯誤消息顯示了'cmap03'的主機名。所以,我很困惑。可以提供更多細節?順便說一下,除了將它們作爲映射傳遞給init方法之外,您可能還有一些運氣將初始連接參數設置爲Java系統變量。 – GreyBeardedGeek
@GreyBeardedGeek重申你的最後一點,我不明白爲什麼這會有所幫助。搜索順序在org.omg.CORBA.ORB的Javadoc中定義,它包含系統屬性和ORB初始屬性。 – EJP
@EJP - 不確定是否有omniOrb,但我已經看到了解決此問題的其他情況。簡單的嘗試 - 如果它不起作用,沒有太多時間投入嘗試。 – GreyBeardedGeek