users@glassfish.java.net

Glassfish ORBTCPTimeouts problem

From: <glassfish_at_javadesktop.org>
Date: Tue, 20 Jan 2009 04:03:05 PST

Hi,
i have a sample code block that makes lookup to a target GF and calls one of the methods of the sample stateless ejb. I want to implement my own fail-over scenario for RMI-IIOP because of some deficiencies of GF cluster RMI-IIOP fail-over scenario.

i want to decrease the ORBConnectiontimeout values. i've found http://blogs.sun.com/ejcorba/entry/client_side_transport_timeouts_and link on the internet, i've set related properties to my owns, but it doesn't affect. how can i change these timeout values???


(i gave -Dcom.sun.corba.ee.transport.ORBTCPConnectTimeouts=100:1000:1:100 arg to java process.)
this is my sample code (192.168.22.77 is an invaild IP address):
        public static void main(String[] args) {
                try { System.out.println(System.getProperty("com.sun.corba.ee.transport.ORBTCPTimeouts"));
                                System.out.println(System.getProperty("com.sun.corba.ee.transport.ORBTCPConnectTimeouts"));
                                
                                Properties props = new Properties();
                                props.setProperty("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost","192.168.22.77");
props.setProperty("org.omg.CORBA.ORBInitialPort", "33701");

                                Context ic = new InitialContext(props);

                                SlessTrialRemote slessTrialRemote = (SlessTrialRemote) ic
                                                .lookup(SlessTrialRemote.EJB_MAPPED_NAME);
                                slessTrialRemote.trialMethod_2();

                } catch (Exception e) {
                        e.printStackTrace();
                }
        }


this is log:

null
100:1000:1:100

Jan 19, 2009 6:58:34 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 192.168.22.77; port: 33701"
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:134)
        at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
        at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at tr.com.argela.ejbtester.EjbTester.main(EjbTester.java:106)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect
        at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
        ... 13 more
Caused by: java.net.ConnectException: Connection timed out: 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)
        ... 14 more
Jan 19, 2009 7:01:48 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 192.168.22.77; port: 33701"
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:134)
        at com.sun.enterprise.naming.SerialContext.getRemoteProvider(SerialContext.java:220)
        at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:159)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:409)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at tr.com.argela.ejbtester.EjbTester.main(EjbTester.java:106)
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect
        at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:347)
        at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:244)
        ... 13 more
Caused by: java.net.ConnectException: Connection timed out: 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)
        ... 14 more


Thanks...

Selim
[Message sent by forum member 'ssoyut' (ssoyut)]

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