Closed quantum-fusion closed 6 years ago
These are the steps that I am using to test DRAFT.
%git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra
%mvn clean install -DskipTests
%draft up
I should note, that the charts directory was modeled after the project draft/examples/example-java , with the exception that the project name was changed to spring-boot-web-0.0.1 , and that the target port should be 8080 instead of the 4567. This applies for both the Dockerfile and the charts directory dependencies and the draft.toml file that draft up requires as dependencies.
The real issue at hand here is draft up build failure, that is coming from the hard coded path with MAGICNUMBER
2018/06/01 13:02:01 error while building: ADD failed: stat /var/lib/docker/tmp/docker-builder698728306/spring-boot-web-0.0.1-SNAPSHOT.jar: no such file or directory
@squillace @bacongobbler Hey squillace this bug report is for you, since we were able to triage with the example-java use case, I was able to recreate the issue that I was having with draft up. This time with a real test scenario use case.
It looks like spring-boot-web-0.0.1-SNAPSHOT.jar does not exist in your repository. Did you make sure to compile it first before running draft up
? Your dockerfile does not have any steps to run mvn build
or the like, so it's assuming you've already compiled the jar and have it on your local filesystem.
@bacongobbler Yes, see ./target/spring-boot-web-0.0.1-SNAPSHOT.jar
doesn't seem to exist when I'm looking at https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra, but if it's in the target directory, then you'll need to change
to
ADD ./target/spring-boot-web-0.0.1-SNAPSHOT.jar .
@bacongobbler I wanted to see if helm would accept the chart specification files as they are, however forgive me I am new to helm. See example. https://docs.bitnami.com/kubernetes/how-to/create-your-first-helm-chart/
see results:
helm install --dry-run --debug /Users/me/Desktop/Projects/springboot_swagger_example-master-cassandra/charts/java [debug] Created tunnel using local port: '62622'
[debug] SERVER: "127.0.0.1:62622"
[debug] Original chart version: "" [debug] CHART PATH: /Users/me/Desktop/Projects/springboot_swagger_example-master-cassandra/charts/java
NAME: terrifying-buffoon REVISION: 1 RELEASED: Fri Jun 1 13:58:36 2018 CHART: java-v0.1.0 USER-SUPPLIED VALUES: {}
COMPUTED VALUES: image: pullPolicy: IfNotPresent ingress: enabled: false replicaCount: 1 resources: limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi service: externalPort: 80 internalPort: 8080 name: java type: ClusterIP
HOOKS: MANIFEST:
apiVersion: v1 kind: Service metadata: name: terrifying-buffoon-java labels: chart: "java-v0.1.0" spec: type: ClusterIP ports:
apiVersion: extensions/v1beta1 kind: Deployment metadata: name: terrifying-buffoon-java labels: draft: draft-app chart: "java-v0.1.0" spec: replicas: 1 template: metadata: annotations: buildID: labels: draft: draft-app app: terrifying-buffoon-java spec: containers:
@bacongobbler adding the ./target path slightly changed the failure code.
draft up
Draft Up Started: 'spring-boot-web-0.0.1': 01CEY89AK71E96JJEVWYV8PZ5Z
spring-boot-web-0.0.1: Building Docker Image: SUCCESS ⚓ (11.0096s)
spring-boot-web-0.0.1: Pushing Docker Image: SUCCESS ⚓ (76.0141s)
spring-boot-web-0.0.1: Releasing Application: FAIL ❌ (0.3740s)
Inspect the logs with draft logs 01CEY89AK71E96JJEVWYV8PZ5Z
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ draft logs 01CEY89AK71E96JJEVWYV8PZ5Z
Step 1/6 : FROM java:8
---> d23bdf5b1b1b
Step 2/6 : MAINTAINER info@technologyventureslimited.com
---> Using cache
---> d23490ec5233
Step 3/6 : EXPOSE 8080 9042
---> Using cache
---> eba04ddf9385
Step 4/6 : ADD ./target/spring-boot-web-0.0.1-SNAPSHOT.jar .
---> edcf4218ab75
Step 5/6 : ENTRYPOINT ["java", "-jar", "spring-boot-web-0.0.1-SNAPSHOT.jar"]
---> Running in 9d88f1c104d6
---> e4538fbf5cb1
Step 6/6 : CMD java -jar spring-boot-web-0.0.1-SNAPSHOT.jar $@
---> Running in 3002f5600228
---> 759902760a50
Successfully built 759902760a50
Successfully tagged joethecoder2/spring-boot-web-0.0.1:a1eeca53b27db69a18ed65afeef4698c9169c672
The push refers to repository [docker.io/joethecoder2/spring-boot-web-0.0.1]
4b3a2b1c7d11: Preparing
35c20f26d188: Preparing
c3fe59dd9556: Preparing
6ed1a81ba5b6: Preparing
a3483ce177ce: Preparing
ce6c8756685b: Preparing
30339f20ced0: Preparing
0eb22bfb707d: Preparing
a2ae92ffcd29: Preparing
ce6c8756685b: Waiting
30339f20ced0: Waiting
0eb22bfb707d: Waiting
a2ae92ffcd29: Waiting
c3fe59dd9556: Mounted from joethecoder2/spring-boot-web
35c20f26d188: Mounted from joethecoder2/spring-boot-web
6ed1a81ba5b6: Mounted from joethecoder2/spring-boot-web
a3483ce177ce: Mounted from joethecoder2/spring-boot-web
30339f20ced0: Mounted from joethecoder2/spring-boot-web
ce6c8756685b: Mounted from joethecoder2/spring-boot-web
0eb22bfb707d: Mounted from joethecoder2/spring-boot-web
a2ae92ffcd29: Mounted from joethecoder2/spring-boot-web
4b3a2b1c7d11: Pushed
a1eeca53b27db69a18ed65afeef4698c9169c672: digest: sha256:73d1aaed0dc3e3ce5fa90d3c2b3fe9bb695729aed9018756a9af9b937b2c62d6 size: 2212
2018/06/01 14:05:01 error while releasing: could not install release: rpc error: code = Unknown desc = release spring-boot-web-0.0.1 failed: Service "spring-boot-web-0.0.1-java" is invalid: metadata.name: Invalid value: "spring-boot-web-0.0.1-java": a DNS-1035 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is 'a-z?')
@bacongobbler I confirmed that the build is actually being uploaded to docker hub, despite the error message that is coming from draft up. draft up thinks that there are no deployed releases, however the docker hub shows that this isn't true.
fyi. https://hub.docker.com/r/joethecoder2/spring-boot-web-0.0.1/
draft up
Draft Up Started: 'spring-boot-web-0.0.1': 01CEY8NXPHKZ4KJXNJ626DEFCB
spring-boot-web-0.0.1: Building Docker Image: SUCCESS ⚓ (5.0024s)
spring-boot-web-0.0.1: Pushing Docker Image: SUCCESS ⚓ (1.5608s)
spring-boot-web-0.0.1: Releasing Application: FAIL ❌ (0.6094s)
Inspect the logs with draft logs 01CEY8NXPHKZ4KJXNJ626DEFCB
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ draft logs 01CEY8NXPHKZ4KJXNJ626DEFCB
Step 1/6 : FROM java:8
---> d23bdf5b1b1b
Step 2/6 : MAINTAINER info@technologyventureslimited.com
---> Using cache
---> d23490ec5233
Step 3/6 : EXPOSE 8080 9042
---> Using cache
---> eba04ddf9385
Step 4/6 : ADD ./target/spring-boot-web-0.0.1-SNAPSHOT.jar .
---> Using cache
---> edcf4218ab75
Step 5/6 : ENTRYPOINT ["java", "-jar", "spring-boot-web-0.0.1-SNAPSHOT.jar"]
---> Using cache
---> e4538fbf5cb1
Step 6/6 : CMD java -jar spring-boot-web-0.0.1-SNAPSHOT.jar $@
---> Using cache
---> 759902760a50
Successfully built 759902760a50
Successfully tagged joethecoder2/spring-boot-web-0.0.1:b588c10d4b06e984ec4a4a8e4c64a4d68efcd59d
The push refers to repository [docker.io/joethecoder2/spring-boot-web-0.0.1]
4b3a2b1c7d11: Preparing
35c20f26d188: Preparing
c3fe59dd9556: Preparing
6ed1a81ba5b6: Preparing
a3483ce177ce: Preparing
ce6c8756685b: Preparing
30339f20ced0: Preparing
0eb22bfb707d: Preparing
a2ae92ffcd29: Preparing
ce6c8756685b: Waiting
30339f20ced0: Waiting
0eb22bfb707d: Waiting
a2ae92ffcd29: Waiting
c3fe59dd9556: Layer already exists
4b3a2b1c7d11: Layer already exists
6ed1a81ba5b6: Layer already exists
35c20f26d188: Layer already exists
a3483ce177ce: Layer already exists
0eb22bfb707d: Layer already exists
30339f20ced0: Layer already exists
a2ae92ffcd29: Layer already exists
ce6c8756685b: Layer already exists
b588c10d4b06e984ec4a4a8e4c64a4d68efcd59d: digest: sha256:73d1aaed0dc3e3ce5fa90d3c2b3fe9bb695729aed9018756a9af9b937b2c62d6 size: 2212
2018/06/01 14:10:33 error while releasing: could not upgrade release: rpc error: code = Unknown desc = "spring-boot-web-0.0.1" has no deployed releases
@bacongobbler I noticed a change of state with helm , and it still believes that there are no deployed releases of spring-boot-web-0.0.1. I can tell this is pretty close, but still failed deployment. Any ideas as to why draft up fails the deployed release?
helm ls
NAME REVISION UPDATED STATUS CHART NAMESPACE
example-java 4 Thu May 31 20:07:51 2018 DEPLOYED java-v0.1.0 default
example-python 2 Wed May 23 13:45:36 2018 DEPLOYED python-v0.1.0 default
example-spring-boot 3 Wed May 30 17:05:19 2018 DEPLOYED java-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default
spring-boot-web-0.0.1 1 Fri Jun 1 14:07:04 2018 FAILED java-v0.1.0 default
@bacongobbler Do you know of a way to test the charts manually using helm to get them installed? I tried the commands below, but the results look suspect.
helm install /Users/me/Desktop/Projects/springboot_swagger_example-master-cassandra/charts/java NAME: rousing-rottweiler LAST DEPLOYED: Fri Jun 1 14:21:48 2018 NAMESPACE: default STATUS: DEPLOYED
RESOURCES:
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
rousing-rottweiler-java ClusterIP 10.0.0.137
==> v1beta1/Deployment NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE rousing-rottweiler-java 1 1 1 0 0s
==> v1/Pod(related) NAME READY STATUS RESTARTS AGE rousing-rottweiler-java-674038704-p7qmj 0/1 ContainerCreating 0 0s
NOTES:
http://rousing-rottweiler. to access your application
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ helm ls
NAME REVISION UPDATED STATUS CHART NAMESPACE
example-java 4 Thu May 31 20:07:51 2018 DEPLOYED java-v0.1.0 default
example-python 2 Wed May 23 13:45:36 2018 DEPLOYED python-v0.1.0 default
example-spring-boot 3 Wed May 30 17:05:19 2018 DEPLOYED java-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default
rousing-rottweiler 1 Fri Jun 1 14:21:48 2018 DEPLOYED java-v0.1.0 default
spring-boot-web-0.0.1 1 Fri Jun 1 14:07:04 2018 FAILED java-v0.1.0 default
@bacongobbler I was able to prove that I installed the helm package successfully for the spring-boot-web project, as well as the example-java project manually using helm install. It appears this may prove that draft up may have a bug here in the deploy step.
See these two projects are now deployed using helm install
helm install /Users/me/Desktop/draft/examples/example-java/charts/java NAME: falling-quetzal LAST DEPLOYED: Fri Jun 1 14:29:50 2018 NAMESPACE: default STATUS: DEPLOYED
RESOURCES:
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
falling-quetzal-java ClusterIP 10.0.0.191
==> v1beta1/Deployment NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE falling-quetzal-java 1 1 1 0 0s
==> v1/Pod(related) NAME READY STATUS RESTARTS AGE falling-quetzal-java-2895538911-zlvx5 0/1 ContainerCreating 0 0s
NOTES:
http://falling-quetzal. to access your application
MacBook-Pro-2:example-java $ helm ls
Error: Get https://192.168.64.3:8443/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp 192.168.64.3:8443: connect: cannot allocate memory
MacBook-Pro-2:example-java $ helm ls
NAME REVISION UPDATED STATUS CHART NAMESPACE
example-java 4 Thu May 31 20:07:51 2018 DEPLOYED java-v0.1.0 default
example-python 2 Wed May 23 13:45:36 2018 DEPLOYED python-v0.1.0 default
example-spring-boot 3 Wed May 30 17:05:19 2018 DEPLOYED java-v0.1.0 default
falling-quetzal 1 Fri Jun 1 14:29:50 2018 DEPLOYED java-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default
rousing-rottweiler 1 Fri Jun 1 14:21:48 2018 DEPLOYED java-v0.1.0 default
spring-boot-web-0.0.1 1 Fri Jun 1 14:07:04 2018 FAILED java-v0.1.0 default
@bacongobbler Do you know the manual command to launch the example-java service using helm?
@bacongobbler I have a need to know how to expose the port and the service so that it can be consumed in Safari as a URL:port
@squillace Hey Ralph, can you weigh in on this one? The problem is that the app failed to deploy when using draft up. 2018/06/01 14:10:33 error while releasing: could not upgrade release: rpc error: code = Unknown desc = "spring-boot-web-0.0.1" has no deployed releases. I then tried to do a manual install using helm install
Hey @quantum-fusion, there's a TON of information in this thread so I need some time to process it. Let me backscroll first and get back to you. Cheers
@bacongobbler Ok. great, see steps to reproduce.
Steps to reproduce the problem:
%git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra
%mvn clean install -DskipTests
%draft up
I'm unable to get the project to build from master. Maybe that's why the project won't deploy properly on draft up
?
root@979d5fa7b406:/app# mvn clean install -DskipTests
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.server.springboot:spring-boot-web:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at no local POM @ line 13, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.server.springboot:spring-boot-web:0.0.1-SNAPSHOT (/app/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.server.springboot:spring-boot-web:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at no local POM @ line 13, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Once you have the application up and running, you can run the draft connect
command to connect to your application and open it in the browser. There's a pretty good Getting Started Guide in the documentation that follows through the first steps with Draft. :)
For example, using example-python I can:
><> cd examples/example-python/
><> ls
app.py requirements.txt
><> /usr/local/bin/draft create
--> Draft detected Python (97.267760%)
--> Ready to sail
><> /usr/local/bin/draft up
Draft Up Started: 'example-python': 01CEYGKRSTV00CKXP0GMGYEEVX
example-python: Building Docker Image: SUCCESS ⚓ (17.0025s)
example-python: Pushing Docker Image: SUCCESS ⚓ (14.4780s)
example-python: Releasing Application: SUCCESS ⚓ (2.0962s)
Inspect the logs with `draft logs 01CEYGKRSTV00CKXP0GMGYEEVX`
Then in another terminal,
><> /usr/local/bin/draft connect
Connect to python:8080 on localhost:38627
[python]: * Environment: production
[python]: WARNING: Do not use the development server in a production environment.
[python]: Use a production WSGI server instead.
[python]: * Debug mode: off
[python]: * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
[python]: 127.0.0.1 - - [01/Jun/2018 20:29:58] "GET / HTTP/1.1" 200 -
Switching back to the previous terminal, I can then connect to the application.
><> curl localhost:38627
Hello, World!
I will download and test right now.
%git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra
% cd springboot_swagger_example-master-cassandra/
%mvn clean install -DskipTests
%draft up
@bacongobbler Sorry about that, you have to cd springboot_swagger_example-master-cassandra/ , then do mvn clean install -DskipTests
This is the full transcript:
draft up
Draft Up Started: 'spring-boot-web-0.0.1': 01CEYHFCWXJW73T0HSEBNCJRZW
spring-boot-web-0.0.1: Building Docker Image: SUCCESS ⚓ (7.0026s)
spring-boot-web-0.0.1: Pushing Docker Image: SUCCESS ⚓ (78.2572s)
spring-boot-web-0.0.1: Releasing Application: FAIL ❌ (0.2611s)
Inspect the logs with draft logs 01CEYHFCWXJW73T0HSEBNCJRZW
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ draft logs 01CEYHFCWXJW73T0HSEBNCJRZW
Step 1/6 : FROM java:8
---> d23bdf5b1b1b
Step 2/6 : MAINTAINER info@technologyventureslimited.com
---> Using cache
---> d23490ec5233
Step 3/6 : EXPOSE 8080 9042
---> Using cache
---> eba04ddf9385
Step 4/6 : ADD ./target/spring-boot-web-0.0.1-SNAPSHOT.jar .
---> 1e886aea4392
Step 5/6 : ENTRYPOINT ["java", "-jar", "spring-boot-web-0.0.1-SNAPSHOT.jar"]
---> Running in 1311179ab933
---> ed37c4c68c18
Step 6/6 : CMD java -jar spring-boot-web-0.0.1-SNAPSHOT.jar $@
---> Running in 0dba8de33292
---> c5bd82beb935
Successfully built c5bd82beb935
Successfully tagged joethecoder2/spring-boot-web-0.0.1:17d0a91a6f334e598f78424c06c8b556ff9bb86e
The push refers to repository [docker.io/joethecoder2/spring-boot-web-0.0.1]
95c85ae70dac: Preparing
35c20f26d188: Preparing
c3fe59dd9556: Preparing
6ed1a81ba5b6: Preparing
a3483ce177ce: Preparing
ce6c8756685b: Preparing
30339f20ced0: Preparing
0eb22bfb707d: Preparing
a2ae92ffcd29: Preparing
30339f20ced0: Waiting
0eb22bfb707d: Waiting
a2ae92ffcd29: Waiting
ce6c8756685b: Waiting
6ed1a81ba5b6: Layer already exists
a3483ce177ce: Layer already exists
c3fe59dd9556: Layer already exists
35c20f26d188: Layer already exists
ce6c8756685b: Layer already exists
30339f20ced0: Layer already exists
a2ae92ffcd29: Layer already exists
0eb22bfb707d: Layer already exists
95c85ae70dac: Pushed
17d0a91a6f334e598f78424c06c8b556ff9bb86e: digest: sha256:9093790fbcab53b2e2dd8fb9be57b2aedf77cd4ad49041ab683a8678e3bad53a size: 2212
2018/06/01 16:45:33 error while releasing: could not upgrade release: rpc error: code = Unknown desc = "spring-boot-web-0.0.1" has no deployed releases
That's what I did.
To re-create (running inside a docker container so I don't have to install maven on my machine):
git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra
cd springboot_swagger_example-master-cassandra
docker run -itv $PWD:/springboot_swagger_example-master-cassandra ubuntu bash
apt update
apt install maven
cd /springboot_swagger_example-master-cassandra
mvn clean install -DskipTests
It seems like you are on the right track.
@bacongobbler The error message that we are getting isn't telling us that the deployment to DockerHub failed. I know this, because draft up, is actually publishing the project to this location https://hub.docker.com/r/joethecoder2/spring-boot-web-0.0.1/
The problem at hand, is that when I do a helm ls , we actually see that the deployment fails for some reason as a service, and the commands under the hood that draft up are using to deploy the service actually fail. Their return codes are as follows (2018/06/01 16:45:33 error while releasing: could not upgrade release: rpc error: code = Unknown desc = "spring-boot-web-0.0.1" has no deployed releases). Supporting information is found doing helm ls:
helm ls
NAME REVISION UPDATED STATUS CHART NAMESPACE
example-java 4 Thu May 31 20:07:51 2018 DEPLOYED java-v0.1.0 default
example-python 2 Wed May 23 13:45:36 2018 DEPLOYED python-v0.1.0 default
example-spring-boot 3 Wed May 30 17:05:19 2018 DEPLOYED java-v0.1.0 default
falling-quetzal 1 Fri Jun 1 14:29:50 2018 DEPLOYED java-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default
rousing-rottweiler 1 Fri Jun 1 14:21:48 2018 DEPLOYED java-v0.1.0 default
spring-boot-web-0.0.1 1 Fri Jun 1 14:07:04 2018 FAILED java-v0.1.0 default
The problem seems to be that draft up, will not deploy the service, and provide an IP address and port number to expose the kubernetes service.
@bacongobbler Can you give a reading on whether you think this is a draft up error message, or do we think this is a helm error message? "error while releasing: could not upgrade release: rpc error: code = Unknown desc = "spring-boot-web-0.0.1" has no deployed releases". If we think it is a Helm error message, I can open an issue to the Kubernetes/Helm project to see if we can get a reading on it, however if it is a Draft internal error code, we would like to know so we can fix it. Please let me know your thoughts.
@bacongobbler Doing a helm install
helm install /Users/hottelet/Desktop/test/springboot_swagger_example-master-cassandra/charts/java NAME: nuanced-otter LAST DEPLOYED: Fri Jun 1 17:22:17 2018 NAMESPACE: default STATUS: DEPLOYED
RESOURCES:
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nuanced-otter-java ClusterIP 10.0.0.236
==> v1beta1/Deployment NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nuanced-otter-java 1 1 1 0 0s
==> v1/Pod(related) NAME READY STATUS RESTARTS AGE nuanced-otter-java-2448316626-jqr7l 0/1 Pending 0 0s
NOTES:
http://nuanced-otter. to access your application
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ helm ls
NAME REVISION UPDATED STATUS CHART NAMESPACE
example-java 4 Thu May 31 20:07:51 2018 DEPLOYED java-v0.1.0 default
example-python 2 Wed May 23 13:45:36 2018 DEPLOYED python-v0.1.0 default
example-spring-boot 3 Wed May 30 17:05:19 2018 DEPLOYED java-v0.1.0 default
falling-quetzal 1 Fri Jun 1 14:29:50 2018 DEPLOYED java-v0.1.0 default
lopsided-donkey 1 Wed May 2 13:08:09 2018 DEPLOYED minecraft-0.2.1 default
my-release 1 Wed May 2 13:08:45 2018 DEPLOYED minecraft-0.2.1 default
nuanced-otter 1 Fri Jun 1 17:22:17 2018 DEPLOYED java-v0.1.0 default
rousing-rottweiler 1 Fri Jun 1 14:21:48 2018 DEPLOYED java-v0.1.0 default
spring-boot-web-0.0.1 1 Fri Jun 1 14:07:04 2018 FAILED java-v0.1.0 default
@bacongobbler Some good News. The draft up command succeeded and built, pushed, and released the application. I was able to do this by simply changing the name of the service in the draft.toml file to another name other than the service described in the Dockerfile. I called it another name example-javahello and draft up recognized that name instead of the Dockerfile name that I gave it in a traditional push.
draft up
Draft Up Started: 'example-javahello': 01CEYV1QHC4CWAQP67E8C8Z780
example-javahello: Building Docker Image: SUCCESS ⚓ (6.0051s)
example-javahello: Pushing Docker Image: SUCCESS ⚓ (215.4861s)
example-javahello: Releasing Application: SUCCESS ⚓ (3.0344s)
Inspect the logs with draft logs 01CEYV1QHC4CWAQP67E8C8Z780
https://hub.docker.com/r/joethecoder2/example-javahello/
The Bad News: draft connect Error: cannot get pod with buildID 01CEYV1QHC4CWAQP67E8C8Z780: timed out
The reasons for the timeout are probably I ran out of system resources again, and I will have to see how to kill the Pods. I checked, and this is just like #776 draft timeout issue.
kubectl get pods NAME READY STATUS RESTARTS AGE cassandra-0 1/1 Running 1 9d cassandra-1 0/1 Pending 0 9d example-java-java-1081369601-4pgk4 0/1 Pending 0 20m example-javahello-java-886731692-01n80 0/1 Pending 0 4m example-python-python-3748734271-lmjcd 1/1 Running 1 9d example-spring-boot-java-3950454283-5xshm 0/1 CrashLoopBackOff 594 2d falling-quetzal-java-2895538911-zlvx5 0/1 InvalidImageName 0 5h my-release-minecraft-1980511755-z5kt2 0/1 Pending 0 9d nuanced-otter-java-2448316626-jqr7l 0/1 InvalidImageName 0 2h rousing-rottweiler-java-674038704-p7qmj 0/1 InvalidImageName 0 5h spring-boot-web-4126579859-jmphs 1/1 Running 1 9d spring-boot-web-4126579859-pph77 1/1 Running 1 9d vetoed-crab-java-3296288057-1nrdh 0/1 Pending 0 21m
kubectl describe pod example-javahello-java-886731692-01n80
Name: example-javahello-java-886731692-01n80
Namespace: default
Node: /
Labels: app=example-javahello-java
draft=example-javahello
pod-template-hash=886731692
Annotations: buildID=01CEYV1QHC4CWAQP67E8C8Z780
kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"default","name":"example-javahello-java-886731692","uid":"bf94128d-65f4-11e8-8c16...
Status: Pending
IP:
Controllers: ReplicaSet/example-javahello-java-886731692
Containers:
java:
Image: docker.io/joethecoder2/example-javahello:00d53e10258c7145c2e9bdc7d8ae303bc5d980f5
Port: 8080/TCP
Limits:
cpu: 100m
memory: 128Mi
Requests:
cpu: 100m
memory: 128Mi
Environment:
6m
kubectl delete pods --all pod "cassandra-0" deleted pod "cassandra-1" deleted pod "example-java-java-1081369601-4pgk4" deleted pod "example-javahello-java-886731692-01n80" deleted pod "example-python-python-3748734271-lmjcd" deleted pod "example-spring-boot-java-3950454283-5xshm" deleted pod "falling-quetzal-java-2895538911-zlvx5" deleted pod "my-release-minecraft-1980511755-z5kt2" deleted pod "nuanced-otter-java-2448316626-jqr7l" deleted pod "rousing-rottweiler-java-674038704-p7qmj" deleted pod "spring-boot-web-4126579859-jmphs" deleted pod "spring-boot-web-4126579859-pph77" deleted pod "vetoed-crab-java-3296288057-1nrdh" deleted
kubectl get pods
NAME READY STATUS RESTARTS AGE
cassandra-0 0/1 ContainerCreating 0
This is because the pods you see are most likely part of a deployment, which creates a replica set. This means the cluster will try to meet the desired state of your cluster, so when you delete a pod, the cluster will simply spawn one back again.
To delete those applications you need to delete their deployments.
@bacongobbler This is exciting, success.
draft connect Connect to java:8080 on localhost:55080 java: java: . _ _ java: /\ / '_ () \ \ \ \ java: ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ java: \/ _)| |)| | | | | || (| | ) ) ) ) java: ' |__| .|| ||| |\, | / / / /
java: :: Spring Boot :: (v1.5.9.RELEASE) java: java: 2018-06-01 23:54:15.507 INFO 1 --- [ main] c.s.springboot.SpringBootWebApplication : Starting SpringBootWebApplication v0.0.1-SNAPSHOT on example-javahello-java-886731692-15rj3 with PID 1 (/spring-boot-web-0.0.1-SNAPSHOT.jar started by root in /) java: 2018-06-01 23:54:16.300 INFO 1 --- [ main] c.s.springboot.SpringBootWebApplication : No active profile set, falling back to default profiles: default
@bacongobbler It looks like with the running Pod service that it can not connect to the port number or service. Any idea about the ports timing out? I haven't seen this one before. I could always change the port mapping back to 4567 like the java-example.
draft connect Connect to java:8080 on localhost:55080 java: java: . _ _ java: /\ / '_ () \ \ \ \ java: ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ java: \/ _)| |)| | | | | || (| | ) ) ) ) java: ' |__| .|| ||| |\, | / / / /
java: :: Spring Boot :: (v1.5.9.RELEASE) java: java: 2018-06-01 23:54:15.507 INFO 1 --- [ main] c.s.springboot.SpringBootWebApplication : Starting SpringBootWebApplication v0.0.1-SNAPSHOT on example-javahello-java-886731692-15rj3 with PID 1 (/spring-boot-web-0.0.1-SNAPSHOT.jar started by root in /) java: 2018-06-01 23:54:16.300 INFO 1 --- [ main] c.s.springboot.SpringBootWebApplication : No active profile set, falling back to default profiles: default java: 2018-06-01 23:54:53.827 INFO 1 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6659c656: startup date [Fri Jun 01 23:54:53 UTC 2018]; root of context hierarchy ERROR: logging before flag.Parse: E0601 19:53:26.302045 5961 portforward.go:331] an error occurred forwarding 55080 -> 8080: error forwarding port 8080 to pod c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b, uid : exit status 1: 2018/06/01 23:55:45 socat[13179.140521999898368] E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused ERROR: logging before flag.Parse: E0601 19:53:26.366231 5961 portforward.go:331] an error occurred forwarding 55080 -> 8080: error forwarding port 8080 to pod c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b, uid : exit status 1: 2018/06/01 23:55:45 socat[13182.140323233367808] E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused ERROR: logging before flag.Parse: E0601 19:53:26.386073 5961 portforward.go:331] an error occurred forwarding 55080 -> 8080: error forwarding port 8080 to pod c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b, uid : exit status 1: 2018/06/01 23:55:45 socat[13184.140015752382208] E connect(5, AF=2 127.0.0.1:8080, 16): Connection refused ERROR: logging before flag.Parse: E0601 19:53:42.828190 5961 portforward.go:331] an error occurred forwarding 55080 -> 8080: error forwarding port 8080 to pod c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b, uid : container not running (c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b) ERROR: logging before flag.Parse: E0601 19:53:42.833115 5961 portforward.go:331] an error occurred forwarding 55080 -> 8080: error forwarding port 8080 to pod c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b, uid : container not running (c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b) ERROR: logging before flag.Parse: E0601 19:53:42.837773 5961 portforward.go:331] an error occurred forwarding 55080 -> 8080: error forwarding port 8080 to pod c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b, uid : container not running (c121aed35ce7d72b907d7ea9842bb317f9a4fa400eec9c610f17de1276a9851b) ERROR: logging before flag.Parse: E0601 19:54:43.552403 5961 portforward.go:271] error creating error stream for port 55080 -> 8080: Timeout occurred ERROR: logging before flag.Parse: E0601 19:54:48.443524 5961 portforward.go:293] error creating forwarding stream for port 55080 -> 8080: Timeout occurred ERROR: logging before flag.Parse: E0601 19:55:18.446424 5961 portforward.go:293] error creating forwarding stream for port 55080 -> 8080: Timeout occurred ERROR: logging before flag.Parse: E0601 19:56:11.903837 5961 portforward.go:271] error creating error stream for port 55080 -> 8080: Timeout occurred ERROR: logging before flag.Parse: E0601 19:56:41.908449 5961 portforward.go:293] error creating forwarding stream for port 55080 -> 8080: Timeout occurred Your connection is still active. Connect to java:8080 on localhost:55080
curl localhost:8080/helloworld curl: (7) Failed to connect to localhost port 8080: Connection refused
curl localhost:55080/ curl: (56) Recv failure: Connection reset by peer
get deployments --all-namespaces NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE default example-java-java 1 1 1 1 13d default example-javahello-java 1 1 1 1 29m default example-python-python 1 1 1 1 9d default example-spring-boot-java 1 1 1 0 2d default falling-quetzal-java 1 1 1 0 5h default my-release-minecraft 1 1 1 0 30d default nuanced-otter-java 1 1 1 0 2h default rousing-rottweiler-java 1 1 1 0 5h default spring-boot-web 2 2 2 0 170d default vetoed-crab-java 1 1 1 0 46m kube-system kube-dns 1 1 1 1 297d kube-system tiller-deploy 1 1 1 1 30d
kubectl get deployments --all-namespaces NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE kube-system kube-dns 1 1 1 1 297d kube-system tiller-deploy 1 1 1 1 30d
kubectl get pods NAME READY STATUS RESTARTS AGE cassandra-0 1/1 Running 0 17m cassandra-1 0/1 Pending 0 16m
kubectl delete pods --all
pod "cassandra-0" deleted
pod "cassandra-1" deleted
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ kubectl get pods
NAME READY STATUS RESTARTS AGE
cassandra-0 0/1 Running 0
Hmm, I've seen that error before when the k8s cluster was hosed (or getting close to being hosed). I would try with a new cluster that has plenty of resources to run your workload just to be thorough.
@bacongobbler @radu-matei I reviewed these connection errors, and they are very strange, because the example for charts are now identical to the java-example. The main difference is the name of the app that I defined in the draft.toml file named example-javahello. Aside from that, the springboot-swagger-example-master-cassandra/charts directory has the same contents as the example-java/charts directory. Any ideas on why the spring-boot application can not connect? What is the REST API used in the java-example?
draft up
Draft Up Started: 'example-javahello': 01CEYY05HMWPMHZTX6K28F939K
example-javahello: Building Docker Image: SUCCESS ⚓ (5.0011s)
example-javahello: Pushing Docker Image: SUCCESS ⚓ (2.9837s)
example-javahello: Releasing Application: SUCCESS ⚓ (2.5181s)
Inspect the logs with draft logs 01CEYY05HMWPMHZTX6K28F939K
MacBook-Pro-2:springboot_swaggerexample-master-cassandra $ draft connect Connect to java:4567 on localhost:57426 java: java: . ____ java: /\ / __' () _ \ \ \ \ java: ( ( )__ | ' | '| | ' \/ _` | \ \ \ \ java: \/ _)| |)| | | | | || (| | ) ) ) ) java: ' |__| .|| ||| |\, | / / / /
java: :: Spring Boot :: (v1.5.9.RELEASE) java: ERROR: logging before flag.Parse: E0601 20:23:41.431395 6279 portforward.go:331] an error occurred forwarding 57426 -> 4567: error forwarding port 4567 to pod 42f79778730f8217f54ceb9382ad6e4d8251ef7f0474f46114b33d9cbd50753f, uid : exit status 1: 2018/06/02 00:26:01 socat[817.140333413979904] E connect(5, AF=2 127.0.0.1:4567, 16): Connection refused ERROR: logging before flag.Parse: E0601 20:23:41.470527 6279 portforward.go:331] an error occurred forwarding 57426 -> 4567: error forwarding port 4567 to pod 42f79778730f8217f54ceb9382ad6e4d8251ef7f0474f46114b33d9cbd50753f, uid : exit status 1: 2018/06/02 00:26:01 socat[841.139646155011840] E connect(5, AF=2 127.0.0.1:4567, 16): Connection refused ERROR: logging before flag.Parse: E0601 20:23:41.494442 6279 portforward.go:331] an error occurred forwarding 57426 -> 4567: error forwarding port 4567 to pod 42f79778730f8217f54ceb9382ad6e4d8251ef7f0474f46114b33d9cbd50753f, uid : exit status 1: 2018/06/02 00:26:01 socat[864.139700109412096] E connect(5, AF=2 127.0.0.1:4567, 16): Connection refused java: 2018-06-02 00:26:04.217 INFO 1 --- [ main] c.s.springboot.SpringBootWebApplication : Starting SpringBootWebApplication v0.0.1-SNAPSHOT on example-javahello-java-1916590331-schc6 with PID 1 (/spring-boot-web-0.0.1-SNAPSHOT.jar started by root in /) java: 2018-06-02 00:26:04.609 INFO 1 --- [ main] c.s.springboot.SpringBootWebApplication : No active profile set, falling back to default profiles: default ERROR: logging before flag.Parse: E0601 20:24:00.497542 6279 portforward.go:331] an error occurred forwarding 57426 -> 4567: error forwarding port 4567 to pod 42f79778730f8217f54ceb9382ad6e4d8251ef7f0474f46114b33d9cbd50753f, uid : exit status 1: 2018/06/02 00:26:20 socat[1012.140198690682624] E connect(5, AF=2 127.0.0.1:4567, 16): Connection refused ERROR: logging before flag.Parse: E0601 20:24:00.525045 6279 portforward.go:331] an error occurred forwarding 57426 -> 4567: error forwarding port 4567 to pod 42f79778730f8217f54ceb9382ad6e4d8251ef7f0474f46114b33d9cbd50753f, uid : exit status 1: 2018/06/02 00:26:20 socat[1013.140459901654784] E connect(5, AF=2 127.0.0.1:4567, 16): Connection refused ERROR: logging before flag.Parse: E0601 20:24:00.554516 6279 portforward.go:331] an error occurred forwarding 57426 -> 4567: error forwarding port 4567 to pod 42f79778730f8217f54ceb9382ad6e4d8251ef7f0474f46114b33d9cbd50753f, uid : exit status 1: 2018/06/02 00:26:20 socat[1014.140480790349568] E connect(5, AF=2 127.0.0.1:4567, 16): Connection refused java: 2018-06-02 00:26:30.510 INFO 1 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6659c656: startup date [Sat Jun 02 00:26:30 UTC 2018]; root of context hierarchy
@bacongobbler I will do a shutdown of all resources, kill the cluster, and do a reboot to be sure. In the meanwhile, you might try cloning the project to see what you can see on your end. This is mighty strange, but this is new territory for me here, I haven't actually seen the example-springboot working yet either, so this is new terrain for us all....
kubectl get deployments --all-namespaces
NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
default example-javahello-java 1 1 1 1 6m
kube-system kube-dns 1 1 1 1 297d
kube-system tiller-deploy 1 1 1 1 30d
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ kubectl delete deployment example-javahello-java
deployment "example-javahello-java" deleted
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ kubectl get deployments --all-namespaces
NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
kube-system kube-dns 1 1 1 1 297d
kube-system tiller-deploy 1 1 1 1 30d
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ kubectl get deployments --all-namespaces
NAMESPACE NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
kube-system kube-dns 1 1 1 1 297d
kube-system tiller-deploy 1 1 1 1 30d
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ kubectl get pods
NAME READY STATUS RESTARTS AGE
cassandra-0 1/1 Running 0
@bacongobbler I don't really see any reason now why the ports won't map and the service will not connect. Have you seen this before? @radu-matei Any ideas on this one?
Steps to reproduce:
%git clone https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra
% cd springboot_swagger_example-master-cassandra/
% mvn clean install -DskipTests
% draft up
% draft connect
@bacongobbler Have you seen a kubernetes pod.yaml file before? I don't actually think that helm install
apiVersion: v1 kind: Pod metadata: name: spring-boot-web-demo labels: purpose: demonstrate-spring-boot-web spec: containers:
Kubernetes has some known problems, for example strings passed as arguments are immutable, and I can't for example pass a cassandraIP address and cassandra Port to a service. Even though I pass the arguments they will not persist to the service allowing me to print out the arguments inside the Kubernetes POD. In a Docker container this wouldn't be the case, and I can pass arguments just like I can do with JAVA arguments from command line. Kubernetes on the other hand is a real problem and will not persist arguments. Maybe Helm has a way to do this from command line any ideas?
@bacongobbler I am going to call it a night here, perhaps if you have any ideas you can share them, I know you had a bug fix to put in for the example-springboot example. I might like to see if you can get this one working on your end.
@bacongobbler I do know that I have already gotten this service to run without the draft connect command, and know that it will run with kubernetes and the pod definition file that I provided if we run using minikube, and command line kubernetes. See (https://github.com/quantum-fusion/springboot_swagger_example-master-cassandra/tree/master/Kubernetes)
if draft up WORKS, but draft connect doesn't, then that's because draft cannot find the app endpoint. Let's have a look this weekend.
@bacongobbler I have a theory on why it would not connect for the spring-boot service. My port bindings are actually on port 8080, but the charts file is on port 80. I will have to update my port mappings, and see if this makes a difference.
@squillace @bacongobbler I should be able to test this theory by looking at your example-springboot project sample that had an error in the Dockerfile, we may have to focus on this example in order to get going in the right direction.
@squillace @bacongobbler To clarify, I was able to get both draft up and draft connect working with the example repo that I provided. The problem now is with the port mappings, and I am hoping we may be able to get a fix in for the example-springboot application. The one that I am working with is a fairly complex case service with multi-controllers, and database persist layers, with other security features. We may have to do a simple test case to get going, in order to see what is really going on with connectivity on ports inside spring boot. We call this separation of concerns...
Any progress or ideas on the fix for the example-springboot test case? What ports are you binding to in the Dockerfile and in the charts files?
@quantum_fusion, I'll have a look. Remember we have day jobs, too! But we are watching and thinking...
Now I know why I'm not a Java fan:
sudo mvn clean install -DskipTests
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.5.9.RELEASE/spring-boot-starter-parent-1.5.9.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.server.springboot:spring-boot-web:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at no local POM @ line 13, column 13
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.server.springboot:spring-boot-web:0.0.1-SNAPSHOT (/home/ralph/work/nogo/quantum-fusion/springboot_swagger_example-master-cassandra/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.server.springboot:spring-boot-web:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty and 'parent.relativePath' points at no local POM @ line 13, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
I don't know about you, but that seems bad. Ubuntu 18.04, open jdk 11. I left my mac at home. Any ideas here?
In any case, I'll see if there's a java expert who can work with us on Monday.
This is like #777 , however this is with a real world test case project.
Note, I do not use draft create for this project, because the chart files, and Dockerfile have been manually created.
The problem is that when running draft up, the process of building the Docker image with draft fails.
However, The docker image is successfully built via command line using docker.
The results are showing a random number that is generated and a path being generated that isn't where the JAR file is located in the target build.
The target build is located $HOME/springboot-swagger-example-master-cassandra/target/spring-boot-web-0.0.1-SNAPSHOT.jar
NOT where draft up thinks it is being located with the MAGICNUMBER.
/var/lib/docker/tmp/docker-builderMAGICNUMBER/spring-boot-web-0.0.1-SNAPSHOT.jar
see trace results.
draft up Draft Up Started: 'spring-boot-web-0.0.1': 01CEY4GD4VHMD3MGS114QT5QX8 spring-boot-web-0.0.1: Building Docker Image: FAIL ❌ (6.0006s) Inspect the logs with
draft logs 01CEY4GD4VHMD3MGS114QT5QX8
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ draft logs 01CEY4GD4VHMD3MGS114QT5QX8 Step 1/6 : FROM java:8 ---> d23bdf5b1b1b Step 2/6 : MAINTAINER info@technologyventureslimited.com ---> Using cache ---> d23490ec5233 Step 3/6 : EXPOSE 8080 9042 ---> Using cache ---> eba04ddf9385 Step 4/6 : ADD ./spring-boot-web-0.0.1-SNAPSHOT.jar . 2018/06/01 12:57:35 error while building: ADD failed: stat /var/lib/docker/tmp/docker-builder930196639/spring-boot-web-0.0.1-SNAPSHOT.jar: no such file or directory MacBook-Pro-2:springboot_swagger_example-master-cassandra $ ls /var/lib/docker ls: /var/lib/docker: No such file or directoryMacBook-Pro-2:springboot_swagger_example-master-cassandra $ sudo mkdir /var/lib/docker/tmp/docker-builder930196639 MacBook-Pro-2:springboot_swagger_example-master-cassandra $ cp ./target/spring-boot-web-0.0.1-SNAPSHOT.jar /var/lib/docker/tmp/docker-builder930196639 cp: /var/lib/docker/tmp/docker-builder930196639/spring-boot-web-0.0.1-SNAPSHOT.jar: Permission denied MacBook-Pro-2:springboot_swagger_example-master-cassandra hottelet$ sudo cp ./target/spring-boot-web-0.0.1-SNAPSHOT.jar /var/lib/docker/tmp/docker-builder930196639
MacBook-Pro-2:springboot_swagger_example-master-cassandra $ draft up Draft Up Started: 'spring-boot-web-0.0.1': 01CEY4RHRGNZJK4090K9XJ7RKM spring-boot-web-0.0.1: Building Docker Image: FAIL ❌ (5.0011s) Inspect the logs with
draft logs 01CEY4RHRGNZJK4090K9XJ7RKM
MacBook-Pro-2:springboot_swagger_example-master-cassandra$ draft logs 01CEY4RHRGNZJK4090K9XJ7RKM Step 1/6 : FROM java:8 ---> d23bdf5b1b1b Step 2/6 : MAINTAINER info@technologyventureslimited.com ---> Using cache ---> d23490ec5233 Step 3/6 : EXPOSE 8080 9042 ---> Using cache ---> eba04ddf9385 Step 4/6 : ADD ./spring-boot-web-0.0.1-SNAPSHOT.jar . 2018/06/01 13:02:01 error while building: ADD failed: stat /var/lib/docker/tmp/docker-builder698728306/spring-boot-web-0.0.1-SNAPSHOT.jar: no such file or directory