0

I have a spring boot application and i'm running it as ROOT through this command:

mvn spring-boot:run -Drun.jvmArguments="-Xms512m -Xmx1024m" > lms_logs.log 2>&1 &

After a few hours it shutsdown with these logs statements:

011 11-01-2019 03:50:00.010 [pool-1-thread-1] INFO  com.app.jobs.ScheduledJobsConfiguration.uploadScoreReports - Started uploadScoreReports job...
011 11-01-2019 03:50:37.701 [Thread-3] INFO  org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.doClose - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3a85bcaa: startup date [Fri Jan 11 03:27:13 UTC 2019]; root of context hierarchy
011 11-01-2019 03:50:37.704 [Thread-3] INFO  org.springframework.jmx.export.annotation.AnnotationMBeanExporter.destroy - Unregistering JMX-exposed beans on shutdown
011 11-01-2019 03:50:37.705 [Thread-3] INFO  org.springframework.jmx.export.annotation.AnnotationMBeanExporter.unregisterBeans - Unregistering JMX-exposed beans
011 11-01-2019 03:50:37.718 [Thread-3] INFO  org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.destroy - Closing JPA EntityManagerFactory for persistence unit 'default'
011 11-01-2019 03:50:37.719 [Thread-3] INFO  com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown initiated...
011 11-01-2019 03:50:37.731 [Thread-3] INFO  com.zaxxer.hikari.HikariDataSource.close - HikariPool-1 - Shutdown completed.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23:34 min
[INFO] Finished at: 2019-01-11T03:50:37+00:00
[INFO] Final Memory: 76M/451M
[INFO] ------------------------------------------------------------------------

Why could this happen ?

  • I believe ApplicationContext.doClose indicates a controlled shutdown. Can you check if this is happening when the user who runs the mvn command logs out? – Haxiel Jan 11 at 7:30
  • Sorry, you 'started the user as root'? Can you edit the question and add the details on how you started the program? The problem might be caused by a SIGHUP being sent to the process when the user logs out. – Haxiel Jan 12 at 4:33
  • Apologies for the typo. This shouldn't have happened since i started the application as the root user and logged in as a different user. Something like this: ssh ubuntu & sudo su & start app & exit & exit – CodeShadow Jan 15 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.