incubator-kie-kogito-examples icon indicating copy to clipboard operation
incubator-kie-kogito-examples copied to clipboard

Jobs Service Error

Open hyp222 opened this issue 2 years ago • 11 comments

Describe the bug

I'm following through this example (with Infinispan)

https://github.com/kiegroup/kogito-examples/tree/stable/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console

However, when I POST to http://localhost:8080/hiring I notice it's getting error while calling Jobs Service, and no jobs created while looking through the Management Console image

Any way I can further debug this or to test if my Jobs Service is up and running? Is this happening for everyone or just me?

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

hyp222 avatar Nov 15 '22 03:11 hyp222

@hyp222 do you have these properties set in the application.properties? kogito.service.url=http://localhost:8080 kogito.jobs-service.url=http://localhost:8580

tiagodolphine avatar Nov 17 '22 12:11 tiagodolphine

@tiagodolphine , yes, that's included in the following properties file, and I haven't change anything

https://github.com/kiegroup/kogito-examples/blob/stable/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/application.properties

hyp222 avatar Nov 21 '22 04:11 hyp222

I have the same problem

in mine I'm using it inside docker as an alternative I made the network mode as host because my java app can see my docker and it worked without problems.

adailsonm avatar Jan 27 '23 13:01 adailsonm

Hi @adailsonm @hyp222 I opened this https://issues.redhat.com/browse/KOGITO-8542 to track the issue, it seems some configuration in the app or in the environment, are you using docker-compose to run job-service? any error at this point?

tiagodolphine avatar Jan 27 '23 14:01 tiagodolphine

To use docker compose yes, I even pointed out a possible solution for the operation using docker to externalize the network-mode to host so that java could see it locally.

adailsonm avatar Jan 27 '23 14:01 adailsonm

For the error message the runtime app is not able to reach job-service, if the proper URI is configured in the app, probably it is related to some issue running job-service on docker... but it needs some investigation... Just to clarify are you running the example as it is, not changing any config, right? because we need to reproduce the same issue.

tiagodolphine avatar Jan 27 '23 15:01 tiagodolphine

in my case, I'm running it using docker, but the same problem occurs if I use it as a network bridge, I changed it to host and it started working without problems, I only reported it because I thought it was a more generalized problem.

adailsonm avatar Jan 27 '23 15:01 adailsonm

https://github.com/kiegroup/kogito-examples/pull/1553 @adailsonm @hyp222 fyi

tiagodolphine avatar Jan 30 '23 12:01 tiagodolphine

I still have the same error in running this very same example in kogito 1.33.0.Final .

I follow the instructions in https://github.com/kiegroup/kogito-examples/tree/stable/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console using docker compose inside my Ubuntu 22.04 and latest Docker Desktop running on Windows (WSL2).

Docker compose services Start without any problem, as well as the quarkus app (either in dev more or JAR mode). If I post anything to /hiring to URL (following the README.md) I get the error on the console.

BTW the management console just loads until I get this error after about 20s (related to the graphql endpoint being invoked in the screen to fetch the data): https://ibb.co/W254BXt .

Is there anything that I can try? I am new to Kogito and Quarkus and I hoped that the examples where at least my safe bet for getting started :D

scalasm avatar Feb 18 '23 17:02 scalasm

I'm having trouble on our end here with regards to this.

adailsonm avatar Apr 17 '23 12:04 adailsonm

BTW the management console just loads until I get this error after about 20s (related to the graphql endpoint being invoked in the screen to fetch the data): https://ibb.co/W254BXt .

I'm running the stack with docker compose, and I was having the same issue with versions later than 1.33 of management console, data index, etc...

What fixed for me was setting the CORS variable. I added

      QUARKUS_HTTP_CORS: true
      QUARKUS_HTTP_CORS_ORIGINS: "*"

to the environment of data-index, and it solved for me.

You can also add it to your application.properties as this:

quarkus.http.cors=true
quarkus.http.cors.origins=*

Reference for more CORS env vars: https://quarkus.io/guides/http-reference#cors-filter

pvsfair avatar Apr 19 '23 10:04 pvsfair