首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在使用'webapp-runner‘运行Spring boot应用程序后,它在一行"INFO: Starting ProtocolHandler [“http-nio-8080”]上停止。“

在使用'webapp-runner‘运行Spring boot应用程序后,它在一行"INFO: Starting ProtocolHandler [“http-nio-8080”]上停止。“
EN

Stack Overflow用户
提问于 2019-08-30 04:26:31
回答 1查看 341关注 0票数 1

现在我使用的是runner 9.0.24.0版本,之前我尝试在版本8中运行它……

这是我在pom.xml中的插件

代码语言:javascript
复制
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <goals><goal>copy</goal></goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.github.jsimone</groupId>
                  <artifactId>webapp-runner</artifactId>
                  <version>9.0.24.0</version>
                  <destFileName>webapp-runner.jar</destFileName>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

那是我的配置文件

代码语言:javascript
复制
web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

这是我来自cmd的日志。

代码语言:javascript
复制
авг 29, 2019 11:09:47 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
авг 29, 2019 11:09:48 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Tomcat]
авг 29, 2019 11:09:48 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet engine: [Apache Tomcat/9.0.24]
авг 29, 2019 11:09:49 PM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
INFO: No global web.xml found
авг 29, 2019 11:10:04 PM org.apache.catalina.core.ApplicationContext log
INFO: 1 Spring WebApplicationInitializers detected on classpath
авг 29, 2019 11:10:05 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
авг 29, 2019 11:10:05 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
WARNING: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [241] milliseconds.
авг 29, 2019 11:10:05 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]

它应该像在本地机器和Heroku中一样,通过Procfile中的命令来运行它。我该如何解决这个问题呢?

EN

回答 1

Stack Overflow用户

发布于 2019-08-30 04:37:36

这篇文章在过去对我帮助很大,可能对你也有帮助。

where or >将目录更改为Tomcat的安装位置,然后使用您喜欢的任何编辑器(如

  • vim.
  • Look JAVA_OPTS )转到JAVA_OPTScatalina.sh,并添加以下行:

-Djava.security.egd=file:/dev/./urandom

来源:https://geekflare.com/tomcat-stuck-at-startup/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57717335

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档