TcpDiscoverySpi returns HTTP 401 - [Apache Ignite Cluster, installed on Azure Kubernetes Services]

3/8/2018

EXCEPTION during IgniteClient startup (Springboot job):

TcpDiscoverySpi - Failed to get registered addresses from IP finder on start Server returned HTTP response code: 401 for URL https://

I've created the service account, and read the token. Then I0ve putted the value of che attribute token inside a file

Then I've tries with ignitevisorcmd to connect, but it's seems there is an error i'm not able to identify

Snippet of my "ignite-config.xml":

    <property name="discoverySpi">
        <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
            <property name="ipFinder">
                <!--
                    Enables Kubernetes IP finder with default settings.
                -->
                <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder">
                    <property name="MasterUrl" value="https://XXXX-aks-001-ignitecluster-XXXXXXXX.hcp.westeurope.azmk8s.io"/>
                    <property name="AccountToken" value="C:\Users\XXXXXXXX\Desktop\TOP\token"/>
                    <property name="ServiceName" value="ignite"/>

                </bean> 
            </property>
        </bean>
    </property>

What's wrong!!?!??!?!??!

-- Zar Keys
azure
discovery
ignite
kubernetes

1 Answer

3/17/2018

Check if you have RBAC enabled cluster. If you do, you will have to give permission to your ignite pod to access the endpoints. https://kubernetes.io/docs/admin/authorization/rbac/

-- Bal Chua
Source: StackOverflow