cloudfoundry-incubator / cflocal

Stage and launch CF apps, push and pull droplets, and connect to real CF services -- in Docker
Apache License 2.0
178 stars 27 forks source link

Error: container exited with status 7 #33

Open rufreakde opened 5 years ago

rufreakde commented 5 years ago

Hey, after installation I typed in the following commands and got a short error:

<projectpath>cf local stage onboarding
Buildpack: will detect
[onboarding] 2019-03-07T08:08:37.834361300Z None of the buildpacks detected a compatible application
[onboarding] 2019-03-07T08:08:37.836511800Z 2019/03/07 08:08:37 Error: failed to build: exit status 222
Error: container exited with status 7
FAILED

How can I find out where the problem is? Our apps are java 8 applications. I tried -b java_buildpack but same error:

cf local stage onboarding -b java_buildpack
Buildpack: java_buildpack
[onboarding] 2019-03-07T08:18:05.896845500Z -----> Java Buildpack v4.15 | https://github.com/cloudfoundry/java-buildpack.git#553f2c6
[onboarding] 2019-03-07T08:18:05.904356000Z [Buildpack]                      ERROR Finalize failed with exception #<RuntimeError: No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. >
[onboarding] 2019-03-07T08:18:05.904422500Z No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
[onboarding] 2019-03-07T08:18:05.912796400Z Failed to compile droplet: Failed to run finalize script: exit status 1
[onboarding] 2019-03-07T08:18:05.914104100Z 2019/03/07 08:18:05 Error: failed to build: exit status 223
Error: container exited with status 7
FAILED

Other Buildpacks don't seem to work either:
buildpack                   position   enabled   locked   filename
java_buildpack              2          true      false    java-buildpack-cflinuxfs2-v4.17.1.zip
sap_java_buildpack_1_8_6    13         true      false    sap_java_buildpack-v1.8.6.zip
sap_java_buildpack          14         true      false    sap_java_buildpack-v1.8.6.zip
sap_java_buildpack_1_7_11   15         true      false    sap_java_buildpack-v1.7.11.zip
sap_java_buildpack_1_8_0    16         true      false    sap_java_buildpack-v1.8.0.zip

My System:

Docker version 18.09.2, build 6247962
plugin      version   command name                 command help
cf version 6.38.0+7ddf0aadd.2018-08-07
cflocal     0.19.0    local                        Stage, launch, push, pull, and export CF apps -- in Docker

Thanks in advance.

rufreakde commented 5 years ago

Project structure:

-rw-r--r-- 1 D070210 1049089   217 Mar  1 15:33 prod.mtaext
-rw-r--r-- 1 D070210 1049089   217 Mar  1 15:33 qa.mtaext
-rwxr-xr-x 1 D070210 1049089 16513 Mar  7 09:37 Jenkinsfile*
-rw-r--r-- 1 D070210 1049089   813 Mar  1 15:33 mta.yaml
drwxr-xr-x 1 D070210 1049089     0 Mar  7 10:02 onboarding/
-rw-r--r-- 1 D070210 1049089 10429 Dec 11 14:46 pom.xml
-rw-r--r-- 1 D070210 1049089    37 Dec  4 12:45 README.md
-rw-r--r-- 1 D070210 1049089   385 Dec 11 15:33 sonar-project.properties
drwxr-xr-x 1 D070210 1049089     0 Mar  7 09:37 target/

onboarding == actual java project

/onboarding/
-rw-r--r-- 1 D070210 1049089 5637 Mar  1 15:33 pom.xml
drwxr-xr-x 1 D070210 1049089    0 Dec  4 12:45 src/
drwxr-xr-x 1 D070210 1049089    0 Mar  7 09:56 target/
rufreakde commented 5 years ago

Update: tried to use a different buildpack

cf local stage onboarding -b https://github.com/cloudfoundry/java-buildpack.git
Buildpack: https://github.com/cloudfoundry/java-buildpack.git
[onboarding] 2019-03-07T10:04:39.971548500Z -----> Java Buildpack da764e0 | https://github.com/cloudfoundry/java-buildpack.git#da764e0
[onboarding] 2019-03-07T10:04:39.977065700Z [Buildpack]                      ERROR Finalize failed with exception #<RuntimeError: No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. >
[onboarding] 2019-03-07T10:04:39.977165400Z No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
[onboarding] 2019-03-07T10:04:39.984963500Z Failed to compile droplet: Failed to run finalize script: exit status 1
[onboarding] 2019-03-07T10:04:39.986606700Z 2019/03/07 10:04:39 Error: failed to build: exit status 223
Error: container exited with status 7
FAILED

Try to use offline buildpack but I am not a admin on our cf instance. And giving the local build offline buildpack .zip file via the "-b" parameter does not work...

rufreakde commented 5 years ago

So to use a offline buildpack I have to upload it into GitHub? I can't use a local clones repository? Specifing the zip file directly also does not work as it seems...

cf local stage onboarding -b "<path>\git\java-buildpack\"
Buildpack: <path>\git\java-buildpack"
[onboarding] 2019-03-07T12:21:24.240159100Z Failed to clone git repository at c:\Users\D070210\git\java-buildpack"
[onboarding] 2019-03-07T12:21:24.241120100Z 2019/03/07 12:21:24 Error: failed to build: exit status 1
Error: container exited with status 7
FAILED