> On the other hand I see that org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl#broadcastConnectors method is being called constantly (I configured it to be called every second), yet the receiver endpoint there is always null.
I'm not exactly sure what you're describing here. If the "endpoint" variable in org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl#broadcastConnectors is null then you'd receive a NullPointerException. Is that what you're seeing? In terms of your configuration I see a couple problems: 1) The "netty-connector" which is referenced in the "connector-ref" of your broadcast-group which *should* be telling the other nodes in the cluster how they can connect to the node doing the broadcasting refers to "localhost". When another node in the cluster receives this connector information the node that received it will use that connector information and ultimately create a cluster connection to *itself* since the connector is pointing to "localhost." This is definitely not what you want. The connector for each of your nodes should be the real IP address or hostname of the box running the broker. 2) The JDBC_PING configuration is pointing to a database running on "localhost." As I understand it, the point of using the database is that all the nodes would use the *same* database so they can share information with each other. If each node running on a different machine is using a database running on "localhost" then every node will be using a different database which will prevent the cluster from forming. Justin On Mon, Sep 25, 2017 at 2:56 PM, grishezz <[email protected]> wrote: > Thanks! that was indeed my mistake. (btw, the documentation doesn't include > any such examples, nor does the code examples project) > > I have now configured the clients with this url: > > jgroups://active_broadcast_channel?file=WEB-INF/conf/ > test-jgroups-jdbc_ping.xml&refreshTimeout=30000& > discoveryInitialWaitTimeout=30000 > > However now the clients can not connect at all. They receive this error: > ActiveMQConnectionTimedOutException[errorType=CONNECTION_TIMEDOUT > message=AMQ119012: Timed out waiting to receive initial broadcast from > cluster > > Meaning, as far as I understand, they do not receive a topology broadcast > notification. On the other hand I see that > org.apache.activemq.artemis.core.server.cluster.impl.BroadcastGroupImpl# > broadcastConnectors > method is being called constantly (I configured it to be called every > second), yet the receiver endpoint there is always null. So this is another > configuration problem I assume. > > For reference I am copying my settings below: > > <?xml version='1.0'?> > <configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="urn:activemq" > xsi:schemaLocation="urn:activemq > /schema/artemis-server.xsd"> > > <core xmlns="urn:activemq:core"> > > > <bindings-directory>${data.dir}/server0/data/messaging/ > bindings</bindings-directory> > > > <journal-directory>${data.dir}/server0/data/messaging/ > journal</journal-directory> > > > <large-messages-directory>${data.dir}/server0/data/ > messaging/largemessages</large-messages-directory> > > > <paging-directory>${data.dir}/server0/data/messaging/paging< > /paging-directory> > > <connectors> > <connector > name="netty-connector">tcp://localhost:61616</connector> > </connectors> > > > <acceptors> > <acceptor name="netty-acceptor">tcp:// > localhost:61616</acceptor> > </acceptors> > > > > <broadcast-groups> > <broadcast-group name="my-broadcast-group"> > <broadcast-period>1000</broadcast-period> > > <jgroups-file>WEB-INF/conf/test-jgroups-jdbc_ping.xml</jgroups-file> > <jgroups-channel>active_broadcast_channel</jgroups- > channel> > <connector-ref>netty-connector</connector-ref> > </broadcast-group> > </broadcast-groups> > > <discovery-groups> > <discovery-group name="my-discovery-group"> > > <jgroups-file>WEB-INF/conf/test-jgroups-jdbc_ping.xml</jgroups-file> > <jgroups-channel>active_broadcast_channel</jgroups- > channel> > <refresh-timeout>1000</refresh-timeout> > </discovery-group> > </discovery-groups> > > <cluster-connections> > <cluster-connection name="my-cluster"> > <connector-ref>netty-connector</connector-ref> > <call-timeout>1000</call-timeout> > <retry-interval>500</retry-interval> > <use-duplicate-detection>true</use-duplicate-detection> > <message-load-balancing>OFF</message-load-balancing> > <max-hops>1</max-hops> > <call-failover-timeout>1000</call-failover-timeout> > <discovery-group-ref > discovery-group-name="my-discovery-group"/> > </cluster-connection> > </cluster-connections> > > <ha-policy> > <replication> > <master> > <cluster-name>my-cluster</cluster-name> > <check-for-live-server>true</check-for-live-server> > </master> > </replication> > </ha-policy> > > > <configuration-file-refresh-period>1000</configuration- > file-refresh-period> > > <address-settings> > <address-setting match="jms.queue.*"> > <auto-delete-jms-queues>false</auto-delete-jms-queues> > <auto-delete-jms-topics>false</auto-delete-jms-topics> > </address-setting> > </address-settings> > > > > <security-settings> > > <security-setting match="#"> > <permission type="createDurableQueue" roles="guest"/> > <permission type="deleteDurableQueue" roles="guest"/> > <permission type="createNonDurableQueue" roles="guest"/> > <permission type="deleteNonDurableQueue" roles="guest"/> > <permission type="consume" roles="guest"/> > <permission type="send" roles="guest"/> > </security-setting> > </security-settings> > > </core> > </configuration> > > and JGroups config xml: > <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="urn:org:jgroups" > xsi:schemaLocation="urn:org:jgroups > http://www.jgroups.org/schema/jgroups.xsd"> > <TCP loopback="true" > recv_buf_size="${tcp.recv_buf_size:5M}" > send_buf_size="${tcp.send_buf_size:5M}" > max_bundle_size="64K" > max_bundle_timeout="30" > use_send_queues="true" > sock_conn_timeout="300" > > timer_type="new3" > timer.min_threads="4" > timer.max_threads="10" > timer.keep_alive_time="3000" > timer.queue_max_size="500" > > thread_pool.enabled="true" > thread_pool.min_threads="2" > thread_pool.max_threads="8" > thread_pool.keep_alive_time="5000" > thread_pool.queue_enabled="true" > thread_pool.queue_max_size="10000" > thread_pool.rejection_policy="discard" > > oob_thread_pool.enabled="true" > oob_thread_pool.min_threads="1" > oob_thread_pool.max_threads="8" > oob_thread_pool.keep_alive_time="5000" > oob_thread_pool.queue_enabled="false" > oob_thread_pool.queue_max_size="100" > oob_thread_pool.rejection_policy="discard"/> > > <JDBC_PING > connection_url="jdbc:hsqldb:hsql://localhost:9001/mvdb;hsqldb.tx=mvcc" > connection_username="sa" connection_password="" > connection_driver="org.hsqldb.jdbcDriver" > initialize_sql="" > /> > <MERGE3 min_interval="10000" > max_interval="30000"/> > <FD_SOCK/> > <FD timeout="3000" max_tries="3" /> > <VERIFY_SUSPECT timeout="1500" /> > <BARRIER /> > <pbcast.NAKACK2 use_mcast_xmit="false" > discard_delivered_msgs="true"/> > <UNICAST3 /> > <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" > max_bytes="4M"/> > <pbcast.GMS print_local_addr="true" join_timeout="2000" > view_bundling="true"/> > <MFC max_credits="2M" > min_threshold="0.4"/> > <FRAG2 frag_size="60K" /> > <pbcast.STATE_TRANSFER/> > </config> > > > > > -- > Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User- > f2341805.html >
