Hi Luca, the `artemis` connector in the broker.xml files must use the container IP address so other broker instances are able to connect to it when it is discovered, see my answer to a similar question on stackoverflow[1].
Docker Compose makes deploying microservice applications very easy but it has some limitations for a production environment. I would take a look at the open source artemiscloud.io project, it is a collection of container images that provide a way to deploy the Apache ActiveMQ Artemis Broker on Kubernetes. [1] https://stackoverflow.com/questions/69531342/configuration-for-activemq-artemis-cluster-on-many-docker-containers/69536410#69536410 Regards, Domenico On Sun, 13 Mar 2022 at 23:29, Luca Santaniello < [email protected]> wrote: > Hi all, > I created a custom docker compose in order to create an artemis cluster > with 3 nodes > > my broker.xml (attached) configuration file is the same for all nodes. > > During initialization I have a warning for each node > > node0_1 | 2022-03-13 21:29:31,408 WARN >> [org.apache.activemq.artemis.core.client] AMQ212025: did not connect the >> cluster connection to other nodes: ActiveMQIllegalStateException[errorTyp >> >> e=ILLEGAL_STATE message=AMQ219024: Could not select a >> TransportConfiguration to create SessionFactory] >> node0_1 | at >> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:677) >> [artemis-core-client-2.20.0.jar:2.20.0] >> node0_1 | at >> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:549) >> [artemis-core-client-2.20.0.jar:2.20.0] >> node0_1 | at >> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:528) >> [artemis-core-client-2.20.0.jar:2.20.0] >> node0_1 | at >> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl$4.run(ServerLocatorImpl.java:491) >> [artemis-core-client-2.20.0.jar:2.20.0] >> node0_1 | at >> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) >> [artemis-commons-2.20.0.jar:] >> node0_1 | at >> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) >> [artemis-commons-2.20.0.jar:] >> node0_1 | at >> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) >> [artemis-commons-2.20.0.jar:] >> node0_1 | at >> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) >> [java.base:] >> node0_1 | at >> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) >> [java.base:] >> node0_1 | at >> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) >> [artemis-commons-2.20.0.jar:] > > > When I create a consumer I have this error: > > node1_1 | 2022-03-13 21:54:48,699 ERROR >> [org.apache.activemq.artemis.core.server] AMQ224037: cluster connection >> Failed to handle message: java.lang.IllegalStateException: Cannot find >> binding for mnerief34252a-a317-11ec-a5a8-0242ac120003 on >> ClusterConnectionImpl@117885704[nodeUUID=ef34252a-a317-11ec-a5a8-0242ac120003, >> connector=TransportConfiguration(name=artemis, >> factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) >> ?port=61616&host=0-0-0-0, address=, server=ActiveMQServerImpl::name=0.0.0.0] >> node1_1 | at >> org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.doConsumerCreated(ClusterConnectionImpl.java:1419) >> [artemis-server-2.20.0.jar:2.20.0] >> node1_1 | at >> org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.handleNotificationMessage(ClusterConnectionImpl.java:1132) >> [artemis-server-2.20.0.jar:2.20.0] >> node1_1 | at >> org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl$MessageFlowRecordImpl.onMessage(ClusterConnectionImpl.java:1107) >> [artemis-server-2.20.0.jar:2.20.0] >> node1_1 | at >> org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1013) >> [artemis-core-client-2.20.0.jar:2.20.0] >> node1_1 | at >> org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1133) >> [artemis-core-client-2.20.0.jar:2.20.0] >> node1_1 | at >> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42) >> [artemis-commons-2.20.0.jar:] >> node1_1 | at >> org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31) >> [artemis-commons-2.20.0.jar:] >> node1_1 | at >> org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65) >> [artemis-commons-2.20.0.jar:] >> node1_1 | at >> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) >> [java.base:] >> node1_1 | at >> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) >> [java.base:] >> node1_1 | at >> org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) >> [artemis-commons-2.20.0.jar:] >> node1_1 | >> node1_1 | 2022-03-13 21:54:48,704 INFO >> [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841010: routed >> message with ID: 86, result: NO_BINDINGS > > > Could you please support me? > > Thanks > Luca > >
