Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-18950

Failed to create JMS session Factory on azure standalone cluster when accessed from out side azure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 7.1.0.GA, 7.2.0.GA
    • JMS
    • Hide

      create a two server standalone cluster behind a load balancer in azure and deploy the helloworld-jms quick start example in each. configure the each Jboss instance with azure specfic configuration with the cli commands below. and then run the client application by changing the server ip to the azure load balancer.

      /interface=public/:write-attribute(name=inet-address,value=${jboss.bind.address:0.0.0.0})
      /interface=management/:write-attribute(name=inet-address,value=${jboss.bind.address.management:0.0.0.0})
      /interface=private/:write-attribute(name=inet-address,value=${jboss.bind.address.private:0.0.0.0})
      /interface=unsecure/:write-attribute(name=inet-address,value=${jboss.bind.address.unsecure:0.0.0.0})
      /subsystem=messaging-activemq/server=default:write-attribute(name=cluster-password, value=azure)
      /socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=client-mappings,value=[

      { "destination-address" => "0.0.0.0", "destination-port" => "8080" }

      ])
      /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=http-public:add(host=0.0.0.0,port=${jboss.http.port:8080})
      /subsystem=messaging-activemq/server=default/http-connector=http-public-connector:add(endpoint=http-acceptor, socket-binding=http-public)
      /subsystem=messaging-activemq/server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=connectors, value=["http-public-connector"])

      Show
      create a two server standalone cluster behind a load balancer in azure and deploy the helloworld-jms quick start example in each. configure the each Jboss instance with azure specfic configuration with the cli commands below. and then run the client application by changing the server ip to the azure load balancer. /interface=public/:write-attribute(name=inet-address,value=${jboss.bind.address:0.0.0.0}) /interface=management/:write-attribute(name=inet-address,value=${jboss.bind.address.management:0.0.0.0}) /interface=private/:write-attribute(name=inet-address,value=${jboss.bind.address.private:0.0.0.0}) /interface=unsecure/:write-attribute(name=inet-address,value=${jboss.bind.address.unsecure:0.0.0.0}) /subsystem=messaging-activemq/server=default:write-attribute(name=cluster-password, value=azure) /socket-binding-group=standard-sockets/socket-binding=http:write-attribute(name=client-mappings,value=[ { "destination-address" => "0.0.0.0", "destination-port" => "8080" } ]) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=http-public:add(host=0.0.0.0,port=${jboss.http.port:8080}) /subsystem=messaging-activemq/server=default/http-connector=http-public-connector:add(endpoint=http-acceptor, socket-binding=http-public) /subsystem=messaging-activemq/server=default/connection-factory=RemoteConnectionFactory:write-attribute(name=connectors, value= ["http-public-connector"] )

      Setup the helloworld-jms(https://github.com/jboss-developer/jboss-eap-quickstarts/tree/7.1/helloworld-jms) application on azure standalone cluster behind the load balancers.
      And try to accessed the client application by providing the IP of loadbalancer (cluster members have provate IP), it failed with the following error

      [INFO] — exec-maven-plugin:1.6.0:java (default-cli) @ helloworld-jms —
      Mar 13, 2020 3:19:50 PM org.wildfly.naming.client.Version <clinit>
      INFO: WildFly Naming version 1.0.7.Final-redhat-1
      Mar 13, 2020 3:19:50 PM org.wildfly.security.Version <clinit>
      INFO: ELY00001: WildFly Elytron version 1.1.7.Final-redhat-1
      Mar 13, 2020 3:19:50 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
      INFO: Attempting to acquire connection factory "jms/RemoteConnectionFactory"
      Mar 13, 2020 3:19:50 PM org.xnio.Xnio <clinit>
      INFO: XNIO version 3.5.4.Final-redhat-1
      Mar 13, 2020 3:19:50 PM org.xnio.nio.NioXnio <clinit>
      INFO: XNIO NIO Implementation Version 3.5.4.Final-redhat-1
      Mar 13, 2020 3:19:50 PM org.jboss.remoting3.EndpointImpl <clinit>
      INFO: JBoss Remoting version 5.0.5.Final-redhat-1
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      Mar 13, 2020 3:19:52 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
      INFO: Found connection factory "jms/RemoteConnectionFactory" in JNDI
      Mar 13, 2020 3:19:52 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
      INFO: Attempting to acquire destination "jms/queue/test"
      Mar 13, 2020 3:19:53 PM org.jboss.as.quickstarts.jms.HelloWorldJMSClient main
      INFO: Found destination "jms/queue/test" in JNDI
      [WARNING]
      javax.jms.JMSRuntimeException: Failed to create session factory
      at org.apache.activemq.artemis.jms.client.JmsExceptionUtils.convertToRuntimeException (JmsExceptionUtils.java:88)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext (ActiveMQConnectionFactory.java:292)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext (ActiveMQConnectionFactory.java:280)
      at org.jboss.as.quickstarts.jms.HelloWorldJMSClient.main (HelloWorldJMSClient.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
      at java.lang.Thread.run (Thread.java:748)
      Caused by: javax.jms.JMSException: Failed to create session factory
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal (ActiveMQConnectionFactory.java:757)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext (ActiveMQConnectionFactory.java:287)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext (ActiveMQConnectionFactory.java:280)
      at org.jboss.as.quickstarts.jms.HelloWorldJMSClient.main (HelloWorldJMSClient.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
      at java.lang.Thread.run (Thread.java:748)
      Caused by: org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException: AMQ119007: Cannot connect to server(s). Tried with all available servers.
      at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory (ServerLocatorImpl.java:787)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal (ActiveMQConnectionFactory.java:755)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext (ActiveMQConnectionFactory.java:287)
      at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createContext (ActiveMQConnectionFactory.java:280)
      at org.jboss.as.quickstarts.jms.HelloWorldJMSClient.main (HelloWorldJMSClient.java:73)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:282)
      at java.lang.Thread.run (Thread.java:748)
      [WARNING] thread Thread[XNIO-1 I/O-1,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] was interrupted but is still alive after waiting at least 14999msecs
      [WARNING] thread Thread[XNIO-1 I/O-1,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 Accept,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-1,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-2,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-3,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-4,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-5,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-6,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-7,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-8,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-9,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-10,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-11,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-12,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-13,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-14,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-15,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] thread Thread[XNIO-1 task-16,5,org.jboss.as.quickstarts.jms.HelloWorldJMSClient] will linger despite being asked to die via interruption
      [WARNING] NOTE: 18 thread(s) did not finish despite being asked to via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
      [WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=org.jboss.as.quickstarts.jms.HelloWorldJMSClient,maxpri=10]
      java.lang.IllegalThreadStateException
      at java.lang.ThreadGroup.destroy (ThreadGroup.java:778)
      at org.codehaus.mojo.exec.ExecJavaMojo.execute (ExecJavaMojo.java:321)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke (Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 53.891 s
      [INFO] Finished at: 2020-03-13T15:20:30+05:30
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project helloworld-jms: An exception occured while executing the Java class. Failed to create session factory: AMQ119007: Cannot connect to server(s). Tried with all available servers. -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

              ehugonne1@redhat.com Emmanuel Hugonnet
              sratna Sridhar Reddy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: