spring boot - SpringBoot app starts multiple times and disconnects from logstash -


i have springboot application (spring boot v1.3.5.release) run on docker ./mvnw;

it "restarts" after 1-2 minutes , after second start don't send log logstash..

in first start see below log

2016-07-27 08:54:29,616 debug [background-preinit] logging: logging provider: org.jboss.logging.slf4jloggerprovider found via system property 

bug after second 1 logging provider log missing..

    **2016-07-27 08:54:25,386 info  [restartedmain] demoapp: starting demoapp on 7adf92b8bc96 pid 85 (/home/infoowl/project/target/classes started infoowl in /home/infoowl/project)**     2016-07-27 08:54:25,471 debug [restartedmain] demoapp: running spring boot v1.3.5.release, spring v4.2.6.release     2016-07-27 08:54:25,487 info  [restartedmain] demoapp: following profiles active: dev     2016-07-27 08:54:29,616 debug [background-preinit] logging: logging provider: org.jboss.logging.slf4jloggerprovider found via system property     2016-07-27 08:54:32,436 info  [restartedmain] demoapp: started demoapp in 9.865 seconds (jvm running 14.572)     2016-07-27 08:54:45,937 debug [restartedmain] httpurlconnection: sun.net.www.messageheader@3959b7066 pairs: {get /config/transformation/dev/master http/1.1: null}{accept: application/json, application/*+json}{authorization: basic ywrtaw46ywrtaw4=}{user-agent: java/1.8.0_91}{host: registry:8761}{connection: keep-alive}     2016-07-27 08:54:46,512 debug [restartedmain] httpurlconnection: sun.net.www.messageheader@12bba63311 pairs: {null: http/1.1 200 ok}{server: apache-coyote/1.1}{x-content-type-options: nosniff}{x-xss-protection: 1; mode=block}{cache-control: no-cache, no-store, max-age=0, must-revalidate}{pragma: no-cache}{expires: 0}{x-application-context: jhipster-registry:dev,native:8761}{content-type: application/json;charset=utf-8}{transfer-encoding: chunked}{date: wed, 27 jul 2016 08:54:46 gmt}     2016-07-27 08:54:46,777 info  [restartedmain] demoapp: following profiles active: dev     2016-07-27 08:55:01,347 warn  [restartedmain] configurationclasspostprocessor: cannot enhance @configuration bean definition 'refreshscope' since singleton instance has been created early. typical cause non-static @bean method beandefinitionregistrypostprocessor return type: consider declaring such methods 'static'.     2016-07-27 08:55:03,767 debug [restartedmain] asyncconfiguration: creating async task executor     2016-07-27 08:55:07,072 debug [restartedmain] metricsconfiguration: registering jvm gauges     2016-07-27 08:55:07,169 debug [restartedmain] metricsconfiguration: initializing metrics jmx reporting     2016-07-27 08:55:07,281 info  [restartedmain] metricsconfiguration: initializing metrics log reporting     2016-07-27 08:55:16,352 info  [localhost-startstop-1] webconfigurer: web application configuration, using profiles: [dev]     2016-07-27 08:55:16,359 debug [localhost-startstop-1] webconfigurer: initializing metrics registries     2016-07-27 08:55:16,383 debug [localhost-startstop-1] webconfigurer: registering metrics filter     2016-07-27 08:55:16,400 debug [localhost-startstop-1] webconfigurer: registering metrics servlet     2016-07-27 08:55:16,402 info  [localhost-startstop-1] webconfigurer: web application configured     2016-07-27 08:55:19,343 info  [localhost-startstop-1] coreapp: running spring profile(s) : [dev]     2016-07-27 08:55:24,670 info  [restartedmain] loggingconfiguration: initializing logstash logging     2016-07-27 08:55:24,781 info  [restartedmain] loggingconfiguration: logstash customfields: '{"app_name":"transformation","app_port":"9093","instance_id":"transformation:4afb19b3a2763ed887b8d69d246082e6"}', config: 'net.infoowl.hepsiburada.core.config.jhipsterproperties$logging$logstash@96d9ebe[enabled=true,host=elk-logstash,port=5000,queuesize=512]'     2016-07-27 08:55:35,367 debug [restartedmain] cacheconfiguration: no cache     2016-07-27 08:55:40,071 debug [restartedmain] databaseconfiguration: configuring mongeez     2016-07-27 08:55:40,245 info  [restartedmain] filesetxmlreader: parsing xml fileset file master.xml     2016-07-27 08:55:40,275 info  [restartedmain] filesetxmlreader: num of changefiles found 0     2016-07-27 08:55:41,089 debug [restartedmain] swaggerconfiguration: starting swagger     2016-07-27 08:55:41,218 debug [restartedmain] swaggerconfiguration: started swagger in 118 ms     2016-07-27 08:55:55,610 warn  [restartedmain] urlconfigurationsource: no urls polled dynamic configuration sources.     2016-07-27 08:55:56,975 warn  [restartedmain] urlconfigurationsource: no urls polled dynamic configuration sources.     2016-07-27 08:56:00,036 debug [cron4j::scheduler[20b6349f63f32eea2d00877b000001562b91269c7714a479]::launcher[20b6349f63f32eea238ca33a000001562b9155042b804084]] cronplugin: found crontab config url org.crsh.vfs.resource@7a65b25c     **2016-07-27 08:56:00,788 info  [restartedmain] demoapp: starting demoapp on 7adf92b8bc96 pid 85 (/home/infoowl/project/target/classes started infoowl in /home/infoowl/project)**     2016-07-27 08:56:00,788 debug [restartedmain] demoapp: running spring boot v1.3.5.release, spring v4.2.6.release     2016-07-27 08:56:00,788 info  [restartedmain] demoapp: following profiles active: dev     2016-07-27 08:56:01,290 info  [restartedmain] demoapp: started demoapp in 0.899 seconds (jvm running 103.426) 

another observation.. see second start "0.899 seconds" not possible.. seems second 1 not real start logstash connection gone..

what may reason second start? should check , investigate;

from documentation:

applications use spring-boot-devtools automatically restart whenever files on classpath change.

you can exclude resources or disable restarts.


Comments

Popular posts from this blog

Combining PHP Registration and Login into one class with multiple functions in one PHP file -

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -