Remote deployment via management API of WAR in Wildfly (running in Docker) Follow
I want to develop a JEE application using Docker. So I spin up a Wildfly Application Server in a Docker container. Everything is fine and working. A have access to the management console and so on.
Now, I want to deploy (and later debug) a JEE application. At the moment I'm playing around with a simple Hello World app. Therefore I create a run configuration of type "JBOSS Server remote". Before, I downloaded a version of Wildfly (same version as in container) and selected it in the field "Application server". BTW, why do I need a local copy of the Wildfly server. Is the Wildfly inside the container not enough? Only to use the jboss-cli?
When I start the configuration I get the following error:
Error running 'docker-wildfly-remote'
Unable to connect to the localhost:9999, reason:
com.intellij.javaee.process.common.WrappedException: java.io.IOException: java.net.ConnectException: WFLYPRT0023: Could not connect to remote://localhost:9999. The connection timed out
When I connect to the server via CLI with this command. This works:
./jboss-cli.bat --connect --controller=remote+http://localhost:9999
But I get the exact same error which is IntelliJ complaining about if I use this command:
./jboss-cli.bat --connect --controller=remote://localhost:9999
Failed to connect to the controller: The controller is not available at localhost:9999: java.net.ConnectException: WFLYPRT0023: Could not connect to remote://localhost:9999. The connection timed out: WFLYPRT0023: Could not connect to remote://localhost:9999. The connection timed out
It seems that "+http" is missing in the connection (controller) string.
What I'm doing wrong? Didn't found a tutorial or solution in the internet.
Please sign in to leave a comment.
Do not use port 9999 and also not 9990 if you have a Nvidia graphic card. This fixed the problem.
Kersten Lorenz Thanks for your post. I observed the same behavior. Hopefully changing the port will resolve this issue :-)
I'm currently facing the same issue, but I don't have a Nvidia but an Intel Graphic card. Is there any other way how to solve this?
Have you tried to change port?
Yes, I did but I still got the error.
When I was checking the idea.log file, I found these errors:
Do you have any suggestions how to fix this? The access and the manual deployment over the management console (http://localhost:9990/console) using the browser works for me without any problems.
Do you use any antivirus software or firewall that might block connections? Also please use "netstat" command in console to check if port is free.
Yes, I have an antivirus software and a firewall but it does not block the access since I'm also able to access the web console via the URL http://localhost:9990/console. I even tried to connect to Wildfly directly via jboss-cli and it was working:
Furthermore, I also used "netstat" to check if the port was free and that was indeed the case.
Do you have any suggestion how to troubleshoot and fix this?
Please try to configure connection timeout (https://youtrack.jetbrains.com/issue/IDEA-196515/WildFly-Allow-to-configure-connection-timeout-to-management-API#focus=Comments-27-3395887.0-0). Will it help?
I tried both approaches, but still it is not working for me:
I'm getting this error:
Is it possible to temporarily disable antivirus and firewall? Probably they block calls from IDE.