[
https://issues.apache.org/jira/browse/ARTEMIS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15414963#comment-15414963
]
Andreas Hofstadler commented on ARTEMIS-253:
--------------------------------------------
I have the same (or at least a similar problem):
The failure is also intermittent and failure and success depend mainly on the
reliability of the network connection of my development machine. Even when both
ActiveMQ servers are running locally and no connections go over an external
network. Generally when I have my corporate VPN connection active over wireless
LAN it failes nearly all the time, when I deactivate wireless and VPN then it
works nearly all the time.
Symptoms are exactly as described in this bug description. The server does not
create the bridges between the servers.
In my case I actually know at server startup what other ActiveMQ servers are
actually running. Is there any possibility to actually verify that the
connection to that other servers is operational? Best would be to block until
the cluster connection is working?
About the environment:
No discovery group is used and all connectors are configured explicitly.
Neither JGroups nor UDP are configured.
Also configuration is performed using the core API and looks something like
that: (distilled version of actual code)
{code:java}
ConfigurationImpl serverConf = new ConfigurationImpl();
serverConf.setClusterUser(AMQ_CLUSTER_USER);
serverConf.setClusterPassword(AMQ_CLUSTER_PASSWORD);
serverConf.setName("/com/cg/helix/eventing/ActiveMQServer");
serverConf.setSecurityEnabled(false);
serverConf.setMessageCounterEnabled(false);
HostPort serverConn = readOwnServerConfig();
String ownBindingName = bindingName(serverConn);
TransportConfiguration nettyTransport = new TransportConfiguration(
NettyAcceptorFactory.class.getName(),
ImmutableMap.of(
"host", serverConn.getHostName(),
"port", serverConn.getPort()),
"netty");
serverConf.addAcceptorConfiguration(nettyTransport);
serverConf.addConnectorConfiguration(ownBindingName, new
TransportConfiguration(
NettyConnectorFactory.class.getName(),
ImmutableMap.of(
"host", serverConn.getHostName(),
"port", serverConn.getPort()),
ownBindingName));
ClusterConnectionConfiguration clusterConf = new
ClusterConnectionConfiguration();
clusterConf.setName("helix");
clusterConf.setAddress("hlx");
clusterConf.setConnectorName(ownBindingName);
clusterConf.setRetryIntervalMultiplier(2.0);
clusterConf.setAllowDirectConnectionsOnly(false);
List<String> connectors = new ArrayList<>();
for (HostPort other : getKnownOtherNodes()) {
String name = bindingName(other);
TransportConfiguration transport = new TransportConfiguration(
NettyConnectorFactory.class.getName(),
ImmutableMap.of("host", other.getHostName(), "port",
other.getPort()),
name);
serverConf.addConnectorConfiguration(transport.getName(),
transport);
connectors.add(name);
}
clusterConf.setStaticConnectors(connectors);
serverConf.addClusterConfiguration(clusterConf);
// is unreliable with and without scaleDownConfiguration
serverConf.setHAPolicyConfiguration(new LiveOnlyPolicyConfiguration());
/* Skip persistence configuration, it has no effect at all for this bug
*/
{code}
> Cluster is not formed using replication
> ---------------------------------------
>
> Key: ARTEMIS-253
> URL: https://issues.apache.org/jira/browse/ARTEMIS-253
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker
> Affects Versions: 1.1.0
> Reporter: Jeff Mesnil
>
> We have an intermittent failure when using a cluster
> of 2 replicated nodes (both are live nodes).
> In the logs, I have:
> {noformat}
> 18:28:39,833 INFO [org.apache.activemq.artemis.core.server]
> (ServerService Thread Pool -- 70) AMQ221007: Server is now live
> 18:28:39,834 INFO [org.apache.activemq.artemis.core.server]
> (ServerService Thread Pool -- 70) AMQ221001: Apache ActiveMQ Artemis
> Message Broker version 1.1.0-wildfly-6
> [nodeID=f94b61cc-6146-11e5-937b-a3e9631a50ac]
> ...
> 18:28:45,794 INFO [org.apache.activemq.artemis.core.server]
> (ServerService Thread Pool -- 71) AMQ221007: Server is now live
> 18:28:45,794 INFO [org.apache.activemq.artemis.core.server]
> (ServerService Thread Pool -- 71) AMQ221001: Apache ActiveMQ Artemis
> Message Broker version 1.1.0-wildfly-6
> [nodeID=fe8b1275-6146-11e5-b3c8-596354b7fc76]
> ...
> 18:28:46,367 INFO [org.apache.activemq.artemis.core.server] (Thread-4
> (ActiveMQ-server-ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76-7203298))
> AMQ221027: Bridge ClusterConnectionBridge@7edf20
> [name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac,
> queue=QueueImpl[name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac,
> postOffice=PostOfficeImpl
> [server=ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76]]@1a3e7c0
> targetConnector=ServerLocatorImpl
> (identity=(Cluster-connection-bridge::ClusterConnectionBridge@7edf20
> [name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac,
> queue=QueueImpl[name=sf.my-cluster.f94b61cc-6146-11e5-937b-a3e9631a50ac,
> postOffice=PostOfficeImpl
> [server=ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76]]@1a3e7c0
> targetConnector=ServerLocatorImpl
> [initialConnectors=[TransportConfiguration(name=http-connector,
> factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory)
> ?httpUpgradeEnabled=true&port=8080&host=localhost&http-upgrade-endpoint=http-acceptor],
> discoveryGroupConfiguration=null]]::ClusterConnectionImpl@17494988[nodeUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76,
> connector=TransportConfiguration(name=http-connector,
> factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory)
> ?host=localhost&http-upgrade-endpoint=http-acceptor&httpUpgradeEnabled=true&port=8180,
> address=jms,
> server=ActiveMQServerImpl::serverUUID=fe8b1275-6146-11e5-b3c8-596354b7fc76]))
> [initialConnectors=[TransportConfiguration(name=http-connector,
> factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory)
> ?httpUpgradeEnabled=true&port=8080&host=localhost&http-upgrade-endpoint=http-acceptor],
> discoveryGroupConfiguration=null]] is connected
> {noformat}
> This AMQ221027 is a bit hard to read but it basically says that I have
> a connection from server f94b61cc to server fe8b1275...
> However I don't have a corresponding log to show that the bridge is
> also connected from server fe8b1275to server f94b61cc
> When the test passes, I do have a 2nd AMQ221027 in the opposite direction.
> How can I check that a cluster is properly formed? And why is it not always
> the case?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)