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

Jitpack example deployment fails #3207

Closed
jlangy opened this issue Apr 14, 2022 · 5 comments
Closed

Jitpack example deployment fails #3207

jlangy opened this issue Apr 14, 2022 · 5 comments
Labels
status/waiting-for-feedback Needs some feedback

Comments

@jlangy
Copy link

jlangy commented Apr 14, 2022

Hello,

I am trying to get this example linked from the documentation for jitpack working in openshift. I am running the command kamel run Jitpack.java --dev -d github:squakez/samplejp. I get the following result:

Integration "jitpack" created
Condition "IntegrationPlatformAvailable" is "True" for Integration jitpack: jon-test/camel-k
Progress: integration "jitpack" in phase Initialization
Progress: integration "jitpack" in phase Building Kit
Integration "jitpack" in phase "Initialization"
Condition "IntegrationPlatformAvailable" is "True" for Integration jitpack: jon-test/camel-k
Integration "jitpack" in phase "Building Kit"
Condition "IntegrationKitAvailable" is "False" for Integration jitpack: integration kit jon-test/kit-c9c7tcu9f9ajjakfc900 is in state "Build Running"
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Initialization" (recovery 3 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Scheduling" (recovery 3 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Pending" (recovery 3 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Running" (recovery 3 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Failed" (recovery 3 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Initialization" (recovery 4 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Scheduling" (recovery 4 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Pending" (recovery 4 of 5)
Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Running" (recovery 4 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Failed" (recovery 4 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Initialization" (recovery 5 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Scheduling" (recovery 5 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Pending" (recovery 5 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Running" (recovery 5 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Failed" (recovery 5 of 5)
(combined from similar events): Build "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Error" (recovery 5 of 5)
Integration Kit "kit-c9c7tcu9f9ajjakfc900", created by Integration "jitpack", changed phase to "Error"
Progress: integration "jitpack" in phase Error
Error: integration "jitpack" deployment failed

I am pretty sure I'm doing something wrong with jitpack since changing the Jitpack.java file to exclude the dependency like so:

import org.apache.camel.builder.RouteBuilder;

public class Jitpack extends RouteBuilder {
  @Override
  public void configure() throws Exception {
      from("timer:tick?period=2000")
        .setBody()
          .simple("hello")
        .to("log:info");
  }
}

runs as expected. Thanks for your help!

@squakez
Copy link
Contributor

squakez commented Apr 18, 2022

Thanks for reporting. We should understand why this is failing. Would you mind having a look at the operator log trace? We also can get the reason why it failed looking at the Builder (kubectl get builder -o yaml).

@squakez
Copy link
Contributor

squakez commented Apr 22, 2022

I've tested it successfully. I wonder if you may have some problem accessing https://jitpack.io repository url, reason why it could be failing when you use the dependency. Having a look at the logs would help troubleshooting, thanks.

@squakez squakez added the status/waiting-for-feedback Needs some feedback label Apr 22, 2022
@jlangy
Copy link
Author

jlangy commented Apr 25, 2022

Hey, sorry I was away for a bit. Taking a look at the operator pod logs I think this is the relevant part:

{"level":"info","ts":1650903512.8294797,"logger":"camel-k.maven.build","msg":"[INFO] Scanning for projects..."}
{"level":"info","ts":1650903513.3458402,"logger":"camel-k.maven.build","msg":"[INFO] "}
{"level":"info","ts":1650903513.3482604,"logger":"camel-k.maven.build","msg":"[INFO] ---------< org.apache.camel.k.integration:camel-k-integration >---------"}
{"level":"info","ts":1650903513.3494701,"logger":"camel-k.maven.build","msg":"[INFO] Building camel-k-integration 1.6.5"}
{"level":"info","ts":1650903513.351937,"logger":"camel-k.maven.build","msg":"[INFO] --------------------------------[ jar ]---------------------------------"}
{"level":"info","ts":1650903514.265848,"logger":"camel-k.maven.build","msg":"[INFO] Downloading from jitpack.io-c9jcjls7vdpc9ivpt9ng: https://jitpack.io/com/github/squakez/samplejp/master-SNAPSHOT/maven-metadata.xml"}
{"level":"info","ts":1650903514.9243386,"logger":"camel-k.maven.build","msg":"[WARNING] The POM for com.github.squakez:samplejp:jar:master-SNAPSHOT is missing, no dependency information available"}
{"level":"info","ts":1650903515.0476131,"logger":"camel-k.maven.build","msg":"[INFO] ------------------------------------------------------------------------"}
{"level":"info","ts":1650903515.0479498,"logger":"camel-k.maven.build","msg":"[INFO] BUILD FAILURE"}
{"level":"info","ts":1650903515.048796,"logger":"camel-k.maven.build","msg":"[INFO] ------------------------------------------------------------------------"}
{"level":"info","ts":1650903515.0502107,"logger":"camel-k.maven.build","msg":"[INFO] Total time:  2.237 s"}
{"level":"info","ts":1650903515.0508983,"logger":"camel-k.maven.build","msg":"[INFO] Finished at: 2022-04-25T16:18:35Z"}
{"level":"info","ts":1650903515.0517366,"logger":"camel-k.maven.build","msg":"[INFO] ------------------------------------------------------------------------"}
{"level":"info","ts":1650903515.0565495,"logger":"camel-k.maven.build","msg":"[ERROR] Failed to execute goal on project camel-k-integration: Could not resolve dependencies for project org.apache.camel.k.integration:camel-k-integration:jar:1.6.5: Failure to find com.github.squakez:samplejp:jar:master-SNAPSHOT in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io-c9jcjls7vdpc9ivpt9ng has elapsed or updates are forced -> [Help 1]"}
{"level":"info","ts":1650903515.0567274,"logger":"camel-k.maven.build","msg":"[ERROR] "}
{"level":"info","ts":1650903515.057614,"logger":"camel-k.maven.build","msg":"[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch."}
{"level":"info","ts":1650903515.05837,"logger":"camel-k.maven.build","msg":"[ERROR] Re-run Maven using the -X switch to enable full debug logging."}
{"level":"info","ts":1650903515.058535,"logger":"camel-k.maven.build","msg":"[ERROR] "}
{"level":"info","ts":1650903515.059608,"logger":"camel-k.maven.build","msg":"[ERROR] For more information about the errors and possible solutions, please read the following articles:"}
{"level":"info","ts":1650903515.0606256,"logger":"camel-k.maven.build","msg":"[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException"}
{"level":"info","ts":1650903515.0733407,"logger":"camel-k.builder","msg":"step failed with error: failure while building project: exit status 1","step":"github.com/apache/camel-k/pkg/builder/BuildQuarkusRunner","phase":"20","task":"builder"}
{"level":"info","ts":1650903515.0733674,"logger":"camel-k.builder","msg":"dependencies: [camel:log camel:timer github:squakez/samplejp mvn:org.apache.camel.k:camel-k-runtime mvn:org.apache.camel.quarkus:camel-quarkus-java-joor-dsl]"}

I'm Looking into this part: The POM for com.github.squakez:samplejp:jar:master-SNAPSHOT is missing, no dependency information available, maybe it's looking for master instead of main.

@jlangy
Copy link
Author

jlangy commented Apr 25, 2022

Thanks for the help @squakez, that was the issue. Publishing version 1.0.0 with kamel run Jitpack.java --dev -d github:squakez/samplejp:1.0.0-SNAPSHOT worked great. Not sure if it is our configuration or just an openshift default to look at master by default.

@jlangy jlangy closed this as completed Apr 25, 2022
@squakez
Copy link
Contributor

squakez commented Apr 27, 2022

I think the version you're using is affected by #2764 wich was fixed in versions >=1.7.0 - your workaround is fine until you upgrade to 1.7+ version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-feedback Needs some feedback
Projects
None yet
Development

No branches or pull requests

2 participants