Deployed twice process definition

Hello everyone!

I’ve got a new problem and don’t know how to properly handle it.

I have two instances of my application using a heterogeneous cluster, which has the same process definition.

First I deploy one instance, then I deploy the second one.
Everything was fine, but one time after deployment I’m trying to start process instance and get the following error:

Uncaught exception thrown
org.springframework.web.util.NestedServletException: Request processing failed; nested exception 
is org.camunda.bpm.engine.ProcessEngineException: ENGINE-03070 Cannot resolve a unique 
process definition for key 'createRequestProcess' because it exists for multiple tenants.

I went to Camunda Cockpit and saw, that I have two deployed process definition instances:
43%20PM%20(1)

They are the same.
I went to logs and found logs below:
createRequestProcess[version: 1, id: createRequestProcess:1:967fe253-368e-11e9-9f1c-0a580a820212]
and
createRequestProcess[version: 1, id: createRequestProcess:1:96a59248-368e-11e9-bccc-0a580a810209]

As I understood, by some reason Camunda Engine deployed the same process definition twice.
I tried to delete deployment from camunda cockpit but got persistence exception notification on the user interface.

{
    "type": "ProcessEngineException",
    "message": "Process engine persistence exception"
}

Also, I found this:


Maybe this can be useful.

In total two questions:

  1. How Can I properly fix/restore my environment without dropping camunda db?
  2. What could be the root cause?
1 Like

The error says:

So i’m guessing you’ve deployed the 2 processes to 2 different tenants but are not supplied a tenant id when starting the process.

@Niall, I have updated question. Please, review.

Can you give more details about your setup, camunda version, database etc.
Also are you using a cluster?
How are your deployments running?

@Niall, here the answer
We are using the following setup:

  • postgresql 42.2.4
  • camunda 7.9
  • we are deploy using kubernetes.
  • we have a heterogeneous cluster

I have updated topic.

@Niall, @Yana, @benhoffmann please, help me!

How are you deploying the processes themselves?
Can you upload then here?

@Niall, I’m sorry, but I didn’t get what you exactly mean. Can you explain?
We have a heterogeneous cluster with 2 instances of Camunda Cockpit and 2 instances of Spring boot app with camunda engine. This spring boot app has .bpmn file which deploys.

OK - and both engines are connected to the same DB?
Are you getting this error when you startup a new Spring-boot node?

Yes, all these nodes are connected to the same DB. No, I didn’t get any errors on startup, here is the startup log:
createRequestProcess[version: 1, id: createRequestProcess:1:967fe253-368e-11e9-9f1c-0a580a820212]
and
createRequestProcess[version: 1, id: createRequestProcess:1:96a59248-368e-11e9-bccc-0a580a810209]

When I try to start the process instance I get the following error:
Uncaught exception thrown org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.camunda.bpm.engine.ProcessEngineException: ENGINE-03070 Cannot resolve a unique process definition for key 'createRequestProcess' because it exists for multiple tenants.

Seems to me that the database is not configured properly and it’s letting both nodes deploy the process at exactly the same time.

I assume this doesn’t happen if you start them up one at a time?
Can you show your database configuration?
Also can you let me know the postgres verions you’re using (not the JDBC driver version but the version of the database itself - to confirmit’s supported)

@Niall,
All the logs were removed, so I don’t exactly know what was.
I went to database and saw that the timestamp of the deployments in the database almost the same. The difference between is about 500ms.
I know that We do deploy our instances up one at a time.

The version of the Postgresql is 9.6

Can you give advice on how to fix the database with this issue? (For example how properly delete data from the database about this process definition instance.).

Best regards,
Roman.

Hi Niall,

I am facing the same error - “ENGINE-03070 Cannot resolve a unique process definition for key br************’ because it exists for multiple tenants”.

But I am not facing this error when starting the application . I am facing this error when I try to run a cucumber test case for my bpmn flow. I have defined a single tenant throughout my application and there is no redundant bpmn flow. In fact there are only a couple of bpmn flows. Can you please guide me on what can be the issue here ?

@romankh3 If you get resolution for your problem , can you please share it. In 2021 i’m facing similar issue.