Instance crashing after running once. Error: "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"app instance exited"


Zuba Al <myfakename90@...>
 

I've pushed the app which uses redis service (A sample app which simply send and receives a message thru Redis service). Instance is created at start and after successfully running once the instance getting crashed with error: "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"app instance exited". And after sometime another instance getting created automatically, sucessfully running once and crashing with below logs. And this goes on for sometime.

my manifest.yml:

name: RedisApp
no-route: true
memory: 512M
random-route: true
instances: 1
path: target/gs-messaging-redis-0.1.0.jar
services:
- redislite


cf logs RedisApp command output:

2015-09-25T11:58:51.85+0200 [DEA/1] OUT Starting app instance (index 0) with guid aec41933-ef0c-4d5b-8e67-da6729ca3005
2015-09-25T11:58:56.58+0200 [App/0] OUT
2015-09-25T11:58:56.58+0200 [App/0] OUT . ____ _ __ _ _
2015-09-25T11:58:56.58+0200 [App/0] OUT /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2015-09-25T11:58:56.58+0200 [App/0] OUT ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2015-09-25T11:58:56.58+0200 [App/0] OUT \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2015-09-25T11:58:56.58+0200 [App/0] OUT ' |____| .__|_| |_|_| |_\__, | / / / /
2015-09-25T11:58:56.58+0200 [App/0] OUT =========|_|==============|___/=/_/_/_/
2015-09-25T11:58:56.58+0200 [App/0] OUT :: Spring Boot :: (v1.2.6.RELEASE)
2015-09-25T11:58:56.69+0200 [App/0] OUT 2015-09-25 09:58:56.690 INFO 29 --- [ main] pertySourceApplicationContextInitializer : Adding 'cloud' PropertySource to ApplicationContext
2015-09-25T11:58:56.78+0200 [App/0] OUT 2015-09-25 09:58:56.786 INFO 29 --- [ main] nfigurationApplicationContextInitializer : Adding cloud service auto-reconfiguration to ApplicationContext
2015-09-25T11:58:56.80+0200 [App/0] OUT 2015-09-25 09:58:56.804 INFO 29 --- [ main] hello.Application : Starting Application on 18venf3o9v7 with PID 29 (/home/vcap/app started by vcap in /home/vcap/app)
2015-09-25T11:58:56.86+0200 [App/0] OUT 2015-09-25 09:58:56.869 INFO 29 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext(a)6d2ca421: startup date [Fri Sep 25 09:58:56 UTC 2015]; root of context h
ierarchy
2015-09-25T11:58:57.22+0200 [App/0] OUT 2015-09-25 09:58:57.223 WARN 29 --- [ main] .i.s.PathMatchingResourcePatternResolver : Skipping [/home/vcap/app/.java-buildpack/spring_auto_reconfiguration/spring_auto_reconfiguration-1.10.0_RELEASE.jar] because it does not denote a directory
2015-09-25T11:58:57.78+0200 [App/0] OUT 2015-09-25 09:58:57.780 INFO 29 --- [ main] urceCloudServiceBeanFactoryPostProcessor : Auto-reconfiguring beans of type javax.sql.DataSource
2015-09-25T11:58:57.79+0200 [App/0] OUT 2015-09-25 09:58:57.789 INFO 29 --- [ main] urceCloudServiceBeanFactoryPostProcessor : No beans of type javax.sql.DataSource found. Skipping auto-reconfiguration.
2015-09-25T11:58:57.79+0200 [App/0] OUT 2015-09-25 09:58:57.794 INFO 29 --- [ main] edisCloudServiceBeanFactoryPostProcessor : Auto-reconfiguring beans of type org.springframework.data.redis.connection.RedisConnectionFactory
2015-09-25T11:58:57.90+0200 [App/0] OUT 2015-09-25 09:58:57.905 INFO 29 --- [ main] edisCloudServiceBeanFactoryPostProcessor : Reconfigured bean redisConnectionFactory into singleton service connector org.springframework.data.redis.connection.jedis.JedisConnectionFactory(a)74ca9fd4
2015-09-25T11:58:58.29+0200 [App/0] OUT 2015-09-25 09:58:58.298 INFO 29 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2015-09-25T11:58:58.30+0200 [App/0] OUT 2015-09-25 09:58:58.308 INFO 29 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147483647
2015-09-25T11:58:58.37+0200 [App/0] OUT 2015-09-25 09:58:58.375 INFO 29 --- [ main] hello.Application : Started Application in 2.491 seconds (JVM running for 3.401)
2015-09-25T11:58:58.37+0200 [App/0] OUT 2015-09-25 09:58:58.376 INFO 29 --- [ main] hello.Application : Sending message...
2015-09-25T11:58:58.39+0200 [App/0] OUT 2015-09-25 09:58:58.398 INFO 29 --- [ container-2] hello.Receiver : Received <Hello from Redis!>
2015-09-25T11:58:58.40+0200 [App/0] OUT 2015-09-25 09:58:58.400 INFO 29 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext(a)6d2ca421: startup date [Fri Sep 25 09:58:56 UTC 2015]; root of context hier
archy
2015-09-25T11:58:58.40+0200 [App/0] OUT 2015-09-25 09:58:58.401 INFO 29 --- [ Thread-2] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 2147483647
2015-09-25T11:58:58.40+0200 [App/0] OUT 2015-09-25 09:58:58.404 INFO 29 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2015-09-25T11:58:58.44+0200 [App/0] ERR
2015-09-25T11:58:58.49+0200 [API/0] OUT App instance exited with guid aec41933-ef0c-4d5b-8e67-da6729ca3005 payload: {"cc_partition"=>"default", "droplet"=>"aec41933-ef0c-4d5b-8e67-da6729ca3005", "version"=>"8985cc3d-6aa2-4e34-a11c-f64289aeace3", "instance"=>"0147066c534c4d3bb879fffd2c149529", "
index"=>0, "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"app instance exited", "crash_timestamp"=>1443175138}


Daniel Mikusa
 

On Fri, Sep 25, 2015 at 6:11 AM, zooba Sir <myfakename90(a)gmail.com> wrote:

I've pushed the app which uses redis service (A sample app which simply
send and receives a message thru Redis service).

Does it start and send / receive a set number of messages or does it do
this forever?


Instance is created at start and after successfully running once the
instance getting crashed with error: "reason"=>"CRASHED", "exit_status"=>0,
"exit_description"=>"app instance exited".

Exit code 0 generally means your application shutdown cleanly. i.e. it
finished what it was doing and exited. If that's unexpected, I would
suggest that you increase the log level of the application to get more
details.


And after sometime another instance getting created automatically,
sucessfully running once and crashing with below logs. And this goes on for
sometime.
The system is restarting your application because it exited. The
expectation of an application that runs on CF is that it won't exit, ever.
Because of this if CF sees that one of your applications has stopped, it
assumes the app has "crashed" and will automatically try to restart it.

That's what's happening here. You app has exited, CF sees that and it's
helpfully trying to restart your app.

Dan




my manifest.yml:

name: RedisApp
no-route: true
memory: 512M
random-route: true
instances: 1
path: target/gs-messaging-redis-0.1.0.jar
services:
- redislite


cf logs RedisApp command output:

2015-09-25T11:58:51.85+0200 [DEA/1] OUT Starting app instance (index
0) with guid aec41933-ef0c-4d5b-8e67-da6729ca3005
2015-09-25T11:58:56.58+0200 [App/0] OUT
2015-09-25T11:58:56.58+0200 [App/0] OUT . ____ _
__ _ _
2015-09-25T11:58:56.58+0200 [App/0] OUT /\\ / ___'_ __ _ _(_)_ __
__ _ \ \ \ \
2015-09-25T11:58:56.58+0200 [App/0] OUT ( ( )\___ | '_ | '_| | '_ \/
_` | \ \ \ \
2015-09-25T11:58:56.58+0200 [App/0] OUT \\/ ___)| |_)| | | | | ||
(_| | ) ) ) )
2015-09-25T11:58:56.58+0200 [App/0] OUT ' |____| .__|_| |_|_|
|_\__, | / / / /
2015-09-25T11:58:56.58+0200 [App/0] OUT
=========|_|==============|___/=/_/_/_/
2015-09-25T11:58:56.58+0200 [App/0] OUT :: Spring Boot ::
(v1.2.6.RELEASE)
2015-09-25T11:58:56.69+0200 [App/0] OUT 2015-09-25 09:58:56.690 INFO
29 --- [ main] pertySourceApplicationContextInitializer : Adding
'cloud' PropertySource to ApplicationContext
2015-09-25T11:58:56.78+0200 [App/0] OUT 2015-09-25 09:58:56.786 INFO
29 --- [ main] nfigurationApplicationContextInitializer : Adding
cloud service auto-reconfiguration to ApplicationContext
2015-09-25T11:58:56.80+0200 [App/0] OUT 2015-09-25 09:58:56.804 INFO
29 --- [ main] hello.Application :
Starting Application on 18venf3o9v7 with PID 29 (/home/vcap/app started by
vcap in /home/vcap/app)
2015-09-25T11:58:56.86+0200 [App/0] OUT 2015-09-25 09:58:56.869 INFO
29 --- [ main] s.c.a.AnnotationConfigApplicationContext :
Refreshing
org.springframework.context.annotation.AnnotationConfigApplicationContext(a)6d2ca421:
startup date [Fri Sep 25 09:58:56 UTC 2015]; root of context h
ierarchy
2015-09-25T11:58:57.22+0200 [App/0] OUT 2015-09-25 09:58:57.223 WARN
29 --- [ main] .i.s.PathMatchingResourcePatternResolver :
Skipping
[/home/vcap/app/.java-buildpack/spring_auto_reconfiguration/spring_auto_reconfiguration-1.10.0_RELEASE.jar]
because it does not denote a directory
2015-09-25T11:58:57.78+0200 [App/0] OUT 2015-09-25 09:58:57.780 INFO
29 --- [ main] urceCloudServiceBeanFactoryPostProcessor :
Auto-reconfiguring beans of type javax.sql.DataSource
2015-09-25T11:58:57.79+0200 [App/0] OUT 2015-09-25 09:58:57.789 INFO
29 --- [ main] urceCloudServiceBeanFactoryPostProcessor : No
beans of type javax.sql.DataSource found. Skipping auto-reconfiguration.
2015-09-25T11:58:57.79+0200 [App/0] OUT 2015-09-25 09:58:57.794 INFO
29 --- [ main] edisCloudServiceBeanFactoryPostProcessor :
Auto-reconfiguring beans of type
org.springframework.data.redis.connection.RedisConnectionFactory
2015-09-25T11:58:57.90+0200 [App/0] OUT 2015-09-25 09:58:57.905 INFO
29 --- [ main] edisCloudServiceBeanFactoryPostProcessor :
Reconfigured bean redisConnectionFactory into singleton service connector
org.springframework.data.redis.connection.jedis.JedisConnectionFactory(a)74ca9fd4
2015-09-25T11:58:58.29+0200 [App/0] OUT 2015-09-25 09:58:58.298 INFO
29 --- [ main] o.s.j.e.a.AnnotationMBeanExporter :
Registering beans for JMX exposure on startup
2015-09-25T11:58:58.30+0200 [App/0] OUT 2015-09-25 09:58:58.308 INFO
29 --- [ main] o.s.c.support.DefaultLifecycleProcessor :
Starting beans in phase 2147483647
2015-09-25T11:58:58.37+0200 [App/0] OUT 2015-09-25 09:58:58.375 INFO
29 --- [ main] hello.Application : Started
Application in 2.491 seconds (JVM running for 3.401)
2015-09-25T11:58:58.37+0200 [App/0] OUT 2015-09-25 09:58:58.376 INFO
29 --- [ main] hello.Application : Sending
message...
2015-09-25T11:58:58.39+0200 [App/0] OUT 2015-09-25 09:58:58.398 INFO
29 --- [ container-2] hello.Receiver :
Received <Hello from Redis!>
2015-09-25T11:58:58.40+0200 [App/0] OUT 2015-09-25 09:58:58.400 INFO
29 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing
org.springframework.context.annotation.AnnotationConfigApplicationContext(a)6d2ca421:
startup date [Fri Sep 25 09:58:56 UTC 2015]; root of context hier
archy
2015-09-25T11:58:58.40+0200 [App/0] OUT 2015-09-25 09:58:58.401 INFO
29 --- [ Thread-2] o.s.c.support.DefaultLifecycleProcessor :
Stopping beans in phase 2147483647
2015-09-25T11:58:58.40+0200 [App/0] OUT 2015-09-25 09:58:58.404 INFO
29 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter :
Unregistering JMX-exposed beans on shutdown
2015-09-25T11:58:58.44+0200 [App/0] ERR
2015-09-25T11:58:58.49+0200 [API/0] OUT App instance exited with guid
aec41933-ef0c-4d5b-8e67-da6729ca3005 payload: {"cc_partition"=>"default",
"droplet"=>"aec41933-ef0c-4d5b-8e67-da6729ca3005",
"version"=>"8985cc3d-6aa2-4e34-a11c-f64289aeace3",
"instance"=>"0147066c534c4d3bb879fffd2c149529", "
index"=>0, "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"app
instance exited", "crash_timestamp"=>1443175138}


Zuba Al <myfakename90@...>
 

i thought exit with status 0 is error. my app is running good then.
thanks Dan.