org.camunda.bpm.client.impl.EngineClientException: TASK/CLIENT-02002 Exception while establishing connection for request 'POST http://localhost:8080/engine-rest/external-task/fetchAndLock HTTP/1.1'

Hi,

I am getting
org.camunda.bpm.client.impl.EngineClientException: TASK/CLIENT-02002 Exception while establishing connection for request ‘POST http://localhost:8080/engine-rest/external-task/fetchAndLock HTTP/1.1’

after sometime, when am running multiple instances of external task client . Is there any way to handle this and re establish the connection , so that the client runs continuously.

1 Like

Hi @sindhu_veladi,

this should be the case already.

Unless you stop the client intentionally, it continuously tries to establish a connection.

Cheers,
Tassilo

you mean, database connection is closed/lost and you are trying establish new connection every time?

i am running some instances of external task client running on a wildfly, on start of the server. after sometime, mentioned error is seen in logs and still the external task client is able to fetch the external tasks, but after some more time, it is not picking up new tasks anymore. is it because of any backoff stragety by default? am not implementing any backoff stratgey explicitly.

Hi @sindhu_veladi,

by default the External Task Client uses an exponential backoff strategy if there are no External Tasks to ‘Fetch and Lock’. You can disable this behavior on bootstrapping the client by invoking #disableBackoffStrategy().

Cheers,
Tassilo

1 Like

Hey @sindhu_veladi,

if my answer solved your problem, could you please mark it as “solved”?

Cheers,
Tassilo

1 Like

can u share the code what changes you guys made ? or help me what changes I need to make to disablebackoff?

}

how to resolve this error:
org.camunda.bpm.client.impl.EngineClientException: TASK/CLIENT-02002 Exception while establishing connection for request ‘POST http://localhost:8080/engine-rest/external-task/fetchAndLock HTTP/1.1’
Please reply asap.