'Formsflow.ai Docker setup: WebAPI and BPM containers don't start properly
I followed the docker installation instructions for Windows with WSL2 and so far have not been able to get the forms-flow-webapi and forms-flow-bpm containers to run. All other containers are running as expected:
In the picture above, you can see forms-flow-webapi and forms-flow-bpm are not running. In fact, they restart constantly and the output can be seen below:
forms-flow-webapi container output
urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>
forms-flow-bpm container output
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8080/auth/realms/forms-flow-ai/.well-known/openid-configuration": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
Both containers restart endlessly, always displaying the same output. I have followed the instructions provided here https://github.com/AOT-Technologies/forms-flow-ai/tree/master/deployment/docker step by step, even tried on different physical machines, always the same.
I have edited the .env files located in ./forms-flow-idm/keycloak/.env
, ./forms-flow-analytics/.env
and ./deployment/docker/.env
. I repeated the installation process several times using the current version available (commit 18a77a) and got the same result every single time. I might have missed something but I can't figure out what it is by just looking at the output. Any guidance is appreciated.
Solution 1:[1]
You cannot refer to keycloak with localhost:8080 from another container as it looks up within forms-flow-bpm container for 8080 port. So i recommend you to use the system IP / domain name to refer to services in .env file. If you are referring to this then http://{your-ip-address}:8080 can be replaced with eg: http://192.168.1.100:8080
Solution 2:[2]
I fixed it by following https://github.com/AOT-Technologies/forms-flow-ai/tree/master/forms-flow-bpm
- access Keycloak admin, go to clients / form-flow-bpm, and click Credentials tab. Copy secret key
- copy sample.env to .env and overwrite secret key
- rebuild docker image docker-compose -f docker-compose-windows.yml up --build -d
It should work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | John Thomas |
Solution 2 | AndyC |