Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Spring Boot application hangs without any error when azure-keyvault-secrets-spring-boot-starter version upgraded from 2.1.6 to 2.1.8 #853

Closed
nandha2143 opened this issue Mar 24, 2020 · 10 comments
Assignees

Comments

@nandha2143
Copy link

Environment

  • Spring boot starter:

    • key vault spring boot starter
  • OS Type: Windows

  • Java version:

    • 1.8

Summary

Spring Boot application hangs without any error when azure-keyvault-secrets-spring-boot-starter version upgraded from 2.1.6 to 2.1.8. Spring boot version is 2.1.10-RELEASE

Reproduce steps

Spring 2.1.10-RELEASE. Upgraded azure-keyvault-secrets-spring-boot-starter version upgraded from 2.1.6 to 2.1.8. Same application is working in 2.1.6

Application.yml

azure:
keyvault:
uri:
client-id:
client-key:
tenant-id:
allow:
telemetry: false

Expected Results

Spring boot application up and running and get all secrets from Azure key vault

Actual Results

Spring boot app hangs

@saragluna
Copy link
Contributor

Thanks for reaching out. Could you please try again with our latest release 2.1.9?

@nandha2143
Copy link
Author

Thanks for reaching out. Could you please try again with our latest release 2.1.9?

Hi Saragluna, Thank you for reply. Yes tried with 2.1.9 and same result

@saragluna
Copy link
Contributor

Could you help provide some more details, like the pom file of your project, for me to reproduce the issue?

@jmax01
Copy link

jmax01 commented Mar 26, 2020

I have the same issue appears to be in KeyVaultOperation.fillSecretsList()
Java 11.0.5+10
azure-spring-boot: 2.2.3
Spring Framework: 5.2.4.RELEASE
Spring Boot: 2.2.5
Reactor: Dysprosium-SR6

    private void fillSecretsList() {
        try {
            this.rwLock.writeLock().lock();
            if (this.secretKeys == null || secretKeys.size() == 0) {
                this.propertyNames.clear();

                final PagedIterable<SecretProperties> secretProperties = keyVaultClient.listPropertiesOfSecrets();

               //Hangs here:
                secretProperties.forEach(s -> {
                    final String secretName = s.getName().replace(vaultUri + "/secrets/", "");
                    addSecretIfNotExist(secretName);
                });

                this.lastUpdateTime.set(System.currentTimeMillis());
            } else {
                for (final String secretKey : secretKeys) {
                    addSecretIfNotExist(secretKey);
                }
            }
            propertyNamesArr = propertyNames.toArray(new String[0]);
        } finally {
            this.rwLock.writeLock().unlock();
        }
    }

@saragluna
Copy link
Contributor

saragluna commented Mar 27, 2020

@jmax01

Thanks for sharing this. I will look into this.

@carlosraphael
Copy link

hi @saragluna I'm having the same issue using:

  • Java -> 8
  • Spring Boot -> 2.1.2.RELEASE
  • Spring Azure Key Vault Secrets -> 2.1.10

@yiliuTo yiliuTo assigned yiliuTo and chenrujun and unassigned yiliuTo Jun 5, 2020
@chenrujun
Copy link

I reported the issue here

@chenrujun
Copy link

This issue is same to #909 , so I'll close this issue.

@chenrujun
Copy link

Hi, @nandha2143, please update version to 2.2.5 or 2.3.2.

chenrujun pushed a commit to chenrujun/azure-sdk-for-java that referenced this issue Jun 9, 2020
saragluna pushed a commit to Azure/azure-sdk-for-java that referenced this issue Jun 11, 2020
* Fix KeyVaultOperation blocked problem. Refs: microsoft/azure-spring-boot#853

* Add an item in external_depandencies.

* Remote reduantant whitespace. It's removed by Intellij automically.

* Fix the order to 'a, b, c, d.'

* Fix the error in the message.

Co-authored-by: Rujun Chen <rujche@microsoft.com>
@mosh2151984
Copy link

mosh2151984 commented Jun 18, 2020

try

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.7.RELEASE</version>
       <relativePath /> <!-- lookup parent from repository -->
</parent>

......

<properties>
        <java.version>1.8</java.version>
        <azure.version>2.1.6</azure.version>
 </properties>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants