Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run hello.java,maybe somethings wrong with registry #1699

Closed
w-j-d opened this issue Sep 11, 2020 · 22 comments
Closed

can't run hello.java,maybe somethings wrong with registry #1699

w-j-d opened this issue Sep 11, 2020 · 22 comments

Comments

@w-j-d
Copy link

w-j-d commented Sep 11, 2020

Camel-k Install command-line:

./kamel install --registry docker.io --organization XXXXXXorg --registry-auth-username XXXXX --registry-auth-password XXXX -n camel-k --maven-settings=configmap:maven-settings/settings.xml --build-timeout 12h --cluster-type kubernetes

./kamel init Hello.java
./kamel run Hello.java -n camel-k --dev

then:

integration "hello" created
Progress: integration "hello" in phase Initialization
Condition "IntegrationPlatformAvailable" is "True" for Integration hello: camel-k
Integration hello in phase "Initialization"
Progress: integration "hello" in phase Building Kit
Integration hello in phase "Building Kit"
Condition "IntegrationKitAvailable" is "False" for Integration hello: creating a new integration kit
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Integration Kit) changed phase to "Build Submitted"
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Scheduling"
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Pending"
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Running"
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Integration Kit) changed phase to "Build Running"
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Failed"
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Initialization" (recovery 1 of 5)
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Scheduling" (recovery 1 of 5)
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Pending" (recovery 1 of 5)
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Running" (recovery 1 of 5)
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Failed" (recovery 1 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Initialization" (recovery 2 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Scheduling" (recovery 2 of 5)
Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Scheduling" (recovery 2 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Pending" (recovery 2 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Running" (recovery 2 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Failed" (recovery 2 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Initialization" (recovery 3 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Scheduling" (recovery 3 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Pending" (recovery 3 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Running" (recovery 3 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Failed" (recovery 3 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Initialization" (recovery 4 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Scheduling" (recovery 4 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Pending" (recovery 4 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Running" (recovery 4 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Failed" (recovery 4 of 5)
(combined from similar events): Integration hello subresource kit-btdjjqfugpq87eqj57t0 (Build) changed phase to "Initialization" (recovery 5 of 5)
Progress: integration "hello" in phase Error
Error: integration "hello" deployment failed
@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

pod logs:

[INFO] Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/com/vdurmont/semver4j/3.1.0/semver4j-3.1.0.jar (27 kB at 6.3 kB/s)

[INFO] Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/com/google/guava/guava/20.0/guava-20.0.jar (2.4 MB at 551 kB/s)

[INFO] Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/jboss/jandex/2.2.1.Final/jandex-2.2.1.Final.jar (201 kB at 45 kB/s)

[INFO] Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (169 kB at 38 kB/s)

[INFO] Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/com/squareup/javapoet/1.11.1/javapoet-1.11.1.jar (99 kB at 22 kB/s)

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 01:10 min

[INFO] Finished at: 2020-09-11T08:56:13Z

[INFO] ------------------------------------------------------------------------

{"level":"info","ts":1599814573.4560225,"logger":"camel-k.builder","msg":"step done in 71.726598 seconds","step":"github.com/apache/camel-k/pkg/builder/runtime/ComputeDependencies","phase":20,"name":"kit-btdjjqfugpq87eqj57t0","task":"builder"}

{"level":"info","ts":1599814573.4560711,"logger":"camel-k.builder","msg":"executing step","step":"github.com/apache/camel-k/pkg/builder/IncrementalImageContext","phase":30,"name":"kit-btdjjqfugpq87eqj57t0","task":"builder"}

{"level":"info","ts":1599814573.4709873,"logger":"camel-k.builder","msg":"step done in 0.014901 seconds","step":"github.com/apache/camel-k/pkg/builder/IncrementalImageContext","phase":30,"name":"kit-btdjjqfugpq87eqj57t0","task":"builder"}

{"level":"info","ts":1599814573.4710214,"logger":"camel-k.builder","msg":"dependencies: [camel:log camel:timer mvn:org.apache.camel.k/camel-k-loader-java mvn:org.apache.camel.k/camel-k-runtime-main]"}

{"level":"info","ts":1599814573.4710348,"logger":"camel-k.builder","msg":"artifacts: [org.apache.camel:camel-log:jar:3.4.0 org.apache.camel:camel-support:jar:3.4.0 org.apache.camel:camel-api:jar:3.4.0 org.apache.camel:camel-management-api:jar:3.4.0 org.apache.camel:camel-util:jar:3.4.0 org.slf4j:slf4j-api:jar:1.7.30 org.apache.camel:camel-timer:jar:3.4.0 org.apache.camel.k:camel-k-loader-java:jar:1.4.1 org.apache.camel.k:camel-k-runtime-core:jar:1.4.1 org.apache.camel:camel-core-languages:jar:3.4.0 org.apache.camel:camel-endpointdsl:jar:3.4.0 org.apache.camel:camel-core-engine:jar:3.4.0 org.apache.camel:camel-base:jar:3.4.0 org.jooq:joor:jar:0.9.13 org.apache.camel.k:camel-k-runtime-main:jar:1.4.1 org.apache.camel:camel-main:jar:3.4.0 org.apache.camel:camel-bean:jar:3.4.0 org.apache.logging.log4j:log4j-core:jar:2.13.3 org.apache.logging.log4j:log4j-api:jar:2.13.3 org.apache.logging.log4j:log4j-slf4j-impl:jar:2.13.3]"}

{"level":"info","ts":1599814573.4710484,"logger":"camel-k.builder","msg":"artifacts selected: [org.apache.camel:camel-log:jar:3.4.0 org.apache.camel:camel-support:jar:3.4.0 org.apache.camel:camel-api:jar:3.4.0 org.apache.camel:camel-management-api:jar:3.4.0 org.apache.camel:camel-util:jar:3.4.0 org.slf4j:slf4j-api:jar:1.7.30 org.apache.camel:camel-timer:jar:3.4.0 org.apache.camel.k:camel-k-loader-java:jar:1.4.1 org.apache.camel.k:camel-k-runtime-core:jar:1.4.1 org.apache.camel:camel-core-languages:jar:3.4.0 org.apache.camel:camel-endpointdsl:jar:3.4.0 org.apache.camel:camel-core-engine:jar:3.4.0 org.apache.camel:camel-base:jar:3.4.0 org.jooq:joor:jar:0.9.13 org.apache.camel.k:camel-k-runtime-main:jar:1.4.1 org.apache.camel:camel-main:jar:3.4.0 org.apache.camel:camel-bean:jar:3.4.0 org.apache.logging.log4j:log4j-core:jar:2.13.3 org.apache.logging.log4j:log4j-api:jar:2.13.3 org.apache.logging.log4j:log4j-slf4j-impl:jar:2.13.3]"}

{"level":"info","ts":1599814573.47107,"logger":"camel-k.builder","msg":"base image: adoptopenjdk/openjdk11:slim"}

{"level":"info","ts":1599814573.4710739,"logger":"camel-k.builder","msg":"resolved base image: adoptopenjdk/openjdk11:slim"}

{"level":"info","ts":1599814573.4710774,"logger":"camel-k.builder","msg":"resolved image: "}

{"level":"info","ts":1599814573.473236,"logger":"camel-k.builder","msg":"Patch not applied (no difference)"}

@nicolaferraro
Copy link
Member

Can you try adding --build-publish-strategy=Spectrum to kamel install, it usually solves a lot of issues.

Then kamel reset and retry.
With "Spectrum", you'll find logs about what's happening directly in the operator pod.

@nicolaferraro nicolaferraro added the status/waiting-for-feedback Needs some feedback label Sep 11, 2020
@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

thank you,I will try it!

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

spectrum - 2020/09/11 10:48:41 Composing layers...

spectrum - 2020/09/11 10:48:41 Pushing image docker.io/office602org/camel-k-kit-btdl9p3r4smi8mn5l4l0:2174943 (insecure=true)...

{"level":"info","ts":1599821329.5719368,"logger":"camel-k.builder","msg":"step failed with error: Head https://index.docker.io/v2/office602org/camel-k-kit-btdl9p3r4smi8mn5l4l0/blobs/sha256:6de1a9cecd4603db2034d7a4779017912e9638454a4ea499e8257f4176bfd0b2: stopped after 10 redirects","step":"github.com/apache/camel-k/pkg/builder/spectrum/Publisher","phase":40,"name":"kit-btdl9p3r4smi8mn5l4l0","task":"builder"}

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

docker.io after create user,have need to do something else?

@nicolaferraro
Copy link
Member

I see docker hub is doing something strange: stopped after 10 redirects

Ideas @astefanutti , @lburgazzoli ?

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

./kamel install --registry docker.io --organization office602org --registry-auth-username office602 --registry-auth-password ****** -n camel-k --maven-settings=configmap:maven-settings/settings.xml --build-timeout 12h --cluster-type kubernetes --registry-insecure true --force --build-publish-strategy=Spectrum

@nicolaferraro
Copy link
Member

docker.io after create user,have need to do something else?

Are you using your own user ID as --organization parameter? or also an organization for which you have write access should be ok. Nothing else should be needed.

Which kubernetes env are you using?

@nicolaferraro
Copy link
Member

./kamel install --registry docker.io --organization office602org --registry-auth-username office602 --registry-auth-password ****** -n camel-k --maven-settings=configmap:maven-settings/settings.xml --build-timeout 12h --cluster-type kubernetes --registry-insecure true --force --build-publish-strategy=Spectrum

Probably you should not set --registry-insecure true, docker is secure. That's why you may get the redirects.

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

image

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

only kubenetes,not minikube

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

I use kubesphere,it is like minikube

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

https://kubesphere.io/

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

./kamel install --registry docker.io --registry-auth-username office602 --registry-auth-password ***** -n camel-k --maven-settings=configmap:maven-settings/settings.xml --build-timeout 12h --cluster-type kubernetes --build-publish-strategy=Spectrum

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

spectrum - 2020/09/11 11:13:18 Pulling base image adoptopenjdk/openjdk11:slim (insecure=false)...

spectrum - 2020/09/11 11:13:18 No matching credentials were found, falling back on anonymous

spectrum - 2020/09/11 11:13:23 Composing layers...

spectrum - 2020/09/11 11:13:23 Pushing image docker.io/camel-k/camel-k-kit-btdln38c8068mibhvbjg:2182394 (insecure=false)...

{"level":"info","ts":1599822811.2376115,"logger":"camel-k.builder","msg":"step failed with error: HEAD https://index.docker.io/v2/camel-k/camel-k-kit-btdln38c8068mibhvbjg/blobs/sha256:f08d8e2a3ba11bea23cf5c17e8e1c620057412ed05c32d1114640e18d6dd0a43: unsupported status code 401","step":"github.com/apache/camel-k/pkg/builder/spectrum/Publisher","phase":40,"name":"kit-btdln38c8068mibhvbjg","task":"builder"}

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

{"level":"info","ts":1599826868.3883812,"logger":"camel-k","msg":"could not find any knative type in namespace camel-k, last error was: services.serving.knative.dev is forbidden: User "system:serviceaccount:camel-k:camel-k-operator" cannot list resource "services" in API group "serving.knative.dev" in the namespace "camel-k""}
{

@nicolaferraro
Copy link
Member

./kamel install --registry docker.io --registry-auth-username office602 --registry-auth-password ***** -n camel-k --maven-settings=configmap:maven-settings/settings.xml --build-timeout 12h --cluster-type kubernetes --build-publish-strategy=Spectrum

I think you forgot the --organization option. By default Camel K uses the kube namespace as organization (works with local registries).

@w-j-d
Copy link
Author

w-j-d commented Sep 11, 2020

knative need installed?

@nicolaferraro
Copy link
Member

knative need installed?

No, it's just an info message. Knative is optional.

@w-j-d
Copy link
Author

w-j-d commented Sep 14, 2020

thks,it's ok,because I am from china can't direct to visit docker.io, I need modify /etc/hosts

@abogatov
Copy link

Hi @w-j-d,
did you manage to solve it problem?

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants