users@glassfish.java.net

RE: Trouble getting EJB from Linux GlassFish but not Windows GlassFish

From: Alex Sherwin <alex.sherwin_at_acadiasoft.com>
Date: Fri, 5 Sep 2008 12:46:34 -0400

This could be related to some of the issues discussed in a post I started on the glassfish forums before:

http://forums.java.net/jive/message.jspa?messageID=272823#272823

Similar behavior, and some possible solutions are discussed


Alex Sherwin
alex.sherwin_at_acadiasoft.com


-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Friday, September 05, 2008 12:43 PM
To: users_at_glassfish.dev.java.net
Subject: Trouble getting EJB from Linux GlassFish but not Windows GlassFish

NOTE: I posted this to the forums.sun.com but I think this board is more appropriate.

Hi all,

I've an odd sort of problem and would appreciate any suggestions on how to solve it.

I have a Windows XP computer running the latest stable version of Glassfish ( V2 UR2 Final) and Java 1.6.0_10-rc-b28. I have a second computer, Linux CentOS, also running the latest stable version of Glassfish and Java 1.6.0_10-rc-b28. I have a stateless remote EJB that has been deployed on both the Windows and Linux boxes. I have a stand-alone Java program that successfully invokes the Linux EJB when executed on the Linux box and it can invoke the Windows EJB when executed on the Windows box. The following is the linux command I use to start the program:

java -classpath /usr/local/java/glassfish/lib/appserv-rt.jar:/usr/local/java/glassfish/lib/javaee.jar:. ca.aafc.crc.test.TestMyEJB

It's the same for Windows (except the classpath is different0. In both cases it relies on the no argument InitialContext constructor to help grab the EJB handle - assumes localhost is the server listening on port 3700. Both of the GlassFish installs are defaults so this is true.

The problem I have is this; I can call the Windows EJB from the Linux box using the following statement (setting the location of the server as a VM arg);

java -Dorg.omg.CORBA.ORBInitialHost=10.113.0.165 -classpath /usr/local/java/glassfish/lib/appserv-rt.jar:/usr/local/java/glassfish/lib/javaee.jar:. ca.aafc.crc.test.TestMyEJB

BUT I'm unable to call the Linux EJB from Windows using the equivalent argument (changing the server IP of course). When I do I get the following (familiar error);

4-Sep-2008 3:44:07 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.0.1; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325)
at org.omg.CORBA.portable.ObjectImpl._is_a(Unknown Source)
at org.omg.CosNaming.NamingContextHelper.narrow(Unknown Source)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:131)
at com.sun.enterprise.naming.SerialContext.getCachedProvider(SerialContext.java:247)
at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:205)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:160)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(Unknown Source)
at ca.aafc.crc.test.TestMyEJB.main(TestMyEJB.java:11)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
... 14 more
Caused by: java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at com.sun.corba.ee.impl.orbutil.ORBUtility.openSocketChannel(ORBUtility.java:105)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:332)
... 15 more

The Linux GlassFish logs don't even register a call from the windows box (if I hit port 3700 from a Windows browser the logs register it). I've turned off the Linux firewall (disabled SELinux and the IP tables). Can anyone help me understand what's going on? I haven't been able to test if Windows to Windows (separate machines) works or not. Any suggestions?

- Travis
[Message sent by forum member 'travisb' (travisb)]

http://forums.java.net/jive/thread.jspa?messageID=297486

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net