I am trying to execute few commands using cli from java code. For this, I am trying to connect to cli but I am unable to connect.
When i connect using jboss.cli.sh -> connect loclahost:9990, it connects.
When I try this from java using CommandContextFactory, it fails.
CommandContextFactory.getInstance().newCommandContext().connectController()
Exception is:
java.io.IOException: java.net.ConnectException: WFLYPRT0023: Could not connect to remote+http://localhost:9990. The connection timed out
I am getting same exception when I am using
ModelControllerClient.Factory.create("localhost", 9990)
Any pointers as what I might be missing?
-Swaraj