【问题标题】:Azure failed to deploy: The host name myapp.azurewebsites.net is invalidAzure 部署失败:主机名 myapp.azurewebsites.net 无效
【发布时间】:2019-04-14 18:18:48
【问题描述】:

我正在尝试将 springboot 应用程序部署到 Azure 应用程序服务。并收到错误: com.microsoft.azure.CloudException:主机名 my_app.azurewebsites.net 无效。 . . . 引起:rx.exceptions.OnErrorThrowable$OnNextValue: OnError 同时发出 onNext 值:retrofit2.Response.class

我模仿了这里说明的步骤:https://docs.microsoft.com/en-us/java/azure/spring-framework/deploy-spring-boot-java-app-with-maven-plugin?view=azure-java-stable

我已安装 Azure CLI 并使用公钥进行连接。我在下面附上了我的 pom.xml 的一部分,我添加的插件

 <plugin>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-webapp-maven-plugin</artifactId>
                <version>1.4.0</version>
                <configuration>
                    <deploymentType>jar</deploymentType>
                <!-- configure app to run on port 80, required by App Service -->
                <appSettings>
                    <property>
                        <name>JAVA_OPTS</name>
                        <value>-Dserver.port=80</value>
                    </property>
                </appSettings>

                <!-- Web App information -->
                <resourceGroup>my_group</resourceGroup>
                <appName>my_app</appName>
                <region>East US</region>

                <!-- Java Runtime Stack for Web App on Linux-->
                <linuxRuntime>jre8</linuxRuntime>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                    <version>2.2.11</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-core</artifactId>
                    <version>2.2.11</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                    <version>2.2.11</version>
                </dependency>
                <dependency>
                    <groupId>javax.activation</groupId>
                    <artifactId>activation</artifactId>
                    <version>1.1.1</version>
                </dependency>
            </dependencies>
        </plugin>

【问题讨论】:

    标签: azure spring-boot cloud


    【解决方案1】:

    appName 值必须是唯一的,并且不能包含任何无效字符,例如下划线。

    【讨论】:

      【解决方案2】:

      登录 Azure 门户并启动向导以创建新的 Web 应用以找到可接受的应用名称,然后更新您的部署配置,然后重试。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-01-06
        • 2022-12-20
        • 2011-02-12
        • 2017-08-31
        • 2015-11-21
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多