Search code examples
azurekubernetesigniteazure-aks

How can I fix CrashBackLoopOff problem on AKS for Apache Ignite?


I try to build Apache Ignite on Azure Kubernetes Service. AKS version is 1.19.

I followed the below instructions from the official apache page.

Microsoft Azure Kubernetes Service Deployment

But when I check the status of my pods, they seem failed. The status of pods is CrashLoopBackOff.

status of pods

When I check the logs, It says the problem is node-configuration.xml Here is the XML of the node configuration.

    <bean class="org.apache.ignite.configuration.IgniteConfiguration">

    <property name="discoverySpi">
        <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
            <property name="ipFinder">
                <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
                    <constructor-arg>
                        <bean class="org.apache.ignite.kubernetes.configuration.KubernetesConnectionConfiguration">
                            <property name="namespace" value="default" />
                            <property name="serviceName" value="ignite" />
                        </bean>
                    </constructor-arg>
                </bean>
            </property>
        </bean>
    </property>
</bean>

Also, here is the output of the log.

PS C:\Users\kaan.akyalcin\ignite> kubectl logs ignite-cluster-755f6665c8-djdcn -n ignite
class org.apache.ignite.IgniteException: **Failed to instantiate Spring XML application context [springUrl=file:/ignite/config/node-configuration.xml, err=Line 1 in XML document from URL** [file:/ignite/config/node-configuration.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 71; cvc-elt.1: Cannot find the declaration of element 'bean'.]
        at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1098)
        at org.apache.ignite.Ignition.start(Ignition.java:356)
        at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:367)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context [springUrl=file:/ignite/config/node-configuration.xml, err=Line 1 in XML document from URL [file:/ignite/config/node-configuration.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 71; cvc-elt.1: Cannot find the declaration of element 'bean'.]
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:392)
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:104)
        at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:98)
        at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:736)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:937)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:846)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:716)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:685)
        at org.apache.ignite.Ignition.start(Ignition.java:353)

I didn't find the solution. How can I fix this problem?


Solution

  • You have to pass a valid XML file, looks like the docs need to be adjusted accordingly:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd">
    
        <bean class="org.apache.ignite.configuration.IgniteConfiguration">
    
            <property name="discoverySpi">
                <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                    <property name="ipFinder">
                        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
                            <property name="namespace" value="degault"/>
                            <property name="serviceName" value="ignite"/>
                        </bean>
                    </property>
                </bean>
            </property>
        </bean>
    </beans>