Optimize does not start

Hi there, I wanted to experiment with optimize. So, I implemented a Camunda workflow in spring boot starter. I unpacked optimize.zip and modified the configuration entry from http://localhost:8080/engine-rest to http://localhost:8080/rest, as it was recommended in this video: https://camunda.com/de/learn/videos/getting-started-optimize/

Then I started cammunda-demo.bat . The log on the console listed 1 poll for elasticsearch and 6 polls (from 5 down to 0) for optimize. After that, the startup was cancelled. When I took a look in the log file, I found these hints:

20:32:18.919 [main] WARN o.s.w.c.s.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘dashboardService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/dashboard/DashboardService.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘reportService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/report/ReportService.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘authorizationCheckReportEvaluationHandler’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/es/report/AuthorizationCheckReportEvaluationHandler.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘reportAuthorizationService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/security/ReportAuthorizationService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘identityService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/IdentityService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘applicationAuthorizationService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/security/ApplicationAuthorizationService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘engineContextFactory’: Invocation of init method failed; nested exception is org.camunda.optimize.service.exceptions.OptimizeRuntimeException: While checking the Engine version, following error occurred: Status code: 404,
this means you either configured a wrong endpoint or you have an unsupported engine version < 7.10.6
20:32:18.937 [main] ERROR o.s.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘dashboardService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/dashboard/DashboardService.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘reportService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/report/ReportService.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘authorizationCheckReportEvaluationHandler’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/es/report/AuthorizationCheckReportEvaluationHandler.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘reportAuthorizationService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/security/ReportAuthorizationService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘identityService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/IdentityService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘applicationAuthorizationService’ defined in URL [jar:file:/C:/Software/Camunda/Optimize/2.7.0/optimize-backend-2.7.0.jar!/org/camunda/optimize/service/security/ApplicationAuthorizationService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘engineContextFactory’: Invocation of init method failed; nested exception is org.camunda.optimize.service.exceptions.OptimizeRuntimeException: While checking the Engine version, following error occurred: Status code: 404,
this means you either configured a wrong endpoint or you have an unsupported engine version < 7.10.6
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:228)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1358)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1204)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:921)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:554)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:888)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:357)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:821)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:276)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:407)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106)
at org.eclipse.jetty.server.Server.doStart(Server.java:371)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
at org.camunda.optimize.jetty.EmbeddedCamundaOptimize.startOptimize(EmbeddedCamundaOptimize.java:169)
at org.camunda.optimize.Main.main(Main.java:17)

This seems rather strange to me because the engine I had started has version 7.12.0. Can anybody tell me please what I did wrong?

Many thanks in advance!

Regards,
Christian

Meanwhile, I found out by myself: in order to be able to communicate with REST, for the spring boot starter application the dependency camunda-bpm-spring-boot-starter-rest had to be added.

2 Likes

Even i am getting same error, Can i know the path you have updated.
Thanks
Sanjeev

Hey @Sanjeev_kumar_N,

Even i am getting same error, Can i know the path you have updated.

I’m sorry to hear that but can you please elaborate a bit more on what you’ve done so far? Which engine/Optimize version are you using? At which point do you get this error message?

Best,
Johannes

1 Like

Hi JoHeinem,

We have deployed Camunda-BPM-EE on Kubernetes (Azure)) and integared with Oracle DB (on-prime).
As next a step we have configured Camunda-bpm-ee Optimize on Kubernetes (Azure) and Elasticsearch on-prime.

Version

Camunda-BPM-EE (7.14.0-ee)
Camunda-BPM-EE Optimize 3.2.0
elasticsearch-7.9.2-amd64.de

I have followed the below steps for kubernetes deployment and able to access elasticsearch.

Configmap file

Config-map

kubectl create configmap cam-opt-ee -n=camunda --from-literal=OPTIMIZE_CAMUNDABPM_REST_URL=http://X.X.X.X:30182/engine-rest/engine
–from-literal=OPTIMIZE_ELASTICSEARCH_HOST=X.X.X.X
–from-literal=OPTIMIZE_ELASTICSEARCH_HTTP_PORT=9200

Deployment file content

deployment.yml

apiVersion: apps/v1
kind: Deployment
metadata:
name: cam-opt-ee
namespace: camunda
spec:
replicas: 1
selector:
matchLabels:
app: cam-opt-ee
template:
metadata:
labels:
app: cam-opt-ee
spec:
containers:
- name: cam-optimize
image: X.X.X.X:8085/optimize-ee/optimize:3.2.0
ports:
- containerPort: 8090
- containerPort: 8091
envFrom:
- configMapRef:
name: cam-opt-ee


apiVersion: v1
kind: Service
metadata:
name: cam-opt-ee
namespace: camunda
spec:
type: NodePort
ports:

  • port: 8090
    name: opt
    targetPort: 8090
  • port: 8091
    name: ee
    targetPort: 8091
    selector:
    app: cam-opt-ee

kubectl get all -n camunda

NAME READY STATUS RESTARTS AGE
pod/cam-opt-ee-9958bb5b9-2nggh 1/1 crashloopbackoff 28 4h38m
pod/camunda-bpm-ee-7b65455566-fgzsq 1/1 Running 0 4h48m

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/cam-opt-ee NodePort 10.0.181.68 8090:31883/TCP,8091:30749/TCP 4h38m
service/camunda-bpm-ee NodePort 10.0.44.20 8080:30182/TCP 4h48m

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/cam-opt-ee 1/1 1 1 4h38m
deployment.apps/camunda-bpm-ee 1/1 1 1 4h48m

NAME DESIRED CURRENT READY AGE
replicaset.apps/cam-opt-ee-9958bb5b9 1 1 1 4h38m
replicaset.apps/camunda-bpm-ee-7b65455566 1 1 1 4h48m


Log out-put

kubectl logs pod/cam-opt-ee-9958bb5b9-2nggh -n camunda

12:09:23.512 [main] INFO o.c.o.s.e.OptimizeElasticsearchClientFactory - Initializing Elasticsearch rest client…
12:09:24.084 [main] WARN o.c.o.service.util.ESVersionChecker - The version of Elasticsearch you’re using is not officially supported by
Camunda Optimize.
We can not guarantee full functionality.
Please check the technical guide for the list of supported Elasticsearch versions
12:09:24.085 [main] INFO o.c.o.s.e.OptimizeElasticsearchClientFactory - Elasticsearch client has successfully been started
12:09:24.397 [main] INFO o.c.o.s.e.s.ElasticSearchSchemaManager - Updating Optimize schema…
12:09:26.013 [main] INFO o.c.o.s.e.s.ElasticSearchSchemaManager - Creating or updating template with name optimize-variable-update-inst
ance_v2
12:09:26.182 [main] INFO o.c.o.s.e.s.ElasticSearchSchemaManager - Creating or updating template with name optimize-event_v3
12:09:26.948 [main] INFO o.c.o.s.e.s.ElasticSearchSchemaManager - Finished updating Optimize schema.
12:09:27.547 [main] WARN o.s.w.c.s.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh
attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘definitionService’ defined in
URL [jar:file:/optimize/optimize-backend-3.2.0.jar!/org/camunda/optimize/service/DefinitionService.class]: Unsatisfied dependency expres
sed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creatin
g bean with name ‘definitionAuthorizationService’ defined in URL [jar:file:/optimize/optimize-backend-3.2.0.jar!/org/camunda/optimize/se
rvice/security/DefinitionAuthorizationService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception
is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘engineDefinitionAuthorizationServic
e’ defined in URL [jar:file:/optimize/optimize-backend-3.2.0.jar!/org/camunda/optimize/service/security/EngineDefinitionAuthorizationSer
vice.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.Uns
atisfiedDependencyException: Error creating bean with name ‘applicationAuthorizationService’ defined in URL [jar:file:/optimize/optimize
-backend-3.2.0.jar!/org/camunda/optimize/service/security/ApplicationAuthorizationService.class]: Unsatisfied dependency expressed throu
gh constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ’
engineContextFactory’: Invocation of init method failed; nested exception is org.camunda.optimize.service.exceptions.OptimizeRuntimeExce
ption: While checking the Engine version, following error occurred: Status code: 404,
this means you either configured a wrong endpoint or you have an unsupported engine version < 7.12.11
12:09:27.557 [main] ERROR o.s.web.context.ContextLoader - Context initialization failed

Thanks
Sanjeev

Hey @Sanjeev_kumar_N,

Thanks for the extensive information!

In the logs it states

While checking the Engine version, following error occurred: Status code: 404,
this means you either configured a wrong endpoint or you have an unsupported engine version < 7.12.11

That’s a strong indicator that you’ve configured the wrong engine URL if you’re using the engine version 7.14. Can you please try to change:

OPTIMIZE_CAMUNDABPM_REST_URL=http://X.X.X.X:30182/engine-rest/engine

to

OPTIMIZE_CAMUNDABPM_REST_URL=http://X.X.X.X:30182/engine-rest

?

Does that solve the problem for you? What’s the log output?

Best,
Johannes

Thanks a lot for your solution. It made my day.
After 5 days of trouble shooting, was able to deploy and access optimize URL.

kubectl get all -n camunda

NAME READY STATUS RESTARTS AGE
pod/cam-opt-ee-9958bb5b9-5vlb9 1/1 Running 0 14m
pod/camunda-bpm-ee-7b65455566-fgzsq 1/1 Running 0 22h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/cam-opt-ee NodePort X.X.X.X 8090:31042/TCP,8091:31426/TCP 14m
service/camunda-bpm-ee NodePort X.X.X.X 8080:30182/TCP 22h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/cam-opt-ee 1/1 1 1 14m
deployment.apps/camunda-bpm-ee 1/1 1 1 22h

NAME DESIRED CURRENT READY AGE
replicaset.apps/cam-opt-ee-9958bb5b9 1 1 1 14m
replicaset.apps/camunda-bpm-ee-7b65455566 1 1 1 22h