当前位置: 首页 > 知识库问答 >
问题:

启动Spring Boot Eureka服务器时出错

太叔何平
2023-03-14
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.5.RELEASE:
run (default-cli) on project serviceDiscovery: An exception occurred while running. null: 
InvocationTargetException: Unable to start embedded container; 
nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: 
Unable to start embedded Tomcat: Failed to start component [StandardServer[-1]]: 
Failed to start component [StandardService[Tomcat]]: 
Failed to start component [StandardEngine[Tomcat]]: 
A child container failed during start -> 
    <groupId>in.service</groupId>
    <artifactId>serviceDiscovery</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>serviceDiscovery</name>
    <description>Demo project for Spring Boot</description>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka-server</artifactId>
            <version>1.1.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>spring-snapshots</id>
            <name>Spring Snapshots</name>
            <url>https://repo.spring.io/snapshot</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>


</project>
[ERROR]     Non-resolvable import POM: Failure to find 
org.springframework.cloud:spring-cloud-sleuth-dependencies:pom:1.0.2.BUILD-SNAPSHOT 
in https://repo.spring.io/snapshot was cached in the local repository, 
resolution will not be reattempted until the update interval of spring-snapshots 
has elapsed or updates are forced 
@ org.springframework.cloud:spring-cloud-dependencies:Brixton.BUILD-SNAPSHOT, 
/home/soumya/.m2/repository/org/springframework/cloud/spring-cloud-dependencies
/Brixton.BUILD-SNAPSHOT/spring-cloud-dependencies-Brixton.BUILD-SNAPSHOT.pom

我想把spring-boot-parent版本增加到1.3.5,但它给了我一系列问题,就像开头提供的那样

共有1个答案

商飞翮
2023-03-14

好的,这是解决办法。将父级保留为

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

现在添加/修改以下依赖关系管理

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Brixton.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

spring-boot-starter-parent的两个版本(1.3.5和1.3.2)都在工作。实际上,我在我的依赖项管理中使用了brixton.build-snapshot,它现在被更改为brixton.release。

 类似资料:
  • 问题内容: 我刚刚完成了重新安装操作系统的工作,并且像往常一样安装和测试了我使用的标准工具,现在当我尝试从eclipse启动Jboss 5时,出现了前所未有的错误: 以前有没有人遇到过类似的问题?到目前为止我从未遇到过 问题答案: 看起来像是JRE和OS版本的某些特定组合发生的错误(请参阅https://jira.jboss.org/jira/browse/JBAS-6981)。基本上,JBoss

  • 我已经在系统上安装并配置了ATG。我对发布服务器和生产服务器使用以下配置: 出版 HTTP端口:8180 HTTPS端口:8543 站点HTTP端口:8180 RMI端口:8861 DRP端口:8851 文件部署:8811 生产 HTTP端口:8080 HTTPS端口:8443 站点HTTP端口:8080 RMI端口:8860 DRP端口:8850 文件部署:8810 在运行我的生产服务器的之后,

  • 在启动节点管理器之后,当我要启动startWeblogic时。sh发生这种情况时,服务器无法启动。(用户名、密码正确) 以行开始WLS:home/app/oracle/java/jdk1.8.0_171/bin/java-server-Xms256m-Xmx512m-XX:CompileThreshold=8000-cp/home/12c/app/oracle/product/12.2.1/wls

  • 我刚刚安装了Ruby193和Ruby200,在创建了一个新的应用程序之后,我正在尝试加载服务器,但是我得到了下面的错误。 我用gem'sqlite3'替换了sqlite3 gem,'~ 有人知道怎么修吗? Gemfile是 Bundle Show提供捆绑包中包含的宝石: actionmailer(3.2.13) actionpack(3.2.13) activemodel(3.2.13) acti

  • 我是NodeJS的新手: 我写了server.js文件,我安装了NodeJS。当我运行时,我遇到以下错误。 C:\users\server\server.js:43 if(!(req.headers&req.headers.authorization)){ npm错误!argv“C:\Program Files\nodejs\\node.exe”“C:\Program Files\nodejs\n