You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config config = new Config();
//This is important to enable the discovery strategy
config.setProperty(GroupProperty.DISCOVERY_SPI_ENABLED, "true");
config.setProperty(GroupProperty.DISCOVERY_SPI_PUBLIC_IP_ENABLED, "true");
config.setProperty(GroupProperty.SOCKET_CLIENT_BIND_ANY, "false");
config.setProperty(GroupProperty.SOCKET_BIND_ANY, "false");
NetworkConfig networkConfig = config.getNetworkConfig();
networkConfig.setPublicAddress(System.getenv("HOST") + ":" + System.getenv("PORT_5071"));
for(Map.Entry<String, String> item : System.getenv().entrySet()) {
log.info(item.getKey() + " => " + item.getValue());
}
JoinConfig joinConfig = networkConfig.getJoin();
joinConfig.getTcpIpConfig().setEnabled(false);
joinConfig.getMulticastConfig().setEnabled(false);
joinConfig.getAwsConfig().setEnabled(false);
DiscoveryConfig discoveryConfig = joinConfig.getDiscoveryConfig();
//Set the discovery strategy to RangerDiscoveryStrategy
DiscoveryStrategyConfig discoveryStrategyConfig = new DiscoveryStrategyConfig(new MarathonDiscoveryStrategyFactory());
//Marathon master endpoint that can provide app metadata
discoveryStrategyConfig.addProperty("marathon-endpoint", "http://XXXX:8080");
//Namespace that needs to be used by ranger for this service
discoveryStrategyConfig.addProperty("app-id", "YYYY");
//Hazelcast port index that is used in marathon configuration
discoveryStrategyConfig.addProperty("port-index", "2");
discoveryConfig.addDiscoveryStrategyConfig(discoveryStrategyConfig);
this.hzInstance = Hazelcast.newHazelcastInstance(config);
And here is the output, deploying 2 docker images towards marathon:
Node 1:
06:45:17.712 [main] INFO com.hazelcast.instance.Node - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Activating Discovery SPI Joiner
06:45:17.716 [main] INFO com.hazelcast.core.LifecycleService - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Address[#1.#1.#1.#1]:8652 is STARTING
06:45:17.787 [main] INFO c.h.n.t.n.NonBlockingIOThreadingModel - [#1.#1.#1.#1]:8652 [dev] [3.6.4] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
06:45:17.787 [main] DEBUG c.h.n.t.n.NonBlockingIOThreadingModel - [#1.#1.#1.#1]:8652 [dev] [3.6.4] IO threads selector mode is SELECT
06:45:17.803 [cached3] INFO c.h.cluster.impl.DiscoveryJoiner - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Address[#2.#2.#2.#2]:13881 is added to the blacklist.
06:45:17.803 [cached2] INFO c.h.cluster.impl.DiscoveryJoiner - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Address[#2.#2.#2.#2]:13280 is added to the blacklist.
06:45:17.803 [cached1] INFO c.h.cluster.impl.DiscoveryJoiner - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Address[#1.#1.#1.#1]:16735 is added to the blacklist.
06:45:18.801 [main] INFO c.h.cluster.impl.DiscoveryJoiner - [#1.#1.#1.#1]:8652 [dev] [3.6.4]
06:45:18.801 [main] WARN com.hazelcast.instance.Node - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
06:45:18.831 [main] INFO com.hazelcast.core.LifecycleService - [#1.#1.#1.#1]:8652 [dev] [3.6.4] Address[#1.#1.#1.#1]:8652 is STARTED
Node 2:
06:45:17.654 [cached3] INFO c.h.cluster.impl.DiscoveryJoiner - [#2.#2.#2.#2]:13280 [dev] [3.6.4] Address[#2.#2.#2.#2]:13881 is added to the blacklist.
06:45:17.654 [cached1] INFO c.h.cluster.impl.DiscoveryJoiner - [#2.#2.#2.#2]:13280 [dev] [3.6.4] Address[#1.#1.#1.#1]:16735 is added to the blacklist.
06:45:17.654 [cached2] INFO c.h.cluster.impl.DiscoveryJoiner - [#2.#2.#2.#2]:13280 [dev] [3.6.4] Address[#1.#1.#1.#1]:8652 is added to the blacklist.
06:45:18.653 [main] INFO c.h.cluster.impl.DiscoveryJoiner - [#2.#2.#2.#2]:13280 [dev] [3.6.4]
06:45:18.653 [main] WARN com.hazelcast.instance.Node - [#2.#2.#2.#2]:13280 [dev] [3.6.4] Config seed port is 5701 and cluster size is 1. Some of the ports seem occupied!
06:45:18.679 [main] INFO com.hazelcast.core.LifecycleService - [#2.#2.#2.#2]:13280 [dev] [3.6.4] Address[#2.#2.#2.#2]:13280 is STARTED
The instances being blacklisted with port 16735 and 13881 is the nodes being replaced, however the blacklist is giving small information. I Currently have debug level active on hazel cast.
// Andreas
The text was updated successfully, but these errors were encountered:
I hit the same issue. Seems it was failing to connect because it was trying to bind the client socket to the host IP instead of the container IP. Setting hazelcast.socket.client.bind.any to true (or rather not setting it to false as the README suggests, since true is the default) seems to have resolved it for me.
Hi!
I have posted this in https://groups.google.com/forum/#!topic/hazelcast/p6JtKsyAoK4, and they recommended me to post it here.
And here is the output, deploying 2 docker images towards marathon:
Node 1:
Node 2:
The instances being blacklisted with port 16735 and 13881 is the nodes being replaced, however the blacklist is giving small information. I Currently have debug level active on hazel cast.
// Andreas
The text was updated successfully, but these errors were encountered: