Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-3175

NullPointerException in Jobs service liveness check

XMLWordPrintable

    • Hide

      Deploy Jobs service on OCP with this CR:

      apiVersion: app.kiegroup.org/v1alpha1
      kind: KogitoJobsService
      metadata:
        name: jobs-service
      spec:
        replicas: 1
        image:
          name: kogito-jobs-service-nightly
          tag: latest
      
      Show
      Deploy Jobs service on OCP with this CR: apiVersion: app.kiegroup.org/v1alpha1 kind: KogitoJobsService metadata: name: jobs-service spec: replicas: 1 image: name: kogito-jobs-service-nightly tag: latest
    • 2020 Week 34-36 (from Aug 17), 2020 Week 37-39 (from Sep 7)

      Jobs service container in OCP keeps crashing. The stacktrace is listed in attachment.

      Environment:
      OCP 4.5
      Kogito operator 0.13
      Jobs service image from https://quay.io/repository/kiegroup/kogito-jobs-service-nightly?tab=tags , latest tag

      There are two causes of this issue:

      • This line in InfinispanConfiguration.java. When persistence is disabled, we can't return null instances, otherwise we got a null pointer exception.
      • The SmallRyeReactiveMessagingLivenessCheck and SmallRyeReactiveMessagingReadinessCheck checks that are part of the smallrye-reactive-messaging-health dependency. These checks return down even when the events or kafka profiles are disabled.

      In order to verify these two issues, I managed it to solve it by returning a noop infinispan healthcheck:

      return persistence
                      .filter("infinispan"::equals)
                      .map(p -> new InfinispanHealthCheck(cacheManagerInstance))
                      .orElseGet(NoopInfinispanHealthCheck::new);
      

      And for the second issue, I had to disable the auto discovery of health checkers via config property:

      quarkus.health.extensions.enabled=false
      

      But the right way would be to amend this health check to work fine when events are disabled.

            tdolphin-1 Tiago Dolphine
            ksuta Karel Suta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: