Search code examples
springspring-mvcspring-bootlogbackspring-logback

SpringBoot 2.0.5.RELEASE app. not starting


I have a basic SpringBoot 2.0.5.RELEASE app. Using Spring Initializer, JPA, embedded Tomcat, Thymeleaf template engine, and package as an executable JAR file and Logback, the intended as a successor to the popular log4j project,

But the app. gets frozen when starts and this is what I see in the console:

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

16:25:42,044 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:42,054 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:42,054 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:42,059 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:42,059 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:42,060 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:42,072 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.3.log.zip
16:25:42,072 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.2.log.zip
16:25:42,073 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.1.log.zip
16:25:42,075 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
16:25:44,219 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:44,219 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:44,219 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.3.log.zip
16:25:44,220 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.2.log.zip
16:25:44,220 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.1.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.2.log.zip]
16:25:44,222 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
16:25:46,372 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:46,376 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:46,377 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:46,377 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.3.log.zip
16:25:46,377 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.2.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.3.log.zip]
16:25:46,377 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.1.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.2.log.zip]
16:25:46,377 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]
16:25:48,240 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.9.log.zip
16:25:48,242 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.8.log.zip
16:25:48,243 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.7.log.zip
16:25:48,245 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.6.log.zip
16:25:48,249 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.5.log.zip
16:25:48,252 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@5e025e70 - Skipping roll-over for inexistent file /root/logs/trivikramasana/trivikramasana-api.4.log.zip
16:25:48,254 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.3.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.4.log.zip]
16:25:48,255 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.2.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.3.log.zip]
16:25:48,256 |-INFO in c.q.l.co.rolling.helper.RenameUtil - Renaming file [/root/logs/trivikramasana/trivikramasana-api.1.log.zip] to [/root/logs/trivikramasana/trivikramasana-api.2.log.zip]
16:25:48,256 |-INFO in ch.qos.logback.core.rolling.helper.Compressor - ZIP compressing [/root/logs/trivikramasana/trivikramasana-api.log] as [/root/logs/trivikramasana/trivikramasana-api.1.log.zip]

and this is my logback.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">

    <property resource="application.properties"/>

    <!-- trace, debug, info, warn, error, fatal -->
    <timestamp key="myTimestamp" datePattern="yyyy-MM-dd'_'HH-mm-ss.SSS"/>  


    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
        <resetJUL>true</resetJUL>
    </contextListener>

    <!-- To enable JMX Management -->
    <jmxConfigurator/>

    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{"yyyy-MM-dd HH:mm"}  [%thread] %-5level %logger{35} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${user.home}/${logfile.path}/${logfile.name}.log</file> 

        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${user.home}/${logfile.path}/${logfile.name}.%i.log.zip</fileNamePattern>             
            <minIndex>1</minIndex>
            <maxIndex>10</maxIndex>
        </rollingPolicy>

        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>1MB</maxFileSize>
        </triggeringPolicy>
        <encoder>
            <pattern>%d{"yyyy-MM-dd HH:mm"} [%thread] %-5level %logger{35} - %msg%n</pattern>
        </encoder>
    </appender>



    <!-- <logger name="org.springframework.orm.jpa"     level="debug" /> -->    
    <logger name="com.trivikramasana"       level="debug" />
    <logger name="uk.co.jemos.podam"    level="warn" />
    <logger name="org.thymeleaf"        level="info" />
    <logger name="org.springframework"  level="info" />
    <logger name="org.hibernate"        level="info" />
    <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="warn" />
    <logger name="org.springframework.web"      level="info" />
    <logger name="org.springframework.security" level="info" />

    <root level="debug">
        <!--appender-ref ref="CONSOLE" /-->
        <appender-ref ref="FILE" />
    </root>
</configuration>

Solution

  • I don't think that application is frozen. Looking at your logs/logback config, logs are being redirected to FILE appender except for the package ch.qos.logback.core.

    So application should be running and logging out in file. If there would be any issue then that should be logged in the file which is mentioned in RollingFileAppender in logback.xml.

    Frozen must not be the state. Either it is crashed or running. Logs should say more about it.