microsoft / azure-spring-boot

Spring Boot Starters for Azure services
MIT License
374 stars 460 forks source link

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 closed 4 years ago

nandha2143 commented 4 years ago

Environment

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 commented 4 years ago

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

nandha2143 commented 4 years ago

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 commented 4 years ago

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

jmax01 commented 4 years ago

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 commented 4 years ago

@jmax01

Thanks for sharing this. I will look into this.

carlosraphael commented 4 years ago

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

chenrujun commented 4 years ago

I reported the issue here

chenrujun commented 4 years ago

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

chenrujun commented 4 years ago

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

mosh2151984 commented 4 years ago

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>