Error while springboot application starts up in azure spring cloud - "could not locate property source and fast fail property is set"

Goswami, Tuhin 21 Reputation points
2020-10-21T15:44:13.807+00:00

Error while springboot application starts up in azure spring cloud - "could not locate property source and fast fail property is set" . The App is currently running in a VM environment and I am trying to port it to azure spring cloud. I have a application.properties file in config.server . The file right now is unchanged from what it contains originally in the VM .

Error Details :

ubuntu@eliminator-azure-build-server:~/azure-springcloud$ ./logs.sh
BUILD_IN_EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=https://eliminator-sandbox.svc.azuremicroservices.io/eureka/eureka
BUILD_IN_SPRING_CLOUD_CONFIG_URI=https://eliminator-sandbox.svc.azuremicroservices.io/config
BUILD_IN_SPRING_CLOUD_CONFIG_FAILFAST=true
[Azure Spring Cloud] The following environment variables are loaded:

. ____ _ __ _ _
/\ / ' __ _ ()_ __ __ _ \ \ \ \
( ( )_
| '_ | '| | ' / ` | \ \ \ \
\/ )| |)| | | | | || (
| | ) ) ) )
' |____| .|| ||| |__, | / / / /
=========|_|==============|___/=///_/
:: Spring Boot :: (v2.2.6.RELEASE)

java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing
at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:147)
at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:52)
at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locateCollection(ConfigServicePropertySourceLocator.java:162)
at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:101)
at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:626)
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:370)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at com.ethoca.iportal.IssuerPortalApplication.main(IssuerPortalApplication.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
Caused by: org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 Unauthorized: [<html>
<head><title>401 Authorization Required</title></head>
<body>
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx/1.17.7</center>
</body>
</html>
]
Please help .

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
124 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Goswami, Tuhin 21 Reputation points
    2020-10-29T17:08:26.707+00:00

    @KrishnenduGhosh-MSFT

    pom.xml is :

    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Copyright (c) 2018 Ethoca
    All Rights Reserved.
    No part of this software may be reproduced, stored, used, modified or transmitted in any form or in any means
    (including without limitation, electronic, mechanical, photocopying, recording or otherwise) without the prior
    express written consent of Ethoca which may be withheld in Ethoca's sole and absolute discretion
    -->
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"\>
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.6.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    
    <groupId>com.ethoca</groupId>
    <artifactId>iportal</artifactId>
    <version>2.38.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    
    <name>IssuerPortal</name>
    <description>Card Holder Dispute Portal for Issuers</description>
    
    <profiles>
        <profile>
            <id>skip-integration-tests</id>
            <properties>
                <skipIntegrationTests>true</skipIntegrationTests>
            </properties>
        </profile>
        <profile>
            <id>Copyright-header</id>
            <properties>
                <currentyear>2019</currentyear>
               </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila</groupId>
                           <artifactId>license-maven-plugin</artifactId>
                           <version>3.0</version>
                           <configuration><header>http://gitlab.ethoca.com/public-assets/copyright-material/raw/dev/copyright_template.txt</header>
                               <aggregate>true</aggregate>
                               <properties>
                               <current_year>2020</current_year>
                               </properties>
                            <excludes>
                                <exclude>**/README</exclude>
                                   <exclude>src/test/resources/**</exclude>
                                   <exclude>src/main/resources/**</exclude>
                                   <exclude>**/*.csv</exclude>
                                   <exclude>**/*.config</exclude>
                                   <exclude>**/*.min.*</exclude>
                               </excludes>
                            <headerDefinitions>
                                <headerDefinition>http://gitlab.ethoca.com/public-assets/copyright-material/raw/dev/groovy_header_config.xml</headerDefinition>
                            </headerDefinitions>
                            <mapping>
                                <groovy>GROOVY_STYLE</groovy>
                            </mapping>
                           </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                   </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
    <properties>
        <java.version>1.8</java.version>
    
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    
        <toolchain.jdk.version>1.8</toolchain.jdk.version>
        <toolchain.jdk.vendor>Oracle</toolchain.jdk.vendor>
    
        <jacoco.version>0.7.9</jacoco.version>
        <jacoco.ut.summary>${project.reporting.outputDirectory}/jacoco-ut</jacoco.ut.summary>
        <jacoco.it.summary>${project.reporting.outputDirectory}/jacoco-it</jacoco.it.summary>
        <jacoco.ut.execution.data.file>${project.build.directory}/jacoco.exec</jacoco.ut.execution.data.file>
        <jacoco.it.execution.data.file>${project.build.directory}/jacoco-it.exec</jacoco.it.execution.data.file>
    
        <java-faker.version>1.0.2</java-faker.version>
    
        <!-- Ethoca Internal Dependency versions -->
        <eliminator-commons.version>2.22.0-SNAPSHOT</eliminator-commons.version>
        <eliminator-domain.version>1.19.0</eliminator-domain.version>
        <ethoca-api-model.version>1.10.0</ethoca-api-model.version>
        <merchant-api-client.version>1.27.0</merchant-api-client.version>
        <merchant-api-model.version>2.14.0</merchant-api-model.version>
    </properties>
    
    <dependencies>
        <!-- Ethoca Internal Compile & Runtime Dependencies -->
        <dependency>
            <groupId>com.ethoca.eliminator</groupId>
            <artifactId>eliminator-commons</artifactId>
            <version>${eliminator-commons.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.ethoca.bootstrap</groupId>
                    <artifactId>init-boot</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.ethoca.eliminator</groupId>
            <artifactId>eliminator-domain</artifactId>
            <version>${eliminator-domain.version}</version>
        </dependency>
        <dependency>
            <groupId>com.ethoca.eliminator</groupId>
            <artifactId>ethoca-api-model</artifactId>
            <version>${ethoca-api-model.version}</version>
        </dependency>
        <dependency>
            <groupId>com.ethoca.eliminator</groupId>
            <artifactId>merchant-api-client</artifactId>
            <version>${merchant-api-client.version}</version>
        </dependency>
        <dependency>
            <groupId>com.ethoca.eliminator</groupId>
            <artifactId>merchant-api-model</artifactId>
            <version>${merchant-api-model.version}</version>
        </dependency>
    
        <!-- External Compile & Runtime Dependencies -->
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.199</version><!--$NO-MVN-MAN-VER$-->
        </dependency>
        <dependency>
            <groupId>com.ibm.db2.jcc</groupId>
            <artifactId>db2jcc4</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.mastercard.api</groupId>
            <artifactId>merchant-identifier</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mastercard.api</groupId>
            <artifactId>places</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
    
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-jmx</artifactId>
        </dependency>
    
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>javax.persistence-api</artifactId>
            <scope>provided</scope><!-- To effectively exclude at runtime -->
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>provided</scope><!-- To effectively exclude at runtime -->
        </dependency>
    
        <dependency>
            <groupId>org.apache.commons</groupId>
              <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-cache</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-freemarker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-sleuth</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security.extensions</groupId>
            <artifactId>spring-security-saml2-core</artifactId>
        </dependency>
    
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
        </dependency>
    
        <!-- Test Dependencies -->
        <dependency>
            <groupId>com.icegreen</groupId>
            <artifactId>greenmail-spring</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>spring-mock-mvc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.javafaker</groupId>
            <artifactId>javafaker</artifactId>
            <version>${java-faker.version}</version>
        </dependency>
    </dependencies>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.ethoca</groupId>
                <artifactId>eliminator-bom</artifactId>
                <version>1.3.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <build>
        <plugins>
            <plugin>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <groupId>org.springframework.boot</groupId>
                <configuration>
                    <excludeGroupIds>javax.activation,javax.persistence,javax.transaction,javax.validation</excludeGroupIds>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>3.1.5</version>
                <configuration>
                    <excludeFilterFile>spotbugs-exclude-filter.xml</excludeFilterFile>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <failOnError>true</failOnError>
                    <includeTests>false</includeTests>
                </configuration>
                <executions>
                    <execution>
                        <id>spotbugs-check</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>pre-unit-test</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${jacoco.ut.execution.data.file}</destFile>
                            <propertyName>surefireArgLine</propertyName>
                            <append>true</append>
                        </configuration>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${jacoco.ut.execution.data.file}</dataFile>
                            <outputDirectory>${jacoco.ut.summary}</outputDirectory>
                            <append>true</append>
                        </configuration>
                    </execution>
                    <execution>
                        <id>pre-integration-test</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${jacoco.it.execution.data.file}</destFile>
                            <propertyName>failsafeArgLine</propertyName>
                            <append>true</append>
                        </configuration>
                    </execution>
                    <execution>
                        <id>post-integration-test</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${jacoco.it.execution.data.file}</dataFile>
                            <outputDirectory>${jacoco.it.summary}</outputDirectory>
                            <append>true</append>
                        </configuration>
                    </execution>
                    <execution>
                        <id>iportal-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                          <rules>
                            <rule>
                              <element>BUNDLE</element>
                              <limits>
                                <limit>
                                  <counter>LINE</counter>
                                  <value>COVEREDRATIO</value>
                                  <minimum>0.00</minimum>
                                </limit>
                              </limits>
                            </rule>
                          </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCount>8</threadCount>
                    <argLine>-Xms128m -Xmx1G -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m ${surefireArgLine}</argLine>
                    <skipTests>${skipTests}</skipTests>
                    <excludes>
                        <exclude>**/*IntegrationTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCount>10</threadCount>
                    <forkCount>3</forkCount>
                    <reuseForks>true</reuseForks>
                    <argLine>-Xms128m -Xmx2G -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=1G ${failsafeArgLine}</argLine>
                    <skipTests>${skipIntegrationTests}</skipTests>
                    <includes>
                        <include>**/it/*IntegrationTest.java</include>
                        <include>**/tracking/**/*IntegrationTest.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.redhat.rcm.maven.plugin</groupId>
                <artifactId>buildmetadata-maven-plugin</artifactId>
                <version>1.5.2</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>provide-buildmetadata</goal>
                        </goals>
                        <configuration>
                            <activateOutputFileMapping>false</activateOutputFileMapping>
                            <addScmInfo>false</addScmInfo>
                            <createPropertiesReport>false</createPropertiesReport>
                            <createXmlReport>false</createXmlReport>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dateFormat>yyyy-MM-dd'T'HH:mm:ss.SSSZ</dateFormat>
                    <dotGitDirectory>${basedir}/../.git</dotGitDirectory>
                    <failOnNoGitDirectory>true</failOnNoGitDirectory>
                    <skipPoms>false</skipPoms>
                    <!-- <verbose>true</verbose> -->
                    <gitDescribe>
                        <always>true</always>
                        <abbrev>7</abbrev>
                        <dirty>.WITH_UNCOMMITED_CHANGES</dirty>
                        <forceLongFormat>true</forceLongFormat>
                        <tags>true</tags>
                    </gitDescribe>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <SCM-Branch>${git.branch}</SCM-Branch>
                            <SCM-Commit-DateTime>${git.commit.time}</SCM-Commit-DateTime>
                            <SCM-Commit-ID>${git.commit.id.abbrev}</SCM-Commit-ID>
                            <Built-Java-Vendor>${java.vendor}</Built-Java-Vendor>
                            <Built-Java-Version>${java.version}</Built-Java-Version>
                            <Built-Timestamp>${build.timestamp.millis}</Built-Timestamp>
                            <Built-DateTime>${git.build.time}</Built-DateTime>
                            <Built-OS>${os.name} / ${os.arch} / ${os.version}</Built-OS>
                            <Built-Describe>${git.commit.id.describe}</Built-Describe>
                            <Built-Maven-Version>${build.maven.version}</Built-Maven-Version>
                            <Built-Host>${build.host.name}</Built-Host>
                        </manifestEntries>
                    </archive>
                    <excludes>
                        <exclude>src/main/resources/appplication-memoryauth.yml</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-http</artifactId>
                <version>2.10</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>2.10</version>
            </extension>
        </extensions>
    </build>
    
    <distributionManagement>
        <site>
            <id>${distribution.site.id}</id>
            <url>${distribution.site.base}/${project.groupId}/${project.artifactId}/${project.version}</url>
        </site>
        <repository>
            <id>${distribution.repository.id}</id>
            <url>${distribution.repository.url}</url>
        </repository>
    </distributionManagement>
    
    <scm>
        <connection>scm:git:git@gitlab.ethoca.com:Eliminator/Eliminator.git</connection>
        <developerConnection>scm:git:git@gitlab.ethoca.com:Eliminator/Eliminator.git</developerConnection>
        <tag>HEAD</tag>
        <url>http://gitlab.ethoca.com/Eliminator/Eliminator.git</url>
    </scm>
    
    <repositories>
        <repository>
            <id>2</id>
            <name>mulesoft</name>
            <url>https://nexus01.dev.ethoca.com:8443/nexus/content/repositories/m2.mulesoft-release/</url>
        </repository>
        <repository>
            <id>3</id>
            <name>alfresco</name>
            <url>https://nexus01.dev.ethoca.com:8443/nexus/content/repositories/m2.alfresco-public-release/</url>
        </repository>
    </repositories>
    

    </project>
    the spring cloud dependencies I am adding are :

    <!-- Spring Cloud dependencies -->
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>Hoxton.SR8</version>
    <type>pom</type>
    <scope>import</scope>
    </dependency>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-config</artifactId>
    <version>2.2.5.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    <version>2.2.5.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-sleuth</artifactId>
    <version>2.2.5.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-zipkin</artifactId>
    <version>2.2.5.RELEASE</version>
    </dependency>

    0 comments No comments

  2. Krish G 2,331 Reputation points
    2020-10-29T17:49:49.943+00:00

    @Goswami, Tuhin , I see you are using version 2.2.6.RELEASE for 'spring-boot-starter-parent' (at the top of pom.xml), can you try with newer version 2.3.4.RELEASE. Below is my bare minimum setup which works fine to load my application.properties from config server.

    If updating version does not solve, I suspect one or more of the dependencies conflict which tries to load from config server instead of the spring-cloud-config starter. You can try by starting with the bare minimum dependencies first and then introducing your dependencies one by one to see which one is causing the issue. I understand it might be time consuming, but without that it would be difficult to find the root cause since it works otherwise.

    0 comments No comments

  3. Goswami, Tuhin 21 Reputation points
    2020-10-29T22:50:41.703+00:00

    @KrishnenduGhosh-MSFT

    removing the additional dependencies from the pom.xml file helped me to resolve that error. Thank you so much for your help on that one.
    I have another issue now , which is blocking the app startup . I have a config.xml file that points to a txt file , the text file has a linux os location like /etc/something/ ....the config.xml file seems to only take hard paths like this. Is there a way to put the txt file in /tmp or /persistent , before the app is deployed so that the app upon starting can find the necessary secret ..

    I went through this link - https://github.com/Azure-Samples/Azure-Spring-Cloud-Samples/tree/master/storage-sample ..
    problem with this is , it expects a public url and the app to be up before you can curl the file to it , which is not my case .

    Please advice if there is any way to upload the .txt file in /tmp in temporary storage in azure spring cloud before I deploy the application.
    Thanks for your continued support !! ..


  4. Goswami, Tuhin 21 Reputation points
    2020-10-31T14:38:29.463+00:00

    @KrishnenduGhosh-MSFT
    Yes , I managed to make changes to the source code so that config.xml can fetch the files.

    I am able to start the application , but the DISCOVERY STATUS shows "DOWN" although the status is "RUNNING"

    I see these warnings in the logs :

    (this message comes in the begining)

    2020-10-31 14:32:01.849 WARN [eliminator-sandbox-app,,,] 1 --- [ender@4dd02341}] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'eurekaRibbonClientConfiguration': Unsatisfied dependency expressed through field 'eurekaConfig'; nested exception is org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaInstanceConfigBean': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)

    (this message is repeated every 2-3 mins )

    WARN c.n.d.InstanceInfoReplicator - [AUDIT: ip: userName: companyId: sessionId: CID:] There was a problem with the instance info replicatorcom.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
    at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:112)
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59)
    at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
    at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56)
    at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:847)
    at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:121)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.lang.Thread.run(Thread.java:748) [2 skipped]

    The dependencies I am using are :
    <!-- Spring Cloud dependencies -->
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>Hoxton.SR8</version>
    <type>pom</type>
    <scope>import</scope>
    </dependency>
    <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-sleuth</artifactId>
    </dependency>

    Am I missing any dependencies ... Also to enable discovery , do we need to make some changes to application code (like this link says :- https://video2.skills-academy.com/en-us/azure/spring-cloud/spring-cloud-tutorial-prepare-app-deployment?pivots=programming-language-java) ?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.