Re: Application only starts when a bogus service is attached


Fabien LEBRERE
 

Hi,


What version of the Java build pack do you have installed? `cf
buildpacks`? What does your `cf push` command & manifest.yml look like?
The version is : v3.1 | https://github.com/cloudfoundry/java-buildpack.git#7a538fb
There is not manifest.yml

The push cmd was : cf push sampletest -p sample.war

And the logs :
Starting app sampletest in org dinb / space development as admin...
-----> Downloaded app package (8.0K)
-----> Java Buildpack Version: v3.1 | https://github.com/cloudfoundry/java-buildpack.git#7a538fb
-----> Downloading Open Jdk JRE 1.8.0_60 from https://download.run.pivotal.io/openjdk/trusty/x86_64/openjdk-1.8.0_60.tar.gz (7.4s)
Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.0s)
-----> Downloading Open JDK Like Memory Calculator 1.1.1_RELEASE from https://download.run.pivotal.io/memory-calculator/trusty/x86_64/memory-calculator-1.1.1_RELEASE (0.9s)
Memory Settings: -Xmx768M -Xms768M -XX:MaxMetaspaceSize=104857K -XX:MetaspaceSize=104857K -Xss1M
-----> Downloading Tomcat Instance 8.0.24 from https://download.run.pivotal.io/tomcat/tomcat-8.0.24.tar.gz (4.1s)
Expanding Tomcat to .java-buildpack/tomcat (0.1s)
-----> Downloading Tomcat Lifecycle Support 2.4.0_RELEASE from https://download.run.pivotal.io/tomcat-lifecycle-support/tomcat-lifecycle-support-2.4.0_RELEASE.jar (0.2s)
-----> Downloading Tomcat Logging Support 2.4.0_RELEASE from https://download.run.pivotal.io/tomcat-logging-support/tomcat-logging-support-2.4.0_RELEASE.jar (0.2s)
-----> Downloading Tomcat Access Logging Support 2.4.0_RELEASE from https://download.run.pivotal.io/tomcat-access-logging-support/tomcat-access-logging-support-2.4.0_RELEASE.jar (0.2s)

-----> Uploading droplet (51M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 down
0 of 1 instances running, 1 failing
FAILED
Start unsuccessful



What do you mean by "fake"? Is it an actual service attached to a DB? Is
it a user provided service with no info?
It's a real service service, but not necessary for the app, like mongoDB (small) service
The binding it's just done for the fun, It's sure it's a strange workaround ;)



Some suggestions for troubleshooting...

1.) Run `cf logs <app>` in a second terminal. Then run `cf push`. After
the build pack completes, you should see a line that says CF is starting
the app. If you see no logging between that and the notice that the app
exited, you might try this. Sometimes when an app exits too fast, logging
is lost.

http://support.run.pivotal.io/entries/82506749-Help-My-app-is-crashing-an...
I have the trace of the app ;)
If I remove the service, the last log line after a push is :
o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 9202 ms
If I add the service, the last log line after a push is :
[CONTAINER] org.apache.catalina.startup.Catalina INFO Server startup in 10731 ms



2.) Because it's a Java app, you might also try this.

http://support.run.pivotal.io/entries/59869725-Java-Web-Applications-Slow...

(sorry for the PWS links, those should be relevant for anyone running CF
though)
Solve the problem !!!!



You might try the samples for Tomcat 8, since that's what the Java build
pack has been deploying for a while.

Dan

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.