# Connection refused for Keycloak certs URL

**URL:** <https://forum.camunda.io/t/connection-refused-for-keycloak-certs-url/51402>\
**Category:** Camunda 8 Topics\
**Created:** [March 25, 2024, 6:56pm UTC](https://forum.camunda.io/t/connection-refused-for-keycloak-certs-url/51402 "2024-03-25T18:56:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveclendscape](https://forum.camunda.io/user_avatar/forum.camunda.io/daveclendscape/32/28973_2.png) [@daveclendscape](https://forum.camunda.io/u/daveclendscape)\
**Post date:** [March 25, 2024, 6:56pm UTC](https://forum.camunda.io/t/connection-refused-for-keycloak-certs-url/51402/1 "2024-03-25T18:56:06Z")

</div>

Hello,

We are trying to create a Java POC with self managed local Camunda 8. We are using the camunda-platform project branch stable/8.4 which creates the docker containers.

We couldn’t get past the error with basic authentication mentioned here:

> [@401 on TaskList API with default install (basic auth)](https://forum.camunda.io/t/401-on-tasklist-api-with-default-install-basic-auth/50940):
>
> Hi all, Just trying to create a Java POC with self managed local Camunda 8.4.4 & camunda-tasklist-client-java:8.4.0.3 - and have self managed deployed environment using supplied docker compose - with no Identity - just basic auth. I’m using SimpleConfig simpleConf = new SimpleConfig(); simpleConf.addProduct(Product.TASKLIST, new SimpleCredential("demo", "demo")); Authentication auth = SimpleAuthentication.builder().simpleUrl("http://localhost:8081").simpleConfig(simpl…

**So we are trying to use Keycloak instead. It looks like we are now authenticating but when trying to make a call to Tasklist like below:**

```
    TaskSearch ts = new TaskSearch().setProcessDefinitionKey("agreement_review");
    TaskList tasksFromInstance = camundaTaskListClient.getTasks(ts);

```

**We get the following error in our app:**

2024-03-25T18:27:34.266Z ERROR 43900 — [nio-9001-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed: io.camunda.tasklist.exception.TaskListException: Error searching tasks] with root cause

io.camunda.tasklist.generated.invoker.ApiException: searchTasks call failed with: 302 - [no body]  
at io.camunda.tasklist.generated.api.TaskApi.getApiException(TaskApi.java:68) ~[camunda-tasklist-client-java-8.4.0.3.jar:na]  
at io.camunda.tasklist.generated.api.TaskApi.searchTasksWithHttpInfo(TaskApi.java:577) ~[camunda-tasklist-client-java-8.4.0.3.jar:na]  
at io.camunda.tasklist.generated.api.TaskApi.searchTasks(TaskApi.java:551) ~[camunda-tasklist-client-java-8.4.0.3.jar:na]  
at io.camunda.tasklist.CamundaTaskListClient.getTasks(CamundaTaskListClient.java:443) ~[camunda-tasklist-client-java-8.4.0.3.jar:na]

**Looking at the tasklist container log I can see the following error:**

Caused by: org.springframework.security.oauth2.jwt.JwtException: An error occurred while attempting to decode the Jwt: Couldn’t retrieve remote JWK set: org.springframework.web.client.ResourceAccessException: I/O error on GET request for “[http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/certs](http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/certs)”: Connection refused  
2024-03-25T18:32:38.116246812Z at org.springframework.security.oauth2.jwt.NimbusJwtDecoder.createJwt(NimbusJwtDecoder.java:173) ~[spring-security-oauth2-jose-6.1.7.jar!/:6.1.7]

Can we disable certificates or do we need to load/save the ones defined in Keycloak ([http://localhost:18080/auth/admin/master/console/#/camunda-platform/realm-settings/keys](http://localhost:18080/auth/admin/master/console/#/camunda-platform/realm-settings/keys)) somewhere?

Thanks in advance for any help,  
Dave.

---

<div class="post-metadata">

**Author:** ![Alex\_Voloshyn](https://forum.camunda.io/user_avatar/forum.camunda.io/alex_voloshyn/32/14765_2.png) [@Alex\_Voloshyn](https://forum.camunda.io/u/Alex_Voloshyn)\
**Post date:** [March 26, 2024, 10:41am UTC](https://forum.camunda.io/t/connection-refused-for-keycloak-certs-url/51402/2 "2024-03-26T10:41:10Z")

</div>

Hi @daveclendscape  
Have you tried to set the SSL to None?

 ![image](https://forum.camunda.io/uploads/default/original/3X/1/a/1a9b44ddac285ecdfd34d010f5ca63e0059801b3.png)

---

<div class="post-metadata">

**Author:** ![daveclendscape](https://forum.camunda.io/user_avatar/forum.camunda.io/daveclendscape/32/28973_2.png) [@daveclendscape](https://forum.camunda.io/u/daveclendscape)\
**Post date:** [March 26, 2024, 12:35pm UTC](https://forum.camunda.io/t/connection-refused-for-keycloak-certs-url/51402/3 "2024-03-26T12:35:22Z")

</div>

Hi @Alex_Voloshyn,

Thanks for the suggestion, I tried that but got the same result. I have found simply removing the line SPRING\_SECURITY\_OAUTH2\_RESOURCESERVER\_JWT\_JWK\_SET\_URI from docker-compose.yaml fixed my problem.

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [April 2, 2024, 12:35pm UTC](https://forum.camunda.io/t/connection-refused-for-keycloak-certs-url/51402/4 "2024-04-02T12:35:56Z")

</div>

Closed on April 2, 2024, 12:35pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
