简体   繁体   中英

After running Spring boot app with 'webapp-runner' it's stoping on a line “INFO: Starting ProtocolHandler [”http-nio-8080“]”

I need to deploy the applocation to heroku, and it was created with Spring Boot, because of this I have added ther a webapp-runner.jar plugin, and now it's inposible to run on Heroku, and in a local machine I am getting the same issue if I am running it from cmd with using webapp-runner.jar.

Now I am using version of runner 9.0.24.0, beforhand I was trying ti run it in version 8...

That is my plugin in pom.xml

<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>

That is my Procfile

web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

That is my log from cmd

авг 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"]

It should run it with comand from Procfile as in a local machine, and in a Heroku. How I can to resolve that issue?

This article have helped me a lot in the past, might be useful for you as well.

  • Change directory to where Tomcat is installed, then go to bin .
  • Open catalina.sh file using any editor that you like like nano or vim .
  • Look for JAVA_OPTS and add this line:

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

Source: https://geekflare.com/tomcat-stuck-at-startup/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM