无法在kubernetes-1.11.3内部的ignite(v 2.7)节点之间形成连接

时间:2019-01-25 06:30:17

标签: kubernetes ignite

启动一个节点时,它会以大约50-60秒的时间延迟启动。但是当我们将部署扩展到2-3时,这些节点将无法连接到st节点。 在第二个和第三个节点上也出现错误。

  

错误TcpDiscoverySpi:586-无法从IP获取注册地址   启动时查找(每2000ms重试一次;将“ reconnectDelay”更改为   配置重试频率)。类   org.apache.ignite.spi.IgniteSpiException:无法检索Ignite   广告连播IP地址。在   org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder.getRegisteredAddresses(TcpDiscoveryKubernetesIpFinder.java:172)     在   org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.registeredAddresses(TcpDiscoverySpi.java:1900)     在   org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.resolvedAddresses(TcpDiscoverySpi.java:1848)     在   org.apache.ignite.spi.discovery.tcp.ServerImpl.sendJoinRequestMessage(ServerImpl.java:1049)     在   org.apache.ignite.spi.discovery.tcp.ServerImpl.joinTopology(ServerImpl.java:910)     在   org.apache.ignite.spi.discovery.tcp.ServerImpl.spiStart(ServerImpl.java:391)     在   org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:2020)     在   org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:297)     在   org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:939)     在   org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1682)     在   org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1066)     在   org.apache.ignite.internal.IgnitionEx $ IgniteNamedInstance.start0(IgnitionEx.java:2038)     在   org.apache.ignite.internal.IgnitionEx $ IgniteNamedInstance.start(IgnitionEx.java:1730)     在org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1158)     在org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:678)     在org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:618)     在org.apache.ignite.Ignition.getOrStart(Ignition.java:415)处   com.cloud.ignite.server.IgniteServer.startIgnite(IgniteServer.java:57)     在com.cloud.ignite.server.IgniteServer上(IgniteServer.java:39)     在   com.cloud.ignite.server.IgniteServer.getInstance(IgniteServer.java:107)     在com.cloud.ignite.server.IgniteServer.main(IgniteServer.java:133)   引起原因:java.net.ConnectException:连接被拒绝(连接   拒绝),位于java.net.PlainSocketImpl.socketConnect(本机方法),位于   java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)     在   java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)     在   java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)     在java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)在   java.net.Socket.connect(Socket.java:589)在   sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)在   sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)     在sun.net.NetworkClient.doConnect(NetworkClient.java:180)处   sun.net.www.http.HttpClient.openServer(HttpClient.java:463)在   sun.net.www.http.HttpClient.openServer(HttpClient.java:558)位于   sun.net.www.protocol.https.HttpsClient。(HttpsClient.java:264)     在sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)     在   sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)     在   sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)     在   sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)     在   sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)     在   sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)     在   sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)     在   sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)     在   org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder.getRegisteredAddresses(TcpDiscoveryKubernetesIpFinder.java:153)

编辑:

下面是配置

Namespace:dev(客户端和服务器相同)

服务帐户:默认

主网址:默认值

帐户令牌:默认值

代码段:

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);

1 个答案:

答案 0 :(得分:-1)

第一个

  1. kubectl获取容器--all-namespaces = true
  2. 从列表中获取窗格名称并执行 kubectl --namespace融合获取pods / podName

podName:您的窗格的名称。