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

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

Open
fc7 opened this issue Jun 13, 2023 · 5 comments
Assignees

Comments

@fc7
Copy link

fc7 commented Jun 13, 2023

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
Copy link
Member

ricardozanini commented Jun 28, 2023

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
Copy link
Author

fc7 commented Jun 28, 2023

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

@domhanak
Copy link
Contributor

cc: @ricardozanini this is waiting for our reply.

@domhanak
Copy link
Contributor

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

@ricardozanini
Copy link
Member

@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.

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

No branches or pull requests

4 participants