2 Replies Latest reply on Feb 27, 2018 5:08 PM by thoshaw

    Wildfly on RedHat 7.4 JMS Client on AIX 7.1Cannot Connect

    thoshaw

      Using Wildfly 8.2.1 on RedHat 7.4 and have an AIX 7.1 that is getting error:  javax.naming.NamingException: Unable to invoke lookup, status=WAITING

      Started up Wildfly using the -b option.  Telnet from AIX 7.1 to RedHat 7.4 running Wildfly shows port 9990 is open.  Also telnet from AIX 7.1 to RedHat 7.4 on port 8080 is open.

       

      It does not seem to be a firewall issue.

       

      Any ideas on a solution?

       

      # === Below is the AIX Information ======

      oslevel -s 

      7100-04-04-1717

       

      /usr/java8/jre/bin/java

      java version "1.8.0"

      Java(TM) SE Runtime Environment (build pap3280sr4fp10-20170727_01(SR4 FP10))

      IBM J9 VM (build 2.8, JRE 1.8.0 AIX ppc-32 20170722_357405 (JIT enabled, AOT enabled)

      J9VM - R28_20170722_0201_B357405

      JIT  - tr.r14.java_20170722_357405

      GC   - R28_20170722_0201_B357405

      J9CL - 20170722_357405)

      JCL - 20170726_01 based on Oracle jdk8u144-b01

      Feb 26, 2018 4:31:07 PM org.xnio.Xnio <clinit>

       

      INFO: XNIO version 3.3.0.Final

      Feb 26, 2018 4:31:07 PM org.xnio.nio.NioXnio <clinit>

      INFO: XNIO NIO Implementation Version 3.3.0.Final

      Feb 26, 2018 4:31:07 PM org.jboss.remoting3.EndpointImpl <clinit>

      INFO: JBoss Remoting version 4.0.7.Final

      connected

      javax.naming.NamingException: Unable to invoke lookup, status=WAITING

              at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:98)

              at org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1.lookup(RemoteNamingStoreV1.java:95)

              at org.jboss.naming.remote.client.HaRemoteNamingStore$1.operation(HaRemoteNamingStore.java:276)

              at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:132)

              at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:272)

              at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:87)

              at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:129)

              at javax.naming.InitialContext.lookup(InitialContext.java:428)

              at ContextHelper.getQueueConnectionFactory(ContextHelper.java:52)

              at ContextHelper.main(ContextHelper.java:63)

        • 1. Re: Wildfly on RedHat 7.4 JMS Client on AIX 7.1Cannot Connect
          jaikiran

          There was a similar issue reported with almost the exact same setup and versions here Re: Wildfly on Redhat 7.4 . Not sure if it's someone from your team, but either way, I don't see any obvious issues unless maybe it's a genuine connection timeout. Maybe the 5 seconds is too small for the connection to establish.

           

          Can you pass the following property in your lookup code as part of the InitialContext lookup:

           

          Properties properties = new Properties();
          
          // 60 second timeout instead of the default 5 seconds
          properties.put("jboss.naming.client.connect.timeout", "60000");
          ...// other relevant properties
          
          InitialContext jndiContext = new InitialContext(properties);
               
          ... // do the lookup

          The jboss.naming.client.connect.timeout property is being configured to use a 60 second timeout. Give it a try and see if it helps. If not, please post the (new) complete exception stacktrace.

          • 2. Re: Wildfly on RedHat 7.4 JMS Client on AIX 7.1Cannot Connect
            thoshaw

            Hi Jaikiran,

             

            Added the timeout but still getting the same results.

            Below are the details.

             

             

            import javax.jms.*;

            import javax.naming.*;

            import java.util.Properties;

             

            public class ContextHelper {

             

                private static ContextHelper _instance;

                private InitialContext _ic;

             

                /**

                 * Get Singleton instance.

                */

                public static ContextHelper getInstance(String host, String port) {

                    if (_instance == null) {

                        _instance = new ContextHelper(host, port);

                    }

             

                    return _instance;

                }

             

                private ContextHelper(String host, String port) {

                    try {

                        _ic = getInitialNamingContext(host, port);

                    } catch( Exception e ) {

                        e.printStackTrace();

                        System.exit(1);

                    }

                }

             

                public InitialContext getInitialNamingContext(String host, String port) throws Exception {

             

                    Properties properties = new Properties();

             

                    properties.put(Context.SECURITY_PRINCIPAL, "xxxxx");

                    properties.put(Context.SECURITY_CREDENTIALS, "xxxxx");

             

                    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");

                    properties.put(Context.PROVIDER_URL, "http-remoting://"+host+":"+port);

             

                    properties.put("jboss.naming.client.connect.timeout", "600000");

             

                    InitialContext jndiContext = new InitialContext(properties);

             

                    return jndiContext;

                }

             

             

                public QueueConnectionFactory getQueueConnectionFactory() throws Exception {

             

             

                    return (QueueConnectionFactory)_ic.lookup( "jms/RemoteConnectionFactory" ) ;

                }

             

             

             

             

                public static void main(String[] args) {

             

             

                    String host = args[0];

                    String port = args[1];

                    try {

                        ContextHelper _contextHelper = ContextHelper.getInstance(host, port);

                        System.out.println("connected");

                        QueueConnectionFactory qf = _contextHelper.getQueueConnectionFactory();

                        System.out.println("got queue");

                    } catch (Exception e) {

                        e.printStackTrace();

                    }

                }

            }

             

            # =================== Testing Restults ==============

             

            /usr/java8/jre/bin/java

            java version "1.8.0"

            Java(TM) SE Runtime Environment (build pap3280sr4fp10-20170727_01(SR4 FP10))

            IBM J9 VM (build 2.8, JRE 1.8.0 AIX ppc-32 20170722_357405 (JIT enabled, AOT enabled)

            J9VM - R28_20170722_0201_B357405

            JIT  - tr.r14.java_20170722_357405

            GC   - R28_20170722_0201_B357405

            J9CL - 20170722_357405)

            JCL - 20170726_01 based on Oracle jdk8u144-b01

             

            Tue Feb 27 16:58:29 EST 2018

             

            Feb 27, 2018 4:58:31 PM org.xnio.Xnio <clinit>

            INFO: XNIO version 3.3.0.Final

            Feb 27, 2018 4:58:31 PM org.xnio.nio.NioXnio <clinit>

            INFO: XNIO NIO Implementation Version 3.3.0.Final

            Feb 27, 2018 4:58:31 PM org.jboss.remoting3.EndpointImpl <clinit>

            INFO: JBoss Remoting version 4.0.7.Final

            connected

            javax.naming.NamingException: Unable to invoke lookup, status=WAITING

                    at org.jboss.naming.remote.protocol.v1.Protocol$1.execute(Protocol.java:98)

                    at org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1.lookup(RemoteNamingStoreV1.java:95)

                    at org.jboss.naming.remote.client.HaRemoteNamingStore$1.operation(HaRemoteNamingStore.java:276)

                    at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:132)

                    at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:272)

                    at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:87)

                    at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:129)

                    at javax.naming.InitialContext.lookup(InitialContext.java:428)

                    at ContextHelper.getQueueConnectionFactory(ContextHelper.java:55)

                    at ContextHelper.main(ContextHelper.java:66)

             

            Tue Feb 27 16:58:43 EST 2018