Docker image woes

Hopefully a quick question. I am running the docker images for flowable-idm and flowable-modeler. i can access the modeler-idm correctly…view the user and its privileges.

When i attempt access the modeler (http://localhost:8888/flowable-modeler), it redirects me to (http://localhost:8080/flowable-idm/#/login?redirectOnAuthSuccess=true&redirectUrl=http:%2F%2Flocalhost:8888%2Fflowable-modeler%2F).

I am then prompted to enter credentials
I enter admin/test

It processes a while without logging me into the modeler. When i look at the console window I see a connection refused exception sent to the console window…

Exception while getting token
org.apache.http.conn.HttpHostConnectException: Connect to 10.0.0.1:8080 [/10.0.0.1] failed: Connection refused
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:140)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)

Hi.

How are you starting the containers?
Are you using the one of the start scripts located in the docker folder?
Could you provide some more lines of the stack trace?

Regards,

Yvo

I am using the startup script from the docker image page. For instance:
flowable-idm
docker run -p8080:8080 flowable/flowable-idm

flowable-modeler
docker run -p8888:8888 -e idm.app.url=http://10.0.0.1:8080/flowable-idm -e idm.app.redirect.url=http://localhost:8080/flowable-idm -e idm.admin.user=admin -e idm.admin.password=test flowable/flowable-modeler

i then navigate to:
http://localhost:8888/flowable-modeler
this redirects me to:
http://localhost:8080/flowable-idm/#/login?redirectOnAuthSuccess=true&redirectUrl=http:%2F%2Flocalhost:8888%2Fflowable-modeler%2F

i then enter credentials of admin/test
It works for 60-120 seconds or so, then resets the login screen and when i look in my terminal window (Macbook Pro OS/X) i see the stack trace.

I am running two different docker images. one for IDM and one for modeler. I suspect this might be the issue…maybe…I have since started up a single Tomcat instance with all war files and it started up amazingly easy with no issues.

the stack trace is:
08:47:00,627 [http-nio-8888-exec-3] WARN org.flowable.app.service.idm.RemoteIdmService - Exception while getting token
org.apache.http.conn.HttpHostConnectException: Connect to 10.0.0.1:8080 [/10.0.0.1] failed: Connection refused
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:140)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
at org.flowable.app.service.idm.RemoteIdmServiceImpl.callRemoteIdmService(RemoteIdmServiceImpl.java:149)
at org.flowable.app.service.idm.RemoteIdmServiceImpl.getToken(RemoteIdmServiceImpl.java:83)
at org.flowable.app.filter.FlowableCookieFilter$1.load(FlowableCookieFilter.java:102)
at org.flowable.app.filter.FlowableCookieFilter$1.load(FlowableCookieFilter.java:99)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195)
at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821)
at org.flowable.app.filter.FlowableCookieFilter.getValidToken(FlowableCookieFilter.java:170)
at org.flowable.app.filter.FlowableCookieFilter.doFilterInternal(FlowableCookieFilter.java:141)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)
… 53 more

Hi.

It seems your modeler container has an issue communicating to the idm container via the mapped port on your host machine.
To ease the communication between containers we provide docker compose configurations for different setups.
There are some start scripts in de /docker folder. https://github.com/flowable/flowable-engine/tree/master/docker
The idm-modeler-postgres.sh uses the docker compose config located here; https://github.com/flowable/flowable-engine/blob/master/modules/flowable-ui-modeler/flowable-ui-modeler-app/src/main/docker/app.yml

Could you try running it this way?
I’m not sure what is causing your issue because it should work as well. I’ve tried it with just changing idm.app.url to my host ip. And that worked.
Are you running a default docker network configuration?

Regards,

Yvo

Hi,

I’m having the same issue here. Here is my docker-compose:

postgres:
  container_name: postgres
  image: postgres
  environment:
    - POSTGRES_PASSWORD=flowable
    - POSTGRES_USER=flowable
    - POSTGRES_DB=flowable
  ports:
    - 5432:5432
  volumes:
    - ~/flowable/flowable-modeler/postgres:/var/lib/postgresql/data

flowable-idm:
  container_name: flowable-idm
  image: flowable/flowable-idm
  environment:
      - SERVER_PORT=8080
      - datasource.driver=org.postgresql.Driver
      - datasource.url=jdbc:postgresql://localhost:5432/flowable
      - datasource.username=flowable
      - datasource.password=flowable
  ports:
      - 8080:8080

flowable-task:
  image: flowable/flowable-task
  container_name: flowable-task
  environment:
      - datasource.driver=org.postgresql.Driver
      - datasource.url=jdbc:postgresql://postgres:5432/flowable
      - datasource.username=flowable
      - datasource.password=flowable
      - idm.app.url=http://flowable-idm:8080/flowable-idm
      - idm.app.redirect.url=http://localhost:8080/flowable-idm
      - idm.admin.user=admin
      - idm.admin.password=test
  ports:
      - 9999:9999

flowable-modeler:
  container_name: flowable-modeler
  image: flowable/flowable-modeler
  environment:
      - datasource.driver=org.postgresql.Driver
      - datasource.url=jdbc:postgresql://localhost:5432/flowable
      - datasource.username=flowable
      - datasource.password=flowable
      - idm.app.url=http://flowable-idm:8080/flowable-idm
      - idm.app.redirect.url=http://localhost:8080/flowable-idm
      - idm.admin.user=admin
      - idm.admin.password=test
      - deployment.api.url=http://flowable-task:9999/flowable-task/process-api
  ports:
      - 8888:8888

Can anyone help me with this?

Hi,

If you’re using the latest docker images (6.3.0) please check the environment config options.
They are described on DockerHub; https://hub.docker.com/u/flowable/dashboard/ .

And you can also look at the Docker Compose config examples here;

Regards,

Yvo