Unable to form connection between ignite(v 2.7) node inside kubernetes-1.11.3

1/25/2019

While starting one node it gets up with time delay around 50-60 sec. but when we scale deployment to 2-3 then those nodes are unable to connect to st node. Also getting below error on 2nd and 3rd node.

ERROR TcpDiscoverySpi:586 - Failed to get registered addresses from IP finder on start (retrying every 2000ms; change 'reconnectDelay' to configure the frequency of retries). class org.apache.ignite.spi.IgniteSpiException: Failed to retrieve Ignite pods IP addresses. at org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder.getRegisteredAddresses(TcpDiscoveryKubernetesIpFinder.java:172) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1900) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.resolvedAddresses(TcpDiscoverySpi.java:1848) at org.apache.ignite.spi.discovery.tcp.ServerImpl.sendJoinRequestMessage(ServerImpl.java:1049) at org.apache.ignite.spi.discovery.tcp.ServerImpl.joinTopology(ServerImpl.java:910) at org.apache.ignite.spi.discovery.tcp.ServerImpl.spiStart(ServerImpl.java:391) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:2020) at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:297) at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:939) at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1682) at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1066) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2038) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1730) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1158) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:678) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:618) at org.apache.ignite.Ignition.getOrStart(Ignition.java:415) at com.cloud.ignite.server.IgniteServer.startIgnite(IgniteServer.java:57) at com.cloud.ignite.server.IgniteServer.(IgniteServer.java:39) at com.cloud.ignite.server.IgniteServer.getInstance(IgniteServer.java:107) at com.cloud.ignite.server.IgniteServer.main(IgniteServer.java:133) Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673) at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263) at org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder.getRegisteredAddresses(TcpDiscoveryKubernetesIpFinder.java:153)

Edits:

Below is configuration,

Namespace:dev (Same for client and server)

Service account: default

Master URL : default value

account token : Default Value

Code Snippet:

TcpDiscoveryKubernetesIpFinder podIpFinder = new TcpDiscoveryKubernetesIpFinder();
podIpFinder.setNamespace("DEV");

TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
tcpDiscoverySpi.setIpFinder(podIpFinder);

IgniteConfiguration igniteConfiguration = new IgniteConfiguration();
igniteConfiguration..setDiscoverySpi(tcpDiscoverySpi);

Ignite ignite = Ignition.getOrStart(igniteConfiguration);
-- iamLalit
ignite
kubernetes

1 Answer

1/25/2019

first u

  1. kubectl get pods --all-namespaces=true
  2. get the pod name from the list and execute kubectl --namespace fusion get pods/podName

podName : the name of your pod.

-- inlineMacro
Source: StackOverflow