Wildfly 23: JMS connection fails behind Kubernetes Ingress reverse proxy

1,063 views
Skip to first unread message

Arkady Zelekman

unread,
May 6, 2021, 8:45:11 AM5/6/21
to WildFly
Hi, team

We are working with JMS topics in our application based on Wildfly 23. When it is not behind Kubernetes Ingress - everything works well.

When our application is behind Kubernetes Ingress - JMS connection to our topic fails.

Can someone provide a reference how to define this correctly ? Which changes should be done in standalone.xml ?

Thanks in advance.

Emmanuel Hugonnet

unread,
May 6, 2021, 9:42:35 AM5/6/21
to Arkady Zelekman, WildFly
Hello,
How are your JMS brokers configured ? How does it fail ? Is the initial connection a success until it tries to get the topology ?
I think the problem may lies there: you need to go through Ingress for all the connections. You might try to set
use-topology-for-load-balancing
<https://docs.wildfly.org/20/wildscribe/subsystem/messaging-activemq/pooled-connection-factory/index.html#attr-use-topology-for-load-balancing>
to false on your connection factories.

Emmanuel
> --
> You received this message because you are subscribed to the Google Groups "WildFly" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com
> <mailto:wildfly+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wildfly/aa82f80d-bdcb-46dc-8a93-f6fb5020e363n%40googlegroups.com
> <https://groups.google.com/d/msgid/wildfly/aa82f80d-bdcb-46dc-8a93-f6fb5020e363n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Arkady Zelekman

unread,
May 9, 2021, 4:44:37 AM5/9/21
to WildFly
Hi, Emmanuel

My connection factory define following in standalone.xml

<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/ConnectionFactory jms/ConnectionFactory" use-topology-for-load-balancing="false" connectors="http-connector"/> 

From code of client I am doing:

ActiveMQConnectionFactory acf = initialContet.lookup ("jms/ConnectionFactory");  // This is succeeded
act.createConnection(); // This is fails

2021-05-09 11:24:39 [main] ERROR messaging.client.MessagingManager  - ERROR: Exception was thrown in openConnection: Failed to create session factory
javax.jms.JMSException: Failed to create session factory
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:886)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:299)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:294)
at com.allot.nms.common.messaging.client.MessagingManager.openConnection(MessagingManager.java:65)
at com.allot.nms.common.messaging.client.MessagingManager.main(MessagingManager.java:80)
Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ219007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:703)
at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:884)
... 4 more
Reply all
Reply to author
Forward
0 new messages