spring boot application stops suddenly when config files are in ./config and only in server
i have an anormal issue. my application worked fine in production environnements but when i removed
test {
systemProperty 'spring.config.location', System.getProperty('spring.config.location')
}
and i putted my conf file (application.yml) inside a file named ./config in the same directoty as my jar.
the application starts and works fine for one or two hours then it stops automaticly without any error.
i build the application like:
gradlew clean build
ps: there were @ActiveProfiles in test classes
when i build and execute in my machine it's stops never but when deployed into server it stops after wail
here the last messages before it stops
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG
o.s.w.s.m.m.a.RequestMappingHandlerMapping - Returning handler method [public java.lang.String com.controller.ServerController.testServerIsruning()]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified value for [/healthcheck] is: -1
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Written [Server is UP Fri Dec 28 16:48:54 CET 2018] as "text/html" using [org.springframework.http.converter.StringHttpMessageConverter@257cc1fc]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.b.w.s.f.OrderedRequestContextFilter - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@4535bba0
2018-12-28 16:49:55 [Thread-4] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@20d28811: startup date [Fri Dec 28 15:56:49 CET 2018]; root of context hierarchy
2018-12-28 16:49:55 [Thread-4] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopping...
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - BrokerAvailabilityEvent[available=false, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopped.
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'brokerChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'messageBrokerTaskScheduler'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientOutboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientInboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.internal.SessionFactoryImpl - HHH000031: Closing
2018-12-28 16:49:55 [Thread-4] DEBUG o.hibernate.engine.spi.CascadeStyles - External cascade style registration [persist : STYLE_PERSIST] overrode base registration [STYLE_PERSIST_SKIPLAZY]
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.s.i.AbstractServiceRegistryImpl - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.b.r.i.BootstrapServiceRegistryImpl - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
spring-boot java-ee configuration-files
add a comment |
i have an anormal issue. my application worked fine in production environnements but when i removed
test {
systemProperty 'spring.config.location', System.getProperty('spring.config.location')
}
and i putted my conf file (application.yml) inside a file named ./config in the same directoty as my jar.
the application starts and works fine for one or two hours then it stops automaticly without any error.
i build the application like:
gradlew clean build
ps: there were @ActiveProfiles in test classes
when i build and execute in my machine it's stops never but when deployed into server it stops after wail
here the last messages before it stops
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG
o.s.w.s.m.m.a.RequestMappingHandlerMapping - Returning handler method [public java.lang.String com.controller.ServerController.testServerIsruning()]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified value for [/healthcheck] is: -1
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Written [Server is UP Fri Dec 28 16:48:54 CET 2018] as "text/html" using [org.springframework.http.converter.StringHttpMessageConverter@257cc1fc]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.b.w.s.f.OrderedRequestContextFilter - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@4535bba0
2018-12-28 16:49:55 [Thread-4] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@20d28811: startup date [Fri Dec 28 15:56:49 CET 2018]; root of context hierarchy
2018-12-28 16:49:55 [Thread-4] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopping...
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - BrokerAvailabilityEvent[available=false, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopped.
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'brokerChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'messageBrokerTaskScheduler'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientOutboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientInboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.internal.SessionFactoryImpl - HHH000031: Closing
2018-12-28 16:49:55 [Thread-4] DEBUG o.hibernate.engine.spi.CascadeStyles - External cascade style registration [persist : STYLE_PERSIST] overrode base registration [STYLE_PERSIST_SKIPLAZY]
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.s.i.AbstractServiceRegistryImpl - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.b.r.i.BootstrapServiceRegistryImpl - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
spring-boot java-ee configuration-files
add a comment |
i have an anormal issue. my application worked fine in production environnements but when i removed
test {
systemProperty 'spring.config.location', System.getProperty('spring.config.location')
}
and i putted my conf file (application.yml) inside a file named ./config in the same directoty as my jar.
the application starts and works fine for one or two hours then it stops automaticly without any error.
i build the application like:
gradlew clean build
ps: there were @ActiveProfiles in test classes
when i build and execute in my machine it's stops never but when deployed into server it stops after wail
here the last messages before it stops
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG
o.s.w.s.m.m.a.RequestMappingHandlerMapping - Returning handler method [public java.lang.String com.controller.ServerController.testServerIsruning()]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified value for [/healthcheck] is: -1
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Written [Server is UP Fri Dec 28 16:48:54 CET 2018] as "text/html" using [org.springframework.http.converter.StringHttpMessageConverter@257cc1fc]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.b.w.s.f.OrderedRequestContextFilter - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@4535bba0
2018-12-28 16:49:55 [Thread-4] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@20d28811: startup date [Fri Dec 28 15:56:49 CET 2018]; root of context hierarchy
2018-12-28 16:49:55 [Thread-4] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopping...
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - BrokerAvailabilityEvent[available=false, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopped.
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'brokerChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'messageBrokerTaskScheduler'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientOutboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientInboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.internal.SessionFactoryImpl - HHH000031: Closing
2018-12-28 16:49:55 [Thread-4] DEBUG o.hibernate.engine.spi.CascadeStyles - External cascade style registration [persist : STYLE_PERSIST] overrode base registration [STYLE_PERSIST_SKIPLAZY]
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.s.i.AbstractServiceRegistryImpl - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.b.r.i.BootstrapServiceRegistryImpl - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
spring-boot java-ee configuration-files
i have an anormal issue. my application worked fine in production environnements but when i removed
test {
systemProperty 'spring.config.location', System.getProperty('spring.config.location')
}
and i putted my conf file (application.yml) inside a file named ./config in the same directoty as my jar.
the application starts and works fine for one or two hours then it stops automaticly without any error.
i build the application like:
gradlew clean build
ps: there were @ActiveProfiles in test classes
when i build and execute in my machine it's stops never but when deployed into server it stops after wail
here the last messages before it stops
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG
o.s.w.s.m.m.a.RequestMappingHandlerMapping - Returning handler method [public java.lang.String com.controller.ServerController.testServerIsruning()]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Last-Modified value for [/healthcheck] is: -1
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Written [Server is UP Fri Dec 28 16:48:54 CET 2018] as "text/html" using [org.springframework.http.converter.StringHttpMessageConverter@257cc1fc]
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
2018-12-28 16:48:54 [http-nio-8080-exec-5] DEBUG o.s.b.w.s.f.OrderedRequestContextFilter - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@4535bba0
2018-12-28 16:49:55 [Thread-4] INFO o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@20d28811: startup date [Fri Dec 28 15:56:49 CET 2018]; root of context hierarchy
2018-12-28 16:49:55 [Thread-4] INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopping...
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - BrokerAvailabilityEvent[available=false, SimpleBrokerMessageHandler [DefaultSubscriptionRegistry[cache[0 destination(s)], registry[0 sessions]]]]
2018-12-28 16:49:55 [Thread-4] INFO o.s.m.s.b.SimpleBrokerMessageHandler - Stopped.
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans on shutdown
2018-12-28 16:49:55 [Thread-4] INFO o.s.j.e.a.AnnotationMBeanExporter - Unregistering JMX-exposed beans
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'brokerChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'messageBrokerTaskScheduler'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientOutboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.s.c.ThreadPoolTaskExecutor - Shutting down ExecutorService 'clientInboundChannelExecutor'
2018-12-28 16:49:55 [Thread-4] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.internal.SessionFactoryImpl - HHH000031: Closing
2018-12-28 16:49:55 [Thread-4] DEBUG o.hibernate.engine.spi.CascadeStyles - External cascade style registration [persist : STYLE_PERSIST] overrode base registration [STYLE_PERSIST_SKIPLAZY]
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.s.i.AbstractServiceRegistryImpl - Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] DEBUG o.h.b.r.i.BootstrapServiceRegistryImpl - Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2018-12-28 16:49:55 [Thread-4] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
spring-boot java-ee configuration-files
spring-boot java-ee configuration-files
asked Dec 28 '18 at 17:49
Idris SakhiIdris Sakhi
12
12
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53962406%2fspring-boot-application-stops-suddenly-when-config-files-are-in-config-and-onl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53962406%2fspring-boot-application-stops-suddenly-when-config-files-are-in-config-and-onl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown