-
1. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 24, 2016 5:43 PM (in response to pdbramble)I've tried the interface / messaging solution, but it didn't work.
What exactly is the "interface / messaging solution" that you tried?
-
2. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 24, 2016 5:43 PM (in response to pdbramble)Also, what exactly is the client doing when it attempts to connect and fails?
-
3. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
pdbramble Aug 24, 2016 6:01 PM (in response to jbertram)InitialContext ctx = (InitialContext) jmsConnectInfo.getContext();
JobMessageProducer queueSender = new JobMessageProducer();
qconFactory = (QueueConnectionFactory) ctx.lookup(jmsConnectInfo.getConnectionFactoryName());
dies--> qcon = qconFactory.createQueueConnection(jmsConnectInfo.getUserName(), jmsConnectInfo.getPassword());
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = (Queue) ctx.lookup(jmsConnectInfo.getDestinationName());
qsender = qsession.createSender(queue);
qcon.start();
-
4. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 24, 2016 6:08 PM (in response to pdbramble)InitialContext ctx = (InitialContext) jmsConnectInfo.getContext();
What are the properties in this context?
qconFactory = (QueueConnectionFactory) ctx.lookup(jmsConnectInfo.getConnectionFactoryName());
What's the lookup string here?
Also, what exactly is the "interface / messaging solution" that you tried?
-
5. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
pdbramble Aug 24, 2016 6:40 PM (in response to jbertram)as for " the "interface / messaging solution" that you tried?"
I followed you suggestion in another post and tried this:
<interface name="jni-interface">
<inet-address value="${jboss.bind.address:dcooapetl01}"/>
</interface>
<socket-binding name="http" port="${jboss.http.port:5757}" interface="jni-interface"/>
I chose the http port because the RemoteConnectionFactory config specified : connectors="http-connector"
which specified a connector-ref of default, which seemed to link to http.
(btw: jni-interface was a bad naming choice - don't let it confuse things)
As for properties, I see:
The properties I see from ctx.getEnvironment:
java.naming.provider.url:http-remoting ://dcooapetl01:5757
java.naming.ldap.version: 3
java.naming.factory.url.pkgs :org.jboss.naming:org.jnp.interfaces
jmsConnectInfo.getConnectionFactoryName():jms/RemoteConnectionFactory
qconFactory:ActiveMQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=null, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&port=5757&httpPpgradeEndpoint=http-acceptor&host=dcooapetl01-abacus-us-com], discoveryGroupConfiguration=null], clientID=null, consumerWindowSize = 1048576, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false]
And some results of previous lines:
Connection Factory Name:jms/RemoteConnectionFactory
DestinationName:queue/com.online.oap.job.OapDwEtlQueue
Host URL:http-remoting://dcooapetl01:5757
-
6. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 24, 2016 8:11 PM (in response to pdbramble)So according to the connection factory details it's trying to connect to dcooapetl01.abacus.us.com:5757. Is that specific hostname:port visible to the client?
-
7. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
pdbramble Aug 25, 2016 1:45 PM (in response to jbertram)I can telent to dcooapetel01.abacus-us.com:5757 from another system while the server is running, so I would say that I can.
-
8. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 25, 2016 2:38 PM (in response to pdbramble)I can telent to dcooapetel01.abacus-us.com:5757 from another system while the server is running, so I would say that I can.
I don't mean to belabor this, but I'm still not quite clear. When you say "another system" are you in fact referring to the system that is currently running the messaging client and receiving the "Cannot connect to server(s)" error?
-
9. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
pdbramble Aug 25, 2016 2:56 PM (in response to jbertram)Sorry I wasn't clear.
I ran my wildfly server on dcooapetl01, then logged onto another Linux system and successfully teleneted to dcooapetel01.abacus-us.com:5757.
dcooapetl01 is the system that runs the messaging client, and receiving the "Cannot connect to server(s) error.
-
10. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 25, 2016 3:01 PM (in response to pdbramble)I ran my wildfly server on dcooapetl01...dcooapetl01 is the system that runs the messaging client, and receiving the "Cannot connect to server(s) error.
So Wildfly and the messaging client are running on the same server (i.e. dcooapetl01)? I thought the use-case here was a remote client connecting to Wildfly. Can you clarify?
-
11. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
pdbramble Aug 25, 2016 3:27 PM (in response to jbertram)My Bad - when I looked at the Client UI's URL, it is running on dcooapetl01:5757 as well.
I chose 5757 for the http-remoting port based on how we did the JMS messaging in the past (where we used 8080 on the "old" jboss server)
-
12. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 25, 2016 4:09 PM (in response to pdbramble)My Bad - when I looked at the Client UI's URL, it is running on dcooapetl01:5757 as well.
The client is running on dcooapetl01:5757 or it's connecting to dcooapetl01:5757?
I'm pretty confused at this point so maybe it would be better to hit the reset button and explain the full use-case from scratch including hostnames and ports where every component is running.
-
13. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
pdbramble Aug 25, 2016 4:48 PM (in response to jbertram)I'd be happy to.
1) I am in the process of setting up and running wildfly 10.1.0.CR1 to run on system dcooapetl01, with the following socket bindings:
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:5790}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:5793}"/>
<socket-binding name="ajp" port="${jboss.ajp.port:5709}"/>
<socket-binding name="http" port="${jboss.http.port:5757}" interface="jni-interface"/>
<socket-binding name="https" port="${jboss.https.port:5743}"/>
<socket-binding name="iiop" interface="unsecure" port="5228"/>
<socket-binding name="iiop-ssl" interface="unsecure" port="5229"/>
<socket-binding name="txn-recovery-environment" port="5712"/>
<socket-binding name="txn-status-manager" port="5713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
I have been told that we must run it with this binding:
-b 0.0.0.0
To run this server, I execute:
./standalone.sh -c standalone-full.xml -b 0.0.0.0 -bmanagement=0.0.0.0.
Based on what I saw on this forum regarded this 0.0.0.0 binding, I added this interface, poorly named jni-interface:
<interface name="jni-interface">
<inet-address value="${jboss.bind.address:dcooapetl01}"/>
</interface>
2) We also have an old JBoss server running on this system. It's running on the default JBoss ports (8080 and the like).
3) The client UI is running on dcooapetl01 port 5757 as well. When I initiate an action on the system, I get a message saying that the job was submitted to the queue (might be our message) we get the following error messages (the full log is attached):
14:17:31,981 ERROR [stderr] (default task-20) javax.jms.JMSException: Failed to create session factory
14:17:31,981 ERROR [stderr] (default task-20) at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:727)
14:17:31,982 ERROR [stderr] (default task-20) at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:284)
14:17:31,982 ERROR [stderr] (default task-20) at com.epsilon.online.ice.ui.util.JobMessageProducer.send(JobMessageProducer.java:60)
The stack trace also yields:
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:777)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:724)
... 76 more
JobMessageProducer.java:60 is :
InitialContext ctx = (InitialContext) jmsConnectInfo.getContext();
JobMessageProducer queueSender = new JobMessageProducer();
qconFactory = (QueueConnectionFactory) ctx.lookup(jmsConnectInfo.getConnectionFactoryName());
60:> qcon = qconFactory.createQueueConnection(jmsConnectInfo.getUserName(), jmsConnectInfo.getPassword());
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = (Queue) ctx.lookup(jmsConnectInfo.getDestinationName());
qsender = qsession.createSender(queue);
qcon.start();
I have verified that we have a user with a "guest" role and that its username and password are correct.
I have verified that port 5757 is reachable from a different Linux system.
I print the properties immediately before executing line 60. They are:
The properties I see from ctx.getEnvironment:
java.naming.provider.url:http-remoting ://dcooapetl01:5757
java.naming.ldap.version: 3
java.naming.factory.url.pkgs :org.jboss.naming:org.jnp.interfaces
jmsConnectInfo.getConnectionFactoryName():jms/RemoteConnectionFactory
qconFactory:ActiveMQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=null, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&port=5757&httpPpgradeEndpoint=http-acceptor&host=dcooapetl01-abacus-us-com], discoveryGroupConfiguration=null], clientID=null, consumerWindowSize = 1048576, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false]
Thanks!!!
-
14. Re: Wildfly 10.1.0.CR1 - Yet Another javax.jms.JMSException: Failed to create session factory / Cannot connect to server(s). Tried with all available servers Question
jbertram Aug 25, 2016 4:59 PM (in response to pdbramble)I am in the process of setting up and running wildfly 10.1.0.CR1 to run on system dcooapetl01...The client UI is running on dcooapetl01 port 5757 as well.
I take this to mean that both the server and the client are actually in the same JVM. Is that correct? If so, try using an empty initial context and "java:/ConnectionFactory" for your JNDI lookup. If not, please elaborate on how both the client and server can be running on dcooapetl01:5757 simultaneously without being in the same JVM.