Search code examples
javadockerintellij-ideadocker-for-windowsjboss-eap-7

Docker for Windows: our development setup stopped working starting version 3.0.0+


I tried updating Docker for Windows to 3.1.0 (skipping 3.0.0) this week, but with this update, our development setup stopped working.

Some key points describing our setup

  • Docker is running on WSL2.
  • We have a docker-compose.yml for setting up the infrastructure.
  • This includes Oracle database 19.3 and JBoss EAP 7.3 (JDK 11).
  • The JBoss service has the ports 8080 (webserver), 8787 (Java remote debugging) and 9990 (JBoss management API) exposed and mapped in docker-compose.yml.
  • We use IntelliJ for development and have the "JBoss run configuration" configured the use the above mentioned ports. IntelliJ will compile and deploy the application on demand through the JBoss management API on port 9990.

Problem

The mentioned "JBoss run configuration" is the part of this setup which stopped working under Docker for Windows 3.0.0+. It seems like IntelliJ can't connet to these ports anymore, resulting in connection timeout errors on "localhost:9990". In version 2.5.x and earlier we had no problems, I tested with both 3.0.0 and 3.1.0 without success. To verify, I uninstalled Docker and installed version 2.5.x again and it started worked again. So something must have changed in Docker for Windows for the this happen.

Edit: I should mention the problem seems to be primarily the JBoss service. The oracle database and its port mapping works and can be connected to from any database client. The container logs from the JBoss service also don't report anything problematic and the service seems to start without problem.

Questions

  • Has someone some hints where to search or how to debug this problem?
  • Has something experienced something similar?
  • Does someone know what breaking changes were introduced starting Docker for Windows 3.0.0+?

Solution

  • After some try and error on multiple fronts I finally found the problem. Networking and port mapping was working as expected. The problem was the connection timeout of the JBoss CLI, which IntelliJ delegates to, that has a default timeout value of 5 seconds.

    Why this timeout is a problem after upgrading to Docker Desktop 3+ I don't know. But to me it seems like in the new version of Docker there is such a massive performance degradation somewhere, that the timeout of 5 seconds was exceeded every single time, so that the error always appeared.

    So my solution currently, even though it smells like a workaround, is to simply set a higher value for the timeout in IntelliJ.

    How can this timeout be increased?

    • in IntelliJ open the menu Help > Edit Custom Properties..., which opens the idea.properties file, where you can specify IntelliJ launch options
    • add the property idea.wildfly.client.timeout=30000 to this file
    • restart IntelliJ