This maybe too localized, but I am hoping someone can help me articulate my questions properly.
So, we have a front end web server that communicates with a back end app server using CORBA. I have been asked to port the back end application to a LINUX box, which I did. But, in order to test it, I am trying to point the front end web server to the LINUX back end.
We are using omniORB-4.1.4, and here is how the instance of the back end system is obtained:
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);
When both and front end and back end are running on a SUN/Solaris box, it seems to get an instance fine. But, when the back end is running on a LINUX box, it gives a Connection Refused exception, and the hostname as 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
Is it something to do with the properties? Because the two boxes can hear each other perfectly well on the defined ports.
Also, when I do a netstat on the Linux box, it shows up a LISTENING connection to the port from the Solaris box. What makes the response return as a 127.0.0.1?
The Solaris box is called yyyy, and the Linux box is called xxxx. The initial port and host is gotten through an ini file.
You should first start the ORB port with this command :
The problem was nothing to do with the code. It was something to do with connectivity.
On the LINUX box, cmrheldv, I had to edit the /etc/hosts file and change the 127.0.0.1 to the real ip for the localhost.
http://jeewesley.blogspot.com/2008/12/glassfish-ejb3-remote-interface-on.html
Try to set the path to your variable and start orbd.
Open cmd and type:
After that: