apache / incubator-kie-kogito-docs

Kogito Documentation Repository
https://kiegroup.github.io/kogito-docs/
Apache License 2.0
11 stars 56 forks source link

OpenShift Serverless Logic Hello World sample fails with "return value of com.github.dockerjava.api.model.PullResponseItem.getStatus() is null" #367

Open fc7 opened 1 year ago

fc7 commented 1 year ago

I am trying the Hello World Sample for OpenShift Serverless Logic under https://openshift-knative.github.io/docs/docs/latest/serverless-logic/getting-started/create-your-first-workflow-service.html

The build step is fine but when running quarkus dev I run into the following issue relating to an image pull:

quarkus dev
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< org.acme:serverless-workflow-hello-world >--------------
[INFO] Building serverless-workflow-hello-world 1.0.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:2.16.7.Final:dev (default-cli) @ serverless-workflow-hello-world ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ serverless-workflow-hello-world
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.16.7.Final:generate-code @ serverless-workflow-hello-world
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile @ serverless-workflow-hello-world
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ serverless-workflow-hello-world
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/fch/dev/serverless-workflow-hello-world/src/test/resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.16.7.Final:generate-code-tests @ serverless-workflow-hello-world
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile @ serverless-workflow-hello-world
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
2023-06-13 13:28:06,190 INFO  [org.kie.kog.cod.api.uti.AddonsConfigDiscovery] (build-44) Performed addonsConfig discovery, found: AddonsConfig{usePersistence=false, useTracing=false, useMonitoring=false, usePrometheusMonitoring=false, useCloudEvents=true, useExplainability=false, useProcessSVG=false, useEventDrivenDecisions=false, useEventDrivenRules=false}
2023-06-13 13:28:06,632 INFO  [org.kie.kog.cod.cor.uti.ApplicationGeneratorDiscovery] (build-39) Generator discovery performed, found [processes]
2023-06-13 13:28:07,029 INFO  [doc.1.0]] (build-49) Creating container for image: testcontainers/sshd:1.1.0
2023-06-13 13:28:07,034 INFO  [org.tes.uti.RegistryAuthLocator] (build-49) Failure when attempting to lookup auth config. Please ignore if you don't have images in an authenticated registry. Details: (dockerImageName: testcontainers/sshd:1.1.0, configFile: /Users/fch/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /Users/fch/.docker/config.json (No such file or directory)
2023-06-13 13:28:07,051 INFO  [doc.3.4]] (build-49) Creating container for image: testcontainers/ryuk:0.3.4
2023-06-13 13:28:07,172 INFO  [doc.3.4]] (build-49) Container testcontainers/ryuk:0.3.4 is starting: bc7292d6f2866551cc311bcc7ecc9fb401785b76cbb0cc9862c1ad397685b130
2023-06-13 13:28:07,909 INFO  [doc.3.4]] (build-49) Container testcontainers/ryuk:0.3.4 started in PT0.865798S
2023-06-13 13:28:07,948 INFO  [doc.1.0]] (build-49) Container testcontainers/sshd:1.1.0 is starting: 95d59ae804b4ccc8a10fe285f0f82a2078890d1e83ee62c95cd251b01e3c6885
2023-06-13 13:28:08,340 INFO  [doc.1.0]] (build-49) Container testcontainers/sshd:1.1.0 started in PT1.454878S
2023-06-13 13:28:08,523 INFO  [doc.red.io/.28]] (docker-java-stream--1713804985) Starting to pull image
2023-06-13 13:28:08,791 ERROR [com.git.doc.api.asy.ResultCallbackTemplate] (docker-java-stream--1713804985) Error during callback: java.lang.NullPointerException: Cannot invoke "String.matches(String)" because the return value of "com.github.dockerjava.api.model.PullResponseItem.getStatus()" is null
    at com.github.dockerjava.api.command.PullImageResultCallback.checkForDockerSwarmResponse(PullImageResultCallback.java:48)
    at com.github.dockerjava.api.command.PullImageResultCallback.onNext(PullImageResultCallback.java:35)
    at org.testcontainers.images.LoggedPullImageResultCallback.onNext(LoggedPullImageResultCallback.java:48)
    at org.testcontainers.images.TimeLimitedLoggedPullImageResultCallback.onNext(TimeLimitedLoggedPullImageResultCallback.java:73)
    at org.testcontainers.images.TimeLimitedLoggedPullImageResultCallback.onNext(TimeLimitedLoggedPullImageResultCallback.java:24)
    at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec$1.onNext(AbstrAsyncDockerCmdExec.java:41)
    at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder$JsonSink.accept(DefaultInvocationBuilder.java:315)
    at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder$JsonSink.accept(DefaultInvocationBuilder.java:298)
    at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:275)
    at java.base/java.lang.Thread.run(Thread.java:833)

Note that the images testcontainers/ryuk:0.3.4 and testcontainers/sshd:1.1.0 were pulled and the containers successfully started.

I have macOS with podman 4.5.1. and a rootful VM. I have also set ryuk.container.privileged=true following these instructions.

ricardozanini commented 1 year ago

Hi! Sorry for the late reply, I only saw this today. Have you solved the issue? It's likely to be caused by the kubernetes client extension, which you won't need in devmode for the workflow use case.

Can you try disabling it in your application.properties file? quarkus.kubernetes-client.devservices.enabled=false

fc7 commented 1 year ago

Thanks for the reply. I have disabled the k8s client extension as you suggested, but still get the same exception as above.

domhanak commented 6 months ago

cc: @ricardozanini this is waiting for our reply.

domhanak commented 6 months ago

@LuboTerifaj I assigned to you, you could check this during test day or while you develop scenarios.

ricardozanini commented 3 weeks ago

@fc7 I couldn't reproduce this feature. You can try the snapshots or wait for the latest Apache release to see if the problem stills there.