ignite集群和kubernetes集成

ignite集群和kubernetes集成,ignite,Ignite,我是新点燃的 测试1:(没有Kubernetes) 步骤1:我在两个虚拟机(ubuntu)中安装了Ignite2.6.0,在一个虚拟机中启动了节点。下面是comand。 bin/ignite.sh examples/config/example-ignite.xml 步骤2:我所有的配置都在example-default.xml中 步骤3:在其他VM中执行client.jar,其中包含datagrid逻辑(此VM既是客户机也是节点) 步骤4:能够在缓存中存储数据 测试2:(Kubernetes安

我是新点燃的

测试1:(没有Kubernetes) 步骤1:我在两个虚拟机(ubuntu)中安装了Ignite2.6.0,在一个虚拟机中启动了节点。下面是comand。 bin/ignite.sh examples/config/example-ignite.xml

步骤2:我所有的配置都在example-default.xml中

步骤3:在其他VM中执行client.jar,其中包含datagrid逻辑(此VM既是客户机也是节点)

步骤4:能够在缓存中存储数据

测试2:(Kubernetes安装在云中) 步骤1:遵循url中提到的步骤

  • 按原样运行“RBAC授权”和“点火服务”的所有命令
  • 接下来在“数据库和WAL文件的相同存储”部分中,运行“ignite stateful set.yaml”
  • ignite-stateful-set.yaml中的CONFIG_URI指向“Kubernetes IP Finder”部分的“example-default.xml(重命名)”
  • 在TcpDiscoveryKubernetesIpFinder bean的example-default.xml“addresses”部分中添加了2个虚拟机的IP
  • 步骤2:复制了2个虚拟机的/opt/apache-ignite-fabric-2.6.0-bv-in/examples/config(安装了ignite的地方)中的“example default.xml”

    步骤3:现在我启动了相同的client.jar,它给出了异常(附件) 已附加运行客户端的命令 (Kubernetes和Ignite安装在同一个VM(ubuntu)中)

    请让我知道测试2中有什么错误。提前谢谢

    示例-default.xml 启动客户端后的观察。 例外情况:

    Exception in thread "main" class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-ignite.xml]
            at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
            at org.apache.ignite.Ignition.start(Ignition.java:355)
    
    Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-ignite.xml]
    
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ignite.cfg$child#0' defined in URL [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-ignite.xml]: Cannot create inner bean 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi#c038203' of type [org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi] while setting bean property 'discoverySpi'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi#c038203' defined in URL 
    
    [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
    
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi#c038203' defined in URL [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml]: Cannot create inner bean
    
    [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder
    
    问题的其他形式…

    一旦Kubernetes按照上面提到的步骤启动,比如说2个pod,如何以及在何处部署ignite data grid logic client.jar文件以在其中执行java文件

    @澄清

    **下面的文件

    • 名称:selfLink 价值:file:///opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml
    应仅包含以下内容**

      <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
        <property name="namespace" value="ignite"/>
      </bean>
    
    
    
    **归档

    try(Ignite-Ignite=Ignition.start(“/opt/apache-Ignite-fabric-2.6.0-bin/examples/config/example-Ignite.xml”)) 包含我的自定义配置,如下所示

           <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    <property name="namespace" value="ignite"/>
                    <property name="serviceName" value="ignite"/>
                    <bean 
                        <property name="addresses">
                            <list>
                                <value>xxx.xxx.xxx.xxx:47500</value>
                                <value>xxx.xxx.xxx.xxx:47500</value>                                
                            </list>
                        </property>
                    </bean>
    
    
    
    对于
    TcpDiscoveryKubernetesIpFinder
    ,您不能有
    地址。因此,系统无法从XML创建它。删除
    地址
    部分。

    Stanislav Lukyanov-我在我的问题中添加了@澄清部分。请让我知道这是否是TcpDiscoveryKubernetesIpFinder的正确地址。进行了问题澄清部分所述的配置更改。并按照问题“客户端运行”一节所述启动客户端。获取错误-原因:org.springframework.beans.NotWritablePropertyException:bean类的属性“namespace”无效[org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder您需要使用
    TcpDiscoveryVmIpFinder
    TcpDiscoveryKubernetesIpFinder
    。请注意,前者没有
    命名空间
    服务名
    属性,后者也没有
    地址
    。请在注意你的问题的格式。确保所有的代码都在代码部分。现在很难理解它。
    Exception in thread "main" class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-ignite.xml]
            at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:990)
            at org.apache.ignite.Ignition.start(Ignition.java:355)
    
    Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-ignite.xml]
    
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ignite.cfg$child#0' defined in URL [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-ignite.xml]: Cannot create inner bean 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi#c038203' of type [org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi] while setting bean property 'discoverySpi'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi#c038203' defined in URL 
    
    [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313)
    
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi#c038203' defined in URL [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml]: Cannot create inner bean
    
    [file:/opt/apache-ignite-fabric-2.6.0-bin/examples/config/example-default.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder
    
      <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
        <property name="namespace" value="ignite"/>
      </bean>
    
           <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    <property name="namespace" value="ignite"/>
                    <property name="serviceName" value="ignite"/>
                    <bean 
                        <property name="addresses">
                            <list>
                                <value>xxx.xxx.xxx.xxx:47500</value>
                                <value>xxx.xxx.xxx.xxx:47500</value>                                
                            </list>
                        </property>
                    </bean>