I am using the jboss-cli tools to restart my Wildfly using the following argument string:
jboss-cli.sh --connect controller=myServer:port --user=user --password=password --command='shutdown --restart=true'
It issues the restart, but then fails with the following error:
Failed to establish connection in 6059ms: WFLYPRT0053: Could not connect to http-remoting://myServer:port. The connection failed: Connection refused
It always throws this after 6 seconds.
I have also tried adding '--timeout=30000' to the end of the command, and I still get the error -- I didn't really expect this to work as this is a connection refused error, not a timeout error. Does anyone have any ideas? It seems as though the controller is trying to re-connect before the restart operation has completed? This also only seems to be occurring on my Unix environments, running the same command against a Wildfly running on Windows works just fine.
Some additional info:
JBoss AS release: 1.0.2.Final "Kenny"
JBoss AS product: WildFly Full 9.0.2.Final
java.vm.vendor: Oracle Corporation
why not just call command "reload"