Opendistro Elasticsearch Azure repository plugin

I've been trying to use azure blob storage with opendistro elasticsearch for snapshot. I've passed account name and key for storage account but while trying to register repo. getting following error

{"error":{"root_cause":[{"type":"repository_verification_exception","reason":"[bk] path  is not accessible on master node"}],"type":"repository_verification_exception","reason":"[bk] path  is not accessible on master node","caused_by":{"type":"null_pointer_exception","reason":"Cannot invoke \"String.length()\" because \"host\" is null"}},"status":500}

also error on node

Caused by: org.elasticsearch.repositories.RepositoryVerificationException: [bk] path  is not accessible on master node
    at org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification(BlobStoreRepository.java:1276) ~[elasticsearch-7.10.2.jar:7.10.2]
    at org.elasticsearch.repositories.RepositoriesService$3.doRun(RepositoriesService.java:268) ~[elasticsearch-7.10.2.jar:7.10.2]
    at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:743) ~[elasticsearch-7.10.2.jar:7.10.2]
    at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.10.2.jar:7.10.2]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
    at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "host" is null
    at com.microsoft.azure.storage.core.Utility.isHostDnsName(Utility.java:533) ~[?:?]
    at com.microsoft.azure.storage.core.Utility.determinePathStyleFromUri(Utility.java:521) ~[?:?]
    at com.microsoft.azure.storage.StorageUri.<init>(StorageUri.java:71) ~[?:?]
    at com.microsoft.azure.storage.core.PathUtility.appendPathToUri(PathUtility.java:124) ~[?:?]
    at com.microsoft.azure.storage.core.PathUtility.appendPathToUri(PathUtility.java:108) ~[?:?]
    at com.microsoft.azure.storage.blob.CloudBlobContainer.<init>(CloudBlobContainer.java:169) ~[?:?]
    at com.microsoft.azure.storage.blob.CloudBlobClient.getContainerReference(CloudBlobClient.java:123) ~[?:?]

Following is my custom docker image

FROM amazon/opendistro-for-elasticsearch:1.13.0
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch  repository-azure

ENV AZURE_CLIENT_ACCOUNT <bas64 encoded account>
ENV AZURE_CLIENT_KEY <base64 encoded key>

RUN /usr/share/elasticsearch/bin/elasticsearch-keystore create

RUN echo $AZURE_CLIENT_ACCOUNT | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin azure.client.default.account
RUN echo $AZURE_CLIENT_KEY | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin azure.client.default.key

Can anyone help ?



Read more here: https://stackoverflow.com/questions/66275421/opendistro-elasticsearch-azure-repository-plugin

Content Attribution

This content was originally published by Mohammed at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: