Unable to login to Camunda Identity (Camunda 8.7 Docker)

I have configured camunda 8.7 using docker image on podman on linux server
and in my .env file I edited the following configuration to use the IP instead of local host, so that I can able to login to the components from a remote pc:

HOST=10.11.12.13
KEYCLOAK_HOST=10.11.12.13

and I did not made any change in the docker-compose.yaml
When I try to open any component from the remote pc like: operate,optimize,tasklist
it works just fine, but when trying to open identity from my remote pc:
http://10.11.12.13:8084
sometimes it redirects to:

http://10.11.12.13:18080/auth/realms/camunda-platform/login-actions/authenticate?session_code=......

when I enter my credentials it gives me error message:

The connection was reset

and sometimes it doesn’t redirect to keycloak at all and gives me:

The connection was reset

After enabling camunda identity logs, I can see the following excpetion:

identity  | 2025-09-09 10:34:56.285 DEBUG 1 --- [io-8084-exec-10] o.a.c.h.Http11Processor                  : Error parsing HTTP request header
identity  |
identity  | java.net.SocketException: Connection reset
identity  |     at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(Unknown Source) ~[?:?]
identity  |     at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:?]
identity  |     at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:150) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1329) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1219) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:781) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:345) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1769) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1189) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:658) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at java.base/java.lang.Thread.run(Unknown Source) [?:?]


identity  | 2025-09-09 10:34:56.286 DEBUG 1 --- [io-8084-exec-10] o.a.c.h.Http11Processor                  : Error state [CLOSE_CONNECTION_NOW] reported while processing request
identity  |
identity  | java.net.SocketException: Connection reset
identity  |     at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(Unknown Source) ~[?:?]
identity  |     at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:?]
identity  |     at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:150) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1329) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1219) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:781) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:345) ~[tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1769) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1189) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:658) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) [tomcat-embed-core-10.1.43.jar!/:?]
identity  |     at java.base/java.lang.Thread.run(Unknown Source) [?:?]

Hi @devmsaleh - when you enter your credentials and it gives you the “connection was reset” error, what is the URL in the browser? Same question when you try to navigate to http://10.11.12.13:8084 and the redirect fails with that error. What is the URL in the browser at the time of the error?

connection was reset appears when I am trying to enter the camunda identity
http://10.11.12.13:8084/ and it doesn’t redirect me to keycloak login page in the first place (although in camunda identity logs I can see that the request arrives and no authentication found, and instead of getting redirected to keycloak login page I get the above exception, and I am guessing this is something related to my refresh token), and this happens randomly, sometimes rarely the redirection is correct to the keycloak login page and I am able to login to camunda identity

NOTE: other components like operate and tasklist works just fine, if my token is expired I get redirected correctly to keycloak login page

@nathan.loding I can see the same issue differently on windows on my local machine and trying to access identity using localhost:8084
and BTW, the issue disappears when I clear the browser cookies and also login to keycloak admin and signout manually from the identity session

java.net.ConnectException: null
        at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Unknown Source) ~[java.net.http:?]
        at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(Unknown Source) ~[java.net.http:?]
        at java.net.http/jdk.internal.net.http.PlainHttpConnection.checkRetryConnect(Unknown Source) ~[java.net.http:?]
        at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(Unknown Source) ~[java.net.http:?]
        at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source) [?:?]
        at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source) [?:?]
        at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source) [?:?]
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source) [?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
        at java.base/java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.nio.channels.ClosedChannelException
        at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(Unknown Source) ~[?:?]
        at java.base/sun.nio.ch.SocketChannelImpl.beginConnect(Unknown Source) ~[?:?]
        at java.base/sun.nio.ch.SocketChannelImpl.connect(Unknown Source) ~[?:?]
        at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$0(Unknown Source) ~[java.net.http:?]
        at java.base/java.security.AccessController.doPrivileged(Unknown Source) ~[?:?]
        ... 10 more

2025-09-10 04:48:27.168 DEBUG 1 --- [nio-8084-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Using @ExceptionHandler io.camunda.identity.security.exception.RestResponseEntityExceptionHandler#handleException(RuntimeException)
2025-09-10 04:48:27.168 ERROR 1 --- [nio-8084-exec-2] i.s.e.RestResponseEntityExceptionHandler : Unexpected error

io.camunda.identity.sdk.impl.rest.exception.RestException: request failed
        at io.camunda.identity.sdk.impl.rest.RestClient.send(RestClient.java:132) ~[identity-sdk-8.6.0-SNAPSHOT.jar!/:8.6.0-SNAPSHOT]
        at io.camunda.identity.sdk.impl.rest.RestClient.request(RestClient.java:108) ~[identity-sdk-8.6.0-SNAPSHOT.jar!/:8.6.0-SNAPSHOT]
        at io.camunda.identity.sdk.impl.keycloak.KeycloakAuthentication.renewToken(KeycloakAuthentication.java:110) ~[identity-sdk-8.6.0-SNAPSHOT.jar!/:8.6.0-SNAPSHOT]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
        at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
        at io.camunda.identity.sdk.annotation.AnnotationProcessor.lambda$apply$0(AnnotationProcessor.java:36) ~[identity-sdk-8.6.0-SNAPSHOT.jar!/:8.6.0-SNAPSHOT]
        at jdk.proxy2/jdk.proxy2.$Proxy186.renewToken(Unknown Source) ~[?:?]
        at io.camunda.identity.impl.sm.security.spring.filter.SmJwtFilter.doFilterInternal(SmJwtFilter.java:78) ~[!/:?]

@devmsaleh - you say the issue disappears if you clear the session(s) and sign out. Does it happen again after a period of time, and are you able to recreate it on demand? Or is it sporadic and random?

It is random, specially on linux when accessing from remote pc.

@devmsaleh - I chatted with our SRE’s and this isn’t something we’ve encountered. However, we don’t test with podman, we test with Docker. I wonder if it’s perhaps something with podman? I unfortunately have any experience with podman to know where to look, though.